@dao42/d42paas-front 0.7.11 → 0.7.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DaoPaaS.es.js +1 -1
- package/dist/DaoPaaS.umd.js +1 -1
- package/package.json +1 -1
package/dist/DaoPaaS.es.js
CHANGED
|
@@ -189842,7 +189842,7 @@ class EditorData {
|
|
|
189842
189842
|
language: language2,
|
|
189843
189843
|
APP_DIR: APP_DIR2
|
|
189844
189844
|
}, callback, cover = false) {
|
|
189845
|
-
let gotModel = editor$1.getModels().find((x2) =>
|
|
189845
|
+
let gotModel = editor$1.getModels().find((x2) => x2.uri.path.includes(path));
|
|
189846
189846
|
if (!gotModel && !!cover) {
|
|
189847
189847
|
gotModel = editor$1.createModel(value, language2, Uri.parse(`file://${APP_DIR2}${path}`));
|
|
189848
189848
|
this.setFileTreeStack([
|
package/dist/DaoPaaS.umd.js
CHANGED
|
@@ -2180,7 +2180,7 @@ ${JSON.stringify(v,void 0,4)}`)});else if(f.changes)for(const v of Object.keys(f
|
|
|
2180
2180
|
importScripts('${e}/assets/css.worker.js');`)}`:i==="html"||i==="handlebars"||i==="razor"?`data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
2181
2181
|
importScripts('${e}/assets/html.worker.js');`)}`:i==="typescript"||i==="javascript"?`data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
2182
2182
|
importScripts('${e}/assets/ts.worker.js');`)}`:`data:text/javascript;charset=utf-8,${encodeURIComponent(`
|
|
2183
|
-
importScripts('${e}/assets/editor.worker.js');`)}`}}:self.MonacoEnvironment={globalAPI:!0,getWorker(t,i){return i==="json"?new yNt:i==="css"||i==="scss"||i==="less"?new CNt:i==="html"||i==="handlebars"||i==="razor"?new wNt:i==="typescript"||i==="javascript"?new SNt:new bNt}}}invertOperation(e,t){e.invert(t)}applyOperation(e){this.ignoreNextChange=!0,console.log("change from server"),this.applyOperationToMonaco(e),this.ignoreNextChange=!1}applyOperationToMonaco(e,t=!1){const{ops:i}=e,r=this.editor.getModel();let o=0;const s=[];for(let a=0;a<i.length;a++){const l=i[a];if(Zd.isRetain(l))o+=l;else if(Zd.isInsert(l)){const c=r.getPositionAt(o);s.push({forceMoveMarkers:!0,range:new UC(c.lineNumber,c.column,c.lineNumber,c.column),text:l})}else if(Zd.isDelete(l)){const c=r.getPositionAt(o),u=r.getPositionAt(o-l);s.push({forceMoveMarkers:!1,range:new UC(c.lineNumber,c.column,u.lineNumber,u.column),text:null}),o-=l}}t?r.pushEditOperations([],s,null):r.applyEdits(s),this.liveOperationCode=this.getCode()}getCursor(){var s,a,l,c;let e=this.editor.getSelection();(typeof e=="undefined"||e===null)&&(e=this.lastCursorRange);const t=e.getStartPosition(),i=e.getEndPosition();let r=(a=(s=this.editor)==null?void 0:s.getModel())==null?void 0:a.getOffsetAt(t),o=(c=(l=this.editor)==null?void 0:l.getModel())==null?void 0:c.getOffsetAt(i);if(r>o){const u=[o,r];r=u[0],o=u[1]}return new rY(r,o)}}Jl(n=>({cursor:{},setCursor:e=>n(t=>({cursor:e}))}));const oY=Jl(n=>({fileTreeStack:[],setFileTreeStack:e=>n(()=>({fileTreeStack:e}))}));class sY{localSetFileTreeStack(e){oY.getState().setFileTreeStack(e)}static get fileTreeStack(){const e=oY.getState().fileTreeStack;return console.log(e),e}static setFileTreeStack(e){return oY.getState().setFileTreeStack(e)}static updateModel({value:e,path:t,language:i,APP_DIR:r},o,s=!1){let a=Sg.getModels().find(l=>new RegExp(t).test(l.uri.path));!a&&!!s&&(a=Sg.createModel(e,i,_j.parse(`file://${r}${t}`)),this.setFileTreeStack([...this.fileTreeStack,{label:t,path:t,model:a}])),s&&(a==null||a.setValue(e)),o&&o(a)}}Qi(sY,"EditorData");class LNt{constructor(e,t){Qi(this,"clientList");Qi(this,"tempCursors");this.editor=e,this.model=e.getModel(),this.renderCursorGroup="",this.tempCursors=[],this.labelGroup=[],this.clientList=[],this.updateList(t)}updateModel(){this.model=this.editor.getModel()}set _updateList(e){this.clientList=e,this.setCursors()}updateList(e){this._updateList=e}pushSelectionToList(e){this.clientList.some(i=>i.uuid===e.uuid)?this.clientList=this.clientList.map(i=>ot(Te({},i),{selection:i.uuid===e.uuid?e.selection:i.selection})):this.clientList.push(e),this.setSelection()}pushCursorToList(e){this.clientList.some(i=>i.uuid===e.uuid)?this.clientList=this.clientList.map(i=>ot(Te({},i),{cursor:i.uuid===e.uuid?e.cursor:i.cursor})):this.clientList.push(e),this.setCursors()}setCursors(){const e=this.editor.getModel();if(!e)return;const t={firstArg:[],secondArg:[]};t.firstArg=this.renderCursorGroup?this.renderCursorGroup:this.clientList.map(i=>i.role),t.secondArg=this.clientList.map(i=>{const{cursor:r}=i;if(r){const o=e.getPositionAt(r.position),s=e.getPositionAt(r.selectionEnd);return{range:new UC(o.lineNumber,o.column,s.lineNumber,s.column),options:{className:Yt.getState().doc.path===r.path?i.role:""}}}else return{range:new UC(0,0,0,0),options:{className:""}}}),this.renderCursorGroup=this.editor.deltaDecorations(t.firstArg,t.secondArg),this.setLabels()}removeCursor(e){}setSelection(){}removeSelection(e){}setLabels(){const e=this.editor.getModel();this.clientList=this.clientList.map(t=>{var s,a;const r=t.cursor!==void 0&&t.cursor.position!==void 0?e.getPositionAt(t.cursor.position):{lineNumber:1,column:1},o=ot(Te({},t.label),{domNode:null,getId:function(){return`label-${t.uuid}`},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.className=`monaco-label ${t.role}-label no-cursor`,this.domNode.innerHTML=t.username,this.domNode.style.background=t.color),this.domNode},getPosition:function(){return{position:{lineNumber:r.lineNumber,column:r.column},preference:[Sg.ContentWidgetPositionPreference.ABOVE,Sg.ContentWidgetPositionPreference.BELOW]}}});if(this.editor._contentWidgets[`label-${t.uuid}`]){this.editor.layoutContentWidget(o);const l=document.querySelector(`.${t.role}-label`);((s=t==null?void 0:t.cursor)==null?void 0:s.path)&&Yt.getState().doc.path===((a=t==null?void 0:t.cursor)==null?void 0:a.path)?l==null||l.classList.remove("no-cursor"):l==null||l.classList.add("no-cursor")}else this.editor.addContentWidget(o);return ot(Te({},t),{contentWidget:o})})}}const aY="/home/runner/app";let ef;const lY=new Map,kwe=Jl(n=>({cursor:{},setCursor:e=>n(t=>({cursor:e}))})),Wg=new kl(0),cY=[],TNt=({doc:n,containerStyle:e,menuStyle:t,editorStyle:i,serviceWorkerOrigin:r,useLsp:o})=>{const s=O.exports.useRef(null),[a,l]=O.exports.useState(null),[c,u]=O.exports.useState(null),[d,h]=O.exports.useState(null),{setCRDTInfo:f,setAsyncType:g,switchDoc:p}=Yt.getState(),m=Yt(P=>P.CRDTInfo),v=Yt(P=>P.CRDTInfo.file),_=Yt(P=>P.doc),y=sa(P=>P.userList),b=Mu(P=>P.userInfo),w=Yr(P=>P.socket);ec.exports.debounce(P=>{P()},300);const x=P=>{const{CRDTInfo:U,setCRDTInfo:F}=Yt.getState();F(ot(Te({},U),{file:{action:"Get",value:P.getValue(),path:P.uri.path.replace(aY,"")}})),p({value:P.getValue(),path:P.uri.path.replace(aY,"")})};Wg.sendOperation=(P,U)=>{if(Yt.getState().appStatus==="replay")return;const{userInfo:F}=Mu.getState(),{doc:M,switchDoc:W}=Yt.getState();let j;(M==null?void 0:M.path)?j=M.path:(j=`temp-${cY.length+1}`,W({path:`temp-${cY.length+1}`}),cY.push(j));const $={timestamp:Date.now(),userInfo:ec.exports.pick(F,["role","uuid"]),cursor:ot(Te({},a.getCursor()),{path:j}),editor:{operation:U,revision:P,evtType:"Editor"},file:{action:"Update",path:j}};w==null||w.emit("editFile",JSON.stringify($))},Wg.applyOperation=P=>{a.applyOperation(P)};const S=P=>{Wg.applyClient(P)},k=P=>{Yt.getState()},T=P=>{if(!P||(P==null?void 0:P.reason)===0&&(P==null?void 0:P.source)==="keyboard")return;const U=a.getCursor();kwe.getState().setCursor(U),D(U)},D=P=>{var F,M;const U={timestamp:Date.now(),cursor:P||kwe.getState().cursor,file:{action:"Update",path:(M=(F=Yt.getState())==null?void 0:F.doc)==null?void 0:M.path},userInfo:ec.exports.pick(b,"uuid","role")};w==null||w.emit("cursor",JSON.stringify(U))},R=P=>{},N=P=>{const U=a.getCursor();D(U)},A=P=>{if((P==null?void 0:P.path)&&ef){let U=/\.(\w+$)/gim.exec(P.path);U=U||["",P.path.substring(1)];const{CRDTInfo:F,doc:M,appStatus:W,setAppStatus:j}=Yt.getState(),{shadowUser:$}=P_.getState();if(W!=="replay"&&($.uuid||P.path&&U&&Hd(F.userInfo))){const Q=qK[U[1]];sY.updateModel({value:P.value,path:P.path,language:Q,APP_DIR:aY},ee=>{var ge;Wg.revision=((ge=F.editor)==null?void 0:ge.revision)?F.editor.revision:0,ef.setModel(ee),a==null||a.updateModel(),h(sY.fileTreeStack),a.onFocus(),a.onCursorActivity(),c==null||c.setCursors(),P&&(lY.set(P.path,{operation:[],revision:Wg.revision,value:P.value}),Yt.getState().appStatus!=="replay"&&zee(M==null?void 0:M.path,{value:P.value,revision:Wg.revision}))},!0)}}},V=()=>{const P=ef._codeEditorService,U=P.openCodeEditor.bind(P);P.openCodeEditor=async(F,M,W)=>{const j=await U(F,M);if(j===null){const $=Sg.getModels().find(Q=>new RegExp(F.resource.path).test(Q.uri.path));x($)}return j}};return O.exports.useEffect(()=>(ef=Sg.create(s.current,{theme:"vs-dark",automaticLayout:!0,glyphMargin:!0,lightbulb:{enabled:!0}}),Sg.defineTheme("myCoolTheme",{base:"vs-dark",inherit:!1,rules:[{token:"green",background:"FF0000",foreground:"00FF00",fontStyle:"italic"},{token:"red",foreground:"FF0000",fontStyle:"bold underline"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#000000"}}),l(new kNt(ef,r)),u(new LNt(ef,y.filter(P=>!Hd(P)))),V(),()=>{ef.dispose()}),[]),O.exports.useEffect(()=>{a==null||a.registerCallbacks({change:S,cursorActivity:T,selectionActivity:k,blur:R,focus:N}),a==null||a.onCursorActivity()},[a]),O.exports.useEffect(()=>(w==null||w.on("editFile",P=>{var M,W,j,$;const U=JSON.parse(P),F=(M=Yt.getState().doc)==null?void 0:M.path;if(((j=ef==null?void 0:ef.getModel())==null?void 0:j.uri.path.includes((W=U==null?void 0:U.file)==null?void 0:W.path))&&Wg.applyServer(Zd.fromJSON(U.editor.operation)),console.log(U),!Hd(U.userInfo)&&U.file.path){const Q=sa.getState().userList.find(ee=>ee.uuid===U.userInfo.uuid);c==null||c.pushCursorToList(Te(Te({},Q),U.userInfo)),(($=U.file)==null?void 0:$.path)!==F&&(c==null||c.removeCursor(U.userInfo))}}),w==null||w.on("serverAck",async P=>{var F,M;const U=JSON.parse(P);Wg.serverAck(),f(U),g("editor"),lY.set((F=U==null?void 0:U.file)==null?void 0:F.path,ot(Te({},lY.get((M=U==null?void 0:U.file)==null?void 0:M.path)),{operation:Wg.operation}))}),w==null||w.on("selection",async P=>{var M,W;const U=JSON.parse(P),F=(M=Yt.getState().doc)==null?void 0:M.path;if(g("editor"),!Hd(U.userInfo)&&U.file.path){const j=sa.getState().userList.find($=>$.uuid===U.userInfo.uuid);c==null||c.pushSelectionToList(Te(Te({},j),U.userInfo)),((W=U.file)==null?void 0:W.path)!==F&&(c==null||c.removeSelection(U.userInfo))}}),w==null||w.on("cursor",async P=>{var M,W;const U=JSON.parse(P),F=(M=Yt.getState().doc)==null?void 0:M.path;if(g("editor"),!Hd(U.userInfo)&&U.file.path){const j=sa.getState().userList.find($=>$.uuid===U.userInfo.uuid);c==null||c.pushCursorToList(Te(Te({},j),U.userInfo)),((W=U.file)==null?void 0:W.path)!==F&&(c==null||c.removeCursor(U.userInfo))}}),()=>{w==null||w.off("editFile"),w==null||w.off("serverAck"),w==null||w.off("selection"),w==null||w.off("cursor")}),[a,w]),O.exports.useEffect(()=>{c==null||c.updateList(y.filter(P=>!Hd(P)))},[y]),O.exports.useEffect(()=>{console.log(m),console.log(_),!/\/$/.test(_==null?void 0:_.path)&&A(v)},[_]),ne(BE,{name:"editor",children:dt(jDt,{style:e,className:"editor-layout flex flex-col",children:[(d==null?void 0:d.length)>0?ne("ul",{style:t,className:"bg-codezone-black stack-list flex flex-row items-center flex-shrink-0",children:d.map((P,U)=>ne("li",{className:`flex flex-row justify-center items-center cursor-pointer flex-grow-0 flex-shrink-0 ${P.path===(v==null?void 0:v.path)?"active":""}`,onClick:()=>{x(P.model)},children:P.label.split("/").slice(-1)[0]},U))}):null,ne(qDt,{ref:s,userList:sa.getState().userList,className:"editor-content flex-1",style:i})]})})};var Lwe=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",Editor:TNt}),uY={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(self,function(){return(()=>{var t={4567:function(s,a,l){var c,u=this&&this.__extends||(c=function(y,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(w[S]=x[S])},c(y,b)},function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function w(){this.constructor=y}c(y,b),y.prototype=b===null?Object.create(b):(w.prototype=b.prototype,new w)});Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;var d=l(9042),h=l(6114),f=l(9924),g=l(3656),p=l(844),m=l(5596),v=l(9631),_=function(y){function b(w,x){var S=y.call(this)||this;S._terminal=w,S._renderService=x,S._liveRegionLineCount=0,S._charsToConsume=[],S._charsToAnnounce="",S._accessibilityTreeRoot=document.createElement("div"),S._accessibilityTreeRoot.setAttribute("role","document"),S._accessibilityTreeRoot.classList.add("xterm-accessibility"),S._accessibilityTreeRoot.tabIndex=0,S._rowContainer=document.createElement("div"),S._rowContainer.setAttribute("role","list"),S._rowContainer.classList.add("xterm-accessibility-tree"),S._rowElements=[];for(var k=0;k<S._terminal.rows;k++)S._rowElements[k]=S._createAccessibilityTreeNode(),S._rowContainer.appendChild(S._rowElements[k]);if(S._topBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,0)},S._bottomBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,1)},S._rowElements[0].addEventListener("focus",S._topBoundaryFocusListener),S._rowElements[S._rowElements.length-1].addEventListener("focus",S._bottomBoundaryFocusListener),S._refreshRowsDimensions(),S._accessibilityTreeRoot.appendChild(S._rowContainer),S._renderRowsDebouncer=new f.TimeBasedDebouncer(S._renderRows.bind(S)),S._refreshRows(),S._liveRegion=document.createElement("div"),S._liveRegion.classList.add("live-region"),S._liveRegion.setAttribute("aria-live","assertive"),S._accessibilityTreeRoot.appendChild(S._liveRegion),!S._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return S._terminal.element.insertAdjacentElement("afterbegin",S._accessibilityTreeRoot),S.register(S._renderRowsDebouncer),S.register(S._terminal.onResize(function(T){return S._onResize(T.rows)})),S.register(S._terminal.onRender(function(T){return S._refreshRows(T.start,T.end)})),S.register(S._terminal.onScroll(function(){return S._refreshRows()})),S.register(S._terminal.onA11yChar(function(T){return S._onChar(T)})),S.register(S._terminal.onLineFeed(function(){return S._onChar(`
|
|
2183
|
+
importScripts('${e}/assets/editor.worker.js');`)}`}}:self.MonacoEnvironment={globalAPI:!0,getWorker(t,i){return i==="json"?new yNt:i==="css"||i==="scss"||i==="less"?new CNt:i==="html"||i==="handlebars"||i==="razor"?new wNt:i==="typescript"||i==="javascript"?new SNt:new bNt}}}invertOperation(e,t){e.invert(t)}applyOperation(e){this.ignoreNextChange=!0,console.log("change from server"),this.applyOperationToMonaco(e),this.ignoreNextChange=!1}applyOperationToMonaco(e,t=!1){const{ops:i}=e,r=this.editor.getModel();let o=0;const s=[];for(let a=0;a<i.length;a++){const l=i[a];if(Zd.isRetain(l))o+=l;else if(Zd.isInsert(l)){const c=r.getPositionAt(o);s.push({forceMoveMarkers:!0,range:new UC(c.lineNumber,c.column,c.lineNumber,c.column),text:l})}else if(Zd.isDelete(l)){const c=r.getPositionAt(o),u=r.getPositionAt(o-l);s.push({forceMoveMarkers:!1,range:new UC(c.lineNumber,c.column,u.lineNumber,u.column),text:null}),o-=l}}t?r.pushEditOperations([],s,null):r.applyEdits(s),this.liveOperationCode=this.getCode()}getCursor(){var s,a,l,c;let e=this.editor.getSelection();(typeof e=="undefined"||e===null)&&(e=this.lastCursorRange);const t=e.getStartPosition(),i=e.getEndPosition();let r=(a=(s=this.editor)==null?void 0:s.getModel())==null?void 0:a.getOffsetAt(t),o=(c=(l=this.editor)==null?void 0:l.getModel())==null?void 0:c.getOffsetAt(i);if(r>o){const u=[o,r];r=u[0],o=u[1]}return new rY(r,o)}}Jl(n=>({cursor:{},setCursor:e=>n(t=>({cursor:e}))}));const oY=Jl(n=>({fileTreeStack:[],setFileTreeStack:e=>n(()=>({fileTreeStack:e}))}));class sY{localSetFileTreeStack(e){oY.getState().setFileTreeStack(e)}static get fileTreeStack(){const e=oY.getState().fileTreeStack;return console.log(e),e}static setFileTreeStack(e){return oY.getState().setFileTreeStack(e)}static updateModel({value:e,path:t,language:i,APP_DIR:r},o,s=!1){let a=Sg.getModels().find(l=>l.uri.path.includes(t));!a&&!!s&&(a=Sg.createModel(e,i,_j.parse(`file://${r}${t}`)),this.setFileTreeStack([...this.fileTreeStack,{label:t,path:t,model:a}])),s&&(a==null||a.setValue(e)),o&&o(a)}}Qi(sY,"EditorData");class LNt{constructor(e,t){Qi(this,"clientList");Qi(this,"tempCursors");this.editor=e,this.model=e.getModel(),this.renderCursorGroup="",this.tempCursors=[],this.labelGroup=[],this.clientList=[],this.updateList(t)}updateModel(){this.model=this.editor.getModel()}set _updateList(e){this.clientList=e,this.setCursors()}updateList(e){this._updateList=e}pushSelectionToList(e){this.clientList.some(i=>i.uuid===e.uuid)?this.clientList=this.clientList.map(i=>ot(Te({},i),{selection:i.uuid===e.uuid?e.selection:i.selection})):this.clientList.push(e),this.setSelection()}pushCursorToList(e){this.clientList.some(i=>i.uuid===e.uuid)?this.clientList=this.clientList.map(i=>ot(Te({},i),{cursor:i.uuid===e.uuid?e.cursor:i.cursor})):this.clientList.push(e),this.setCursors()}setCursors(){const e=this.editor.getModel();if(!e)return;const t={firstArg:[],secondArg:[]};t.firstArg=this.renderCursorGroup?this.renderCursorGroup:this.clientList.map(i=>i.role),t.secondArg=this.clientList.map(i=>{const{cursor:r}=i;if(r){const o=e.getPositionAt(r.position),s=e.getPositionAt(r.selectionEnd);return{range:new UC(o.lineNumber,o.column,s.lineNumber,s.column),options:{className:Yt.getState().doc.path===r.path?i.role:""}}}else return{range:new UC(0,0,0,0),options:{className:""}}}),this.renderCursorGroup=this.editor.deltaDecorations(t.firstArg,t.secondArg),this.setLabels()}removeCursor(e){}setSelection(){}removeSelection(e){}setLabels(){const e=this.editor.getModel();this.clientList=this.clientList.map(t=>{var s,a;const r=t.cursor!==void 0&&t.cursor.position!==void 0?e.getPositionAt(t.cursor.position):{lineNumber:1,column:1},o=ot(Te({},t.label),{domNode:null,getId:function(){return`label-${t.uuid}`},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.className=`monaco-label ${t.role}-label no-cursor`,this.domNode.innerHTML=t.username,this.domNode.style.background=t.color),this.domNode},getPosition:function(){return{position:{lineNumber:r.lineNumber,column:r.column},preference:[Sg.ContentWidgetPositionPreference.ABOVE,Sg.ContentWidgetPositionPreference.BELOW]}}});if(this.editor._contentWidgets[`label-${t.uuid}`]){this.editor.layoutContentWidget(o);const l=document.querySelector(`.${t.role}-label`);((s=t==null?void 0:t.cursor)==null?void 0:s.path)&&Yt.getState().doc.path===((a=t==null?void 0:t.cursor)==null?void 0:a.path)?l==null||l.classList.remove("no-cursor"):l==null||l.classList.add("no-cursor")}else this.editor.addContentWidget(o);return ot(Te({},t),{contentWidget:o})})}}const aY="/home/runner/app";let ef;const lY=new Map,kwe=Jl(n=>({cursor:{},setCursor:e=>n(t=>({cursor:e}))})),Wg=new kl(0),cY=[],TNt=({doc:n,containerStyle:e,menuStyle:t,editorStyle:i,serviceWorkerOrigin:r,useLsp:o})=>{const s=O.exports.useRef(null),[a,l]=O.exports.useState(null),[c,u]=O.exports.useState(null),[d,h]=O.exports.useState(null),{setCRDTInfo:f,setAsyncType:g,switchDoc:p}=Yt.getState(),m=Yt(P=>P.CRDTInfo),v=Yt(P=>P.CRDTInfo.file),_=Yt(P=>P.doc),y=sa(P=>P.userList),b=Mu(P=>P.userInfo),w=Yr(P=>P.socket);ec.exports.debounce(P=>{P()},300);const x=P=>{const{CRDTInfo:U,setCRDTInfo:F}=Yt.getState();F(ot(Te({},U),{file:{action:"Get",value:P.getValue(),path:P.uri.path.replace(aY,"")}})),p({value:P.getValue(),path:P.uri.path.replace(aY,"")})};Wg.sendOperation=(P,U)=>{if(Yt.getState().appStatus==="replay")return;const{userInfo:F}=Mu.getState(),{doc:M,switchDoc:W}=Yt.getState();let j;(M==null?void 0:M.path)?j=M.path:(j=`temp-${cY.length+1}`,W({path:`temp-${cY.length+1}`}),cY.push(j));const $={timestamp:Date.now(),userInfo:ec.exports.pick(F,["role","uuid"]),cursor:ot(Te({},a.getCursor()),{path:j}),editor:{operation:U,revision:P,evtType:"Editor"},file:{action:"Update",path:j}};w==null||w.emit("editFile",JSON.stringify($))},Wg.applyOperation=P=>{a.applyOperation(P)};const S=P=>{Wg.applyClient(P)},k=P=>{Yt.getState()},T=P=>{if(!P||(P==null?void 0:P.reason)===0&&(P==null?void 0:P.source)==="keyboard")return;const U=a.getCursor();kwe.getState().setCursor(U),D(U)},D=P=>{var F,M;const U={timestamp:Date.now(),cursor:P||kwe.getState().cursor,file:{action:"Update",path:(M=(F=Yt.getState())==null?void 0:F.doc)==null?void 0:M.path},userInfo:ec.exports.pick(b,"uuid","role")};w==null||w.emit("cursor",JSON.stringify(U))},R=P=>{},N=P=>{const U=a.getCursor();D(U)},A=P=>{if((P==null?void 0:P.path)&&ef){let U=/\.(\w+$)/gim.exec(P.path);U=U||["",P.path.substring(1)];const{CRDTInfo:F,doc:M,appStatus:W,setAppStatus:j}=Yt.getState(),{shadowUser:$}=P_.getState();if(W!=="replay"&&($.uuid||P.path&&U&&Hd(F.userInfo))){const Q=qK[U[1]];sY.updateModel({value:P.value,path:P.path,language:Q,APP_DIR:aY},ee=>{var ge;Wg.revision=((ge=F.editor)==null?void 0:ge.revision)?F.editor.revision:0,ef.setModel(ee),a==null||a.updateModel(),h(sY.fileTreeStack),a.onFocus(),a.onCursorActivity(),c==null||c.setCursors(),P&&(lY.set(P.path,{operation:[],revision:Wg.revision,value:P.value}),Yt.getState().appStatus!=="replay"&&zee(M==null?void 0:M.path,{value:P.value,revision:Wg.revision}))},!0)}}},V=()=>{const P=ef._codeEditorService,U=P.openCodeEditor.bind(P);P.openCodeEditor=async(F,M,W)=>{const j=await U(F,M);if(j===null){const $=Sg.getModels().find(Q=>new RegExp(F.resource.path).test(Q.uri.path));x($)}return j}};return O.exports.useEffect(()=>(ef=Sg.create(s.current,{theme:"vs-dark",automaticLayout:!0,glyphMargin:!0,lightbulb:{enabled:!0}}),Sg.defineTheme("myCoolTheme",{base:"vs-dark",inherit:!1,rules:[{token:"green",background:"FF0000",foreground:"00FF00",fontStyle:"italic"},{token:"red",foreground:"FF0000",fontStyle:"bold underline"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#000000"}}),l(new kNt(ef,r)),u(new LNt(ef,y.filter(P=>!Hd(P)))),V(),()=>{ef.dispose()}),[]),O.exports.useEffect(()=>{a==null||a.registerCallbacks({change:S,cursorActivity:T,selectionActivity:k,blur:R,focus:N}),a==null||a.onCursorActivity()},[a]),O.exports.useEffect(()=>(w==null||w.on("editFile",P=>{var M,W,j,$;const U=JSON.parse(P),F=(M=Yt.getState().doc)==null?void 0:M.path;if(((j=ef==null?void 0:ef.getModel())==null?void 0:j.uri.path.includes((W=U==null?void 0:U.file)==null?void 0:W.path))&&Wg.applyServer(Zd.fromJSON(U.editor.operation)),console.log(U),!Hd(U.userInfo)&&U.file.path){const Q=sa.getState().userList.find(ee=>ee.uuid===U.userInfo.uuid);c==null||c.pushCursorToList(Te(Te({},Q),U.userInfo)),(($=U.file)==null?void 0:$.path)!==F&&(c==null||c.removeCursor(U.userInfo))}}),w==null||w.on("serverAck",async P=>{var F,M;const U=JSON.parse(P);Wg.serverAck(),f(U),g("editor"),lY.set((F=U==null?void 0:U.file)==null?void 0:F.path,ot(Te({},lY.get((M=U==null?void 0:U.file)==null?void 0:M.path)),{operation:Wg.operation}))}),w==null||w.on("selection",async P=>{var M,W;const U=JSON.parse(P),F=(M=Yt.getState().doc)==null?void 0:M.path;if(g("editor"),!Hd(U.userInfo)&&U.file.path){const j=sa.getState().userList.find($=>$.uuid===U.userInfo.uuid);c==null||c.pushSelectionToList(Te(Te({},j),U.userInfo)),((W=U.file)==null?void 0:W.path)!==F&&(c==null||c.removeSelection(U.userInfo))}}),w==null||w.on("cursor",async P=>{var M,W;const U=JSON.parse(P),F=(M=Yt.getState().doc)==null?void 0:M.path;if(g("editor"),!Hd(U.userInfo)&&U.file.path){const j=sa.getState().userList.find($=>$.uuid===U.userInfo.uuid);c==null||c.pushCursorToList(Te(Te({},j),U.userInfo)),((W=U.file)==null?void 0:W.path)!==F&&(c==null||c.removeCursor(U.userInfo))}}),()=>{w==null||w.off("editFile"),w==null||w.off("serverAck"),w==null||w.off("selection"),w==null||w.off("cursor")}),[a,w]),O.exports.useEffect(()=>{c==null||c.updateList(y.filter(P=>!Hd(P)))},[y]),O.exports.useEffect(()=>{console.log(m),console.log(_),!/\/$/.test(_==null?void 0:_.path)&&A(v)},[_]),ne(BE,{name:"editor",children:dt(jDt,{style:e,className:"editor-layout flex flex-col",children:[(d==null?void 0:d.length)>0?ne("ul",{style:t,className:"bg-codezone-black stack-list flex flex-row items-center flex-shrink-0",children:d.map((P,U)=>ne("li",{className:`flex flex-row justify-center items-center cursor-pointer flex-grow-0 flex-shrink-0 ${P.path===(v==null?void 0:v.path)?"active":""}`,onClick:()=>{x(P.model)},children:P.label.split("/").slice(-1)[0]},U))}):null,ne(qDt,{ref:s,userList:sa.getState().userList,className:"editor-content flex-1",style:i})]})})};var Lwe=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",Editor:TNt}),uY={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(self,function(){return(()=>{var t={4567:function(s,a,l){var c,u=this&&this.__extends||(c=function(y,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(w[S]=x[S])},c(y,b)},function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function w(){this.constructor=y}c(y,b),y.prototype=b===null?Object.create(b):(w.prototype=b.prototype,new w)});Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;var d=l(9042),h=l(6114),f=l(9924),g=l(3656),p=l(844),m=l(5596),v=l(9631),_=function(y){function b(w,x){var S=y.call(this)||this;S._terminal=w,S._renderService=x,S._liveRegionLineCount=0,S._charsToConsume=[],S._charsToAnnounce="",S._accessibilityTreeRoot=document.createElement("div"),S._accessibilityTreeRoot.setAttribute("role","document"),S._accessibilityTreeRoot.classList.add("xterm-accessibility"),S._accessibilityTreeRoot.tabIndex=0,S._rowContainer=document.createElement("div"),S._rowContainer.setAttribute("role","list"),S._rowContainer.classList.add("xterm-accessibility-tree"),S._rowElements=[];for(var k=0;k<S._terminal.rows;k++)S._rowElements[k]=S._createAccessibilityTreeNode(),S._rowContainer.appendChild(S._rowElements[k]);if(S._topBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,0)},S._bottomBoundaryFocusListener=function(T){return S._onBoundaryFocus(T,1)},S._rowElements[0].addEventListener("focus",S._topBoundaryFocusListener),S._rowElements[S._rowElements.length-1].addEventListener("focus",S._bottomBoundaryFocusListener),S._refreshRowsDimensions(),S._accessibilityTreeRoot.appendChild(S._rowContainer),S._renderRowsDebouncer=new f.TimeBasedDebouncer(S._renderRows.bind(S)),S._refreshRows(),S._liveRegion=document.createElement("div"),S._liveRegion.classList.add("live-region"),S._liveRegion.setAttribute("aria-live","assertive"),S._accessibilityTreeRoot.appendChild(S._liveRegion),!S._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return S._terminal.element.insertAdjacentElement("afterbegin",S._accessibilityTreeRoot),S.register(S._renderRowsDebouncer),S.register(S._terminal.onResize(function(T){return S._onResize(T.rows)})),S.register(S._terminal.onRender(function(T){return S._refreshRows(T.start,T.end)})),S.register(S._terminal.onScroll(function(){return S._refreshRows()})),S.register(S._terminal.onA11yChar(function(T){return S._onChar(T)})),S.register(S._terminal.onLineFeed(function(){return S._onChar(`
|
|
2184
2184
|
`)})),S.register(S._terminal.onA11yTab(function(T){return S._onTab(T)})),S.register(S._terminal.onKey(function(T){return S._onKey(T.key)})),S.register(S._terminal.onBlur(function(){return S._clearLiveRegion()})),S.register(S._renderService.onDimensionsChange(function(){return S._refreshRowsDimensions()})),S._screenDprMonitor=new m.ScreenDprMonitor,S.register(S._screenDprMonitor),S._screenDprMonitor.setListener(function(){return S._refreshRowsDimensions()}),S.register((0,g.addDisposableDomListener)(window,"resize",function(){return S._refreshRowsDimensions()})),S}return u(b,y),b.prototype.dispose=function(){y.prototype.dispose.call(this),(0,v.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},b.prototype._onBoundaryFocus=function(w,x){var S=w.target,k=this._rowElements[x===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")!==(x===0?"1":""+this._terminal.buffer.lines.length)&&w.relatedTarget===k){var T,D;if(x===0?(T=S,D=this._rowElements.pop(),this._rowContainer.removeChild(D)):(T=this._rowElements.shift(),D=S,this._rowContainer.removeChild(T)),T.removeEventListener("focus",this._topBoundaryFocusListener),D.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){var R=this._createAccessibilityTreeNode();this._rowElements.unshift(R),this._rowContainer.insertAdjacentElement("afterbegin",R)}else R=this._createAccessibilityTreeNode(),this._rowElements.push(R),this._rowContainer.appendChild(R);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}},b.prototype._onResize=function(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var x=this._rowContainer.children.length;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);for(;this._rowElements.length>w;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},b.prototype._createAccessibilityTreeNode=function(){var w=document.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w},b.prototype._onTab=function(w){for(var x=0;x<w;x++)this._onChar(" ")},b.prototype._onChar=function(w){var x=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===`
|
|
2185
2185
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),h.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){x._accessibilityTreeRoot.appendChild(x._liveRegion)},0))},b.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,h.isMac&&(0,v.removeElementFromParent)(this._liveRegion)},b.prototype._onKey=function(w){this._clearLiveRegion(),this._charsToConsume.push(w)},b.prototype._refreshRows=function(w,x){this._renderRowsDebouncer.refresh(w,x,this._terminal.rows)},b.prototype._renderRows=function(w,x){for(var S=this._terminal.buffer,k=S.lines.length.toString(),T=w;T<=x;T++){var D=S.translateBufferLineToString(S.ydisp+T,!0),R=(S.ydisp+T+1).toString(),N=this._rowElements[T];N&&(D.length===0?N.innerText="\xA0":N.textContent=D,N.setAttribute("aria-posinset",R),N.setAttribute("aria-setsize",k))}this._announceCharacters()},b.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var w=0;w<this._terminal.rows;w++)this._refreshRowDimensions(this._rowElements[w])}},b.prototype._refreshRowDimensions=function(w){w.style.height=this._renderService.dimensions.actualCellHeight+"px"},b.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},b}(p.Disposable);a.AccessibilityManager=_},3614:(s,a)=>{function l(h){return h.replace(/\r?\n/g,"\r")}function c(h,f){return f?"[200~"+h+"[201~":h}function u(h,f,g){h=c(h=l(h),g.decPrivateModes.bracketedPasteMode),g.triggerDataEvent(h,!0),f.value=""}function d(h,f,g){var p=g.getBoundingClientRect(),m=h.clientX-p.left-10,v=h.clientY-p.top-10;f.style.width="20px",f.style.height="20px",f.style.left=m+"px",f.style.top=v+"px",f.style.zIndex="1000",f.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=l,a.bracketTextForPaste=c,a.copyHandler=function(h,f){h.clipboardData&&h.clipboardData.setData("text/plain",f.selectionText),h.preventDefault()},a.handlePasteEvent=function(h,f,g){h.stopPropagation(),h.clipboardData&&u(h.clipboardData.getData("text/plain"),f,g)},a.paste=u,a.moveTextAreaUnderMouseCursor=d,a.rightClickHandler=function(h,f,g,p,m){d(h,f,g),m&&p.rightClickSelect(h),f.value=p.selectionText,f.select()}},4774:(s,a)=>{var l,c,u,d;function h(g){var p=g.toString(16);return p.length<2?"0"+p:p}function f(g,p){return g<p?(p+.05)/(g+.05):(g+.05)/(p+.05)}Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=void 0,function(g){g.toCss=function(p,m,v,_){return _!==void 0?"#"+h(p)+h(m)+h(v)+h(_):"#"+h(p)+h(m)+h(v)},g.toRgba=function(p,m,v,_){return _===void 0&&(_=255),(p<<24|m<<16|v<<8|_)>>>0}}(l=a.channels||(a.channels={})),(c=a.color||(a.color={})).blend=function(g,p){var m=(255&p.rgba)/255;if(m===1)return{css:p.css,rgba:p.rgba};var v=p.rgba>>24&255,_=p.rgba>>16&255,y=p.rgba>>8&255,b=g.rgba>>24&255,w=g.rgba>>16&255,x=g.rgba>>8&255,S=b+Math.round((v-b)*m),k=w+Math.round((_-w)*m),T=x+Math.round((y-x)*m);return{css:l.toCss(S,k,T),rgba:l.toRgba(S,k,T)}},c.isOpaque=function(g){return(255&g.rgba)==255},c.ensureContrastRatio=function(g,p,m){var v=d.ensureContrastRatio(g.rgba,p.rgba,m);if(v)return d.toColor(v>>24&255,v>>16&255,v>>8&255)},c.opaque=function(g){var p=(255|g.rgba)>>>0,m=d.toChannels(p),v=m[0],_=m[1],y=m[2];return{css:l.toCss(v,_,y),rgba:p}},c.opacity=function(g,p){var m=Math.round(255*p),v=d.toChannels(g.rgba),_=v[0],y=v[1],b=v[2];return{css:l.toCss(_,y,b,m),rgba:l.toRgba(_,y,b,m)}},c.toColorRGB=function(g){return[g.rgba>>24&255,g.rgba>>16&255,g.rgba>>8&255]},(a.css||(a.css={})).toColor=function(g){switch(g.length){case 7:return{css:g,rgba:(parseInt(g.slice(1),16)<<8|255)>>>0};case 9:return{css:g,rgba:parseInt(g.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(g){function p(m,v,_){var y=m/255,b=v/255,w=_/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.0722*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))}g.relativeLuminance=function(m){return p(m>>16&255,m>>8&255,255&m)},g.relativeLuminance2=p}(u=a.rgb||(a.rgb={})),function(g){function p(v,_,y){for(var b=v>>24&255,w=v>>16&255,x=v>>8&255,S=_>>24&255,k=_>>16&255,T=_>>8&255,D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));D<y&&(S>0||k>0||T>0);)S-=Math.max(0,Math.ceil(.1*S)),k-=Math.max(0,Math.ceil(.1*k)),T-=Math.max(0,Math.ceil(.1*T)),D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));return(S<<24|k<<16|T<<8|255)>>>0}function m(v,_,y){for(var b=v>>24&255,w=v>>16&255,x=v>>8&255,S=_>>24&255,k=_>>16&255,T=_>>8&255,D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));D<y&&(S<255||k<255||T<255);)S=Math.min(255,S+Math.ceil(.1*(255-S))),k=Math.min(255,k+Math.ceil(.1*(255-k))),T=Math.min(255,T+Math.ceil(.1*(255-T))),D=f(u.relativeLuminance2(S,T,k),u.relativeLuminance2(b,w,x));return(S<<24|k<<16|T<<8|255)>>>0}g.ensureContrastRatio=function(v,_,y){var b=u.relativeLuminance(v>>8),w=u.relativeLuminance(_>>8);if(f(b,w)<y)return w<b?p(v,_,y):m(v,_,y)},g.reduceLuminance=p,g.increaseLuminance=m,g.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},g.toColor=function(v,_,y){return{css:l.toCss(v,_,y),rgba:l.toRgba(v,_,y)}}}(d=a.rgba||(a.rgba={})),a.toPaddedHex=h,a.contrastRatio=f},7239:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;var l=function(){function c(){this._color={},this._rgba={}}return c.prototype.clear=function(){this._color={},this._rgba={}},c.prototype.setCss=function(u,d,h){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][d]=h},c.prototype.getCss=function(u,d){return this._rgba[u]?this._rgba[u][d]:void 0},c.prototype.setColor=function(u,d,h){this._color[u]||(this._color[u]={}),this._color[u][d]=h},c.prototype.getColor=function(u,d){return this._color[u]?this._color[u][d]:void 0},c}();a.ColorContrastCache=l},5680:function(s,a,l){var c=this&&this.__spreadArray||function(_,y,b){if(b||arguments.length===2)for(var w,x=0,S=y.length;x<S;x++)!w&&x in y||(w||(w=Array.prototype.slice.call(y,0,x)),w[x]=y[x]);return _.concat(w||Array.prototype.slice.call(y))};Object.defineProperty(a,"__esModule",{value:!0}),a.ColorManager=a.DEFAULT_ANSI_COLORS=void 0;var u=l(4774),d=l(7239),h=u.css.toColor("#ffffff"),f=u.css.toColor("#000000"),g=u.css.toColor("#ffffff"),p=u.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var _=[u.css.toColor("#2e3436"),u.css.toColor("#cc0000"),u.css.toColor("#4e9a06"),u.css.toColor("#c4a000"),u.css.toColor("#3465a4"),u.css.toColor("#75507b"),u.css.toColor("#06989a"),u.css.toColor("#d3d7cf"),u.css.toColor("#555753"),u.css.toColor("#ef2929"),u.css.toColor("#8ae234"),u.css.toColor("#fce94f"),u.css.toColor("#729fcf"),u.css.toColor("#ad7fa8"),u.css.toColor("#34e2e2"),u.css.toColor("#eeeeec")],y=[0,95,135,175,215,255],b=0;b<216;b++){var w=y[b/36%6|0],x=y[b/6%6|0],S=y[b%6];_.push({css:u.channels.toCss(w,x,S),rgba:u.channels.toRgba(w,x,S)})}for(b=0;b<24;b++){var k=8+10*b;_.push({css:u.channels.toCss(k,k,k),rgba:u.channels.toRgba(k,k,k)})}return _}());var v=function(){function _(y,b){this.allowTransparency=b;var w=y.createElement("canvas");w.width=1,w.height=1;var x=w.getContext("2d");if(!x)throw new Error("Could not get rendering context");this._ctx=x,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new d.ColorContrastCache,this.colors={foreground:h,background:f,cursor:g,cursorAccent:p,selectionTransparent:m,selectionOpaque:u.color.blend(f,m),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return _.prototype.onOptionsChange=function(y){y==="minimumContrastRatio"&&this._contrastCache.clear()},_.prototype.setTheme=function(y){y===void 0&&(y={}),this.colors.foreground=this._parseColor(y.foreground,h),this.colors.background=this._parseColor(y.background,f),this.colors.cursor=this._parseColor(y.cursor,g,!0),this.colors.cursorAccent=this._parseColor(y.cursorAccent,p,!0),this.colors.selectionTransparent=this._parseColor(y.selection,m,!0),this.colors.selectionOpaque=u.color.blend(this.colors.background,this.colors.selectionTransparent),u.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=u.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(y.black,a.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(y.red,a.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(y.green,a.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(y.yellow,a.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(y.blue,a.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(y.magenta,a.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(y.cyan,a.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(y.white,a.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(y.brightBlack,a.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(y.brightRed,a.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(y.brightGreen,a.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(y.brightYellow,a.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(y.brightBlue,a.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(y.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(y.brightCyan,a.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(y.brightWhite,a.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},_.prototype.restoreColor=function(y){if(y!==void 0)switch(y){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[y]=this._restoreColors.ansi[y]}else for(var b=0;b<this._restoreColors.ansi.length;++b)this.colors.ansi[b]=this._restoreColors.ansi[b]},_.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:c([],this.colors.ansi,!0)}},_.prototype._parseColor=function(y,b,w){if(w===void 0&&(w=this.allowTransparency),y===void 0)return b;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=y,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+y+" is invalid using fallback "+b.css),b;this._ctx.fillRect(0,0,1,1);var x=this._ctx.getImageData(0,0,1,1).data;if(x[3]!==255){if(!w)return console.warn("Color: "+y+" is using transparency, but allowTransparency is false. Using fallback "+b.css+"."),b;var S=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(A){return Number(A)}),k=S[0],T=S[1],D=S[2],R=S[3],N=Math.round(255*R);return{rgba:u.channels.toRgba(k,T,D,N),css:y}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(x[0],x[1],x[2],x[3])}},_}();a.ColorManager=v},9631:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeElementFromParent=void 0,a.removeElementFromParent=function(){for(var l,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];for(var d=0,h=c;d<h.length;d++){var f=h[d];(l=f==null?void 0:f.parentElement)===null||l===void 0||l.removeChild(f)}}},3656:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(l,c,u,d){l.addEventListener(c,u,d);var h=!1;return{dispose:function(){h||(h=!0,l.removeEventListener(c,u,d))}}}},3551:function(s,a,l){var c=this&&this.__decorate||function(p,m,v,_){var y,b=arguments.length,w=b<3?m:_===null?_=Object.getOwnPropertyDescriptor(m,v):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(p,m,v,_);else for(var x=p.length-1;x>=0;x--)(y=p[x])&&(w=(b<3?y(w):b>3?y(m,v,w):y(m,v))||w);return b>3&&w&&Object.defineProperty(m,v,w),w},u=this&&this.__param||function(p,m){return function(v,_){m(v,_,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZone=a.Linkifier=void 0;var d=l(8460),h=l(2585),f=function(){function p(m,v,_){this._bufferService=m,this._logService=v,this._unicodeService=_,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new d.EventEmitter,this._onHideLinkUnderline=new d.EventEmitter,this._onLinkTooltip=new d.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(p.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),p.prototype.attachToDom=function(m,v){this._element=m,this._mouseZoneManager=v},p.prototype.linkifyRows=function(m,v){var _=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=m,this._rowsToLinkify.end=v):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,m),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,v)),this._mouseZoneManager.clearAll(m,v),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return _._linkifyRows()},p._timeBeforeLatency))},p.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var m=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var v=m.ydisp+this._rowsToLinkify.start;if(!(v>=m.lines.length)){for(var _=m.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,y=Math.ceil(2e3/this._bufferService.cols),b=this._bufferService.buffer.iterator(!1,v,_,y,y);b.hasNext();)for(var w=b.next(),x=0;x<this._linkMatchers.length;x++)this._doLinkifyRow(w.range.first,w.content,this._linkMatchers[x]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},p.prototype.registerLinkMatcher=function(m,v,_){if(_===void 0&&(_={}),!v)throw new Error("handler must be defined");var y={id:this._nextLinkMatcherId++,regex:m,handler:v,matchIndex:_.matchIndex,validationCallback:_.validationCallback,hoverTooltipCallback:_.tooltipCallback,hoverLeaveCallback:_.leaveCallback,willLinkActivate:_.willLinkActivate,priority:_.priority||0};return this._addLinkMatcherToList(y),y.id},p.prototype._addLinkMatcherToList=function(m){if(this._linkMatchers.length!==0){for(var v=this._linkMatchers.length-1;v>=0;v--)if(m.priority<=this._linkMatchers[v].priority)return void this._linkMatchers.splice(v+1,0,m);this._linkMatchers.splice(0,0,m)}else this._linkMatchers.push(m)},p.prototype.deregisterLinkMatcher=function(m){for(var v=0;v<this._linkMatchers.length;v++)if(this._linkMatchers[v].id===m)return this._linkMatchers.splice(v,1),!0;return!1},p.prototype._doLinkifyRow=function(m,v,_){for(var y,b=this,w=new RegExp(_.regex.source,(_.regex.flags||"")+"g"),x=-1,S=function(){var T=y[typeof _.matchIndex!="number"?0:_.matchIndex];if(!T)return k._logService.debug("match found without corresponding matchIndex",y,_),"break";if(x=v.indexOf(T,x+1),w.lastIndex=x+T.length,x<0)return"break";var D=k._bufferService.buffer.stringIndexToBufferIndex(m,x);if(D[0]<0)return"break";var R=k._bufferService.buffer.lines.get(D[0]);if(!R)return"break";var N=R.getFg(D[1]),A=N?N>>9&511:void 0;_.validationCallback?_.validationCallback(T,function(V){b._rowsTimeoutId||V&&b._addLink(D[1],D[0]-b._bufferService.buffer.ydisp,T,_,A)}):k._addLink(D[1],D[0]-k._bufferService.buffer.ydisp,T,_,A)},k=this;(y=w.exec(v))!==null&&S()!=="break";);},p.prototype._addLink=function(m,v,_,y,b){var w=this;if(this._mouseZoneManager&&this._element){var x=this._unicodeService.getStringCellWidth(_),S=m%this._bufferService.cols,k=v+Math.floor(m/this._bufferService.cols),T=(S+x)%this._bufferService.cols,D=k+Math.floor((S+x)/this._bufferService.cols);T===0&&(T=this._bufferService.cols,D--),this._mouseZoneManager.add(new g(S+1,k+1,T+1,D+1,function(R){if(y.handler)return y.handler(R,_);var N=window.open();N?(N.opener=null,N.location.href=_):console.warn("Opening link blocked as opener could not be cleared")},function(){w._onShowLinkUnderline.fire(w._createLinkHoverEvent(S,k,T,D,b)),w._element.classList.add("xterm-cursor-pointer")},function(R){w._onLinkTooltip.fire(w._createLinkHoverEvent(S,k,T,D,b)),y.hoverTooltipCallback&&y.hoverTooltipCallback(R,_,{start:{x:S,y:k},end:{x:T,y:D}})},function(){w._onHideLinkUnderline.fire(w._createLinkHoverEvent(S,k,T,D,b)),w._element.classList.remove("xterm-cursor-pointer"),y.hoverLeaveCallback&&y.hoverLeaveCallback()},function(R){return!y.willLinkActivate||y.willLinkActivate(R,_)}))}},p.prototype._createLinkHoverEvent=function(m,v,_,y,b){return{x1:m,y1:v,x2:_,y2:y,cols:this._bufferService.cols,fg:b}},p._timeBeforeLatency=200,p=c([u(0,h.IBufferService),u(1,h.ILogService),u(2,h.IUnicodeService)],p)}();a.Linkifier=f;var g=function(p,m,v,_,y,b,w,x,S){this.x1=p,this.y1=m,this.x2=v,this.y2=_,this.clickCallback=y,this.hoverCallback=b,this.tooltipCallback=w,this.leaveCallback=x,this.willLinkActivate=S};a.MouseZone=g},6465:function(s,a,l){var c,u=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(_,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,y,b,w);else for(var T=_.length-1;T>=0;T--)(x=_[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(_,y){return function(b,w){y(b,w,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier2=void 0;var f=l(2585),g=l(8460),p=l(844),m=l(3656),v=function(_){function y(b){var w=_.call(this)||this;return w._bufferService=b,w._linkProviders=[],w._linkCacheDisposables=[],w._isMouseOut=!0,w._activeLine=-1,w._onShowLinkUnderline=w.register(new g.EventEmitter),w._onHideLinkUnderline=w.register(new g.EventEmitter),w.register((0,p.getDisposeArrayDisposable)(w._linkCacheDisposables)),w}return u(y,_),Object.defineProperty(y.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),y.prototype.registerLinkProvider=function(b){var w=this;return this._linkProviders.push(b),{dispose:function(){var x=w._linkProviders.indexOf(b);x!==-1&&w._linkProviders.splice(x,1)}}},y.prototype.attachToDom=function(b,w,x){var S=this;this._element=b,this._mouseService=w,this._renderService=x,this.register((0,m.addDisposableDomListener)(this._element,"mouseleave",function(){S._isMouseOut=!0,S._clearCurrentLink()})),this.register((0,m.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,m.addDisposableDomListener)(this._element,"click",this._onClick.bind(this)))},y.prototype._onMouseMove=function(b){if(this._lastMouseEvent=b,this._element&&this._mouseService){var w=this._positionFromMouseEvent(b,this._element,this._mouseService);if(w){this._isMouseOut=!1;for(var x=b.composedPath(),S=0;S<x.length;S++){var k=x[S];if(k.classList.contains("xterm"))break;if(k.classList.contains("xterm-hover"))return}this._lastBufferCell&&w.x===this._lastBufferCell.x&&w.y===this._lastBufferCell.y||(this._onHover(w),this._lastBufferCell=w)}}},y.prototype._onHover=function(b){if(this._activeLine!==b.y)return this._clearCurrentLink(),void this._askForLink(b,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,b)||(this._clearCurrentLink(),this._askForLink(b,!0))},y.prototype._askForLink=function(b,w){var x,S=this;this._activeProviderReplies&&w||((x=this._activeProviderReplies)===null||x===void 0||x.forEach(function(T){T==null||T.forEach(function(D){D.link.dispose&&D.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=b.y);var k=!1;this._linkProviders.forEach(function(T,D){var R;w?((R=S._activeProviderReplies)===null||R===void 0?void 0:R.get(D))&&(k=S._checkLinkProviderResult(D,b,k)):T.provideLinks(b.y,function(N){var A,V;if(!S._isMouseOut){var P=N==null?void 0:N.map(function(U){return{link:U}});(A=S._activeProviderReplies)===null||A===void 0||A.set(D,P),k=S._checkLinkProviderResult(D,b,k),((V=S._activeProviderReplies)===null||V===void 0?void 0:V.size)===S._linkProviders.length&&S._removeIntersectingLinks(b.y,S._activeProviderReplies)}})})},y.prototype._removeIntersectingLinks=function(b,w){for(var x=new Set,S=0;S<w.size;S++){var k=w.get(S);if(k)for(var T=0;T<k.length;T++)for(var D=k[T],R=D.link.range.start.y<b?0:D.link.range.start.x,N=D.link.range.end.y>b?this._bufferService.cols:D.link.range.end.x,A=R;A<=N;A++){if(x.has(A)){k.splice(T--,1);break}x.add(A)}}},y.prototype._checkLinkProviderResult=function(b,w,x){var S,k=this;if(!this._activeProviderReplies)return x;for(var T=this._activeProviderReplies.get(b),D=!1,R=0;R<b;R++)this._activeProviderReplies.has(R)&&!this._activeProviderReplies.get(R)||(D=!0);if(!D&&T){var N=T.find(function(V){return k._linkAtPosition(V.link,w)});N&&(x=!0,this._handleNewLink(N))}if(this._activeProviderReplies.size===this._linkProviders.length&&!x)for(R=0;R<this._activeProviderReplies.size;R++){var A=(S=this._activeProviderReplies.get(R))===null||S===void 0?void 0:S.find(function(V){return k._linkAtPosition(V.link,w)});if(A){x=!0,this._handleNewLink(A);break}}return x},y.prototype._onClick=function(b){if(this._element&&this._mouseService&&this._currentLink){var w=this._positionFromMouseEvent(b,this._element,this._mouseService);w&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(b,this._currentLink.link.text)}},y.prototype._clearCurrentLink=function(b,w){this._element&&this._currentLink&&this._lastMouseEvent&&(!b||!w||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))},y.prototype._handleNewLink=function(b){var w=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(b.link,x)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:function(){var S,k;return(k=(S=w._currentLink)===null||S===void 0?void 0:S.state)===null||k===void 0?void 0:k.decorations.pointerCursor},set:function(S){var k,T;((k=w._currentLink)===null||k===void 0?void 0:k.state)&&w._currentLink.state.decorations.pointerCursor!==S&&(w._currentLink.state.decorations.pointerCursor=S,w._currentLink.state.isHovered&&((T=w._element)===null||T===void 0||T.classList.toggle("xterm-cursor-pointer",S)))}},underline:{get:function(){var S,k;return(k=(S=w._currentLink)===null||S===void 0?void 0:S.state)===null||k===void 0?void 0:k.decorations.underline},set:function(S){var k,T,D;((k=w._currentLink)===null||k===void 0?void 0:k.state)&&((D=(T=w._currentLink)===null||T===void 0?void 0:T.state)===null||D===void 0?void 0:D.decorations.underline)!==S&&(w._currentLink.state.decorations.underline=S,w._currentLink.state.isHovered&&w._fireUnderlineEvent(b.link,S))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(S){var k=S.start===0?0:S.start+1+w._bufferService.buffer.ydisp;w._clearCurrentLink(k,S.end+1+w._bufferService.buffer.ydisp)})))}},y.prototype._linkHover=function(b,w,x){var S;((S=this._currentLink)===null||S===void 0?void 0:S.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(x,w.text)},y.prototype._fireUnderlineEvent=function(b,w){var x=b.range,S=this._bufferService.buffer.ydisp,k=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-S-1,x.end.x,x.end.y-S-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(k)},y.prototype._linkLeave=function(b,w,x){var S;((S=this._currentLink)===null||S===void 0?void 0:S.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(x,w.text)},y.prototype._linkAtPosition=function(b,w){var x=b.range.start.y===b.range.end.y,S=b.range.start.y<w.y,k=b.range.end.y>w.y;return(x&&b.range.start.x<=w.x&&b.range.end.x>=w.x||S&&b.range.end.x>=w.x||k&&b.range.start.x<=w.x||S&&k)&&b.range.start.y<=w.y&&b.range.end.y>=w.y},y.prototype._positionFromMouseEvent=function(b,w,x){var S=x.getCoords(b,w,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}},y.prototype._createLinkUnderlineEvent=function(b,w,x,S,k){return{x1:b,y1:w,x2:x,y2:S,cols:this._bufferService.cols,fg:k}},d([h(0,f.IBufferService)],y)}(p.Disposable);a.Linkifier2=v},9042:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(s,a,l){var c,u=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(_,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,y,b,w);else for(var T=_.length-1;T>=0;T--)(x=_[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(_,y){return function(b,w){y(b,w,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZoneManager=void 0;var f=l(844),g=l(3656),p=l(4725),m=l(2585),v=function(_){function y(b,w,x,S,k,T){var D=_.call(this)||this;return D._element=b,D._screenElement=w,D._bufferService=x,D._mouseService=S,D._selectionService=k,D._optionsService=T,D._zones=[],D._areZonesActive=!1,D._lastHoverCoords=[void 0,void 0],D._initialSelectionLength=0,D.register((0,g.addDisposableDomListener)(D._element,"mousedown",function(R){return D._onMouseDown(R)})),D._mouseMoveListener=function(R){return D._onMouseMove(R)},D._mouseLeaveListener=function(R){return D._onMouseLeave(R)},D._clickListener=function(R){return D._onClick(R)},D}return u(y,_),y.prototype.dispose=function(){_.prototype.dispose.call(this),this._deactivate()},y.prototype.add=function(b){this._zones.push(b),this._zones.length===1&&this._activate()},y.prototype.clearAll=function(b,w){if(this._zones.length!==0){b&&w||(b=0,w=this._bufferService.rows-1);for(var x=0;x<this._zones.length;x++){var S=this._zones[x];(S.y1>b&&S.y1<=w+1||S.y2>b&&S.y2<=w+1||S.y1<b&&S.y2>w+1)&&(this._currentZone&&this._currentZone===S&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(x--,1))}this._zones.length===0&&this._deactivate()}},y.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},y.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},y.prototype._onMouseMove=function(b){this._lastHoverCoords[0]===b.pageX&&this._lastHoverCoords[1]===b.pageY||(this._onHover(b),this._lastHoverCoords=[b.pageX,b.pageY])},y.prototype._onHover=function(b){var w=this,x=this._findZoneEventAt(b);x!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),x&&(this._currentZone=x,x.hoverCallback&&x.hoverCallback(b),this._tooltipTimeout=window.setTimeout(function(){return w._onTooltip(b)},this._optionsService.options.linkTooltipHoverDuration)))},y.prototype._onTooltip=function(b){this._tooltipTimeout=void 0;var w=this._findZoneEventAt(b);w==null||w.tooltipCallback(b)},y.prototype._onMouseDown=function(b){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var w=this._findZoneEventAt(b);(w==null?void 0:w.willLinkActivate(b))&&(b.preventDefault(),b.stopImmediatePropagation())}},y.prototype._onMouseLeave=function(b){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},y.prototype._onClick=function(b){var w=this._findZoneEventAt(b),x=this._getSelectionLength();w&&x===this._initialSelectionLength&&(w.clickCallback(b),b.preventDefault(),b.stopImmediatePropagation())},y.prototype._getSelectionLength=function(){var b=this._selectionService.selectionText;return b?b.length:0},y.prototype._findZoneEventAt=function(b){var w=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(w)for(var x=w[0],S=w[1],k=0;k<this._zones.length;k++){var T=this._zones[k];if(T.y1===T.y2){if(S===T.y1&&x>=T.x1&&x<T.x2)return T}else if(S===T.y1&&x>=T.x1||S===T.y2&&x<T.x2||S>T.y1&&S<T.y2)return T}},d([h(2,m.IBufferService),h(3,p.IMouseService),h(4,p.ISelectionService),h(5,m.IOptionsService)],y)}(f.Disposable);a.MouseZoneManager=v},6193:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0;var l=function(){function c(u){this._renderCallback=u}return c.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},c.prototype.refresh=function(u,d,h){var f=this;this._rowCount=h,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return f._innerRefresh()}))},c.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(u,d)}},c}();a.RenderDebouncer=l},5596:function(s,a,l){var c,u=this&&this.__extends||(c=function(h,f){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,p){g.__proto__=p}||function(g,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(g[m]=p[m])},c(h,f)},function(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");function g(){this.constructor=h}c(h,f),h.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)});Object.defineProperty(a,"__esModule",{value:!0}),a.ScreenDprMonitor=void 0;var d=function(h){function f(){var g=h!==null&&h.apply(this,arguments)||this;return g._currentDevicePixelRatio=window.devicePixelRatio,g}return u(f,h),f.prototype.setListener=function(g){var p=this;this._listener&&this.clearListener(),this._listener=g,this._outerListener=function(){p._listener&&(p._listener(window.devicePixelRatio,p._currentDevicePixelRatio),p._updateDpr())},this._updateDpr()},f.prototype.dispose=function(){h.prototype.dispose.call(this),this.clearListener()},f.prototype._updateDpr=function(){var g;this._outerListener&&((g=this._resolutionMediaMatchList)===null||g===void 0||g.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},f.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},f}(l(844).Disposable);a.ScreenDprMonitor=d},3236:function(s,a,l){var c,u=this&&this.__extends||(c=function(Ie,K){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(se,oe){se.__proto__=oe}||function(se,oe){for(var Ne in oe)Object.prototype.hasOwnProperty.call(oe,Ne)&&(se[Ne]=oe[Ne])},c(Ie,K)},function(Ie,K){if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function se(){this.constructor=Ie}c(Ie,K),Ie.prototype=K===null?Object.create(K):(se.prototype=K.prototype,new se)});Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;var d=l(2950),h=l(1680),f=l(3614),g=l(2584),p=l(5435),m=l(3525),v=l(3551),_=l(9312),y=l(6114),b=l(3656),w=l(9042),x=l(357),S=l(6954),k=l(4567),T=l(1296),D=l(7399),R=l(8460),N=l(8437),A=l(5680),V=l(3230),P=l(4725),U=l(428),F=l(8934),M=l(6465),W=l(5114),j=l(8969),$=l(4774),Q=l(4269),ee=l(5941),ge=typeof window!="undefined"?window.document:null,_e=function(Ie){function K(se){se===void 0&&(se={});var oe=Ie.call(this,se)||this;return oe.browser=y,oe._keyDownHandled=!1,oe._keyPressHandled=!1,oe._unprocessedDeadKey=!1,oe._onCursorMove=new R.EventEmitter,oe._onKey=new R.EventEmitter,oe._onRender=new R.EventEmitter,oe._onSelectionChange=new R.EventEmitter,oe._onTitleChange=new R.EventEmitter,oe._onBell=new R.EventEmitter,oe._onFocus=new R.EventEmitter,oe._onBlur=new R.EventEmitter,oe._onA11yCharEmitter=new R.EventEmitter,oe._onA11yTabEmitter=new R.EventEmitter,oe._setup(),oe.linkifier=oe._instantiationService.createInstance(v.Linkifier),oe.linkifier2=oe.register(oe._instantiationService.createInstance(M.Linkifier2)),oe.register(oe._inputHandler.onRequestBell(function(){return oe.bell()})),oe.register(oe._inputHandler.onRequestRefreshRows(function(Ne,pe){return oe.refresh(Ne,pe)})),oe.register(oe._inputHandler.onRequestSendFocus(function(){return oe._reportFocus()})),oe.register(oe._inputHandler.onRequestReset(function(){return oe.reset()})),oe.register(oe._inputHandler.onRequestWindowsOptionsReport(function(Ne){return oe._reportWindowsOptions(Ne)})),oe.register(oe._inputHandler.onColor(function(Ne){return oe._handleColorEvent(Ne)})),oe.register((0,R.forwardEvent)(oe._inputHandler.onCursorMove,oe._onCursorMove)),oe.register((0,R.forwardEvent)(oe._inputHandler.onTitleChange,oe._onTitleChange)),oe.register((0,R.forwardEvent)(oe._inputHandler.onA11yChar,oe._onA11yCharEmitter)),oe.register((0,R.forwardEvent)(oe._inputHandler.onA11yTab,oe._onA11yTabEmitter)),oe.register(oe._bufferService.onResize(function(Ne){return oe._afterResize(Ne.cols,Ne.rows)})),oe}return u(K,Ie),Object.defineProperty(K.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(K.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),K.prototype._handleColorEvent=function(se){var oe,Ne;if(this._colorManager){for(var pe=0,Me=se;pe<Me.length;pe++){var at=Me[pe],_t=void 0,qe="";switch(at.index){case 256:_t="foreground",qe="10";break;case 257:_t="background",qe="11";break;case 258:_t="cursor",qe="12";break;default:_t="ansi",qe="4;"+at.index}if(_t)switch(at.type){case 0:var kt=$.color.toColorRGB(_t==="ansi"?this._colorManager.colors.ansi[at.index]:this._colorManager.colors[_t]);this.coreService.triggerDataEvent(g.C0.ESC+"]"+qe+";"+(0,ee.toRgbString)(kt)+g.C0.BEL);break;case 1:_t==="ansi"?this._colorManager.colors.ansi[at.index]=$.rgba.toColor.apply($.rgba,at.color):this._colorManager.colors[_t]=$.rgba.toColor.apply($.rgba,at.color);break;case 2:this._colorManager.restoreColor(at.index)}}(oe=this._renderService)===null||oe===void 0||oe.setColors(this._colorManager.colors),(Ne=this.viewport)===null||Ne===void 0||Ne.onThemeChange(this._colorManager.colors)}},K.prototype.dispose=function(){var se,oe,Ne;this._isDisposed||(Ie.prototype.dispose.call(this),(se=this._renderService)===null||se===void 0||se.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Ne=(oe=this.element)===null||oe===void 0?void 0:oe.parentNode)===null||Ne===void 0||Ne.removeChild(this.element))},K.prototype._setup=function(){Ie.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(K.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),K.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},K.prototype._updateOptions=function(se){var oe,Ne,pe,Me;switch(Ie.prototype._updateOptions.call(this,se),se){case"fontFamily":case"fontSize":(oe=this._renderService)===null||oe===void 0||oe.clear(),(Ne=this._charSizeService)===null||Ne===void 0||Ne.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(pe=this.viewport)===null||pe===void 0||pe.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new k.AccessibilityManager(this,this._renderService)):((Me=this._accessibilityManager)===null||Me===void 0||Me.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},K.prototype._onTextAreaFocus=function(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(g.C0.ESC+"[I"),this.updateCursorStyle(se),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},K.prototype.blur=function(){var se;return(se=this.textarea)===null||se===void 0?void 0:se.blur()},K.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(g.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},K.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var se=this.buffer.ybase+this.buffer.y,oe=this.buffer.lines.get(se);if(oe){var Ne=Math.min(this.buffer.x,this.cols-1),pe=this._renderService.dimensions.actualCellHeight,Me=oe.getWidth(Ne),at=this._renderService.dimensions.actualCellWidth*Me,_t=this.buffer.y*this._renderService.dimensions.actualCellHeight,qe=Ne*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=qe+"px",this.textarea.style.top=_t+"px",this.textarea.style.width=at+"px",this.textarea.style.height=pe+"px",this.textarea.style.lineHeight=pe+"px",this.textarea.style.zIndex="-5"}}},K.prototype._initGlobal=function(){var se=this;this._bindKeys(),this.register((0,b.addDisposableDomListener)(this.element,"copy",function(Ne){se.hasSelection()&&(0,f.copyHandler)(Ne,se._selectionService)}));var oe=function(Ne){return(0,f.handlePasteEvent)(Ne,se.textarea,se.coreService)};this.register((0,b.addDisposableDomListener)(this.textarea,"paste",oe)),this.register((0,b.addDisposableDomListener)(this.element,"paste",oe)),y.isFirefox?this.register((0,b.addDisposableDomListener)(this.element,"mousedown",function(Ne){Ne.button===2&&(0,f.rightClickHandler)(Ne,se.textarea,se.screenElement,se._selectionService,se.options.rightClickSelectsWord)})):this.register((0,b.addDisposableDomListener)(this.element,"contextmenu",function(Ne){(0,f.rightClickHandler)(Ne,se.textarea,se.screenElement,se._selectionService,se.options.rightClickSelectsWord)})),y.isLinux&&this.register((0,b.addDisposableDomListener)(this.element,"auxclick",function(Ne){Ne.button===1&&(0,f.moveTextAreaUnderMouseCursor)(Ne,se.textarea,se.screenElement)}))},K.prototype._bindKeys=function(){var se=this;this.register((0,b.addDisposableDomListener)(this.textarea,"keyup",function(oe){return se._keyUp(oe)},!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keydown",function(oe){return se._keyDown(oe)},!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keypress",function(oe){return se._keyPress(oe)},!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionstart",function(){return se._compositionHelper.compositionstart()})),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionupdate",function(oe){return se._compositionHelper.compositionupdate(oe)})),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionend",function(){return se._compositionHelper.compositionend()})),this.register((0,b.addDisposableDomListener)(this.textarea,"input",function(oe){return se._inputEvent(oe)},!0)),this.register(this.onRender(function(){return se._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(oe){return se._queueLinkification(oe.start,oe.end)}))},K.prototype.open=function(se){var oe=this;if(!se)throw new Error("Terminal requires a parent element.");se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=se.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),se.appendChild(this.element);var Ne=ge.createDocumentFragment();this._viewportElement=ge.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Ne.appendChild(this._viewportElement),this._viewportScrollArea=ge.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=ge.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=ge.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Ne.appendChild(this.screenElement),this.textarea=ge.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",w.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register((0,b.addDisposableDomListener)(this.textarea,"focus",function(at){return oe._onTextAreaFocus(at)})),this.register((0,b.addDisposableDomListener)(this.textarea,"blur",function(){return oe._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var pe=this._instantiationService.createInstance(W.CoreBrowserService,this.textarea);this._instantiationService.setService(P.ICoreBrowserService,pe),this._charSizeService=this._instantiationService.createInstance(U.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(P.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new A.ColorManager(ge,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(at){return oe._colorManager.onOptionsChange(at)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(Q.CharacterJoinerService),this._instantiationService.setService(P.ICharacterJoinerService,this._characterJoinerService);var Me=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(V.RenderService,Me,this.rows,this.screenElement)),this._instantiationService.setService(P.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(at){return oe._onRender.fire(at)})),this.onResize(function(at){return oe._renderService.resize(at.cols,at.rows)}),this._compositionView=ge.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Ne),this._soundService=this._instantiationService.createInstance(x.SoundService),this._instantiationService.setService(P.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(F.MouseService),this._instantiationService.setService(P.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(h.Viewport,function(at){return oe.scrollLines(at,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return oe.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){oe._renderService.onCursorMove(),oe._syncTextArea()})),this.register(this.onResize(function(){return oe._renderService.onResize(oe.cols,oe.rows)})),this.register(this.onBlur(function(){return oe._renderService.onBlur()})),this.register(this.onFocus(function(){return oe._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return oe.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(_.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(P.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(at){return oe.scrollLines(at.amount,at.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return oe._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(at){return oe._renderService.onSelectionChanged(at.start,at.end,at.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(at){oe.textarea.value=at,oe.textarea.focus(),oe.textarea.select()})),this.register(this._onScroll.event(function(at){oe.viewport.syncScrollArea(),oe._selectionService.refresh()})),this.register((0,b.addDisposableDomListener)(this._viewportElement,"scroll",function(){return oe._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(S.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return oe._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register((0,b.addDisposableDomListener)(this.element,"mousedown",function(at){return oe._selectionService.onMouseDown(at)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new k.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},K.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(m.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(T.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},K.prototype._setTheme=function(se){var oe,Ne,pe;this._theme=se,(oe=this._colorManager)===null||oe===void 0||oe.setTheme(se),(Ne=this._renderService)===null||Ne===void 0||Ne.setColors(this._colorManager.colors),(pe=this.viewport)===null||pe===void 0||pe.onThemeChange(this._colorManager.colors)},K.prototype.bindMouse=function(){var se=this,oe=this,Ne=this.element;function pe(ve){var B,G,te=oe._mouseService.getRawByteCoords(ve,oe.screenElement,oe.cols,oe.rows);if(!te)return!1;switch(ve.overrideType||ve.type){case"mousemove":G=32,ve.buttons===void 0?(B=3,ve.button!==void 0&&(B=ve.button<3?ve.button:3)):B=1&ve.buttons?0:4&ve.buttons?1:2&ve.buttons?2:3;break;case"mouseup":G=0,B=ve.button<3?ve.button:3;break;case"mousedown":G=1,B=ve.button<3?ve.button:3;break;case"wheel":ve.deltaY!==0&&(G=ve.deltaY<0?0:1),B=4;break;default:return!1}return!(G===void 0||B===void 0||B>4)&&oe.coreMouseService.triggerMouseEvent({col:te.x-33,row:te.y-33,button:B,action:G,ctrl:ve.ctrlKey,alt:ve.altKey,shift:ve.shiftKey})}var Me={mouseup:null,wheel:null,mousedrag:null,mousemove:null},at=function(ve){return pe(ve),ve.buttons||(se._document.removeEventListener("mouseup",Me.mouseup),Me.mousedrag&&se._document.removeEventListener("mousemove",Me.mousedrag)),se.cancel(ve)},_t=function(ve){return pe(ve),se.cancel(ve,!0)},qe=function(ve){ve.buttons&&pe(ve)},kt=function(ve){ve.buttons||pe(ve)};this.register(this.coreMouseService.onProtocolChange(function(ve){ve?(se.optionsService.options.logLevel==="debug"&&se._logService.debug("Binding to mouse events:",se.coreMouseService.explainEvents(ve)),se.element.classList.add("enable-mouse-events"),se._selectionService.disable()):(se._logService.debug("Unbinding from mouse events."),se.element.classList.remove("enable-mouse-events"),se._selectionService.enable()),8&ve?Me.mousemove||(Ne.addEventListener("mousemove",kt),Me.mousemove=kt):(Ne.removeEventListener("mousemove",Me.mousemove),Me.mousemove=null),16&ve?Me.wheel||(Ne.addEventListener("wheel",_t,{passive:!1}),Me.wheel=_t):(Ne.removeEventListener("wheel",Me.wheel),Me.wheel=null),2&ve?Me.mouseup||(Me.mouseup=at):(se._document.removeEventListener("mouseup",Me.mouseup),Me.mouseup=null),4&ve?Me.mousedrag||(Me.mousedrag=qe):(se._document.removeEventListener("mousemove",Me.mousedrag),Me.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,b.addDisposableDomListener)(Ne,"mousedown",function(ve){if(ve.preventDefault(),se.focus(),se.coreMouseService.areMouseEventsActive&&!se._selectionService.shouldForceSelection(ve))return pe(ve),Me.mouseup&&se._document.addEventListener("mouseup",Me.mouseup),Me.mousedrag&&se._document.addEventListener("mousemove",Me.mousedrag),se.cancel(ve)})),this.register((0,b.addDisposableDomListener)(Ne,"wheel",function(ve){if(!Me.wheel){if(!se.buffer.hasScrollback){var B=se.viewport.getLinesScrolled(ve);if(B===0)return;for(var G=g.C0.ESC+(se.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ve.deltaY<0?"A":"B"),te="",Se=0;Se<Math.abs(B);Se++)te+=G;return se.coreService.triggerDataEvent(te,!0),se.cancel(ve,!0)}return se.viewport.onWheel(ve)?se.cancel(ve):void 0}},{passive:!1})),this.register((0,b.addDisposableDomListener)(Ne,"touchstart",function(ve){if(!se.coreMouseService.areMouseEventsActive)return se.viewport.onTouchStart(ve),se.cancel(ve)},{passive:!0})),this.register((0,b.addDisposableDomListener)(Ne,"touchmove",function(ve){if(!se.coreMouseService.areMouseEventsActive)return se.viewport.onTouchMove(ve)?void 0:se.cancel(ve)},{passive:!1}))},K.prototype.refresh=function(se,oe){var Ne;(Ne=this._renderService)===null||Ne===void 0||Ne.refreshRows(se,oe)},K.prototype._queueLinkification=function(se,oe){var Ne;(Ne=this.linkifier)===null||Ne===void 0||Ne.linkifyRows(se,oe)},K.prototype.updateCursorStyle=function(se){var oe;((oe=this._selectionService)===null||oe===void 0?void 0:oe.shouldColumnSelect(se))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},K.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},K.prototype.scrollLines=function(se,oe,Ne){Ne===void 0&&(Ne=0),Ie.prototype.scrollLines.call(this,se,oe,Ne),this.refresh(0,this.rows-1)},K.prototype.paste=function(se){(0,f.paste)(se,this.textarea,this.coreService)},K.prototype.attachCustomKeyEventHandler=function(se){this._customKeyEventHandler=se},K.prototype.registerLinkMatcher=function(se,oe,Ne){var pe=this.linkifier.registerLinkMatcher(se,oe,Ne);return this.refresh(0,this.rows-1),pe},K.prototype.deregisterLinkMatcher=function(se){this.linkifier.deregisterLinkMatcher(se)&&this.refresh(0,this.rows-1)},K.prototype.registerLinkProvider=function(se){return this.linkifier2.registerLinkProvider(se)},K.prototype.registerCharacterJoiner=function(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var oe=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),oe},K.prototype.deregisterCharacterJoiner=function(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)},Object.defineProperty(K.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),K.prototype.addMarker=function(se){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)},K.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},K.prototype.select=function(se,oe,Ne){this._selectionService.setSelection(se,oe,Ne)},K.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},K.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},K.prototype.clearSelection=function(){var se;(se=this._selectionService)===null||se===void 0||se.clearSelection()},K.prototype.selectAll=function(){var se;(se=this._selectionService)===null||se===void 0||se.selectAll()},K.prototype.selectLines=function(se,oe){var Ne;(Ne=this._selectionService)===null||Ne===void 0||Ne.selectLines(se,oe)},K.prototype._keyDown=function(se){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(!this._compositionHelper.keydown(se))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var oe=(0,D.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){var Ne=this.rows-1;return this.scrollLines(oe.type===2?-Ne:Ne),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.key||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==g.C0.ETX&&oe.key!==g.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(se,!0))))},K.prototype._isThirdLevelShift=function(se,oe){var Ne=se.isMac&&!this.options.macOptionIsMeta&&oe.altKey&&!oe.ctrlKey&&!oe.metaKey||se.isWindows&&oe.altKey&&oe.ctrlKey&&!oe.metaKey||se.isWindows&&oe.getModifierState("AltGraph");return oe.type==="keypress"?Ne:Ne&&(!oe.keyCode||oe.keyCode>47)},K.prototype._keyUp=function(se){this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||(function(oe){return oe.keyCode===16||oe.keyCode===17||oe.keyCode===18}(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)},K.prototype._keyPress=function(se){var oe;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)oe=se.charCode;else if(se.which===null||se.which===void 0)oe=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;oe=se.which}return!(!oe||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(oe=String.fromCharCode(oe),this._onKey.fire({key:oe,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},K.prototype._inputEvent=function(se){if(se.data&&se.inputType==="insertText"&&!se.composed&&!this.optionsService.options.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var oe=se.data;return this.coreService.triggerDataEvent(oe,!0),this.cancel(se),!0}return!1},K.prototype.bell=function(){var se;this._soundBell()&&((se=this._soundService)===null||se===void 0||se.playBellSound()),this._onBell.fire()},K.prototype.resize=function(se,oe){se!==this.cols||oe!==this.rows?Ie.prototype.resize.call(this,se,oe):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},K.prototype._afterResize=function(se,oe){var Ne,pe;(Ne=this._charSizeService)===null||Ne===void 0||Ne.measure(),(pe=this.viewport)===null||pe===void 0||pe.syncScrollArea(!0)},K.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var se=1;se<this.rows;se++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},K.prototype.reset=function(){var se,oe;this.options.rows=this.rows,this.options.cols=this.cols;var Ne=this._customKeyEventHandler;this._setup(),Ie.prototype.reset.call(this),(se=this._selectionService)===null||se===void 0||se.reset(),this._customKeyEventHandler=Ne,this.refresh(0,this.rows-1),(oe=this.viewport)===null||oe===void 0||oe.syncScrollArea()},K.prototype.clearTextureAtlas=function(){var se;(se=this._renderService)===null||se===void 0||se.clearTextureAtlas()},K.prototype._reportFocus=function(){var se;((se=this.element)===null||se===void 0?void 0:se.classList.contains("focus"))?this.coreService.triggerDataEvent(g.C0.ESC+"[I"):this.coreService.triggerDataEvent(g.C0.ESC+"[O")},K.prototype._reportWindowsOptions=function(se){if(this._renderService)switch(se){case p.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var oe=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Ne=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(g.C0.ESC+"[4;"+Ne+";"+oe+"t");break;case p.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var pe=this._renderService.dimensions.scaledCellWidth.toFixed(0),Me=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(g.C0.ESC+"[6;"+Me+";"+pe+"t")}},K.prototype.cancel=function(se,oe){if(this.options.cancelEvents||oe)return se.preventDefault(),se.stopPropagation(),!1},K.prototype._visualBell=function(){return!1},K.prototype._soundBell=function(){return this.options.bellStyle==="sound"},K}(j.CoreTerminal);a.Terminal=_e},9924:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0;var l=function(){function c(u,d){d===void 0&&(d=1e3),this._renderCallback=u,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return c.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},c.prototype.refresh=function(u,d,h){var f=this;this._rowCount=h,u=u!==void 0?u:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;var g=Date.now();if(g-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=g,this._innerRefresh();else if(!this._additionalRefreshRequested){var p=g-this._lastRefreshMs,m=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){f._lastRefreshMs=Date.now(),f._innerRefresh(),f._additionalRefreshRequested=!1,f._refreshTimeoutID=void 0},m)}},c.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,d)}},c}();a.TimeBasedDebouncer=l},1680:function(s,a,l){var c,u=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(_,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,y,b,w);else for(var T=_.length-1;T>=0;T--)(x=_[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(_,y){return function(b,w){y(b,w,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;var f=l(844),g=l(3656),p=l(4725),m=l(2585),v=function(_){function y(b,w,x,S,k,T,D,R){var N=_.call(this)||this;return N._scrollLines=b,N._viewportElement=w,N._scrollArea=x,N._element=S,N._bufferService=k,N._optionsService=T,N._charSizeService=D,N._renderService=R,N.scrollBarWidth=0,N._currentRowHeight=0,N._currentScaledCellHeight=0,N._lastRecordedBufferLength=0,N._lastRecordedViewportHeight=0,N._lastRecordedBufferHeight=0,N._lastTouchY=0,N._lastScrollTop=0,N._lastHadScrollBar=!1,N._wheelPartialScroll=0,N._refreshAnimationFrame=null,N._ignoreNextScrollEvent=!1,N.scrollBarWidth=N._viewportElement.offsetWidth-N._scrollArea.offsetWidth||15,N._lastHadScrollBar=!0,N.register((0,g.addDisposableDomListener)(N._viewportElement,"scroll",N._onScroll.bind(N))),N._activeBuffer=N._bufferService.buffer,N.register(N._bufferService.buffers.onBufferActivate(function(A){return N._activeBuffer=A.activeBuffer})),N._renderDimensions=N._renderService.dimensions,N.register(N._renderService.onDimensionsChange(function(A){return N._renderDimensions=A})),setTimeout(function(){return N.syncScrollArea()},0),N}return u(y,_),y.prototype.onThemeChange=function(b){this._viewportElement.style.backgroundColor=b.background.css},y.prototype._refresh=function(b){var w=this;if(b)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return w._innerRefresh()}))},y.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var b=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==b&&(this._lastRecordedBufferHeight=b,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var w=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==w&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=w),this._optionsService.options.scrollback===0?this.scrollBarWidth=0:this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this._lastHadScrollBar=this.scrollBarWidth>0;var x=window.getComputedStyle(this._element),S=parseInt(x.paddingLeft)+parseInt(x.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?S:0)).toString()+"px",this._refreshAnimationFrame=null},y.prototype.syncScrollArea=function(b){if(b===void 0&&(b=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight?this._lastHadScrollBar!==this._optionsService.options.scrollback>0&&this._refresh(b):this._refresh(b)},y.prototype._onScroll=function(b){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var w=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(w)}},y.prototype._bubbleScroll=function(b,w){var x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&x<this._lastRecordedBufferHeight)||(b.cancelable&&b.preventDefault(),!1)},y.prototype.onWheel=function(b){var w=this._getPixelsScrolled(b);return w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))},y.prototype._getPixelsScrolled=function(b){if(b.deltaY===0||b.shiftKey)return 0;var w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_LINE?w*=this._currentRowHeight:b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._currentRowHeight*this._bufferService.rows),w},y.prototype.getLinesScrolled=function(b){if(b.deltaY===0||b.shiftKey)return 0;var w=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(w/=this._currentRowHeight+0,this._wheelPartialScroll+=w,w=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w},y.prototype._applyScrollModifier=function(b,w){var x=this._optionsService.options.fastScrollModifier;return x==="alt"&&w.altKey||x==="ctrl"&&w.ctrlKey||x==="shift"&&w.shiftKey?b*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:b*this._optionsService.options.scrollSensitivity},y.prototype.onTouchStart=function(b){this._lastTouchY=b.touches[0].pageY},y.prototype.onTouchMove=function(b){var w=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(b,w))},d([h(4,m.IBufferService),h(5,m.IOptionsService),h(6,p.ICharSizeService),h(7,p.IRenderService)],y)}(f.Disposable);a.Viewport=v},2950:function(s,a,l){var c=this&&this.__decorate||function(g,p,m,v){var _,y=arguments.length,b=y<3?p:v===null?v=Object.getOwnPropertyDescriptor(p,m):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,p,m,v);else for(var w=g.length-1;w>=0;w--)(_=g[w])&&(b=(y<3?_(b):y>3?_(p,m,b):_(p,m))||b);return y>3&&b&&Object.defineProperty(p,m,b),b},u=this&&this.__param||function(g,p){return function(m,v){p(m,v,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;var d=l(4725),h=l(2585),f=function(){function g(p,m,v,_,y,b){this._textarea=p,this._compositionView=m,this._bufferService=v,this._optionsService=_,this._coreService=y,this._renderService=b,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(g.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),g.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},g.prototype.compositionupdate=function(p){var m=this;this._compositionView.textContent=p.data,this.updateCompositionElements(),setTimeout(function(){m._compositionPosition.end=m._textarea.value.length},0)},g.prototype.compositionend=function(){this._finalizeComposition(!0)},g.prototype.keydown=function(p){if(this._isComposing||this._isSendingComposition){if(p.keyCode===229||p.keyCode===16||p.keyCode===17||p.keyCode===18)return!1;this._finalizeComposition(!1)}return p.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},g.prototype._finalizeComposition=function(p){var m=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,p){var v={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(m._isSendingComposition){m._isSendingComposition=!1;var y;v.start+=m._dataAlreadySent.length,(y=m._isComposing?m._textarea.value.substring(v.start,v.end):m._textarea.value.substring(v.start)).length>0&&m._coreService.triggerDataEvent(y,!0)}},0)}else{this._isSendingComposition=!1;var _=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(_,!0)}},g.prototype._handleAnyTextareaChanges=function(){var p=this,m=this._textarea.value;setTimeout(function(){if(!p._isComposing){var v=p._textarea.value.replace(m,"");v.length>0&&(p._dataAlreadySent=v,p._coreService.triggerDataEvent(v,!0))}},0)},g.prototype.updateCompositionElements=function(p){var m=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var v=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),_=this._renderService.dimensions.actualCellHeight,y=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,b=v*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=b+"px",this._compositionView.style.top=y+"px",this._compositionView.style.height=_+"px",this._compositionView.style.lineHeight=_+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var w=this._compositionView.getBoundingClientRect();this._textarea.style.left=b+"px",this._textarea.style.top=y+"px",this._textarea.style.width=Math.max(w.width,1)+"px",this._textarea.style.height=Math.max(w.height,1)+"px",this._textarea.style.lineHeight=w.height+"px"}p||setTimeout(function(){return m.updateCompositionElements(!0)},0)}},c([u(2,h.IBufferService),u(3,h.IOptionsService),u(4,h.ICoreService),u(5,d.IRenderService)],g)}();a.CompositionHelper=f},9806:(s,a)=>{function l(c,u){var d=u.getBoundingClientRect();return[c.clientX-d.left,c.clientY-d.top]}Object.defineProperty(a,"__esModule",{value:!0}),a.getRawByteCoords=a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=l,a.getCoords=function(c,u,d,h,f,g,p,m){if(f){var v=l(c,u);if(v)return v[0]=Math.ceil((v[0]+(m?g/2:0))/g),v[1]=Math.ceil(v[1]/p),v[0]=Math.min(Math.max(v[0],1),d+(m?1:0)),v[1]=Math.min(Math.max(v[1],1),h),v}},a.getRawByteCoords=function(c){if(c)return{x:c[0]+32,y:c[1]+32}}},9504:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;var c=l(2584);function u(m,v,_,y){var b=m-d(_,m),w=v-d(_,v),x=Math.abs(b-w)-function(S,k,T){for(var D=0,R=S-d(T,S),N=k-d(T,k),A=0;A<Math.abs(R-N);A++){var V=h(S,k)==="A"?-1:1,P=T.buffer.lines.get(R+V*A);(P==null?void 0:P.isWrapped)&&D++}return D}(m,v,_);return p(x,g(h(m,v),y))}function d(m,v){for(var _=0,y=m.buffer.lines.get(v),b=y==null?void 0:y.isWrapped;b&&v>=0&&v<m.rows;)_++,b=(y=m.buffer.lines.get(--v))==null?void 0:y.isWrapped;return _}function h(m,v){return m>v?"A":"B"}function f(m,v,_,y,b,w){for(var x=m,S=v,k="";x!==_||S!==y;)x+=b?1:-1,b&&x>w.cols-1?(k+=w.buffer.translateBufferLineToString(S,!1,m,x),x=0,m=0,S++):!b&&x<0&&(k+=w.buffer.translateBufferLineToString(S,!1,0,m+1),m=x=w.cols-1,S--);return k+w.buffer.translateBufferLineToString(S,!1,m,x)}function g(m,v){var _=v?"O":"[";return c.C0.ESC+_+m}function p(m,v){m=Math.floor(m);for(var _="",y=0;y<m;y++)_+=v;return _}a.moveToCellSequence=function(m,v,_,y){var b,w=_.buffer.x,x=_.buffer.y;if(!_.buffer.hasScrollback)return function(k,T,D,R,N,A){return u(T,R,N,A).length===0?"":p(f(k,T,k,T-d(N,T),!1,N).length,g("D",A))}(w,x,0,v,_,y)+u(x,v,_,y)+function(k,T,D,R,N,A){var V;V=u(T,R,N,A).length>0?R-d(N,R):T;var P=R,U=function(F,M,W,j,$,Q){var ee;return ee=u(W,j,$,Q).length>0?j-d($,j):M,F<W&&ee<=j||F>=W&&ee<j?"C":"D"}(k,T,D,R,N,A);return p(f(k,V,D,P,U==="C",N).length,g(U,A))}(w,x,m,v,_,y);if(x===v)return b=w>m?"D":"C",p(Math.abs(w-m),g(b,y));b=x>v?"D":"C";var S=Math.abs(x-v);return p(function(k,T){return T.cols-k}(x>v?m:w,_)+(S-1)*_.cols+1+((x>v?w:m)-1),g(b,y))}},1546:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;var c=l(643),u=l(8803),d=l(1420),h=l(3734),f=l(1752),g=l(4774),p=l(9631),m=l(8978),v=function(){function _(y,b,w,x,S,k,T,D){this._container=y,this._alpha=x,this._colors=S,this._rendererId=k,this._bufferService=T,this._optionsService=D,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+b+"-layer"),this._canvas.style.zIndex=w.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return _.prototype.dispose=function(){var y;(0,p.removeElementFromParent)(this._canvas),(y=this._charAtlas)===null||y===void 0||y.dispose()},_.prototype._initCanvas=function(){this._ctx=(0,f.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},_.prototype.onOptionsChanged=function(){},_.prototype.onBlur=function(){},_.prototype.onFocus=function(){},_.prototype.onCursorMove=function(){},_.prototype.onGridChanged=function(y,b){},_.prototype.onSelectionChanged=function(y,b,w){},_.prototype.setColors=function(y){this._refreshCharAtlas(y)},_.prototype._setTransparency=function(y){if(y!==this._alpha){var b=this._canvas;this._alpha=y,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,b),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},_.prototype._refreshCharAtlas=function(y){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,d.acquireCharAtlas)(this._optionsService.options,this._rendererId,y,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},_.prototype.resize=function(y){this._scaledCellWidth=y.scaledCellWidth,this._scaledCellHeight=y.scaledCellHeight,this._scaledCharWidth=y.scaledCharWidth,this._scaledCharHeight=y.scaledCharHeight,this._scaledCharLeft=y.scaledCharLeft,this._scaledCharTop=y.scaledCharTop,this._canvas.width=y.scaledCanvasWidth,this._canvas.height=y.scaledCanvasHeight,this._canvas.style.width=y.canvasWidth+"px",this._canvas.style.height=y.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},_.prototype.clearTextureAtlas=function(){var y;(y=this._charAtlas)===null||y===void 0||y.clear()},_.prototype._fillCells=function(y,b,w,x){this._ctx.fillRect(y*this._scaledCellWidth,b*this._scaledCellHeight,w*this._scaledCellWidth,x*this._scaledCellHeight)},_.prototype._fillMiddleLineAtCells=function(y,b,w){w===void 0&&(w=1);var x=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(y*this._scaledCellWidth,(b+1)*this._scaledCellHeight-x-window.devicePixelRatio,w*this._scaledCellWidth,window.devicePixelRatio)},_.prototype._fillBottomLineAtCells=function(y,b,w){w===void 0&&(w=1),this._ctx.fillRect(y*this._scaledCellWidth,(b+1)*this._scaledCellHeight-window.devicePixelRatio-1,w*this._scaledCellWidth,window.devicePixelRatio)},_.prototype._fillLeftLineAtCell=function(y,b,w){this._ctx.fillRect(y*this._scaledCellWidth,b*this._scaledCellHeight,window.devicePixelRatio*w,this._scaledCellHeight)},_.prototype._strokeRectAtCell=function(y,b,w,x){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(y*this._scaledCellWidth+window.devicePixelRatio/2,b*this._scaledCellHeight+window.devicePixelRatio/2,w*this._scaledCellWidth-window.devicePixelRatio,x*this._scaledCellHeight-window.devicePixelRatio)},_.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},_.prototype._clearCells=function(y,b,w,x){this._alpha?this._ctx.clearRect(y*this._scaledCellWidth,b*this._scaledCellHeight,w*this._scaledCellWidth,x*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(y*this._scaledCellWidth,b*this._scaledCellHeight,w*this._scaledCellWidth,x*this._scaledCellHeight))},_.prototype._fillCharTrueColor=function(y,b,w){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=u.TEXT_BASELINE,this._clipRow(w);var x=!1;this._optionsService.options.customGlyphs!==!1&&(x=(0,m.tryDrawCustomChar)(this._ctx,y.getChars(),b*this._scaledCellWidth,w*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),x||this._ctx.fillText(y.getChars(),b*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},_.prototype._drawChars=function(y,b,w){var x,S,k,T=this._getContrastColor(y);T||y.isFgRGB()||y.isBgRGB()?this._drawUncachedChars(y,b,w,T):(y.isInverse()?(S=y.isBgDefault()?u.INVERTED_DEFAULT_COLOR:y.getBgColor(),k=y.isFgDefault()?u.INVERTED_DEFAULT_COLOR:y.getFgColor()):(k=y.isBgDefault()?c.DEFAULT_COLOR:y.getBgColor(),S=y.isFgDefault()?c.DEFAULT_COLOR:y.getFgColor()),S+=this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&S<8?8:0,this._currentGlyphIdentifier.chars=y.getChars()||c.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=y.getCode()||c.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=k,this._currentGlyphIdentifier.fg=S,this._currentGlyphIdentifier.bold=!!y.isBold(),this._currentGlyphIdentifier.dim=!!y.isDim(),this._currentGlyphIdentifier.italic=!!y.isItalic(),((x=this._charAtlas)===null||x===void 0?void 0:x.draw(this._ctx,this._currentGlyphIdentifier,b*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(y,b,w))},_.prototype._drawUncachedChars=function(y,b,w,x){if(this._ctx.save(),this._ctx.font=this._getFont(!!y.isBold(),!!y.isItalic()),this._ctx.textBaseline=u.TEXT_BASELINE,y.isInverse())if(x)this._ctx.fillStyle=x.css;else if(y.isBgDefault())this._ctx.fillStyle=g.color.opaque(this._colors.background).css;else if(y.isBgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(y.getBgColor()).join(",")+")";else{var S=y.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&S<8&&(S+=8),this._ctx.fillStyle=this._colors.ansi[S].css}else if(x)this._ctx.fillStyle=x.css;else if(y.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(y.isFgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(y.getFgColor()).join(",")+")";else{var k=y.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&k<8&&(k+=8),this._ctx.fillStyle=this._colors.ansi[k].css}this._clipRow(w),y.isDim()&&(this._ctx.globalAlpha=u.DIM_OPACITY);var T=!1;this._optionsService.options.customGlyphs!==!1&&(T=(0,m.tryDrawCustomChar)(this._ctx,y.getChars(),b*this._scaledCellWidth,w*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),T||this._ctx.fillText(y.getChars(),b*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},_.prototype._clipRow=function(y){this._ctx.beginPath(),this._ctx.rect(0,y*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},_.prototype._getFont=function(y,b){return(b?"italic":"")+" "+(y?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},_.prototype._getContrastColor=function(y){if(this._optionsService.options.minimumContrastRatio!==1){var b=this._colors.contrastCache.getColor(y.bg,y.fg);if(b!==void 0)return b||void 0;var w=y.getFgColor(),x=y.getFgColorMode(),S=y.getBgColor(),k=y.getBgColorMode(),T=!!y.isInverse(),D=!!y.isInverse();if(T){var R=w;w=S,S=R;var N=x;x=k,k=N}var A=this._resolveBackgroundRgba(k,S,T),V=this._resolveForegroundRgba(x,w,T,D),P=g.rgba.ensureContrastRatio(A,V,this._optionsService.options.minimumContrastRatio);if(P){var U={css:g.channels.toCss(P>>24&255,P>>16&255,P>>8&255),rgba:P};return this._colors.contrastCache.setColor(y.bg,y.fg,U),U}this._colors.contrastCache.setColor(y.bg,y.fg,null)}},_.prototype._resolveBackgroundRgba=function(y,b,w){switch(y){case 16777216:case 33554432:return this._colors.ansi[b].rgba;case 50331648:return b<<8;default:return w?this._colors.foreground.rgba:this._colors.background.rgba}},_.prototype._resolveForegroundRgba=function(y,b,w,x){switch(y){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&x&&b<8&&(b+=8),this._colors.ansi[b].rgba;case 50331648:return b<<8;default:return w?this._colors.background.rgba:this._colors.foreground.rgba}},_}();a.BaseRenderLayer=v},2512:function(s,a,l){var c,u=this&&this.__extends||(c=function(b,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var k in S)Object.prototype.hasOwnProperty.call(S,k)&&(x[k]=S[k])},c(b,w)},function(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function x(){this.constructor=b}c(b,w),b.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}),d=this&&this.__decorate||function(b,w,x,S){var k,T=arguments.length,D=T<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,w,x,S);else for(var R=b.length-1;R>=0;R--)(k=b[R])&&(D=(T<3?k(D):T>3?k(w,x,D):k(w,x))||D);return T>3&&D&&Object.defineProperty(w,x,D),D},h=this&&this.__param||function(b,w){return function(x,S){w(x,S,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CursorRenderLayer=void 0;var f=l(1546),g=l(511),p=l(2585),m=l(4725),v=600,_=function(b){function w(x,S,k,T,D,R,N,A,V){var P=b.call(this,x,"cursor",S,!0,k,T,R,N)||this;return P._onRequestRedraw=D,P._coreService=A,P._coreBrowserService=V,P._cell=new g.CellData,P._state={x:0,y:0,isFocused:!1,style:"",width:0},P._cursorRenderers={bar:P._renderBarCursor.bind(P),block:P._renderBlockCursor.bind(P),underline:P._renderUnderlineCursor.bind(P)},P}return u(w,b),w.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),b.prototype.dispose.call(this)},w.prototype.resize=function(x){b.prototype.resize.call(this,x),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},w.prototype.reset=function(){var x;this._clearCursor(),(x=this._cursorBlinkStateManager)===null||x===void 0||x.restartBlinkAnimation(),this.onOptionsChanged()},w.prototype.onBlur=function(){var x;(x=this._cursorBlinkStateManager)===null||x===void 0||x.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onFocus=function(){var x;(x=this._cursorBlinkStateManager)===null||x===void 0||x.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onOptionsChanged=function(){var x,S=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new y(this._coreBrowserService.isFocused,function(){S._render(!0)})):((x=this._cursorBlinkStateManager)===null||x===void 0||x.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onCursorMove=function(){var x;(x=this._cursorBlinkStateManager)===null||x===void 0||x.restartBlinkAnimation()},w.prototype.onGridChanged=function(x,S){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},w.prototype._render=function(x){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var S=this._bufferService.buffer.ybase+this._bufferService.buffer.y,k=S-this._bufferService.buffer.ydisp;if(k<0||k>=this._bufferService.rows)this._clearCursor();else{var T=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(S).loadCell(T,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var D=this._optionsService.options.cursorStyle;return D&&D!=="block"?this._cursorRenderers[D](T,k,this._cell):this._renderBlurCursor(T,k,this._cell),this._ctx.restore(),this._state.x=T,this._state.y=k,this._state.isFocused=!1,this._state.style=D,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===T&&this._state.y===k&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](T,k,this._cell),this._ctx.restore(),this._state.x=T,this._state.y=k,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},w.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},w.prototype._renderBarCursor=function(x,S,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(x,S,this._optionsService.options.cursorWidth),this._ctx.restore()},w.prototype._renderBlockCursor=function(x,S,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(x,S,k.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(k,x,S),this._ctx.restore()},w.prototype._renderUnderlineCursor=function(x,S,k){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(x,S),this._ctx.restore()},w.prototype._renderBlurCursor=function(x,S,k){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(x,S,k.getWidth(),1),this._ctx.restore()},d([h(5,p.IBufferService),h(6,p.IOptionsService),h(7,p.ICoreService),h(8,m.ICoreBrowserService)],w)}(f.BaseRenderLayer);a.CursorRenderLayer=_;var y=function(){function b(w,x){this._renderCallback=x,this.isCursorVisible=!0,w&&this._restartInterval()}return Object.defineProperty(b.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},b.prototype.restartBlinkAnimation=function(){var w=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){w._renderCallback(),w._animationFrame=void 0})))},b.prototype._restartInterval=function(w){var x=this;w===void 0&&(w=v),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(x._animationTimeRestarted){var S=v-(Date.now()-x._animationTimeRestarted);if(x._animationTimeRestarted=void 0,S>0)return void x._restartInterval(S)}x.isCursorVisible=!1,x._animationFrame=window.requestAnimationFrame(function(){x._renderCallback(),x._animationFrame=void 0}),x._blinkInterval=window.setInterval(function(){if(x._animationTimeRestarted){var k=v-(Date.now()-x._animationTimeRestarted);return x._animationTimeRestarted=void 0,void x._restartInterval(k)}x.isCursorVisible=!x.isCursorVisible,x._animationFrame=window.requestAnimationFrame(function(){x._renderCallback(),x._animationFrame=void 0})},v)},w)},b.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},b.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},b}()},8978:(s,a,l)=>{var c,u,d,h,f,g,p,m,v,_,y,b,w,x,S,k,T,D,R,N,A,V,P,U,F,M,W,j,$,Q,ee,ge,_e,Ie,K,se,oe,Ne,pe,Me,at,_t,qe,kt,ve,B,G,te,Se,Ee,Ce,He,We,ht,Tt,$t,pn,ln,fe,Be,It,jt,Yn,ho,Ns,Ea,fo,Ir,ka,Rr,Yo,La,Ta,en,Zo,z,q,le,Z,re,ce,J,be,Fe,Pe,it,ft,wt,Nt,Ut,xt,Xi,Ln,go,Ac,Nr,sl,Vg,al,af,zg,Ug,_b,vb,bb,nS,iS,rS,oS,yb,Cb,wb,Sb,SD,sS,d_,aS,xD,lS,cS,xb,ED,uS,Eb,kb,lf,dS,hS;Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;var P5=l(1752);a.blockElementDefinitions={"\u2580":[{x:0,y:0,w:8,h:4}],"\u2581":[{x:0,y:7,w:8,h:1}],"\u2582":[{x:0,y:6,w:8,h:2}],"\u2583":[{x:0,y:5,w:8,h:3}],"\u2584":[{x:0,y:4,w:8,h:4}],"\u2585":[{x:0,y:3,w:8,h:5}],"\u2586":[{x:0,y:2,w:8,h:6}],"\u2587":[{x:0,y:1,w:8,h:7}],"\u2588":[{x:0,y:0,w:8,h:8}],"\u2589":[{x:0,y:0,w:7,h:8}],"\u258A":[{x:0,y:0,w:6,h:8}],"\u258B":[{x:0,y:0,w:5,h:8}],"\u258C":[{x:0,y:0,w:4,h:8}],"\u258D":[{x:0,y:0,w:3,h:8}],"\u258E":[{x:0,y:0,w:2,h:8}],"\u258F":[{x:0,y:0,w:1,h:8}],"\u2590":[{x:4,y:0,w:4,h:8}],"\u2594":[{x:0,y:0,w:9,h:1}],"\u2595":[{x:7,y:0,w:1,h:8}],"\u2596":[{x:0,y:4,w:4,h:4}],"\u2597":[{x:4,y:4,w:4,h:4}],"\u2598":[{x:0,y:0,w:4,h:4}],"\u2599":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u259A":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"\u259B":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"\u259C":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"\u259D":[{x:4,y:0,w:4,h:4}],"\u259E":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"\u259F":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"\u{1FB70}":[{x:1,y:0,w:1,h:8}],"\u{1FB71}":[{x:2,y:0,w:1,h:8}],"\u{1FB72}":[{x:3,y:0,w:1,h:8}],"\u{1FB73}":[{x:4,y:0,w:1,h:8}],"\u{1FB74}":[{x:5,y:0,w:1,h:8}],"\u{1FB75}":[{x:6,y:0,w:1,h:8}],"\u{1FB76}":[{x:0,y:1,w:8,h:1}],"\u{1FB77}":[{x:0,y:2,w:8,h:1}],"\u{1FB78}":[{x:0,y:3,w:8,h:1}],"\u{1FB79}":[{x:0,y:4,w:8,h:1}],"\u{1FB7A}":[{x:0,y:5,w:8,h:1}],"\u{1FB7B}":[{x:0,y:6,w:8,h:1}],"\u{1FB7C}":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB7D}":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7E}":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"\u{1FB7F}":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"\u{1FB80}":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB81}":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"\u{1FB82}":[{x:0,y:0,w:8,h:2}],"\u{1FB83}":[{x:0,y:0,w:8,h:3}],"\u{1FB84}":[{x:0,y:0,w:8,h:5}],"\u{1FB85}":[{x:0,y:0,w:8,h:6}],"\u{1FB86}":[{x:0,y:0,w:8,h:7}],"\u{1FB87}":[{x:6,y:0,w:2,h:8}],"\u{1FB88}":[{x:5,y:0,w:3,h:8}],"\u{1FB89}":[{x:3,y:0,w:5,h:8}],"\u{1FB8A}":[{x:2,y:0,w:6,h:8}],"\u{1FB8B}":[{x:1,y:0,w:7,h:8}],"\u{1FB95}":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"\u{1FB96}":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"\u{1FB97}":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var M5={"\u2591":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"\u2592":[[1,0],[0,0],[0,1],[0,0]],"\u2593":[[0,1],[1,1],[1,0],[1,1]]};a.boxDrawingDefinitions={"\u2500":(c={},c[1]="M0,.5 L1,.5",c),"\u2501":(u={},u[3]="M0,.5 L1,.5",u),"\u2502":(d={},d[1]="M.5,0 L.5,1",d),"\u2503":(h={},h[3]="M.5,0 L.5,1",h),"\u250C":(f={},f[1]="M0.5,1 L.5,.5 L1,.5",f),"\u250F":(g={},g[3]="M0.5,1 L.5,.5 L1,.5",g),"\u2510":(p={},p[1]="M0,.5 L.5,.5 L.5,1",p),"\u2513":(m={},m[3]="M0,.5 L.5,.5 L.5,1",m),"\u2514":(v={},v[1]="M.5,0 L.5,.5 L1,.5",v),"\u2517":(_={},_[3]="M.5,0 L.5,.5 L1,.5",_),"\u2518":(y={},y[1]="M.5,0 L.5,.5 L0,.5",y),"\u251B":(b={},b[3]="M.5,0 L.5,.5 L0,.5",b),"\u251C":(w={},w[1]="M.5,0 L.5,1 M.5,.5 L1,.5",w),"\u2523":(x={},x[3]="M.5,0 L.5,1 M.5,.5 L1,.5",x),"\u2524":(S={},S[1]="M.5,0 L.5,1 M.5,.5 L0,.5",S),"\u252B":(k={},k[3]="M.5,0 L.5,1 M.5,.5 L0,.5",k),"\u252C":(T={},T[1]="M0,.5 L1,.5 M.5,.5 L.5,1",T),"\u2533":(D={},D[3]="M0,.5 L1,.5 M.5,.5 L.5,1",D),"\u2534":(R={},R[1]="M0,.5 L1,.5 M.5,.5 L.5,0",R),"\u253B":(N={},N[3]="M0,.5 L1,.5 M.5,.5 L.5,0",N),"\u253C":(A={},A[1]="M0,.5 L1,.5 M.5,0 L.5,1",A),"\u254B":(V={},V[3]="M0,.5 L1,.5 M.5,0 L.5,1",V),"\u2574":(P={},P[1]="M.5,.5 L0,.5",P),"\u2578":(U={},U[3]="M.5,.5 L0,.5",U),"\u2575":(F={},F[1]="M.5,.5 L.5,0",F),"\u2579":(M={},M[3]="M.5,.5 L.5,0",M),"\u2576":(W={},W[1]="M.5,.5 L1,.5",W),"\u257A":(j={},j[3]="M.5,.5 L1,.5",j),"\u2577":($={},$[1]="M.5,.5 L.5,1",$),"\u257B":(Q={},Q[3]="M.5,.5 L.5,1",Q),"\u2550":(ee={},ee[1]=function(et,je){return"M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)},ee),"\u2551":(ge={},ge[1]=function(et,je){return"M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1"},ge),"\u2552":(_e={},_e[1]=function(et,je){return"M.5,1 L.5,"+(.5-je)+" L1,"+(.5-je)+" M.5,"+(.5+je)+" L1,"+(.5+je)},_e),"\u2553":(Ie={},Ie[1]=function(et,je){return"M"+(.5-et)+",1 L"+(.5-et)+",.5 L1,.5 M"+(.5+et)+",.5 L"+(.5+et)+",1"},Ie),"\u2554":(K={},K[1]=function(et,je){return"M1,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1"},K),"\u2555":(se={},se[1]=function(et,je){return"M0,"+(.5-je)+" L.5,"+(.5-je)+" L.5,1 M0,"+(.5+je)+" L.5,"+(.5+je)},se),"\u2556":(oe={},oe[1]=function(et,je){return"M"+(.5+et)+",1 L"+(.5+et)+",.5 L0,.5 M"+(.5-et)+",.5 L"+(.5-et)+",1"},oe),"\u2557":(Ne={},Ne[1]=function(et,je){return"M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M0,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",1"},Ne),"\u2558":(pe={},pe[1]=function(et,je){return"M.5,0 L.5,"+(.5+je)+" L1,"+(.5+je)+" M.5,"+(.5-je)+" L1,"+(.5-je)},pe),"\u2559":(Me={},Me[1]=function(et,je){return"M1,.5 L"+(.5-et)+",.5 L"+(.5-et)+",0 M"+(.5+et)+",.5 L"+(.5+et)+",0"},Me),"\u255A":(at={},at[1]=function(et,je){return"M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0 M1,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",0"},at),"\u255B":(_t={},_t[1]=function(et,je){return"M0,"+(.5+je)+" L.5,"+(.5+je)+" L.5,0 M0,"+(.5-je)+" L.5,"+(.5-je)},_t),"\u255C":(qe={},qe[1]=function(et,je){return"M0,.5 L"+(.5+et)+",.5 L"+(.5+et)+",0 M"+(.5-et)+",.5 L"+(.5-et)+",0"},qe),"\u255D":(kt={},kt[1]=function(et,je){return"M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0 M0,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",0"},kt),"\u255E":(ve={},ve[1]=function(et,je){return"M.5,0 L.5,1 M.5,"+(.5-je)+" L1,"+(.5-je)+" M.5,"+(.5+je)+" L1,"+(.5+je)},ve),"\u255F":(B={},B[1]=function(et,je){return"M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1 M"+(.5+et)+",.5 L1,.5"},B),"\u2560":(G={},G[1]=function(et,je){return"M"+(.5-et)+",0 L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1 M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0"},G),"\u2561":(te={},te[1]=function(et,je){return"M.5,0 L.5,1 M0,"+(.5-je)+" L.5,"+(.5-je)+" M0,"+(.5+je)+" L.5,"+(.5+je)},te),"\u2562":(Se={},Se[1]=function(et,je){return"M0,.5 L"+(.5-et)+",.5 M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1"},Se),"\u2563":(Ee={},Ee[1]=function(et,je){return"M"+(.5+et)+",0 L"+(.5+et)+",1 M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0"},Ee),"\u2564":(Ce={},Ce[1]=function(et,je){return"M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)+" M.5,"+(.5+je)+" L.5,1"},Ce),"\u2565":(He={},He[1]=function(et,je){return"M0,.5 L1,.5 M"+(.5-et)+",.5 L"+(.5-et)+",1 M"+(.5+et)+",.5 L"+(.5+et)+",1"},He),"\u2566":(We={},We[1]=function(et,je){return"M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1"},We),"\u2567":(ht={},ht[1]=function(et,je){return"M.5,0 L.5,"+(.5-je)+" M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)},ht),"\u2568":(Tt={},Tt[1]=function(et,je){return"M0,.5 L1,.5 M"+(.5-et)+",.5 L"+(.5-et)+",0 M"+(.5+et)+",.5 L"+(.5+et)+",0"},Tt),"\u2569":($t={},$t[1]=function(et,je){return"M0,"+(.5+je)+" L1,"+(.5+je)+" M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0 M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0"},$t),"\u256A":(pn={},pn[1]=function(et,je){return"M.5,0 L.5,1 M0,"+(.5-je)+" L1,"+(.5-je)+" M0,"+(.5+je)+" L1,"+(.5+je)},pn),"\u256B":(ln={},ln[1]=function(et,je){return"M0,.5 L1,.5 M"+(.5-et)+",0 L"+(.5-et)+",1 M"+(.5+et)+",0 L"+(.5+et)+",1"},ln),"\u256C":(fe={},fe[1]=function(et,je){return"M0,"+(.5+je)+" L"+(.5-et)+","+(.5+je)+" L"+(.5-et)+",1 M1,"+(.5+je)+" L"+(.5+et)+","+(.5+je)+" L"+(.5+et)+",1 M0,"+(.5-je)+" L"+(.5-et)+","+(.5-je)+" L"+(.5-et)+",0 M1,"+(.5-je)+" L"+(.5+et)+","+(.5-je)+" L"+(.5+et)+",0"},fe),"\u2571":(Be={},Be[1]="M1,0 L0,1",Be),"\u2572":(It={},It[1]="M0,0 L1,1",It),"\u2573":(jt={},jt[1]="M1,0 L0,1 M0,0 L1,1",jt),"\u257C":(Yn={},Yn[1]="M.5,.5 L0,.5",Yn[3]="M.5,.5 L1,.5",Yn),"\u257D":(ho={},ho[1]="M.5,.5 L.5,0",ho[3]="M.5,.5 L.5,1",ho),"\u257E":(Ns={},Ns[1]="M.5,.5 L1,.5",Ns[3]="M.5,.5 L0,.5",Ns),"\u257F":(Ea={},Ea[1]="M.5,.5 L.5,1",Ea[3]="M.5,.5 L.5,0",Ea),"\u250D":(fo={},fo[1]="M.5,.5 L.5,1",fo[3]="M.5,.5 L1,.5",fo),"\u250E":(Ir={},Ir[1]="M.5,.5 L1,.5",Ir[3]="M.5,.5 L.5,1",Ir),"\u2511":(ka={},ka[1]="M.5,.5 L.5,1",ka[3]="M.5,.5 L0,.5",ka),"\u2512":(Rr={},Rr[1]="M.5,.5 L0,.5",Rr[3]="M.5,.5 L.5,1",Rr),"\u2515":(Yo={},Yo[1]="M.5,.5 L.5,0",Yo[3]="M.5,.5 L1,.5",Yo),"\u2516":(La={},La[1]="M.5,.5 L1,.5",La[3]="M.5,.5 L.5,0",La),"\u2519":(Ta={},Ta[1]="M.5,.5 L.5,0",Ta[3]="M.5,.5 L0,.5",Ta),"\u251A":(en={},en[1]="M.5,.5 L0,.5",en[3]="M.5,.5 L.5,0",en),"\u251D":(Zo={},Zo[1]="M.5,0 L.5,1",Zo[3]="M.5,.5 L1,.5",Zo),"\u251E":(z={},z[1]="M0.5,1 L.5,.5 L1,.5",z[3]="M.5,.5 L.5,0",z),"\u251F":(q={},q[1]="M.5,0 L.5,.5 L1,.5",q[3]="M.5,.5 L.5,1",q),"\u2520":(le={},le[1]="M.5,.5 L1,.5",le[3]="M.5,0 L.5,1",le),"\u2521":(Z={},Z[1]="M.5,.5 L.5,1",Z[3]="M.5,0 L.5,.5 L1,.5",Z),"\u2522":(re={},re[1]="M.5,.5 L.5,0",re[3]="M0.5,1 L.5,.5 L1,.5",re),"\u2525":(ce={},ce[1]="M.5,0 L.5,1",ce[3]="M.5,.5 L0,.5",ce),"\u2526":(J={},J[1]="M0,.5 L.5,.5 L.5,1",J[3]="M.5,.5 L.5,0",J),"\u2527":(be={},be[1]="M.5,0 L.5,.5 L0,.5",be[3]="M.5,.5 L.5,1",be),"\u2528":(Fe={},Fe[1]="M.5,.5 L0,.5",Fe[3]="M.5,0 L.5,1",Fe),"\u2529":(Pe={},Pe[1]="M.5,.5 L.5,1",Pe[3]="M.5,0 L.5,.5 L0,.5",Pe),"\u252A":(it={},it[1]="M.5,.5 L.5,0",it[3]="M0,.5 L.5,.5 L.5,1",it),"\u252D":(ft={},ft[1]="M0.5,1 L.5,.5 L1,.5",ft[3]="M.5,.5 L0,.5",ft),"\u252E":(wt={},wt[1]="M0,.5 L.5,.5 L.5,1",wt[3]="M.5,.5 L1,.5",wt),"\u252F":(Nt={},Nt[1]="M.5,.5 L.5,1",Nt[3]="M0,.5 L1,.5",Nt),"\u2530":(Ut={},Ut[1]="M0,.5 L1,.5",Ut[3]="M.5,.5 L.5,1",Ut),"\u2531":(xt={},xt[1]="M.5,.5 L1,.5",xt[3]="M0,.5 L.5,.5 L.5,1",xt),"\u2532":(Xi={},Xi[1]="M.5,.5 L0,.5",Xi[3]="M0.5,1 L.5,.5 L1,.5",Xi),"\u2535":(Ln={},Ln[1]="M.5,0 L.5,.5 L1,.5",Ln[3]="M.5,.5 L0,.5",Ln),"\u2536":(go={},go[1]="M.5,0 L.5,.5 L0,.5",go[3]="M.5,.5 L1,.5",go),"\u2537":(Ac={},Ac[1]="M.5,.5 L.5,0",Ac[3]="M0,.5 L1,.5",Ac),"\u2538":(Nr={},Nr[1]="M0,.5 L1,.5",Nr[3]="M.5,.5 L.5,0",Nr),"\u2539":(sl={},sl[1]="M.5,.5 L1,.5",sl[3]="M.5,0 L.5,.5 L0,.5",sl),"\u253A":(Vg={},Vg[1]="M.5,.5 L0,.5",Vg[3]="M.5,0 L.5,.5 L1,.5",Vg),"\u253D":(al={},al[1]="M.5,0 L.5,1 M.5,.5 L1,.5",al[3]="M.5,.5 L0,.5",al),"\u253E":(af={},af[1]="M.5,0 L.5,1 M.5,.5 L0,.5",af[3]="M.5,.5 L1,.5",af),"\u253F":(zg={},zg[1]="M.5,0 L.5,1",zg[3]="M0,.5 L1,.5",zg),"\u2540":(Ug={},Ug[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Ug[3]="M.5,.5 L.5,0",Ug),"\u2541":(_b={},_b[1]="M.5,.5 L.5,0 M0,.5 L1,.5",_b[3]="M.5,.5 L.5,1",_b),"\u2542":(vb={},vb[1]="M0,.5 L1,.5",vb[3]="M.5,0 L.5,1",vb),"\u2543":(bb={},bb[1]="M0.5,1 L.5,.5 L1,.5",bb[3]="M.5,0 L.5,.5 L0,.5",bb),"\u2544":(nS={},nS[1]="M0,.5 L.5,.5 L.5,1",nS[3]="M.5,0 L.5,.5 L1,.5",nS),"\u2545":(iS={},iS[1]="M.5,0 L.5,.5 L1,.5",iS[3]="M0,.5 L.5,.5 L.5,1",iS),"\u2546":(rS={},rS[1]="M.5,0 L.5,.5 L0,.5",rS[3]="M0.5,1 L.5,.5 L1,.5",rS),"\u2547":(oS={},oS[1]="M.5,.5 L.5,1",oS[3]="M.5,.5 L.5,0 M0,.5 L1,.5",oS),"\u2548":(yb={},yb[1]="M.5,.5 L.5,0",yb[3]="M0,.5 L1,.5 M.5,.5 L.5,1",yb),"\u2549":(Cb={},Cb[1]="M.5,.5 L1,.5",Cb[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Cb),"\u254A":(wb={},wb[1]="M.5,.5 L0,.5",wb[3]="M.5,0 L.5,1 M.5,.5 L1,.5",wb),"\u254C":(Sb={},Sb[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Sb),"\u254D":(SD={},SD[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",SD),"\u2504":(sS={},sS[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",sS),"\u2505":(d_={},d_[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",d_),"\u2508":(aS={},aS[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",aS),"\u2509":(xD={},xD[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",xD),"\u254E":(lS={},lS[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",lS),"\u254F":(cS={},cS[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",cS),"\u2506":(xb={},xb[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",xb),"\u2507":(ED={},ED[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",ED),"\u250A":(uS={},uS[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",uS),"\u250B":(Eb={},Eb[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Eb),"\u256D":(kb={},kb[1]="C.5,1,.5,.5,1,.5",kb),"\u256E":(lf={},lf[1]="C.5,1,.5,.5,0,.5",lf),"\u256F":(dS={},dS[1]="C.5,0,.5,.5,0,.5",dS),"\u2570":(hS={},hS[1]="C.5,0,.5,.5,1,.5",hS)},a.tryDrawCustomChar=function(et,je,Oc,Lb,Tb,Xo){var wu=a.blockElementDefinitions[je];if(wu)return function(Da,Su,Ib,Rb,xi,vi){for(var ql=0;ql<Su.length;ql++){var ll=Su[ql],po=xi/8,Td=vi/8;Da.fillRect(Ib+ll.x*po,Rb+ll.y*Td,ll.w*po,ll.h*Td)}}(et,wu,Oc,Lb,Tb,Xo),!0;var jl=M5[je];if(jl)return function(Da,Su,Ib,Rb,xi,vi){var ql,ll=kD.get(Su);ll||(ll=new Map,kD.set(Su,ll));var po=Da.fillStyle;if(typeof po!="string")throw new Error('Unexpected fillStyle type "'+po+'"');var Td=ll.get(po);if(!Td){var Pc=Su[0].length,jg=Su.length,cf=document.createElement("canvas");cf.width=Pc,cf.height=jg;var fS=(0,P5.throwIfFalsy)(cf.getContext("2d")),fr=new ImageData(Pc,jg),uf=void 0,cl=void 0,gS=void 0,Nb=void 0;if(po.startsWith("#"))uf=parseInt(po.substr(1,2),16),cl=parseInt(po.substr(3,2),16),gS=parseInt(po.substr(5,2),16),Nb=po.length>7&&parseInt(po.substr(7,2),16)||1;else{if(!po.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+po+'" when drawing pattern glyph');uf=(ql=po.substring(5,po.length-1).split(",").map(function(B5){return parseFloat(B5)}))[0],cl=ql[1],gS=ql[2],Nb=ql[3]}for(var Qo=0;Qo<jg;Qo++)for(var df=0;df<Pc;df++)fr.data[4*(Qo*Pc+df)]=uf,fr.data[4*(Qo*Pc+df)+1]=cl,fr.data[4*(Qo*Pc+df)+2]=gS,fr.data[4*(Qo*Pc+df)+3]=Su[Qo][df]*(255*Nb);fS.putImageData(fr,0,0),Td=(0,P5.throwIfFalsy)(Da.createPattern(cf,null)),ll.set(po,Td)}Da.fillStyle=Td,Da.fillRect(Ib,Rb,xi,vi)}(et,jl,Oc,Lb,Tb,Xo),!0;var Db=a.boxDrawingDefinitions[je];return!!Db&&(function(Da,Su,Ib,Rb,xi,vi){Da.strokeStyle=Da.fillStyle;for(var ql=0,ll=Object.entries(Su);ql<ll.length;ql++){var po=ll[ql],Td=po[0],Pc=po[1];Da.beginPath(),Da.lineWidth=window.devicePixelRatio*Number.parseInt(Td);for(var jg=0,cf=(typeof Pc=="function"?Pc(.15,.15/vi*xi):Pc).split(" ");jg<cf.length;jg++){var fS=cf[jg],fr=fS[0],uf=F5[fr];if(uf){var cl=fS.substring(1).split(",");cl[0]&&cl[1]&&uf(Da,KY(cl,xi,vi,Ib,Rb))}else console.error('Could not find drawing instructions for "'+fr+'"')}Da.stroke(),Da.closePath()}}(et,Db,Oc,Lb,Tb,Xo),!0)};var kD=new Map;function LD(et,je,Oc){return Oc===void 0&&(Oc=0),Math.max(Math.min(et,je),Oc)}var F5={C:function(et,je){return et.bezierCurveTo(je[0],je[1],je[2],je[3],je[4],je[5])},L:function(et,je){return et.lineTo(je[0],je[1])},M:function(et,je){return et.moveTo(je[0],je[1])}};function KY(et,je,Oc,Lb,Tb){var Xo=et.map(function(Db){return parseFloat(Db)||parseInt(Db)});if(Xo.length<2)throw new Error("Too few arguments for instruction");for(var wu=0;wu<Xo.length;wu+=2)Xo[wu]*=je,Xo[wu]!==0&&(Xo[wu]=LD(Math.round(Xo[wu]+.5)-.5,je,0)),Xo[wu]+=Lb;for(var jl=1;jl<Xo.length;jl+=2)Xo[jl]*=Oc,Xo[jl]!==0&&(Xo[jl]=LD(Math.round(Xo[jl]+.5)-.5,Oc,0)),Xo[jl]+=Tb;return Xo}},3700:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.GridCache=void 0;var l=function(){function c(){this.cache=[]}return c.prototype.resize=function(u,d){for(var h=0;h<u;h++){this.cache.length<=h&&this.cache.push([]);for(var f=this.cache[h].length;f<d;f++)this.cache[h].push(void 0);this.cache[h].length=d}this.cache.length=u},c.prototype.clear=function(){for(var u=0;u<this.cache.length;u++)for(var d=0;d<this.cache[u].length;d++)this.cache[u][d]=void 0},c}();a.GridCache=l},5098:function(s,a,l){var c,u=this&&this.__extends||(c=function(_,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&(b[x]=w[x])},c(_,y)},function(_,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function b(){this.constructor=_}c(_,y),_.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}),d=this&&this.__decorate||function(_,y,b,w){var x,S=arguments.length,k=S<3?y:w===null?w=Object.getOwnPropertyDescriptor(y,b):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,y,b,w);else for(var T=_.length-1;T>=0;T--)(x=_[T])&&(k=(S<3?x(k):S>3?x(y,b,k):x(y,b))||k);return S>3&&k&&Object.defineProperty(y,b,k),k},h=this&&this.__param||function(_,y){return function(b,w){y(b,w,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;var f=l(1546),g=l(8803),p=l(2040),m=l(2585),v=function(_){function y(b,w,x,S,k,T,D,R){var N=_.call(this,b,"link",w,!0,x,S,D,R)||this;return k.onShowLinkUnderline(function(A){return N._onShowLinkUnderline(A)}),k.onHideLinkUnderline(function(A){return N._onHideLinkUnderline(A)}),T.onShowLinkUnderline(function(A){return N._onShowLinkUnderline(A)}),T.onHideLinkUnderline(function(A){return N._onHideLinkUnderline(A)}),N}return u(y,_),y.prototype.resize=function(b){_.prototype.resize.call(this,b),this._state=void 0},y.prototype.reset=function(){this._clearCurrentLink()},y.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var b=this._state.y2-this._state.y1-1;b>0&&this._clearCells(0,this._state.y1+1,this._state.cols,b),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},y.prototype._onShowLinkUnderline=function(b){if(b.fg===g.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:b.fg&&(0,p.is256Color)(b.fg)?this._ctx.fillStyle=this._colors.ansi[b.fg].css:this._ctx.fillStyle=this._colors.foreground.css,b.y1===b.y2)this._fillBottomLineAtCells(b.x1,b.y1,b.x2-b.x1);else{this._fillBottomLineAtCells(b.x1,b.y1,b.cols-b.x1);for(var w=b.y1+1;w<b.y2;w++)this._fillBottomLineAtCells(0,w,b.cols);this._fillBottomLineAtCells(0,b.y2,b.x2)}this._state=b},y.prototype._onHideLinkUnderline=function(b){this._clearCurrentLink()},d([h(6,m.IBufferService),h(7,m.IOptionsService)],y)}(f.BaseRenderLayer);a.LinkRenderLayer=v},3525:function(s,a,l){var c,u=this&&this.__extends||(c=function(k,T){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,R){D.__proto__=R}||function(D,R){for(var N in R)Object.prototype.hasOwnProperty.call(R,N)&&(D[N]=R[N])},c(k,T)},function(k,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function D(){this.constructor=k}c(k,T),k.prototype=T===null?Object.create(T):(D.prototype=T.prototype,new D)}),d=this&&this.__decorate||function(k,T,D,R){var N,A=arguments.length,V=A<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,D):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(k,T,D,R);else for(var P=k.length-1;P>=0;P--)(N=k[P])&&(V=(A<3?N(V):A>3?N(T,D,V):N(T,D))||V);return A>3&&V&&Object.defineProperty(T,D,V),V},h=this&&this.__param||function(k,T){return function(D,R){T(D,R,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Renderer=void 0;var f=l(9596),g=l(4149),p=l(2512),m=l(5098),v=l(844),_=l(4725),y=l(2585),b=l(1420),w=l(8460),x=1,S=function(k){function T(D,R,N,A,V,P,U,F){var M=k.call(this)||this;M._colors=D,M._screenElement=R,M._bufferService=P,M._charSizeService=U,M._optionsService=F,M._id=x++,M._onRequestRedraw=new w.EventEmitter;var W=M._optionsService.options.allowTransparency;return M._renderLayers=[V.createInstance(f.TextRenderLayer,M._screenElement,0,M._colors,W,M._id),V.createInstance(g.SelectionRenderLayer,M._screenElement,1,M._colors,M._id),V.createInstance(m.LinkRenderLayer,M._screenElement,2,M._colors,M._id,N,A),V.createInstance(p.CursorRenderLayer,M._screenElement,3,M._colors,M._id,M._onRequestRedraw)],M.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},M._devicePixelRatio=window.devicePixelRatio,M._updateDimensions(),M.onOptionsChanged(),M}return u(T,k),Object.defineProperty(T.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),T.prototype.dispose=function(){for(var D=0,R=this._renderLayers;D<R.length;D++)R[D].dispose();k.prototype.dispose.call(this),(0,b.removeTerminalFromCache)(this._id)},T.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},T.prototype.setColors=function(D){this._colors=D;for(var R=0,N=this._renderLayers;R<N.length;R++){var A=N[R];A.setColors(this._colors),A.reset()}},T.prototype.onResize=function(D,R){this._updateDimensions();for(var N=0,A=this._renderLayers;N<A.length;N++)A[N].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},T.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},T.prototype.onBlur=function(){this._runOperation(function(D){return D.onBlur()})},T.prototype.onFocus=function(){this._runOperation(function(D){return D.onFocus()})},T.prototype.onSelectionChanged=function(D,R,N){N===void 0&&(N=!1),this._runOperation(function(A){return A.onSelectionChanged(D,R,N)})},T.prototype.onCursorMove=function(){this._runOperation(function(D){return D.onCursorMove()})},T.prototype.onOptionsChanged=function(){this._runOperation(function(D){return D.onOptionsChanged()})},T.prototype.clear=function(){this._runOperation(function(D){return D.reset()})},T.prototype._runOperation=function(D){for(var R=0,N=this._renderLayers;R<N.length;R++)D(N[R])},T.prototype.renderRows=function(D,R){for(var N=0,A=this._renderLayers;N<A.length;N++)A[N].onGridChanged(D,R)},T.prototype.clearTextureAtlas=function(){for(var D=0,R=this._renderLayers;D<R.length;D++)R[D].clearTextureAtlas()},T.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},d([h(4,y.IInstantiationService),h(5,y.IBufferService),h(6,_.ICharSizeService),h(7,y.IOptionsService)],T)}(v.Disposable);a.Renderer=S},1752:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.throwIfFalsy=void 0,a.throwIfFalsy=function(l){if(!l)throw new Error("value must not be falsy");return l}},4149:function(s,a,l){var c,u=this&&this.__extends||(c=function(m,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,y){_.__proto__=y}||function(_,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(_[b]=y[b])},c(m,v)},function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function _(){this.constructor=m}c(m,v),m.prototype=v===null?Object.create(v):(_.prototype=v.prototype,new _)}),d=this&&this.__decorate||function(m,v,_,y){var b,w=arguments.length,x=w<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,_):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(m,v,_,y);else for(var S=m.length-1;S>=0;S--)(b=m[S])&&(x=(w<3?b(x):w>3?b(v,_,x):b(v,_))||x);return w>3&&x&&Object.defineProperty(v,_,x),x},h=this&&this.__param||function(m,v){return function(_,y){v(_,y,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionRenderLayer=void 0;var f=l(1546),g=l(2585),p=function(m){function v(_,y,b,w,x,S){var k=m.call(this,_,"selection",y,!0,b,w,x,S)||this;return k._clearState(),k}return u(v,m),v.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},v.prototype.resize=function(_){m.prototype.resize.call(this,_),this._clearState()},v.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},v.prototype.onSelectionChanged=function(_,y,b){if(this._didStateChange(_,y,b,this._bufferService.buffer.ydisp))if(this._clearAll(),_&&y){var w=_[1]-this._bufferService.buffer.ydisp,x=y[1]-this._bufferService.buffer.ydisp,S=Math.max(w,0),k=Math.min(x,this._bufferService.rows-1);if(S>=this._bufferService.rows||k<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,b){var T=_[0],D=y[0]-T,R=k-S+1;this._fillCells(T,S,D,R)}else{T=w===S?_[0]:0;var N=S===x?y[0]:this._bufferService.cols;this._fillCells(T,S,N-T,1);var A=Math.max(k-S-1,0);if(this._fillCells(0,S+1,this._bufferService.cols,A),S!==k){var V=x===k?y[0]:this._bufferService.cols;this._fillCells(0,k,V,1)}}this._state.start=[_[0],_[1]],this._state.end=[y[0],y[1]],this._state.columnSelectMode=b,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},v.prototype._didStateChange=function(_,y,b,w){return!this._areCoordinatesEqual(_,this._state.start)||!this._areCoordinatesEqual(y,this._state.end)||b!==this._state.columnSelectMode||w!==this._state.ydisp},v.prototype._areCoordinatesEqual=function(_,y){return!(!_||!y)&&_[0]===y[0]&&_[1]===y[1]},d([h(4,g.IBufferService),h(5,g.IOptionsService)],v)}(f.BaseRenderLayer);a.SelectionRenderLayer=p},9596:function(s,a,l){var c,u=this&&this.__extends||(c=function(x,S){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,T){k.__proto__=T}||function(k,T){for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(k[D]=T[D])},c(x,S)},function(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function k(){this.constructor=x}c(x,S),x.prototype=S===null?Object.create(S):(k.prototype=S.prototype,new k)}),d=this&&this.__decorate||function(x,S,k,T){var D,R=arguments.length,N=R<3?S:T===null?T=Object.getOwnPropertyDescriptor(S,k):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,S,k,T);else for(var A=x.length-1;A>=0;A--)(D=x[A])&&(N=(R<3?D(N):R>3?D(S,k,N):D(S,k))||N);return R>3&&N&&Object.defineProperty(S,k,N),N},h=this&&this.__param||function(x,S){return function(k,T){S(k,T,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.TextRenderLayer=void 0;var f=l(3700),g=l(1546),p=l(3734),m=l(643),v=l(511),_=l(2585),y=l(4725),b=l(4269),w=function(x){function S(k,T,D,R,N,A,V,P){var U=x.call(this,k,"text",T,R,D,N,A,V)||this;return U._characterJoinerService=P,U._characterWidth=0,U._characterFont="",U._characterOverlapCache={},U._workCell=new v.CellData,U._state=new f.GridCache,U}return u(S,x),S.prototype.resize=function(k){x.prototype.resize.call(this,k);var T=this._getFont(!1,!1);this._characterWidth===k.scaledCharWidth&&this._characterFont===T||(this._characterWidth=k.scaledCharWidth,this._characterFont=T,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},S.prototype.reset=function(){this._state.clear(),this._clearAll()},S.prototype._forEachCell=function(k,T,D){for(var R=k;R<=T;R++)for(var N=R+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.lines.get(N),V=this._characterJoinerService.getJoinedCharacters(N),P=0;P<this._bufferService.cols;P++){A.loadCell(P,this._workCell);var U=this._workCell,F=!1,M=P;if(U.getWidth()!==0){if(V.length>0&&P===V[0][0]){F=!0;var W=V.shift();U=new b.JoinedCellData(this._workCell,A.translateToString(!0,W[0],W[1]),W[1]-W[0]),M=W[1]-1}!F&&this._isOverlapping(U)&&M<A.length-1&&A.getCodePoint(M+1)===m.NULL_CELL_CODE&&(U.content&=-12582913,U.content|=2<<22),D(U,P,R),P=M}}},S.prototype._drawBackground=function(k,T){var D=this,R=this._ctx,N=this._bufferService.cols,A=0,V=0,P=null;R.save(),this._forEachCell(k,T,function(U,F,M){var W=null;U.isInverse()?W=U.isFgDefault()?D._colors.foreground.css:U.isFgRGB()?"rgb("+p.AttributeData.toColorRGB(U.getFgColor()).join(",")+")":D._colors.ansi[U.getFgColor()].css:U.isBgRGB()?W="rgb("+p.AttributeData.toColorRGB(U.getBgColor()).join(",")+")":U.isBgPalette()&&(W=D._colors.ansi[U.getBgColor()].css),P===null&&(A=F,V=M),M!==V?(R.fillStyle=P||"",D._fillCells(A,V,N-A,1),A=F,V=M):P!==W&&(R.fillStyle=P||"",D._fillCells(A,V,F-A,1),A=F,V=M),P=W}),P!==null&&(R.fillStyle=P,this._fillCells(A,V,N-A,1)),R.restore()},S.prototype._drawForeground=function(k,T){var D=this;this._forEachCell(k,T,function(R,N,A){if(!R.isInvisible()&&(D._drawChars(R,N,A),R.isUnderline()||R.isStrikethrough())){if(D._ctx.save(),R.isInverse())if(R.isBgDefault())D._ctx.fillStyle=D._colors.background.css;else if(R.isBgRGB())D._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(R.getBgColor()).join(",")+")";else{var V=R.getBgColor();D._optionsService.options.drawBoldTextInBrightColors&&R.isBold()&&V<8&&(V+=8),D._ctx.fillStyle=D._colors.ansi[V].css}else if(R.isFgDefault())D._ctx.fillStyle=D._colors.foreground.css;else if(R.isFgRGB())D._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(R.getFgColor()).join(",")+")";else{var P=R.getFgColor();D._optionsService.options.drawBoldTextInBrightColors&&R.isBold()&&P<8&&(P+=8),D._ctx.fillStyle=D._colors.ansi[P].css}R.isStrikethrough()&&D._fillMiddleLineAtCells(N,A,R.getWidth()),R.isUnderline()&&D._fillBottomLineAtCells(N,A,R.getWidth()),D._ctx.restore()}})},S.prototype.onGridChanged=function(k,T){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,k,this._bufferService.cols,T-k+1),this._drawBackground(k,T),this._drawForeground(k,T))},S.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},S.prototype._isOverlapping=function(k){if(k.getWidth()!==1||k.getCode()<256)return!1;var T=k.getChars();if(this._characterOverlapCache.hasOwnProperty(T))return this._characterOverlapCache[T];this._ctx.save(),this._ctx.font=this._characterFont;var D=Math.floor(this._ctx.measureText(T).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[T]=D,D},d([h(5,_.IBufferService),h(6,_.IOptionsService),h(7,y.ICharacterJoinerService)],S)}(g.BaseRenderLayer);a.TextRenderLayer=w},9616:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BaseCharAtlas=void 0;var l=function(){function c(){this._didWarmUp=!1}return c.prototype.dispose=function(){},c.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},c.prototype._doWarmUp=function(){},c.prototype.clear=function(){},c.prototype.beginFrame=function(){},c}();a.BaseCharAtlas=l},1420:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireCharAtlas=void 0;var c=l(2040),u=l(1906),d=[];a.acquireCharAtlas=function(h,f,g,p,m){for(var v=(0,c.generateConfig)(p,m,h,g),_=0;_<d.length;_++){var y=(b=d[_]).ownedBy.indexOf(f);if(y>=0){if((0,c.configEquals)(b.config,v))return b.atlas;b.ownedBy.length===1?(b.atlas.dispose(),d.splice(_,1)):b.ownedBy.splice(y,1);break}}for(_=0;_<d.length;_++){var b=d[_];if((0,c.configEquals)(b.config,v))return b.ownedBy.push(f),b.atlas}var w={atlas:new u.DynamicCharAtlas(document,v),config:v,ownedBy:[f]};return d.push(w),w.atlas},a.removeTerminalFromCache=function(h){for(var f=0;f<d.length;f++){var g=d[f].ownedBy.indexOf(h);if(g!==-1){d[f].ownedBy.length===1?(d[f].atlas.dispose(),d.splice(f,1)):d[f].ownedBy.splice(g,1);break}}}},2040:function(s,a,l){var c=this&&this.__spreadArray||function(d,h,f){if(f||arguments.length===2)for(var g,p=0,m=h.length;p<m;p++)!g&&p in h||(g||(g=Array.prototype.slice.call(h,0,p)),g[p]=h[p]);return d.concat(g||Array.prototype.slice.call(h))};Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;var u=l(643);a.generateConfig=function(d,h,f,g){var p={foreground:g.foreground,background:g.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:c([],g.ansi,!0)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:d,scaledCharHeight:h,fontFamily:f.fontFamily,fontSize:f.fontSize,fontWeight:f.fontWeight,fontWeightBold:f.fontWeightBold,allowTransparency:f.allowTransparency,colors:p}},a.configEquals=function(d,h){for(var f=0;f<d.colors.ansi.length;f++)if(d.colors.ansi[f].rgba!==h.colors.ansi[f].rgba)return!1;return d.devicePixelRatio===h.devicePixelRatio&&d.fontFamily===h.fontFamily&&d.fontSize===h.fontSize&&d.fontWeight===h.fontWeight&&d.fontWeightBold===h.fontWeightBold&&d.allowTransparency===h.allowTransparency&&d.scaledCharWidth===h.scaledCharWidth&&d.scaledCharHeight===h.scaledCharHeight&&d.colors.foreground===h.colors.foreground&&d.colors.background===h.colors.background},a.is256Color=function(d){return d<u.DEFAULT_COLOR}},8803:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CHAR_ATLAS_CELL_SPACING=a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;var c=l(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=c.isFirefox?"bottom":"ideographic",a.CHAR_ATLAS_CELL_SPACING=1},1906:function(s,a,l){var c,u=this&&this.__extends||(c=function(T,D){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,N){R.__proto__=N}||function(R,N){for(var A in N)Object.prototype.hasOwnProperty.call(N,A)&&(R[A]=N[A])},c(T,D)},function(T,D){if(typeof D!="function"&&D!==null)throw new TypeError("Class extends value "+String(D)+" is not a constructor or null");function R(){this.constructor=T}c(T,D),T.prototype=D===null?Object.create(D):(R.prototype=D.prototype,new R)});Object.defineProperty(a,"__esModule",{value:!0}),a.NoneCharAtlas=a.DynamicCharAtlas=a.getGlyphCacheKey=void 0;var d=l(8803),h=l(9616),f=l(5680),g=l(7001),p=l(6114),m=l(1752),v=l(4774),_=1024,y=1024,b={css:"rgba(0, 0, 0, 0)",rgba:0};function w(T){return T.code<<21|T.bg<<12|T.fg<<3|(T.bold?0:4)+(T.dim?0:2)+(T.italic?0:1)}a.getGlyphCacheKey=w;var x=function(T){function D(R,N){var A=T.call(this)||this;A._config=N,A._drawToCacheCount=0,A._glyphsWaitingOnBitmap=[],A._bitmapCommitTimeout=null,A._bitmap=null,A._cacheCanvas=R.createElement("canvas"),A._cacheCanvas.width=_,A._cacheCanvas.height=y,A._cacheCtx=(0,m.throwIfFalsy)(A._cacheCanvas.getContext("2d",{alpha:!0}));var V=R.createElement("canvas");V.width=A._config.scaledCharWidth,V.height=A._config.scaledCharHeight,A._tmpCtx=(0,m.throwIfFalsy)(V.getContext("2d",{alpha:A._config.allowTransparency})),A._width=Math.floor(_/A._config.scaledCharWidth),A._height=Math.floor(y/A._config.scaledCharHeight);var P=A._width*A._height;return A._cacheMap=new g.LRUMap(P),A._cacheMap.prealloc(P),A}return u(D,T),D.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},D.prototype.beginFrame=function(){this._drawToCacheCount=0},D.prototype.clear=function(){if(this._cacheMap.size>0){var R=this._width*this._height;this._cacheMap=new g.LRUMap(R),this._cacheMap.prealloc(R)}this._cacheCtx.clearRect(0,0,_,y),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},D.prototype.draw=function(R,N,A,V){if(N.code===32)return!0;if(!this._canCache(N))return!1;var P=w(N),U=this._cacheMap.get(P);if(U!=null)return this._drawFromCache(R,U,A,V),!0;if(this._drawToCacheCount<100){var F;F=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var M=this._drawToCache(N,F);return this._cacheMap.set(P,M),this._drawFromCache(R,M,A,V),!0}return!1},D.prototype._canCache=function(R){return R.code<256},D.prototype._toCoordinateX=function(R){return R%this._width*this._config.scaledCharWidth},D.prototype._toCoordinateY=function(R){return Math.floor(R/this._width)*this._config.scaledCharHeight},D.prototype._drawFromCache=function(R,N,A,V){if(!N.isEmpty){var P=this._toCoordinateX(N.index),U=this._toCoordinateY(N.index);R.drawImage(N.inBitmap?this._bitmap:this._cacheCanvas,P,U,this._config.scaledCharWidth,this._config.scaledCharHeight,A,V,this._config.scaledCharWidth,this._config.scaledCharHeight)}},D.prototype._getColorFromAnsiIndex=function(R){return R<this._config.colors.ansi.length?this._config.colors.ansi[R]:f.DEFAULT_ANSI_COLORS[R]},D.prototype._getBackgroundColor=function(R){return this._config.allowTransparency?b:R.bg===d.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:R.bg<256?this._getColorFromAnsiIndex(R.bg):this._config.colors.background},D.prototype._getForegroundColor=function(R){return R.fg===d.INVERTED_DEFAULT_COLOR?v.color.opaque(this._config.colors.background):R.fg<256?this._getColorFromAnsiIndex(R.fg):this._config.colors.foreground},D.prototype._drawToCache=function(R,N){this._drawToCacheCount++,this._tmpCtx.save();var A=this._getBackgroundColor(R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=A.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var V=R.bold?this._config.fontWeightBold:this._config.fontWeight,P=R.italic?"italic":"";this._tmpCtx.font=P+" "+V+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=d.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(R).css,R.dim&&(this._tmpCtx.globalAlpha=d.DIM_OPACITY),this._tmpCtx.fillText(R.chars,0,this._config.scaledCharHeight);var U=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),F=!1;if(this._config.allowTransparency||(F=k(U,A)),F&&R.chars==="_"&&!this._config.allowTransparency)for(var M=1;M<=5&&(this._tmpCtx.fillText(R.chars,0,this._config.scaledCharHeight-M),F=k(U=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),A));M++);this._tmpCtx.restore();var W=this._toCoordinateX(N),j=this._toCoordinateY(N);this._cacheCtx.putImageData(U,W,j);var $={index:N,isEmpty:F,inBitmap:!1};return this._addGlyphToBitmap($),$},D.prototype._addGlyphToBitmap=function(R){var N=this;!("createImageBitmap"in window)||p.isFirefox||p.isSafari||(this._glyphsWaitingOnBitmap.push(R),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return N._generateBitmap()},100)))},D.prototype._generateBitmap=function(){var R=this,N=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(A){R._bitmap=A;for(var V=0;V<N.length;V++)N[V].inBitmap=!0}),this._bitmapCommitTimeout=null},D}(h.BaseCharAtlas);a.DynamicCharAtlas=x;var S=function(T){function D(R,N){return T.call(this)||this}return u(D,T),D.prototype.draw=function(R,N,A,V){return!1},D}(h.BaseCharAtlas);function k(T,D){for(var R=!0,N=D.rgba>>>24,A=D.rgba>>>16&255,V=D.rgba>>>8&255,P=0;P<T.data.length;P+=4)T.data[P]===N&&T.data[P+1]===A&&T.data[P+2]===V?T.data[P+3]=0:R=!1;return R}a.NoneCharAtlas=S},7001:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LRUMap=void 0;var l=function(){function c(u){this.capacity=u,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return c.prototype._unlinkNode=function(u){var d=u.prev,h=u.next;u===this._head&&(this._head=h),u===this._tail&&(this._tail=d),d!==null&&(d.next=h),h!==null&&(h.prev=d)},c.prototype._appendNode=function(u){var d=this._tail;d!==null&&(d.next=u),u.prev=d,u.next=null,this._tail=u,this._head===null&&(this._head=u)},c.prototype.prealloc=function(u){for(var d=this._nodePool,h=0;h<u;h++)d.push({prev:null,next:null,key:null,value:null})},c.prototype.get=function(u){var d=this._map[u];return d!==void 0?(this._unlinkNode(d),this._appendNode(d),d.value):null},c.prototype.peekValue=function(u){var d=this._map[u];return d!==void 0?d.value:null},c.prototype.peek=function(){var u=this._head;return u===null?null:u.value},c.prototype.set=function(u,d){var h=this._map[u];if(h!==void 0)h=this._map[u],this._unlinkNode(h),h.value=d;else if(this.size>=this.capacity)h=this._head,this._unlinkNode(h),delete this._map[h.key],h.key=u,h.value=d,this._map[u]=h;else{var f=this._nodePool;f.length>0?((h=f.pop()).key=u,h.value=d):h={prev:null,next:null,key:u,value:d},this._map[u]=h,this.size++}this._appendNode(h)},c}();a.LRUMap=l},1296:function(s,a,l){var c,u=this&&this.__extends||(c=function(R,N){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,V){A.__proto__=V}||function(A,V){for(var P in V)Object.prototype.hasOwnProperty.call(V,P)&&(A[P]=V[P])},c(R,N)},function(R,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function A(){this.constructor=R}c(R,N),R.prototype=N===null?Object.create(N):(A.prototype=N.prototype,new A)}),d=this&&this.__decorate||function(R,N,A,V){var P,U=arguments.length,F=U<3?N:V===null?V=Object.getOwnPropertyDescriptor(N,A):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(R,N,A,V);else for(var M=R.length-1;M>=0;M--)(P=R[M])&&(F=(U<3?P(F):U>3?P(N,A,F):P(N,A))||F);return U>3&&F&&Object.defineProperty(N,A,F),F},h=this&&this.__param||function(R,N){return function(A,V){N(A,V,R)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;var f=l(3787),g=l(8803),p=l(844),m=l(4725),v=l(2585),_=l(8460),y=l(4774),b=l(9631),w="xterm-dom-renderer-owner-",x="xterm-fg-",S="xterm-bg-",k="xterm-focus",T=1,D=function(R){function N(A,V,P,U,F,M,W,j,$,Q){var ee=R.call(this)||this;return ee._colors=A,ee._element=V,ee._screenElement=P,ee._viewportElement=U,ee._linkifier=F,ee._linkifier2=M,ee._charSizeService=j,ee._optionsService=$,ee._bufferService=Q,ee._terminalClass=T++,ee._rowElements=[],ee._rowContainer=document.createElement("div"),ee._rowContainer.classList.add("xterm-rows"),ee._rowContainer.style.lineHeight="normal",ee._rowContainer.setAttribute("aria-hidden","true"),ee._refreshRowElements(ee._bufferService.cols,ee._bufferService.rows),ee._selectionContainer=document.createElement("div"),ee._selectionContainer.classList.add("xterm-selection"),ee._selectionContainer.setAttribute("aria-hidden","true"),ee.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},ee._updateDimensions(),ee._injectCss(),ee._rowFactory=W.createInstance(f.DomRendererRowFactory,document,ee._colors),ee._element.classList.add(w+ee._terminalClass),ee._screenElement.appendChild(ee._rowContainer),ee._screenElement.appendChild(ee._selectionContainer),ee._linkifier.onShowLinkUnderline(function(ge){return ee._onLinkHover(ge)}),ee._linkifier.onHideLinkUnderline(function(ge){return ee._onLinkLeave(ge)}),ee._linkifier2.onShowLinkUnderline(function(ge){return ee._onLinkHover(ge)}),ee._linkifier2.onHideLinkUnderline(function(ge){return ee._onLinkLeave(ge)}),ee}return u(N,R),Object.defineProperty(N.prototype,"onRequestRedraw",{get:function(){return new _.EventEmitter().event},enumerable:!1,configurable:!0}),N.prototype.dispose=function(){this._element.classList.remove(w+this._terminalClass),(0,b.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),R.prototype.dispose.call(this)},N.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var A=0,V=this._rowElements;A<V.length;A++){var P=V[A];P.style.width=this.dimensions.canvasWidth+"px",P.style.height=this.dimensions.actualCellHeight+"px",P.style.lineHeight=this.dimensions.actualCellHeight+"px",P.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var U=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=U,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},N.prototype.setColors=function(A){this._colors=A,this._injectCss()},N.prototype._injectCss=function(){var A=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var V=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";V+=this._terminalSelector+" span:not(."+f.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+f.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+f.ITALIC_CLASS+" { font-style: italic;}",V+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",V+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",V+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_BLINK_CLASS+":not(."+f.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_BLINK_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",V+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(P,U){V+=A._terminalSelector+" ."+x+U+" { color: "+P.css+"; }"+A._terminalSelector+" ."+S+U+" { background-color: "+P.css+"; }"}),V+=this._terminalSelector+" ."+x+g.INVERTED_DEFAULT_COLOR+" { color: "+y.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+S+g.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=V},N.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},N.prototype._refreshRowElements=function(A,V){for(var P=this._rowElements.length;P<=V;P++){var U=document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())},N.prototype.onResize=function(A,V){this._refreshRowElements(A,V),this._updateDimensions()},N.prototype.onCharSizeChanged=function(){this._updateDimensions()},N.prototype.onBlur=function(){this._rowContainer.classList.remove(k)},N.prototype.onFocus=function(){this._rowContainer.classList.add(k)},N.prototype.onSelectionChanged=function(A,V,P){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(A&&V){var U=A[1]-this._bufferService.buffer.ydisp,F=V[1]-this._bufferService.buffer.ydisp,M=Math.max(U,0),W=Math.min(F,this._bufferService.rows-1);if(!(M>=this._bufferService.rows||W<0)){var j=document.createDocumentFragment();if(P)j.appendChild(this._createSelectionElement(M,A[0],V[0],W-M+1));else{var $=U===M?A[0]:0,Q=M===F?V[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(M,$,Q));var ee=W-M-1;if(j.appendChild(this._createSelectionElement(M+1,0,this._bufferService.cols,ee)),M!==W){var ge=F===W?V[0]:this._bufferService.cols;j.appendChild(this._createSelectionElement(W,0,ge))}}this._selectionContainer.appendChild(j)}}},N.prototype._createSelectionElement=function(A,V,P,U){U===void 0&&(U=1);var F=document.createElement("div");return F.style.height=U*this.dimensions.actualCellHeight+"px",F.style.top=A*this.dimensions.actualCellHeight+"px",F.style.left=V*this.dimensions.actualCellWidth+"px",F.style.width=this.dimensions.actualCellWidth*(P-V)+"px",F},N.prototype.onCursorMove=function(){},N.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},N.prototype.clear=function(){for(var A=0,V=this._rowElements;A<V.length;A++)V[A].innerText=""},N.prototype.renderRows=function(A,V){for(var P=this._bufferService.buffer.ybase+this._bufferService.buffer.y,U=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),F=this._optionsService.options.cursorBlink,M=A;M<=V;M++){var W=this._rowElements[M];W.innerText="";var j=M+this._bufferService.buffer.ydisp,$=this._bufferService.buffer.lines.get(j),Q=this._optionsService.options.cursorStyle;W.appendChild(this._rowFactory.createRow($,j,j===P,Q,U,F,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(N.prototype,"_terminalSelector",{get:function(){return"."+w+this._terminalClass},enumerable:!1,configurable:!0}),N.prototype._onLinkHover=function(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!0)},N.prototype._onLinkLeave=function(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!1)},N.prototype._setCellUnderline=function(A,V,P,U,F,M){for(;A!==V||P!==U;){var W=this._rowElements[P];if(!W)return;var j=W.children[A];j&&(j.style.textDecoration=M?"underline":"none"),++A>=F&&(A=0,P++)}},d([h(6,v.IInstantiationService),h(7,m.ICharSizeService),h(8,v.IOptionsService),h(9,v.IBufferService)],N)}(p.Disposable);a.DomRenderer=D},3787:function(s,a,l){var c=this&&this.__decorate||function(b,w,x,S){var k,T=arguments.length,D=T<3?w:S===null?S=Object.getOwnPropertyDescriptor(w,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,w,x,S);else for(var R=b.length-1;R>=0;R--)(k=b[R])&&(D=(T<3?k(D):T>3?k(w,x,D):k(w,x))||D);return T>3&&D&&Object.defineProperty(w,x,D),D},u=this&&this.__param||function(b,w){return function(x,S){w(x,S,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=a.CURSOR_STYLE_UNDERLINE_CLASS=a.CURSOR_STYLE_BAR_CLASS=a.CURSOR_STYLE_BLOCK_CLASS=a.CURSOR_BLINK_CLASS=a.CURSOR_CLASS=a.STRIKETHROUGH_CLASS=a.UNDERLINE_CLASS=a.ITALIC_CLASS=a.DIM_CLASS=a.BOLD_CLASS=void 0;var d=l(8803),h=l(643),f=l(511),g=l(2585),p=l(4774),m=l(4725),v=l(4269);a.BOLD_CLASS="xterm-bold",a.DIM_CLASS="xterm-dim",a.ITALIC_CLASS="xterm-italic",a.UNDERLINE_CLASS="xterm-underline",a.STRIKETHROUGH_CLASS="xterm-strikethrough",a.CURSOR_CLASS="xterm-cursor",a.CURSOR_BLINK_CLASS="xterm-cursor-blink",a.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",a.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",a.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var _=function(){function b(w,x,S,k,T){this._document=w,this._colors=x,this._characterJoinerService=S,this._optionsService=k,this._coreService=T,this._workCell=new f.CellData}return b.prototype.setColors=function(w){this._colors=w},b.prototype.createRow=function(w,x,S,k,T,D,R,N){for(var A=this._document.createDocumentFragment(),V=this._characterJoinerService.getJoinedCharacters(x),P=0,U=Math.min(w.length,N)-1;U>=0;U--)if(w.loadCell(U,this._workCell).getCode()!==h.NULL_CELL_CODE||S&&U===T){P=U+1;break}for(U=0;U<P;U++){w.loadCell(U,this._workCell);var F=this._workCell.getWidth();if(F!==0){var M=!1,W=U,j=this._workCell;if(V.length>0&&U===V[0][0]){M=!0;var $=V.shift();j=new v.JoinedCellData(this._workCell,w.translateToString(!0,$[0],$[1]),$[1]-$[0]),W=$[1]-1,F=j.getWidth()}var Q=this._document.createElement("span");if(F>1&&(Q.style.width=R*F+"px"),M&&(Q.style.display="inline",T>=U&&T<=W&&(T=U)),!this._coreService.isCursorHidden&&S&&U===T)switch(Q.classList.add(a.CURSOR_CLASS),D&&Q.classList.add(a.CURSOR_BLINK_CLASS),k){case"bar":Q.classList.add(a.CURSOR_STYLE_BAR_CLASS);break;case"underline":Q.classList.add(a.CURSOR_STYLE_UNDERLINE_CLASS);break;default:Q.classList.add(a.CURSOR_STYLE_BLOCK_CLASS)}j.isBold()&&Q.classList.add(a.BOLD_CLASS),j.isItalic()&&Q.classList.add(a.ITALIC_CLASS),j.isDim()&&Q.classList.add(a.DIM_CLASS),j.isUnderline()&&Q.classList.add(a.UNDERLINE_CLASS),j.isInvisible()?Q.textContent=h.WHITESPACE_CELL_CHAR:Q.textContent=j.getChars()||h.WHITESPACE_CELL_CHAR,j.isStrikethrough()&&Q.classList.add(a.STRIKETHROUGH_CLASS);var ee=j.getFgColor(),ge=j.getFgColorMode(),_e=j.getBgColor(),Ie=j.getBgColorMode(),K=!!j.isInverse();if(K){var se=ee;ee=_e,_e=se;var oe=ge;ge=Ie,Ie=oe}switch(ge){case 16777216:case 33554432:j.isBold()&&ee<8&&this._optionsService.options.drawBoldTextInBrightColors&&(ee+=8),this._applyMinimumContrast(Q,this._colors.background,this._colors.ansi[ee])||Q.classList.add("xterm-fg-"+ee);break;case 50331648:var Ne=p.rgba.toColor(ee>>16&255,ee>>8&255,255&ee);this._applyMinimumContrast(Q,this._colors.background,Ne)||this._addStyle(Q,"color:#"+y(ee.toString(16),"0",6));break;default:this._applyMinimumContrast(Q,this._colors.background,this._colors.foreground)||K&&Q.classList.add("xterm-fg-"+d.INVERTED_DEFAULT_COLOR)}switch(Ie){case 16777216:case 33554432:Q.classList.add("xterm-bg-"+_e);break;case 50331648:this._addStyle(Q,"background-color:#"+y(_e.toString(16),"0",6));break;default:K&&Q.classList.add("xterm-bg-"+d.INVERTED_DEFAULT_COLOR)}A.appendChild(Q),U=W}}return A},b.prototype._applyMinimumContrast=function(w,x,S){if(this._optionsService.options.minimumContrastRatio===1)return!1;var k=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return k===void 0&&(k=p.color.ensureContrastRatio(x,S,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,k!=null?k:null)),!!k&&(this._addStyle(w,"color:"+k.css),!0)},b.prototype._addStyle=function(w,x){w.setAttribute("style",""+(w.getAttribute("style")||"")+x+";")},c([u(2,m.ICharacterJoinerService),u(3,g.IOptionsService),u(4,g.ICoreService)],b)}();function y(b,w,x){for(;b.length<x;)b=w+b;return b}a.DomRendererRowFactory=_},456:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0;var l=function(){function c(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}return c.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(c.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),c.prototype.areSelectionValuesReversed=function(){var u=this.selectionStart,d=this.selectionEnd;return!(!u||!d)&&(u[1]>d[1]||u[1]===d[1]&&u[0]>d[0])},c.prototype.onTrim=function(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},c}();a.SelectionModel=l},428:function(s,a,l){var c=this&&this.__decorate||function(p,m,v,_){var y,b=arguments.length,w=b<3?m:_===null?_=Object.getOwnPropertyDescriptor(m,v):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(p,m,v,_);else for(var x=p.length-1;x>=0;x--)(y=p[x])&&(w=(b<3?y(w):b>3?y(m,v,w):y(m,v))||w);return b>3&&w&&Object.defineProperty(m,v,w),w},u=this&&this.__param||function(p,m){return function(v,_){m(v,_,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;var d=l(2585),h=l(8460),f=function(){function p(m,v,_){this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=new h.EventEmitter,this._measureStrategy=new g(m,v,this._optionsService)}return Object.defineProperty(p.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),p.prototype.measure=function(){var m=this._measureStrategy.measure();m.width===this.width&&m.height===this.height||(this.width=m.width,this.height=m.height,this._onCharSizeChange.fire())},c([u(2,d.IOptionsService)],p)}();a.CharSizeService=f;var g=function(){function p(m,v,_){this._document=m,this._parentElement=v,this._optionsService=_,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return p.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var m=this._measureElement.getBoundingClientRect();return m.width!==0&&m.height!==0&&(this._result.width=m.width,this._result.height=Math.ceil(m.height)),this._result},p}()},4269:function(s,a,l){var c,u=this&&this.__extends||(c=function(y,b){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(w[S]=x[S])},c(y,b)},function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function w(){this.constructor=y}c(y,b),y.prototype=b===null?Object.create(b):(w.prototype=b.prototype,new w)}),d=this&&this.__decorate||function(y,b,w,x){var S,k=arguments.length,T=k<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,w):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,b,w,x);else for(var D=y.length-1;D>=0;D--)(S=y[D])&&(T=(k<3?S(T):k>3?S(b,w,T):S(b,w))||T);return k>3&&T&&Object.defineProperty(b,w,T),T},h=this&&this.__param||function(y,b){return function(w,x){b(w,x,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;var f=l(3734),g=l(643),p=l(511),m=l(2585),v=function(y){function b(w,x,S){var k=y.call(this)||this;return k.content=0,k.combinedData="",k.fg=w.fg,k.bg=w.bg,k.combinedData=x,k._width=S,k}return u(b,y),b.prototype.isCombined=function(){return 2097152},b.prototype.getWidth=function(){return this._width},b.prototype.getChars=function(){return this.combinedData},b.prototype.getCode=function(){return 2097151},b.prototype.setFromCharData=function(w){throw new Error("not implemented")},b.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},b}(f.AttributeData);a.JoinedCellData=v;var _=function(){function y(b){this._bufferService=b,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new p.CellData}return y.prototype.register=function(b){var w={id:this._nextCharacterJoinerId++,handler:b};return this._characterJoiners.push(w),w.id},y.prototype.deregister=function(b){for(var w=0;w<this._characterJoiners.length;w++)if(this._characterJoiners[w].id===b)return this._characterJoiners.splice(w,1),!0;return!1},y.prototype.getJoinedCharacters=function(b){if(this._characterJoiners.length===0)return[];var w=this._bufferService.buffer.lines.get(b);if(!w||w.length===0)return[];for(var x=[],S=w.translateToString(!0),k=0,T=0,D=0,R=w.getFg(0),N=w.getBg(0),A=0;A<w.getTrimmedLength();A++)if(w.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==N){if(A-k>1)for(var V=this._getJoinedRanges(S,D,T,w,k),P=0;P<V.length;P++)x.push(V[P]);k=A,D=T,R=this._workCell.fg,N=this._workCell.bg}T+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-k>1)for(V=this._getJoinedRanges(S,D,T,w,k),P=0;P<V.length;P++)x.push(V[P]);return x},y.prototype._getJoinedRanges=function(b,w,x,S,k){var T=b.substring(w,x),D=[];try{D=this._characterJoiners[0].handler(T)}catch(V){console.error(V)}for(var R=1;R<this._characterJoiners.length;R++)try{for(var N=this._characterJoiners[R].handler(T),A=0;A<N.length;A++)y._mergeRanges(D,N[A])}catch(V){console.error(V)}return this._stringRangesToCellRanges(D,S,k),D},y.prototype._stringRangesToCellRanges=function(b,w,x){var S=0,k=!1,T=0,D=b[S];if(D){for(var R=x;R<this._bufferService.cols;R++){var N=w.getWidth(R),A=w.getString(R).length||g.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!k&&D[0]<=T&&(D[0]=R,k=!0),D[1]<=T){if(D[1]=R,!(D=b[++S]))break;D[0]<=T?(D[0]=R,k=!0):k=!1}T+=A}}D&&(D[1]=this._bufferService.cols)}},y._mergeRanges=function(b,w){for(var x=!1,S=0;S<b.length;S++){var k=b[S];if(x){if(w[1]<=k[0])return b[S-1][1]=w[1],b;if(w[1]<=k[1])return b[S-1][1]=Math.max(w[1],k[1]),b.splice(S,1),b;b.splice(S,1),S--}else{if(w[1]<=k[0])return b.splice(S,0,w),b;if(w[1]<=k[1])return k[0]=Math.min(w[0],k[0]),b;w[0]<k[1]&&(k[0]=Math.min(w[0],k[0]),x=!0)}}return x?b[b.length-1][1]=w[1]:b.push(w),b},y=d([h(0,m.IBufferService)],y)}();a.CharacterJoinerService=_},5114:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;var l=function(){function c(u){this._textarea=u}return Object.defineProperty(c.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),c}();a.CoreBrowserService=l},8934:function(s,a,l){var c=this&&this.__decorate||function(g,p,m,v){var _,y=arguments.length,b=y<3?p:v===null?v=Object.getOwnPropertyDescriptor(p,m):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,p,m,v);else for(var w=g.length-1;w>=0;w--)(_=g[w])&&(b=(y<3?_(b):y>3?_(p,m,b):_(p,m))||b);return y>3&&b&&Object.defineProperty(p,m,b),b},u=this&&this.__param||function(g,p){return function(m,v){p(m,v,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;var d=l(4725),h=l(9806),f=function(){function g(p,m){this._renderService=p,this._charSizeService=m}return g.prototype.getCoords=function(p,m,v,_,y){return(0,h.getCoords)(p,m,v,_,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,y)},g.prototype.getRawByteCoords=function(p,m,v,_){var y=this.getCoords(p,m,v,_);return(0,h.getRawByteCoords)(y)},c([u(0,d.IRenderService),u(1,d.ICharSizeService)],g)}();a.MouseService=f},3230:function(s,a,l){var c,u=this&&this.__extends||(c=function(w,x){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,k){S.__proto__=k}||function(S,k){for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(S[T]=k[T])},c(w,x)},function(w,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function S(){this.constructor=w}c(w,x),w.prototype=x===null?Object.create(x):(S.prototype=x.prototype,new S)}),d=this&&this.__decorate||function(w,x,S,k){var T,D=arguments.length,R=D<3?x:k===null?k=Object.getOwnPropertyDescriptor(x,S):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(w,x,S,k);else for(var N=w.length-1;N>=0;N--)(T=w[N])&&(R=(D<3?T(R):D>3?T(x,S,R):T(x,S))||R);return D>3&&R&&Object.defineProperty(x,S,R),R},h=this&&this.__param||function(w,x){return function(S,k){x(S,k,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;var f=l(6193),g=l(8460),p=l(844),m=l(5596),v=l(3656),_=l(2585),y=l(4725),b=function(w){function x(S,k,T,D,R,N){var A=w.call(this)||this;if(A._renderer=S,A._rowCount=k,A._charSizeService=R,A._isPaused=!1,A._needsFullRefresh=!1,A._isNextRenderRedrawOnly=!0,A._needsSelectionRefresh=!1,A._canvasWidth=0,A._canvasHeight=0,A._selectionState={start:void 0,end:void 0,columnSelectMode:!1},A._onDimensionsChange=new g.EventEmitter,A._onRender=new g.EventEmitter,A._onRefreshRequest=new g.EventEmitter,A.register({dispose:function(){return A._renderer.dispose()}}),A._renderDebouncer=new f.RenderDebouncer(function(P,U){return A._renderRows(P,U)}),A.register(A._renderDebouncer),A._screenDprMonitor=new m.ScreenDprMonitor,A._screenDprMonitor.setListener(function(){return A.onDevicePixelRatioChange()}),A.register(A._screenDprMonitor),A.register(N.onResize(function(P){return A._fullRefresh()})),A.register(D.onOptionChange(function(){return A._renderer.onOptionsChanged()})),A.register(A._charSizeService.onCharSizeChange(function(){return A.onCharSizeChanged()})),A._renderer.onRequestRedraw(function(P){return A.refreshRows(P.start,P.end,!0)}),A.register((0,v.addDisposableDomListener)(window,"resize",function(){return A.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var V=new IntersectionObserver(function(P){return A._onIntersectionChange(P[P.length-1])},{threshold:0});V.observe(T),A.register({dispose:function(){return V.disconnect()}})}return A}return u(x,w),Object.defineProperty(x.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),x.prototype._onIntersectionChange=function(S){this._isPaused=S.isIntersecting===void 0?S.intersectionRatio===0:!S.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},x.prototype.refreshRows=function(S,k,T){T===void 0&&(T=!1),this._isPaused?this._needsFullRefresh=!0:(T||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(S,k,this._rowCount))},x.prototype._renderRows=function(S,k){this._renderer.renderRows(S,k),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:S,end:k}),this._isNextRenderRedrawOnly=!0},x.prototype.resize=function(S,k){this._rowCount=k,this._fireOnCanvasResize()},x.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},x.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},x.prototype.dispose=function(){w.prototype.dispose.call(this)},x.prototype.setRenderer=function(S){var k=this;this._renderer.dispose(),this._renderer=S,this._renderer.onRequestRedraw(function(T){return k.refreshRows(T.start,T.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},x.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},x.prototype.clearTextureAtlas=function(){var S,k;(k=(S=this._renderer)===null||S===void 0?void 0:S.clearTextureAtlas)===null||k===void 0||k.call(S),this._fullRefresh()},x.prototype.setColors=function(S){this._renderer.setColors(S),this._fullRefresh()},x.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},x.prototype.onResize=function(S,k){this._renderer.onResize(S,k),this._fullRefresh()},x.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},x.prototype.onBlur=function(){this._renderer.onBlur()},x.prototype.onFocus=function(){this._renderer.onFocus()},x.prototype.onSelectionChanged=function(S,k,T){this._selectionState.start=S,this._selectionState.end=k,this._selectionState.columnSelectMode=T,this._renderer.onSelectionChanged(S,k,T)},x.prototype.onCursorMove=function(){this._renderer.onCursorMove()},x.prototype.clear=function(){this._renderer.clear()},d([h(3,_.IOptionsService),h(4,y.ICharSizeService),h(5,_.IBufferService)],x)}(p.Disposable);a.RenderService=b},9312:function(s,a,l){var c,u=this&&this.__extends||(c=function(D,R){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,A){N.__proto__=A}||function(N,A){for(var V in A)Object.prototype.hasOwnProperty.call(A,V)&&(N[V]=A[V])},c(D,R)},function(D,R){if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function N(){this.constructor=D}c(D,R),D.prototype=R===null?Object.create(R):(N.prototype=R.prototype,new N)}),d=this&&this.__decorate||function(D,R,N,A){var V,P=arguments.length,U=P<3?R:A===null?A=Object.getOwnPropertyDescriptor(R,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(D,R,N,A);else for(var F=D.length-1;F>=0;F--)(V=D[F])&&(U=(P<3?V(U):P>3?V(R,N,U):V(R,N))||U);return P>3&&U&&Object.defineProperty(R,N,U),U},h=this&&this.__param||function(D,R){return function(N,A){R(N,A,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;var f=l(6114),g=l(456),p=l(511),m=l(8460),v=l(4725),_=l(2585),y=l(9806),b=l(9504),w=l(844),x=l(4841),S=String.fromCharCode(160),k=new RegExp(S,"g"),T=function(D){function R(N,A,V,P,U,F,M,W){var j=D.call(this)||this;return j._element=N,j._screenElement=A,j._linkifier=V,j._bufferService=P,j._coreService=U,j._mouseService=F,j._optionsService=M,j._renderService=W,j._dragScrollAmount=0,j._enabled=!0,j._workCell=new p.CellData,j._mouseDownTimeStamp=0,j._oldHasSelection=!1,j._oldSelectionStart=void 0,j._oldSelectionEnd=void 0,j._onLinuxMouseSelection=j.register(new m.EventEmitter),j._onRedrawRequest=j.register(new m.EventEmitter),j._onSelectionChange=j.register(new m.EventEmitter),j._onRequestScrollLines=j.register(new m.EventEmitter),j._mouseMoveListener=function($){return j._onMouseMove($)},j._mouseUpListener=function($){return j._onMouseUp($)},j._coreService.onUserInput(function(){j.hasSelection&&j.clearSelection()}),j._trimListener=j._bufferService.buffer.lines.onTrim(function($){return j._onTrim($)}),j.register(j._bufferService.buffers.onBufferActivate(function($){return j._onBufferActivate($)})),j.enable(),j._model=new g.SelectionModel(j._bufferService),j._activeSelectionMode=0,j}return u(R,D),Object.defineProperty(R.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),R.prototype.dispose=function(){this._removeMouseDownListeners()},R.prototype.reset=function(){this.clearSelection()},R.prototype.disable=function(){this.clearSelection(),this._enabled=!1},R.prototype.enable=function(){this._enabled=!0},Object.defineProperty(R.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"hasSelection",{get:function(){var N=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!N||!A||N[0]===A[0]&&N[1]===A[1])},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"selectionText",{get:function(){var N=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;if(!N||!A)return"";var V=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(N[0]===A[0])return"";for(var U=N[1];U<=A[1];U++){var F=V.translateBufferLineToString(U,!0,N[0],A[0]);P.push(F)}}else{var M=N[1]===A[1]?A[0]:void 0;for(P.push(V.translateBufferLineToString(N[1],!0,N[0],M)),U=N[1]+1;U<=A[1]-1;U++){var W=V.lines.get(U);F=V.translateBufferLineToString(U,!0),(W==null?void 0:W.isWrapped)?P[P.length-1]+=F:P.push(F)}N[1]!==A[1]&&(W=V.lines.get(A[1]),F=V.translateBufferLineToString(A[1],!0,0,A[0]),W&&W.isWrapped?P[P.length-1]+=F:P.push(F))}return P.map(function(j){return j.replace(k," ")}).join(f.isWindows?`\r
|
|
2186
2186
|
`:`
|