@dao42/d42paas-front 0.5.20 → 0.5.22

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.
@@ -175167,7 +175167,6 @@ const Editor = ({
175167
175167
  }
175168
175168
  });
175169
175169
  }, [USERLISTSTORE.userList, file == null ? void 0 : file.path]);
175170
- console.log(file);
175171
175170
  return /* @__PURE__ */ jsxs(EditorLayout, {
175172
175171
  className: "editor-layout flex flex-col",
175173
175172
  children: [FileTreeStack.length > 0 ? /* @__PURE__ */ jsx("ul", {
@@ -182323,7 +182322,6 @@ const TerminalComponent = (_c2) => {
182323
182322
  const userLabel = document.createElement("div");
182324
182323
  userLabel.classList.add("xterm-helper-user-label");
182325
182324
  const [terminal, setTerminal] = react.exports.useState(null);
182326
- const io = useOT((state) => state.socket);
182327
182325
  const {
182328
182326
  CRDTInfo
182329
182327
  } = oTStore((state) => state);
@@ -182336,6 +182334,7 @@ const TerminalComponent = (_c2) => {
182336
182334
  terminal2.write(text2);
182337
182335
  };
182338
182336
  const onKey = (char2) => {
182337
+ var _a2, _b2;
182339
182338
  if (oTStore.getState().appStatus === "replay") {
182340
182339
  return;
182341
182340
  }
@@ -182349,7 +182348,7 @@ const TerminalComponent = (_c2) => {
182349
182348
  }
182350
182349
  }
182351
182350
  };
182352
- io.emit("terminal", JSON.stringify(crdt));
182351
+ (_b2 = (_a2 = useOT.getState()) == null ? void 0 : _a2.socket) == null ? void 0 : _b2.emit("terminal", JSON.stringify(crdt));
182353
182352
  };
182354
182353
  react.exports.useEffect(() => {
182355
182354
  if (!terminal) {
@@ -182358,22 +182357,23 @@ const TerminalComponent = (_c2) => {
182358
182357
  }
182359
182358
  }, []);
182360
182359
  react.exports.useEffect(() => {
182361
- var _a2;
182360
+ var _a2, _b2, _c3, _d3;
182362
182361
  if (!terminal)
182363
182362
  return;
182364
182363
  if (CRDTInfo.terminal) {
182365
- initTerminalText(terminal, ((_a2 = oTStore.getState().CRDTInfo.terminal.doc) == null ? void 0 : _a2.value) || "");
182364
+ initTerminalText(terminal, ((_d3 = (_c3 = (_b2 = (_a2 = oTStore.getState()) == null ? void 0 : _a2.CRDTInfo) == null ? void 0 : _b2.terminal) == null ? void 0 : _c3.doc) == null ? void 0 : _d3.value) || "");
182366
182365
  }
182367
182366
  }, [terminal]);
182368
182367
  react.exports.useEffect(() => {
182368
+ var _a2, _b2, _c3, _d3;
182369
182369
  const crdt = CRDTInfo.terminal;
182370
182370
  if (terminal && crdt) {
182371
- if (crdt.doc.action === "Get") {
182372
- initTerminalText(terminal, crdt.doc.value);
182371
+ if (((_a2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _a2.action) === "Get") {
182372
+ initTerminalText(terminal, (_b2 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _b2.value);
182373
182373
  return;
182374
182374
  }
182375
- writeText(terminal, crdt.doc.value || "");
182376
- const postUser = userListStore.getState().userList[CRDTInfo.userInfo.uuid];
182375
+ writeText(terminal, ((_c3 = crdt == null ? void 0 : crdt.doc) == null ? void 0 : _c3.value) || "");
182376
+ const postUser = userListStore.getState().userList[(_d3 = CRDTInfo == null ? void 0 : CRDTInfo.userInfo) == null ? void 0 : _d3.uuid];
182377
182377
  if (postUser && !IsMe(CRDTInfo.userInfo)) {
182378
182378
  const helperContainer = terminal._core._helperContainer;
182379
182379
  userLabel.innerText = postUser.name;
@@ -1591,14 +1591,14 @@ ${JSON.stringify(S,void 0,4)}`)});else if(g.changes)for(const S of Object.keys(g
1591
1591
  flex: 1;
1592
1592
  ${n=>n.userList.map(e=>"."+e.role+"{background:"+e.color+";width: 2px !important;}")}
1593
1593
  ${n=>n.userList.map(e=>"."+e.role+"-selection{background:"+e.color+"a6;color: #fff;width: 2px !important;}")}
1594
- `,owe=({doc:n,docType:e})=>{const t=Ae.exports.useRef(null);Ae.exports.useState(n||""),Ae.exports.useState(null);const i=yn(v=>v.doc),r=yn(v=>v.setFromServer),[o,s]=Ae.exports.useState(new th(0)),a=yn(v=>v),l=qC(v=>v),c=KI(v=>v.setPosition),u=KI(v=>v.setValue);KI(v=>v.setDelta);const[d,h]=Ae.exports.useState([]),g=v=>{var x,L,O,P;const{userInfo:w}=Qf.getState(),T=[[v.selection.startLineNumber,v.selection.startColumn,v.selection.endLineNumber,v.selection.endColumn,v.selection.selectionStartLineNumber,v.selection.selectionStartColumn,v.selection.positionColumn,v.selection.positionLineNumber],...v.secondarySelections.map(N=>[N.startLineNumber,N.startColumn,N.endLineNumber,N.endColumn,N.selectionStartLineNumber,N.selectionStartColumn,N.positionColumn,N.positionLineNumber])],I={timestamp:Date.now().toString(),selection:T,file:{action:"Update",path:(L=(x=yn.getState())==null?void 0:x.doc)==null?void 0:L.path},userInfo:Gf.exports.pick(w,"uuid","role")};(P=(O=Jd.getState())==null?void 0:O.socket)==null||P.emit("selection",JSON.stringify(I))},m=(v,w,T)=>(o.receiveOperation=w,{operation:w}),C=()=>{ra.onKeyDown(v=>{r(!1),v.keyCode===49&&(v.ctrlKey||v.metaKey)&&v.preventDefault()}),ra.onDidChangeCursorSelection(v=>{yn.getState().appStatus!=="replay"&&(v.source==="api"&&g(v),!(v.reason===0||v.source==="model")&&g(v))}),ra.onDidChangeModelContent(v=>{const{appStatus:w,fromServer:T,doc:I}=yn.getState();if(w==="replay"||T)return;const x=ra.getValue(),{isFlush:L,changes:O}=v;if(L)u(O[0].text);else{c(ra.getPosition());let P=0,N=0;const M=x.length-O.reduce((U,z,j)=>U-z.rangeLength+z.text.length,0),W=O.sort((U,z)=>U.rangeOffset-z.rangeOffset).map((U,z)=>(N+=z===0?0:U.rangeLength,P+=z===0?0:U.text.length,new kI().retain(z===0?U.rangeOffset:U.rangeOffset-N+P).delete(U.rangeLength).insert(U.text).retain(M-U.rangeOffset-U.rangeLength))).reduce((U,z)=>U.compose(z));qse((I==null?void 0:I.path)?I==null?void 0:I.path:"singleFile",ra.getValue()),o.applyClient(W)}}),ra.createContextKey("save",!0),ra.addCommand(lY.CtrlCmd|aY.KeyS,()=>{var T,I;const{doc:v,setFileSaved:w}=yn.getState();(I=(T=Jd.getState())==null?void 0:T.socket)==null||I.emit("saveFile",v==null?void 0:v.path),N0.message({type:"success",content:"\u4FDD\u5B58\u6210\u529F~~\u{1F918} \u2191\u2191\u2193\u2193\u2190\u2192\u2190\u2192ABAB",placement:"topCenter"})},"save"),o.sendOperation=function(v,w){var L,O;if(yn.getState().appStatus==="replay")return;const{userInfo:T}=Qf.getState(),{doc:I}=yn.getState(),x={timestamp:Date.now().toString(),userInfo:Gf.exports.pick(T,["role","uuid"]),editor:{operation:w,revision:v,evtType:"Editor"},file:{action:"Update",path:I==null?void 0:I.path}};(O=(L=Jd.getState())==null?void 0:L.socket)==null||O.emit("editFile",JSON.stringify(x))}},y=({value:v,path:w,language:T,CRDTInfo:I,doc:x})=>{let L=bg.getModels().find(O=>new RegExp(w).test(O.uri.path));L||(L=bg.createModel(v,T,cY.parse(`file://${eee}${w}`)),h([...d,{label:w,path:w,model:L}])),o.revision=I.editor.revision?I.editor.revision:0,ra.setModel(L),i&&(tee.set(i.path,{operation:[],revision:o.revision,value:i.value}),qse(x.path,i.value))},S=(v,w)=>{if(ok.register({id:"ruby",extensions:[".rb"],aliases:["ruby","RUBY"]}),ok.register({id:"java",extensions:[".java"],aliases:["java","JAVA"]}),ok.register({id:"typescript",extensions:[".ts"],aliases:["TypeScript","ts","TS","typescript"]}),w)return;PI.MonacoServices.install(mbt);const{lspUrl:T,ticket:I}=yn.getState().dockerInfo;if(!T)return;const x=new CAt(`wss://${T}/${I}`,[],{maxReconnectionDelay:1e4,minReconnectionDelay:1e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:1e4,maxRetries:1/0,debug:!1});tSe.listen({webSocket:x,onConnection:L=>{const P=new PI.MonacoLanguageClient({name:"Language Client",clientOptions:{documentSelector:["java","ruby"],errorHandler:{error:()=>PI.ErrorAction.Continue,closed:()=>PI.CloseAction.DoNotRestart}},connectionProvider:{get:(N,M)=>Promise.resolve(PI.createConnection(L,N,M))}}).start();L.onClose(()=>P.dispose())}})},b=v=>{const{CRDTInfo:w,setCRDTInfo:T}=yn.getState();T(Ki(Ht({},w),{file:{action:"Get",value:v.getValue(),path:v.uri.path.replace(eee,"")}})),a.switchDoc({value:v.getValue(),path:v.uri.path.replace(eee,"")})},A=()=>{if(t.current){bg.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"}}),ra=bg.create(t.current,{theme:"vs-dark",glyphMargin:!0,lightbulb:{enabled:!0}}),S(fwt,yn.getState().lspServerDisabled),C();const v=ra._codeEditorService,w=v.openCodeEditor.bind(v);v.openCodeEditor=async(T,I,x)=>{const L=await w(T,I);if(L===null){const O=bg.getModels().find(P=>new RegExp(T.resource.path).test(P.uri.path));b(O)}return L}}window.ot=Pbt};return Ae.exports.useEffect(()=>(A(),()=>{ra.dispose()}),[]),Ae.exports.useEffect(()=>{var x,L,O;const{CRDTInfo:v,doc:w,serverAck:T,appStatus:I}=yn.getState();if(KI.getState(),!(!v.editor||v.editor.evtType!=="Editor")&&ra&&((w==null?void 0:w.path)===((x=v==null?void 0:v.file)==null?void 0:x.path)||((L=v==null?void 0:v.file)==null?void 0:L.path)==="singleFile")){const P=v.editor.operation,N=m(v.editor.revision,kI.fromJSON(P),(O=v==null?void 0:v.file)==null?void 0:O.path);o.applyServer(N.operation);const{ops:M}=o.receiveOperation,W=ra.getModel();let U=0;const z=[];M.forEach(j=>{if(kI.isRetain(j)&&(U+=j),kI.isInsert(j)){const $=W.getPositionAt(U),G={forceMoveMarkers:!0,range:new rk($.lineNumber,$.column,$.lineNumber,$.column),text:j};z.push(G)}if(kI.isDelete(j)){const $=W.getPositionAt(U),G=W.getPositionAt(U-j);z.push({forceMoveMarkers:!1,range:new rk($.lineNumber,$.column,G.lineNumber,G.column),text:null}),U-=j}}),W.pushEditOperations([],z,null)}},[a.CRDTInfo]),Ae.exports.useEffect(()=>{var O,P;if(!ra)return;const{CRDTInfo:v,doc:w,serverAck:T,appStatus:I}=yn.getState(),{usersDelta:x,setUsersDelta:L}=KI.getState();ra.getModel(),(w==null?void 0:w.path)===((O=v==null?void 0:v.file)==null?void 0:O.path)&&(v.selection&&(x.forEach(N=>{let M;const W=document.querySelector(`.${N.role}-label`);M&&clearTimeout(M),W.classList.contains("label-visible")||W.classList.add("label-visible"),M=setTimeout(()=>{W.classList.remove("label-visible")},8e3),ra.layoutContentWidget(Ki(Ht({},N.label),{getPosition:function(){return{position:{lineNumber:v.selection[0][7],column:v.selection[0][6]},preference:[bg.ContentWidgetPositionPreference.ABOVE,bg.ContentWidgetPositionPreference.BELOW]}}}))}),L(x.map(N=>{var M;return N.uuid===v.userInfo.uuid?Ki(Ht({},N),{delta:ra.deltaDecorations(N.delta?N.delta:"",(M=v==null?void 0:v.selection)==null?void 0:M.map(W=>({range:new rk(W[0],W[1],W[2],W[3]),options:{isWholeLine:!1,className:W[5]===W[6]?N.role:"",inlineClassName:N.role+"-selection"}})))}):N}))),((P=v==null?void 0:v.editor)==null?void 0:P.evtType)==="Editor")},[a.CRDTInfo.selection]),Ae.exports.useEffect(()=>{},[a.fileSaved]),Ae.exports.useEffect(()=>{!ra||!i||(a.serverAck&&o.serverAck(),tee.set(i.path,Ki(Ht({},tee.get(i.path)),{operation:o.operation})))},[a.serverAck]),Ae.exports.useEffect(()=>{if(i){const v=/\.(\w+$)/gim.exec(i.path),{CRDTInfo:w,doc:T}=yn.getState();if(!ra||!WS(w.userInfo))return;i.path&&v&&y({value:i.value,path:i.path,language:VJ[v[1]],CRDTInfo:w,doc:T})}},[i==null?void 0:i.path]),Ae.exports.useEffect(()=>{},[e]),Ae.exports.useEffect(()=>{},[n,e]),Ae.exports.useEffect(()=>{const{usersDelta:v,setUsersDelta:w}=KI.getState();w(l.userList.filter(T=>!WS(T)).map(T=>Ki(Ht({},T),{label:{domNode:document.createElement("div"),getId:function(){return`label-${T.uuid}`},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.className=`monaco-label ${T.role}-label`,this.domNode.innerHTML=T.username,this.domNode.style.background=T.color,this.domNode.style.visibility="hidden"),this.domNode},getPosition:function(){return{position:{lineNumber:1,column:2},preference:[bg.ContentWidgetPositionPreference.ABOVE,bg.ContentWidgetPositionPreference.BELOW]}}}}))),ra&&v.forEach(T=>{document.querySelector(`.${T.role}-label`)||ra.addContentWidget(T.label)})},[l.userList,i==null?void 0:i.path]),console.log(i),Tn(gwt,{className:"editor-layout flex flex-col",children:[d.length>0?Ke("ul",{className:"bg-codezone-black stack-list flex flex-row items-center flex-shrink-0",children:d.map((v,w)=>Ke("li",{className:`flex flex-row justify-center items-center cursor-pointer ${v.path===(i==null?void 0:i.path)?"active":""}`,onClick:()=>{b(v.model)},children:v.label.substring(1)},w))}):null,Ke(pwt,{ref:t,userList:qC.getState().userList,className:"edito-content flex-1"})]})};var mwt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",Editor:owe}),iee={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(A,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,T){w.__proto__=T}||function(w,T){for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&(w[I]=T[I])},c(A,v)},function(A,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function w(){this.constructor=A}c(A,v),A.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)});Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;var d=l(9042),h=l(6114),g=l(9924),m=l(3656),C=l(844),y=l(5596),S=l(9631),b=function(A){function v(w,T){var I=A.call(this)||this;I._terminal=w,I._renderService=T,I._liveRegionLineCount=0,I._charsToConsume=[],I._charsToAnnounce="",I._accessibilityTreeRoot=document.createElement("div"),I._accessibilityTreeRoot.setAttribute("role","document"),I._accessibilityTreeRoot.classList.add("xterm-accessibility"),I._accessibilityTreeRoot.tabIndex=0,I._rowContainer=document.createElement("div"),I._rowContainer.setAttribute("role","list"),I._rowContainer.classList.add("xterm-accessibility-tree"),I._rowElements=[];for(var x=0;x<I._terminal.rows;x++)I._rowElements[x]=I._createAccessibilityTreeNode(),I._rowContainer.appendChild(I._rowElements[x]);if(I._topBoundaryFocusListener=function(L){return I._onBoundaryFocus(L,0)},I._bottomBoundaryFocusListener=function(L){return I._onBoundaryFocus(L,1)},I._rowElements[0].addEventListener("focus",I._topBoundaryFocusListener),I._rowElements[I._rowElements.length-1].addEventListener("focus",I._bottomBoundaryFocusListener),I._refreshRowsDimensions(),I._accessibilityTreeRoot.appendChild(I._rowContainer),I._renderRowsDebouncer=new g.TimeBasedDebouncer(I._renderRows.bind(I)),I._refreshRows(),I._liveRegion=document.createElement("div"),I._liveRegion.classList.add("live-region"),I._liveRegion.setAttribute("aria-live","assertive"),I._accessibilityTreeRoot.appendChild(I._liveRegion),!I._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return I._terminal.element.insertAdjacentElement("afterbegin",I._accessibilityTreeRoot),I.register(I._renderRowsDebouncer),I.register(I._terminal.onResize(function(L){return I._onResize(L.rows)})),I.register(I._terminal.onRender(function(L){return I._refreshRows(L.start,L.end)})),I.register(I._terminal.onScroll(function(){return I._refreshRows()})),I.register(I._terminal.onA11yChar(function(L){return I._onChar(L)})),I.register(I._terminal.onLineFeed(function(){return I._onChar(`
1594
+ `,owe=({doc:n,docType:e})=>{const t=Ae.exports.useRef(null);Ae.exports.useState(n||""),Ae.exports.useState(null);const i=yn(v=>v.doc),r=yn(v=>v.setFromServer),[o,s]=Ae.exports.useState(new th(0)),a=yn(v=>v),l=qC(v=>v),c=KI(v=>v.setPosition),u=KI(v=>v.setValue);KI(v=>v.setDelta);const[d,h]=Ae.exports.useState([]),g=v=>{var x,L,O,P;const{userInfo:w}=Qf.getState(),T=[[v.selection.startLineNumber,v.selection.startColumn,v.selection.endLineNumber,v.selection.endColumn,v.selection.selectionStartLineNumber,v.selection.selectionStartColumn,v.selection.positionColumn,v.selection.positionLineNumber],...v.secondarySelections.map(N=>[N.startLineNumber,N.startColumn,N.endLineNumber,N.endColumn,N.selectionStartLineNumber,N.selectionStartColumn,N.positionColumn,N.positionLineNumber])],I={timestamp:Date.now().toString(),selection:T,file:{action:"Update",path:(L=(x=yn.getState())==null?void 0:x.doc)==null?void 0:L.path},userInfo:Gf.exports.pick(w,"uuid","role")};(P=(O=Jd.getState())==null?void 0:O.socket)==null||P.emit("selection",JSON.stringify(I))},m=(v,w,T)=>(o.receiveOperation=w,{operation:w}),C=()=>{ra.onKeyDown(v=>{r(!1),v.keyCode===49&&(v.ctrlKey||v.metaKey)&&v.preventDefault()}),ra.onDidChangeCursorSelection(v=>{yn.getState().appStatus!=="replay"&&(v.source==="api"&&g(v),!(v.reason===0||v.source==="model")&&g(v))}),ra.onDidChangeModelContent(v=>{const{appStatus:w,fromServer:T,doc:I}=yn.getState();if(w==="replay"||T)return;const x=ra.getValue(),{isFlush:L,changes:O}=v;if(L)u(O[0].text);else{c(ra.getPosition());let P=0,N=0;const M=x.length-O.reduce((U,z,j)=>U-z.rangeLength+z.text.length,0),W=O.sort((U,z)=>U.rangeOffset-z.rangeOffset).map((U,z)=>(N+=z===0?0:U.rangeLength,P+=z===0?0:U.text.length,new kI().retain(z===0?U.rangeOffset:U.rangeOffset-N+P).delete(U.rangeLength).insert(U.text).retain(M-U.rangeOffset-U.rangeLength))).reduce((U,z)=>U.compose(z));qse((I==null?void 0:I.path)?I==null?void 0:I.path:"singleFile",ra.getValue()),o.applyClient(W)}}),ra.createContextKey("save",!0),ra.addCommand(lY.CtrlCmd|aY.KeyS,()=>{var T,I;const{doc:v,setFileSaved:w}=yn.getState();(I=(T=Jd.getState())==null?void 0:T.socket)==null||I.emit("saveFile",v==null?void 0:v.path),N0.message({type:"success",content:"\u4FDD\u5B58\u6210\u529F~~\u{1F918} \u2191\u2191\u2193\u2193\u2190\u2192\u2190\u2192ABAB",placement:"topCenter"})},"save"),o.sendOperation=function(v,w){var L,O;if(yn.getState().appStatus==="replay")return;const{userInfo:T}=Qf.getState(),{doc:I}=yn.getState(),x={timestamp:Date.now().toString(),userInfo:Gf.exports.pick(T,["role","uuid"]),editor:{operation:w,revision:v,evtType:"Editor"},file:{action:"Update",path:I==null?void 0:I.path}};(O=(L=Jd.getState())==null?void 0:L.socket)==null||O.emit("editFile",JSON.stringify(x))}},y=({value:v,path:w,language:T,CRDTInfo:I,doc:x})=>{let L=bg.getModels().find(O=>new RegExp(w).test(O.uri.path));L||(L=bg.createModel(v,T,cY.parse(`file://${eee}${w}`)),h([...d,{label:w,path:w,model:L}])),o.revision=I.editor.revision?I.editor.revision:0,ra.setModel(L),i&&(tee.set(i.path,{operation:[],revision:o.revision,value:i.value}),qse(x.path,i.value))},S=(v,w)=>{if(ok.register({id:"ruby",extensions:[".rb"],aliases:["ruby","RUBY"]}),ok.register({id:"java",extensions:[".java"],aliases:["java","JAVA"]}),ok.register({id:"typescript",extensions:[".ts"],aliases:["TypeScript","ts","TS","typescript"]}),w)return;PI.MonacoServices.install(mbt);const{lspUrl:T,ticket:I}=yn.getState().dockerInfo;if(!T)return;const x=new CAt(`wss://${T}/${I}`,[],{maxReconnectionDelay:1e4,minReconnectionDelay:1e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:1e4,maxRetries:1/0,debug:!1});tSe.listen({webSocket:x,onConnection:L=>{const P=new PI.MonacoLanguageClient({name:"Language Client",clientOptions:{documentSelector:["java","ruby"],errorHandler:{error:()=>PI.ErrorAction.Continue,closed:()=>PI.CloseAction.DoNotRestart}},connectionProvider:{get:(N,M)=>Promise.resolve(PI.createConnection(L,N,M))}}).start();L.onClose(()=>P.dispose())}})},b=v=>{const{CRDTInfo:w,setCRDTInfo:T}=yn.getState();T(Ki(Ht({},w),{file:{action:"Get",value:v.getValue(),path:v.uri.path.replace(eee,"")}})),a.switchDoc({value:v.getValue(),path:v.uri.path.replace(eee,"")})},A=()=>{if(t.current){bg.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"}}),ra=bg.create(t.current,{theme:"vs-dark",glyphMargin:!0,lightbulb:{enabled:!0}}),S(fwt,yn.getState().lspServerDisabled),C();const v=ra._codeEditorService,w=v.openCodeEditor.bind(v);v.openCodeEditor=async(T,I,x)=>{const L=await w(T,I);if(L===null){const O=bg.getModels().find(P=>new RegExp(T.resource.path).test(P.uri.path));b(O)}return L}}window.ot=Pbt};return Ae.exports.useEffect(()=>(A(),()=>{ra.dispose()}),[]),Ae.exports.useEffect(()=>{var x,L,O;const{CRDTInfo:v,doc:w,serverAck:T,appStatus:I}=yn.getState();if(KI.getState(),!(!v.editor||v.editor.evtType!=="Editor")&&ra&&((w==null?void 0:w.path)===((x=v==null?void 0:v.file)==null?void 0:x.path)||((L=v==null?void 0:v.file)==null?void 0:L.path)==="singleFile")){const P=v.editor.operation,N=m(v.editor.revision,kI.fromJSON(P),(O=v==null?void 0:v.file)==null?void 0:O.path);o.applyServer(N.operation);const{ops:M}=o.receiveOperation,W=ra.getModel();let U=0;const z=[];M.forEach(j=>{if(kI.isRetain(j)&&(U+=j),kI.isInsert(j)){const $=W.getPositionAt(U),G={forceMoveMarkers:!0,range:new rk($.lineNumber,$.column,$.lineNumber,$.column),text:j};z.push(G)}if(kI.isDelete(j)){const $=W.getPositionAt(U),G=W.getPositionAt(U-j);z.push({forceMoveMarkers:!1,range:new rk($.lineNumber,$.column,G.lineNumber,G.column),text:null}),U-=j}}),W.pushEditOperations([],z,null)}},[a.CRDTInfo]),Ae.exports.useEffect(()=>{var O,P;if(!ra)return;const{CRDTInfo:v,doc:w,serverAck:T,appStatus:I}=yn.getState(),{usersDelta:x,setUsersDelta:L}=KI.getState();ra.getModel(),(w==null?void 0:w.path)===((O=v==null?void 0:v.file)==null?void 0:O.path)&&(v.selection&&(x.forEach(N=>{let M;const W=document.querySelector(`.${N.role}-label`);M&&clearTimeout(M),W.classList.contains("label-visible")||W.classList.add("label-visible"),M=setTimeout(()=>{W.classList.remove("label-visible")},8e3),ra.layoutContentWidget(Ki(Ht({},N.label),{getPosition:function(){return{position:{lineNumber:v.selection[0][7],column:v.selection[0][6]},preference:[bg.ContentWidgetPositionPreference.ABOVE,bg.ContentWidgetPositionPreference.BELOW]}}}))}),L(x.map(N=>{var M;return N.uuid===v.userInfo.uuid?Ki(Ht({},N),{delta:ra.deltaDecorations(N.delta?N.delta:"",(M=v==null?void 0:v.selection)==null?void 0:M.map(W=>({range:new rk(W[0],W[1],W[2],W[3]),options:{isWholeLine:!1,className:W[5]===W[6]?N.role:"",inlineClassName:N.role+"-selection"}})))}):N}))),((P=v==null?void 0:v.editor)==null?void 0:P.evtType)==="Editor")},[a.CRDTInfo.selection]),Ae.exports.useEffect(()=>{},[a.fileSaved]),Ae.exports.useEffect(()=>{!ra||!i||(a.serverAck&&o.serverAck(),tee.set(i.path,Ki(Ht({},tee.get(i.path)),{operation:o.operation})))},[a.serverAck]),Ae.exports.useEffect(()=>{if(i){const v=/\.(\w+$)/gim.exec(i.path),{CRDTInfo:w,doc:T}=yn.getState();if(!ra||!WS(w.userInfo))return;i.path&&v&&y({value:i.value,path:i.path,language:VJ[v[1]],CRDTInfo:w,doc:T})}},[i==null?void 0:i.path]),Ae.exports.useEffect(()=>{},[e]),Ae.exports.useEffect(()=>{},[n,e]),Ae.exports.useEffect(()=>{const{usersDelta:v,setUsersDelta:w}=KI.getState();w(l.userList.filter(T=>!WS(T)).map(T=>Ki(Ht({},T),{label:{domNode:document.createElement("div"),getId:function(){return`label-${T.uuid}`},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.className=`monaco-label ${T.role}-label`,this.domNode.innerHTML=T.username,this.domNode.style.background=T.color,this.domNode.style.visibility="hidden"),this.domNode},getPosition:function(){return{position:{lineNumber:1,column:2},preference:[bg.ContentWidgetPositionPreference.ABOVE,bg.ContentWidgetPositionPreference.BELOW]}}}}))),ra&&v.forEach(T=>{document.querySelector(`.${T.role}-label`)||ra.addContentWidget(T.label)})},[l.userList,i==null?void 0:i.path]),Tn(gwt,{className:"editor-layout flex flex-col",children:[d.length>0?Ke("ul",{className:"bg-codezone-black stack-list flex flex-row items-center flex-shrink-0",children:d.map((v,w)=>Ke("li",{className:`flex flex-row justify-center items-center cursor-pointer ${v.path===(i==null?void 0:i.path)?"active":""}`,onClick:()=>{b(v.model)},children:v.label.substring(1)},w))}):null,Ke(pwt,{ref:t,userList:qC.getState().userList,className:"edito-content flex-1"})]})};var mwt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",Editor:owe}),iee={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(A,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,T){w.__proto__=T}||function(w,T){for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&(w[I]=T[I])},c(A,v)},function(A,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function w(){this.constructor=A}c(A,v),A.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)});Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;var d=l(9042),h=l(6114),g=l(9924),m=l(3656),C=l(844),y=l(5596),S=l(9631),b=function(A){function v(w,T){var I=A.call(this)||this;I._terminal=w,I._renderService=T,I._liveRegionLineCount=0,I._charsToConsume=[],I._charsToAnnounce="",I._accessibilityTreeRoot=document.createElement("div"),I._accessibilityTreeRoot.setAttribute("role","document"),I._accessibilityTreeRoot.classList.add("xterm-accessibility"),I._accessibilityTreeRoot.tabIndex=0,I._rowContainer=document.createElement("div"),I._rowContainer.setAttribute("role","list"),I._rowContainer.classList.add("xterm-accessibility-tree"),I._rowElements=[];for(var x=0;x<I._terminal.rows;x++)I._rowElements[x]=I._createAccessibilityTreeNode(),I._rowContainer.appendChild(I._rowElements[x]);if(I._topBoundaryFocusListener=function(L){return I._onBoundaryFocus(L,0)},I._bottomBoundaryFocusListener=function(L){return I._onBoundaryFocus(L,1)},I._rowElements[0].addEventListener("focus",I._topBoundaryFocusListener),I._rowElements[I._rowElements.length-1].addEventListener("focus",I._bottomBoundaryFocusListener),I._refreshRowsDimensions(),I._accessibilityTreeRoot.appendChild(I._rowContainer),I._renderRowsDebouncer=new g.TimeBasedDebouncer(I._renderRows.bind(I)),I._refreshRows(),I._liveRegion=document.createElement("div"),I._liveRegion.classList.add("live-region"),I._liveRegion.setAttribute("aria-live","assertive"),I._accessibilityTreeRoot.appendChild(I._liveRegion),!I._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return I._terminal.element.insertAdjacentElement("afterbegin",I._accessibilityTreeRoot),I.register(I._renderRowsDebouncer),I.register(I._terminal.onResize(function(L){return I._onResize(L.rows)})),I.register(I._terminal.onRender(function(L){return I._refreshRows(L.start,L.end)})),I.register(I._terminal.onScroll(function(){return I._refreshRows()})),I.register(I._terminal.onA11yChar(function(L){return I._onChar(L)})),I.register(I._terminal.onLineFeed(function(){return I._onChar(`
1595
1595
  `)})),I.register(I._terminal.onA11yTab(function(L){return I._onTab(L)})),I.register(I._terminal.onKey(function(L){return I._onKey(L.key)})),I.register(I._terminal.onBlur(function(){return I._clearLiveRegion()})),I.register(I._renderService.onDimensionsChange(function(){return I._refreshRowsDimensions()})),I._screenDprMonitor=new y.ScreenDprMonitor,I.register(I._screenDprMonitor),I._screenDprMonitor.setListener(function(){return I._refreshRowsDimensions()}),I.register((0,m.addDisposableDomListener)(window,"resize",function(){return I._refreshRowsDimensions()})),I}return u(v,A),v.prototype.dispose=function(){A.prototype.dispose.call(this),(0,S.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},v.prototype._onBoundaryFocus=function(w,T){var I=w.target,x=this._rowElements[T===0?1:this._rowElements.length-2];if(I.getAttribute("aria-posinset")!==(T===0?"1":""+this._terminal.buffer.lines.length)&&w.relatedTarget===x){var L,O;if(T===0?(L=I,O=this._rowElements.pop(),this._rowContainer.removeChild(O)):(L=this._rowElements.shift(),O=I,this._rowContainer.removeChild(L)),L.removeEventListener("focus",this._topBoundaryFocusListener),O.removeEventListener("focus",this._bottomBoundaryFocusListener),T===0){var P=this._createAccessibilityTreeNode();this._rowElements.unshift(P),this._rowContainer.insertAdjacentElement("afterbegin",P)}else P=this._createAccessibilityTreeNode(),this._rowElements.push(P),this._rowContainer.appendChild(P);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(T===0?-1:1),this._rowElements[T===0?1:this._rowElements.length-2].focus(),w.preventDefault(),w.stopImmediatePropagation()}},v.prototype._onResize=function(w){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var T=this._rowContainer.children.length;T<this._terminal.rows;T++)this._rowElements[T]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[T]);for(;this._rowElements.length>w;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},v.prototype._createAccessibilityTreeNode=function(){var w=document.createElement("div");return w.setAttribute("role","listitem"),w.tabIndex=-1,this._refreshRowDimensions(w),w},v.prototype._onTab=function(w){for(var T=0;T<w;T++)this._onChar(" ")},v.prototype._onChar=function(w){var T=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==w&&(this._charsToAnnounce+=w):this._charsToAnnounce+=w,w===`
1596
1596
  `&&(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(){T._accessibilityTreeRoot.appendChild(T._liveRegion)},0))},v.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,h.isMac&&(0,S.removeElementFromParent)(this._liveRegion)},v.prototype._onKey=function(w){this._clearLiveRegion(),this._charsToConsume.push(w)},v.prototype._refreshRows=function(w,T){this._renderRowsDebouncer.refresh(w,T,this._terminal.rows)},v.prototype._renderRows=function(w,T){for(var I=this._terminal.buffer,x=I.lines.length.toString(),L=w;L<=T;L++){var O=I.translateBufferLineToString(I.ydisp+L,!0),P=(I.ydisp+L+1).toString(),N=this._rowElements[L];N&&(O.length===0?N.innerText="\xA0":N.textContent=O,N.setAttribute("aria-posinset",P),N.setAttribute("aria-setsize",x))}this._announceCharacters()},v.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])}},v.prototype._refreshRowDimensions=function(w){w.style.height=this._renderService.dimensions.actualCellHeight+"px"},v.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},v}(C.Disposable);a.AccessibilityManager=b},3614:(s,a)=>{function l(h){return h.replace(/\r?\n/g,"\r")}function c(h,g){return g?"[200~"+h+"[201~":h}function u(h,g,m){h=c(h=l(h),m.decPrivateModes.bracketedPasteMode),m.triggerDataEvent(h,!0),g.value=""}function d(h,g,m){var C=m.getBoundingClientRect(),y=h.clientX-C.left-10,S=h.clientY-C.top-10;g.style.width="20px",g.style.height="20px",g.style.left=y+"px",g.style.top=S+"px",g.style.zIndex="1000",g.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,g){h.clipboardData&&h.clipboardData.setData("text/plain",g.selectionText),h.preventDefault()},a.handlePasteEvent=function(h,g,m){h.stopPropagation(),h.clipboardData&&u(h.clipboardData.getData("text/plain"),g,m)},a.paste=u,a.moveTextAreaUnderMouseCursor=d,a.rightClickHandler=function(h,g,m,C,y){d(h,g,m),y&&C.rightClickSelect(h),g.value=C.selectionText,g.select()}},4774:(s,a)=>{var l,c,u,d;function h(m){var C=m.toString(16);return C.length<2?"0"+C:C}function g(m,C){return m<C?(C+.05)/(m+.05):(m+.05)/(C+.05)}Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=void 0,function(m){m.toCss=function(C,y,S,b){return b!==void 0?"#"+h(C)+h(y)+h(S)+h(b):"#"+h(C)+h(y)+h(S)},m.toRgba=function(C,y,S,b){return b===void 0&&(b=255),(C<<24|y<<16|S<<8|b)>>>0}}(l=a.channels||(a.channels={})),(c=a.color||(a.color={})).blend=function(m,C){var y=(255&C.rgba)/255;if(y===1)return{css:C.css,rgba:C.rgba};var S=C.rgba>>24&255,b=C.rgba>>16&255,A=C.rgba>>8&255,v=m.rgba>>24&255,w=m.rgba>>16&255,T=m.rgba>>8&255,I=v+Math.round((S-v)*y),x=w+Math.round((b-w)*y),L=T+Math.round((A-T)*y);return{css:l.toCss(I,x,L),rgba:l.toRgba(I,x,L)}},c.isOpaque=function(m){return(255&m.rgba)==255},c.ensureContrastRatio=function(m,C,y){var S=d.ensureContrastRatio(m.rgba,C.rgba,y);if(S)return d.toColor(S>>24&255,S>>16&255,S>>8&255)},c.opaque=function(m){var C=(255|m.rgba)>>>0,y=d.toChannels(C),S=y[0],b=y[1],A=y[2];return{css:l.toCss(S,b,A),rgba:C}},c.opacity=function(m,C){var y=Math.round(255*C),S=d.toChannels(m.rgba),b=S[0],A=S[1],v=S[2];return{css:l.toCss(b,A,v,y),rgba:l.toRgba(b,A,v,y)}},c.toColorRGB=function(m){return[m.rgba>>24&255,m.rgba>>16&255,m.rgba>>8&255]},(a.css||(a.css={})).toColor=function(m){switch(m.length){case 7:return{css:m,rgba:(parseInt(m.slice(1),16)<<8|255)>>>0};case 9:return{css:m,rgba:parseInt(m.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(m){function C(y,S,b){var A=y/255,v=S/255,w=b/255;return .2126*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.7152*(v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4))+.0722*(w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4))}m.relativeLuminance=function(y){return C(y>>16&255,y>>8&255,255&y)},m.relativeLuminance2=C}(u=a.rgb||(a.rgb={})),function(m){function C(S,b,A){for(var v=S>>24&255,w=S>>16&255,T=S>>8&255,I=b>>24&255,x=b>>16&255,L=b>>8&255,O=g(u.relativeLuminance2(I,L,x),u.relativeLuminance2(v,w,T));O<A&&(I>0||x>0||L>0);)I-=Math.max(0,Math.ceil(.1*I)),x-=Math.max(0,Math.ceil(.1*x)),L-=Math.max(0,Math.ceil(.1*L)),O=g(u.relativeLuminance2(I,L,x),u.relativeLuminance2(v,w,T));return(I<<24|x<<16|L<<8|255)>>>0}function y(S,b,A){for(var v=S>>24&255,w=S>>16&255,T=S>>8&255,I=b>>24&255,x=b>>16&255,L=b>>8&255,O=g(u.relativeLuminance2(I,L,x),u.relativeLuminance2(v,w,T));O<A&&(I<255||x<255||L<255);)I=Math.min(255,I+Math.ceil(.1*(255-I))),x=Math.min(255,x+Math.ceil(.1*(255-x))),L=Math.min(255,L+Math.ceil(.1*(255-L))),O=g(u.relativeLuminance2(I,L,x),u.relativeLuminance2(v,w,T));return(I<<24|x<<16|L<<8|255)>>>0}m.ensureContrastRatio=function(S,b,A){var v=u.relativeLuminance(S>>8),w=u.relativeLuminance(b>>8);if(g(v,w)<A)return w<v?C(S,b,A):y(S,b,A)},m.reduceLuminance=C,m.increaseLuminance=y,m.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]},m.toColor=function(S,b,A){return{css:l.toCss(S,b,A),rgba:l.toRgba(S,b,A)}}}(d=a.rgba||(a.rgba={})),a.toPaddedHex=h,a.contrastRatio=g},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(b,A,v){if(v||arguments.length===2)for(var w,T=0,I=A.length;T<I;T++)!w&&T in A||(w||(w=Array.prototype.slice.call(A,0,T)),w[T]=A[T]);return b.concat(w||Array.prototype.slice.call(A))};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"),g=u.css.toColor("#000000"),m=u.css.toColor("#ffffff"),C=u.css.toColor("#000000"),y={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var b=[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")],A=[0,95,135,175,215,255],v=0;v<216;v++){var w=A[v/36%6|0],T=A[v/6%6|0],I=A[v%6];b.push({css:u.channels.toCss(w,T,I),rgba:u.channels.toRgba(w,T,I)})}for(v=0;v<24;v++){var x=8+10*v;b.push({css:u.channels.toCss(x,x,x),rgba:u.channels.toRgba(x,x,x)})}return b}());var S=function(){function b(A,v){this.allowTransparency=v;var w=A.createElement("canvas");w.width=1,w.height=1;var T=w.getContext("2d");if(!T)throw new Error("Could not get rendering context");this._ctx=T,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new d.ColorContrastCache,this.colors={foreground:h,background:g,cursor:m,cursorAccent:C,selectionTransparent:y,selectionOpaque:u.color.blend(g,y),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return b.prototype.onOptionsChange=function(A){A==="minimumContrastRatio"&&this._contrastCache.clear()},b.prototype.setTheme=function(A){A===void 0&&(A={}),this.colors.foreground=this._parseColor(A.foreground,h),this.colors.background=this._parseColor(A.background,g),this.colors.cursor=this._parseColor(A.cursor,m,!0),this.colors.cursorAccent=this._parseColor(A.cursorAccent,C,!0),this.colors.selectionTransparent=this._parseColor(A.selection,y,!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(A.black,a.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(A.red,a.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(A.green,a.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(A.yellow,a.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(A.blue,a.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(A.magenta,a.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(A.cyan,a.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(A.white,a.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(A.brightBlack,a.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(A.brightRed,a.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(A.brightGreen,a.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(A.brightYellow,a.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(A.brightBlue,a.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(A.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(A.brightCyan,a.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(A.brightWhite,a.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},b.prototype.restoreColor=function(A){if(A!==void 0)switch(A){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[A]=this._restoreColors.ansi[A]}else for(var v=0;v<this._restoreColors.ansi.length;++v)this.colors.ansi[v]=this._restoreColors.ansi[v]},b.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:c([],this.colors.ansi,!0)}},b.prototype._parseColor=function(A,v,w){if(w===void 0&&(w=this.allowTransparency),A===void 0)return v;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=A,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+A+" is invalid using fallback "+v.css),v;this._ctx.fillRect(0,0,1,1);var T=this._ctx.getImageData(0,0,1,1).data;if(T[3]!==255){if(!w)return console.warn("Color: "+A+" is using transparency, but allowTransparency is false. Using fallback "+v.css+"."),v;var I=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(M){return Number(M)}),x=I[0],L=I[1],O=I[2],P=I[3],N=Math.round(255*P);return{rgba:u.channels.toRgba(x,L,O,N),css:A}}return{css:this._ctx.fillStyle,rgba:u.channels.toRgba(T[0],T[1],T[2],T[3])}},b}();a.ColorManager=S},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 g=h[d];(l=g==null?void 0:g.parentElement)===null||l===void 0||l.removeChild(g)}}},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(C,y,S,b){var A,v=arguments.length,w=v<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(C,y,S,b);else for(var T=C.length-1;T>=0;T--)(A=C[T])&&(w=(v<3?A(w):v>3?A(y,S,w):A(y,S))||w);return v>3&&w&&Object.defineProperty(y,S,w),w},u=this&&this.__param||function(C,y){return function(S,b){y(S,b,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZone=a.Linkifier=void 0;var d=l(8460),h=l(2585),g=function(){function C(y,S,b){this._bufferService=y,this._logService=S,this._unicodeService=b,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(C.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),C.prototype.attachToDom=function(y,S){this._element=y,this._mouseZoneManager=S},C.prototype.linkifyRows=function(y,S){var b=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=y,this._rowsToLinkify.end=S):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,y),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,S)),this._mouseZoneManager.clearAll(y,S),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return b._linkifyRows()},C._timeBeforeLatency))},C.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var y=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var S=y.ydisp+this._rowsToLinkify.start;if(!(S>=y.lines.length)){for(var b=y.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,A=Math.ceil(2e3/this._bufferService.cols),v=this._bufferService.buffer.iterator(!1,S,b,A,A);v.hasNext();)for(var w=v.next(),T=0;T<this._linkMatchers.length;T++)this._doLinkifyRow(w.range.first,w.content,this._linkMatchers[T]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},C.prototype.registerLinkMatcher=function(y,S,b){if(b===void 0&&(b={}),!S)throw new Error("handler must be defined");var A={id:this._nextLinkMatcherId++,regex:y,handler:S,matchIndex:b.matchIndex,validationCallback:b.validationCallback,hoverTooltipCallback:b.tooltipCallback,hoverLeaveCallback:b.leaveCallback,willLinkActivate:b.willLinkActivate,priority:b.priority||0};return this._addLinkMatcherToList(A),A.id},C.prototype._addLinkMatcherToList=function(y){if(this._linkMatchers.length!==0){for(var S=this._linkMatchers.length-1;S>=0;S--)if(y.priority<=this._linkMatchers[S].priority)return void this._linkMatchers.splice(S+1,0,y);this._linkMatchers.splice(0,0,y)}else this._linkMatchers.push(y)},C.prototype.deregisterLinkMatcher=function(y){for(var S=0;S<this._linkMatchers.length;S++)if(this._linkMatchers[S].id===y)return this._linkMatchers.splice(S,1),!0;return!1},C.prototype._doLinkifyRow=function(y,S,b){for(var A,v=this,w=new RegExp(b.regex.source,(b.regex.flags||"")+"g"),T=-1,I=function(){var L=A[typeof b.matchIndex!="number"?0:b.matchIndex];if(!L)return x._logService.debug("match found without corresponding matchIndex",A,b),"break";if(T=S.indexOf(L,T+1),w.lastIndex=T+L.length,T<0)return"break";var O=x._bufferService.buffer.stringIndexToBufferIndex(y,T);if(O[0]<0)return"break";var P=x._bufferService.buffer.lines.get(O[0]);if(!P)return"break";var N=P.getFg(O[1]),M=N?N>>9&511:void 0;b.validationCallback?b.validationCallback(L,function(W){v._rowsTimeoutId||W&&v._addLink(O[1],O[0]-v._bufferService.buffer.ydisp,L,b,M)}):x._addLink(O[1],O[0]-x._bufferService.buffer.ydisp,L,b,M)},x=this;(A=w.exec(S))!==null&&I()!=="break";);},C.prototype._addLink=function(y,S,b,A,v){var w=this;if(this._mouseZoneManager&&this._element){var T=this._unicodeService.getStringCellWidth(b),I=y%this._bufferService.cols,x=S+Math.floor(y/this._bufferService.cols),L=(I+T)%this._bufferService.cols,O=x+Math.floor((I+T)/this._bufferService.cols);L===0&&(L=this._bufferService.cols,O--),this._mouseZoneManager.add(new m(I+1,x+1,L+1,O+1,function(P){if(A.handler)return A.handler(P,b);var N=window.open();N?(N.opener=null,N.location.href=b):console.warn("Opening link blocked as opener could not be cleared")},function(){w._onShowLinkUnderline.fire(w._createLinkHoverEvent(I,x,L,O,v)),w._element.classList.add("xterm-cursor-pointer")},function(P){w._onLinkTooltip.fire(w._createLinkHoverEvent(I,x,L,O,v)),A.hoverTooltipCallback&&A.hoverTooltipCallback(P,b,{start:{x:I,y:x},end:{x:L,y:O}})},function(){w._onHideLinkUnderline.fire(w._createLinkHoverEvent(I,x,L,O,v)),w._element.classList.remove("xterm-cursor-pointer"),A.hoverLeaveCallback&&A.hoverLeaveCallback()},function(P){return!A.willLinkActivate||A.willLinkActivate(P,b)}))}},C.prototype._createLinkHoverEvent=function(y,S,b,A,v){return{x1:y,y1:S,x2:b,y2:A,cols:this._bufferService.cols,fg:v}},C._timeBeforeLatency=200,C=c([u(0,h.IBufferService),u(1,h.ILogService),u(2,h.IUnicodeService)],C)}();a.Linkifier=g;var m=function(C,y,S,b,A,v,w,T,I){this.x1=C,this.y1=y,this.x2=S,this.y2=b,this.clickCallback=A,this.hoverCallback=v,this.tooltipCallback=w,this.leaveCallback=T,this.willLinkActivate=I};a.MouseZone=m},6465:function(s,a,l){var c,u=this&&this.__extends||(c=function(b,A){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(v[T]=w[T])},c(b,A)},function(b,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function v(){this.constructor=b}c(b,A),b.prototype=A===null?Object.create(A):(v.prototype=A.prototype,new v)}),d=this&&this.__decorate||function(b,A,v,w){var T,I=arguments.length,x=I<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(b,A,v,w);else for(var L=b.length-1;L>=0;L--)(T=b[L])&&(x=(I<3?T(x):I>3?T(A,v,x):T(A,v))||x);return I>3&&x&&Object.defineProperty(A,v,x),x},h=this&&this.__param||function(b,A){return function(v,w){A(v,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier2=void 0;var g=l(2585),m=l(8460),C=l(844),y=l(3656),S=function(b){function A(v){var w=b.call(this)||this;return w._bufferService=v,w._linkProviders=[],w._linkCacheDisposables=[],w._isMouseOut=!0,w._activeLine=-1,w._onShowLinkUnderline=w.register(new m.EventEmitter),w._onHideLinkUnderline=w.register(new m.EventEmitter),w.register((0,C.getDisposeArrayDisposable)(w._linkCacheDisposables)),w}return u(A,b),Object.defineProperty(A.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),A.prototype.registerLinkProvider=function(v){var w=this;return this._linkProviders.push(v),{dispose:function(){var T=w._linkProviders.indexOf(v);T!==-1&&w._linkProviders.splice(T,1)}}},A.prototype.attachToDom=function(v,w,T){var I=this;this._element=v,this._mouseService=w,this._renderService=T,this.register((0,y.addDisposableDomListener)(this._element,"mouseleave",function(){I._isMouseOut=!0,I._clearCurrentLink()})),this.register((0,y.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,y.addDisposableDomListener)(this._element,"click",this._onClick.bind(this)))},A.prototype._onMouseMove=function(v){if(this._lastMouseEvent=v,this._element&&this._mouseService){var w=this._positionFromMouseEvent(v,this._element,this._mouseService);if(w){this._isMouseOut=!1;for(var T=v.composedPath(),I=0;I<T.length;I++){var x=T[I];if(x.classList.contains("xterm"))break;if(x.classList.contains("xterm-hover"))return}this._lastBufferCell&&w.x===this._lastBufferCell.x&&w.y===this._lastBufferCell.y||(this._onHover(w),this._lastBufferCell=w)}}},A.prototype._onHover=function(v){if(this._activeLine!==v.y)return this._clearCurrentLink(),void this._askForLink(v,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,v)||(this._clearCurrentLink(),this._askForLink(v,!0))},A.prototype._askForLink=function(v,w){var T,I=this;this._activeProviderReplies&&w||((T=this._activeProviderReplies)===null||T===void 0||T.forEach(function(L){L==null||L.forEach(function(O){O.link.dispose&&O.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=v.y);var x=!1;this._linkProviders.forEach(function(L,O){var P;w?((P=I._activeProviderReplies)===null||P===void 0?void 0:P.get(O))&&(x=I._checkLinkProviderResult(O,v,x)):L.provideLinks(v.y,function(N){var M,W;if(!I._isMouseOut){var U=N==null?void 0:N.map(function(z){return{link:z}});(M=I._activeProviderReplies)===null||M===void 0||M.set(O,U),x=I._checkLinkProviderResult(O,v,x),((W=I._activeProviderReplies)===null||W===void 0?void 0:W.size)===I._linkProviders.length&&I._removeIntersectingLinks(v.y,I._activeProviderReplies)}})})},A.prototype._removeIntersectingLinks=function(v,w){for(var T=new Set,I=0;I<w.size;I++){var x=w.get(I);if(x)for(var L=0;L<x.length;L++)for(var O=x[L],P=O.link.range.start.y<v?0:O.link.range.start.x,N=O.link.range.end.y>v?this._bufferService.cols:O.link.range.end.x,M=P;M<=N;M++){if(T.has(M)){x.splice(L--,1);break}T.add(M)}}},A.prototype._checkLinkProviderResult=function(v,w,T){var I,x=this;if(!this._activeProviderReplies)return T;for(var L=this._activeProviderReplies.get(v),O=!1,P=0;P<v;P++)this._activeProviderReplies.has(P)&&!this._activeProviderReplies.get(P)||(O=!0);if(!O&&L){var N=L.find(function(W){return x._linkAtPosition(W.link,w)});N&&(T=!0,this._handleNewLink(N))}if(this._activeProviderReplies.size===this._linkProviders.length&&!T)for(P=0;P<this._activeProviderReplies.size;P++){var M=(I=this._activeProviderReplies.get(P))===null||I===void 0?void 0:I.find(function(W){return x._linkAtPosition(W.link,w)});if(M){T=!0,this._handleNewLink(M);break}}return T},A.prototype._onClick=function(v){if(this._element&&this._mouseService&&this._currentLink){var w=this._positionFromMouseEvent(v,this._element,this._mouseService);w&&this._linkAtPosition(this._currentLink.link,w)&&this._currentLink.link.activate(v,this._currentLink.link.text)}},A.prototype._clearCurrentLink=function(v,w){this._element&&this._currentLink&&this._lastMouseEvent&&(!v||!w||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=w)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))},A.prototype._handleNewLink=function(v){var w=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var T=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);T&&this._linkAtPosition(v.link,T)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:function(){var I,x;return(x=(I=w._currentLink)===null||I===void 0?void 0:I.state)===null||x===void 0?void 0:x.decorations.pointerCursor},set:function(I){var x,L;((x=w._currentLink)===null||x===void 0?void 0:x.state)&&w._currentLink.state.decorations.pointerCursor!==I&&(w._currentLink.state.decorations.pointerCursor=I,w._currentLink.state.isHovered&&((L=w._element)===null||L===void 0||L.classList.toggle("xterm-cursor-pointer",I)))}},underline:{get:function(){var I,x;return(x=(I=w._currentLink)===null||I===void 0?void 0:I.state)===null||x===void 0?void 0:x.decorations.underline},set:function(I){var x,L,O;((x=w._currentLink)===null||x===void 0?void 0:x.state)&&((O=(L=w._currentLink)===null||L===void 0?void 0:L.state)===null||O===void 0?void 0:O.decorations.underline)!==I&&(w._currentLink.state.decorations.underline=I,w._currentLink.state.isHovered&&w._fireUnderlineEvent(v.link,I))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(I){var x=I.start===0?0:I.start+1+w._bufferService.buffer.ydisp;w._clearCurrentLink(x,I.end+1+w._bufferService.buffer.ydisp)})))}},A.prototype._linkHover=function(v,w,T){var I;((I=this._currentLink)===null||I===void 0?void 0:I.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),w.hover&&w.hover(T,w.text)},A.prototype._fireUnderlineEvent=function(v,w){var T=v.range,I=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(T.start.x-1,T.start.y-I-1,T.end.x,T.end.y-I-1,void 0);(w?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)},A.prototype._linkLeave=function(v,w,T){var I;((I=this._currentLink)===null||I===void 0?void 0:I.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(w,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),w.leave&&w.leave(T,w.text)},A.prototype._linkAtPosition=function(v,w){var T=v.range.start.y===v.range.end.y,I=v.range.start.y<w.y,x=v.range.end.y>w.y;return(T&&v.range.start.x<=w.x&&v.range.end.x>=w.x||I&&v.range.end.x>=w.x||x&&v.range.start.x<=w.x||I&&x)&&v.range.start.y<=w.y&&v.range.end.y>=w.y},A.prototype._positionFromMouseEvent=function(v,w,T){var I=T.getCoords(v,w,this._bufferService.cols,this._bufferService.rows);if(I)return{x:I[0],y:I[1]+this._bufferService.buffer.ydisp}},A.prototype._createLinkUnderlineEvent=function(v,w,T,I,x){return{x1:v,y1:w,x2:T,y2:I,cols:this._bufferService.cols,fg:x}},d([h(0,g.IBufferService)],A)}(C.Disposable);a.Linkifier2=S},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(b,A){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(v[T]=w[T])},c(b,A)},function(b,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function v(){this.constructor=b}c(b,A),b.prototype=A===null?Object.create(A):(v.prototype=A.prototype,new v)}),d=this&&this.__decorate||function(b,A,v,w){var T,I=arguments.length,x=I<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(b,A,v,w);else for(var L=b.length-1;L>=0;L--)(T=b[L])&&(x=(I<3?T(x):I>3?T(A,v,x):T(A,v))||x);return I>3&&x&&Object.defineProperty(A,v,x),x},h=this&&this.__param||function(b,A){return function(v,w){A(v,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZoneManager=void 0;var g=l(844),m=l(3656),C=l(4725),y=l(2585),S=function(b){function A(v,w,T,I,x,L){var O=b.call(this)||this;return O._element=v,O._screenElement=w,O._bufferService=T,O._mouseService=I,O._selectionService=x,O._optionsService=L,O._zones=[],O._areZonesActive=!1,O._lastHoverCoords=[void 0,void 0],O._initialSelectionLength=0,O.register((0,m.addDisposableDomListener)(O._element,"mousedown",function(P){return O._onMouseDown(P)})),O._mouseMoveListener=function(P){return O._onMouseMove(P)},O._mouseLeaveListener=function(P){return O._onMouseLeave(P)},O._clickListener=function(P){return O._onClick(P)},O}return u(A,b),A.prototype.dispose=function(){b.prototype.dispose.call(this),this._deactivate()},A.prototype.add=function(v){this._zones.push(v),this._zones.length===1&&this._activate()},A.prototype.clearAll=function(v,w){if(this._zones.length!==0){v&&w||(v=0,w=this._bufferService.rows-1);for(var T=0;T<this._zones.length;T++){var I=this._zones[T];(I.y1>v&&I.y1<=w+1||I.y2>v&&I.y2<=w+1||I.y1<v&&I.y2>w+1)&&(this._currentZone&&this._currentZone===I&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(T--,1))}this._zones.length===0&&this._deactivate()}},A.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))},A.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))},A.prototype._onMouseMove=function(v){this._lastHoverCoords[0]===v.pageX&&this._lastHoverCoords[1]===v.pageY||(this._onHover(v),this._lastHoverCoords=[v.pageX,v.pageY])},A.prototype._onHover=function(v){var w=this,T=this._findZoneEventAt(v);T!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),T&&(this._currentZone=T,T.hoverCallback&&T.hoverCallback(v),this._tooltipTimeout=window.setTimeout(function(){return w._onTooltip(v)},this._optionsService.options.linkTooltipHoverDuration)))},A.prototype._onTooltip=function(v){this._tooltipTimeout=void 0;var w=this._findZoneEventAt(v);w==null||w.tooltipCallback(v)},A.prototype._onMouseDown=function(v){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var w=this._findZoneEventAt(v);(w==null?void 0:w.willLinkActivate(v))&&(v.preventDefault(),v.stopImmediatePropagation())}},A.prototype._onMouseLeave=function(v){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},A.prototype._onClick=function(v){var w=this._findZoneEventAt(v),T=this._getSelectionLength();w&&T===this._initialSelectionLength&&(w.clickCallback(v),v.preventDefault(),v.stopImmediatePropagation())},A.prototype._getSelectionLength=function(){var v=this._selectionService.selectionText;return v?v.length:0},A.prototype._findZoneEventAt=function(v){var w=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(w)for(var T=w[0],I=w[1],x=0;x<this._zones.length;x++){var L=this._zones[x];if(L.y1===L.y2){if(I===L.y1&&T>=L.x1&&T<L.x2)return L}else if(I===L.y1&&T>=L.x1||I===L.y2&&T<L.x2||I>L.y1&&I<L.y2)return L}},d([h(2,y.IBufferService),h(3,C.IMouseService),h(4,C.ISelectionService),h(5,y.IOptionsService)],A)}(g.Disposable);a.MouseZoneManager=S},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 g=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 g._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,g){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,C){m.__proto__=C}||function(m,C){for(var y in C)Object.prototype.hasOwnProperty.call(C,y)&&(m[y]=C[y])},c(h,g)},function(h,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function m(){this.constructor=h}c(h,g),h.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)});Object.defineProperty(a,"__esModule",{value:!0}),a.ScreenDprMonitor=void 0;var d=function(h){function g(){var m=h!==null&&h.apply(this,arguments)||this;return m._currentDevicePixelRatio=window.devicePixelRatio,m}return u(g,h),g.prototype.setListener=function(m){var C=this;this._listener&&this.clearListener(),this._listener=m,this._outerListener=function(){C._listener&&(C._listener(window.devicePixelRatio,C._currentDevicePixelRatio),C._updateDpr())},this._updateDpr()},g.prototype.dispose=function(){h.prototype.dispose.call(this),this.clearListener()},g.prototype._updateDpr=function(){var m;this._outerListener&&((m=this._resolutionMediaMatchList)===null||m===void 0||m.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},g.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)},g}(l(844).Disposable);a.ScreenDprMonitor=d},3236:function(s,a,l){var c,u=this&&this.__extends||(c=function(Fe,ie){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ce,ye){Ce.__proto__=ye}||function(Ce,ye){for(var Ye in ye)Object.prototype.hasOwnProperty.call(ye,Ye)&&(Ce[Ye]=ye[Ye])},c(Fe,ie)},function(Fe,ie){if(typeof ie!="function"&&ie!==null)throw new TypeError("Class extends value "+String(ie)+" is not a constructor or null");function Ce(){this.constructor=Fe}c(Fe,ie),Fe.prototype=ie===null?Object.create(ie):(Ce.prototype=ie.prototype,new Ce)});Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;var d=l(2950),h=l(1680),g=l(3614),m=l(2584),C=l(5435),y=l(3525),S=l(3551),b=l(9312),A=l(6114),v=l(3656),w=l(9042),T=l(357),I=l(6954),x=l(4567),L=l(1296),O=l(7399),P=l(8460),N=l(8437),M=l(5680),W=l(3230),U=l(4725),z=l(428),j=l(8934),$=l(6465),G=l(5114),J=l(8969),q=l(4774),Z=l(4269),ne=l(5941),fe=typeof window!="undefined"?window.document:null,Se=function(Fe){function ie(Ce){Ce===void 0&&(Ce={});var ye=Fe.call(this,Ce)||this;return ye.browser=A,ye._keyDownHandled=!1,ye._keyPressHandled=!1,ye._unprocessedDeadKey=!1,ye._onCursorMove=new P.EventEmitter,ye._onKey=new P.EventEmitter,ye._onRender=new P.EventEmitter,ye._onSelectionChange=new P.EventEmitter,ye._onTitleChange=new P.EventEmitter,ye._onBell=new P.EventEmitter,ye._onFocus=new P.EventEmitter,ye._onBlur=new P.EventEmitter,ye._onA11yCharEmitter=new P.EventEmitter,ye._onA11yTabEmitter=new P.EventEmitter,ye._setup(),ye.linkifier=ye._instantiationService.createInstance(S.Linkifier),ye.linkifier2=ye.register(ye._instantiationService.createInstance($.Linkifier2)),ye.register(ye._inputHandler.onRequestBell(function(){return ye.bell()})),ye.register(ye._inputHandler.onRequestRefreshRows(function(Ye,Re){return ye.refresh(Ye,Re)})),ye.register(ye._inputHandler.onRequestSendFocus(function(){return ye._reportFocus()})),ye.register(ye._inputHandler.onRequestReset(function(){return ye.reset()})),ye.register(ye._inputHandler.onRequestWindowsOptionsReport(function(Ye){return ye._reportWindowsOptions(Ye)})),ye.register(ye._inputHandler.onColor(function(Ye){return ye._handleColorEvent(Ye)})),ye.register((0,P.forwardEvent)(ye._inputHandler.onCursorMove,ye._onCursorMove)),ye.register((0,P.forwardEvent)(ye._inputHandler.onTitleChange,ye._onTitleChange)),ye.register((0,P.forwardEvent)(ye._inputHandler.onA11yChar,ye._onA11yCharEmitter)),ye.register((0,P.forwardEvent)(ye._inputHandler.onA11yTab,ye._onA11yTabEmitter)),ye.register(ye._bufferService.onResize(function(Ye){return ye._afterResize(Ye.cols,Ye.rows)})),ye}return u(ie,Fe),Object.defineProperty(ie.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ie.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),ie.prototype._handleColorEvent=function(Ce){var ye,Ye;if(this._colorManager){for(var Re=0,Xe=Ce;Re<Xe.length;Re++){var ft=Xe[Re],Ut=void 0,et="";switch(ft.index){case 256:Ut="foreground",et="10";break;case 257:Ut="background",et="11";break;case 258:Ut="cursor",et="12";break;default:Ut="ansi",et="4;"+ft.index}if(Ut)switch(ft.type){case 0:var qt=q.color.toColorRGB(Ut==="ansi"?this._colorManager.colors.ansi[ft.index]:this._colorManager.colors[Ut]);this.coreService.triggerDataEvent(m.C0.ESC+"]"+et+";"+(0,ne.toRgbString)(qt)+m.C0.BEL);break;case 1:Ut==="ansi"?this._colorManager.colors.ansi[ft.index]=q.rgba.toColor.apply(q.rgba,ft.color):this._colorManager.colors[Ut]=q.rgba.toColor.apply(q.rgba,ft.color);break;case 2:this._colorManager.restoreColor(ft.index)}}(ye=this._renderService)===null||ye===void 0||ye.setColors(this._colorManager.colors),(Ye=this.viewport)===null||Ye===void 0||Ye.onThemeChange(this._colorManager.colors)}},ie.prototype.dispose=function(){var Ce,ye,Ye;this._isDisposed||(Fe.prototype.dispose.call(this),(Ce=this._renderService)===null||Ce===void 0||Ce.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Ye=(ye=this.element)===null||ye===void 0?void 0:ye.parentNode)===null||Ye===void 0||Ye.removeChild(this.element))},ie.prototype._setup=function(){Fe.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(ie.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),ie.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},ie.prototype._updateOptions=function(Ce){var ye,Ye,Re,Xe;switch(Fe.prototype._updateOptions.call(this,Ce),Ce){case"fontFamily":case"fontSize":(ye=this._renderService)===null||ye===void 0||ye.clear(),(Ye=this._charSizeService)===null||Ye===void 0||Ye.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":(Re=this.viewport)===null||Re===void 0||Re.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new x.AccessibilityManager(this,this._renderService)):((Xe=this._accessibilityManager)===null||Xe===void 0||Xe.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},ie.prototype._onTextAreaFocus=function(Ce){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(m.C0.ESC+"[I"),this.updateCursorStyle(Ce),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},ie.prototype.blur=function(){var Ce;return(Ce=this.textarea)===null||Ce===void 0?void 0:Ce.blur()},ie.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(m.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},ie.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var Ce=this.buffer.ybase+this.buffer.y,ye=this.buffer.lines.get(Ce);if(ye){var Ye=Math.min(this.buffer.x,this.cols-1),Re=this._renderService.dimensions.actualCellHeight,Xe=ye.getWidth(Ye),ft=this._renderService.dimensions.actualCellWidth*Xe,Ut=this.buffer.y*this._renderService.dimensions.actualCellHeight,et=Ye*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=et+"px",this.textarea.style.top=Ut+"px",this.textarea.style.width=ft+"px",this.textarea.style.height=Re+"px",this.textarea.style.lineHeight=Re+"px",this.textarea.style.zIndex="-5"}}},ie.prototype._initGlobal=function(){var Ce=this;this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",function(Ye){Ce.hasSelection()&&(0,g.copyHandler)(Ye,Ce._selectionService)}));var ye=function(Ye){return(0,g.handlePasteEvent)(Ye,Ce.textarea,Ce.coreService)};this.register((0,v.addDisposableDomListener)(this.textarea,"paste",ye)),this.register((0,v.addDisposableDomListener)(this.element,"paste",ye)),A.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",function(Ye){Ye.button===2&&(0,g.rightClickHandler)(Ye,Ce.textarea,Ce.screenElement,Ce._selectionService,Ce.options.rightClickSelectsWord)})):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",function(Ye){(0,g.rightClickHandler)(Ye,Ce.textarea,Ce.screenElement,Ce._selectionService,Ce.options.rightClickSelectsWord)})),A.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",function(Ye){Ye.button===1&&(0,g.moveTextAreaUnderMouseCursor)(Ye,Ce.textarea,Ce.screenElement)}))},ie.prototype._bindKeys=function(){var Ce=this;this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",function(ye){return Ce._keyUp(ye)},!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",function(ye){return Ce._keyDown(ye)},!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",function(ye){return Ce._keyPress(ye)},!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",function(){return Ce._compositionHelper.compositionstart()})),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",function(ye){return Ce._compositionHelper.compositionupdate(ye)})),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",function(){return Ce._compositionHelper.compositionend()})),this.register((0,v.addDisposableDomListener)(this.textarea,"input",function(ye){return Ce._inputEvent(ye)},!0)),this.register(this.onRender(function(){return Ce._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(ye){return Ce._queueLinkification(ye.start,ye.end)}))},ie.prototype.open=function(Ce){var ye=this;if(!Ce)throw new Error("Terminal requires a parent element.");Ce.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=Ce.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"),Ce.appendChild(this.element);var Ye=fe.createDocumentFragment();this._viewportElement=fe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Ye.appendChild(this._viewportElement),this._viewportScrollArea=fe.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=fe.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=fe.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Ye.appendChild(this.screenElement),this.textarea=fe.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,v.addDisposableDomListener)(this.textarea,"focus",function(ft){return ye._onTextAreaFocus(ft)})),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",function(){return ye._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var Re=this._instantiationService.createInstance(G.CoreBrowserService,this.textarea);this._instantiationService.setService(U.ICoreBrowserService,Re),this._charSizeService=this._instantiationService.createInstance(z.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(U.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new M.ColorManager(fe,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ft){return ye._colorManager.onOptionsChange(ft)})),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(Z.CharacterJoinerService),this._instantiationService.setService(U.ICharacterJoinerService,this._characterJoinerService);var Xe=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(W.RenderService,Xe,this.rows,this.screenElement)),this._instantiationService.setService(U.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ft){return ye._onRender.fire(ft)})),this.onResize(function(ft){return ye._renderService.resize(ft.cols,ft.rows)}),this._compositionView=fe.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(Ye),this._soundService=this._instantiationService.createInstance(T.SoundService),this._instantiationService.setService(U.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(j.MouseService),this._instantiationService.setService(U.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(h.Viewport,function(ft){return ye.scrollLines(ft,!0,1)},this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return ye.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){ye._renderService.onCursorMove(),ye._syncTextArea()})),this.register(this.onResize(function(){return ye._renderService.onResize(ye.cols,ye.rows)})),this.register(this.onBlur(function(){return ye._renderService.onBlur()})),this.register(this.onFocus(function(){return ye._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return ye.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(b.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(U.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ft){return ye.scrollLines(ft.amount,ft.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return ye._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ft){return ye._renderService.onSelectionChanged(ft.start,ft.end,ft.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ft){ye.textarea.value=ft,ye.textarea.focus(),ye.textarea.select()})),this.register(this._onScroll.event(function(ft){ye.viewport.syncScrollArea(),ye._selectionService.refresh()})),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",function(){return ye._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(I.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return ye._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",function(ft){return ye._selectionService.onMouseDown(ft)})),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new x.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},ie.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(y.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(L.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},ie.prototype._setTheme=function(Ce){var ye,Ye,Re;this._theme=Ce,(ye=this._colorManager)===null||ye===void 0||ye.setTheme(Ce),(Ye=this._renderService)===null||Ye===void 0||Ye.setColors(this._colorManager.colors),(Re=this.viewport)===null||Re===void 0||Re.onThemeChange(this._colorManager.colors)},ie.prototype.bindMouse=function(){var Ce=this,ye=this,Ye=this.element;function Re(qe){var ee,he,_e=ye._mouseService.getRawByteCoords(qe,ye.screenElement,ye.cols,ye.rows);if(!_e)return!1;switch(qe.overrideType||qe.type){case"mousemove":he=32,qe.buttons===void 0?(ee=3,qe.button!==void 0&&(ee=qe.button<3?qe.button:3)):ee=1&qe.buttons?0:4&qe.buttons?1:2&qe.buttons?2:3;break;case"mouseup":he=0,ee=qe.button<3?qe.button:3;break;case"mousedown":he=1,ee=qe.button<3?qe.button:3;break;case"wheel":qe.deltaY!==0&&(he=qe.deltaY<0?0:1),ee=4;break;default:return!1}return!(he===void 0||ee===void 0||ee>4)&&ye.coreMouseService.triggerMouseEvent({col:_e.x-33,row:_e.y-33,button:ee,action:he,ctrl:qe.ctrlKey,alt:qe.altKey,shift:qe.shiftKey})}var Xe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ft=function(qe){return Re(qe),qe.buttons||(Ce._document.removeEventListener("mouseup",Xe.mouseup),Xe.mousedrag&&Ce._document.removeEventListener("mousemove",Xe.mousedrag)),Ce.cancel(qe)},Ut=function(qe){return Re(qe),Ce.cancel(qe,!0)},et=function(qe){qe.buttons&&Re(qe)},qt=function(qe){qe.buttons||Re(qe)};this.register(this.coreMouseService.onProtocolChange(function(qe){qe?(Ce.optionsService.options.logLevel==="debug"&&Ce._logService.debug("Binding to mouse events:",Ce.coreMouseService.explainEvents(qe)),Ce.element.classList.add("enable-mouse-events"),Ce._selectionService.disable()):(Ce._logService.debug("Unbinding from mouse events."),Ce.element.classList.remove("enable-mouse-events"),Ce._selectionService.enable()),8&qe?Xe.mousemove||(Ye.addEventListener("mousemove",qt),Xe.mousemove=qt):(Ye.removeEventListener("mousemove",Xe.mousemove),Xe.mousemove=null),16&qe?Xe.wheel||(Ye.addEventListener("wheel",Ut,{passive:!1}),Xe.wheel=Ut):(Ye.removeEventListener("wheel",Xe.wheel),Xe.wheel=null),2&qe?Xe.mouseup||(Xe.mouseup=ft):(Ce._document.removeEventListener("mouseup",Xe.mouseup),Xe.mouseup=null),4&qe?Xe.mousedrag||(Xe.mousedrag=et):(Ce._document.removeEventListener("mousemove",Xe.mousedrag),Xe.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(Ye,"mousedown",function(qe){if(qe.preventDefault(),Ce.focus(),Ce.coreMouseService.areMouseEventsActive&&!Ce._selectionService.shouldForceSelection(qe))return Re(qe),Xe.mouseup&&Ce._document.addEventListener("mouseup",Xe.mouseup),Xe.mousedrag&&Ce._document.addEventListener("mousemove",Xe.mousedrag),Ce.cancel(qe)})),this.register((0,v.addDisposableDomListener)(Ye,"wheel",function(qe){if(!Xe.wheel){if(!Ce.buffer.hasScrollback){var ee=Ce.viewport.getLinesScrolled(qe);if(ee===0)return;for(var he=m.C0.ESC+(Ce.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(qe.deltaY<0?"A":"B"),_e="",ze=0;ze<Math.abs(ee);ze++)_e+=he;return Ce.coreService.triggerDataEvent(_e,!0),Ce.cancel(qe,!0)}return Ce.viewport.onWheel(qe)?Ce.cancel(qe):void 0}},{passive:!1})),this.register((0,v.addDisposableDomListener)(Ye,"touchstart",function(qe){if(!Ce.coreMouseService.areMouseEventsActive)return Ce.viewport.onTouchStart(qe),Ce.cancel(qe)},{passive:!0})),this.register((0,v.addDisposableDomListener)(Ye,"touchmove",function(qe){if(!Ce.coreMouseService.areMouseEventsActive)return Ce.viewport.onTouchMove(qe)?void 0:Ce.cancel(qe)},{passive:!1}))},ie.prototype.refresh=function(Ce,ye){var Ye;(Ye=this._renderService)===null||Ye===void 0||Ye.refreshRows(Ce,ye)},ie.prototype._queueLinkification=function(Ce,ye){var Ye;(Ye=this.linkifier)===null||Ye===void 0||Ye.linkifyRows(Ce,ye)},ie.prototype.updateCursorStyle=function(Ce){var ye;((ye=this._selectionService)===null||ye===void 0?void 0:ye.shouldColumnSelect(Ce))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},ie.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},ie.prototype.scrollLines=function(Ce,ye,Ye){Ye===void 0&&(Ye=0),Fe.prototype.scrollLines.call(this,Ce,ye,Ye),this.refresh(0,this.rows-1)},ie.prototype.paste=function(Ce){(0,g.paste)(Ce,this.textarea,this.coreService)},ie.prototype.attachCustomKeyEventHandler=function(Ce){this._customKeyEventHandler=Ce},ie.prototype.registerLinkMatcher=function(Ce,ye,Ye){var Re=this.linkifier.registerLinkMatcher(Ce,ye,Ye);return this.refresh(0,this.rows-1),Re},ie.prototype.deregisterLinkMatcher=function(Ce){this.linkifier.deregisterLinkMatcher(Ce)&&this.refresh(0,this.rows-1)},ie.prototype.registerLinkProvider=function(Ce){return this.linkifier2.registerLinkProvider(Ce)},ie.prototype.registerCharacterJoiner=function(Ce){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var ye=this._characterJoinerService.register(Ce);return this.refresh(0,this.rows-1),ye},ie.prototype.deregisterCharacterJoiner=function(Ce){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Ce)&&this.refresh(0,this.rows-1)},Object.defineProperty(ie.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),ie.prototype.addMarker=function(Ce){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Ce)},ie.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},ie.prototype.select=function(Ce,ye,Ye){this._selectionService.setSelection(Ce,ye,Ye)},ie.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},ie.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]}},ie.prototype.clearSelection=function(){var Ce;(Ce=this._selectionService)===null||Ce===void 0||Ce.clearSelection()},ie.prototype.selectAll=function(){var Ce;(Ce=this._selectionService)===null||Ce===void 0||Ce.selectAll()},ie.prototype.selectLines=function(Ce,ye){var Ye;(Ye=this._selectionService)===null||Ye===void 0||Ye.selectLines(Ce,ye)},ie.prototype._keyDown=function(Ce){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Ce)===!1)return!1;if(!this._compositionHelper.keydown(Ce))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;Ce.key!=="Dead"&&Ce.key!=="AltGraph"||(this._unprocessedDeadKey=!0);var ye=(0,O.evaluateKeyboardEvent)(Ce,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Ce),ye.type===3||ye.type===2){var Ye=this.rows-1;return this.scrollLines(ye.type===2?-Ye:Ye),this.cancel(Ce,!0)}return ye.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Ce)||(ye.cancel&&this.cancel(Ce,!0),!ye.key||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ye.key!==m.C0.ETX&&ye.key!==m.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ye.key,domEvent:Ce}),this._showCursor(),this.coreService.triggerDataEvent(ye.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(Ce,!0))))},ie.prototype._isThirdLevelShift=function(Ce,ye){var Ye=Ce.isMac&&!this.options.macOptionIsMeta&&ye.altKey&&!ye.ctrlKey&&!ye.metaKey||Ce.isWindows&&ye.altKey&&ye.ctrlKey&&!ye.metaKey||Ce.isWindows&&ye.getModifierState("AltGraph");return ye.type==="keypress"?Ye:Ye&&(!ye.keyCode||ye.keyCode>47)},ie.prototype._keyUp=function(Ce){this._customKeyEventHandler&&this._customKeyEventHandler(Ce)===!1||(function(ye){return ye.keyCode===16||ye.keyCode===17||ye.keyCode===18}(Ce)||this.focus(),this.updateCursorStyle(Ce),this._keyPressHandled=!1)},ie.prototype._keyPress=function(Ce){var ye;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Ce)===!1)return!1;if(this.cancel(Ce),Ce.charCode)ye=Ce.charCode;else if(Ce.which===null||Ce.which===void 0)ye=Ce.keyCode;else{if(Ce.which===0||Ce.charCode===0)return!1;ye=Ce.which}return!(!ye||(Ce.altKey||Ce.ctrlKey||Ce.metaKey)&&!this._isThirdLevelShift(this.browser,Ce)||(ye=String.fromCharCode(ye),this._onKey.fire({key:ye,domEvent:Ce}),this._showCursor(),this.coreService.triggerDataEvent(ye,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},ie.prototype._inputEvent=function(Ce){if(Ce.data&&Ce.inputType==="insertText"&&!Ce.composed&&!this.optionsService.options.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var ye=Ce.data;return this.coreService.triggerDataEvent(ye,!0),this.cancel(Ce),!0}return!1},ie.prototype.bell=function(){var Ce;this._soundBell()&&((Ce=this._soundService)===null||Ce===void 0||Ce.playBellSound()),this._onBell.fire()},ie.prototype.resize=function(Ce,ye){Ce!==this.cols||ye!==this.rows?Fe.prototype.resize.call(this,Ce,ye):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},ie.prototype._afterResize=function(Ce,ye){var Ye,Re;(Ye=this._charSizeService)===null||Ye===void 0||Ye.measure(),(Re=this.viewport)===null||Re===void 0||Re.syncScrollArea(!0)},ie.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 Ce=1;Ce<this.rows;Ce++)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})}},ie.prototype.reset=function(){var Ce,ye;this.options.rows=this.rows,this.options.cols=this.cols;var Ye=this._customKeyEventHandler;this._setup(),Fe.prototype.reset.call(this),(Ce=this._selectionService)===null||Ce===void 0||Ce.reset(),this._customKeyEventHandler=Ye,this.refresh(0,this.rows-1),(ye=this.viewport)===null||ye===void 0||ye.syncScrollArea()},ie.prototype.clearTextureAtlas=function(){var Ce;(Ce=this._renderService)===null||Ce===void 0||Ce.clearTextureAtlas()},ie.prototype._reportFocus=function(){var Ce;((Ce=this.element)===null||Ce===void 0?void 0:Ce.classList.contains("focus"))?this.coreService.triggerDataEvent(m.C0.ESC+"[I"):this.coreService.triggerDataEvent(m.C0.ESC+"[O")},ie.prototype._reportWindowsOptions=function(Ce){if(this._renderService)switch(Ce){case C.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var ye=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Ye=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(m.C0.ESC+"[4;"+Ye+";"+ye+"t");break;case C.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var Re=this._renderService.dimensions.scaledCellWidth.toFixed(0),Xe=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(m.C0.ESC+"[6;"+Xe+";"+Re+"t")}},ie.prototype.cancel=function(Ce,ye){if(this.options.cancelEvents||ye)return Ce.preventDefault(),Ce.stopPropagation(),!1},ie.prototype._visualBell=function(){return!1},ie.prototype._soundBell=function(){return this.options.bellStyle==="sound"},ie}(J.CoreTerminal);a.Terminal=Se},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 g=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 m=Date.now();if(m-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=m,this._innerRefresh();else if(!this._additionalRefreshRequested){var C=m-this._lastRefreshMs,y=this._debounceThresholdMS-C;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(function(){g._lastRefreshMs=Date.now(),g._innerRefresh(),g._additionalRefreshRequested=!1,g._refreshTimeoutID=void 0},y)}},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(b,A){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(v[T]=w[T])},c(b,A)},function(b,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function v(){this.constructor=b}c(b,A),b.prototype=A===null?Object.create(A):(v.prototype=A.prototype,new v)}),d=this&&this.__decorate||function(b,A,v,w){var T,I=arguments.length,x=I<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(b,A,v,w);else for(var L=b.length-1;L>=0;L--)(T=b[L])&&(x=(I<3?T(x):I>3?T(A,v,x):T(A,v))||x);return I>3&&x&&Object.defineProperty(A,v,x),x},h=this&&this.__param||function(b,A){return function(v,w){A(v,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;var g=l(844),m=l(3656),C=l(4725),y=l(2585),S=function(b){function A(v,w,T,I,x,L,O,P){var N=b.call(this)||this;return N._scrollLines=v,N._viewportElement=w,N._scrollArea=T,N._element=I,N._bufferService=x,N._optionsService=L,N._charSizeService=O,N._renderService=P,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,m.addDisposableDomListener)(N._viewportElement,"scroll",N._onScroll.bind(N))),N._activeBuffer=N._bufferService.buffer,N.register(N._bufferService.buffers.onBufferActivate(function(M){return N._activeBuffer=M.activeBuffer})),N._renderDimensions=N._renderService.dimensions,N.register(N._renderService.onDimensionsChange(function(M){return N._renderDimensions=M})),setTimeout(function(){return N.syncScrollArea()},0),N}return u(A,b),A.prototype.onThemeChange=function(v){this._viewportElement.style.backgroundColor=v.background.css},A.prototype._refresh=function(v){var w=this;if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return w._innerRefresh()}))},A.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 v=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==v&&(this._lastRecordedBufferHeight=v,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 T=window.getComputedStyle(this._element),I=parseInt(T.paddingLeft)+parseInt(T.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?I:0)).toString()+"px",this._refreshAnimationFrame=null},A.prototype.syncScrollArea=function(v){if(v===void 0&&(v=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);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(v):this._refresh(v)},A.prototype._onScroll=function(v){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)}},A.prototype._bubbleScroll=function(v,w){var T=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(w<0&&this._viewportElement.scrollTop!==0||w>0&&T<this._lastRecordedBufferHeight)||(v.cancelable&&v.preventDefault(),!1)},A.prototype.onWheel=function(v){var w=this._getPixelsScrolled(v);return w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(v,w))},A.prototype._getPixelsScrolled=function(v){if(v.deltaY===0||v.shiftKey)return 0;var w=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_LINE?w*=this._currentRowHeight:v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._currentRowHeight*this._bufferService.rows),w},A.prototype.getLinesScrolled=function(v){if(v.deltaY===0||v.shiftKey)return 0;var w=this._applyScrollModifier(v.deltaY,v);return v.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):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(w*=this._bufferService.rows),w},A.prototype._applyScrollModifier=function(v,w){var T=this._optionsService.options.fastScrollModifier;return T==="alt"&&w.altKey||T==="ctrl"&&w.ctrlKey||T==="shift"&&w.shiftKey?v*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:v*this._optionsService.options.scrollSensitivity},A.prototype.onTouchStart=function(v){this._lastTouchY=v.touches[0].pageY},A.prototype.onTouchMove=function(v){var w=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,w!==0&&(this._viewportElement.scrollTop+=w,this._bubbleScroll(v,w))},d([h(4,y.IBufferService),h(5,y.IOptionsService),h(6,C.ICharSizeService),h(7,C.IRenderService)],A)}(g.Disposable);a.Viewport=S},2950:function(s,a,l){var c=this&&this.__decorate||function(m,C,y,S){var b,A=arguments.length,v=A<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(m,C,y,S);else for(var w=m.length-1;w>=0;w--)(b=m[w])&&(v=(A<3?b(v):A>3?b(C,y,v):b(C,y))||v);return A>3&&v&&Object.defineProperty(C,y,v),v},u=this&&this.__param||function(m,C){return function(y,S){C(y,S,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;var d=l(4725),h=l(2585),g=function(){function m(C,y,S,b,A,v){this._textarea=C,this._compositionView=y,this._bufferService=S,this._optionsService=b,this._coreService=A,this._renderService=v,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(m.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),m.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},m.prototype.compositionupdate=function(C){var y=this;this._compositionView.textContent=C.data,this.updateCompositionElements(),setTimeout(function(){y._compositionPosition.end=y._textarea.value.length},0)},m.prototype.compositionend=function(){this._finalizeComposition(!0)},m.prototype.keydown=function(C){if(this._isComposing||this._isSendingComposition){if(C.keyCode===229||C.keyCode===16||C.keyCode===17||C.keyCode===18)return!1;this._finalizeComposition(!1)}return C.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},m.prototype._finalizeComposition=function(C){var y=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,C){var S={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(y._isSendingComposition){y._isSendingComposition=!1;var A;S.start+=y._dataAlreadySent.length,(A=y._isComposing?y._textarea.value.substring(S.start,S.end):y._textarea.value.substring(S.start)).length>0&&y._coreService.triggerDataEvent(A,!0)}},0)}else{this._isSendingComposition=!1;var b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}},m.prototype._handleAnyTextareaChanges=function(){var C=this,y=this._textarea.value;setTimeout(function(){if(!C._isComposing){var S=C._textarea.value.replace(y,"");S.length>0&&(C._dataAlreadySent=S,C._coreService.triggerDataEvent(S,!0))}},0)},m.prototype.updateCompositionElements=function(C){var y=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var S=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),b=this._renderService.dimensions.actualCellHeight,A=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,v=S*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=v+"px",this._compositionView.style.top=A+"px",this._compositionView.style.height=b+"px",this._compositionView.style.lineHeight=b+"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=v+"px",this._textarea.style.top=A+"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"}C||setTimeout(function(){return y.updateCompositionElements(!0)},0)}},c([u(2,h.IBufferService),u(3,h.IOptionsService),u(4,h.ICoreService),u(5,d.IRenderService)],m)}();a.CompositionHelper=g},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,g,m,C,y){if(g){var S=l(c,u);if(S)return S[0]=Math.ceil((S[0]+(y?m/2:0))/m),S[1]=Math.ceil(S[1]/C),S[0]=Math.min(Math.max(S[0],1),d+(y?1:0)),S[1]=Math.min(Math.max(S[1],1),h),S}},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(y,S,b,A){var v=y-d(b,y),w=S-d(b,S),T=Math.abs(v-w)-function(I,x,L){for(var O=0,P=I-d(L,I),N=x-d(L,x),M=0;M<Math.abs(P-N);M++){var W=h(I,x)==="A"?-1:1,U=L.buffer.lines.get(P+W*M);(U==null?void 0:U.isWrapped)&&O++}return O}(y,S,b);return C(T,m(h(y,S),A))}function d(y,S){for(var b=0,A=y.buffer.lines.get(S),v=A==null?void 0:A.isWrapped;v&&S>=0&&S<y.rows;)b++,v=(A=y.buffer.lines.get(--S))==null?void 0:A.isWrapped;return b}function h(y,S){return y>S?"A":"B"}function g(y,S,b,A,v,w){for(var T=y,I=S,x="";T!==b||I!==A;)T+=v?1:-1,v&&T>w.cols-1?(x+=w.buffer.translateBufferLineToString(I,!1,y,T),T=0,y=0,I++):!v&&T<0&&(x+=w.buffer.translateBufferLineToString(I,!1,0,y+1),y=T=w.cols-1,I--);return x+w.buffer.translateBufferLineToString(I,!1,y,T)}function m(y,S){var b=S?"O":"[";return c.C0.ESC+b+y}function C(y,S){y=Math.floor(y);for(var b="",A=0;A<y;A++)b+=S;return b}a.moveToCellSequence=function(y,S,b,A){var v,w=b.buffer.x,T=b.buffer.y;if(!b.buffer.hasScrollback)return function(x,L,O,P,N,M){return u(L,P,N,M).length===0?"":C(g(x,L,x,L-d(N,L),!1,N).length,m("D",M))}(w,T,0,S,b,A)+u(T,S,b,A)+function(x,L,O,P,N,M){var W;W=u(L,P,N,M).length>0?P-d(N,P):L;var U=P,z=function(j,$,G,J,q,Z){var ne;return ne=u(G,J,q,Z).length>0?J-d(q,J):$,j<G&&ne<=J||j>=G&&ne<J?"C":"D"}(x,L,O,P,N,M);return C(g(x,W,O,U,z==="C",N).length,m(z,M))}(w,T,y,S,b,A);if(T===S)return v=w>y?"D":"C",C(Math.abs(w-y),m(v,A));v=T>S?"D":"C";var I=Math.abs(T-S);return C(function(x,L){return L.cols-x}(T>S?y:w,b)+(I-1)*b.cols+1+((T>S?w:y)-1),m(v,A))}},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),g=l(1752),m=l(4774),C=l(9631),y=l(8978),S=function(){function b(A,v,w,T,I,x,L,O){this._container=A,this._alpha=T,this._colors=I,this._rendererId=x,this._bufferService=L,this._optionsService=O,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-"+v+"-layer"),this._canvas.style.zIndex=w.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return b.prototype.dispose=function(){var A;(0,C.removeElementFromParent)(this._canvas),(A=this._charAtlas)===null||A===void 0||A.dispose()},b.prototype._initCanvas=function(){this._ctx=(0,g.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},b.prototype.onOptionsChanged=function(){},b.prototype.onBlur=function(){},b.prototype.onFocus=function(){},b.prototype.onCursorMove=function(){},b.prototype.onGridChanged=function(A,v){},b.prototype.onSelectionChanged=function(A,v,w){},b.prototype.setColors=function(A){this._refreshCharAtlas(A)},b.prototype._setTransparency=function(A){if(A!==this._alpha){var v=this._canvas;this._alpha=A,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,v),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},b.prototype._refreshCharAtlas=function(A){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,d.acquireCharAtlas)(this._optionsService.options,this._rendererId,A,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},b.prototype.resize=function(A){this._scaledCellWidth=A.scaledCellWidth,this._scaledCellHeight=A.scaledCellHeight,this._scaledCharWidth=A.scaledCharWidth,this._scaledCharHeight=A.scaledCharHeight,this._scaledCharLeft=A.scaledCharLeft,this._scaledCharTop=A.scaledCharTop,this._canvas.width=A.scaledCanvasWidth,this._canvas.height=A.scaledCanvasHeight,this._canvas.style.width=A.canvasWidth+"px",this._canvas.style.height=A.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},b.prototype.clearTextureAtlas=function(){var A;(A=this._charAtlas)===null||A===void 0||A.clear()},b.prototype._fillCells=function(A,v,w,T){this._ctx.fillRect(A*this._scaledCellWidth,v*this._scaledCellHeight,w*this._scaledCellWidth,T*this._scaledCellHeight)},b.prototype._fillMiddleLineAtCells=function(A,v,w){w===void 0&&(w=1);var T=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(A*this._scaledCellWidth,(v+1)*this._scaledCellHeight-T-window.devicePixelRatio,w*this._scaledCellWidth,window.devicePixelRatio)},b.prototype._fillBottomLineAtCells=function(A,v,w){w===void 0&&(w=1),this._ctx.fillRect(A*this._scaledCellWidth,(v+1)*this._scaledCellHeight-window.devicePixelRatio-1,w*this._scaledCellWidth,window.devicePixelRatio)},b.prototype._fillLeftLineAtCell=function(A,v,w){this._ctx.fillRect(A*this._scaledCellWidth,v*this._scaledCellHeight,window.devicePixelRatio*w,this._scaledCellHeight)},b.prototype._strokeRectAtCell=function(A,v,w,T){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(A*this._scaledCellWidth+window.devicePixelRatio/2,v*this._scaledCellHeight+window.devicePixelRatio/2,w*this._scaledCellWidth-window.devicePixelRatio,T*this._scaledCellHeight-window.devicePixelRatio)},b.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))},b.prototype._clearCells=function(A,v,w,T){this._alpha?this._ctx.clearRect(A*this._scaledCellWidth,v*this._scaledCellHeight,w*this._scaledCellWidth,T*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(A*this._scaledCellWidth,v*this._scaledCellHeight,w*this._scaledCellWidth,T*this._scaledCellHeight))},b.prototype._fillCharTrueColor=function(A,v,w){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=u.TEXT_BASELINE,this._clipRow(w);var T=!1;this._optionsService.options.customGlyphs!==!1&&(T=(0,y.tryDrawCustomChar)(this._ctx,A.getChars(),v*this._scaledCellWidth,w*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),T||this._ctx.fillText(A.getChars(),v*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},b.prototype._drawChars=function(A,v,w){var T,I,x,L=this._getContrastColor(A);L||A.isFgRGB()||A.isBgRGB()?this._drawUncachedChars(A,v,w,L):(A.isInverse()?(I=A.isBgDefault()?u.INVERTED_DEFAULT_COLOR:A.getBgColor(),x=A.isFgDefault()?u.INVERTED_DEFAULT_COLOR:A.getFgColor()):(x=A.isBgDefault()?c.DEFAULT_COLOR:A.getBgColor(),I=A.isFgDefault()?c.DEFAULT_COLOR:A.getFgColor()),I+=this._optionsService.options.drawBoldTextInBrightColors&&A.isBold()&&I<8?8:0,this._currentGlyphIdentifier.chars=A.getChars()||c.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=A.getCode()||c.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=x,this._currentGlyphIdentifier.fg=I,this._currentGlyphIdentifier.bold=!!A.isBold(),this._currentGlyphIdentifier.dim=!!A.isDim(),this._currentGlyphIdentifier.italic=!!A.isItalic(),((T=this._charAtlas)===null||T===void 0?void 0:T.draw(this._ctx,this._currentGlyphIdentifier,v*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(A,v,w))},b.prototype._drawUncachedChars=function(A,v,w,T){if(this._ctx.save(),this._ctx.font=this._getFont(!!A.isBold(),!!A.isItalic()),this._ctx.textBaseline=u.TEXT_BASELINE,A.isInverse())if(T)this._ctx.fillStyle=T.css;else if(A.isBgDefault())this._ctx.fillStyle=m.color.opaque(this._colors.background).css;else if(A.isBgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(A.getBgColor()).join(",")+")";else{var I=A.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&A.isBold()&&I<8&&(I+=8),this._ctx.fillStyle=this._colors.ansi[I].css}else if(T)this._ctx.fillStyle=T.css;else if(A.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(A.isFgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(A.getFgColor()).join(",")+")";else{var x=A.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&A.isBold()&&x<8&&(x+=8),this._ctx.fillStyle=this._colors.ansi[x].css}this._clipRow(w),A.isDim()&&(this._ctx.globalAlpha=u.DIM_OPACITY);var L=!1;this._optionsService.options.customGlyphs!==!1&&(L=(0,y.tryDrawCustomChar)(this._ctx,A.getChars(),v*this._scaledCellWidth,w*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),L||this._ctx.fillText(A.getChars(),v*this._scaledCellWidth+this._scaledCharLeft,w*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},b.prototype._clipRow=function(A){this._ctx.beginPath(),this._ctx.rect(0,A*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},b.prototype._getFont=function(A,v){return(v?"italic":"")+" "+(A?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},b.prototype._getContrastColor=function(A){if(this._optionsService.options.minimumContrastRatio!==1){var v=this._colors.contrastCache.getColor(A.bg,A.fg);if(v!==void 0)return v||void 0;var w=A.getFgColor(),T=A.getFgColorMode(),I=A.getBgColor(),x=A.getBgColorMode(),L=!!A.isInverse(),O=!!A.isInverse();if(L){var P=w;w=I,I=P;var N=T;T=x,x=N}var M=this._resolveBackgroundRgba(x,I,L),W=this._resolveForegroundRgba(T,w,L,O),U=m.rgba.ensureContrastRatio(M,W,this._optionsService.options.minimumContrastRatio);if(U){var z={css:m.channels.toCss(U>>24&255,U>>16&255,U>>8&255),rgba:U};return this._colors.contrastCache.setColor(A.bg,A.fg,z),z}this._colors.contrastCache.setColor(A.bg,A.fg,null)}},b.prototype._resolveBackgroundRgba=function(A,v,w){switch(A){case 16777216:case 33554432:return this._colors.ansi[v].rgba;case 50331648:return v<<8;default:return w?this._colors.foreground.rgba:this._colors.background.rgba}},b.prototype._resolveForegroundRgba=function(A,v,w,T){switch(A){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&T&&v<8&&(v+=8),this._colors.ansi[v].rgba;case 50331648:return v<<8;default:return w?this._colors.background.rgba:this._colors.foreground.rgba}},b}();a.BaseRenderLayer=S},2512:function(s,a,l){var c,u=this&&this.__extends||(c=function(v,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,I){T.__proto__=I}||function(T,I){for(var x in I)Object.prototype.hasOwnProperty.call(I,x)&&(T[x]=I[x])},c(v,w)},function(v,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function T(){this.constructor=v}c(v,w),v.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}),d=this&&this.__decorate||function(v,w,T,I){var x,L=arguments.length,O=L<3?w:I===null?I=Object.getOwnPropertyDescriptor(w,T):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(v,w,T,I);else for(var P=v.length-1;P>=0;P--)(x=v[P])&&(O=(L<3?x(O):L>3?x(w,T,O):x(w,T))||O);return L>3&&O&&Object.defineProperty(w,T,O),O},h=this&&this.__param||function(v,w){return function(T,I){w(T,I,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CursorRenderLayer=void 0;var g=l(1546),m=l(511),C=l(2585),y=l(4725),S=600,b=function(v){function w(T,I,x,L,O,P,N,M,W){var U=v.call(this,T,"cursor",I,!0,x,L,P,N)||this;return U._onRequestRedraw=O,U._coreService=M,U._coreBrowserService=W,U._cell=new m.CellData,U._state={x:0,y:0,isFocused:!1,style:"",width:0},U._cursorRenderers={bar:U._renderBarCursor.bind(U),block:U._renderBlockCursor.bind(U),underline:U._renderUnderlineCursor.bind(U)},U}return u(w,v),w.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),v.prototype.dispose.call(this)},w.prototype.resize=function(T){v.prototype.resize.call(this,T),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},w.prototype.reset=function(){var T;this._clearCursor(),(T=this._cursorBlinkStateManager)===null||T===void 0||T.restartBlinkAnimation(),this.onOptionsChanged()},w.prototype.onBlur=function(){var T;(T=this._cursorBlinkStateManager)===null||T===void 0||T.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onFocus=function(){var T;(T=this._cursorBlinkStateManager)===null||T===void 0||T.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onOptionsChanged=function(){var T,I=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new A(this._coreBrowserService.isFocused,function(){I._render(!0)})):((T=this._cursorBlinkStateManager)===null||T===void 0||T.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},w.prototype.onCursorMove=function(){var T;(T=this._cursorBlinkStateManager)===null||T===void 0||T.restartBlinkAnimation()},w.prototype.onGridChanged=function(T,I){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},w.prototype._render=function(T){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var I=this._bufferService.buffer.ybase+this._bufferService.buffer.y,x=I-this._bufferService.buffer.ydisp;if(x<0||x>=this._bufferService.rows)this._clearCursor();else{var L=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(I).loadCell(L,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var O=this._optionsService.options.cursorStyle;return O&&O!=="block"?this._cursorRenderers[O](L,x,this._cell):this._renderBlurCursor(L,x,this._cell),this._ctx.restore(),this._state.x=L,this._state.y=x,this._state.isFocused=!1,this._state.style=O,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===L&&this._state.y===x&&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"](L,x,this._cell),this._ctx.restore(),this._state.x=L,this._state.y=x,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(T,I,x){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(T,I,this._optionsService.options.cursorWidth),this._ctx.restore()},w.prototype._renderBlockCursor=function(T,I,x){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(T,I,x.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(x,T,I),this._ctx.restore()},w.prototype._renderUnderlineCursor=function(T,I,x){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(T,I),this._ctx.restore()},w.prototype._renderBlurCursor=function(T,I,x){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(T,I,x.getWidth(),1),this._ctx.restore()},d([h(5,C.IBufferService),h(6,C.IOptionsService),h(7,C.ICoreService),h(8,y.ICoreBrowserService)],w)}(g.BaseRenderLayer);a.CursorRenderLayer=b;var A=function(){function v(w,T){this._renderCallback=T,this.isCursorVisible=!0,w&&this._restartInterval()}return Object.defineProperty(v.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),v.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)},v.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})))},v.prototype._restartInterval=function(w){var T=this;w===void 0&&(w=S),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout(function(){if(T._animationTimeRestarted){var I=S-(Date.now()-T._animationTimeRestarted);if(T._animationTimeRestarted=void 0,I>0)return void T._restartInterval(I)}T.isCursorVisible=!1,T._animationFrame=window.requestAnimationFrame(function(){T._renderCallback(),T._animationFrame=void 0}),T._blinkInterval=window.setInterval(function(){if(T._animationTimeRestarted){var x=S-(Date.now()-T._animationTimeRestarted);return T._animationTimeRestarted=void 0,void T._restartInterval(x)}T.isCursorVisible=!T.isCursorVisible,T._animationFrame=window.requestAnimationFrame(function(){T._renderCallback(),T._animationFrame=void 0})},S)},w)},v.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)},v.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},v}()},8978:(s,a,l)=>{var c,u,d,h,g,m,C,y,S,b,A,v,w,T,I,x,L,O,P,N,M,W,U,z,j,$,G,J,q,Z,ne,fe,Se,Fe,ie,Ce,ye,Ye,Re,Xe,ft,Ut,et,qt,qe,ee,he,_e,ze,Ve,We,dt,ct,Rt,hi,Ii,Hi,ji,xe,ot,zt,fi,Qt,Qn,Lo,Qo,so,Lr,ao,eo,Co,zs,Ks,Vi,os,re,le,Ee,ue,me,we,ge,Ue,ht,at,Bt,Gt,ci,wi,Ni,di,yo,Rn,Ps,Ms,As,Ss,If,Dr,fu,Dh,Mg,Rh,kh,Bg,Sv,rC,wv,Ev,pl,Iv,Tf,Ud,oC,to,Fg,Ug,sC,Fc,Tv,Lm,hA,xv,gu,Dm,Nh,aC,Rm;Object.defineProperty(a,"__esModule",{value:!0}),a.tryDrawCustomChar=a.boxDrawingDefinitions=a.blockElementDefinitions=void 0;var nT=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 fA={"\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":(g={},g[1]="M0.5,1 L.5,.5 L1,.5",g),"\u250F":(m={},m[3]="M0.5,1 L.5,.5 L1,.5",m),"\u2510":(C={},C[1]="M0,.5 L.5,.5 L.5,1",C),"\u2513":(y={},y[3]="M0,.5 L.5,.5 L.5,1",y),"\u2514":(S={},S[1]="M.5,0 L.5,.5 L1,.5",S),"\u2517":(b={},b[3]="M.5,0 L.5,.5 L1,.5",b),"\u2518":(A={},A[1]="M.5,0 L.5,.5 L0,.5",A),"\u251B":(v={},v[3]="M.5,0 L.5,.5 L0,.5",v),"\u251C":(w={},w[1]="M.5,0 L.5,1 M.5,.5 L1,.5",w),"\u2523":(T={},T[3]="M.5,0 L.5,1 M.5,.5 L1,.5",T),"\u2524":(I={},I[1]="M.5,0 L.5,1 M.5,.5 L0,.5",I),"\u252B":(x={},x[3]="M.5,0 L.5,1 M.5,.5 L0,.5",x),"\u252C":(L={},L[1]="M0,.5 L1,.5 M.5,.5 L.5,1",L),"\u2533":(O={},O[3]="M0,.5 L1,.5 M.5,.5 L.5,1",O),"\u2534":(P={},P[1]="M0,.5 L1,.5 M.5,.5 L.5,0",P),"\u253B":(N={},N[3]="M0,.5 L1,.5 M.5,.5 L.5,0",N),"\u253C":(M={},M[1]="M0,.5 L1,.5 M.5,0 L.5,1",M),"\u254B":(W={},W[3]="M0,.5 L1,.5 M.5,0 L.5,1",W),"\u2574":(U={},U[1]="M.5,.5 L0,.5",U),"\u2578":(z={},z[3]="M.5,.5 L0,.5",z),"\u2575":(j={},j[1]="M.5,.5 L.5,0",j),"\u2579":($={},$[3]="M.5,.5 L.5,0",$),"\u2576":(G={},G[1]="M.5,.5 L1,.5",G),"\u257A":(J={},J[3]="M.5,.5 L1,.5",J),"\u2577":(q={},q[1]="M.5,.5 L.5,1",q),"\u257B":(Z={},Z[3]="M.5,.5 L.5,1",Z),"\u2550":(ne={},ne[1]=function(_t,yt){return"M0,"+(.5-yt)+" L1,"+(.5-yt)+" M0,"+(.5+yt)+" L1,"+(.5+yt)},ne),"\u2551":(fe={},fe[1]=function(_t,yt){return"M"+(.5-_t)+",0 L"+(.5-_t)+",1 M"+(.5+_t)+",0 L"+(.5+_t)+",1"},fe),"\u2552":(Se={},Se[1]=function(_t,yt){return"M.5,1 L.5,"+(.5-yt)+" L1,"+(.5-yt)+" M.5,"+(.5+yt)+" L1,"+(.5+yt)},Se),"\u2553":(Fe={},Fe[1]=function(_t,yt){return"M"+(.5-_t)+",1 L"+(.5-_t)+",.5 L1,.5 M"+(.5+_t)+",.5 L"+(.5+_t)+",1"},Fe),"\u2554":(ie={},ie[1]=function(_t,yt){return"M1,"+(.5-yt)+" L"+(.5-_t)+","+(.5-yt)+" L"+(.5-_t)+",1 M1,"+(.5+yt)+" L"+(.5+_t)+","+(.5+yt)+" L"+(.5+_t)+",1"},ie),"\u2555":(Ce={},Ce[1]=function(_t,yt){return"M0,"+(.5-yt)+" L.5,"+(.5-yt)+" L.5,1 M0,"+(.5+yt)+" L.5,"+(.5+yt)},Ce),"\u2556":(ye={},ye[1]=function(_t,yt){return"M"+(.5+_t)+",1 L"+(.5+_t)+",.5 L0,.5 M"+(.5-_t)+",.5 L"+(.5-_t)+",1"},ye),"\u2557":(Ye={},Ye[1]=function(_t,yt){return"M0,"+(.5+yt)+" L"+(.5-_t)+","+(.5+yt)+" L"+(.5-_t)+",1 M0,"+(.5-yt)+" L"+(.5+_t)+","+(.5-yt)+" L"+(.5+_t)+",1"},Ye),"\u2558":(Re={},Re[1]=function(_t,yt){return"M.5,0 L.5,"+(.5+yt)+" L1,"+(.5+yt)+" M.5,"+(.5-yt)+" L1,"+(.5-yt)},Re),"\u2559":(Xe={},Xe[1]=function(_t,yt){return"M1,.5 L"+(.5-_t)+",.5 L"+(.5-_t)+",0 M"+(.5+_t)+",.5 L"+(.5+_t)+",0"},Xe),"\u255A":(ft={},ft[1]=function(_t,yt){return"M1,"+(.5-yt)+" L"+(.5+_t)+","+(.5-yt)+" L"+(.5+_t)+",0 M1,"+(.5+yt)+" L"+(.5-_t)+","+(.5+yt)+" L"+(.5-_t)+",0"},ft),"\u255B":(Ut={},Ut[1]=function(_t,yt){return"M0,"+(.5+yt)+" L.5,"+(.5+yt)+" L.5,0 M0,"+(.5-yt)+" L.5,"+(.5-yt)},Ut),"\u255C":(et={},et[1]=function(_t,yt){return"M0,.5 L"+(.5+_t)+",.5 L"+(.5+_t)+",0 M"+(.5-_t)+",.5 L"+(.5-_t)+",0"},et),"\u255D":(qt={},qt[1]=function(_t,yt){return"M0,"+(.5-yt)+" L"+(.5-_t)+","+(.5-yt)+" L"+(.5-_t)+",0 M0,"+(.5+yt)+" L"+(.5+_t)+","+(.5+yt)+" L"+(.5+_t)+",0"},qt),"\u255E":(qe={},qe[1]=function(_t,yt){return"M.5,0 L.5,1 M.5,"+(.5-yt)+" L1,"+(.5-yt)+" M.5,"+(.5+yt)+" L1,"+(.5+yt)},qe),"\u255F":(ee={},ee[1]=function(_t,yt){return"M"+(.5-_t)+",0 L"+(.5-_t)+",1 M"+(.5+_t)+",0 L"+(.5+_t)+",1 M"+(.5+_t)+",.5 L1,.5"},ee),"\u2560":(he={},he[1]=function(_t,yt){return"M"+(.5-_t)+",0 L"+(.5-_t)+",1 M1,"+(.5+yt)+" L"+(.5+_t)+","+(.5+yt)+" L"+(.5+_t)+",1 M1,"+(.5-yt)+" L"+(.5+_t)+","+(.5-yt)+" L"+(.5+_t)+",0"},he),"\u2561":(_e={},_e[1]=function(_t,yt){return"M.5,0 L.5,1 M0,"+(.5-yt)+" L.5,"+(.5-yt)+" M0,"+(.5+yt)+" L.5,"+(.5+yt)},_e),"\u2562":(ze={},ze[1]=function(_t,yt){return"M0,.5 L"+(.5-_t)+",.5 M"+(.5-_t)+",0 L"+(.5-_t)+",1 M"+(.5+_t)+",0 L"+(.5+_t)+",1"},ze),"\u2563":(Ve={},Ve[1]=function(_t,yt){return"M"+(.5+_t)+",0 L"+(.5+_t)+",1 M0,"+(.5+yt)+" L"+(.5-_t)+","+(.5+yt)+" L"+(.5-_t)+",1 M0,"+(.5-yt)+" L"+(.5-_t)+","+(.5-yt)+" L"+(.5-_t)+",0"},Ve),"\u2564":(We={},We[1]=function(_t,yt){return"M0,"+(.5-yt)+" L1,"+(.5-yt)+" M0,"+(.5+yt)+" L1,"+(.5+yt)+" M.5,"+(.5+yt)+" L.5,1"},We),"\u2565":(dt={},dt[1]=function(_t,yt){return"M0,.5 L1,.5 M"+(.5-_t)+",.5 L"+(.5-_t)+",1 M"+(.5+_t)+",.5 L"+(.5+_t)+",1"},dt),"\u2566":(ct={},ct[1]=function(_t,yt){return"M0,"+(.5-yt)+" L1,"+(.5-yt)+" M0,"+(.5+yt)+" L"+(.5-_t)+","+(.5+yt)+" L"+(.5-_t)+",1 M1,"+(.5+yt)+" L"+(.5+_t)+","+(.5+yt)+" L"+(.5+_t)+",1"},ct),"\u2567":(Rt={},Rt[1]=function(_t,yt){return"M.5,0 L.5,"+(.5-yt)+" M0,"+(.5-yt)+" L1,"+(.5-yt)+" M0,"+(.5+yt)+" L1,"+(.5+yt)},Rt),"\u2568":(hi={},hi[1]=function(_t,yt){return"M0,.5 L1,.5 M"+(.5-_t)+",.5 L"+(.5-_t)+",0 M"+(.5+_t)+",.5 L"+(.5+_t)+",0"},hi),"\u2569":(Ii={},Ii[1]=function(_t,yt){return"M0,"+(.5+yt)+" L1,"+(.5+yt)+" M0,"+(.5-yt)+" L"+(.5-_t)+","+(.5-yt)+" L"+(.5-_t)+",0 M1,"+(.5-yt)+" L"+(.5+_t)+","+(.5-yt)+" L"+(.5+_t)+",0"},Ii),"\u256A":(Hi={},Hi[1]=function(_t,yt){return"M.5,0 L.5,1 M0,"+(.5-yt)+" L1,"+(.5-yt)+" M0,"+(.5+yt)+" L1,"+(.5+yt)},Hi),"\u256B":(ji={},ji[1]=function(_t,yt){return"M0,.5 L1,.5 M"+(.5-_t)+",0 L"+(.5-_t)+",1 M"+(.5+_t)+",0 L"+(.5+_t)+",1"},ji),"\u256C":(xe={},xe[1]=function(_t,yt){return"M0,"+(.5+yt)+" L"+(.5-_t)+","+(.5+yt)+" L"+(.5-_t)+",1 M1,"+(.5+yt)+" L"+(.5+_t)+","+(.5+yt)+" L"+(.5+_t)+",1 M0,"+(.5-yt)+" L"+(.5-_t)+","+(.5-yt)+" L"+(.5-_t)+",0 M1,"+(.5-yt)+" L"+(.5+_t)+","+(.5-yt)+" L"+(.5+_t)+",0"},xe),"\u2571":(ot={},ot[1]="M1,0 L0,1",ot),"\u2572":(zt={},zt[1]="M0,0 L1,1",zt),"\u2573":(fi={},fi[1]="M1,0 L0,1 M0,0 L1,1",fi),"\u257C":(Qt={},Qt[1]="M.5,.5 L0,.5",Qt[3]="M.5,.5 L1,.5",Qt),"\u257D":(Qn={},Qn[1]="M.5,.5 L.5,0",Qn[3]="M.5,.5 L.5,1",Qn),"\u257E":(Lo={},Lo[1]="M.5,.5 L1,.5",Lo[3]="M.5,.5 L0,.5",Lo),"\u257F":(Qo={},Qo[1]="M.5,.5 L.5,1",Qo[3]="M.5,.5 L.5,0",Qo),"\u250D":(so={},so[1]="M.5,.5 L.5,1",so[3]="M.5,.5 L1,.5",so),"\u250E":(Lr={},Lr[1]="M.5,.5 L1,.5",Lr[3]="M.5,.5 L.5,1",Lr),"\u2511":(ao={},ao[1]="M.5,.5 L.5,1",ao[3]="M.5,.5 L0,.5",ao),"\u2512":(eo={},eo[1]="M.5,.5 L0,.5",eo[3]="M.5,.5 L.5,1",eo),"\u2515":(Co={},Co[1]="M.5,.5 L.5,0",Co[3]="M.5,.5 L1,.5",Co),"\u2516":(zs={},zs[1]="M.5,.5 L1,.5",zs[3]="M.5,.5 L.5,0",zs),"\u2519":(Ks={},Ks[1]="M.5,.5 L.5,0",Ks[3]="M.5,.5 L0,.5",Ks),"\u251A":(Vi={},Vi[1]="M.5,.5 L0,.5",Vi[3]="M.5,.5 L.5,0",Vi),"\u251D":(os={},os[1]="M.5,0 L.5,1",os[3]="M.5,.5 L1,.5",os),"\u251E":(re={},re[1]="M0.5,1 L.5,.5 L1,.5",re[3]="M.5,.5 L.5,0",re),"\u251F":(le={},le[1]="M.5,0 L.5,.5 L1,.5",le[3]="M.5,.5 L.5,1",le),"\u2520":(Ee={},Ee[1]="M.5,.5 L1,.5",Ee[3]="M.5,0 L.5,1",Ee),"\u2521":(ue={},ue[1]="M.5,.5 L.5,1",ue[3]="M.5,0 L.5,.5 L1,.5",ue),"\u2522":(me={},me[1]="M.5,.5 L.5,0",me[3]="M0.5,1 L.5,.5 L1,.5",me),"\u2525":(we={},we[1]="M.5,0 L.5,1",we[3]="M.5,.5 L0,.5",we),"\u2526":(ge={},ge[1]="M0,.5 L.5,.5 L.5,1",ge[3]="M.5,.5 L.5,0",ge),"\u2527":(Ue={},Ue[1]="M.5,0 L.5,.5 L0,.5",Ue[3]="M.5,.5 L.5,1",Ue),"\u2528":(ht={},ht[1]="M.5,.5 L0,.5",ht[3]="M.5,0 L.5,1",ht),"\u2529":(at={},at[1]="M.5,.5 L.5,1",at[3]="M.5,0 L.5,.5 L0,.5",at),"\u252A":(Bt={},Bt[1]="M.5,.5 L.5,0",Bt[3]="M0,.5 L.5,.5 L.5,1",Bt),"\u252D":(Gt={},Gt[1]="M0.5,1 L.5,.5 L1,.5",Gt[3]="M.5,.5 L0,.5",Gt),"\u252E":(ci={},ci[1]="M0,.5 L.5,.5 L.5,1",ci[3]="M.5,.5 L1,.5",ci),"\u252F":(wi={},wi[1]="M.5,.5 L.5,1",wi[3]="M0,.5 L1,.5",wi),"\u2530":(Ni={},Ni[1]="M0,.5 L1,.5",Ni[3]="M.5,.5 L.5,1",Ni),"\u2531":(di={},di[1]="M.5,.5 L1,.5",di[3]="M0,.5 L.5,.5 L.5,1",di),"\u2532":(yo={},yo[1]="M.5,.5 L0,.5",yo[3]="M0.5,1 L.5,.5 L1,.5",yo),"\u2535":(Rn={},Rn[1]="M.5,0 L.5,.5 L1,.5",Rn[3]="M.5,.5 L0,.5",Rn),"\u2536":(Ps={},Ps[1]="M.5,0 L.5,.5 L0,.5",Ps[3]="M.5,.5 L1,.5",Ps),"\u2537":(Ms={},Ms[1]="M.5,.5 L.5,0",Ms[3]="M0,.5 L1,.5",Ms),"\u2538":(As={},As[1]="M0,.5 L1,.5",As[3]="M.5,.5 L.5,0",As),"\u2539":(Ss={},Ss[1]="M.5,.5 L1,.5",Ss[3]="M.5,0 L.5,.5 L0,.5",Ss),"\u253A":(If={},If[1]="M.5,.5 L0,.5",If[3]="M.5,0 L.5,.5 L1,.5",If),"\u253D":(Dr={},Dr[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Dr[3]="M.5,.5 L0,.5",Dr),"\u253E":(fu={},fu[1]="M.5,0 L.5,1 M.5,.5 L0,.5",fu[3]="M.5,.5 L1,.5",fu),"\u253F":(Dh={},Dh[1]="M.5,0 L.5,1",Dh[3]="M0,.5 L1,.5",Dh),"\u2540":(Mg={},Mg[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Mg[3]="M.5,.5 L.5,0",Mg),"\u2541":(Rh={},Rh[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Rh[3]="M.5,.5 L.5,1",Rh),"\u2542":(kh={},kh[1]="M0,.5 L1,.5",kh[3]="M.5,0 L.5,1",kh),"\u2543":(Bg={},Bg[1]="M0.5,1 L.5,.5 L1,.5",Bg[3]="M.5,0 L.5,.5 L0,.5",Bg),"\u2544":(Sv={},Sv[1]="M0,.5 L.5,.5 L.5,1",Sv[3]="M.5,0 L.5,.5 L1,.5",Sv),"\u2545":(rC={},rC[1]="M.5,0 L.5,.5 L1,.5",rC[3]="M0,.5 L.5,.5 L.5,1",rC),"\u2546":(wv={},wv[1]="M.5,0 L.5,.5 L0,.5",wv[3]="M0.5,1 L.5,.5 L1,.5",wv),"\u2547":(Ev={},Ev[1]="M.5,.5 L.5,1",Ev[3]="M.5,.5 L.5,0 M0,.5 L1,.5",Ev),"\u2548":(pl={},pl[1]="M.5,.5 L.5,0",pl[3]="M0,.5 L1,.5 M.5,.5 L.5,1",pl),"\u2549":(Iv={},Iv[1]="M.5,.5 L1,.5",Iv[3]="M.5,0 L.5,1 M.5,.5 L0,.5",Iv),"\u254A":(Tf={},Tf[1]="M.5,.5 L0,.5",Tf[3]="M.5,0 L.5,1 M.5,.5 L1,.5",Tf),"\u254C":(Ud={},Ud[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",Ud),"\u254D":(oC={},oC[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",oC),"\u2504":(to={},to[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",to),"\u2505":(Fg={},Fg[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",Fg),"\u2508":(Ug={},Ug[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",Ug),"\u2509":(sC={},sC[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",sC),"\u254E":(Fc={},Fc[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Fc),"\u254F":(Tv={},Tv[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",Tv),"\u2506":(Lm={},Lm[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",Lm),"\u2507":(hA={},hA[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",hA),"\u250A":(xv={},xv[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",xv),"\u250B":(gu={},gu[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",gu),"\u256D":(Dm={},Dm[1]="C.5,1,.5,.5,1,.5",Dm),"\u256E":(Nh={},Nh[1]="C.5,1,.5,.5,0,.5",Nh),"\u256F":(aC={},aC[1]="C.5,0,.5,.5,0,.5",aC),"\u2570":(Rm={},Rm[1]="C.5,0,.5,.5,1,.5",Rm)},a.tryDrawCustomChar=function(_t,yt,_l,qo,Bs,Yo){var ac=a.blockElementDefinitions[yt];if(ac)return function(Do,lc,Wg,Lf,Rr,Pr){for(var pu=0;pu<lc.length;pu++){var cc=lc[pu],ws=Rr/8,Wd=Pr/8;Do.fillRect(Wg+cc.x*ws,Lf+cc.y*Wd,cc.w*ws,cc.h*Wd)}}(_t,ac,_l,qo,Bs,Yo),!0;var Ea=fA[yt];if(Ea)return function(Do,lc,Wg,Lf,Rr,Pr){var pu,cc=Lv.get(lc);cc||(cc=new Map,Lv.set(lc,cc));var ws=Do.fillStyle;if(typeof ws!="string")throw new Error('Unexpected fillStyle type "'+ws+'"');var Wd=cc.get(ws);if(!Wd){var Gu=lc[0].length,Df=lc.length,Oh=document.createElement("canvas");Oh.width=Gu,Oh.height=Df;var Rf=(0,nT.throwIfFalsy)(Oh.getContext("2d")),Fo=new ImageData(Gu,Df),Hd=void 0,vl=void 0,lC=void 0,Nm=void 0;if(ws.startsWith("#"))Hd=parseInt(ws.substr(1,2),16),vl=parseInt(ws.substr(3,2),16),lC=parseInt(ws.substr(5,2),16),Nm=ws.length>7&&parseInt(ws.substr(7,2),16)||1;else{if(!ws.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+ws+'" when drawing pattern glyph');Hd=(pu=ws.substring(5,ws.length-1).split(",").map(function(Uc){return parseFloat(Uc)}))[0],vl=pu[1],lC=pu[2],Nm=pu[3]}for(var Ia=0;Ia<Df;Ia++)for(var Ph=0;Ph<Gu;Ph++)Fo.data[4*(Ia*Gu+Ph)]=Hd,Fo.data[4*(Ia*Gu+Ph)+1]=vl,Fo.data[4*(Ia*Gu+Ph)+2]=lC,Fo.data[4*(Ia*Gu+Ph)+3]=lc[Ia][Ph]*(255*Nm);Rf.putImageData(Fo,0,0),Wd=(0,nT.throwIfFalsy)(Do.createPattern(Oh,null)),cc.set(ws,Wd)}Do.fillStyle=Wd,Do.fillRect(Wg,Lf,Rr,Pr)}(_t,Ea,_l,qo,Bs,Yo),!0;var km=a.boxDrawingDefinitions[yt];return!!km&&(function(Do,lc,Wg,Lf,Rr,Pr){Do.strokeStyle=Do.fillStyle;for(var pu=0,cc=Object.entries(lc);pu<cc.length;pu++){var ws=cc[pu],Wd=ws[0],Gu=ws[1];Do.beginPath(),Do.lineWidth=window.devicePixelRatio*Number.parseInt(Wd);for(var Df=0,Oh=(typeof Gu=="function"?Gu(.15,.15/Pr*Rr):Gu).split(" ");Df<Oh.length;Df++){var Rf=Oh[Df],Fo=Rf[0],Hd=ml[Fo];if(Hd){var vl=Rf.substring(1).split(",");vl[0]&&vl[1]&&Hd(Do,B2(vl,Rr,Pr,Wg,Lf))}else console.error('Could not find drawing instructions for "'+Fo+'"')}Do.stroke(),Do.closePath()}}(_t,km,_l,qo,Bs,Yo),!0)};var Lv=new Map;function xf(_t,yt,_l){return _l===void 0&&(_l=0),Math.max(Math.min(_t,yt),_l)}var ml={C:function(_t,yt){return _t.bezierCurveTo(yt[0],yt[1],yt[2],yt[3],yt[4],yt[5])},L:function(_t,yt){return _t.lineTo(yt[0],yt[1])},M:function(_t,yt){return _t.moveTo(yt[0],yt[1])}};function B2(_t,yt,_l,qo,Bs){var Yo=_t.map(function(km){return parseFloat(km)||parseInt(km)});if(Yo.length<2)throw new Error("Too few arguments for instruction");for(var ac=0;ac<Yo.length;ac+=2)Yo[ac]*=yt,Yo[ac]!==0&&(Yo[ac]=xf(Math.round(Yo[ac]+.5)-.5,yt,0)),Yo[ac]+=qo;for(var Ea=1;Ea<Yo.length;Ea+=2)Yo[Ea]*=_l,Yo[Ea]!==0&&(Yo[Ea]=xf(Math.round(Yo[Ea]+.5)-.5,_l,0)),Yo[Ea]+=Bs;return Yo}},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 g=this.cache[h].length;g<d;g++)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(b,A){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(v[T]=w[T])},c(b,A)},function(b,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function v(){this.constructor=b}c(b,A),b.prototype=A===null?Object.create(A):(v.prototype=A.prototype,new v)}),d=this&&this.__decorate||function(b,A,v,w){var T,I=arguments.length,x=I<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(b,A,v,w);else for(var L=b.length-1;L>=0;L--)(T=b[L])&&(x=(I<3?T(x):I>3?T(A,v,x):T(A,v))||x);return I>3&&x&&Object.defineProperty(A,v,x),x},h=this&&this.__param||function(b,A){return function(v,w){A(v,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;var g=l(1546),m=l(8803),C=l(2040),y=l(2585),S=function(b){function A(v,w,T,I,x,L,O,P){var N=b.call(this,v,"link",w,!0,T,I,O,P)||this;return x.onShowLinkUnderline(function(M){return N._onShowLinkUnderline(M)}),x.onHideLinkUnderline(function(M){return N._onHideLinkUnderline(M)}),L.onShowLinkUnderline(function(M){return N._onShowLinkUnderline(M)}),L.onHideLinkUnderline(function(M){return N._onHideLinkUnderline(M)}),N}return u(A,b),A.prototype.resize=function(v){b.prototype.resize.call(this,v),this._state=void 0},A.prototype.reset=function(){this._clearCurrentLink()},A.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var v=this._state.y2-this._state.y1-1;v>0&&this._clearCells(0,this._state.y1+1,this._state.cols,v),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},A.prototype._onShowLinkUnderline=function(v){if(v.fg===m.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:v.fg&&(0,C.is256Color)(v.fg)?this._ctx.fillStyle=this._colors.ansi[v.fg].css:this._ctx.fillStyle=this._colors.foreground.css,v.y1===v.y2)this._fillBottomLineAtCells(v.x1,v.y1,v.x2-v.x1);else{this._fillBottomLineAtCells(v.x1,v.y1,v.cols-v.x1);for(var w=v.y1+1;w<v.y2;w++)this._fillBottomLineAtCells(0,w,v.cols);this._fillBottomLineAtCells(0,v.y2,v.x2)}this._state=v},A.prototype._onHideLinkUnderline=function(v){this._clearCurrentLink()},d([h(6,y.IBufferService),h(7,y.IOptionsService)],A)}(g.BaseRenderLayer);a.LinkRenderLayer=S},3525:function(s,a,l){var c,u=this&&this.__extends||(c=function(x,L){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,P){O.__proto__=P}||function(O,P){for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&(O[N]=P[N])},c(x,L)},function(x,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function O(){this.constructor=x}c(x,L),x.prototype=L===null?Object.create(L):(O.prototype=L.prototype,new O)}),d=this&&this.__decorate||function(x,L,O,P){var N,M=arguments.length,W=M<3?L:P===null?P=Object.getOwnPropertyDescriptor(L,O):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(x,L,O,P);else for(var U=x.length-1;U>=0;U--)(N=x[U])&&(W=(M<3?N(W):M>3?N(L,O,W):N(L,O))||W);return M>3&&W&&Object.defineProperty(L,O,W),W},h=this&&this.__param||function(x,L){return function(O,P){L(O,P,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Renderer=void 0;var g=l(9596),m=l(4149),C=l(2512),y=l(5098),S=l(844),b=l(4725),A=l(2585),v=l(1420),w=l(8460),T=1,I=function(x){function L(O,P,N,M,W,U,z,j){var $=x.call(this)||this;$._colors=O,$._screenElement=P,$._bufferService=U,$._charSizeService=z,$._optionsService=j,$._id=T++,$._onRequestRedraw=new w.EventEmitter;var G=$._optionsService.options.allowTransparency;return $._renderLayers=[W.createInstance(g.TextRenderLayer,$._screenElement,0,$._colors,G,$._id),W.createInstance(m.SelectionRenderLayer,$._screenElement,1,$._colors,$._id),W.createInstance(y.LinkRenderLayer,$._screenElement,2,$._colors,$._id,N,M),W.createInstance(C.CursorRenderLayer,$._screenElement,3,$._colors,$._id,$._onRequestRedraw)],$.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},$._devicePixelRatio=window.devicePixelRatio,$._updateDimensions(),$.onOptionsChanged(),$}return u(L,x),Object.defineProperty(L.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),L.prototype.dispose=function(){for(var O=0,P=this._renderLayers;O<P.length;O++)P[O].dispose();x.prototype.dispose.call(this),(0,v.removeTerminalFromCache)(this._id)},L.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},L.prototype.setColors=function(O){this._colors=O;for(var P=0,N=this._renderLayers;P<N.length;P++){var M=N[P];M.setColors(this._colors),M.reset()}},L.prototype.onResize=function(O,P){this._updateDimensions();for(var N=0,M=this._renderLayers;N<M.length;N++)M[N].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},L.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},L.prototype.onBlur=function(){this._runOperation(function(O){return O.onBlur()})},L.prototype.onFocus=function(){this._runOperation(function(O){return O.onFocus()})},L.prototype.onSelectionChanged=function(O,P,N){N===void 0&&(N=!1),this._runOperation(function(M){return M.onSelectionChanged(O,P,N)})},L.prototype.onCursorMove=function(){this._runOperation(function(O){return O.onCursorMove()})},L.prototype.onOptionsChanged=function(){this._runOperation(function(O){return O.onOptionsChanged()})},L.prototype.clear=function(){this._runOperation(function(O){return O.reset()})},L.prototype._runOperation=function(O){for(var P=0,N=this._renderLayers;P<N.length;P++)O(N[P])},L.prototype.renderRows=function(O,P){for(var N=0,M=this._renderLayers;N<M.length;N++)M[N].onGridChanged(O,P)},L.prototype.clearTextureAtlas=function(){for(var O=0,P=this._renderLayers;O<P.length;O++)P[O].clearTextureAtlas()},L.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,A.IInstantiationService),h(5,A.IBufferService),h(6,b.ICharSizeService),h(7,A.IOptionsService)],L)}(S.Disposable);a.Renderer=I},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(y,S){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,A){b.__proto__=A}||function(b,A){for(var v in A)Object.prototype.hasOwnProperty.call(A,v)&&(b[v]=A[v])},c(y,S)},function(y,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function b(){this.constructor=y}c(y,S),y.prototype=S===null?Object.create(S):(b.prototype=S.prototype,new b)}),d=this&&this.__decorate||function(y,S,b,A){var v,w=arguments.length,T=w<3?S:A===null?A=Object.getOwnPropertyDescriptor(S,b):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(y,S,b,A);else for(var I=y.length-1;I>=0;I--)(v=y[I])&&(T=(w<3?v(T):w>3?v(S,b,T):v(S,b))||T);return w>3&&T&&Object.defineProperty(S,b,T),T},h=this&&this.__param||function(y,S){return function(b,A){S(b,A,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionRenderLayer=void 0;var g=l(1546),m=l(2585),C=function(y){function S(b,A,v,w,T,I){var x=y.call(this,b,"selection",A,!0,v,w,T,I)||this;return x._clearState(),x}return u(S,y),S.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},S.prototype.resize=function(b){y.prototype.resize.call(this,b),this._clearState()},S.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},S.prototype.onSelectionChanged=function(b,A,v){if(this._didStateChange(b,A,v,this._bufferService.buffer.ydisp))if(this._clearAll(),b&&A){var w=b[1]-this._bufferService.buffer.ydisp,T=A[1]-this._bufferService.buffer.ydisp,I=Math.max(w,0),x=Math.min(T,this._bufferService.rows-1);if(I>=this._bufferService.rows||x<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,v){var L=b[0],O=A[0]-L,P=x-I+1;this._fillCells(L,I,O,P)}else{L=w===I?b[0]:0;var N=I===T?A[0]:this._bufferService.cols;this._fillCells(L,I,N-L,1);var M=Math.max(x-I-1,0);if(this._fillCells(0,I+1,this._bufferService.cols,M),I!==x){var W=T===x?A[0]:this._bufferService.cols;this._fillCells(0,x,W,1)}}this._state.start=[b[0],b[1]],this._state.end=[A[0],A[1]],this._state.columnSelectMode=v,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},S.prototype._didStateChange=function(b,A,v,w){return!this._areCoordinatesEqual(b,this._state.start)||!this._areCoordinatesEqual(A,this._state.end)||v!==this._state.columnSelectMode||w!==this._state.ydisp},S.prototype._areCoordinatesEqual=function(b,A){return!(!b||!A)&&b[0]===A[0]&&b[1]===A[1]},d([h(4,m.IBufferService),h(5,m.IOptionsService)],S)}(g.BaseRenderLayer);a.SelectionRenderLayer=C},9596:function(s,a,l){var c,u=this&&this.__extends||(c=function(T,I){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,L){x.__proto__=L}||function(x,L){for(var O in L)Object.prototype.hasOwnProperty.call(L,O)&&(x[O]=L[O])},c(T,I)},function(T,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");function x(){this.constructor=T}c(T,I),T.prototype=I===null?Object.create(I):(x.prototype=I.prototype,new x)}),d=this&&this.__decorate||function(T,I,x,L){var O,P=arguments.length,N=P<3?I:L===null?L=Object.getOwnPropertyDescriptor(I,x):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(T,I,x,L);else for(var M=T.length-1;M>=0;M--)(O=T[M])&&(N=(P<3?O(N):P>3?O(I,x,N):O(I,x))||N);return P>3&&N&&Object.defineProperty(I,x,N),N},h=this&&this.__param||function(T,I){return function(x,L){I(x,L,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.TextRenderLayer=void 0;var g=l(3700),m=l(1546),C=l(3734),y=l(643),S=l(511),b=l(2585),A=l(4725),v=l(4269),w=function(T){function I(x,L,O,P,N,M,W,U){var z=T.call(this,x,"text",L,P,O,N,M,W)||this;return z._characterJoinerService=U,z._characterWidth=0,z._characterFont="",z._characterOverlapCache={},z._workCell=new S.CellData,z._state=new g.GridCache,z}return u(I,T),I.prototype.resize=function(x){T.prototype.resize.call(this,x);var L=this._getFont(!1,!1);this._characterWidth===x.scaledCharWidth&&this._characterFont===L||(this._characterWidth=x.scaledCharWidth,this._characterFont=L,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},I.prototype.reset=function(){this._state.clear(),this._clearAll()},I.prototype._forEachCell=function(x,L,O){for(var P=x;P<=L;P++)for(var N=P+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.lines.get(N),W=this._characterJoinerService.getJoinedCharacters(N),U=0;U<this._bufferService.cols;U++){M.loadCell(U,this._workCell);var z=this._workCell,j=!1,$=U;if(z.getWidth()!==0){if(W.length>0&&U===W[0][0]){j=!0;var G=W.shift();z=new v.JoinedCellData(this._workCell,M.translateToString(!0,G[0],G[1]),G[1]-G[0]),$=G[1]-1}!j&&this._isOverlapping(z)&&$<M.length-1&&M.getCodePoint($+1)===y.NULL_CELL_CODE&&(z.content&=-12582913,z.content|=2<<22),O(z,U,P),U=$}}},I.prototype._drawBackground=function(x,L){var O=this,P=this._ctx,N=this._bufferService.cols,M=0,W=0,U=null;P.save(),this._forEachCell(x,L,function(z,j,$){var G=null;z.isInverse()?G=z.isFgDefault()?O._colors.foreground.css:z.isFgRGB()?"rgb("+C.AttributeData.toColorRGB(z.getFgColor()).join(",")+")":O._colors.ansi[z.getFgColor()].css:z.isBgRGB()?G="rgb("+C.AttributeData.toColorRGB(z.getBgColor()).join(",")+")":z.isBgPalette()&&(G=O._colors.ansi[z.getBgColor()].css),U===null&&(M=j,W=$),$!==W?(P.fillStyle=U||"",O._fillCells(M,W,N-M,1),M=j,W=$):U!==G&&(P.fillStyle=U||"",O._fillCells(M,W,j-M,1),M=j,W=$),U=G}),U!==null&&(P.fillStyle=U,this._fillCells(M,W,N-M,1)),P.restore()},I.prototype._drawForeground=function(x,L){var O=this;this._forEachCell(x,L,function(P,N,M){if(!P.isInvisible()&&(O._drawChars(P,N,M),P.isUnderline()||P.isStrikethrough())){if(O._ctx.save(),P.isInverse())if(P.isBgDefault())O._ctx.fillStyle=O._colors.background.css;else if(P.isBgRGB())O._ctx.fillStyle="rgb("+C.AttributeData.toColorRGB(P.getBgColor()).join(",")+")";else{var W=P.getBgColor();O._optionsService.options.drawBoldTextInBrightColors&&P.isBold()&&W<8&&(W+=8),O._ctx.fillStyle=O._colors.ansi[W].css}else if(P.isFgDefault())O._ctx.fillStyle=O._colors.foreground.css;else if(P.isFgRGB())O._ctx.fillStyle="rgb("+C.AttributeData.toColorRGB(P.getFgColor()).join(",")+")";else{var U=P.getFgColor();O._optionsService.options.drawBoldTextInBrightColors&&P.isBold()&&U<8&&(U+=8),O._ctx.fillStyle=O._colors.ansi[U].css}P.isStrikethrough()&&O._fillMiddleLineAtCells(N,M,P.getWidth()),P.isUnderline()&&O._fillBottomLineAtCells(N,M,P.getWidth()),O._ctx.restore()}})},I.prototype.onGridChanged=function(x,L){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,x,this._bufferService.cols,L-x+1),this._drawBackground(x,L),this._drawForeground(x,L))},I.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},I.prototype._isOverlapping=function(x){if(x.getWidth()!==1||x.getCode()<256)return!1;var L=x.getChars();if(this._characterOverlapCache.hasOwnProperty(L))return this._characterOverlapCache[L];this._ctx.save(),this._ctx.font=this._characterFont;var O=Math.floor(this._ctx.measureText(L).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[L]=O,O},d([h(5,b.IBufferService),h(6,b.IOptionsService),h(7,A.ICharacterJoinerService)],I)}(m.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,g,m,C,y){for(var S=(0,c.generateConfig)(C,y,h,m),b=0;b<d.length;b++){var A=(v=d[b]).ownedBy.indexOf(g);if(A>=0){if((0,c.configEquals)(v.config,S))return v.atlas;v.ownedBy.length===1?(v.atlas.dispose(),d.splice(b,1)):v.ownedBy.splice(A,1);break}}for(b=0;b<d.length;b++){var v=d[b];if((0,c.configEquals)(v.config,S))return v.ownedBy.push(g),v.atlas}var w={atlas:new u.DynamicCharAtlas(document,S),config:S,ownedBy:[g]};return d.push(w),w.atlas},a.removeTerminalFromCache=function(h){for(var g=0;g<d.length;g++){var m=d[g].ownedBy.indexOf(h);if(m!==-1){d[g].ownedBy.length===1?(d[g].atlas.dispose(),d.splice(g,1)):d[g].ownedBy.splice(m,1);break}}}},2040:function(s,a,l){var c=this&&this.__spreadArray||function(d,h,g){if(g||arguments.length===2)for(var m,C=0,y=h.length;C<y;C++)!m&&C in h||(m||(m=Array.prototype.slice.call(h,0,C)),m[C]=h[C]);return d.concat(m||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,g,m){var C={foreground:m.foreground,background:m.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:c([],m.ansi,!0)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:d,scaledCharHeight:h,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,colors:C}},a.configEquals=function(d,h){for(var g=0;g<d.colors.ansi.length;g++)if(d.colors.ansi[g].rgba!==h.colors.ansi[g].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(L,O){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,N){P.__proto__=N}||function(P,N){for(var M in N)Object.prototype.hasOwnProperty.call(N,M)&&(P[M]=N[M])},c(L,O)},function(L,O){if(typeof O!="function"&&O!==null)throw new TypeError("Class extends value "+String(O)+" is not a constructor or null");function P(){this.constructor=L}c(L,O),L.prototype=O===null?Object.create(O):(P.prototype=O.prototype,new P)});Object.defineProperty(a,"__esModule",{value:!0}),a.NoneCharAtlas=a.DynamicCharAtlas=a.getGlyphCacheKey=void 0;var d=l(8803),h=l(9616),g=l(5680),m=l(7001),C=l(6114),y=l(1752),S=l(4774),b=1024,A=1024,v={css:"rgba(0, 0, 0, 0)",rgba:0};function w(L){return L.code<<21|L.bg<<12|L.fg<<3|(L.bold?0:4)+(L.dim?0:2)+(L.italic?0:1)}a.getGlyphCacheKey=w;var T=function(L){function O(P,N){var M=L.call(this)||this;M._config=N,M._drawToCacheCount=0,M._glyphsWaitingOnBitmap=[],M._bitmapCommitTimeout=null,M._bitmap=null,M._cacheCanvas=P.createElement("canvas"),M._cacheCanvas.width=b,M._cacheCanvas.height=A,M._cacheCtx=(0,y.throwIfFalsy)(M._cacheCanvas.getContext("2d",{alpha:!0}));var W=P.createElement("canvas");W.width=M._config.scaledCharWidth,W.height=M._config.scaledCharHeight,M._tmpCtx=(0,y.throwIfFalsy)(W.getContext("2d",{alpha:M._config.allowTransparency})),M._width=Math.floor(b/M._config.scaledCharWidth),M._height=Math.floor(A/M._config.scaledCharHeight);var U=M._width*M._height;return M._cacheMap=new m.LRUMap(U),M._cacheMap.prealloc(U),M}return u(O,L),O.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},O.prototype.beginFrame=function(){this._drawToCacheCount=0},O.prototype.clear=function(){if(this._cacheMap.size>0){var P=this._width*this._height;this._cacheMap=new m.LRUMap(P),this._cacheMap.prealloc(P)}this._cacheCtx.clearRect(0,0,b,A),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},O.prototype.draw=function(P,N,M,W){if(N.code===32)return!0;if(!this._canCache(N))return!1;var U=w(N),z=this._cacheMap.get(U);if(z!=null)return this._drawFromCache(P,z,M,W),!0;if(this._drawToCacheCount<100){var j;j=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var $=this._drawToCache(N,j);return this._cacheMap.set(U,$),this._drawFromCache(P,$,M,W),!0}return!1},O.prototype._canCache=function(P){return P.code<256},O.prototype._toCoordinateX=function(P){return P%this._width*this._config.scaledCharWidth},O.prototype._toCoordinateY=function(P){return Math.floor(P/this._width)*this._config.scaledCharHeight},O.prototype._drawFromCache=function(P,N,M,W){if(!N.isEmpty){var U=this._toCoordinateX(N.index),z=this._toCoordinateY(N.index);P.drawImage(N.inBitmap?this._bitmap:this._cacheCanvas,U,z,this._config.scaledCharWidth,this._config.scaledCharHeight,M,W,this._config.scaledCharWidth,this._config.scaledCharHeight)}},O.prototype._getColorFromAnsiIndex=function(P){return P<this._config.colors.ansi.length?this._config.colors.ansi[P]:g.DEFAULT_ANSI_COLORS[P]},O.prototype._getBackgroundColor=function(P){return this._config.allowTransparency?v:P.bg===d.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:P.bg<256?this._getColorFromAnsiIndex(P.bg):this._config.colors.background},O.prototype._getForegroundColor=function(P){return P.fg===d.INVERTED_DEFAULT_COLOR?S.color.opaque(this._config.colors.background):P.fg<256?this._getColorFromAnsiIndex(P.fg):this._config.colors.foreground},O.prototype._drawToCache=function(P,N){this._drawToCacheCount++,this._tmpCtx.save();var M=this._getBackgroundColor(P);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=M.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var W=P.bold?this._config.fontWeightBold:this._config.fontWeight,U=P.italic?"italic":"";this._tmpCtx.font=U+" "+W+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=d.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(P).css,P.dim&&(this._tmpCtx.globalAlpha=d.DIM_OPACITY),this._tmpCtx.fillText(P.chars,0,this._config.scaledCharHeight);var z=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),j=!1;if(this._config.allowTransparency||(j=x(z,M)),j&&P.chars==="_"&&!this._config.allowTransparency)for(var $=1;$<=5&&(this._tmpCtx.fillText(P.chars,0,this._config.scaledCharHeight-$),j=x(z=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),M));$++);this._tmpCtx.restore();var G=this._toCoordinateX(N),J=this._toCoordinateY(N);this._cacheCtx.putImageData(z,G,J);var q={index:N,isEmpty:j,inBitmap:!1};return this._addGlyphToBitmap(q),q},O.prototype._addGlyphToBitmap=function(P){var N=this;!("createImageBitmap"in window)||C.isFirefox||C.isSafari||(this._glyphsWaitingOnBitmap.push(P),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return N._generateBitmap()},100)))},O.prototype._generateBitmap=function(){var P=this,N=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(M){P._bitmap=M;for(var W=0;W<N.length;W++)N[W].inBitmap=!0}),this._bitmapCommitTimeout=null},O}(h.BaseCharAtlas);a.DynamicCharAtlas=T;var I=function(L){function O(P,N){return L.call(this)||this}return u(O,L),O.prototype.draw=function(P,N,M,W){return!1},O}(h.BaseCharAtlas);function x(L,O){for(var P=!0,N=O.rgba>>>24,M=O.rgba>>>16&255,W=O.rgba>>>8&255,U=0;U<L.data.length;U+=4)L.data[U]===N&&L.data[U+1]===M&&L.data[U+2]===W?L.data[U+3]=0:P=!1;return P}a.NoneCharAtlas=I},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 g=this._nodePool;g.length>0?((h=g.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(P,N){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,W){M.__proto__=W}||function(M,W){for(var U in W)Object.prototype.hasOwnProperty.call(W,U)&&(M[U]=W[U])},c(P,N)},function(P,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function M(){this.constructor=P}c(P,N),P.prototype=N===null?Object.create(N):(M.prototype=N.prototype,new M)}),d=this&&this.__decorate||function(P,N,M,W){var U,z=arguments.length,j=z<3?N:W===null?W=Object.getOwnPropertyDescriptor(N,M):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(P,N,M,W);else for(var $=P.length-1;$>=0;$--)(U=P[$])&&(j=(z<3?U(j):z>3?U(N,M,j):U(N,M))||j);return z>3&&j&&Object.defineProperty(N,M,j),j},h=this&&this.__param||function(P,N){return function(M,W){N(M,W,P)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;var g=l(3787),m=l(8803),C=l(844),y=l(4725),S=l(2585),b=l(8460),A=l(4774),v=l(9631),w="xterm-dom-renderer-owner-",T="xterm-fg-",I="xterm-bg-",x="xterm-focus",L=1,O=function(P){function N(M,W,U,z,j,$,G,J,q,Z){var ne=P.call(this)||this;return ne._colors=M,ne._element=W,ne._screenElement=U,ne._viewportElement=z,ne._linkifier=j,ne._linkifier2=$,ne._charSizeService=J,ne._optionsService=q,ne._bufferService=Z,ne._terminalClass=L++,ne._rowElements=[],ne._rowContainer=document.createElement("div"),ne._rowContainer.classList.add("xterm-rows"),ne._rowContainer.style.lineHeight="normal",ne._rowContainer.setAttribute("aria-hidden","true"),ne._refreshRowElements(ne._bufferService.cols,ne._bufferService.rows),ne._selectionContainer=document.createElement("div"),ne._selectionContainer.classList.add("xterm-selection"),ne._selectionContainer.setAttribute("aria-hidden","true"),ne.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},ne._updateDimensions(),ne._injectCss(),ne._rowFactory=G.createInstance(g.DomRendererRowFactory,document,ne._colors),ne._element.classList.add(w+ne._terminalClass),ne._screenElement.appendChild(ne._rowContainer),ne._screenElement.appendChild(ne._selectionContainer),ne._linkifier.onShowLinkUnderline(function(fe){return ne._onLinkHover(fe)}),ne._linkifier.onHideLinkUnderline(function(fe){return ne._onLinkLeave(fe)}),ne._linkifier2.onShowLinkUnderline(function(fe){return ne._onLinkHover(fe)}),ne._linkifier2.onHideLinkUnderline(function(fe){return ne._onLinkLeave(fe)}),ne}return u(N,P),Object.defineProperty(N.prototype,"onRequestRedraw",{get:function(){return new b.EventEmitter().event},enumerable:!1,configurable:!0}),N.prototype.dispose=function(){this._element.classList.remove(w+this._terminalClass),(0,v.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),P.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 M=0,W=this._rowElements;M<W.length;M++){var U=W[M];U.style.width=this.dimensions.canvasWidth+"px",U.style.height=this.dimensions.actualCellHeight+"px",U.style.lineHeight=this.dimensions.actualCellHeight+"px",U.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var z=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=z,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(M){this._colors=M,this._injectCss()},N.prototype._injectCss=function(){var M=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var W=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";W+=this._terminalSelector+" span:not(."+g.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+g.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+g.ITALIC_CLASS+" { font-style: italic;}",W+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",W+="@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+"; }}",W+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+g.CURSOR_CLASS+"."+g.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+g.CURSOR_CLASS+"."+g.CURSOR_BLINK_CLASS+":not(."+g.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+g.CURSOR_CLASS+"."+g.CURSOR_BLINK_CLASS+"."+g.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+g.CURSOR_CLASS+"."+g.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+g.CURSOR_CLASS+"."+g.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+g.CURSOR_CLASS+"."+g.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",W+=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(U,z){W+=M._terminalSelector+" ."+T+z+" { color: "+U.css+"; }"+M._terminalSelector+" ."+I+z+" { background-color: "+U.css+"; }"}),W+=this._terminalSelector+" ."+T+m.INVERTED_DEFAULT_COLOR+" { color: "+A.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+I+m.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=W},N.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},N.prototype._refreshRowElements=function(M,W){for(var U=this._rowElements.length;U<=W;U++){var z=document.createElement("div");this._rowContainer.appendChild(z),this._rowElements.push(z)}for(;this._rowElements.length>W;)this._rowContainer.removeChild(this._rowElements.pop())},N.prototype.onResize=function(M,W){this._refreshRowElements(M,W),this._updateDimensions()},N.prototype.onCharSizeChanged=function(){this._updateDimensions()},N.prototype.onBlur=function(){this._rowContainer.classList.remove(x)},N.prototype.onFocus=function(){this._rowContainer.classList.add(x)},N.prototype.onSelectionChanged=function(M,W,U){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(M&&W){var z=M[1]-this._bufferService.buffer.ydisp,j=W[1]-this._bufferService.buffer.ydisp,$=Math.max(z,0),G=Math.min(j,this._bufferService.rows-1);if(!($>=this._bufferService.rows||G<0)){var J=document.createDocumentFragment();if(U)J.appendChild(this._createSelectionElement($,M[0],W[0],G-$+1));else{var q=z===$?M[0]:0,Z=$===j?W[0]:this._bufferService.cols;J.appendChild(this._createSelectionElement($,q,Z));var ne=G-$-1;if(J.appendChild(this._createSelectionElement($+1,0,this._bufferService.cols,ne)),$!==G){var fe=j===G?W[0]:this._bufferService.cols;J.appendChild(this._createSelectionElement(G,0,fe))}}this._selectionContainer.appendChild(J)}}},N.prototype._createSelectionElement=function(M,W,U,z){z===void 0&&(z=1);var j=document.createElement("div");return j.style.height=z*this.dimensions.actualCellHeight+"px",j.style.top=M*this.dimensions.actualCellHeight+"px",j.style.left=W*this.dimensions.actualCellWidth+"px",j.style.width=this.dimensions.actualCellWidth*(U-W)+"px",j},N.prototype.onCursorMove=function(){},N.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},N.prototype.clear=function(){for(var M=0,W=this._rowElements;M<W.length;M++)W[M].innerText=""},N.prototype.renderRows=function(M,W){for(var U=this._bufferService.buffer.ybase+this._bufferService.buffer.y,z=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),j=this._optionsService.options.cursorBlink,$=M;$<=W;$++){var G=this._rowElements[$];G.innerText="";var J=$+this._bufferService.buffer.ydisp,q=this._bufferService.buffer.lines.get(J),Z=this._optionsService.options.cursorStyle;G.appendChild(this._rowFactory.createRow(q,J,J===U,Z,z,j,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(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)},N.prototype._onLinkLeave=function(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)},N.prototype._setCellUnderline=function(M,W,U,z,j,$){for(;M!==W||U!==z;){var G=this._rowElements[U];if(!G)return;var J=G.children[M];J&&(J.style.textDecoration=$?"underline":"none"),++M>=j&&(M=0,U++)}},d([h(6,S.IInstantiationService),h(7,y.ICharSizeService),h(8,S.IOptionsService),h(9,S.IBufferService)],N)}(C.Disposable);a.DomRenderer=O},3787:function(s,a,l){var c=this&&this.__decorate||function(v,w,T,I){var x,L=arguments.length,O=L<3?w:I===null?I=Object.getOwnPropertyDescriptor(w,T):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(v,w,T,I);else for(var P=v.length-1;P>=0;P--)(x=v[P])&&(O=(L<3?x(O):L>3?x(w,T,O):x(w,T))||O);return L>3&&O&&Object.defineProperty(w,T,O),O},u=this&&this.__param||function(v,w){return function(T,I){w(T,I,v)}};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),g=l(511),m=l(2585),C=l(4774),y=l(4725),S=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 b=function(){function v(w,T,I,x,L){this._document=w,this._colors=T,this._characterJoinerService=I,this._optionsService=x,this._coreService=L,this._workCell=new g.CellData}return v.prototype.setColors=function(w){this._colors=w},v.prototype.createRow=function(w,T,I,x,L,O,P,N){for(var M=this._document.createDocumentFragment(),W=this._characterJoinerService.getJoinedCharacters(T),U=0,z=Math.min(w.length,N)-1;z>=0;z--)if(w.loadCell(z,this._workCell).getCode()!==h.NULL_CELL_CODE||I&&z===L){U=z+1;break}for(z=0;z<U;z++){w.loadCell(z,this._workCell);var j=this._workCell.getWidth();if(j!==0){var $=!1,G=z,J=this._workCell;if(W.length>0&&z===W[0][0]){$=!0;var q=W.shift();J=new S.JoinedCellData(this._workCell,w.translateToString(!0,q[0],q[1]),q[1]-q[0]),G=q[1]-1,j=J.getWidth()}var Z=this._document.createElement("span");if(j>1&&(Z.style.width=P*j+"px"),$&&(Z.style.display="inline",L>=z&&L<=G&&(L=z)),!this._coreService.isCursorHidden&&I&&z===L)switch(Z.classList.add(a.CURSOR_CLASS),O&&Z.classList.add(a.CURSOR_BLINK_CLASS),x){case"bar":Z.classList.add(a.CURSOR_STYLE_BAR_CLASS);break;case"underline":Z.classList.add(a.CURSOR_STYLE_UNDERLINE_CLASS);break;default:Z.classList.add(a.CURSOR_STYLE_BLOCK_CLASS)}J.isBold()&&Z.classList.add(a.BOLD_CLASS),J.isItalic()&&Z.classList.add(a.ITALIC_CLASS),J.isDim()&&Z.classList.add(a.DIM_CLASS),J.isUnderline()&&Z.classList.add(a.UNDERLINE_CLASS),J.isInvisible()?Z.textContent=h.WHITESPACE_CELL_CHAR:Z.textContent=J.getChars()||h.WHITESPACE_CELL_CHAR,J.isStrikethrough()&&Z.classList.add(a.STRIKETHROUGH_CLASS);var ne=J.getFgColor(),fe=J.getFgColorMode(),Se=J.getBgColor(),Fe=J.getBgColorMode(),ie=!!J.isInverse();if(ie){var Ce=ne;ne=Se,Se=Ce;var ye=fe;fe=Fe,Fe=ye}switch(fe){case 16777216:case 33554432:J.isBold()&&ne<8&&this._optionsService.options.drawBoldTextInBrightColors&&(ne+=8),this._applyMinimumContrast(Z,this._colors.background,this._colors.ansi[ne])||Z.classList.add("xterm-fg-"+ne);break;case 50331648:var Ye=C.rgba.toColor(ne>>16&255,ne>>8&255,255&ne);this._applyMinimumContrast(Z,this._colors.background,Ye)||this._addStyle(Z,"color:#"+A(ne.toString(16),"0",6));break;default:this._applyMinimumContrast(Z,this._colors.background,this._colors.foreground)||ie&&Z.classList.add("xterm-fg-"+d.INVERTED_DEFAULT_COLOR)}switch(Fe){case 16777216:case 33554432:Z.classList.add("xterm-bg-"+Se);break;case 50331648:this._addStyle(Z,"background-color:#"+A(Se.toString(16),"0",6));break;default:ie&&Z.classList.add("xterm-bg-"+d.INVERTED_DEFAULT_COLOR)}M.appendChild(Z),z=G}}return M},v.prototype._applyMinimumContrast=function(w,T,I){if(this._optionsService.options.minimumContrastRatio===1)return!1;var x=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return x===void 0&&(x=C.color.ensureContrastRatio(T,I,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,x!=null?x:null)),!!x&&(this._addStyle(w,"color:"+x.css),!0)},v.prototype._addStyle=function(w,T){w.setAttribute("style",""+(w.getAttribute("style")||"")+T+";")},c([u(2,y.ICharacterJoinerService),u(3,m.IOptionsService),u(4,m.ICoreService)],v)}();function A(v,w,T){for(;v.length<T;)v=w+v;return v}a.DomRendererRowFactory=b},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(C,y,S,b){var A,v=arguments.length,w=v<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(C,y,S,b);else for(var T=C.length-1;T>=0;T--)(A=C[T])&&(w=(v<3?A(w):v>3?A(y,S,w):A(y,S))||w);return v>3&&w&&Object.defineProperty(y,S,w),w},u=this&&this.__param||function(C,y){return function(S,b){y(S,b,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;var d=l(2585),h=l(8460),g=function(){function C(y,S,b){this._optionsService=b,this.width=0,this.height=0,this._onCharSizeChange=new h.EventEmitter,this._measureStrategy=new m(y,S,this._optionsService)}return Object.defineProperty(C.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),C.prototype.measure=function(){var y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())},c([u(2,d.IOptionsService)],C)}();a.CharSizeService=g;var m=function(){function C(y,S,b){this._document=y,this._parentElement=S,this._optionsService=b,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 C.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var y=this._measureElement.getBoundingClientRect();return y.width!==0&&y.height!==0&&(this._result.width=y.width,this._result.height=Math.ceil(y.height)),this._result},C}()},4269:function(s,a,l){var c,u=this&&this.__extends||(c=function(A,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,T){w.__proto__=T}||function(w,T){for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&(w[I]=T[I])},c(A,v)},function(A,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function w(){this.constructor=A}c(A,v),A.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}),d=this&&this.__decorate||function(A,v,w,T){var I,x=arguments.length,L=x<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,w):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(A,v,w,T);else for(var O=A.length-1;O>=0;O--)(I=A[O])&&(L=(x<3?I(L):x>3?I(v,w,L):I(v,w))||L);return x>3&&L&&Object.defineProperty(v,w,L),L},h=this&&this.__param||function(A,v){return function(w,T){v(w,T,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;var g=l(3734),m=l(643),C=l(511),y=l(2585),S=function(A){function v(w,T,I){var x=A.call(this)||this;return x.content=0,x.combinedData="",x.fg=w.fg,x.bg=w.bg,x.combinedData=T,x._width=I,x}return u(v,A),v.prototype.isCombined=function(){return 2097152},v.prototype.getWidth=function(){return this._width},v.prototype.getChars=function(){return this.combinedData},v.prototype.getCode=function(){return 2097151},v.prototype.setFromCharData=function(w){throw new Error("not implemented")},v.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},v}(g.AttributeData);a.JoinedCellData=S;var b=function(){function A(v){this._bufferService=v,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}return A.prototype.register=function(v){var w={id:this._nextCharacterJoinerId++,handler:v};return this._characterJoiners.push(w),w.id},A.prototype.deregister=function(v){for(var w=0;w<this._characterJoiners.length;w++)if(this._characterJoiners[w].id===v)return this._characterJoiners.splice(w,1),!0;return!1},A.prototype.getJoinedCharacters=function(v){if(this._characterJoiners.length===0)return[];var w=this._bufferService.buffer.lines.get(v);if(!w||w.length===0)return[];for(var T=[],I=w.translateToString(!0),x=0,L=0,O=0,P=w.getFg(0),N=w.getBg(0),M=0;M<w.getTrimmedLength();M++)if(w.loadCell(M,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==P||this._workCell.bg!==N){if(M-x>1)for(var W=this._getJoinedRanges(I,O,L,w,x),U=0;U<W.length;U++)T.push(W[U]);x=M,O=L,P=this._workCell.fg,N=this._workCell.bg}L+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-x>1)for(W=this._getJoinedRanges(I,O,L,w,x),U=0;U<W.length;U++)T.push(W[U]);return T},A.prototype._getJoinedRanges=function(v,w,T,I,x){var L=v.substring(w,T),O=[];try{O=this._characterJoiners[0].handler(L)}catch(W){console.error(W)}for(var P=1;P<this._characterJoiners.length;P++)try{for(var N=this._characterJoiners[P].handler(L),M=0;M<N.length;M++)A._mergeRanges(O,N[M])}catch(W){console.error(W)}return this._stringRangesToCellRanges(O,I,x),O},A.prototype._stringRangesToCellRanges=function(v,w,T){var I=0,x=!1,L=0,O=v[I];if(O){for(var P=T;P<this._bufferService.cols;P++){var N=w.getWidth(P),M=w.getString(P).length||m.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!x&&O[0]<=L&&(O[0]=P,x=!0),O[1]<=L){if(O[1]=P,!(O=v[++I]))break;O[0]<=L?(O[0]=P,x=!0):x=!1}L+=M}}O&&(O[1]=this._bufferService.cols)}},A._mergeRanges=function(v,w){for(var T=!1,I=0;I<v.length;I++){var x=v[I];if(T){if(w[1]<=x[0])return v[I-1][1]=w[1],v;if(w[1]<=x[1])return v[I-1][1]=Math.max(w[1],x[1]),v.splice(I,1),v;v.splice(I,1),I--}else{if(w[1]<=x[0])return v.splice(I,0,w),v;if(w[1]<=x[1])return x[0]=Math.min(w[0],x[0]),v;w[0]<x[1]&&(x[0]=Math.min(w[0],x[0]),T=!0)}}return T?v[v.length-1][1]=w[1]:v.push(w),v},A=d([h(0,y.IBufferService)],A)}();a.CharacterJoinerService=b},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(m,C,y,S){var b,A=arguments.length,v=A<3?C:S===null?S=Object.getOwnPropertyDescriptor(C,y):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(m,C,y,S);else for(var w=m.length-1;w>=0;w--)(b=m[w])&&(v=(A<3?b(v):A>3?b(C,y,v):b(C,y))||v);return A>3&&v&&Object.defineProperty(C,y,v),v},u=this&&this.__param||function(m,C){return function(y,S){C(y,S,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;var d=l(4725),h=l(9806),g=function(){function m(C,y){this._renderService=C,this._charSizeService=y}return m.prototype.getCoords=function(C,y,S,b,A){return(0,h.getCoords)(C,y,S,b,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,A)},m.prototype.getRawByteCoords=function(C,y,S,b){var A=this.getCoords(C,y,S,b);return(0,h.getRawByteCoords)(A)},c([u(0,d.IRenderService),u(1,d.ICharSizeService)],m)}();a.MouseService=g},3230:function(s,a,l){var c,u=this&&this.__extends||(c=function(w,T){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,x){I.__proto__=x}||function(I,x){for(var L in x)Object.prototype.hasOwnProperty.call(x,L)&&(I[L]=x[L])},c(w,T)},function(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function I(){this.constructor=w}c(w,T),w.prototype=T===null?Object.create(T):(I.prototype=T.prototype,new I)}),d=this&&this.__decorate||function(w,T,I,x){var L,O=arguments.length,P=O<3?T:x===null?x=Object.getOwnPropertyDescriptor(T,I):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(w,T,I,x);else for(var N=w.length-1;N>=0;N--)(L=w[N])&&(P=(O<3?L(P):O>3?L(T,I,P):L(T,I))||P);return O>3&&P&&Object.defineProperty(T,I,P),P},h=this&&this.__param||function(w,T){return function(I,x){T(I,x,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;var g=l(6193),m=l(8460),C=l(844),y=l(5596),S=l(3656),b=l(2585),A=l(4725),v=function(w){function T(I,x,L,O,P,N){var M=w.call(this)||this;if(M._renderer=I,M._rowCount=x,M._charSizeService=P,M._isPaused=!1,M._needsFullRefresh=!1,M._isNextRenderRedrawOnly=!0,M._needsSelectionRefresh=!1,M._canvasWidth=0,M._canvasHeight=0,M._selectionState={start:void 0,end:void 0,columnSelectMode:!1},M._onDimensionsChange=new m.EventEmitter,M._onRender=new m.EventEmitter,M._onRefreshRequest=new m.EventEmitter,M.register({dispose:function(){return M._renderer.dispose()}}),M._renderDebouncer=new g.RenderDebouncer(function(U,z){return M._renderRows(U,z)}),M.register(M._renderDebouncer),M._screenDprMonitor=new y.ScreenDprMonitor,M._screenDprMonitor.setListener(function(){return M.onDevicePixelRatioChange()}),M.register(M._screenDprMonitor),M.register(N.onResize(function(U){return M._fullRefresh()})),M.register(O.onOptionChange(function(){return M._renderer.onOptionsChanged()})),M.register(M._charSizeService.onCharSizeChange(function(){return M.onCharSizeChanged()})),M._renderer.onRequestRedraw(function(U){return M.refreshRows(U.start,U.end,!0)}),M.register((0,S.addDisposableDomListener)(window,"resize",function(){return M.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var W=new IntersectionObserver(function(U){return M._onIntersectionChange(U[U.length-1])},{threshold:0});W.observe(L),M.register({dispose:function(){return W.disconnect()}})}return M}return u(T,w),Object.defineProperty(T.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),T.prototype._onIntersectionChange=function(I){this._isPaused=I.isIntersecting===void 0?I.intersectionRatio===0:!I.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},T.prototype.refreshRows=function(I,x,L){L===void 0&&(L=!1),this._isPaused?this._needsFullRefresh=!0:(L||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(I,x,this._rowCount))},T.prototype._renderRows=function(I,x){this._renderer.renderRows(I,x),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:I,end:x}),this._isNextRenderRedrawOnly=!0},T.prototype.resize=function(I,x){this._rowCount=x,this._fireOnCanvasResize()},T.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},T.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},T.prototype.dispose=function(){w.prototype.dispose.call(this)},T.prototype.setRenderer=function(I){var x=this;this._renderer.dispose(),this._renderer=I,this._renderer.onRequestRedraw(function(L){return x.refreshRows(L.start,L.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},T.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},T.prototype.clearTextureAtlas=function(){var I,x;(x=(I=this._renderer)===null||I===void 0?void 0:I.clearTextureAtlas)===null||x===void 0||x.call(I),this._fullRefresh()},T.prototype.setColors=function(I){this._renderer.setColors(I),this._fullRefresh()},T.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},T.prototype.onResize=function(I,x){this._renderer.onResize(I,x),this._fullRefresh()},T.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},T.prototype.onBlur=function(){this._renderer.onBlur()},T.prototype.onFocus=function(){this._renderer.onFocus()},T.prototype.onSelectionChanged=function(I,x,L){this._selectionState.start=I,this._selectionState.end=x,this._selectionState.columnSelectMode=L,this._renderer.onSelectionChanged(I,x,L)},T.prototype.onCursorMove=function(){this._renderer.onCursorMove()},T.prototype.clear=function(){this._renderer.clear()},d([h(3,b.IOptionsService),h(4,A.ICharSizeService),h(5,b.IBufferService)],T)}(C.Disposable);a.RenderService=v},9312:function(s,a,l){var c,u=this&&this.__extends||(c=function(O,P){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,M){N.__proto__=M}||function(N,M){for(var W in M)Object.prototype.hasOwnProperty.call(M,W)&&(N[W]=M[W])},c(O,P)},function(O,P){if(typeof P!="function"&&P!==null)throw new TypeError("Class extends value "+String(P)+" is not a constructor or null");function N(){this.constructor=O}c(O,P),O.prototype=P===null?Object.create(P):(N.prototype=P.prototype,new N)}),d=this&&this.__decorate||function(O,P,N,M){var W,U=arguments.length,z=U<3?P:M===null?M=Object.getOwnPropertyDescriptor(P,N):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(O,P,N,M);else for(var j=O.length-1;j>=0;j--)(W=O[j])&&(z=(U<3?W(z):U>3?W(P,N,z):W(P,N))||z);return U>3&&z&&Object.defineProperty(P,N,z),z},h=this&&this.__param||function(O,P){return function(N,M){P(N,M,O)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;var g=l(6114),m=l(456),C=l(511),y=l(8460),S=l(4725),b=l(2585),A=l(9806),v=l(9504),w=l(844),T=l(4841),I=String.fromCharCode(160),x=new RegExp(I,"g"),L=function(O){function P(N,M,W,U,z,j,$,G){var J=O.call(this)||this;return J._element=N,J._screenElement=M,J._linkifier=W,J._bufferService=U,J._coreService=z,J._mouseService=j,J._optionsService=$,J._renderService=G,J._dragScrollAmount=0,J._enabled=!0,J._workCell=new C.CellData,J._mouseDownTimeStamp=0,J._oldHasSelection=!1,J._oldSelectionStart=void 0,J._oldSelectionEnd=void 0,J._onLinuxMouseSelection=J.register(new y.EventEmitter),J._onRedrawRequest=J.register(new y.EventEmitter),J._onSelectionChange=J.register(new y.EventEmitter),J._onRequestScrollLines=J.register(new y.EventEmitter),J._mouseMoveListener=function(q){return J._onMouseMove(q)},J._mouseUpListener=function(q){return J._onMouseUp(q)},J._coreService.onUserInput(function(){J.hasSelection&&J.clearSelection()}),J._trimListener=J._bufferService.buffer.lines.onTrim(function(q){return J._onTrim(q)}),J.register(J._bufferService.buffers.onBufferActivate(function(q){return J._onBufferActivate(q)})),J.enable(),J._model=new m.SelectionModel(J._bufferService),J._activeSelectionMode=0,J}return u(P,O),Object.defineProperty(P.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),P.prototype.dispose=function(){this._removeMouseDownListeners()},P.prototype.reset=function(){this.clearSelection()},P.prototype.disable=function(){this.clearSelection(),this._enabled=!1},P.prototype.enable=function(){this._enabled=!0},Object.defineProperty(P.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"hasSelection",{get:function(){var N=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!N||!M||N[0]===M[0]&&N[1]===M[1])},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"selectionText",{get:function(){var N=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!N||!M)return"";var W=this._bufferService.buffer,U=[];if(this._activeSelectionMode===3){if(N[0]===M[0])return"";for(var z=N[1];z<=M[1];z++){var j=W.translateBufferLineToString(z,!0,N[0],M[0]);U.push(j)}}else{var $=N[1]===M[1]?M[0]:void 0;for(U.push(W.translateBufferLineToString(N[1],!0,N[0],$)),z=N[1]+1;z<=M[1]-1;z++){var G=W.lines.get(z);j=W.translateBufferLineToString(z,!0),(G==null?void 0:G.isWrapped)?U[U.length-1]+=j:U.push(j)}N[1]!==M[1]&&(G=W.lines.get(M[1]),j=W.translateBufferLineToString(M[1],!0,0,M[0]),G&&G.isWrapped?U[U.length-1]+=j:U.push(j))}return U.map(function(J){return J.replace(x," ")}).join(g.isWindows?`\r
1597
1597
  `:`
1598
1598
  `)},enumerable:!1,configurable:!0}),P.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},P.prototype.refresh=function(N){var M=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return M._refresh()})),g.isLinux&&N&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},P.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},P.prototype._isClickInSelection=function(N){var M=this._getMouseBufferCoords(N),W=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!!(W&&U&&M)&&this._areCoordsInSelection(M,W,U)},P.prototype._areCoordsInSelection=function(N,M,W){return N[1]>M[1]&&N[1]<W[1]||M[1]===W[1]&&N[1]===M[1]&&N[0]>=M[0]&&N[0]<W[0]||M[1]<W[1]&&N[1]===W[1]&&N[0]<W[0]||M[1]<W[1]&&N[1]===M[1]&&N[0]>=M[0]},P.prototype._selectWordAtCursor=function(N,M){var W,U,z=(U=(W=this._linkifier.currentLink)===null||W===void 0?void 0:W.link)===null||U===void 0?void 0:U.range;if(z)return this._model.selectionStart=[z.start.x-1,z.start.y-1],this._model.selectionStartLength=(0,T.getRangeLength)(z,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var j=this._getMouseBufferCoords(N);return!!j&&(this._selectWordAt(j,M),this._model.selectionEnd=void 0,!0)},P.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},P.prototype.selectLines=function(N,M){this._model.clearSelection(),N=Math.max(N,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,N],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()},P.prototype._onTrim=function(N){this._model.onTrim(N)&&this.refresh()},P.prototype._getMouseBufferCoords=function(N){var M=this._mouseService.getCoords(N,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M},P.prototype._getMouseEventScrollAmount=function(N){var M=(0,A.getCoordsRelativeToElement)(N,this._screenElement)[1],W=this._renderService.dimensions.canvasHeight;return M>=0&&M<=W?0:(M>W&&(M-=W),M=Math.min(Math.max(M,-50),50),(M/=50)/Math.abs(M)+Math.round(14*M))},P.prototype.shouldForceSelection=function(N){return g.isMac?N.altKey&&this._optionsService.options.macOptionClickForcesSelection:N.shiftKey},P.prototype.onMouseDown=function(N){if(this._mouseDownTimeStamp=N.timeStamp,(N.button!==2||!this.hasSelection)&&N.button===0){if(!this._enabled){if(!this.shouldForceSelection(N))return;N.stopPropagation()}N.preventDefault(),this._dragScrollAmount=0,this._enabled&&N.shiftKey?this._onIncrementalClick(N):N.detail===1?this._onSingleClick(N):N.detail===2?this._onDoubleClick(N):N.detail===3&&this._onTripleClick(N),this._addMouseDownListeners(),this.refresh(!0)}},P.prototype._addMouseDownListeners=function(){var N=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return N._dragScroll()},50)},P.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},P.prototype._onIncrementalClick=function(N){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(N))},P.prototype._onSingleClick=function(N){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(N)?3:0,this._model.selectionStart=this._getMouseBufferCoords(N),this._model.selectionStart){this._model.selectionEnd=void 0;var M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},P.prototype._onDoubleClick=function(N){this._selectWordAtCursor(N,!0)&&(this._activeSelectionMode=1)},P.prototype._onTripleClick=function(N){var M=this._getMouseBufferCoords(N);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))},P.prototype.shouldColumnSelect=function(N){return N.altKey&&!(g.isMac&&this._optionsService.options.macOptionClickForcesSelection)},P.prototype._onMouseMove=function(N){if(N.stopImmediatePropagation(),this._model.selectionStart){var M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(N),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(N),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var W=this._bufferService.buffer;if(this._model.selectionEnd[1]<W.lines.length){var U=W.lines.get(this._model.selectionEnd[1]);U&&U.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}M&&M[0]===this._model.selectionEnd[0]&&M[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},P.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var N=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(N.ydisp+this._bufferService.rows,N.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=N.ydisp),this.refresh()}},P.prototype._onMouseUp=function(N){var M=N.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&N.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var W=this._mouseService.getCoords(N,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(W&&W[0]!==void 0&&W[1]!==void 0){var U=(0,v.moveToCellSequence)(W[0]-1,W[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(U,!0)}}}else this._fireEventIfSelectionChanged()},P.prototype._fireEventIfSelectionChanged=function(){var N=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,W=!(!N||!M||N[0]===M[0]&&N[1]===M[1]);W?N&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&N[0]===this._oldSelectionStart[0]&&N[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(N,M,W)):this._oldHasSelection&&this._fireOnSelectionChange(N,M,W)},P.prototype._fireOnSelectionChange=function(N,M,W){this._oldSelectionStart=N,this._oldSelectionEnd=M,this._oldHasSelection=W,this._onSelectionChange.fire()},P.prototype._onBufferActivate=function(N){var M=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=N.activeBuffer.lines.onTrim(function(W){return M._onTrim(W)})},P.prototype._convertViewportColToCharacterIndex=function(N,M){for(var W=M[0],U=0;M[0]>=U;U++){var z=N.loadCell(U,this._workCell).getChars().length;this._workCell.getWidth()===0?W--:z>1&&M[0]!==U&&(W+=z-1)}return W},P.prototype.setSelection=function(N,M,W){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[N,M],this._model.selectionStartLength=W,this.refresh()},P.prototype.rightClickSelect=function(N){this._isClickInSelection(N)||(this._selectWordAtCursor(N,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},P.prototype._getWordAt=function(N,M,W,U){if(W===void 0&&(W=!0),U===void 0&&(U=!0),!(N[0]>=this._bufferService.cols)){var z=this._bufferService.buffer,j=z.lines.get(N[1]);if(j){var $=z.translateBufferLineToString(N[1],!1),G=this._convertViewportColToCharacterIndex(j,N),J=G,q=N[0]-G,Z=0,ne=0,fe=0,Se=0;if($.charAt(G)===" "){for(;G>0&&$.charAt(G-1)===" ";)G--;for(;J<$.length&&$.charAt(J+1)===" ";)J++}else{var Fe=N[0],ie=N[0];j.getWidth(Fe)===0&&(Z++,Fe--),j.getWidth(ie)===2&&(ne++,ie++);var Ce=j.getString(ie).length;for(Ce>1&&(Se+=Ce-1,J+=Ce-1);Fe>0&&G>0&&!this._isCharWordSeparator(j.loadCell(Fe-1,this._workCell));){j.loadCell(Fe-1,this._workCell);var ye=this._workCell.getChars().length;this._workCell.getWidth()===0?(Z++,Fe--):ye>1&&(fe+=ye-1,G-=ye-1),G--,Fe--}for(;ie<j.length&&J+1<$.length&&!this._isCharWordSeparator(j.loadCell(ie+1,this._workCell));){j.loadCell(ie+1,this._workCell);var Ye=this._workCell.getChars().length;this._workCell.getWidth()===2?(ne++,ie++):Ye>1&&(Se+=Ye-1,J+=Ye-1),J++,ie++}}J++;var Re=G+q-Z+fe,Xe=Math.min(this._bufferService.cols,J-G+Z+ne-fe-Se);if(M||$.slice(G,J).trim()!==""){if(W&&Re===0&&j.getCodePoint(0)!==32){var ft=z.lines.get(N[1]-1);if(ft&&j.isWrapped&&ft.getCodePoint(this._bufferService.cols-1)!==32){var Ut=this._getWordAt([this._bufferService.cols-1,N[1]-1],!1,!0,!1);if(Ut){var et=this._bufferService.cols-Ut.start;Re-=et,Xe+=et}}}if(U&&Re+Xe===this._bufferService.cols&&j.getCodePoint(this._bufferService.cols-1)!==32){var qt=z.lines.get(N[1]+1);if((qt==null?void 0:qt.isWrapped)&&qt.getCodePoint(0)!==32){var qe=this._getWordAt([0,N[1]+1],!1,!1,!0);qe&&(Xe+=qe.length)}}return{start:Re,length:Xe}}}}},P.prototype._selectWordAt=function(N,M){var W=this._getWordAt(N,M);if(W){for(;W.start<0;)W.start+=this._bufferService.cols,N[1]--;this._model.selectionStart=[W.start,N[1]],this._model.selectionStartLength=W.length}},P.prototype._selectToWordAt=function(N){var M=this._getWordAt(N,!0);if(M){for(var W=N[1];M.start<0;)M.start+=this._bufferService.cols,W--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,W++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,W]}},P.prototype._isCharWordSeparator=function(N){return N.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(N.getChars())>=0},P.prototype._selectLineAt=function(N){var M=this._bufferService.buffer.getWrappedRangeForLine(N);this._model.selectionStart=[0,M.first],this._model.selectionEnd=[this._bufferService.cols,M.last],this._model.selectionStartLength=0},d([h(3,b.IBufferService),h(4,b.ICoreService),h(5,S.IMouseService),h(6,b.IOptionsService),h(7,S.IRenderService)],P)}(w.Disposable);a.SelectionService=L},4725:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ICharacterJoinerService=a.ISoundService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;var c=l(8343);a.ICharSizeService=(0,c.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,c.createDecorator)("CoreBrowserService"),a.IMouseService=(0,c.createDecorator)("MouseService"),a.IRenderService=(0,c.createDecorator)("RenderService"),a.ISelectionService=(0,c.createDecorator)("SelectionService"),a.ISoundService=(0,c.createDecorator)("SoundService"),a.ICharacterJoinerService=(0,c.createDecorator)("CharacterJoinerService")},357:function(s,a,l){var c=this&&this.__decorate||function(g,m,C,y){var S,b=arguments.length,A=b<3?m:y===null?y=Object.getOwnPropertyDescriptor(m,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,m,C,y);else for(var v=g.length-1;v>=0;v--)(S=g[v])&&(A=(b<3?S(A):b>3?S(m,C,A):S(m,C))||A);return b>3&&A&&Object.defineProperty(m,C,A),A},u=this&&this.__param||function(g,m){return function(C,y){m(C,y,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SoundService=void 0;var d=l(2585),h=function(){function g(m){this._optionsService=m}return Object.defineProperty(g,"audioContext",{get:function(){if(!g._audioContext){var m=window.AudioContext||window.webkitAudioContext;if(!m)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;g._audioContext=new m}return g._audioContext},enumerable:!1,configurable:!0}),g.prototype.playBellSound=function(){var m=g.audioContext;if(m){var C=m.createBufferSource();m.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(y){C.buffer=y,C.connect(m.destination),C.start(0)})}},g.prototype._base64ToArrayBuffer=function(m){for(var C=window.atob(m),y=C.length,S=new Uint8Array(y),b=0;b<y;b++)S[b]=C.charCodeAt(b);return S.buffer},g.prototype._removeMimeType=function(m){return m.split(",")[1]},g=c([u(0,d.IOptionsService)],g)}();a.SoundService=h},6349:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;var c=l(8460),u=function(){function d(h){this._maxLength=h,this.onDeleteEmitter=new c.EventEmitter,this.onInsertEmitter=new c.EventEmitter,this.onTrimEmitter=new c.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(d.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"maxLength",{get:function(){return this._maxLength},set:function(h){if(this._maxLength!==h){for(var g=new Array(h),m=0;m<Math.min(h,this.length);m++)g[m]=this._array[this._getCyclicIndex(m)];this._array=g,this._maxLength=h,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._length},set:function(h){if(h>this._length)for(var g=this._length;g<h;g++)this._array[g]=void 0;this._length=h},enumerable:!1,configurable:!0}),d.prototype.get=function(h){return this._array[this._getCyclicIndex(h)]},d.prototype.set=function(h,g){this._array[this._getCyclicIndex(h)]=g},d.prototype.push=function(h){this._array[this._getCyclicIndex(this._length)]=h,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},d.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(d.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),d.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},d.prototype.splice=function(h,g){for(var m=[],C=2;C<arguments.length;C++)m[C-2]=arguments[C];if(g){for(var y=h;y<this._length-g;y++)this._array[this._getCyclicIndex(y)]=this._array[this._getCyclicIndex(y+g)];this._length-=g,this.onDeleteEmitter.fire({index:h,amount:g})}for(y=this._length-1;y>=h;y--)this._array[this._getCyclicIndex(y+m.length)]=this._array[this._getCyclicIndex(y)];for(y=0;y<m.length;y++)this._array[this._getCyclicIndex(h+y)]=m[y];if(m.length&&this.onInsertEmitter.fire({index:h,amount:m.length}),this._length+m.length>this._maxLength){var S=this._length+m.length-this._maxLength;this._startIndex+=S,this._length=this._maxLength,this.onTrimEmitter.fire(S)}else this._length+=m.length},d.prototype.trimStart=function(h){h>this._length&&(h=this._length),this._startIndex+=h,this._length-=h,this.onTrimEmitter.fire(h)},d.prototype.shiftElements=function(h,g,m){if(!(g<=0)){if(h<0||h>=this._length)throw new Error("start argument out of range");if(h+m<0)throw new Error("Cannot shift elements in list beyond index 0");if(m>0){for(var C=g-1;C>=0;C--)this.set(h+C+m,this.get(h+C));var y=h+g+m-this._length;if(y>0)for(this._length+=y;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(C=0;C<g;C++)this.set(h+C+m,this.get(h+C))}},d.prototype._getCyclicIndex=function(h){return(this._startIndex+h)%this._maxLength},d}();a.CircularList=u},1439:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function l(c,u){if(u===void 0&&(u=5),typeof c!="object")return c;var d=Array.isArray(c)?[]:{};for(var h in c)d[h]=u<=1?c[h]:c[h]&&l(c[h],u-1);return d}},8969:function(s,a,l){var c,u=this&&this.__extends||(c=function(N,M){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(W,U){W.__proto__=U}||function(W,U){for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(W[z]=U[z])},c(N,M)},function(N,M){if(typeof M!="function"&&M!==null)throw new TypeError("Class extends value "+String(M)+" is not a constructor or null");function W(){this.constructor=N}c(N,M),N.prototype=M===null?Object.create(M):(W.prototype=M.prototype,new W)});Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;var d=l(844),h=l(2585),g=l(4348),m=l(7866),C=l(744),y=l(7302),S=l(6975),b=l(8460),A=l(1753),v=l(3730),w=l(1480),T=l(7994),I=l(9282),x=l(5435),L=l(5981),O=!1,P=function(N){function M(W){var U=N.call(this)||this;return U._onBinary=new b.EventEmitter,U._onData=new b.EventEmitter,U._onLineFeed=new b.EventEmitter,U._onResize=new b.EventEmitter,U._onScroll=new b.EventEmitter,U._instantiationService=new g.InstantiationService,U.optionsService=new y.OptionsService(W),U._instantiationService.setService(h.IOptionsService,U.optionsService),U._bufferService=U.register(U._instantiationService.createInstance(C.BufferService)),U._instantiationService.setService(h.IBufferService,U._bufferService),U._logService=U._instantiationService.createInstance(m.LogService),U._instantiationService.setService(h.ILogService,U._logService),U.coreService=U.register(U._instantiationService.createInstance(S.CoreService,function(){return U.scrollToBottom()})),U._instantiationService.setService(h.ICoreService,U.coreService),U.coreMouseService=U._instantiationService.createInstance(A.CoreMouseService),U._instantiationService.setService(h.ICoreMouseService,U.coreMouseService),U._dirtyRowService=U._instantiationService.createInstance(v.DirtyRowService),U._instantiationService.setService(h.IDirtyRowService,U._dirtyRowService),U.unicodeService=U._instantiationService.createInstance(w.UnicodeService),U._instantiationService.setService(h.IUnicodeService,U.unicodeService),U._charsetService=U._instantiationService.createInstance(T.CharsetService),U._instantiationService.setService(h.ICharsetService,U._charsetService),U._inputHandler=new x.InputHandler(U._bufferService,U._charsetService,U.coreService,U._dirtyRowService,U._logService,U.optionsService,U.coreMouseService,U.unicodeService),U.register((0,b.forwardEvent)(U._inputHandler.onLineFeed,U._onLineFeed)),U.register(U._inputHandler),U.register((0,b.forwardEvent)(U._bufferService.onResize,U._onResize)),U.register((0,b.forwardEvent)(U.coreService.onData,U._onData)),U.register((0,b.forwardEvent)(U.coreService.onBinary,U._onBinary)),U.register(U.optionsService.onOptionChange(function(z){return U._updateOptions(z)})),U.register(U._bufferService.onScroll(function(z){U._onScroll.fire({position:U._bufferService.buffer.ydisp,source:0}),U._dirtyRowService.markRangeDirty(U._bufferService.buffer.scrollTop,U._bufferService.buffer.scrollBottom)})),U.register(U._inputHandler.onScroll(function(z){U._onScroll.fire({position:U._bufferService.buffer.ydisp,source:0}),U._dirtyRowService.markRangeDirty(U._bufferService.buffer.scrollTop,U._bufferService.buffer.scrollBottom)})),U._writeBuffer=new L.WriteBuffer(function(z,j){return U._inputHandler.parse(z,j)}),U}return u(M,N),Object.defineProperty(M.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"onScroll",{get:function(){var W=this;return this._onScrollApi||(this._onScrollApi=new b.EventEmitter,this.register(this._onScroll.event(function(U){var z;(z=W._onScrollApi)===null||z===void 0||z.fire(U.position)}))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"options",{get:function(){return this.optionsService.options},set:function(W){for(var U in W)this.optionsService.options[U]=W[U]},enumerable:!1,configurable:!0}),M.prototype.dispose=function(){var W;this._isDisposed||(N.prototype.dispose.call(this),(W=this._windowsMode)===null||W===void 0||W.dispose(),this._windowsMode=void 0)},M.prototype.write=function(W,U){this._writeBuffer.write(W,U)},M.prototype.writeSync=function(W,U){this._logService.logLevel<=h.LogLevelEnum.WARN&&!O&&(this._logService.warn("writeSync is unreliable and will be removed soon."),O=!0),this._writeBuffer.writeSync(W,U)},M.prototype.resize=function(W,U){isNaN(W)||isNaN(U)||(W=Math.max(W,C.MINIMUM_COLS),U=Math.max(U,C.MINIMUM_ROWS),this._bufferService.resize(W,U))},M.prototype.scroll=function(W,U){U===void 0&&(U=!1),this._bufferService.scroll(W,U)},M.prototype.scrollLines=function(W,U,z){this._bufferService.scrollLines(W,U,z)},M.prototype.scrollPages=function(W){this._bufferService.scrollPages(W)},M.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},M.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},M.prototype.scrollToLine=function(W){this._bufferService.scrollToLine(W)},M.prototype.registerEscHandler=function(W,U){return this._inputHandler.registerEscHandler(W,U)},M.prototype.registerDcsHandler=function(W,U){return this._inputHandler.registerDcsHandler(W,U)},M.prototype.registerCsiHandler=function(W,U){return this._inputHandler.registerCsiHandler(W,U)},M.prototype.registerOscHandler=function(W,U){return this._inputHandler.registerOscHandler(W,U)},M.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},M.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},M.prototype._updateOptions=function(W){var U;switch(W){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((U=this._windowsMode)===null||U===void 0||U.dispose(),this._windowsMode=void 0)}},M.prototype._enableWindowsMode=function(){var W=this;if(!this._windowsMode){var U=[];U.push(this.onLineFeed(I.updateWindowsModeWrappedState.bind(null,this._bufferService))),U.push(this.registerCsiHandler({final:"H"},function(){return(0,I.updateWindowsModeWrappedState)(W._bufferService),!1})),this._windowsMode={dispose:function(){for(var z=0,j=U;z<j.length;z++)j[z].dispose()}}}},M}(d.Disposable);a.CoreTerminal=P},8460:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.forwardEvent=a.EventEmitter=void 0;var l=function(){function c(){this._listeners=[],this._disposed=!1}return Object.defineProperty(c.prototype,"event",{get:function(){var u=this;return this._event||(this._event=function(d){return u._listeners.push(d),{dispose:function(){if(!u._disposed){for(var h=0;h<u._listeners.length;h++)if(u._listeners[h]===d)return void u._listeners.splice(h,1)}}}}),this._event},enumerable:!1,configurable:!0}),c.prototype.fire=function(u,d){for(var h=[],g=0;g<this._listeners.length;g++)h.push(this._listeners[g]);for(g=0;g<h.length;g++)h[g].call(void 0,u,d)},c.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},c}();a.EventEmitter=l,a.forwardEvent=function(c,u){return c(function(d){return u.fire(d)})}},5435:function(s,a,l){var c,u=this&&this.__extends||(c=function(z,j){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,G){$.__proto__=G}||function($,G){for(var J in G)Object.prototype.hasOwnProperty.call(G,J)&&($[J]=G[J])},c(z,j)},function(z,j){if(typeof j!="function"&&j!==null)throw new TypeError("Class extends value "+String(j)+" is not a constructor or null");function $(){this.constructor=z}c(z,j),z.prototype=j===null?Object.create(j):($.prototype=j.prototype,new $)});Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;var d,h=l(2584),g=l(7116),m=l(2015),C=l(844),y=l(8273),S=l(482),b=l(8437),A=l(8460),v=l(643),w=l(511),T=l(3734),I=l(2585),x=l(6242),L=l(6351),O=l(5941),P={"(":0,")":1,"*":2,"+":3,"-":1,".":2},N=131072;function M(z,j){if(z>24)return j.setWinLines||!1;switch(z){case 1:return!!j.restoreWin;case 2:return!!j.minimizeWin;case 3:return!!j.setWinPosition;case 4:return!!j.setWinSizePixels;case 5:return!!j.raiseWin;case 6:return!!j.lowerWin;case 7:return!!j.refreshWin;case 8:return!!j.setWinSizeChars;case 9:return!!j.maximizeWin;case 10:return!!j.fullscreenWin;case 11:return!!j.getWinState;case 13:return!!j.getWinPosition;case 14:return!!j.getWinSizePixels;case 15:return!!j.getScreenSizePixels;case 16:return!!j.getCellSizePixels;case 18:return!!j.getWinSizeChars;case 19:return!!j.getScreenSizeChars;case 20:return!!j.getIconTitle;case 21:return!!j.getWinTitle;case 22:return!!j.pushTitle;case 23:return!!j.popTitle;case 24:return!!j.setWinLines}return!1}(function(z){z[z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",z[z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(d=a.WindowsOptionsReportType||(a.WindowsOptionsReportType={}));var W=function(){function z(j,$,G,J){this._bufferService=j,this._coreService=$,this._logService=G,this._optionsService=J,this._data=new Uint32Array(0)}return z.prototype.hook=function(j){this._data=new Uint32Array(0)},z.prototype.put=function(j,$,G){this._data=(0,y.concat)(this._data,j.subarray($,G))},z.prototype.unhook=function(j){if(!j)return this._data=new Uint32Array(0),!0;var $=(0,S.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),$){case'"q':this._coreService.triggerDataEvent(h.C0.ESC+'P1$r0"q'+h.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(h.C0.ESC+'P1$r61;1"p'+h.C0.ESC+"\\");break;case"r":var G=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(h.C0.ESC+"P1$r"+G+h.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(h.C0.ESC+"P1$r0m"+h.C0.ESC+"\\");break;case" q":var J={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];J-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(h.C0.ESC+"P1$r"+J+" q"+h.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",$),this._coreService.triggerDataEvent(h.C0.ESC+"P0$r"+h.C0.ESC+"\\")}return!0},z}(),U=function(z){function j($,G,J,q,Z,ne,fe,Se,Fe){Fe===void 0&&(Fe=new m.EscapeSequenceParser);var ie=z.call(this)||this;ie._bufferService=$,ie._charsetService=G,ie._coreService=J,ie._dirtyRowService=q,ie._logService=Z,ie._optionsService=ne,ie._coreMouseService=fe,ie._unicodeService=Se,ie._parser=Fe,ie._parseBuffer=new Uint32Array(4096),ie._stringDecoder=new S.StringToUtf32,ie._utf8Decoder=new S.Utf8ToUtf32,ie._workCell=new w.CellData,ie._windowTitle="",ie._iconName="",ie._windowTitleStack=[],ie._iconNameStack=[],ie._curAttrData=b.DEFAULT_ATTR_DATA.clone(),ie._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),ie._onRequestBell=new A.EventEmitter,ie._onRequestRefreshRows=new A.EventEmitter,ie._onRequestReset=new A.EventEmitter,ie._onRequestSendFocus=new A.EventEmitter,ie._onRequestSyncScrollBar=new A.EventEmitter,ie._onRequestWindowsOptionsReport=new A.EventEmitter,ie._onA11yChar=new A.EventEmitter,ie._onA11yTab=new A.EventEmitter,ie._onCursorMove=new A.EventEmitter,ie._onLineFeed=new A.EventEmitter,ie._onScroll=new A.EventEmitter,ie._onTitleChange=new A.EventEmitter,ie._onColor=new A.EventEmitter,ie._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},ie._specialColors=[256,257,258],ie.register(ie._parser),ie._activeBuffer=ie._bufferService.buffer,ie.register(ie._bufferService.buffers.onBufferActivate(function(Re){return ie._activeBuffer=Re.activeBuffer})),ie._parser.setCsiHandlerFallback(function(Re,Xe){ie._logService.debug("Unknown CSI code: ",{identifier:ie._parser.identToString(Re),params:Xe.toArray()})}),ie._parser.setEscHandlerFallback(function(Re){ie._logService.debug("Unknown ESC code: ",{identifier:ie._parser.identToString(Re)})}),ie._parser.setExecuteHandlerFallback(function(Re){ie._logService.debug("Unknown EXECUTE code: ",{code:Re})}),ie._parser.setOscHandlerFallback(function(Re,Xe,ft){ie._logService.debug("Unknown OSC code: ",{identifier:Re,action:Xe,data:ft})}),ie._parser.setDcsHandlerFallback(function(Re,Xe,ft){Xe==="HOOK"&&(ft=ft.toArray()),ie._logService.debug("Unknown DCS code: ",{identifier:ie._parser.identToString(Re),action:Xe,payload:ft})}),ie._parser.setPrintHandler(function(Re,Xe,ft){return ie.print(Re,Xe,ft)}),ie._parser.registerCsiHandler({final:"@"},function(Re){return ie.insertChars(Re)}),ie._parser.registerCsiHandler({intermediates:" ",final:"@"},function(Re){return ie.scrollLeft(Re)}),ie._parser.registerCsiHandler({final:"A"},function(Re){return ie.cursorUp(Re)}),ie._parser.registerCsiHandler({intermediates:" ",final:"A"},function(Re){return ie.scrollRight(Re)}),ie._parser.registerCsiHandler({final:"B"},function(Re){return ie.cursorDown(Re)}),ie._parser.registerCsiHandler({final:"C"},function(Re){return ie.cursorForward(Re)}),ie._parser.registerCsiHandler({final:"D"},function(Re){return ie.cursorBackward(Re)}),ie._parser.registerCsiHandler({final:"E"},function(Re){return ie.cursorNextLine(Re)}),ie._parser.registerCsiHandler({final:"F"},function(Re){return ie.cursorPrecedingLine(Re)}),ie._parser.registerCsiHandler({final:"G"},function(Re){return ie.cursorCharAbsolute(Re)}),ie._parser.registerCsiHandler({final:"H"},function(Re){return ie.cursorPosition(Re)}),ie._parser.registerCsiHandler({final:"I"},function(Re){return ie.cursorForwardTab(Re)}),ie._parser.registerCsiHandler({final:"J"},function(Re){return ie.eraseInDisplay(Re)}),ie._parser.registerCsiHandler({prefix:"?",final:"J"},function(Re){return ie.eraseInDisplay(Re)}),ie._parser.registerCsiHandler({final:"K"},function(Re){return ie.eraseInLine(Re)}),ie._parser.registerCsiHandler({prefix:"?",final:"K"},function(Re){return ie.eraseInLine(Re)}),ie._parser.registerCsiHandler({final:"L"},function(Re){return ie.insertLines(Re)}),ie._parser.registerCsiHandler({final:"M"},function(Re){return ie.deleteLines(Re)}),ie._parser.registerCsiHandler({final:"P"},function(Re){return ie.deleteChars(Re)}),ie._parser.registerCsiHandler({final:"S"},function(Re){return ie.scrollUp(Re)}),ie._parser.registerCsiHandler({final:"T"},function(Re){return ie.scrollDown(Re)}),ie._parser.registerCsiHandler({final:"X"},function(Re){return ie.eraseChars(Re)}),ie._parser.registerCsiHandler({final:"Z"},function(Re){return ie.cursorBackwardTab(Re)}),ie._parser.registerCsiHandler({final:"`"},function(Re){return ie.charPosAbsolute(Re)}),ie._parser.registerCsiHandler({final:"a"},function(Re){return ie.hPositionRelative(Re)}),ie._parser.registerCsiHandler({final:"b"},function(Re){return ie.repeatPrecedingCharacter(Re)}),ie._parser.registerCsiHandler({final:"c"},function(Re){return ie.sendDeviceAttributesPrimary(Re)}),ie._parser.registerCsiHandler({prefix:">",final:"c"},function(Re){return ie.sendDeviceAttributesSecondary(Re)}),ie._parser.registerCsiHandler({final:"d"},function(Re){return ie.linePosAbsolute(Re)}),ie._parser.registerCsiHandler({final:"e"},function(Re){return ie.vPositionRelative(Re)}),ie._parser.registerCsiHandler({final:"f"},function(Re){return ie.hVPosition(Re)}),ie._parser.registerCsiHandler({final:"g"},function(Re){return ie.tabClear(Re)}),ie._parser.registerCsiHandler({final:"h"},function(Re){return ie.setMode(Re)}),ie._parser.registerCsiHandler({prefix:"?",final:"h"},function(Re){return ie.setModePrivate(Re)}),ie._parser.registerCsiHandler({final:"l"},function(Re){return ie.resetMode(Re)}),ie._parser.registerCsiHandler({prefix:"?",final:"l"},function(Re){return ie.resetModePrivate(Re)}),ie._parser.registerCsiHandler({final:"m"},function(Re){return ie.charAttributes(Re)}),ie._parser.registerCsiHandler({final:"n"},function(Re){return ie.deviceStatus(Re)}),ie._parser.registerCsiHandler({prefix:"?",final:"n"},function(Re){return ie.deviceStatusPrivate(Re)}),ie._parser.registerCsiHandler({intermediates:"!",final:"p"},function(Re){return ie.softReset(Re)}),ie._parser.registerCsiHandler({intermediates:" ",final:"q"},function(Re){return ie.setCursorStyle(Re)}),ie._parser.registerCsiHandler({final:"r"},function(Re){return ie.setScrollRegion(Re)}),ie._parser.registerCsiHandler({final:"s"},function(Re){return ie.saveCursor(Re)}),ie._parser.registerCsiHandler({final:"t"},function(Re){return ie.windowOptions(Re)}),ie._parser.registerCsiHandler({final:"u"},function(Re){return ie.restoreCursor(Re)}),ie._parser.registerCsiHandler({intermediates:"'",final:"}"},function(Re){return ie.insertColumns(Re)}),ie._parser.registerCsiHandler({intermediates:"'",final:"~"},function(Re){return ie.deleteColumns(Re)}),ie._parser.setExecuteHandler(h.C0.BEL,function(){return ie.bell()}),ie._parser.setExecuteHandler(h.C0.LF,function(){return ie.lineFeed()}),ie._parser.setExecuteHandler(h.C0.VT,function(){return ie.lineFeed()}),ie._parser.setExecuteHandler(h.C0.FF,function(){return ie.lineFeed()}),ie._parser.setExecuteHandler(h.C0.CR,function(){return ie.carriageReturn()}),ie._parser.setExecuteHandler(h.C0.BS,function(){return ie.backspace()}),ie._parser.setExecuteHandler(h.C0.HT,function(){return ie.tab()}),ie._parser.setExecuteHandler(h.C0.SO,function(){return ie.shiftOut()}),ie._parser.setExecuteHandler(h.C0.SI,function(){return ie.shiftIn()}),ie._parser.setExecuteHandler(h.C1.IND,function(){return ie.index()}),ie._parser.setExecuteHandler(h.C1.NEL,function(){return ie.nextLine()}),ie._parser.setExecuteHandler(h.C1.HTS,function(){return ie.tabSet()}),ie._parser.registerOscHandler(0,new x.OscHandler(function(Re){return ie.setTitle(Re),ie.setIconName(Re),!0})),ie._parser.registerOscHandler(1,new x.OscHandler(function(Re){return ie.setIconName(Re)})),ie._parser.registerOscHandler(2,new x.OscHandler(function(Re){return ie.setTitle(Re)})),ie._parser.registerOscHandler(4,new x.OscHandler(function(Re){return ie.setOrReportIndexedColor(Re)})),ie._parser.registerOscHandler(10,new x.OscHandler(function(Re){return ie.setOrReportFgColor(Re)})),ie._parser.registerOscHandler(11,new x.OscHandler(function(Re){return ie.setOrReportBgColor(Re)})),ie._parser.registerOscHandler(12,new x.OscHandler(function(Re){return ie.setOrReportCursorColor(Re)})),ie._parser.registerOscHandler(104,new x.OscHandler(function(Re){return ie.restoreIndexedColor(Re)})),ie._parser.registerOscHandler(110,new x.OscHandler(function(Re){return ie.restoreFgColor(Re)})),ie._parser.registerOscHandler(111,new x.OscHandler(function(Re){return ie.restoreBgColor(Re)})),ie._parser.registerOscHandler(112,new x.OscHandler(function(Re){return ie.restoreCursorColor(Re)})),ie._parser.registerEscHandler({final:"7"},function(){return ie.saveCursor()}),ie._parser.registerEscHandler({final:"8"},function(){return ie.restoreCursor()}),ie._parser.registerEscHandler({final:"D"},function(){return ie.index()}),ie._parser.registerEscHandler({final:"E"},function(){return ie.nextLine()}),ie._parser.registerEscHandler({final:"H"},function(){return ie.tabSet()}),ie._parser.registerEscHandler({final:"M"},function(){return ie.reverseIndex()}),ie._parser.registerEscHandler({final:"="},function(){return ie.keypadApplicationMode()}),ie._parser.registerEscHandler({final:">"},function(){return ie.keypadNumericMode()}),ie._parser.registerEscHandler({final:"c"},function(){return ie.fullReset()}),ie._parser.registerEscHandler({final:"n"},function(){return ie.setgLevel(2)}),ie._parser.registerEscHandler({final:"o"},function(){return ie.setgLevel(3)}),ie._parser.registerEscHandler({final:"|"},function(){return ie.setgLevel(3)}),ie._parser.registerEscHandler({final:"}"},function(){return ie.setgLevel(2)}),ie._parser.registerEscHandler({final:"~"},function(){return ie.setgLevel(1)}),ie._parser.registerEscHandler({intermediates:"%",final:"@"},function(){return ie.selectDefaultCharset()}),ie._parser.registerEscHandler({intermediates:"%",final:"G"},function(){return ie.selectDefaultCharset()});var Ce=function(Re){ye._parser.registerEscHandler({intermediates:"(",final:Re},function(){return ie.selectCharset("("+Re)}),ye._parser.registerEscHandler({intermediates:")",final:Re},function(){return ie.selectCharset(")"+Re)}),ye._parser.registerEscHandler({intermediates:"*",final:Re},function(){return ie.selectCharset("*"+Re)}),ye._parser.registerEscHandler({intermediates:"+",final:Re},function(){return ie.selectCharset("+"+Re)}),ye._parser.registerEscHandler({intermediates:"-",final:Re},function(){return ie.selectCharset("-"+Re)}),ye._parser.registerEscHandler({intermediates:".",final:Re},function(){return ie.selectCharset("."+Re)}),ye._parser.registerEscHandler({intermediates:"/",final:Re},function(){return ie.selectCharset("/"+Re)})},ye=this;for(var Ye in g.CHARSETS)Ce(Ye);return ie._parser.registerEscHandler({intermediates:"#",final:"8"},function(){return ie.screenAlignmentPattern()}),ie._parser.setErrorHandler(function(Re){return ie._logService.error("Parsing error: ",Re),Re}),ie._parser.registerDcsHandler({intermediates:"$",final:"q"},new W(ie._bufferService,ie._coreService,ie._logService,ie._optionsService)),ie}return u(j,z),Object.defineProperty(j.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),j.prototype.dispose=function(){z.prototype.dispose.call(this)},j.prototype._preserveStack=function($,G,J,q){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=G,this._parseStack.decodedLength=J,this._parseStack.position=q},j.prototype._logSlowResolvingAsync=function($){this._logService.logLevel<=I.LogLevelEnum.WARN&&Promise.race([$,new Promise(function(G,J){return setTimeout(function(){return J("#SLOW_TIMEOUT")},5e3)})]).catch(function(G){if(G!=="#SLOW_TIMEOUT")throw G;console.warn("async parser handler taking longer than 5000 ms")})},j.prototype.parse=function($,G){var J,q=this._activeBuffer.x,Z=this._activeBuffer.y,ne=0,fe=this._parseStack.paused;if(fe){if(J=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,G))return this._logSlowResolvingAsync(J),J;q=this._parseStack.cursorStartX,Z=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>N&&(ne=this._parseStack.position+N)}if(this._logService.logLevel<=I.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?' "'+$+'"':""),typeof $=="string"?$.split("").map(function(Ce){return Ce.charCodeAt(0)}):$),this._parseBuffer.length<$.length&&this._parseBuffer.length<N&&(this._parseBuffer=new Uint32Array(Math.min($.length,N))),fe||this._dirtyRowService.clearRange(),$.length>N)for(var Se=ne;Se<$.length;Se+=N){var Fe=Se+N<$.length?Se+N:$.length,ie=typeof $=="string"?this._stringDecoder.decode($.substring(Se,Fe),this._parseBuffer):this._utf8Decoder.decode($.subarray(Se,Fe),this._parseBuffer);if(J=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(q,Z,ie,Se),this._logSlowResolvingAsync(J),J}else if(!fe&&(ie=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer),J=this._parser.parse(this._parseBuffer,ie)))return this._preserveStack(q,Z,ie,0),this._logSlowResolvingAsync(J),J;this._activeBuffer.x===q&&this._activeBuffer.y===Z||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},j.prototype.print=function($,G,J){var q,Z,ne=this._charsetService.charset,fe=this._optionsService.options.screenReaderMode,Se=this._bufferService.cols,Fe=this._coreService.decPrivateModes.wraparound,ie=this._coreService.modes.insertMode,Ce=this._curAttrData,ye=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&J-G>0&&ye.getWidth(this._activeBuffer.x-1)===2&&ye.setCellFromCodePoint(this._activeBuffer.x-1,0,1,Ce.fg,Ce.bg,Ce.extended);for(var Ye=G;Ye<J;++Ye){if(q=$[Ye],Z=this._unicodeService.wcwidth(q),q<127&&ne){var Re=ne[String.fromCharCode(q)];Re&&(q=Re.charCodeAt(0))}if(fe&&this._onA11yChar.fire((0,S.stringFromCodePoint)(q)),Z||!this._activeBuffer.x){if(this._activeBuffer.x+Z-1>=Se){if(Fe){for(;this._activeBuffer.x<Se;)ye.setCellFromCodePoint(this._activeBuffer.x++,0,1,Ce.fg,Ce.bg,Ce.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ye=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=Se-1,Z===2)continue}if(ie&&(ye.insertCells(this._activeBuffer.x,Z,this._activeBuffer.getNullCell(Ce),Ce),ye.getWidth(Se-1)===2&&ye.setCellFromCodePoint(Se-1,v.NULL_CELL_CODE,v.NULL_CELL_WIDTH,Ce.fg,Ce.bg,Ce.extended)),ye.setCellFromCodePoint(this._activeBuffer.x++,q,Z,Ce.fg,Ce.bg,Ce.extended),Z>0)for(;--Z;)ye.setCellFromCodePoint(this._activeBuffer.x++,0,0,Ce.fg,Ce.bg,Ce.extended)}else ye.getWidth(this._activeBuffer.x-1)?ye.addCodepointToCell(this._activeBuffer.x-1,q):ye.addCodepointToCell(this._activeBuffer.x-2,q)}J-G>0&&(ye.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<Se&&J-G>0&&ye.getWidth(this._activeBuffer.x)===0&&!ye.hasContent(this._activeBuffer.x)&&ye.setCellFromCodePoint(this._activeBuffer.x,0,1,Ce.fg,Ce.bg,Ce.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},j.prototype.registerCsiHandler=function($,G){var J=this;return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,G):this._parser.registerCsiHandler($,function(q){return!M(q.params[0],J._optionsService.options.windowOptions)||G(q)})},j.prototype.registerDcsHandler=function($,G){return this._parser.registerDcsHandler($,new L.DcsHandler(G))},j.prototype.registerEscHandler=function($,G){return this._parser.registerEscHandler($,G)},j.prototype.registerOscHandler=function($,G){return this._parser.registerOscHandler($,new x.OscHandler(G))},j.prototype.bell=function(){return this._onRequestBell.fire(),!0},j.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.options.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},j.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},j.prototype.backspace=function(){var $;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(($=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||$===void 0?void 0:$.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);G.hasWidth(this._activeBuffer.x)&&!G.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},j.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var $=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-$),!0},j.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},j.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},j.prototype._restrictCursor=function($){$===void 0&&($=this._bufferService.cols-1),this._activeBuffer.x=Math.min($,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},j.prototype._setCursor=function($,G){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+G):(this._activeBuffer.x=$,this._activeBuffer.y=G),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},j.prototype._moveCursor=function($,G){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+G)},j.prototype.cursorUp=function($){var G=this._activeBuffer.y-this._activeBuffer.scrollTop;return G>=0?this._moveCursor(0,-Math.min(G,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0},j.prototype.cursorDown=function($){var G=this._activeBuffer.scrollBottom-this._activeBuffer.y;return G>=0?this._moveCursor(0,Math.min(G,$.params[0]||1)):this._moveCursor(0,$.params[0]||1),!0},j.prototype.cursorForward=function($){return this._moveCursor($.params[0]||1,0),!0},j.prototype.cursorBackward=function($){return this._moveCursor(-($.params[0]||1),0),!0},j.prototype.cursorNextLine=function($){return this.cursorDown($),this._activeBuffer.x=0,!0},j.prototype.cursorPrecedingLine=function($){return this.cursorUp($),this._activeBuffer.x=0,!0},j.prototype.cursorCharAbsolute=function($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0},j.prototype.cursorPosition=function($){return this._setCursor($.length>=2?($.params[1]||1)-1:0,($.params[0]||1)-1),!0},j.prototype.charPosAbsolute=function($){return this._setCursor(($.params[0]||1)-1,this._activeBuffer.y),!0},j.prototype.hPositionRelative=function($){return this._moveCursor($.params[0]||1,0),!0},j.prototype.linePosAbsolute=function($){return this._setCursor(this._activeBuffer.x,($.params[0]||1)-1),!0},j.prototype.vPositionRelative=function($){return this._moveCursor(0,$.params[0]||1),!0},j.prototype.hVPosition=function($){return this.cursorPosition($),!0},j.prototype.tabClear=function($){var G=$.params[0];return G===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:G===3&&(this._activeBuffer.tabs={}),!0},j.prototype.cursorForwardTab=function($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var G=$.params[0]||1;G--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},j.prototype.cursorBackwardTab=function($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var G=$.params[0]||1;G--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},j.prototype._eraseInBufferLine=function($,G,J,q){q===void 0&&(q=!1);var Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);Z.replaceCells(G,J,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),q&&(Z.isWrapped=!1)},j.prototype._resetBufferLine=function($){var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);G.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1},j.prototype.eraseInDisplay=function($){var G;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(G=this._activeBuffer.y,this._dirtyRowService.markDirty(G),this._eraseInBufferLine(G++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);G<this._bufferService.rows;G++)this._resetBufferLine(G);this._dirtyRowService.markDirty(G);break;case 1:for(G=this._activeBuffer.y,this._dirtyRowService.markDirty(G),this._eraseInBufferLine(G,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(G+1).isWrapped=!1);G--;)this._resetBufferLine(G);this._dirtyRowService.markDirty(0);break;case 2:for(G=this._bufferService.rows,this._dirtyRowService.markDirty(G-1);G--;)this._resetBufferLine(G);this._dirtyRowService.markDirty(0);break;case 3:var J=this._activeBuffer.lines.length-this._bufferService.rows;J>0&&(this._activeBuffer.lines.trimStart(J),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-J,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-J,0),this._onScroll.fire(0))}return!0},j.prototype.eraseInLine=function($){switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},j.prototype.insertLines=function($){this._restrictCursor();var G=$.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var J=this._activeBuffer.ybase+this._activeBuffer.y,q=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Z=this._bufferService.rows-1+this._activeBuffer.ybase-q+1;G--;)this._activeBuffer.lines.splice(Z-1,1),this._activeBuffer.lines.splice(J,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},j.prototype.deleteLines=function($){this._restrictCursor();var G=$.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var J,q=this._activeBuffer.ybase+this._activeBuffer.y;for(J=this._bufferService.rows-1-this._activeBuffer.scrollBottom,J=this._bufferService.rows-1+this._activeBuffer.ybase-J;G--;)this._activeBuffer.lines.splice(q,1),this._activeBuffer.lines.splice(J,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},j.prototype.insertChars=function($){this._restrictCursor();var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return G&&(G.insertCells(this._activeBuffer.x,$.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},j.prototype.deleteChars=function($){this._restrictCursor();var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return G&&(G.deleteCells(this._activeBuffer.x,$.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},j.prototype.scrollUp=function($){for(var G=$.params[0]||1;G--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},j.prototype.scrollDown=function($){for(var G=$.params[0]||1;G--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(b.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},j.prototype.scrollLeft=function($){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var G=$.params[0]||1,J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){var q=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);q.deleteCells(0,G,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),q.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},j.prototype.scrollRight=function($){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var G=$.params[0]||1,J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){var q=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);q.insertCells(0,G,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),q.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},j.prototype.insertColumns=function($){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var G=$.params[0]||1,J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){var q=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);q.insertCells(this._activeBuffer.x,G,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),q.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},j.prototype.deleteColumns=function($){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var G=$.params[0]||1,J=this._activeBuffer.scrollTop;J<=this._activeBuffer.scrollBottom;++J){var q=this._activeBuffer.lines.get(this._activeBuffer.ybase+J);q.deleteCells(this._activeBuffer.x,G,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),q.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},j.prototype.eraseChars=function($){this._restrictCursor();var G=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return G&&(G.replaceCells(this._activeBuffer.x,this._activeBuffer.x+($.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},j.prototype.repeatPrecedingCharacter=function($){if(!this._parser.precedingCodepoint)return!0;for(var G=$.params[0]||1,J=new Uint32Array(G),q=0;q<G;++q)J[q]=this._parser.precedingCodepoint;return this.print(J,0,J.length),!0},j.prototype.sendDeviceAttributesPrimary=function($){return $.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0},j.prototype.sendDeviceAttributesSecondary=function($){return $.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent($.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0},j.prototype._is=function($){return(this._optionsService.options.termName+"").indexOf($)===0},j.prototype.setMode=function($){for(var G=0;G<$.length;G++)$.params[G]===4&&(this._coreService.modes.insertMode=!0);return!0},j.prototype.setModePrivate=function($){for(var G=0;G<$.length;G++)switch($.params[G]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},j.prototype.resetMode=function($){for(var G=0;G<$.length;G++)$.params[G]===4&&(this._coreService.modes.insertMode=!1);return!0},j.prototype.resetModePrivate=function($){for(var G=0;G<$.length;G++)switch($.params[G]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),$.params[G]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},j.prototype._updateAttrColor=function($,G,J,q,Z){return G===2?($|=50331648,$&=-16777216,$|=T.AttributeData.fromColorRGB([J,q,Z])):G===5&&($&=-50331904,$|=33554432|255&J),$},j.prototype._extractColor=function($,G,J){var q=[0,0,-1,0,0,0],Z=0,ne=0;do{if(q[ne+Z]=$.params[G+ne],$.hasSubParams(G+ne)){var fe=$.getSubParams(G+ne),Se=0;do q[1]===5&&(Z=1),q[ne+Se+1+Z]=fe[Se];while(++Se<fe.length&&Se+ne+1+Z<q.length);break}if(q[1]===5&&ne+Z>=2||q[1]===2&&ne+Z>=5)break;q[1]&&(Z=1)}while(++ne+G<$.length&&ne+Z<q.length);for(Se=2;Se<q.length;++Se)q[Se]===-1&&(q[Se]=0);switch(q[0]){case 38:J.fg=this._updateAttrColor(J.fg,q[1],q[3],q[4],q[5]);break;case 48:J.bg=this._updateAttrColor(J.bg,q[1],q[3],q[4],q[5]);break;case 58:J.extended=J.extended.clone(),J.extended.underlineColor=this._updateAttrColor(J.extended.underlineColor,q[1],q[3],q[4],q[5])}return ne},j.prototype._processUnderline=function($,G){G.extended=G.extended.clone(),(!~$||$>5)&&($=1),G.extended.underlineStyle=$,G.fg|=268435456,$===0&&(G.fg&=-268435457),G.updateExtended()},j.prototype.charAttributes=function($){if($.length===1&&$.params[0]===0)return this._curAttrData.fg=b.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=b.DEFAULT_ATTR_DATA.bg,!0;for(var G,J=$.length,q=this._curAttrData,Z=0;Z<J;Z++)(G=$.params[Z])>=30&&G<=37?(q.fg&=-50331904,q.fg|=16777216|G-30):G>=40&&G<=47?(q.bg&=-50331904,q.bg|=16777216|G-40):G>=90&&G<=97?(q.fg&=-50331904,q.fg|=16777224|G-90):G>=100&&G<=107?(q.bg&=-50331904,q.bg|=16777224|G-100):G===0?(q.fg=b.DEFAULT_ATTR_DATA.fg,q.bg=b.DEFAULT_ATTR_DATA.bg):G===1?q.fg|=134217728:G===3?q.bg|=67108864:G===4?(q.fg|=268435456,this._processUnderline($.hasSubParams(Z)?$.getSubParams(Z)[0]:1,q)):G===5?q.fg|=536870912:G===7?q.fg|=67108864:G===8?q.fg|=1073741824:G===9?q.fg|=2147483648:G===2?q.bg|=134217728:G===21?this._processUnderline(2,q):G===22?(q.fg&=-134217729,q.bg&=-134217729):G===23?q.bg&=-67108865:G===24?q.fg&=-268435457:G===25?q.fg&=-536870913:G===27?q.fg&=-67108865:G===28?q.fg&=-1073741825:G===29?q.fg&=2147483647:G===39?(q.fg&=-67108864,q.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):G===49?(q.bg&=-67108864,q.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):G===38||G===48||G===58?Z+=this._extractColor($,Z,q):G===59?(q.extended=q.extended.clone(),q.extended.underlineColor=-1,q.updateExtended()):G===100?(q.fg&=-67108864,q.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,q.bg&=-67108864,q.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",G);return!0},j.prototype.deviceStatus=function($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(h.C0.ESC+"[0n");break;case 6:var G=this._activeBuffer.y+1,J=this._activeBuffer.x+1;this._coreService.triggerDataEvent(h.C0.ESC+"["+G+";"+J+"R")}return!0},j.prototype.deviceStatusPrivate=function($){if($.params[0]===6){var G=this._activeBuffer.y+1,J=this._activeBuffer.x+1;this._coreService.triggerDataEvent(h.C0.ESC+"[?"+G+";"+J+"R")}return!0},j.prototype.softReset=function($){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},j.prototype.setCursorStyle=function($){var G=$.params[0]||1;switch(G){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var J=G%2==1;return this._optionsService.options.cursorBlink=J,!0},j.prototype.setScrollRegion=function($){var G,J=$.params[0]||1;return($.length<2||(G=$.params[1])>this._bufferService.rows||G===0)&&(G=this._bufferService.rows),G>J&&(this._activeBuffer.scrollTop=J-1,this._activeBuffer.scrollBottom=G-1,this._setCursor(0,0)),!0},j.prototype.windowOptions=function($){if(!M($.params[0],this._optionsService.options.windowOptions))return!0;var G=$.length>1?$.params[1]:0;switch($.params[0]){case 14:G!==2&&this._onRequestWindowsOptionsReport.fire(d.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(d.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(h.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:G!==0&&G!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),G!==0&&G!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:G!==0&&G!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),G!==0&&G!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},j.prototype.saveCursor=function($){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},j.prototype.restoreCursor=function($){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},j.prototype.setTitle=function($){return this._windowTitle=$,this._onTitleChange.fire($),!0},j.prototype.setIconName=function($){return this._iconName=$,!0},j.prototype.setOrReportIndexedColor=function($){for(var G=[],J=$.split(";");J.length>1;){var q=J.shift(),Z=J.shift();if(/^\d+$/.exec(q)){var ne=parseInt(q);if(0<=ne&&ne<256)if(Z==="?")G.push({type:0,index:ne});else{var fe=(0,O.parseColor)(Z);fe&&G.push({type:1,index:ne,color:fe})}}}return G.length&&this._onColor.fire(G),!0},j.prototype._setOrReportSpecialColor=function($,G){for(var J=$.split(";"),q=0;q<J.length&&!(G>=this._specialColors.length);++q,++G)if(J[q]==="?")this._onColor.fire([{type:0,index:this._specialColors[G]}]);else{var Z=(0,O.parseColor)(J[q]);Z&&this._onColor.fire([{type:1,index:this._specialColors[G],color:Z}])}return!0},j.prototype.setOrReportFgColor=function($){return this._setOrReportSpecialColor($,0)},j.prototype.setOrReportBgColor=function($){return this._setOrReportSpecialColor($,1)},j.prototype.setOrReportCursorColor=function($){return this._setOrReportSpecialColor($,2)},j.prototype.restoreIndexedColor=function($){if(!$)return this._onColor.fire([{type:2}]),!0;for(var G=[],J=$.split(";"),q=0;q<J.length;++q)if(/^\d+$/.exec(J[q])){var Z=parseInt(J[q]);0<=Z&&Z<256&&G.push({type:2,index:Z})}return G.length&&this._onColor.fire(G),!0},j.prototype.restoreFgColor=function($){return this._onColor.fire([{type:2,index:256}]),!0},j.prototype.restoreBgColor=function($){return this._onColor.fire([{type:2,index:257}]),!0},j.prototype.restoreCursorColor=function($){return this._onColor.fire([{type:2,index:258}]),!0},j.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},j.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},j.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},j.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0},j.prototype.selectCharset=function($){return $.length!==2?(this.selectDefaultCharset(),!0):($[0]==="/"||this._charsetService.setgCharset(P[$[0]],g.CHARSETS[$[1]]||g.DEFAULT_CHARSET),!0)},j.prototype.index=function(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},j.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},j.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var $=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,$,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},j.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},j.prototype.reset=function(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()},j.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},j.prototype.setgLevel=function($){return this._charsetService.setgLevel($),!0},j.prototype.screenAlignmentPattern=function(){var $=new w.CellData;$.content=1<<22|"E".charCodeAt(0),$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(var G=0;G<this._bufferService.rows;++G){var J=this._activeBuffer.ybase+this._activeBuffer.y+G,q=this._activeBuffer.lines.get(J);q&&(q.fill($),q.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},j}(C.Disposable);a.InputHandler=U},844:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.Disposable=void 0;var l=function(){function u(){this._disposables=[],this._isDisposed=!1}return u.prototype.dispose=function(){this._isDisposed=!0;for(var d=0,h=this._disposables;d<h.length;d++)h[d].dispose();this._disposables.length=0},u.prototype.register=function(d){return this._disposables.push(d),d},u.prototype.unregister=function(d){var h=this._disposables.indexOf(d);h!==-1&&this._disposables.splice(h,1)},u}();function c(u){for(var d=0,h=u;d<h.length;d++)h[d].dispose();u.length=0}a.Disposable=l,a.disposeArray=c,a.getDisposeArrayDisposable=function(u){return{dispose:function(){return c(u)}}}},6114:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.isSafari=a.isFirefox=void 0;var l=typeof navigator=="undefined",c=l?"node":navigator.userAgent,u=l?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(u),a.isIpad=u==="iPad",a.isIphone=u==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(u),a.isLinux=u.indexOf("Linux")>=0},8273:(s,a)=>{function l(c,u,d,h){if(d===void 0&&(d=0),h===void 0&&(h=c.length),d>=c.length)return c;d=(c.length+d)%c.length,h=h>=c.length?c.length:(c.length+h)%c.length;for(var g=d;g<h;++g)c[g]=u;return c}Object.defineProperty(a,"__esModule",{value:!0}),a.concat=a.fillFallback=a.fill=void 0,a.fill=function(c,u,d,h){return c.fill?c.fill(u,d,h):l(c,u,d,h)},a.fillFallback=l,a.concat=function(c,u){var d=new c.constructor(c.length+u.length);return d.set(c),d.set(u,c.length),d}},9282:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;var c=l(643);a.updateWindowsModeWrappedState=function(u){var d=u.buffer.lines.get(u.buffer.ybase+u.buffer.y-1),h=d==null?void 0:d.get(u.cols-1),g=u.buffer.lines.get(u.buffer.ybase+u.buffer.y);g&&h&&(g.isWrapped=h[c.CHAR_DATA_CODE_INDEX]!==c.NULL_CELL_CODE&&h[c.CHAR_DATA_CODE_INDEX]!==c.WHITESPACE_CELL_CODE)}},3734:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;var l=function(){function u(){this.fg=0,this.bg=0,this.extended=new c}return u.toColorRGB=function(d){return[d>>>16&255,d>>>8&255,255&d]},u.fromColorRGB=function(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]},u.prototype.clone=function(){var d=new u;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d},u.prototype.isInverse=function(){return 67108864&this.fg},u.prototype.isBold=function(){return 134217728&this.fg},u.prototype.isUnderline=function(){return 268435456&this.fg},u.prototype.isBlink=function(){return 536870912&this.fg},u.prototype.isInvisible=function(){return 1073741824&this.fg},u.prototype.isItalic=function(){return 67108864&this.bg},u.prototype.isDim=function(){return 134217728&this.bg},u.prototype.isStrikethrough=function(){return 2147483648&this.fg},u.prototype.getFgColorMode=function(){return 50331648&this.fg},u.prototype.getBgColorMode=function(){return 50331648&this.bg},u.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},u.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},u.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},u.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},u.prototype.isFgDefault=function(){return(50331648&this.fg)==0},u.prototype.isBgDefault=function(){return(50331648&this.bg)==0},u.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},u.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},u.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},u.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},u.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},u.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},u.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},u.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},u.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},u.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},u.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},u}();a.AttributeData=l;var c=function(){function u(d,h){d===void 0&&(d=0),h===void 0&&(h=-1),this.underlineStyle=d,this.underlineColor=h}return u.prototype.clone=function(){return new u(this.underlineStyle,this.underlineColor)},u.prototype.isEmpty=function(){return this.underlineStyle===0},u}();a.ExtendedAttrs=c},9092:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferStringIterator=a.Buffer=a.MAX_BUFFER_SIZE=void 0;var c=l(6349),u=l(8437),d=l(511),h=l(643),g=l(4634),m=l(4863),C=l(7116),y=l(3734);a.MAX_BUFFER_SIZE=4294967295;var S=function(){function A(v,w,T){this._hasScrollback=v,this._optionsService=w,this._bufferService=T,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=u.DEFAULT_ATTR_DATA.clone(),this.savedCharset=C.DEFAULT_CHARSET,this.markers=[],this._nullCell=d.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]),this._whitespaceCell=d.CellData.fromCharData([0,h.WHITESPACE_CELL_CHAR,h.WHITESPACE_CELL_WIDTH,h.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return A.prototype.getNullCell=function(v){return v?(this._nullCell.fg=v.fg,this._nullCell.bg=v.bg,this._nullCell.extended=v.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new y.ExtendedAttrs),this._nullCell},A.prototype.getWhitespaceCell=function(v){return v?(this._whitespaceCell.fg=v.fg,this._whitespaceCell.bg=v.bg,this._whitespaceCell.extended=v.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new y.ExtendedAttrs),this._whitespaceCell},A.prototype.getBlankLine=function(v,w){return new u.BufferLine(this._bufferService.cols,this.getNullCell(v),w)},Object.defineProperty(A.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isCursorInViewport",{get:function(){var v=this.ybase+this.y-this.ydisp;return v>=0&&v<this._rows},enumerable:!1,configurable:!0}),A.prototype._getCorrectBufferLength=function(v){if(!this._hasScrollback)return v;var w=v+this._optionsService.options.scrollback;return w>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:w},A.prototype.fillViewportRows=function(v){if(this.lines.length===0){v===void 0&&(v=u.DEFAULT_ATTR_DATA);for(var w=this._rows;w--;)this.lines.push(this.getBlankLine(v))}},A.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new c.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},A.prototype.resize=function(v,w){var T=this.getNullCell(u.DEFAULT_ATTR_DATA),I=this._getCorrectBufferLength(w);if(I>this.lines.maxLength&&(this.lines.maxLength=I),this.lines.length>0){if(this._cols<v)for(var x=0;x<this.lines.length;x++)this.lines.get(x).resize(v,T);var L=0;if(this._rows<w)for(var O=this._rows;O<w;O++)this.lines.length<w+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new u.BufferLine(v,T)):this.ybase>0&&this.lines.length<=this.ybase+this.y+L+1?(this.ybase--,L++,this.ydisp>0&&this.ydisp--):this.lines.push(new u.BufferLine(v,T)));else for(O=this._rows;O>w;O--)this.lines.length>w+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(I<this.lines.maxLength){var P=this.lines.length-I;P>0&&(this.lines.trimStart(P),this.ybase=Math.max(this.ybase-P,0),this.ydisp=Math.max(this.ydisp-P,0),this.savedY=Math.max(this.savedY-P,0)),this.lines.maxLength=I}this.x=Math.min(this.x,v-1),this.y=Math.min(this.y,w-1),L&&(this.y+=L),this.savedX=Math.min(this.savedX,v-1),this.scrollTop=0}if(this.scrollBottom=w-1,this._isReflowEnabled&&(this._reflow(v,w),this._cols>v))for(x=0;x<this.lines.length;x++)this.lines.get(x).resize(v,T);this._cols=v,this._rows=w},Object.defineProperty(A.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),A.prototype._reflow=function(v,w){this._cols!==v&&(v>this._cols?this._reflowLarger(v,w):this._reflowSmaller(v,w))},A.prototype._reflowLarger=function(v,w){var T=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,v,this.ybase+this.y,this.getNullCell(u.DEFAULT_ATTR_DATA));if(T.length>0){var I=(0,g.reflowLargerCreateNewLayout)(this.lines,T);(0,g.reflowLargerApplyNewLayout)(this.lines,I.layout),this._reflowLargerAdjustViewport(v,w,I.countRemoved)}},A.prototype._reflowLargerAdjustViewport=function(v,w,T){for(var I=this.getNullCell(u.DEFAULT_ATTR_DATA),x=T;x-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<w&&this.lines.push(new u.BufferLine(v,I))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-T,0)},A.prototype._reflowSmaller=function(v,w){for(var T=this.getNullCell(u.DEFAULT_ATTR_DATA),I=[],x=0,L=this.lines.length-1;L>=0;L--){var O=this.lines.get(L);if(!(!O||!O.isWrapped&&O.getTrimmedLength()<=v)){for(var P=[O];O.isWrapped&&L>0;)O=this.lines.get(--L),P.unshift(O);var N=this.ybase+this.y;if(!(N>=L&&N<L+P.length)){var M,W=P[P.length-1].getTrimmedLength(),U=(0,g.reflowSmallerGetNewLineLengths)(P,this._cols,v),z=U.length-P.length;M=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+z):Math.max(0,this.lines.length-this.lines.maxLength+z);for(var j=[],$=0;$<z;$++){var G=this.getBlankLine(u.DEFAULT_ATTR_DATA,!0);j.push(G)}j.length>0&&(I.push({start:L+P.length+x,newLines:j}),x+=j.length),P.push.apply(P,j);var J=U.length-1,q=U[J];q===0&&(q=U[--J]);for(var Z=P.length-z-1,ne=W;Z>=0;){var fe=Math.min(ne,q);if(P[J].copyCellsFrom(P[Z],ne-fe,q-fe,fe,!0),(q-=fe)==0&&(q=U[--J]),(ne-=fe)==0){Z--;var Se=Math.max(Z,0);ne=(0,g.getWrappedLineTrimmedLength)(P,Se,this._cols)}}for($=0;$<P.length;$++)U[$]<v&&P[$].setCell(U[$],T);for(var Fe=z-M;Fe-- >0;)this.ybase===0?this.y<w-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+x)-w&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+z,this.ybase+w-1)}}}if(I.length>0){var ie=[],Ce=[];for($=0;$<this.lines.length;$++)Ce.push(this.lines.get($));var ye=this.lines.length,Ye=ye-1,Re=0,Xe=I[Re];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);var ft=0;for($=Math.min(this.lines.maxLength-1,ye+x-1);$>=0;$--)if(Xe&&Xe.start>Ye+ft){for(var Ut=Xe.newLines.length-1;Ut>=0;Ut--)this.lines.set($--,Xe.newLines[Ut]);$++,ie.push({index:Ye+1,amount:Xe.newLines.length}),ft+=Xe.newLines.length,Xe=I[++Re]}else this.lines.set($,Ce[Ye--]);var et=0;for($=ie.length-1;$>=0;$--)ie[$].index+=et,this.lines.onInsertEmitter.fire(ie[$]),et+=ie[$].amount;var qt=Math.max(0,ye+x-this.lines.maxLength);qt>0&&this.lines.onTrimEmitter.fire(qt)}},A.prototype.stringIndexToBufferIndex=function(v,w,T){for(T===void 0&&(T=!1);w;){var I=this.lines.get(v);if(!I)return[-1,-1];for(var x=T?I.getTrimmedLength():I.length,L=0;L<x;++L)if(I.get(L)[h.CHAR_DATA_WIDTH_INDEX]&&(w-=I.get(L)[h.CHAR_DATA_CHAR_INDEX].length||1),w<0)return[v,L];v++}return[v,0]},A.prototype.translateBufferLineToString=function(v,w,T,I){T===void 0&&(T=0);var x=this.lines.get(v);return x?x.translateToString(w,T,I):""},A.prototype.getWrappedRangeForLine=function(v){for(var w=v,T=v;w>0&&this.lines.get(w).isWrapped;)w--;for(;T+1<this.lines.length&&this.lines.get(T+1).isWrapped;)T++;return{first:w,last:T}},A.prototype.setupTabStops=function(v){for(v!=null?this.tabs[v]||(v=this.prevStop(v)):(this.tabs={},v=0);v<this._cols;v+=this._optionsService.options.tabStopWidth)this.tabs[v]=!0},A.prototype.prevStop=function(v){for(v==null&&(v=this.x);!this.tabs[--v]&&v>0;);return v>=this._cols?this._cols-1:v<0?0:v},A.prototype.nextStop=function(v){for(v==null&&(v=this.x);!this.tabs[++v]&&v<this._cols;);return v>=this._cols?this._cols-1:v<0?0:v},A.prototype.addMarker=function(v){var w=this,T=new m.Marker(v);return this.markers.push(T),T.register(this.lines.onTrim(function(I){T.line-=I,T.line<0&&T.dispose()})),T.register(this.lines.onInsert(function(I){T.line>=I.index&&(T.line+=I.amount)})),T.register(this.lines.onDelete(function(I){T.line>=I.index&&T.line<I.index+I.amount&&T.dispose(),T.line>I.index&&(T.line-=I.amount)})),T.register(T.onDispose(function(){return w._removeMarker(T)})),T},A.prototype._removeMarker=function(v){this.markers.splice(this.markers.indexOf(v),1)},A.prototype.iterator=function(v,w,T,I,x){return new b(this,v,w,T,I,x)},A}();a.Buffer=S;var b=function(){function A(v,w,T,I,x,L){T===void 0&&(T=0),I===void 0&&(I=v.lines.length),x===void 0&&(x=0),L===void 0&&(L=0),this._buffer=v,this._trimRight=w,this._startIndex=T,this._endIndex=I,this._startOverscan=x,this._endOverscan=L,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return A.prototype.hasNext=function(){return this._current<this._endIndex},A.prototype.next=function(){var v=this._buffer.getWrappedRangeForLine(this._current);v.first<this._startIndex-this._startOverscan&&(v.first=this._startIndex-this._startOverscan),v.last>this._endIndex+this._endOverscan&&(v.last=this._endIndex+this._endOverscan),v.first=Math.max(v.first,0),v.last=Math.min(v.last,this._buffer.lines.length);for(var w="",T=v.first;T<=v.last;++T)w+=this._buffer.translateBufferLineToString(T,this._trimRight);return this._current=v.last+1,{range:v,content:w}},A}();a.BufferStringIterator=b},8437:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;var c=l(482),u=l(643),d=l(511),h=l(3734);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);var g=function(){function m(C,y,S){S===void 0&&(S=!1),this.isWrapped=S,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*C);for(var b=y||d.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),A=0;A<C;++A)this.setCell(A,b);this.length=C}return m.prototype.get=function(C){var y=this._data[3*C+0],S=2097151&y;return[this._data[3*C+1],2097152&y?this._combined[C]:S?(0,c.stringFromCodePoint)(S):"",y>>22,2097152&y?this._combined[C].charCodeAt(this._combined[C].length-1):S]},m.prototype.set=function(C,y){this._data[3*C+1]=y[u.CHAR_DATA_ATTR_INDEX],y[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[C]=y[1],this._data[3*C+0]=2097152|C|y[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*C+0]=y[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[u.CHAR_DATA_WIDTH_INDEX]<<22},m.prototype.getWidth=function(C){return this._data[3*C+0]>>22},m.prototype.hasWidth=function(C){return 12582912&this._data[3*C+0]},m.prototype.getFg=function(C){return this._data[3*C+1]},m.prototype.getBg=function(C){return this._data[3*C+2]},m.prototype.hasContent=function(C){return 4194303&this._data[3*C+0]},m.prototype.getCodePoint=function(C){var y=this._data[3*C+0];return 2097152&y?this._combined[C].charCodeAt(this._combined[C].length-1):2097151&y},m.prototype.isCombined=function(C){return 2097152&this._data[3*C+0]},m.prototype.getString=function(C){var y=this._data[3*C+0];return 2097152&y?this._combined[C]:2097151&y?(0,c.stringFromCodePoint)(2097151&y):""},m.prototype.loadCell=function(C,y){var S=3*C;return y.content=this._data[S+0],y.fg=this._data[S+1],y.bg=this._data[S+2],2097152&y.content&&(y.combinedData=this._combined[C]),268435456&y.bg&&(y.extended=this._extendedAttrs[C]),y},m.prototype.setCell=function(C,y){2097152&y.content&&(this._combined[C]=y.combinedData),268435456&y.bg&&(this._extendedAttrs[C]=y.extended),this._data[3*C+0]=y.content,this._data[3*C+1]=y.fg,this._data[3*C+2]=y.bg},m.prototype.setCellFromCodePoint=function(C,y,S,b,A,v){268435456&A&&(this._extendedAttrs[C]=v),this._data[3*C+0]=y|S<<22,this._data[3*C+1]=b,this._data[3*C+2]=A},m.prototype.addCodepointToCell=function(C,y){var S=this._data[3*C+0];2097152&S?this._combined[C]+=(0,c.stringFromCodePoint)(y):(2097151&S?(this._combined[C]=(0,c.stringFromCodePoint)(2097151&S)+(0,c.stringFromCodePoint)(y),S&=-2097152,S|=2097152):S=y|1<<22,this._data[3*C+0]=S)},m.prototype.insertCells=function(C,y,S,b){if((C%=this.length)&&this.getWidth(C-1)===2&&this.setCellFromCodePoint(C-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new h.ExtendedAttrs),y<this.length-C){for(var A=new d.CellData,v=this.length-C-y-1;v>=0;--v)this.setCell(C+y+v,this.loadCell(C+v,A));for(v=0;v<y;++v)this.setCell(C+v,S)}else for(v=C;v<this.length;++v)this.setCell(v,S);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new h.ExtendedAttrs)},m.prototype.deleteCells=function(C,y,S,b){if(C%=this.length,y<this.length-C){for(var A=new d.CellData,v=0;v<this.length-C-y;++v)this.setCell(C+v,this.loadCell(C+y+v,A));for(v=this.length-y;v<this.length;++v)this.setCell(v,S)}else for(v=C;v<this.length;++v)this.setCell(v,S);C&&this.getWidth(C-1)===2&&this.setCellFromCodePoint(C-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new h.ExtendedAttrs),this.getWidth(C)!==0||this.hasContent(C)||this.setCellFromCodePoint(C,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new h.ExtendedAttrs)},m.prototype.replaceCells=function(C,y,S,b){for(C&&this.getWidth(C-1)===2&&this.setCellFromCodePoint(C-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new h.ExtendedAttrs),y<this.length&&this.getWidth(y-1)===2&&this.setCellFromCodePoint(y,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new h.ExtendedAttrs);C<y&&C<this.length;)this.setCell(C++,S)},m.prototype.resize=function(C,y){if(C!==this.length){if(C>this.length){var S=new Uint32Array(3*C);this.length&&(3*C<this._data.length?S.set(this._data.subarray(0,3*C)):S.set(this._data)),this._data=S;for(var b=this.length;b<C;++b)this.setCell(b,y)}else if(C){(S=new Uint32Array(3*C)).set(this._data.subarray(0,3*C)),this._data=S;var A=Object.keys(this._combined);for(b=0;b<A.length;b++){var v=parseInt(A[b],10);v>=C&&delete this._combined[v]}}else this._data=new Uint32Array(0),this._combined={};this.length=C}},m.prototype.fill=function(C){this._combined={},this._extendedAttrs={};for(var y=0;y<this.length;++y)this.setCell(y,C)},m.prototype.copyFrom=function(C){for(var y in this.length!==C.length?this._data=new Uint32Array(C._data):this._data.set(C._data),this.length=C.length,this._combined={},C._combined)this._combined[y]=C._combined[y];for(var y in this._extendedAttrs={},C._extendedAttrs)this._extendedAttrs[y]=C._extendedAttrs[y];this.isWrapped=C.isWrapped},m.prototype.clone=function(){var C=new m(0);for(var y in C._data=new Uint32Array(this._data),C.length=this.length,this._combined)C._combined[y]=this._combined[y];for(var y in this._extendedAttrs)C._extendedAttrs[y]=this._extendedAttrs[y];return C.isWrapped=this.isWrapped,C},m.prototype.getTrimmedLength=function(){for(var C=this.length-1;C>=0;--C)if(4194303&this._data[3*C+0])return C+(this._data[3*C+0]>>22);return 0},m.prototype.copyCellsFrom=function(C,y,S,b,A){var v=C._data;if(A)for(var w=b-1;w>=0;w--)for(var T=0;T<3;T++)this._data[3*(S+w)+T]=v[3*(y+w)+T];else for(w=0;w<b;w++)for(T=0;T<3;T++)this._data[3*(S+w)+T]=v[3*(y+w)+T];var I=Object.keys(C._combined);for(T=0;T<I.length;T++){var x=parseInt(I[T],10);x>=y&&(this._combined[x-y+S]=C._combined[x])}},m.prototype.translateToString=function(C,y,S){C===void 0&&(C=!1),y===void 0&&(y=0),S===void 0&&(S=this.length),C&&(S=Math.min(S,this.getTrimmedLength()));for(var b="";y<S;){var A=this._data[3*y+0],v=2097151&A;b+=2097152&A?this._combined[y]:v?(0,c.stringFromCodePoint)(v):u.WHITESPACE_CELL_CHAR,y+=A>>22||1}return b},m}();a.BufferLine=g},4841:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(l,c){if(l.start.y>l.end.y)throw new Error("Buffer range end ("+l.end.x+", "+l.end.y+") cannot be before start ("+l.start.x+", "+l.start.y+")");return c*(l.end.y-l.start.y)+(l.end.x-l.start.x+1)}},4634:(s,a)=>{function l(c,u,d){if(u===c.length-1)return c[u].getTrimmedLength();var h=!c[u].hasContent(d-1)&&c[u].getWidth(d-1)===1,g=c[u+1].getWidth(0)===2;return h&&g?d-1:d}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(c,u,d,h,g){for(var m=[],C=0;C<c.length-1;C++){var y=C,S=c.get(++y);if(S.isWrapped){for(var b=[c.get(C)];y<c.length&&S.isWrapped;)b.push(S),S=c.get(++y);if(h>=C&&h<y)C+=b.length-1;else{for(var A=0,v=l(b,A,u),w=1,T=0;w<b.length;){var I=l(b,w,u),x=I-T,L=d-v,O=Math.min(x,L);b[A].copyCellsFrom(b[w],T,v,O,!1),(v+=O)===d&&(A++,v=0),(T+=O)===I&&(w++,T=0),v===0&&A!==0&&b[A-1].getWidth(d-1)===2&&(b[A].copyCellsFrom(b[A-1],d-1,v++,1,!1),b[A-1].setCell(d-1,g))}b[A].replaceCells(v,d,g);for(var P=0,N=b.length-1;N>0&&(N>A||b[N].getTrimmedLength()===0);N--)P++;P>0&&(m.push(C+b.length-P),m.push(P)),C+=b.length-1}}}return m},a.reflowLargerCreateNewLayout=function(c,u){for(var d=[],h=0,g=u[h],m=0,C=0;C<c.length;C++)if(g===C){var y=u[++h];c.onDeleteEmitter.fire({index:C-m,amount:y}),C+=y-1,m+=y,g=u[++h]}else d.push(C);return{layout:d,countRemoved:m}},a.reflowLargerApplyNewLayout=function(c,u){for(var d=[],h=0;h<u.length;h++)d.push(c.get(u[h]));for(h=0;h<d.length;h++)c.set(h,d[h]);c.length=u.length},a.reflowSmallerGetNewLineLengths=function(c,u,d){for(var h=[],g=c.map(function(v,w){return l(c,w,u)}).reduce(function(v,w){return v+w}),m=0,C=0,y=0;y<g;){if(g-y<d){h.push(g-y);break}m+=d;var S=l(c,C,u);m>S&&(m-=S,C++);var b=c[C].getWidth(m-1)===2;b&&m--;var A=b?d-1:d;h.push(A),y+=A}return h},a.getWrappedLineTrimmedLength=l},5295:function(s,a,l){var c,u=this&&this.__extends||(c=function(m,C){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,S){y.__proto__=S}||function(y,S){for(var b in S)Object.prototype.hasOwnProperty.call(S,b)&&(y[b]=S[b])},c(m,C)},function(m,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");function y(){this.constructor=m}c(m,C),m.prototype=C===null?Object.create(C):(y.prototype=C.prototype,new y)});Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;var d=l(9092),h=l(8460),g=function(m){function C(y,S){var b=m.call(this)||this;return b._optionsService=y,b._bufferService=S,b._onBufferActivate=b.register(new h.EventEmitter),b.reset(),b}return u(C,m),Object.defineProperty(C.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),C.prototype.reset=function(){this._normal=new d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(C.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),C.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},C.prototype.activateAltBuffer=function(y){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(y),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},C.prototype.resize=function(y,S){this._normal.resize(y,S),this._alt.resize(y,S)},C.prototype.setupTabStops=function(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)},C}(l(844).Disposable);a.BufferSet=g},511:function(s,a,l){var c,u=this&&this.__extends||(c=function(C,y){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,b){S.__proto__=b}||function(S,b){for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&(S[A]=b[A])},c(C,y)},function(C,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");function S(){this.constructor=C}c(C,y),C.prototype=y===null?Object.create(y):(S.prototype=y.prototype,new S)});Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;var d=l(482),h=l(643),g=l(3734),m=function(C){function y(){var S=C!==null&&C.apply(this,arguments)||this;return S.content=0,S.fg=0,S.bg=0,S.extended=new g.ExtendedAttrs,S.combinedData="",S}return u(y,C),y.fromCharData=function(S){var b=new y;return b.setFromCharData(S),b},y.prototype.isCombined=function(){return 2097152&this.content},y.prototype.getWidth=function(){return this.content>>22},y.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""},y.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},y.prototype.setFromCharData=function(S){this.fg=S[h.CHAR_DATA_ATTR_INDEX],this.bg=0;var b=!1;if(S[h.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(S[h.CHAR_DATA_CHAR_INDEX].length===2){var A=S[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=A&&A<=56319){var v=S[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(A-55296)+v-56320+65536|S[h.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=S[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[h.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=S[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[h.CHAR_DATA_WIDTH_INDEX]<<22)},y.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},y}(g.AttributeData);a.CellData=m},643:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=256,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:function(s,a,l){var c,u=this&&this.__extends||(c=function(g,m){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,y){C.__proto__=y}||function(C,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(C[S]=y[S])},c(g,m)},function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function C(){this.constructor=g}c(g,m),g.prototype=m===null?Object.create(m):(C.prototype=m.prototype,new C)});Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;var d=l(8460),h=function(g){function m(C){var y=g.call(this)||this;return y.line=C,y._id=m._nextId++,y.isDisposed=!1,y._onDispose=new d.EventEmitter,y}return u(m,g),Object.defineProperty(m.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),m.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),g.prototype.dispose.call(this))},m._nextId=1,m}(l(844).Disposable);a.Marker=h},7116:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},a.CHARSETS.A={"#":"\xA3"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},a.CHARSETS.C=a.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},a.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},a.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},a.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},a.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},a.CHARSETS.E=a.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},a.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},a.CHARSETS.H=a.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},a.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},2584:(s,a)=>{var l,c;Object.defineProperty(a,"__esModule",{value:!0}),a.C1=a.C0=void 0,(c=a.C0||(a.C0={})).NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
1599
1599
  `,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL="\x7F",(l=a.C1||(a.C1={})).PAD="\x80",l.HOP="\x81",l.BPH="\x82",l.NBH="\x83",l.IND="\x84",l.NEL="\x85",l.SSA="\x86",l.ESA="\x87",l.HTS="\x88",l.HTJ="\x89",l.VTS="\x8A",l.PLD="\x8B",l.PLU="\x8C",l.RI="\x8D",l.SS2="\x8E",l.SS3="\x8F",l.DCS="\x90",l.PU1="\x91",l.PU2="\x92",l.STS="\x93",l.CCH="\x94",l.MW="\x95",l.SPA="\x96",l.EPA="\x97",l.SOS="\x98",l.SGCI="\x99",l.SCI="\x9A",l.CSI="\x9B",l.ST="\x9C",l.OSC="\x9D",l.PM="\x9E",l.APC="\x9F"},7399:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;var c=l(2584),u={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(d,h,g,m){var C={type:0,cancel:!1,key:void 0},y=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?C.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?C.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?C.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(C.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:if(d.shiftKey){C.key=c.C0.BS;break}if(d.altKey){C.key=c.C0.ESC+c.C0.DEL;break}C.key=c.C0.DEL;break;case 9:if(d.shiftKey){C.key=c.C0.ESC+"[Z";break}C.key=c.C0.HT,C.cancel=!0;break;case 13:C.key=d.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,C.cancel=!0;break;case 27:C.key=c.C0.ESC,d.altKey&&(C.key=c.C0.ESC+c.C0.ESC),C.cancel=!0;break;case 37:if(d.metaKey)break;y?(C.key=c.C0.ESC+"[1;"+(y+1)+"D",C.key===c.C0.ESC+"[1;3D"&&(C.key=c.C0.ESC+(g?"b":"[1;5D"))):C.key=h?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(d.metaKey)break;y?(C.key=c.C0.ESC+"[1;"+(y+1)+"C",C.key===c.C0.ESC+"[1;3C"&&(C.key=c.C0.ESC+(g?"f":"[1;5C"))):C.key=h?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(d.metaKey)break;y?(C.key=c.C0.ESC+"[1;"+(y+1)+"A",g||C.key!==c.C0.ESC+"[1;3A"||(C.key=c.C0.ESC+"[1;5A")):C.key=h?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(d.metaKey)break;y?(C.key=c.C0.ESC+"[1;"+(y+1)+"B",g||C.key!==c.C0.ESC+"[1;3B"||(C.key=c.C0.ESC+"[1;5B")):C.key=h?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(C.key=c.C0.ESC+"[2~");break;case 46:C.key=y?c.C0.ESC+"[3;"+(y+1)+"~":c.C0.ESC+"[3~";break;case 36:C.key=y?c.C0.ESC+"[1;"+(y+1)+"H":h?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:C.key=y?c.C0.ESC+"[1;"+(y+1)+"F":h?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:d.shiftKey?C.type=2:C.key=c.C0.ESC+"[5~";break;case 34:d.shiftKey?C.type=3:C.key=c.C0.ESC+"[6~";break;case 112:C.key=y?c.C0.ESC+"[1;"+(y+1)+"P":c.C0.ESC+"OP";break;case 113:C.key=y?c.C0.ESC+"[1;"+(y+1)+"Q":c.C0.ESC+"OQ";break;case 114:C.key=y?c.C0.ESC+"[1;"+(y+1)+"R":c.C0.ESC+"OR";break;case 115:C.key=y?c.C0.ESC+"[1;"+(y+1)+"S":c.C0.ESC+"OS";break;case 116:C.key=y?c.C0.ESC+"[15;"+(y+1)+"~":c.C0.ESC+"[15~";break;case 117:C.key=y?c.C0.ESC+"[17;"+(y+1)+"~":c.C0.ESC+"[17~";break;case 118:C.key=y?c.C0.ESC+"[18;"+(y+1)+"~":c.C0.ESC+"[18~";break;case 119:C.key=y?c.C0.ESC+"[19;"+(y+1)+"~":c.C0.ESC+"[19~";break;case 120:C.key=y?c.C0.ESC+"[20;"+(y+1)+"~":c.C0.ESC+"[20~";break;case 121:C.key=y?c.C0.ESC+"[21;"+(y+1)+"~":c.C0.ESC+"[21~";break;case 122:C.key=y?c.C0.ESC+"[23;"+(y+1)+"~":c.C0.ESC+"[23~";break;case 123:C.key=y?c.C0.ESC+"[24;"+(y+1)+"~":c.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(g&&!m||!d.altKey||d.metaKey)!g||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?C.key=d.key:d.key&&d.ctrlKey&&d.key==="_"&&(C.key=c.C0.US):d.keyCode===65&&(C.type=1);else{var S=u[d.keyCode],b=S==null?void 0:S[d.shiftKey?1:0];if(b)C.key=c.C0.ESC+b;else if(d.keyCode>=65&&d.keyCode<=90){var A=d.ctrlKey?d.keyCode-64:d.keyCode+32;C.key=c.C0.ESC+String.fromCharCode(A)}}else d.keyCode>=65&&d.keyCode<=90?C.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?C.key=c.C0.NUL:d.keyCode>=51&&d.keyCode<=55?C.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?C.key=c.C0.DEL:d.keyCode===219?C.key=c.C0.ESC:d.keyCode===220?C.key=c.C0.FS:d.keyCode===221&&(C.key=c.C0.GS)}return C}},482:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,d,h){d===void 0&&(d=0),h===void 0&&(h=u.length);for(var g="",m=d;m<h;++m){var C=u[m];C>65535?(C-=65536,g+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):g+=String.fromCharCode(C)}return g};var l=function(){function u(){this._interim=0}return u.prototype.clear=function(){this._interim=0},u.prototype.decode=function(d,h){var g=d.length;if(!g)return 0;var m=0,C=0;this._interim&&(56320<=(b=d.charCodeAt(C++))&&b<=57343?h[m++]=1024*(this._interim-55296)+b-56320+65536:(h[m++]=this._interim,h[m++]=b),this._interim=0);for(var y=C;y<g;++y){var S=d.charCodeAt(y);if(55296<=S&&S<=56319){if(++y>=g)return this._interim=S,m;var b;56320<=(b=d.charCodeAt(y))&&b<=57343?h[m++]=1024*(S-55296)+b-56320+65536:(h[m++]=S,h[m++]=b)}else S!==65279&&(h[m++]=S)}return m},u}();a.StringToUtf32=l;var c=function(){function u(){this.interim=new Uint8Array(3)}return u.prototype.clear=function(){this.interim.fill(0)},u.prototype.decode=function(d,h){var g=d.length;if(!g)return 0;var m,C,y,S,b=0,A=0,v=0;if(this.interim[0]){var w=!1,T=this.interim[0];T&=(224&T)==192?31:(240&T)==224?15:7;for(var I=0,x=void 0;(x=63&this.interim[++I])&&I<4;)T<<=6,T|=x;for(var L=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,O=L-I;v<O;){if(v>=g)return 0;if((192&(x=d[v++]))!=128){v--,w=!0;break}this.interim[I++]=x,T<<=6,T|=63&x}w||(L===2?T<128?v--:h[b++]=T:L===3?T<2048||T>=55296&&T<=57343||T===65279||(h[b++]=T):T<65536||T>1114111||(h[b++]=T)),this.interim.fill(0)}for(var P=g-4,N=v;N<g;){for(;!(!(N<P)||128&(m=d[N])||128&(C=d[N+1])||128&(y=d[N+2])||128&(S=d[N+3]));)h[b++]=m,h[b++]=C,h[b++]=y,h[b++]=S,N+=4;if((m=d[N++])<128)h[b++]=m;else if((224&m)==192){if(N>=g)return this.interim[0]=m,b;if((192&(C=d[N++]))!=128){N--;continue}if((A=(31&m)<<6|63&C)<128){N--;continue}h[b++]=A}else if((240&m)==224){if(N>=g)return this.interim[0]=m,b;if((192&(C=d[N++]))!=128){N--;continue}if(N>=g)return this.interim[0]=m,this.interim[1]=C,b;if((192&(y=d[N++]))!=128){N--;continue}if((A=(15&m)<<12|(63&C)<<6|63&y)<2048||A>=55296&&A<=57343||A===65279)continue;h[b++]=A}else if((248&m)==240){if(N>=g)return this.interim[0]=m,b;if((192&(C=d[N++]))!=128){N--;continue}if(N>=g)return this.interim[0]=m,this.interim[1]=C,b;if((192&(y=d[N++]))!=128){N--;continue}if(N>=g)return this.interim[0]=m,this.interim[1]=C,this.interim[2]=y,b;if((192&(S=d[N++]))!=128){N--;continue}if((A=(7&m)<<18|(63&C)<<12|(63&y)<<6|63&S)<65536||A>1114111)continue;h[b++]=A}}return b},u}();a.Utf8ToUtf32=c},225:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;var c,u=l(8273),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],g=function(){function m(){if(this.version="6",!c){c=new Uint8Array(65536),(0,u.fill)(c,1),c[0]=0,(0,u.fill)(c,0,1,32),(0,u.fill)(c,0,127,160),(0,u.fill)(c,2,4352,4448),c[9001]=2,c[9002]=2,(0,u.fill)(c,2,11904,42192),c[12351]=1,(0,u.fill)(c,2,44032,55204),(0,u.fill)(c,2,63744,64256),(0,u.fill)(c,2,65040,65050),(0,u.fill)(c,2,65072,65136),(0,u.fill)(c,2,65280,65377),(0,u.fill)(c,2,65504,65511);for(var C=0;C<d.length;++C)(0,u.fill)(c,0,d[C][0],d[C][1]+1)}}return m.prototype.wcwidth=function(C){return C<32?0:C<127?1:C<65536?c[C]:function(y,S){var b,A=0,v=S.length-1;if(y<S[0][0]||y>S[v][1])return!1;for(;v>=A;)if(y>S[b=A+v>>1][1])A=b+1;else{if(!(y<S[b][0]))return!0;v=b-1}return!1}(C,h)?0:C>=131072&&C<=196605||C>=196608&&C<=262141?2:1},m}();a.UnicodeV6=g},5981:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;var l=typeof queueMicrotask=="undefined"?function(u){Promise.resolve().then(u)}:queueMicrotask,c=function(){function u(d){this._action=d,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0}return u.prototype.writeSync=function(d,h){if(h!==void 0&&this._syncCalls>h)this._syncCalls=0;else if(this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);var m=this._callbacks.shift();m&&m()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},u.prototype.write=function(d,h){var g=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return g._innerWrite()})),this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(h)},u.prototype._innerWrite=function(d,h){var g=this;d===void 0&&(d=0),h===void 0&&(h=!0);for(var m=d||Date.now();this._writeBuffer.length>this._bufferOffset;){var C=this._writeBuffer[this._bufferOffset],y=this._action(C,h);if(y)return void y.catch(function(b){return l(function(){throw b}),Promise.resolve(!1)}).then(function(b){return Date.now()-m>=12?setTimeout(function(){return g._innerWrite(0,b)}):g._innerWrite(m,b)});var S=this._callbacks[this._bufferOffset];if(S&&S(),this._bufferOffset++,this._pendingData-=C.length,Date.now()-m>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return g._innerWrite()})):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0)},u}();a.WriteBuffer=c},5941:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;var l=/^([\da-f]{1})\/([\da-f]{1})\/([\da-f]{1})$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,c=/^[\da-f]+$/;function u(d,h){var g=d.toString(16),m=g.length<2?"0"+g:g;switch(h){case 4:return g[0];case 8:return m;case 12:return(m+m).slice(0,3);default:return m+m}}a.parseColor=function(d){if(d){var h=d.toLowerCase();if(h.indexOf("rgb:")===0){h=h.slice(4);var g=l.exec(h);if(g){var m=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/m*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/m*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/m*255)]}}else if(h.indexOf("#")===0&&(h=h.slice(1),c.exec(h)&&[3,6,9,12].includes(h.length))){for(var C=h.length/3,y=[0,0,0],S=0;S<3;++S){var b=parseInt(h.slice(C*S,C*S+C),16);y[S]=C===1?b<<4:C===2?b:C===3?b>>4:b>>8}return y}}},a.toRgbString=function(d,h){h===void 0&&(h=16);var g=d[0],m=d[1],C=d[2];return"rgb:"+u(g,h)+"/"+u(m,h)+"/"+u(C,h)}},5770:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;var c=l(482),u=l(8742),d=l(5770),h=[],g=function(){function y(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return y.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=h},y.prototype.registerHandler=function(S,b){this._handlers[S]===void 0&&(this._handlers[S]=[]);var A=this._handlers[S];return A.push(b),{dispose:function(){var v=A.indexOf(b);v!==-1&&A.splice(v,1)}}},y.prototype.clearHandler=function(S){this._handlers[S]&&delete this._handlers[S]},y.prototype.setHandlerFallback=function(S){this._handlerFb=S},y.prototype.reset=function(){if(this._active.length)for(var S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=h,this._ident=0},y.prototype.hook=function(S,b){if(this.reset(),this._ident=S,this._active=this._handlers[S]||h,this._active.length)for(var A=this._active.length-1;A>=0;A--)this._active[A].hook(b);else this._handlerFb(this._ident,"HOOK",b)},y.prototype.put=function(S,b,A){if(this._active.length)for(var v=this._active.length-1;v>=0;v--)this._active[v].put(S,b,A);else this._handlerFb(this._ident,"PUT",(0,c.utf32ToString)(S,b,A))},y.prototype.unhook=function(S,b){if(b===void 0&&(b=!0),this._active.length){var A=!1,v=this._active.length-1,w=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,A=b,w=this._stack.fallThrough,this._stack.paused=!1),!w&&A===!1){for(;v>=0&&(A=this._active[v].unhook(S))!==!0;v--)if(A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,A;v--}for(;v>=0;v--)if((A=this._active[v].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,A}else this._handlerFb(this._ident,"UNHOOK",S);this._active=h,this._ident=0},y}();a.DcsParser=g;var m=new u.Params;m.addParam(0);var C=function(){function y(S){this._handler=S,this._data="",this._params=m,this._hitLimit=!1}return y.prototype.hook=function(S){this._params=S.length>1||S.params[0]?S.clone():m,this._data="",this._hitLimit=!1},y.prototype.put=function(S,b,A){this._hitLimit||(this._data+=(0,c.utf32ToString)(S,b,A),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},y.prototype.unhook=function(S){var b=this,A=!1;if(this._hitLimit)A=!1;else if(S&&(A=this._handler(this._data,this._params))instanceof Promise)return A.then(function(v){return b._params=m,b._data="",b._hitLimit=!1,v});return this._params=m,this._data="",this._hitLimit=!1,A},y}();a.DcsHandler=C},2015:function(s,a,l){var c,u=this&&this.__extends||(c=function(A,v){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,T){w.__proto__=T}||function(w,T){for(var I in T)Object.prototype.hasOwnProperty.call(T,I)&&(w[I]=T[I])},c(A,v)},function(A,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function w(){this.constructor=A}c(A,v),A.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)});Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;var d=l(844),h=l(8273),g=l(8742),m=l(6242),C=l(6351),y=function(){function A(v){this.table=new Uint8Array(v)}return A.prototype.setDefault=function(v,w){(0,h.fill)(this.table,v<<4|w)},A.prototype.add=function(v,w,T,I){this.table[w<<8|v]=T<<4|I},A.prototype.addMany=function(v,w,T,I){for(var x=0;x<v.length;x++)this.table[w<<8|v[x]]=T<<4|I},A}();a.TransitionTable=y;var S=160;a.VT500_TRANSITION_TABLE=function(){var A=new y(4095),v=Array.apply(null,Array(256)).map(function(O,P){return P}),w=function(O,P){return v.slice(O,P)},T=w(32,127),I=w(0,24);I.push(25),I.push.apply(I,w(28,32));var x,L=w(0,14);for(x in A.setDefault(1,0),A.addMany(T,0,2,0),L)A.addMany([24,26,153,154],x,3,0),A.addMany(w(128,144),x,3,0),A.addMany(w(144,152),x,3,0),A.add(156,x,0,0),A.add(27,x,11,1),A.add(157,x,4,8),A.addMany([152,158,159],x,0,7),A.add(155,x,11,3),A.add(144,x,11,9);return A.addMany(I,0,3,0),A.addMany(I,1,3,1),A.add(127,1,0,1),A.addMany(I,8,0,8),A.addMany(I,3,3,3),A.add(127,3,0,3),A.addMany(I,4,3,4),A.add(127,4,0,4),A.addMany(I,6,3,6),A.addMany(I,5,3,5),A.add(127,5,0,5),A.addMany(I,2,3,2),A.add(127,2,0,2),A.add(93,1,4,8),A.addMany(T,8,5,8),A.add(127,8,5,8),A.addMany([156,27,24,26,7],8,6,0),A.addMany(w(28,32),8,0,8),A.addMany([88,94,95],1,0,7),A.addMany(T,7,0,7),A.addMany(I,7,0,7),A.add(156,7,0,0),A.add(127,7,0,7),A.add(91,1,11,3),A.addMany(w(64,127),3,7,0),A.addMany(w(48,60),3,8,4),A.addMany([60,61,62,63],3,9,4),A.addMany(w(48,60),4,8,4),A.addMany(w(64,127),4,7,0),A.addMany([60,61,62,63],4,0,6),A.addMany(w(32,64),6,0,6),A.add(127,6,0,6),A.addMany(w(64,127),6,0,0),A.addMany(w(32,48),3,9,5),A.addMany(w(32,48),5,9,5),A.addMany(w(48,64),5,0,6),A.addMany(w(64,127),5,7,0),A.addMany(w(32,48),4,9,5),A.addMany(w(32,48),1,9,2),A.addMany(w(32,48),2,9,2),A.addMany(w(48,127),2,10,0),A.addMany(w(48,80),1,10,0),A.addMany(w(81,88),1,10,0),A.addMany([89,90,92],1,10,0),A.addMany(w(96,127),1,10,0),A.add(80,1,11,9),A.addMany(I,9,0,9),A.add(127,9,0,9),A.addMany(w(28,32),9,0,9),A.addMany(w(32,48),9,9,12),A.addMany(w(48,60),9,8,10),A.addMany([60,61,62,63],9,9,10),A.addMany(I,11,0,11),A.addMany(w(32,128),11,0,11),A.addMany(w(28,32),11,0,11),A.addMany(I,10,0,10),A.add(127,10,0,10),A.addMany(w(28,32),10,0,10),A.addMany(w(48,60),10,8,10),A.addMany([60,61,62,63],10,0,11),A.addMany(w(32,48),10,9,12),A.addMany(I,12,0,12),A.add(127,12,0,12),A.addMany(w(28,32),12,0,12),A.addMany(w(32,48),12,9,12),A.addMany(w(48,64),12,0,11),A.addMany(w(64,127),12,12,13),A.addMany(w(64,127),10,12,13),A.addMany(w(64,127),9,12,13),A.addMany(I,13,13,13),A.addMany(T,13,13,13),A.add(127,13,0,13),A.addMany([27,156,24,26],13,14,0),A.add(S,0,2,0),A.add(S,8,5,8),A.add(S,6,0,6),A.add(S,11,0,11),A.add(S,13,13,13),A}();var b=function(A){function v(w){w===void 0&&(w=a.VT500_TRANSITION_TABLE);var T=A.call(this)||this;return T._transitions=w,T._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},T.initialState=0,T.currentState=T.initialState,T._params=new g.Params,T._params.addParam(0),T._collect=0,T.precedingCodepoint=0,T._printHandlerFb=function(I,x,L){},T._executeHandlerFb=function(I){},T._csiHandlerFb=function(I,x){},T._escHandlerFb=function(I){},T._errorHandlerFb=function(I){return I},T._printHandler=T._printHandlerFb,T._executeHandlers=Object.create(null),T._csiHandlers=Object.create(null),T._escHandlers=Object.create(null),T._oscParser=new m.OscParser,T._dcsParser=new C.DcsParser,T._errorHandler=T._errorHandlerFb,T.registerEscHandler({final:"\\"},function(){return!0}),T}return u(v,A),v.prototype._identifier=function(w,T){T===void 0&&(T=[64,126]);var I=0;if(w.prefix){if(w.prefix.length>1)throw new Error("only one byte as prefix supported");if((I=w.prefix.charCodeAt(0))&&60>I||I>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(w.intermediates){if(w.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var x=0;x<w.intermediates.length;++x){var L=w.intermediates.charCodeAt(x);if(32>L||L>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");I<<=8,I|=L}}if(w.final.length!==1)throw new Error("final must be a single byte");var O=w.final.charCodeAt(0);if(T[0]>O||O>T[1])throw new Error("final must be in range "+T[0]+" .. "+T[1]);return(I<<=8)|O},v.prototype.identToString=function(w){for(var T=[];w;)T.push(String.fromCharCode(255&w)),w>>=8;return T.reverse().join("")},v.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},v.prototype.setPrintHandler=function(w){this._printHandler=w},v.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},v.prototype.registerEscHandler=function(w,T){var I=this._identifier(w,[48,126]);this._escHandlers[I]===void 0&&(this._escHandlers[I]=[]);var x=this._escHandlers[I];return x.push(T),{dispose:function(){var L=x.indexOf(T);L!==-1&&x.splice(L,1)}}},v.prototype.clearEscHandler=function(w){this._escHandlers[this._identifier(w,[48,126])]&&delete this._escHandlers[this._identifier(w,[48,126])]},v.prototype.setEscHandlerFallback=function(w){this._escHandlerFb=w},v.prototype.setExecuteHandler=function(w,T){this._executeHandlers[w.charCodeAt(0)]=T},v.prototype.clearExecuteHandler=function(w){this._executeHandlers[w.charCodeAt(0)]&&delete this._executeHandlers[w.charCodeAt(0)]},v.prototype.setExecuteHandlerFallback=function(w){this._executeHandlerFb=w},v.prototype.registerCsiHandler=function(w,T){var I=this._identifier(w);this._csiHandlers[I]===void 0&&(this._csiHandlers[I]=[]);var x=this._csiHandlers[I];return x.push(T),{dispose:function(){var L=x.indexOf(T);L!==-1&&x.splice(L,1)}}},v.prototype.clearCsiHandler=function(w){this._csiHandlers[this._identifier(w)]&&delete this._csiHandlers[this._identifier(w)]},v.prototype.setCsiHandlerFallback=function(w){this._csiHandlerFb=w},v.prototype.registerDcsHandler=function(w,T){return this._dcsParser.registerHandler(this._identifier(w),T)},v.prototype.clearDcsHandler=function(w){this._dcsParser.clearHandler(this._identifier(w))},v.prototype.setDcsHandlerFallback=function(w){this._dcsParser.setHandlerFallback(w)},v.prototype.registerOscHandler=function(w,T){return this._oscParser.registerHandler(w,T)},v.prototype.clearOscHandler=function(w){this._oscParser.clearHandler(w)},v.prototype.setOscHandlerFallback=function(w){this._oscParser.setHandlerFallback(w)},v.prototype.setErrorHandler=function(w){this._errorHandler=w},v.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},v.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])},v.prototype._preserveStack=function(w,T,I,x,L){this._parseStack.state=w,this._parseStack.handlers=T,this._parseStack.handlerPos=I,this._parseStack.transition=x,this._parseStack.chunkPos=L},v.prototype.parse=function(w,T,I){var x,L=0,O=0,P=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,P=this._parseStack.chunkPos+1;else{if(I===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var N=this._parseStack.handlers,M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(I===!1&&M>-1){for(;M>=0&&(x=N[M](this._params))!==!0;M--)if(x instanceof Promise)return this._parseStack.handlerPos=M,x}this._parseStack.handlers=[];break;case 4:if(I===!1&&M>-1){for(;M>=0&&(x=N[M]())!==!0;M--)if(x instanceof Promise)return this._parseStack.handlerPos=M,x}this._parseStack.handlers=[];break;case 6:if(L=w[this._parseStack.chunkPos],x=this._dcsParser.unhook(L!==24&&L!==26,I))return x;L===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(L=w[this._parseStack.chunkPos],x=this._oscParser.end(L!==24&&L!==26,I))return x;L===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,P=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var W=P;W<T;++W){switch(L=w[W],(O=this._transitions.table[this.currentState<<8|(L<160?L:S)])>>4){case 2:for(var U=W+1;;++U){if(U>=T||(L=w[U])<32||L>126&&L<S){this._printHandler(w,W,U),W=U-1;break}if(++U>=T||(L=w[U])<32||L>126&&L<S){this._printHandler(w,W,U),W=U-1;break}if(++U>=T||(L=w[U])<32||L>126&&L<S){this._printHandler(w,W,U),W=U-1;break}if(++U>=T||(L=w[U])<32||L>126&&L<S){this._printHandler(w,W,U),W=U-1;break}}break;case 3:this._executeHandlers[L]?this._executeHandlers[L]():this._executeHandlerFb(L),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:W,code:L,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var z=(N=this._csiHandlers[this._collect<<8|L])?N.length-1:-1;z>=0&&(x=N[z](this._params))!==!0;z--)if(x instanceof Promise)return this._preserveStack(3,N,z,O,W),x;z<0&&this._csiHandlerFb(this._collect<<8|L,this._params),this.precedingCodepoint=0;break;case 8:do switch(L){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(L-48)}while(++W<T&&(L=w[W])>47&&L<60);W--;break;case 9:this._collect<<=8,this._collect|=L;break;case 10:for(var j=this._escHandlers[this._collect<<8|L],$=j?j.length-1:-1;$>=0&&(x=j[$]())!==!0;$--)if(x instanceof Promise)return this._preserveStack(4,j,$,O,W),x;$<0&&this._escHandlerFb(this._collect<<8|L),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|L,this._params);break;case 13:for(var G=W+1;;++G)if(G>=T||(L=w[G])===24||L===26||L===27||L>127&&L<S){this._dcsParser.put(w,W,G),W=G-1;break}break;case 14:if(x=this._dcsParser.unhook(L!==24&&L!==26))return this._preserveStack(6,[],0,O,W),x;L===27&&(O|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var J=W+1;;J++)if(J>=T||(L=w[J])<32||L>127&&L<S){this._oscParser.put(w,W,J),W=J-1;break}break;case 6:if(x=this._oscParser.end(L!==24&&L!==26))return this._preserveStack(5,[],0,O,W),x;L===27&&(O|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&O}},v}(d.Disposable);a.EscapeSequenceParser=b},6242:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;var c=l(5770),u=l(482),d=[],h=function(){function m(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return m.prototype.registerHandler=function(C,y){this._handlers[C]===void 0&&(this._handlers[C]=[]);var S=this._handlers[C];return S.push(y),{dispose:function(){var b=S.indexOf(y);b!==-1&&S.splice(b,1)}}},m.prototype.clearHandler=function(C){this._handlers[C]&&delete this._handlers[C]},m.prototype.setHandlerFallback=function(C){this._handlerFb=C},m.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=d},m.prototype.reset=function(){if(this._state===2)for(var C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0},m.prototype._start=function(){if(this._active=this._handlers[this._id]||d,this._active.length)for(var C=this._active.length-1;C>=0;C--)this._active[C].start();else this._handlerFb(this._id,"START")},m.prototype._put=function(C,y,S){if(this._active.length)for(var b=this._active.length-1;b>=0;b--)this._active[b].put(C,y,S);else this._handlerFb(this._id,"PUT",(0,u.utf32ToString)(C,y,S))},m.prototype.start=function(){this.reset(),this._state=1},m.prototype.put=function(C,y,S){if(this._state!==3){if(this._state===1)for(;y<S;){var b=C[y++];if(b===59){this._state=2,this._start();break}if(b<48||57<b)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+b-48}this._state===2&&S-y>0&&this._put(C,y,S)}},m.prototype.end=function(C,y){if(y===void 0&&(y=!0),this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){var S=!1,b=this._active.length-1,A=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,S=y,A=this._stack.fallThrough,this._stack.paused=!1),!A&&S===!1){for(;b>=0&&(S=this._active[b].end(C))!==!0;b--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,S;b--}for(;b>=0;b--)if((S=this._active[b].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",C);this._active=d,this._id=-1,this._state=0}},m}();a.OscParser=h;var g=function(){function m(C){this._handler=C,this._data="",this._hitLimit=!1}return m.prototype.start=function(){this._data="",this._hitLimit=!1},m.prototype.put=function(C,y,S){this._hitLimit||(this._data+=(0,u.utf32ToString)(C,y,S),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},m.prototype.end=function(C){var y=this,S=!1;if(this._hitLimit)S=!1;else if(C&&(S=this._handler(this._data))instanceof Promise)return S.then(function(b){return y._data="",y._hitLimit=!1,b});return this._data="",this._hitLimit=!1,S},m}();a.OscHandler=g},8742:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;var l=2147483647,c=function(){function u(d,h){if(d===void 0&&(d=32),h===void 0&&(h=32),this.maxLength=d,this.maxSubParamsLength=h,h>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return u.fromArray=function(d){var h=new u;if(!d.length)return h;for(var g=Array.isArray(d[0])?1:0;g<d.length;++g){var m=d[g];if(Array.isArray(m))for(var C=0;C<m.length;++C)h.addSubParam(m[C]);else h.addParam(m)}return h},u.prototype.clone=function(){var d=new u(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d},u.prototype.toArray=function(){for(var d=[],h=0;h<this.length;++h){d.push(this.params[h]);var g=this._subParamsIdx[h]>>8,m=255&this._subParamsIdx[h];m-g>0&&d.push(Array.prototype.slice.call(this._subParams,g,m))}return d},u.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},u.prototype.addParam=function(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>l?l:d}},u.prototype.addSubParam=function(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>l?l:d,this._subParamsIdx[this.length-1]++}},u.prototype.hasSubParams=function(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0},u.prototype.getSubParams=function(d){var h=this._subParamsIdx[d]>>8,g=255&this._subParamsIdx[d];return g-h>0?this._subParams.subarray(h,g):null},u.prototype.getSubParamsAll=function(){for(var d={},h=0;h<this.length;++h){var g=this._subParamsIdx[h]>>8,m=255&this._subParamsIdx[h];m-g>0&&(d[h]=this._subParams.slice(g,m))}return d},u.prototype.addDigit=function(d){var h;if(!(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var g=this._digitIsSub?this._subParams:this.params,m=g[h-1];g[h-1]=~m?Math.min(10*m+d,l):d}},u}();a.Params=c},5741:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0;var l=function(){function c(){this._addons=[]}return c.prototype.dispose=function(){for(var u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()},c.prototype.loadAddon=function(u,d){var h=this,g={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(g),d.dispose=function(){return h._wrappedAddonDispose(g)},d.activate(u)},c.prototype._wrappedAddonDispose=function(u){if(!u.isDisposed){for(var d=-1,h=0;h<this._addons.length;h++)if(this._addons[h]===u){d=h;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(d,1)}},c}();a.AddonManager=l},8771:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;var c=l(3785),u=l(511),d=function(){function h(g,m){this._buffer=g,this.type=m}return h.prototype.init=function(g){return this._buffer=g,this},Object.defineProperty(h.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),h.prototype.getLine=function(g){var m=this._buffer.lines.get(g);if(m)return new c.BufferLineApiView(m)},h.prototype.getNullCell=function(){return new u.CellData},h}();a.BufferApiView=d},3785:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;var c=l(511),u=function(){function d(h){this._line=h}return Object.defineProperty(d.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),d.prototype.getCell=function(h,g){if(!(h<0||h>=this._line.length))return g?(this._line.loadCell(h,g),g):this._line.loadCell(h,new c.CellData)},d.prototype.translateToString=function(h,g,m){return this._line.translateToString(h,g,m)},d}();a.BufferLineApiView=u},8285:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;var c=l(8771),u=l(8460),d=function(){function h(g){var m=this;this._core=g,this._onBufferChange=new u.EventEmitter,this._normal=new c.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new c.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(function(){return m._onBufferChange.fire(m.active)})}return Object.defineProperty(h.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),h}();a.BufferNamespaceApi=d},7975:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0;var l=function(){function c(u){this._core=u}return c.prototype.registerCsiHandler=function(u,d){return this._core.registerCsiHandler(u,function(h){return d(h.toArray())})},c.prototype.addCsiHandler=function(u,d){return this.registerCsiHandler(u,d)},c.prototype.registerDcsHandler=function(u,d){return this._core.registerDcsHandler(u,function(h,g){return d(h,g.toArray())})},c.prototype.addDcsHandler=function(u,d){return this.registerDcsHandler(u,d)},c.prototype.registerEscHandler=function(u,d){return this._core.registerEscHandler(u,d)},c.prototype.addEscHandler=function(u,d){return this.registerEscHandler(u,d)},c.prototype.registerOscHandler=function(u,d){return this._core.registerOscHandler(u,d)},c.prototype.addOscHandler=function(u,d){return this.registerOscHandler(u,d)},c}();a.ParserApi=l},7090:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0;var l=function(){function c(u){this._core=u}return c.prototype.register=function(u){this._core.unicodeService.register(u)},Object.defineProperty(c.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(u){this._core.unicodeService.activeVersion=u},enumerable:!1,configurable:!0}),c}();a.UnicodeApi=l},744:function(s,a,l){var c,u=this&&this.__extends||(c=function(b,A){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(v[T]=w[T])},c(b,A)},function(b,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function v(){this.constructor=b}c(b,A),b.prototype=A===null?Object.create(A):(v.prototype=A.prototype,new v)}),d=this&&this.__decorate||function(b,A,v,w){var T,I=arguments.length,x=I<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(b,A,v,w);else for(var L=b.length-1;L>=0;L--)(T=b[L])&&(x=(I<3?T(x):I>3?T(A,v,x):T(A,v))||x);return I>3&&x&&Object.defineProperty(A,v,x),x},h=this&&this.__param||function(b,A){return function(v,w){A(v,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;var g=l(2585),m=l(5295),C=l(8460),y=l(844);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;var S=function(b){function A(v){var w=b.call(this)||this;return w._optionsService=v,w.isUserScrolling=!1,w._onResize=new C.EventEmitter,w._onScroll=new C.EventEmitter,w.cols=Math.max(v.options.cols||0,a.MINIMUM_COLS),w.rows=Math.max(v.options.rows||0,a.MINIMUM_ROWS),w.buffers=new m.BufferSet(v,w),w}return u(A,b),Object.defineProperty(A.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),A.prototype.dispose=function(){b.prototype.dispose.call(this),this.buffers.dispose()},A.prototype.resize=function(v,w){this.cols=v,this.rows=w,this.buffers.resize(v,w),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:v,rows:w})},A.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},A.prototype.scroll=function(v,w){w===void 0&&(w=!1);var T,I=this.buffer;(T=this._cachedBlankLine)&&T.length===this.cols&&T.getFg(0)===v.fg&&T.getBg(0)===v.bg||(T=I.getBlankLine(v,w),this._cachedBlankLine=T),T.isWrapped=w;var x=I.ybase+I.scrollTop,L=I.ybase+I.scrollBottom;if(I.scrollTop===0){var O=I.lines.isFull;L===I.lines.length-1?O?I.lines.recycle().copyFrom(T):I.lines.push(T.clone()):I.lines.splice(L+1,0,T.clone()),O?this.isUserScrolling&&(I.ydisp=Math.max(I.ydisp-1,0)):(I.ybase++,this.isUserScrolling||I.ydisp++)}else{var P=L-x+1;I.lines.shiftElements(x+1,P-1,-1),I.lines.set(L,T.clone())}this.isUserScrolling||(I.ydisp=I.ybase),this._onScroll.fire(I.ydisp)},A.prototype.scrollLines=function(v,w,T){var I=this.buffer;if(v<0){if(I.ydisp===0)return;this.isUserScrolling=!0}else v+I.ydisp>=I.ybase&&(this.isUserScrolling=!1);var x=I.ydisp;I.ydisp=Math.max(Math.min(I.ydisp+v,I.ybase),0),x!==I.ydisp&&(w||this._onScroll.fire(I.ydisp))},A.prototype.scrollPages=function(v){this.scrollLines(v*(this.rows-1))},A.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},A.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},A.prototype.scrollToLine=function(v){var w=v-this.buffer.ydisp;w!==0&&this.scrollLines(w)},d([h(0,g.IOptionsService)],A)}(y.Disposable);a.BufferService=S},7994:(s,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0;var l=function(){function c(){this.glevel=0,this._charsets=[]}return c.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},c.prototype.setgLevel=function(u){this.glevel=u,this.charset=this._charsets[u]},c.prototype.setgCharset=function(u,d){this._charsets[u]=d,this.glevel===u&&(this.charset=d)},c}();a.CharsetService=l},1753:function(s,a,l){var c=this&&this.__decorate||function(b,A,v,w){var T,I=arguments.length,x=I<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,v):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(b,A,v,w);else for(var L=b.length-1;L>=0;L--)(T=b[L])&&(x=(I<3?T(x):I>3?T(A,v,x):T(A,v))||x);return I>3&&x&&Object.defineProperty(A,v,x),x},u=this&&this.__param||function(b,A){return function(v,w){A(v,w,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;var d=l(2585),h=l(8460),g={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(b){return b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)}},VT200:{events:19,restrict:function(b){return b.action!==32}},DRAG:{events:23,restrict:function(b){return b.action!==32||b.button!==3}},ANY:{events:31,restrict:function(b){return!0}}};function m(b,A){var v=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(v|=64,v|=b.action):(v|=3&b.button,4&b.button&&(v|=64),8&b.button&&(v|=128),b.action===32?v|=32:b.action!==0||A||(v|=3)),v}var C=String.fromCharCode,y={DEFAULT:function(b){var A=[m(b,!1)+32,b.col+32,b.row+32];return A[0]>255||A[1]>255||A[2]>255?"":""+C(A[0])+C(A[1])+C(A[2])},SGR:function(b){var A=b.action===0&&b.button!==4?"m":"M";return"[<"+m(b,!0)+";"+b.col+";"+b.row+A}},S=function(){function b(A,v){this._bufferService=A,this._coreService=v,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new h.EventEmitter,this._lastEvent=null;for(var w=0,T=Object.keys(g);w<T.length;w++){var I=T[w];this.addProtocol(I,g[I])}for(var x=0,L=Object.keys(y);x<L.length;x++){var O=L[x];this.addEncoding(O,y[O])}this.reset()}return b.prototype.addProtocol=function(A,v){this._protocols[A]=v},b.prototype.addEncoding=function(A,v){this._encodings[A]=v},Object.defineProperty(b.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(A){if(!this._protocols[A])throw new Error('unknown protocol "'+A+'"');this._activeProtocol=A,this._onProtocolChange.fire(this._protocols[A].events)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(A){if(!this._encodings[A])throw new Error('unknown encoding "'+A+'"');this._activeEncoding=A},enumerable:!1,configurable:!0}),b.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(b.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),b.prototype.triggerMouseEvent=function(A){if(A.col<0||A.col>=this._bufferService.cols||A.row<0||A.row>=this._bufferService.rows||A.button===4&&A.action===32||A.button===3&&A.action!==32||A.button!==4&&(A.action===2||A.action===3)||(A.col++,A.row++,A.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,A))||!this._protocols[this._activeProtocol].restrict(A))return!1;var v=this._encodings[this._activeEncoding](A);return v&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(v):this._coreService.triggerDataEvent(v,!0)),this._lastEvent=A,!0},b.prototype.explainEvents=function(A){return{down:!!(1&A),up:!!(2&A),drag:!!(4&A),move:!!(8&A),wheel:!!(16&A)}},b.prototype._compareEvents=function(A,v){return A.col===v.col&&A.row===v.row&&A.button===v.button&&A.action===v.action&&A.ctrl===v.ctrl&&A.alt===v.alt&&A.shift===v.shift},c([u(0,d.IBufferService),u(1,d.ICoreService)],b)}();a.CoreMouseService=S},6975:function(s,a,l){var c,u=this&&this.__extends||(c=function(v,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,I){T.__proto__=I}||function(T,I){for(var x in I)Object.prototype.hasOwnProperty.call(I,x)&&(T[x]=I[x])},c(v,w)},function(v,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");function T(){this.constructor=v}c(v,w),v.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}),d=this&&this.__decorate||function(v,w,T,I){var x,L=arguments.length,O=L<3?w:I===null?I=Object.getOwnPropertyDescriptor(w,T):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(v,w,T,I);else for(var P=v.length-1;P>=0;P--)(x=v[P])&&(O=(L<3?x(O):L>3?x(w,T,O):x(w,T))||O);return L>3&&O&&Object.defineProperty(w,T,O),O},h=this&&this.__param||function(v,w){return function(T,I){w(T,I,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;var g=l(2585),m=l(8460),C=l(1439),y=l(844),S=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),A=function(v){function w(T,I,x,L){var O=v.call(this)||this;return O._bufferService=I,O._logService=x,O._optionsService=L,O.isCursorInitialized=!1,O.isCursorHidden=!1,O._onData=O.register(new m.EventEmitter),O._onUserInput=O.register(new m.EventEmitter),O._onBinary=O.register(new m.EventEmitter),O._scrollToBottom=T,O.register({dispose:function(){return O._scrollToBottom=void 0}}),O.modes=(0,C.clone)(S),O.decPrivateModes=(0,C.clone)(b),O}return u(w,v),Object.defineProperty(w.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),w.prototype.reset=function(){this.modes=(0,C.clone)(S),this.decPrivateModes=(0,C.clone)(b)},w.prototype.triggerDataEvent=function(T,I){if(I===void 0&&(I=!1),!this._optionsService.options.disableStdin){var x=this._bufferService.buffer;x.ybase!==x.ydisp&&this._scrollToBottom(),I&&this._onUserInput.fire(),this._logService.debug('sending data "'+T+'"',function(){return T.split("").map(function(L){return L.charCodeAt(0)})}),this._onData.fire(T)}},w.prototype.triggerBinaryEvent=function(T){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+T+'"',function(){return T.split("").map(function(I){return I.charCodeAt(0)})}),this._onBinary.fire(T))},d([h(1,g.IBufferService),h(2,g.ILogService),h(3,g.IOptionsService)],w)}(y.Disposable);a.CoreService=A},3730:function(s,a,l){var c=this&&this.__decorate||function(g,m,C,y){var S,b=arguments.length,A=b<3?m:y===null?y=Object.getOwnPropertyDescriptor(m,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(g,m,C,y);else for(var v=g.length-1;v>=0;v--)(S=g[v])&&(A=(b<3?S(A):b>3?S(m,C,A):S(m,C))||A);return b>3&&A&&Object.defineProperty(m,C,A),A},u=this&&this.__param||function(g,m){return function(C,y){m(C,y,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DirtyRowService=void 0;var d=l(2585),h=function(){function g(m){this._bufferService=m,this.clearRange()}return Object.defineProperty(g.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),g.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},g.prototype.markDirty=function(m){m<this._start?this._start=m:m>this._end&&(this._end=m)},g.prototype.markRangeDirty=function(m,C){if(m>C){var y=m;m=C,C=y}m<this._start&&(this._start=m),C>this._end&&(this._end=C)},g.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},c([u(0,d.IBufferService)],g)}();a.DirtyRowService=h},4348:function(s,a,l){var c=this&&this.__spreadArray||function(m,C,y){if(y||arguments.length===2)for(var S,b=0,A=C.length;b<A;b++)!S&&b in C||(S||(S=Array.prototype.slice.call(C,0,b)),S[b]=C[b]);return m.concat(S||Array.prototype.slice.call(C))};Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;var u=l(2585),d=l(8343),h=function(){function m(){for(var C=[],y=0;y<arguments.length;y++)C[y]=arguments[y];this._entries=new Map;for(var S=0,b=C;S<b.length;S++){var A=b[S],v=A[0],w=A[1];this.set(v,w)}}return m.prototype.set=function(C,y){var S=this._entries.get(C);return this._entries.set(C,y),S},m.prototype.forEach=function(C){this._entries.forEach(function(y,S){return C(S,y)})},m.prototype.has=function(C){return this._entries.has(C)},m.prototype.get=function(C){return this._entries.get(C)},m}();a.ServiceCollection=h;var g=function(){function m(){this._services=new h,this._services.set(u.IInstantiationService,this)}return m.prototype.setService=function(C,y){this._services.set(C,y)},m.prototype.getService=function(C){return this._services.get(C)},m.prototype.createInstance=function(C){for(var y=[],S=1;S<arguments.length;S++)y[S-1]=arguments[S];for(var b=(0,d.getServiceDependencies)(C).sort(function(L,O){return L.index-O.index}),A=[],v=0,w=b;v<w.length;v++){var T=w[v],I=this._services.get(T.id);if(!I)throw new Error("[createInstance] "+C.name+" depends on UNKNOWN service "+T.id+".");A.push(I)}var x=b.length>0?b[0].index:y.length;if(y.length!==x)throw new Error("[createInstance] First service dependency of "+C.name+" at position "+(x+1)+" conflicts with "+y.length+" static arguments");return new(C.bind.apply(C,c([void 0],c(c([],y,!0),A,!0),!1)))},m}();a.InstantiationService=g},7866:function(s,a,l){var c=this&&this.__decorate||function(C,y,S,b){var A,v=arguments.length,w=v<3?y:b===null?b=Object.getOwnPropertyDescriptor(y,S):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(C,y,S,b);else for(var T=C.length-1;T>=0;T--)(A=C[T])&&(w=(v<3?A(w):v>3?A(y,S,w):A(y,S))||w);return v>3&&w&&Object.defineProperty(y,S,w),w},u=this&&this.__param||function(C,y){return function(S,b){y(S,b,C)}},d=this&&this.__spreadArray||function(C,y,S){if(S||arguments.length===2)for(var b,A=0,v=y.length;A<v;A++)!b&&A in y||(b||(b=Array.prototype.slice.call(y,0,A)),b[A]=y[A]);return C.concat(b||Array.prototype.slice.call(y))};Object.defineProperty(a,"__esModule",{value:!0}),a.LogService=void 0;var h=l(2585),g={debug:h.LogLevelEnum.DEBUG,info:h.LogLevelEnum.INFO,warn:h.LogLevelEnum.WARN,error:h.LogLevelEnum.ERROR,off:h.LogLevelEnum.OFF},m=function(){function C(y){var S=this;this._optionsService=y,this.logLevel=h.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange(function(b){b==="logLevel"&&S._updateLogLevel()})}return C.prototype._updateLogLevel=function(){this.logLevel=g[this._optionsService.options.logLevel]},C.prototype._evalLazyOptionalParams=function(y){for(var S=0;S<y.length;S++)typeof y[S]=="function"&&(y[S]=y[S]())},C.prototype._log=function(y,S,b){this._evalLazyOptionalParams(b),y.call.apply(y,d([console,"xterm.js: "+S],b,!1))},C.prototype.debug=function(y){for(var S=[],b=1;b<arguments.length;b++)S[b-1]=arguments[b];this.logLevel<=h.LogLevelEnum.DEBUG&&this._log(console.log,y,S)},C.prototype.info=function(y){for(var S=[],b=1;b<arguments.length;b++)S[b-1]=arguments[b];this.logLevel<=h.LogLevelEnum.INFO&&this._log(console.info,y,S)},C.prototype.warn=function(y){for(var S=[],b=1;b<arguments.length;b++)S[b-1]=arguments[b];this.logLevel<=h.LogLevelEnum.WARN&&this._log(console.warn,y,S)},C.prototype.error=function(y){for(var S=[],b=1;b<arguments.length;b++)S[b-1]=arguments[b];this.logLevel<=h.LogLevelEnum.ERROR&&this._log(console.error,y,S)},c([u(0,h.IOptionsService)],C)}();a.LogService=m},7302:function(s,a,l){var c=this&&this.__assign||function(){return c=Object.assign||function(m){for(var C,y=1,S=arguments.length;y<S;y++)for(var b in C=arguments[y])Object.prototype.hasOwnProperty.call(C,b)&&(m[b]=C[b]);return m},c.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=a.DEFAULT_BELL_SOUND=void 0;var u=l(8460),d=l(6114);a.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:a.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:d.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1};var h=["normal","bold","100","200","300","400","500","600","700","800","900"],g=function(){function m(C){for(var y in this._onOptionChange=new u.EventEmitter,this._options=c({},a.DEFAULT_OPTIONS),C)if(y in this._options)try{var S=C[y];this._options[y]=this._sanitizeAndValidateOption(y,S)}catch(b){console.error(b)}this.options=this._setupOptions(this._options)}return Object.defineProperty(m.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),m.prototype._setupOptions=function(C){var y=this,S=c({},C),b=function(v){Object.defineProperty(S,v,{get:function(){if(!(v in a.DEFAULT_OPTIONS))throw new Error('No option with key "'+v+'"');return y._options[v]},set:function(w){if(!(v in a.DEFAULT_OPTIONS))throw new Error('No option with key "'+v+'"');w=y._sanitizeAndValidateOption(v,w),y._options[v]!==w&&(y._options[v]=w,y._onOptionChange.fire(v))}})};for(var A in S)b(A);return S},m.prototype.setOption=function(C,y){this.options[C]=y},m.prototype._sanitizeAndValidateOption=function(C,y){switch(C){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":y||(y=a.DEFAULT_OPTIONS[C]);break;case"fontWeight":case"fontWeightBold":if(typeof y=="number"&&1<=y&&y<=1e3)break;y=h.includes(y)?y:a.DEFAULT_OPTIONS[C];break;case"cursorWidth":y=Math.floor(y);case"lineHeight":case"tabStopWidth":if(y<1)throw new Error(C+" cannot be less than 1, value: "+y);break;case"minimumContrastRatio":y=Math.max(1,Math.min(21,Math.round(10*y)/10));break;case"scrollback":if((y=Math.min(y,4294967295))<0)throw new Error(C+" cannot be less than 0, value: "+y);break;case"fastScrollSensitivity":case"scrollSensitivity":if(y<=0)throw new Error(C+" cannot be less than or equal to 0, value: "+y);case"rows":case"cols":if(!y&&y!==0)throw new Error(C+" must be numeric, value: "+y)}return y},m.prototype.getOption=function(C){return this.options[C]},m}();a.OptionsService=g},8343:(s,a)=>{function l(c,u,d){u.di$target===u?u.di$dependencies.push({id:c,index:d}):(u.di$dependencies=[{id:c,index:d}],u.di$target=u)}Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0,a.serviceRegistry=new Map,a.getServiceDependencies=function(c){return c.di$dependencies||[]},a.createDecorator=function(c){if(a.serviceRegistry.has(c))return a.serviceRegistry.get(c);var u=function(d,h,g){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");l(u,d,g)};return u.toString=function(){return c},a.serviceRegistry.set(c,u),u}},2585:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IUnicodeService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.IDirtyRowService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;var c,u=l(8343);a.IBufferService=(0,u.createDecorator)("BufferService"),a.ICoreMouseService=(0,u.createDecorator)("CoreMouseService"),a.ICoreService=(0,u.createDecorator)("CoreService"),a.ICharsetService=(0,u.createDecorator)("CharsetService"),a.IDirtyRowService=(0,u.createDecorator)("DirtyRowService"),a.IInstantiationService=(0,u.createDecorator)("InstantiationService"),(c=a.LogLevelEnum||(a.LogLevelEnum={}))[c.DEBUG=0]="DEBUG",c[c.INFO=1]="INFO",c[c.WARN=2]="WARN",c[c.ERROR=3]="ERROR",c[c.OFF=4]="OFF",a.ILogService=(0,u.createDecorator)("LogService"),a.IOptionsService=(0,u.createDecorator)("OptionsService"),a.IUnicodeService=(0,u.createDecorator)("UnicodeService")},1480:(s,a,l)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;var c=l(8460),u=l(225),d=function(){function h(){this._providers=Object.create(null),this._active="",this._onChange=new c.EventEmitter;var g=new u.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}return Object.defineProperty(h.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"activeVersion",{get:function(){return this._active},set:function(g){if(!this._providers[g])throw new Error('unknown Unicode version "'+g+'"');this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)},enumerable:!1,configurable:!0}),h.prototype.register=function(g){this._providers[g.version]=g},h.prototype.wcwidth=function(g){return this._activeProvider.wcwidth(g)},h.prototype.getStringCellWidth=function(g){for(var m=0,C=g.length,y=0;y<C;++y){var S=g.charCodeAt(y);if(55296<=S&&S<=56319){if(++y>=C)return m+this.wcwidth(S);var b=g.charCodeAt(y);56320<=b&&b<=57343?S=1024*(S-55296)+b-56320+65536:m+=this.wcwidth(b)}m+=this.wcwidth(S)}return m},h}();a.UnicodeService=d}},i={};function r(s){var a=i[s];if(a!==void 0)return a.exports;var l=i[s]={exports:{}};return t[s].call(l.exports,l,l.exports,r),l.exports}var o={};return(()=>{var s=o;Object.defineProperty(s,"__esModule",{value:!0}),s.Terminal=void 0;var a=r(3236),l=r(9042),c=r(7975),u=r(7090),d=r(5741),h=r(8285),g=["cols","rows"],m=function(){function C(y){var S=this;this._core=new a.Terminal(y),this._addonManager=new d.AddonManager,this._publicOptions={};var b=function(w){Object.defineProperty(A._publicOptions,w,{get:function(){return S._core.options[w]},set:function(T){S._checkReadonlyOptions(w),S._core.options[w]=T}})},A=this;for(var v in this._core.options)b(v)}return C.prototype._checkReadonlyOptions=function(y){if(g.includes(y))throw new Error('Option "'+y+'" can only be set in the constructor')},C.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(C.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new c.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"unicode",{get:function(){return this._checkProposedApi(),new u.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new h.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"modes",{get:function(){var y=this._core.coreService.decPrivateModes,S="none";switch(this._core.coreMouseService.activeProtocol){case"X10":S="x10";break;case"VT200":S="vt200";break;case"DRAG":S="drag";break;case"ANY":S="any"}return{applicationCursorKeysMode:y.applicationCursorKeys,applicationKeypadMode:y.applicationKeypad,bracketedPasteMode:y.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:S,originMode:y.origin,reverseWraparoundMode:y.reverseWraparound,sendFocusMode:y.sendFocus,wraparoundMode:y.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"options",{get:function(){return this._publicOptions},set:function(y){for(var S in y)this._publicOptions[S]=y[S]},enumerable:!1,configurable:!0}),C.prototype.blur=function(){this._core.blur()},C.prototype.focus=function(){this._core.focus()},C.prototype.resize=function(y,S){this._verifyIntegers(y,S),this._core.resize(y,S)},C.prototype.open=function(y){this._core.open(y)},C.prototype.attachCustomKeyEventHandler=function(y){this._core.attachCustomKeyEventHandler(y)},C.prototype.registerLinkMatcher=function(y,S,b){return this._checkProposedApi(),this._core.registerLinkMatcher(y,S,b)},C.prototype.deregisterLinkMatcher=function(y){this._checkProposedApi(),this._core.deregisterLinkMatcher(y)},C.prototype.registerLinkProvider=function(y){return this._checkProposedApi(),this._core.registerLinkProvider(y)},C.prototype.registerCharacterJoiner=function(y){return this._checkProposedApi(),this._core.registerCharacterJoiner(y)},C.prototype.deregisterCharacterJoiner=function(y){this._checkProposedApi(),this._core.deregisterCharacterJoiner(y)},C.prototype.registerMarker=function(y){return this._checkProposedApi(),this._verifyIntegers(y),this._core.addMarker(y)},C.prototype.addMarker=function(y){return this.registerMarker(y)},C.prototype.hasSelection=function(){return this._core.hasSelection()},C.prototype.select=function(y,S,b){this._verifyIntegers(y,S,b),this._core.select(y,S,b)},C.prototype.getSelection=function(){return this._core.getSelection()},C.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},C.prototype.clearSelection=function(){this._core.clearSelection()},C.prototype.selectAll=function(){this._core.selectAll()},C.prototype.selectLines=function(y,S){this._verifyIntegers(y,S),this._core.selectLines(y,S)},C.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},C.prototype.scrollLines=function(y){this._verifyIntegers(y),this._core.scrollLines(y)},C.prototype.scrollPages=function(y){this._verifyIntegers(y),this._core.scrollPages(y)},C.prototype.scrollToTop=function(){this._core.scrollToTop()},C.prototype.scrollToBottom=function(){this._core.scrollToBottom()},C.prototype.scrollToLine=function(y){this._verifyIntegers(y),this._core.scrollToLine(y)},C.prototype.clear=function(){this._core.clear()},C.prototype.write=function(y,S){this._core.write(y,S)},C.prototype.writeUtf8=function(y,S){this._core.write(y,S)},C.prototype.writeln=function(y,S){this._core.write(y),this._core.write(`\r
1600
- `,S)},C.prototype.paste=function(y){this._core.paste(y)},C.prototype.getOption=function(y){return this._core.optionsService.getOption(y)},C.prototype.setOption=function(y,S){this._checkReadonlyOptions(y),this._core.optionsService.setOption(y,S)},C.prototype.refresh=function(y,S){this._verifyIntegers(y,S),this._core.refresh(y,S)},C.prototype.reset=function(){this._core.reset()},C.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},C.prototype.loadAddon=function(y){return this._addonManager.loadAddon(this,y)},Object.defineProperty(C,"strings",{get:function(){return l},enumerable:!1,configurable:!0}),C.prototype._verifyIntegers=function(){for(var y=[],S=0;S<arguments.length;S++)y[S]=arguments[S];for(var b=0,A=y;b<A.length;b++){var v=A[b];if(v===1/0||isNaN(v)||v%1!=0)throw new Error("This API only accepts integers")}},C}();s.Terminal=m})(),o})()})})(iee);var swe={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(self,function(){return(()=>{var t={775:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0;var s=function(){function a(){}return a.prototype.activate=function(l){this._terminal=l},a.prototype.dispose=function(){},a.prototype.fit=function(){var l=this.proposeDimensions();if(l&&this._terminal){var c=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(c._renderService.clear(),this._terminal.resize(l.cols,l.rows))}},a.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var l=this._terminal._core;if(l._renderService.dimensions.actualCellWidth!==0&&l._renderService.dimensions.actualCellHeight!==0){var c=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(c.getPropertyValue("height")),d=Math.max(0,parseInt(c.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),g=u-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),m=d-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-l.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(m/l._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(g/l._renderService.dimensions.actualCellHeight))}}}},a}();o.FitAddon=s}},i={};return function r(o){if(i[o])return i[o].exports;var s=i[o]={exports:{}};return t[o](s,s.exports,r),s.exports}(775)})()})})(swe);const awe=r=>{var o=r,{terminal:n,onKey:e,fitHook:t}=o,i=o_(o,["terminal","onKey","fitHook"]);const s=Ht({height:"100%",width:"100%",padding:"5px 20px",backgroundColor:"#1e1e1e"},i),a=new swe.exports.FitAddon,l=Ae.exports.useRef(null),c=d=>{d.onKey(({key:h,domEvent:g})=>{let m=h;switch(h.charCodeAt(0)){case 13:break;case 27:switch(g.key){case"ArrowLeft":if(d.buffer.active.cursorX<=2)return;break}break;case 8:case 127:d.buffer.active.cursorX>2&&(m="\b");break}e(m)})},u=()=>{try{setTimeout(()=>{a.fit()},0)}catch{}};return Ae.exports.useEffect(()=>{n&&(n.loadAddon(a),c(n),n.open(l.current),u())},[n]),Ae.exports.useEffect(()=>{u()},[t]),Ke(Xc,{children:Ke("div",{style:Ht({},s),ref:l})})},lwe=t=>{var i=t,{options:n}=i,e=o_(i,["options"]);const r=Ht({},n),o=document.createElement("div");o.classList.add("xterm-helper-user-label");const[s,a]=Ae.exports.useState(null),l=Jd(g=>g.socket),{CRDTInfo:c}=yn(g=>g),u=(g,m)=>{g.write(`\r
1601
- `),g.clear(),d(g,m)},d=(g,m)=>{g.write(m)},h=g=>{if(yn.getState().appStatus==="replay")return;const m={timestamp:Date.now().toString(),userInfo:Gf.exports.pick(Qf.getState().userInfo,"uuid"),terminal:{doc:{action:"Edit",value:g}}};l.emit("terminal",JSON.stringify(m))};return Ae.exports.useEffect(()=>{if(!s){const g=new iee.exports.Terminal(r);a(g)}},[]),Ae.exports.useEffect(()=>{var g;!s||c.terminal&&u(s,((g=yn.getState().CRDTInfo.terminal.doc)==null?void 0:g.value)||"")},[s]),Ae.exports.useEffect(()=>{const g=c.terminal;if(s&&g){if(g.doc.action==="Get"){u(s,g.doc.value);return}d(s,g.doc.value||"");const m=qC.getState().userList[c.userInfo.uuid];if(m&&!WS(c.userInfo)){const C=s._core._helperContainer;o.innerText=m.name,o.style.backgroundColor=m.color,o.style.top=C.firstChild.style.top,o.style.left=C.firstChild.style.left,C==null||C.appendChild(o),s.setOption("theme",Ki(Ht({},s.getOption("theme")),{cursor:m.color}));const y=setTimeout(()=>{C==null||C.removeChild(o),s.setOption("theme",Ki(Ht({},s.getOption("theme")),{cursor:"#ffffff"}))},6e3);return()=>{try{C==null||C.removeChild(o)}catch{}s.setOption("theme",Ki(Ht({},s.getOption("theme")),{cursor:"#ffffff"})),clearTimeout(y)}}}},[c.terminal]),Ke("div",{id:"terminal",style:{height:"100%",width:"100%"},children:Ke(awe,Ht({terminal:s,onKey:h},e))})};var _wt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:lwe});const vwt=r=>{var o=r,{activeKey:n,onSelect:e,tabItems:t}=o,i=o_(o,["activeKey","onSelect","tabItems"]);return Ke(zde,Ki(Ht({},i),{activeKey:n,onSelect:e,children:t.map(s=>Ke(zde.Item,{eventKey:s.eventKey,children:s.itemName},s.eventKey))}))};var Cwt=/[A-Z]|^ms/g,ywt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cwe=function(e){return e.charCodeAt(1)===45},uwe=function(e){return e!=null&&typeof e!="boolean"},nee=k$(function(n){return cwe(n)?n:n.replace(Cwt,"-$&").toLowerCase()}),dwe=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(ywt,function(i,r,o){return wm={name:r,styles:o,next:wm},r})}return phe[e]!==1&&!cwe(e)&&typeof t=="number"&&t!==0?t+"px":t};function f2(n,e,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return wm={name:t.name,styles:t.styles,next:wm},t.name;if(t.styles!==void 0){var i=t.next;if(i!==void 0)for(;i!==void 0;)wm={name:i.name,styles:i.styles,next:wm},i=i.next;var r=t.styles+";";return r}return bwt(n,e,t)}case"function":{if(n!==void 0){var o=wm,s=t(n);return wm=o,f2(n,e,s)}break}}if(e==null)return t;var a=e[t];return a!==void 0?a:t}function bwt(n,e,t){var i="";if(Array.isArray(t))for(var r=0;r<t.length;r++)i+=f2(n,e,t[r])+";";else for(var o in t){var s=t[o];if(typeof s!="object")e!=null&&e[s]!==void 0?i+=o+"{"+e[s]+"}":uwe(s)&&(i+=nee(o)+":"+dwe(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var a=0;a<s.length;a++)uwe(s[a])&&(i+=nee(o)+":"+dwe(o,s[a])+";");else{var l=f2(n,e,s);switch(o){case"animation":case"animationName":{i+=nee(o)+":"+l+";";break}default:i+=o+"{"+l+"}"}}}return i}var hwe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,wm,ree=function(e,t,i){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";wm=void 0;var s=e[0];s==null||s.raw===void 0?(r=!1,o+=f2(i,t,s)):o+=s[0];for(var a=1;a<e.length;a++)o+=f2(i,t,e[a]),r&&(o+=s[a]);hwe.lastIndex=0;for(var l="",c;(c=hwe.exec(o))!==null;)l+="-"+c[1];var u=ghe(o)+l;return{name:u,styles:o,next:wm}},Awt=!0;function fwe(n,e,t){var i="";return t.split(" ").forEach(function(r){n[r]!==void 0?e.push(n[r]+";"):i+=r+" "}),i}var Swt=function(e,t,i){var r=e.key+"-"+t.name;if((i===!1||Awt===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles),e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function gwe(n,e){if(n.inserted[e.name]===void 0)return n.insert("",e,n.sheet,!0)}function pwe(n,e,t){var i=[],r=fwe(n,i,t);return i.length<2?t:r+e(i)}var wwt=function(e){var t=fhe(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=ree(c,t.registered,void 0);return Swt(t,d,!1),t.key+"-"+d.name},r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=ree(c,t.registered),h="animation-"+d.name;return gwe(t,{name:d.name,styles:"@keyframes "+h+"{"+d.styles+"}"}),h},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=ree(c,t.registered);gwe(t,d)},s=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return pwe(t.registered,i,Ewt(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){t.inserted[c]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:fwe.bind(null,t.registered),merge:pwe.bind(null,t.registered,i)}},Ewt=function n(e){for(var t="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=n(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(t&&(t+=" "),t+=o)}}return t},Iwt=wwt({key:"css"}),Twt=Iwt.css;const xwt=Ja.div`
1600
+ `,S)},C.prototype.paste=function(y){this._core.paste(y)},C.prototype.getOption=function(y){return this._core.optionsService.getOption(y)},C.prototype.setOption=function(y,S){this._checkReadonlyOptions(y),this._core.optionsService.setOption(y,S)},C.prototype.refresh=function(y,S){this._verifyIntegers(y,S),this._core.refresh(y,S)},C.prototype.reset=function(){this._core.reset()},C.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},C.prototype.loadAddon=function(y){return this._addonManager.loadAddon(this,y)},Object.defineProperty(C,"strings",{get:function(){return l},enumerable:!1,configurable:!0}),C.prototype._verifyIntegers=function(){for(var y=[],S=0;S<arguments.length;S++)y[S]=arguments[S];for(var b=0,A=y;b<A.length;b++){var v=A[b];if(v===1/0||isNaN(v)||v%1!=0)throw new Error("This API only accepts integers")}},C}();s.Terminal=m})(),o})()})})(iee);var swe={exports:{}};(function(n,e){(function(t,i){n.exports=i()})(self,function(){return(()=>{var t={775:(r,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0;var s=function(){function a(){}return a.prototype.activate=function(l){this._terminal=l},a.prototype.dispose=function(){},a.prototype.fit=function(){var l=this.proposeDimensions();if(l&&this._terminal){var c=this._terminal._core;this._terminal.rows===l.rows&&this._terminal.cols===l.cols||(c._renderService.clear(),this._terminal.resize(l.cols,l.rows))}},a.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var l=this._terminal._core;if(l._renderService.dimensions.actualCellWidth!==0&&l._renderService.dimensions.actualCellHeight!==0){var c=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(c.getPropertyValue("height")),d=Math.max(0,parseInt(c.getPropertyValue("width"))),h=window.getComputedStyle(this._terminal.element),g=u-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),m=d-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.getPropertyValue("padding-left")))-l.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(m/l._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(g/l._renderService.dimensions.actualCellHeight))}}}},a}();o.FitAddon=s}},i={};return function r(o){if(i[o])return i[o].exports;var s=i[o]={exports:{}};return t[o](s,s.exports,r),s.exports}(775)})()})})(swe);const awe=r=>{var o=r,{terminal:n,onKey:e,fitHook:t}=o,i=o_(o,["terminal","onKey","fitHook"]);const s=Ht({height:"100%",width:"100%",padding:"5px 20px",backgroundColor:"#1e1e1e"},i),a=new swe.exports.FitAddon,l=Ae.exports.useRef(null),c=d=>{d.onKey(({key:h,domEvent:g})=>{let m=h;switch(h.charCodeAt(0)){case 13:break;case 27:switch(g.key){case"ArrowLeft":if(d.buffer.active.cursorX<=2)return;break}break;case 8:case 127:d.buffer.active.cursorX>2&&(m="\b");break}e(m)})},u=()=>{try{setTimeout(()=>{a.fit()},0)}catch{}};return Ae.exports.useEffect(()=>{n&&(n.loadAddon(a),c(n),n.open(l.current),u())},[n]),Ae.exports.useEffect(()=>{u()},[t]),Ke(Xc,{children:Ke("div",{style:Ht({},s),ref:l})})},lwe=t=>{var i=t,{options:n}=i,e=o_(i,["options"]);const r=Ht({},n),o=document.createElement("div");o.classList.add("xterm-helper-user-label");const[s,a]=Ae.exports.useState(null),{CRDTInfo:l}=yn(h=>h),c=(h,g)=>{h.write(`\r
1601
+ `),h.clear(),u(h,g)},u=(h,g)=>{h.write(g)},d=h=>{var m,C;if(yn.getState().appStatus==="replay")return;const g={timestamp:Date.now().toString(),userInfo:Gf.exports.pick(Qf.getState().userInfo,"uuid"),terminal:{doc:{action:"Edit",value:h}}};(C=(m=Jd.getState())==null?void 0:m.socket)==null||C.emit("terminal",JSON.stringify(g))};return Ae.exports.useEffect(()=>{if(!s){const h=new iee.exports.Terminal(r);a(h)}},[]),Ae.exports.useEffect(()=>{var h,g,m,C;!s||l.terminal&&c(s,((C=(m=(g=(h=yn.getState())==null?void 0:h.CRDTInfo)==null?void 0:g.terminal)==null?void 0:m.doc)==null?void 0:C.value)||"")},[s]),Ae.exports.useEffect(()=>{var g,m,C,y;const h=l.terminal;if(s&&h){if(((g=h==null?void 0:h.doc)==null?void 0:g.action)==="Get"){c(s,(m=h==null?void 0:h.doc)==null?void 0:m.value);return}u(s,((C=h==null?void 0:h.doc)==null?void 0:C.value)||"");const S=qC.getState().userList[(y=l==null?void 0:l.userInfo)==null?void 0:y.uuid];if(S&&!WS(l.userInfo)){const b=s._core._helperContainer;o.innerText=S.name,o.style.backgroundColor=S.color,o.style.top=b.firstChild.style.top,o.style.left=b.firstChild.style.left,b==null||b.appendChild(o),s.setOption("theme",Ki(Ht({},s.getOption("theme")),{cursor:S.color}));const A=setTimeout(()=>{b==null||b.removeChild(o),s.setOption("theme",Ki(Ht({},s.getOption("theme")),{cursor:"#ffffff"}))},6e3);return()=>{try{b==null||b.removeChild(o)}catch{}s.setOption("theme",Ki(Ht({},s.getOption("theme")),{cursor:"#ffffff"})),clearTimeout(A)}}}},[l.terminal]),Ke("div",{id:"terminal",style:{height:"100%",width:"100%"},children:Ke(awe,Ht({terminal:s,onKey:d},e))})};var _wt=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:lwe});const vwt=r=>{var o=r,{activeKey:n,onSelect:e,tabItems:t}=o,i=o_(o,["activeKey","onSelect","tabItems"]);return Ke(zde,Ki(Ht({},i),{activeKey:n,onSelect:e,children:t.map(s=>Ke(zde.Item,{eventKey:s.eventKey,children:s.itemName},s.eventKey))}))};var Cwt=/[A-Z]|^ms/g,ywt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cwe=function(e){return e.charCodeAt(1)===45},uwe=function(e){return e!=null&&typeof e!="boolean"},nee=k$(function(n){return cwe(n)?n:n.replace(Cwt,"-$&").toLowerCase()}),dwe=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(ywt,function(i,r,o){return wm={name:r,styles:o,next:wm},r})}return phe[e]!==1&&!cwe(e)&&typeof t=="number"&&t!==0?t+"px":t};function f2(n,e,t){if(t==null)return"";if(t.__emotion_styles!==void 0)return t;switch(typeof t){case"boolean":return"";case"object":{if(t.anim===1)return wm={name:t.name,styles:t.styles,next:wm},t.name;if(t.styles!==void 0){var i=t.next;if(i!==void 0)for(;i!==void 0;)wm={name:i.name,styles:i.styles,next:wm},i=i.next;var r=t.styles+";";return r}return bwt(n,e,t)}case"function":{if(n!==void 0){var o=wm,s=t(n);return wm=o,f2(n,e,s)}break}}if(e==null)return t;var a=e[t];return a!==void 0?a:t}function bwt(n,e,t){var i="";if(Array.isArray(t))for(var r=0;r<t.length;r++)i+=f2(n,e,t[r])+";";else for(var o in t){var s=t[o];if(typeof s!="object")e!=null&&e[s]!==void 0?i+=o+"{"+e[s]+"}":uwe(s)&&(i+=nee(o)+":"+dwe(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var a=0;a<s.length;a++)uwe(s[a])&&(i+=nee(o)+":"+dwe(o,s[a])+";");else{var l=f2(n,e,s);switch(o){case"animation":case"animationName":{i+=nee(o)+":"+l+";";break}default:i+=o+"{"+l+"}"}}}return i}var hwe=/label:\s*([^\s;\n{]+)\s*(;|$)/g,wm,ree=function(e,t,i){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";wm=void 0;var s=e[0];s==null||s.raw===void 0?(r=!1,o+=f2(i,t,s)):o+=s[0];for(var a=1;a<e.length;a++)o+=f2(i,t,e[a]),r&&(o+=s[a]);hwe.lastIndex=0;for(var l="",c;(c=hwe.exec(o))!==null;)l+="-"+c[1];var u=ghe(o)+l;return{name:u,styles:o,next:wm}},Awt=!0;function fwe(n,e,t){var i="";return t.split(" ").forEach(function(r){n[r]!==void 0?e.push(n[r]+";"):i+=r+" "}),i}var Swt=function(e,t,i){var r=e.key+"-"+t.name;if((i===!1||Awt===!1)&&e.registered[r]===void 0&&(e.registered[r]=t.styles),e.inserted[t.name]===void 0){var o=t;do e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function gwe(n,e){if(n.inserted[e.name]===void 0)return n.insert("",e,n.sheet,!0)}function pwe(n,e,t){var i=[],r=fwe(n,i,t);return i.length<2?t:r+e(i)}var wwt=function(e){var t=fhe(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=ree(c,t.registered,void 0);return Swt(t,d,!1),t.key+"-"+d.name},r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=ree(c,t.registered),h="animation-"+d.name;return gwe(t,{name:d.name,styles:"@keyframes "+h+"{"+d.styles+"}"}),h},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=ree(c,t.registered);gwe(t,d)},s=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return pwe(t.registered,i,Ewt(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){t.inserted[c]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:fwe.bind(null,t.registered),merge:pwe.bind(null,t.registered,i)}},Ewt=function n(e){for(var t="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=n(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(t&&(t+=" "),t+=o)}}return t},Iwt=wwt({key:"css"}),Twt=Iwt.css;const xwt=Ja.div`
1602
1602
  background: #eee;
1603
1603
  border-color: ${n=>n.user.color};
1604
1604
  background-image: ${n=>'url("'+n.user.avatar+'")'};
package/dist/index.html CHANGED
@@ -32,7 +32,7 @@
32
32
  window.daopaas = DaoPaaS;
33
33
 
34
34
  var qs = new URLSearchParams(document.location.search.substring(1));
35
- window.daopaas = new DaoPaaS({
35
+ window.daopaas = new DaoPaaS.DaoPaaS({
36
36
  ticket: qs.get('ticket'),
37
37
  playgroundId: qs.get('playgroundId'),
38
38
  userId: qs.get('userId'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dao42/d42paas-front",
3
- "version": "0.5.20",
3
+ "version": "0.5.22",
4
4
  "description": "> TODO: description",
5
5
  "author": "eric183 <kk297466058@gmail.com>",
6
6
  "homepage": "https://github.com/dao42/d42paas_frontend#readme",