|
|
(self.webpackChunk=self.webpackChunk||[]).push([[9716],{84105:function(ne,H,n){"use strict";n.d(H,{Z:function(){return i}});var C=n(14809),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},u=y,h=n(7657),l=function(c,t){return _.createElement(h.Z,(0,C.Z)({},c,{ref:t,icon:u}))},p=_.forwardRef(l),i=p},73331:function(ne,H,n){"use strict";n.d(H,{Z:function(){return i}});var C=n(14809),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},u=y,h=n(7657),l=function(c,t){return _.createElement(h.Z,(0,C.Z)({},c,{ref:t,icon:u}))},p=_.forwardRef(l),i=p},15277:function(ne,H,n){"use strict";n.d(H,{Z:function(){return i}});var C=n(14809),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},u=y,h=n(7657),l=function(c,t){return _.createElement(h.Z,(0,C.Z)({},c,{ref:t,icon:u}))},p=_.forwardRef(l),i=p},47472:function(ne,H,n){"use strict";n.d(H,{Z:function(){return i}});var C=n(14809),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},u=y,h=n(7657),l=function(c,t){return _.createElement(h.Z,(0,C.Z)({},c,{ref:t,icon:u}))},p=_.forwardRef(l),i=p},87395:function(ne,H,n){"use strict";n.d(H,{Z:function(){return i}});var C=n(14809),_=n(59301),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},u=y,h=n(7657),l=function(c,t){return _.createElement(h.Z,(0,C.Z)({},c,{ref:t,icon:u}))},p=_.forwardRef(l),i=p},42909:function(ne,H){"use strict";H.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},86074:function(ne,H,n){"use strict";n.d(H,{Z:function(){return u}});var C=n(25690),_={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},y=n(59301),u=({message:h,className:l,children:p,style:i={}})=>y.createElement("div",{className:`custom-spinner ${_.idsRingWrapper} ${l}`},y.createElement("div",{className:_.ldsRing},y.createElement("div",null),y.createElement("div",null),y.createElement("div",null),y.createElement("div",null)),h?y.createElement("p",{style:i},h):null,p,y.createElement(C.Outlet,null))},94268:function(ne,H,n){"use strict";n.d(H,{Z:function(){return l}});var C=n(59301),_={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},y=n(92310),u=n.n(y),l=({className:p,style:i={},leftNode:o,leftTitle:c="\u81EA\u6D4B\u8F93\u5165",rightNode:t,rightTitle:s="\u8FD0\u884C\u7ED3\u679C"})=>C.createElement("div",{className:u()(_.result,p),style:i},C.createElement("div",{className:_.left},C.createElement("div",{className:_.title},C.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),C.createElement("span",null,c)),C.createElement("div",{className:_.leftNode},o)),C.createElement("div",{className:_.right},C.createElement("div",{className:_.title},C.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),C.createElement("span",null,s)),C.createElement("div",{className:_.rightNode},t)))},84958:function(ne,H,n){"use strict";n.r(H),n.d(H,{default:function(){return e}});var C=n(59301),_=n(42909),y=n(346),u=n(25690),h=n(71418),l=n(94881),p=n(10866),i=n(75975),o=n(24334),c=n(61186),t=n.n(c),s=(r,a,f)=>new Promise((E,w)=>{var S=m=>{try{x(f.next(m))}catch(d){w(d)}},v=m=>{try{x(f.throw(m))}catch(d){w(d)}},x=m=>m.done?E(m.value):Promise.resolve(m.value).then(S,v);x((f=f.apply(r,a)).next())}),e=()=>{const{submitId:r,id:a}=(0,u.useParams)(),[f,E]=(0,C.useState)(void 0);console.log((0,u.useLocation)(),33);const w=(0,u.useLocation)();function S(){var B;u.history.push(`/problems/${a}/oj/${(B=w==null?void 0:w.query)==null?void 0:B.backId}?tab=1`)}(0,C.useEffect)(()=>((0,u.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,u.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,u.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,u.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,C.useEffect)(()=>{document.title="\u5728\u7EBF\u5237\u9898"}),(0,C.useEffect)(()=>{r&&function(){return s(this,null,function*(){const j=yield(0,l.X6)(r);E(j.data)})}()},[r]);const{status:v,created_at:x,code:m,name:d,language:g,pass_sets_count:b,set_count:D,error_msg:L,output:k,input:I,expected_output:N,execute_memory:M,user:U,execute_time:A,input_file_url:O,output_file_url:R,is_file:P,expected_output_file_url:T}=f||{};return C.createElement(h.Z,{spinning:!f,delay:500},C.createElement("div",{className:"record-detail-info"},f?C.createElement(C.Fragment,null,C.createElement("header",{className:_.Z.header},C.createElement("div",null,C.createElement("img",{src:`${y.Z.IMG_SERVER}/images/${U.image_url}`,alt:"user",width:30}),C.createElement("span",null,U.name)),C.createElement("h2",null," ",d," "),C.createElement("button",{className:"ant-btn",onClick:S,style:{border:"1px solid #bacffe",color:"#3061d0"}},"\u8FD4\u56DE\u8BE5\u9898")),C.createElement("div",{className:"record-detail-body"},C.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),C.createElement("ul",{className:"record-info"},C.createElement("li",null," \u72B6\u6001\uFF1A",C.createElement("span",{className:v===0?"c-green":"c-red"},p.Im[v])," "),C.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",C.createElement("span",null,t()(x).format("YYYY-MM-DD HH:mm:ss"))," "),C.createElement("li",null," \u8BED\u8A00\uFF1A",C.createElement("span",null,g)," "),C.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",C.createElement("span",null,A*1e3,"ms")," "),C.createElement("li",null," ",`${b} / ${D} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,p.gZ)({status:v,error_msg:L,execute_time:A,output:k,input:I,expected_output:N,input_file_url:O,output_file_url:R,is_file:P,expected_output_file_url:T}),C.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),C.createElement(i.ZP,{height:"200px",width:"100%",language:g==null?void 0:g.toLocaleLowerCase(),value:o.Base64.decode(m),options:{readOnly:!0}}))):null))}},10866:function(ne,H,n){"use strict";n.d(H,{Im:function(){return L},ZP:function(){return A},gZ:function(){return M}});var C=n(59301),_=n(92832),y=n(3113),u=n(84105),h=n(87395),l=n(24363),p=n(24334),i=n(86074),o=n(91842),c=n(51257),t=n(94268),s=n(34376),e=n(92310),r=n.n(e),a=n(59301),f=Object.defineProperty,E=Object.defineProperties,w=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,m=(O,R,P)=>R in O?f(O,R,{enumerable:!0,configurable:!0,writable:!0,value:P}):O[R]=P,d=(O,R)=>{for(var P in R||(R={}))v.call(R,P)&&m(O,P,R[P]);if(S)for(var P of S(R))x.call(R,P)&&m(O,P,R[P]);return O},g=(O,R)=>E(O,w(R));const{TextArea:b}=_.default,D={visible:!1,tabIndex:"0"},L={[l.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[l.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[l.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var k=(O=>(O[O.SET_VISIBLE=0]="SET_VISIBLE",O[O.SET_TABINDEX=1]="SET_TABINDEX",O))(k||{});function I(O,R){switch(R.type){case 0:return g(d({},O),{visible:R.payload});case 1:return g(d({},O),{tabIndex:R.payload});default:throw new Error}}function N({value:O,className:R}){const[P,T]=(0,C.useState)(!1),B=(0,C.useRef)(),j=(0,C.useRef)();return(0,C.useEffect)(()=>{P&&(j.current.reset(),j.current.write((0,c.pp)(O||"")))},[O,P]),(0,C.useEffect)(()=>{var z,Z,q,F;if(B.current){j.current=new s.Terminal({fontSize:14,disableStdin:!0}),j.current.open(B.current);const W=B.current.offsetWidth-14,$=((F=(q=(Z=(z=j.current)==null?void 0:z._core)==null?void 0:Z._renderService)==null?void 0:q.dimensions)==null?void 0:F.actualCellWidth)||9.5,V=Math.ceil(W/$);j.current.resize(V,8),T(!0)}},[]),a.createElement("div",{ref:B,className:r()("XtermText-valueRef",R)})}function M(O){const{status:R,error_msg:P,output:T,input:B,expected_output:j,is_file:z,input_file_url:Z,output_file_url:q,expected_output_file_url:F}=O;let W=null;const $={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(R){case l.h.NOMATCH:W=a.createElement(a.Fragment,null,a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!z&&a.createElement(N,{className:"mb10",value:B}),z&&a.createElement("div",{style:$},a.createElement("a",{onClick:()=>(0,c.LR)(Z,B)},B)),a.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!z&&a.createElement(N,{className:"mb10",value:T&&p.Base64.decode(T)||""}),z&&a.createElement("div",{style:$},a.createElement("a",{onClick:()=>(0,c.LR)(q,T)},T)),a.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!z&&a.createElement(N,{className:"mb10",value:j&&p.Base64.decode(j)||""}),z&&a.createElement("div",{style:$},a.createElement("a",{onClick:()=>(0,c.LR)(F,j)},j)));break;case l.h.EXECUTEFAILURE:W=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!z&&a.createElement(o.Z,{value:B,style:$}),z&&a.createElement("div",{style:$},a.createElement("a",{onClick:()=>(0,c.LR)(Z,B)},B)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},p.Base64.decode(P)));break;case l.h.COMPILEFAILURE:W=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!z&&a.createElement(o.Z,{value:B,style:$}),z&&a.createElement("div",{style:$},a.createElement("a",{onClick:()=>(0,c.LR)(Z,B)},B)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},p.Base64.decode(P)));break;case l.h.PODFAILURE:W=a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case l.h.TIMEOUT:W=a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return a.createElement(a.Fragment,null," ",W," ")}function U(O){const{status:R,error_msg:P,execute_time:T,output:B,input:j,expected_output:z,is_file:Z,input_file_url:q,output_file_url:F,expected_output_file_url:W}=O;let $=null;switch(R){case l.h.OK:$=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",T,"\u79D2"),a.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),a.createElement("pre",null,p.Base64.decode(B)));break;case l.h.NOMATCH:$=a.createElement(a.Fragment,null,a.createElement("p",null,"\u8F93\u5165\uFF1A",a.createElement("pre",null,j)),a.createElement("p",null,"\u8F93\u51FA\uFF1A",B&&p.Base64.decode(B)),a.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",z&&p.Base64.decode(z)));break;case l.h.EXECUTEFAILURE:$=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",a.createElement("pre",null,j)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},p.Base64.decode(P)));break;case l.h.COMPILEFAILURE:$=a.createElement(a.Fragment,null,a.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",a.createElement("pre",null,j)),a.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),a.createElement("pre",{className:"error"},p.Base64.decode(P)));break;case l.h.PODFAILURE:$=a.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case l.h.TIMEOUT:$=a.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return a.createElement(a.Fragment,null," ",$," ")}var A=({id:O,is_file:R,input:P,debuging:T,submitting:B,executingMessage:j,debugResult:z,onChangeInput:Z,onDebugCode:q,onSubmitCode:F})=>{const[W,$]=(0,C.useReducer)(I,D),{visible:V,tabIndex:Y}=W;(0,C.useEffect)(()=>{$({type:0,payload:!1})},[O]);function de(_e){let Q=_e.target.id;$({type:1,payload:Q})}function te(){$({type:0,payload:!V})}const G=(0,C.useMemo)(()=>{if(z){const{status:_e}=z;return a.createElement(a.Fragment,null,U(z))}return null},[z]);function se(){$({type:0,payload:!0}),$({type:1,payload:"1"}),q()}return a.createElement("div",{className:"test-case-panel"},a.createElement("div",{className:`test-case-panel-body ${V?"active":""}`},a.createElement("ul",{className:"s-navs"},a.createElement("li",null,a.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),a.createElement(t.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:a.createElement(b,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:R?"":P,onChange:Z}),rightNode:T?a.createElement(i.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):z?G:a.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),a.createElement("a",{className:`btn-collapse ${V?"up":""}`,onClick:te},V?a.createElement(u.Z,null):a.createElement(h.Z,null)),a.createElement("footer",{className:"footer"},a.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),a.createElement("div",{className:"flex-container"},a.createElement(y.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),a.createElement(y.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),a.createElement(y.ZP,{className:"btn-green",type:"ghost",loading:T,onClick:se},"\u8C03\u8BD5\u4EE3\u7801"),a.createElement(y.ZP,{type:"primary",className:"custom-ant-disabled",loading:B,disabled:B,onClick:()=>{$({type:0,payload:!1}),F()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},24363:function(ne,H,n){"use strict";n.d(H,{h:function(){return C}});var C=(_=>(_[_.NOMATCH=-1]="NOMATCH",_[_.OK=0]="OK",_[_.TIMEOUT=2]="TIMEOUT",_[_.PODFAILURE=3]="PODFAILURE",_[_.COMPILEFAILURE=4]="COMPILEFAILURE",_[_.EXECUTEFAILURE=5]="EXECUTEFAILURE",_[_.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",_))(C||{})},94881:function(ne,H,n){"use strict";n.d(H,{H7:function(){return o},KC:function(){return r},M3:function(){return w},MK:function(){return i},MU:function(){return u},Rg:function(){return x},WH:function(){return a},X6:function(){return l},bM:function(){return y},bx:function(){return f},dd:function(){return s},de:function(){return d},fi:function(){return c},fu:function(){return _},gu:function(){return E},n4:function(){return t},qe:function(){return v},rL:function(){return m},rX:function(){return p},uc:function(){return g},vl:function(){return e},wO:function(){return S},zO:function(){return h}});var C=n(38986);function _(b){return(0,C.U2)(`mypractices/${b}.json`,{hidePopLogin:!0})}function y(b,D){return(0,C.v_)(`mypractices/${b}/code_submit.json`,D)}function u(b,D){return(0,C.v_)(`mypractices/${b}/code_debug.json`,D)}function h(b,D){return D.language&&(D.language=encodeURIComponent(D.language)),(0,C.U2)(`mypractices/${b}/submit_records.json`,D)}function l(b){return(0,C.U2)("mypractices/record_detail.json",{id:b})}function p(b,D){return(0,C.U2)(`mypractices/${b}/result.json`,{mode:D})}function i(b,D){return(0,C.v_)(`mypractices/${b}/add_notes.json`,D)}function o(b,D){return(0,C.v_)(`mypractices/${b}/restore_initial_code.json`,D)}function c(b,D){return(0,C.v_)(`mypractices/${b}/sync_code.json`,D)}function t(b,D){return(0,C.v_)(`mypractices/${b}/update_code.json`,D)}function s(b){return(0,C.v_)(`mypractices/${b}/initial_codes.json`)}function e(b,D){return(0,C.v_)(`discusses/${b}/plus.json`,D)}function r(b){return(0,C.U2)("practices/practices_list.json",b)}function a(b,D){return(0,C.U2)(`practices/${b}/question_solution_articles`,D)}function f(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles`,D)}function E(b,D){return(0,C.gz)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}`,D)}function w(b,D){return(0,C.U2)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/edit`,D)}function S(b,D){return(0,C.U2)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}`,D)}function v(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/set_authority_or_excellent`,D)}function x(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/praise_or_treads`,D)}function m(b,D){return(0,C.v_)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}/hide`)}function d(b,D){return(0,C.IV)(`practices/${b}/question_solution_articles/${D==null?void 0:D.active}`,D)}function g(b,D){return(0,C.v_)(`mypractices/${b}/update_practice_time_sum`,D)}},19080:function(ne,H,n){"use strict";n.d(H,{F:function(){return h},Z:function(){return u}});var C=n(92310),_=n.n(C);const y=null;function u(l,p,i){return _()({[`${l}-status-success`]:p==="success",[`${l}-status-warning`]:p==="warning",[`${l}-status-error`]:p==="error",[`${l}-status-validating`]:p==="validating",[`${l}-has-feedback`]:i})}const h=(l,p)=>p||l},9432:function(ne,H,n){"use strict";n.d(H,{Z:function(){return S},n:function(){return E}});var C=n(19248),_=n(92310),y=n.n(_),u=n(93681),h=n(8654),l=n(59301),p=n(19080),i=n(36355),o=n(1684),c=n(19716),t=n(32441),s=n(33234),e=n(59412),r=n(9937);function a(v){return!!(v.prefix||v.suffix||v.allowClear)}var f=function(v,x){var m={};for(var d in v)Object.prototype.hasOwnProperty.call(v,d)&&x.indexOf(d)<0&&(m[d]=v[d]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,d=Object.getOwnPropertySymbols(v);g<d.length;g++)x.indexOf(d[g])<0&&Object.prototype.propertyIsEnumerable.call(v,d[g])&&(m[d[g]]=v[d[g]]);return m};function E(v,x){if(!v)return;v.focus(x);const{cursor:m}=x||{};if(m){const d=v.value.length;switch(m){case"start":v.setSelectionRange(0,0);break;case"end":v.setSelectionRange(d,d);break;default:v.setSelectionRange(0,d);break}}}var S=(0,l.forwardRef)((v,x)=>{var m;const{prefixCls:d,bordered:g=!0,status:b,size:D,disabled:L,onBlur:k,onFocus:I,suffix:N,allowClear:M,addonAfter:U,addonBefore:A,className:O,style:R,styles:P,rootClassName:T,onChange:B,classNames:j}=v,z=f(v,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Z,direction:q,input:F}=l.useContext(i.E_),W=Z("input",d),$=(0,l.useRef)(null),[V,Y]=(0,r.ZP)(W),{compactSize:de,compactItemClassnames:te}=(0,s.ri)(W,q),G=(0,c.Z)(ge=>{var ye;return(ye=D!=null?D:de)!==null&&ye!==void 0?ye:ge}),se=l.useContext(o.Z),_e=L!=null?L:se,{status:Q,hasFeedback:J,feedbackIcon:ue}=(0,l.useContext)(t.aM),ae=(0,p.F)(Q,b),oe=a(v)||!!J,pe=(0,l.useRef)(oe);(0,l.useEffect)(()=>{var ge;oe&&pe.current,pe.current=oe},[oe]);const ee=(0,e.Z)($,!0),K=ge=>{ee(),k==null||k(ge)},ve=ge=>{ee(),I==null||I(ge)},re=ge=>{ee(),B==null||B(ge)},ce=(J||N)&&l.createElement(l.Fragment,null,N,J&&ue);let le;return typeof M=="object"&&(M!=null&&M.clearIcon)?le=M:M&&(le={clearIcon:l.createElement(C.Z,null)}),V(l.createElement(u.default,Object.assign({ref:(0,h.sQ)(x,$),prefixCls:W,autoComplete:F==null?void 0:F.autoComplete},z,{disabled:_e,onBlur:K,onFocus:ve,style:Object.assign(Object.assign({},F==null?void 0:F.style),R),styles:Object.assign(Object.assign({},F==null?void 0:F.styles),P),suffix:ce,allowClear:le,className:y()(O,T,te,F==null?void 0:F.className),onChange:re,addonAfter:U&&l.createElement(s.BR,null,l.createElement(t.Ux,{override:!0,status:!0},U)),addonBefore:A&&l.createElement(s.BR,null,l.createElement(t.Ux,{override:!0,status:!0},A)),classNames:Object.assign(Object.assign(Object.assign({},j),F==null?void 0:F.classNames),{input:y()({[`${W}-sm`]:G==="small",[`${W}-lg`]:G==="large",[`${W}-rtl`]:q==="rtl",[`${W}-borderless`]:!g},!oe&&(0,p.Z)(W,ae),j==null?void 0:j.input,(m=F==null?void 0:F.classNames)===null||m===void 0?void 0:m.input,Y)}),classes:{affixWrapper:y()({[`${W}-affix-wrapper-sm`]:G==="small",[`${W}-affix-wrapper-lg`]:G==="large",[`${W}-affix-wrapper-rtl`]:q==="rtl",[`${W}-affix-wrapper-borderless`]:!g},(0,p.Z)(`${W}-affix-wrapper`,ae,J),Y),wrapper:y()({[`${W}-group-rtl`]:q==="rtl"},Y),group:y()({[`${W}-group-wrapper-sm`]:G==="small",[`${W}-group-wrapper-lg`]:G==="large",[`${W}-group-wrapper-rtl`]:q==="rtl",[`${W}-group-wrapper-disabled`]:_e},(0,p.Z)(`${W}-group-wrapper`,ae,J),Y)}})))})},1643:function(ne,H,n){"use strict";var C=n(19248),_=n(92310),y=n.n(_),u=n(9296),h=n(59301),l=n(19080),p=n(36355),i=n(1684),o=n(19716),c=n(32441),t=n(9432),s=n(9937),e=function(a,f){var E={};for(var w in a)Object.prototype.hasOwnProperty.call(a,w)&&f.indexOf(w)<0&&(E[w]=a[w]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,w=Object.getOwnPropertySymbols(a);S<w.length;S++)f.indexOf(w[S])<0&&Object.prototype.propertyIsEnumerable.call(a,w[S])&&(E[w[S]]=a[w[S]]);return E};const r=(0,h.forwardRef)((a,f)=>{const{prefixCls:E,bordered:w=!0,size:S,disabled:v,status:x,allowClear:m,showCount:d,classNames:g,rootClassName:b,className:D}=a,L=e(a,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:k,direction:I}=h.useContext(p.E_),N=(0,o.Z)(S),M=h.useContext(i.Z),U=v!=null?v:M,{status:A,hasFeedback:O,feedbackIcon:R}=h.useContext(c.aM),P=(0,l.F)(A,x),T=h.useRef(null);h.useImperativeHandle(f,()=>{var q;return{resizableTextArea:(q=T.current)===null||q===void 0?void 0:q.resizableTextArea,focus:F=>{var W,$;(0,t.n)(($=(W=T.current)===null||W===void 0?void 0:W.resizableTextArea)===null||$===void 0?void 0:$.textArea,F)},blur:()=>{var F;return(F=T.current)===null||F===void 0?void 0:F.blur()}}});const B=k("input",E);let j;typeof m=="object"&&(m!=null&&m.clearIcon)?j=m:m&&(j={clearIcon:h.createElement(C.Z,null)});const[z,Z]=(0,s.ZP)(B);return z(h.createElement(u.default,Object.assign({},L,{disabled:U,allowClear:j,className:y()(D,b),classes:{affixWrapper:y()(`${B}-textarea-affix-wrapper`,{[`${B}-affix-wrapper-rtl`]:I==="rtl",[`${B}-affix-wrapper-borderless`]:!w,[`${B}-affix-wrapper-sm`]:N==="small",[`${B}-affix-wrapper-lg`]:N==="large",[`${B}-textarea-show-count`]:d},(0,l.Z)(`${B}-affix-wrapper`,P),Z)},classNames:Object.assign(Object.assign({},g),{textarea:y()({[`${B}-borderless`]:!w,[`${B}-sm`]:N==="small",[`${B}-lg`]:N==="large"},(0,l.Z)(B,P),Z,g==null?void 0:g.textarea)}),prefixCls:B,suffix:O&&h.createElement("span",{className:`${B}-textarea-suffix`},R),showCount:d,ref:T})))});H.Z=r},59412:function(ne,H,n){"use strict";n.d(H,{Z:function(){return _}});var C=n(59301);function _(y,u){const h=(0,C.useRef)([]),l=()=>{h.current.push(setTimeout(()=>{var p,i,o,c;!((p=y.current)===null||p===void 0)&&p.input&&((i=y.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((o=y.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((c=y.current)===null||c===void 0||c.input.removeAttribute("value"))}))};return(0,C.useEffect)(()=>(u&&l(),()=>h.current.forEach(p=>{p&&clearTimeout(p)})),[]),l}},92832:function(ne,H,n){"use strict";n.d(H,{default:function(){return N}});var C=n(92310),_=n.n(C),y=n(59301),u=n(36355),h=n(32441),l=n(9937),i=M=>{const{getPrefixCls:U,direction:A}=(0,y.useContext)(u.E_),{prefixCls:O,className:R}=M,P=U("input-group",O),T=U("input"),[B,j]=(0,l.ZP)(T),z=_()(P,{[`${P}-lg`]:M.size==="large",[`${P}-sm`]:M.size==="small",[`${P}-compact`]:M.compact,[`${P}-rtl`]:A==="rtl"},j,R),Z=(0,y.useContext)(h.aM),q=(0,y.useMemo)(()=>Object.assign(Object.assign({},Z),{isFormItemInput:!1}),[Z]);return B(y.createElement("span",{className:z,style:M.style,onMouseEnter:M.onMouseEnter,onMouseLeave:M.onMouseLeave,onFocus:M.onFocus,onBlur:M.onBlur},y.createElement(h.aM.Provider,{value:q},M.children)))},o=n(9432),c=n(73331),t=n(15277),s=n(2738),e=n(8654),r=n(59412),a=function(M,U){var A={};for(var O in M)Object.prototype.hasOwnProperty.call(M,O)&&U.indexOf(O)<0&&(A[O]=M[O]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,O=Object.getOwnPropertySymbols(M);R<O.length;R++)U.indexOf(O[R])<0&&Object.prototype.propertyIsEnumerable.call(M,O[R])&&(A[O[R]]=M[O[R]]);return A};const f=M=>M?y.createElement(t.Z,null):y.createElement(c.Z,null),E={click:"onClick",hover:"onMouseOver"};var S=y.forwardRef((M,U)=>{const{visibilityToggle:A=!0}=M,O=typeof A=="object"&&A.visible!==void 0,[R,P]=(0,y.useState)(()=>O?A.visible:!1),T=(0,y.useRef)(null);y.useEffect(()=>{O&&P(A.visible)},[O,A]);const B=(0,r.Z)(T),j=()=>{const{disabled:_e}=M;_e||(R&&B(),P(Q=>{var J;const ue=!Q;return typeof A=="object"&&((J=A.onVisibleChange)===null||J===void 0||J.call(A,ue)),ue}))},z=_e=>{const{action:Q="click",iconRender:J=f}=M,ue=E[Q]||"",ae=J(R),oe={[ue]:j,className:`${_e}-icon`,key:"passwordIcon",onMouseDown:pe=>{pe.preventDefault()},onMouseUp:pe=>{pe.preventDefault()}};return y.cloneElement(y.isValidElement(ae)?ae:y.createElement("span",null,ae),oe)},{className:Z,prefixCls:q,inputPrefixCls:F,size:W}=M,$=a(M,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:V}=y.useContext(u.E_),Y=V("input",F),de=V("input-password",q),te=A&&z(de),G=_()(de,Z,{[`${de}-${W}`]:!!W}),se=Object.assign(Object.assign({},(0,s.Z)($,["suffix","iconRender","visibilityToggle"])),{type:R?"text":"password",className:G,prefixCls:Y,suffix:te});return W&&(se.size=W),y.createElement(o.Z,Object.assign({ref:(0,e.sQ)(U,T)},se))}),v=n(47472),x=n(92343),m=n(3113),d=n(19716),g=n(33234),b=function(M,U){var A={};for(var O in M)Object.prototype.hasOwnProperty.call(M,O)&&U.indexOf(O)<0&&(A[O]=M[O]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,O=Object.getOwnPropertySymbols(M);R<O.length;R++)U.indexOf(O[R])<0&&Object.prototype.propertyIsEnumerable.call(M,O[R])&&(A[O[R]]=M[O[R]]);return A},L=y.forwardRef((M,U)=>{const{prefixCls:A,inputPrefixCls:O,className:R,size:P,suffix:T,enterButton:B=!1,addonAfter:j,loading:z,disabled:Z,onSearch:q,onChange:F,onCompositionStart:W,onCompositionEnd:$}=M,V=b(M,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Y,direction:de}=y.useContext(u.E_),te=y.useRef(!1),G=Y("input-search",A),se=Y("input",O),{compactSize:_e}=(0,g.ri)(G,de),Q=(0,d.Z)(ie=>{var he;return(he=P!=null?P:_e)!==null&&he!==void 0?he:ie}),J=y.useRef(null),ue=ie=>{ie&&ie.target&&ie.type==="click"&&q&&q(ie.target.value,ie,{source:"clear"}),F&&F(ie)},ae=ie=>{var he;document.activeElement===((he=J.current)===null||he===void 0?void 0:he.input)&&ie.preventDefault()},oe=ie=>{var he,be;q&&q((be=(he=J.current)===null||he===void 0?void 0:he.input)===null||be===void 0?void 0:be.value,ie,{source:"input"})},pe=ie=>{te.current||z||oe(ie)},ee=typeof B=="boolean"?y.createElement(v.Z,null):null,K=`${G}-button`;let ve;const re=B||{},ce=re.type&&re.type.__ANT_BUTTON===!0;ce||re.type==="button"?ve=(0,x.Tm)(re,Object.assign({onMouseDown:ae,onClick:ie=>{var he,be;(be=(he=re==null?void 0:re.props)===null||he===void 0?void 0:he.onClick)===null||be===void 0||be.call(he,ie),oe(ie)},key:"enterButton"},ce?{className:K,size:Q}:{})):ve=y.createElement(m.ZP,{className:K,type:B?"primary":void 0,size:Q,disabled:Z,key:"enterButton",onMouseDown:ae,onClick:oe,loading:z,icon:ee},B),j&&(ve=[ve,(0,x.Tm)(j,{key:"addonAfter"})]);const le=_()(G,{[`${G}-rtl`]:de==="rtl",[`${G}-${Q}`]:!!Q,[`${G}-with-button`]:!!B},R),ge=ie=>{te.current=!0,W==null||W(ie)},ye=ie=>{te.current=!1,$==null||$(ie)};return y.createElement(o.Z,Object.assign({ref:(0,e.sQ)(J,U),onPressEnter:pe},V,{size:Q,onCompositionStart:ge,onCompositionEnd:ye,prefixCls:se,addonAfter:ve,suffix:T,onChange:ue,className:le,disabled:Z}))}),k=n(1643);const I=o.Z;I.Group=i,I.Search=L,I.TextArea=k.Z,I.Password=S;var N=I},9937:function(ne,H,n){"use strict";n.d(H,{M1:function(){return p},TM:function(){return x},Xy:function(){return i},bi:function(){return t},e5:function(){return v},ik:function(){return s},nz:function(){return h},pU:function(){return l},s7:function(){return e},x0:function(){return c}});var C=n(17313),_=n(74207),y=n(37613),u=n(83116);const h=m=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:m,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),l=m=>({borderColor:m.hoverBorderColor}),p=m=>({borderColor:m.activeBorderColor,boxShadow:m.activeShadow,outline:0}),i=m=>({color:m.colorTextDisabled,backgroundColor:m.colorBgContainerDisabled,borderColor:m.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},l((0,y.TS)(m,{hoverBorderColor:m.colorBorder})))}),o=m=>{const{paddingBlockLG:d,fontSizeLG:g,lineHeightLG:b,borderRadiusLG:D,paddingInlineLG:L}=m;return{padding:`${d}px ${L}px`,fontSize:g,lineHeight:b,borderRadius:D}},c=m=>({padding:`${m.paddingBlockSM}px ${m.paddingInlineSM}px`,borderRadius:m.borderRadiusSM}),t=(m,d)=>{const{componentCls:g,colorError:b,colorWarning:D,errorActiveShadow:L,warningActiveShadow:k,colorErrorBorderHover:I,colorWarningBorderHover:N}=m;return{[`&-status-error:not(${d}-disabled):not(${d}-borderless)${d}`]:{borderColor:b,"&:hover":{borderColor:I},"&:focus, &-focused":Object.assign({},p((0,y.TS)(m,{activeBorderColor:b,activeShadow:L}))),[`${g}-prefix, ${g}-suffix`]:{color:b}},[`&-status-warning:not(${d}-disabled):not(${d}-borderless)${d}`]:{borderColor:D,"&:hover":{borderColor:N},"&:focus, &-focused":Object.assign({},p((0,y.TS)(m,{activeBorderColor:D,activeShadow:k}))),[`${g}-prefix, ${g}-suffix`]:{color:D}}}},s=m=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${m.paddingBlock}px ${m.paddingInline}px`,color:m.colorText,fontSize:m.fontSize,lineHeight:m.lineHeight,backgroundColor:m.colorBgContainer,backgroundImage:"none",borderWidth:m.lineWidth,borderStyle:m.lineType,borderColor:m.colorBorder,borderRadius:m.borderRadius,transition:`all ${m.motionDurationMid}`},h(m.colorTextPlaceholder)),{"&:hover":Object.assign({},l(m)),"&:focus, &-focused":Object.assign({},p(m)),"&-disabled, &[disabled]":Object.assign({},i(m)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:m.controlHeight,lineHeight:m.lineHeight,verticalAlign:"bottom",transition:`all ${m.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},o(m)),"&-sm":Object.assign({},c(m)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),e=m=>{const{componentCls:d,antCls:g}=m;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:m.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${d}, &-lg > ${d}-group-addon`]:Object.assign({},o(m)),[`&-sm ${d}, &-sm > ${d}-group-addon`]:Object.assign({},c(m)),[`&-lg ${g}-select-single ${g}-select-selector`]:{height:m.controlHeightLG},[`&-sm ${g}-select-single ${g}-select-selector`]:{height:m.controlHeightSM},[`> ${d}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${d}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${m.paddingInline}px`,color:m.colorText,fontWeight:"normal",fontSize:m.fontSize,textAlign:"center",backgroundColor:m.colorFillAlter,border:`${m.lineWidth}px ${m.lineType} ${m.colorBorder}`,borderRadius:m.borderRadius,transition:`all ${m.motionDurationSlow}`,lineHeight:1,[`${g}-select`]:{margin:`-${m.paddingBlock+1}px -${m.paddingInline}px`,[`&${g}-select-single:not(${g}-select-customize-input)`]:{[`${g}-select-selector`]:{backgroundColor:"inherit",border:`${m.lineWidth}px ${m.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${g}-select-selector`]:{color:m.colorPrimary}}},[`${g}-cascader-picker`]:{margin:`-9px -${m.paddingInline}px`,backgroundColor:"transparent",[`${g}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${d}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${d}-search-with-button &`]:{zIndex:0}}},[`> ${d}:first-child, ${d}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${g}-select ${g}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${d}-affix-wrapper`]:{[`&:not(:first-child) ${d}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${d}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${d}:last-child, ${d}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${g}-select ${g}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${d}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${d}-search &`]:{borderStartStartRadius:m.borderRadius,borderEndStartRadius:m.borderRadius}},[`&:not(:first-child), ${d}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${d}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,C.dF)()),{[`${d}-group-addon, ${d}-group-wrap, > ${d}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:m.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${d}-affix-wrapper,
|
|
|
& > ${d}-number-affix-wrapper,
|
|
|
& > ${g}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-m.lineWidth,borderInlineEndWidth:m.lineWidth},[`${d}`]:{float:"none"},[`& > ${g}-select > ${g}-select-selector,
|
|
|
& > ${g}-select-auto-complete ${d},
|
|
|
& > ${g}-cascader-picker ${d},
|
|
|
& > ${d}-group-wrapper ${d}`]:{borderInlineEndWidth:m.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${g}-select-focused`]:{zIndex:1},[`& > ${g}-select > ${g}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${g}-select:first-child > ${g}-select-selector,
|
|
|
& > ${g}-select-auto-complete:first-child ${d},
|
|
|
& > ${g}-cascader-picker:first-child ${d}`]:{borderStartStartRadius:m.borderRadius,borderEndStartRadius:m.borderRadius},[`& > *:last-child,
|
|
|
& > ${g}-select:last-child > ${g}-select-selector,
|
|
|
& > ${g}-cascader-picker:last-child ${d},
|
|
|
& > ${g}-cascader-picker-focused:last-child ${d}`]:{borderInlineEndWidth:m.lineWidth,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius},[`& > ${g}-select-auto-complete ${d}`]:{verticalAlign:"top"},[`${d}-group-wrapper + ${d}-group-wrapper`]:{marginInlineStart:-m.lineWidth,[`${d}-affix-wrapper`]:{borderRadius:0}},[`${d}-group-wrapper:not(:last-child)`]:{[`&${d}-search > ${d}-group`]:{[`& > ${d}-group-addon > ${d}-search-button`]:{borderRadius:0},[`& > ${d}`]:{borderStartStartRadius:m.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:m.borderRadius}}}})}},r=m=>{const{componentCls:d,controlHeightSM:g,lineWidth:b}=m,L=(g-b*2-16)/2;return{[d]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.Wf)(m)),s(m)),t(m,d)),{'&[type="color"]':{height:m.controlHeight,[`&${d}-lg`]:{height:m.controlHeightLG},[`&${d}-sm`]:{height:g,paddingTop:L,paddingBottom:L}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},a=m=>{const{componentCls:d}=m;return{[`${d}-clear-icon`]:{margin:0,color:m.colorTextQuaternary,fontSize:m.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${m.motionDurationSlow}`,"&:hover":{color:m.colorTextTertiary},"&:active":{color:m.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${m.inputAffixPadding}px`}}}},f=m=>{const{componentCls:d,inputAffixPadding:g,colorTextDescription:b,motionDurationSlow:D,colorIcon:L,colorIconHover:k,iconCls:I}=m;return{[`${d}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s(m)),{display:"inline-flex",[`&:not(${d}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},l(m)),{zIndex:1,[`${d}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${d}[disabled]`]:{background:"transparent"}},[`> input${d}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${d}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:m.paddingXS}},"&-show-count-suffix":{color:b},"&-show-count-has-suffix":{marginInlineEnd:m.paddingXXS},"&-prefix":{marginInlineEnd:g},"&-suffix":{marginInlineStart:g}}}),a(m)),{[`${I}${d}-password-icon`]:{color:L,cursor:"pointer",transition:`all ${D}`,"&:hover":{color:k}}}),t(m,`${d}-affix-wrapper`))}},E=m=>{const{componentCls:d,colorError:g,colorWarning:b,borderRadiusLG:D,borderRadiusSM:L}=m;return{[`${d}-group`]:Object.assign(Object.assign(Object.assign({},(0,C.Wf)(m)),e(m)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${d}-group-addon`]:{borderRadius:D,fontSize:m.fontSizeLG}},"&-sm":{[`${d}-group-addon`]:{borderRadius:L}},"&-status-error":{[`${d}-group-addon`]:{color:g,borderColor:g}},"&-status-warning":{[`${d}-group-addon`]:{color:b,borderColor:b}},"&-disabled":{[`${d}-group-addon`]:Object.assign({},i(m))},[`&:not(${d}-compact-first-item):not(${d}-compact-last-item)${d}-compact-item`]:{[`${d}, ${d}-group-addon`]:{borderRadius:0}},[`&:not(${d}-compact-last-item)${d}-compact-first-item`]:{[`${d}, ${d}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${d}-compact-first-item)${d}-compact-last-item`]:{[`${d}, ${d}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},w=m=>{const{componentCls:d,antCls:g}=m,b=`${d}-search`;return{[b]:{[`${d}`]:{"&:hover, &:focus":{borderColor:m.colorPrimaryHover,[`+ ${d}-group-addon ${b}-button:not(${g}-btn-primary)`]:{borderInlineStartColor:m.colorPrimaryHover}}},[`${d}-affix-wrapper`]:{borderRadius:0},[`${d}-lg`]:{lineHeight:m.lineHeightLG-2e-4},[`> ${d}-group`]:{[`> ${d}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${b}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:m.borderRadius,borderEndEndRadius:m.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${b}-button:not(${g}-btn-primary)`]:{color:m.colorTextDescription,"&:hover":{color:m.colorPrimaryHover},"&:active":{color:m.colorPrimaryActive},[`&${g}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${b}-button`]:{height:m.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${b}-button`]:{height:m.controlHeightLG},[`&-small ${b}-button`]:{height:m.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${d}-compact-item`]:{[`&:not(${d}-compact-last-item)`]:{[`${d}-group-addon`]:{[`${d}-search-button`]:{marginInlineEnd:-m.lineWidth,borderRadius:0}}},[`&:not(${d}-compact-first-item)`]:{[`${d},${d}-affix-wrapper`]:{borderRadius:0}},[`> ${d}-group-addon ${d}-search-button,
|
|
|
> ${d},
|
|
|
${d}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${d}-affix-wrapper-focused`]:{zIndex:2}}}}},S=m=>{const{componentCls:d,paddingLG:g}=m,b=`${d}-textarea`;return{[b]:{position:"relative","&-show-count":{[`> ${d}`]:{height:"100%"},[`${d}-data-count`]:{position:"absolute",bottom:-m.fontSize*m.lineHeight,insetInlineEnd:0,color:m.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${d}`]:{paddingInlineEnd:g}},[`&-affix-wrapper${b}-has-feedback`]:{[`${d}`]:{paddingInlineEnd:g}},[`&-affix-wrapper${d}-affix-wrapper`]:{padding:0,[`> textarea${d}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${d}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${d}-clear-icon`]:{position:"absolute",insetInlineEnd:m.paddingXS,insetBlockStart:m.paddingXS},[`${b}-suffix`]:{position:"absolute",top:0,insetInlineEnd:m.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function v(m){return(0,y.TS)(m,{inputAffixPadding:m.paddingXXS})}const x=m=>{const{controlHeight:d,fontSize:g,lineHeight:b,lineWidth:D,controlHeightSM:L,controlHeightLG:k,fontSizeLG:I,lineHeightLG:N,paddingSM:M,controlPaddingHorizontalSM:U,controlPaddingHorizontal:A,colorFillAlter:O,colorPrimaryHover:R,controlOutlineWidth:P,controlOutline:T,colorErrorOutline:B,colorWarningOutline:j}=m;return{paddingBlock:Math.max(Math.round((d-g*b)/2*10)/10-D,3),paddingBlockSM:Math.max(Math.round((L-g*b)/2*10)/10-D,0),paddingBlockLG:Math.ceil((k-I*N)/2*10)/10-D,paddingInline:M-D,paddingInlineSM:U-D,paddingInlineLG:A-D,addonBg:O,activeBorderColor:R,hoverBorderColor:R,activeShadow:`0 0 0 ${P}px ${T}`,errorActiveShadow:`0 0 0 ${P}px ${B}`,warningActiveShadow:`0 0 0 ${P}px ${j}`}};H.ZP=(0,u.Z)("Input",m=>{const d=(0,y.TS)(m,v(m));return[r(d),S(d),f(d),E(d),w(d),(0,_.c)(d)]},x)},24334:function(ne,H,n){var C,_;(function(y,u){ne.exports=u(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof n.g!="undefined"?n.g:this,function(y){"use strict";y=y||{};var u=y.Base64,h="2.6.4",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=function(M){for(var U={},A=0,O=M.length;A<O;A++)U[M.charAt(A)]=A;return U}(l),i=String.fromCharCode,o=function(M){if(M.length<2){var U=M.charCodeAt(0);return U<128?M:U<2048?i(192|U>>>6)+i(128|U&63):i(224|U>>>12&15)+i(128|U>>>6&63)+i(128|U&63)}else{var U=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return i(240|U>>>18&7)+i(128|U>>>12&63)+i(128|U>>>6&63)+i(128|U&63)}},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t=function(M){return M.replace(c,o)},s=function(M){var U=[0,2,1][M.length%3],A=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),O=[l.charAt(A>>>18),l.charAt(A>>>12&63),U>=2?"=":l.charAt(A>>>6&63),U>=1?"=":l.charAt(A&63)];return O.join("")},e=y.btoa&&typeof y.btoa=="function"?function(M){return y.btoa(M)}:function(M){if(M.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return M.replace(/[\s\S]{1,3}/g,s)},r=function(M){return e(t(String(M)))},a=function(M){return M.replace(/[+\/]/g,function(U){return U=="+"?"-":"_"}).replace(/=/g,"")},f=function(M,U){return U?a(r(M)):r(M)},E=function(M){return f(M,!0)},w;y.Uint8Array&&(w=function(M,U){for(var A="",O=0,R=M.length;O<R;O+=3){var P=M[O],T=M[O+1],B=M[O+2],j=P<<16|T<<8|B;A+=l.charAt(j>>>18)+l.charAt(j>>>12&63)+(typeof T!="undefined"?l.charAt(j>>>6&63):"=")+(typeof B!="undefined"?l.charAt(j&63):"=")}return U?a(A):A});var S=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,v=function(M){switch(M.length){case 4:var U=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),A=U-65536;return i((A>>>10)+55296)+i((A&1023)+56320);case 3:return i((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return i((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},x=function(M){return M.replace(S,v)},m=function(M){var U=M.length,A=U%4,O=(U>0?p[M.charAt(0)]<<18:0)|(U>1?p[M.charAt(1)]<<12:0)|(U>2?p[M.charAt(2)]<<6:0)|(U>3?p[M.charAt(3)]:0),R=[i(O>>>16),i(O>>>8&255),i(O&255)];return R.length-=[0,0,2,1][A],R.join("")},d=y.atob&&typeof y.atob=="function"?function(M){return y.atob(M)}:function(M){return M.replace(/\S{1,4}/g,m)},g=function(M){return d(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},b=function(M){return x(d(M))},D=function(M){return String(M).replace(/[-_]/g,function(U){return U=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(M){return b(D(M))},k;y.Uint8Array&&(k=function(M){return Uint8Array.from(g(D(M)),function(U){return U.charCodeAt(0)})});var I=function(){var M=y.Base64;return y.Base64=u,M};if(y.Base64={VERSION:h,atob:g,btoa:e,fromBase64:L,toBase64:f,utob:t,encode:f,encodeURI:E,btou:x,decode:L,noConflict:I,fromUint8Array:w,toUint8Array:k},typeof Object.defineProperty=="function"){var N=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",N(function(){return L(this)})),Object.defineProperty(String.prototype,"toBase64",N(function(M){return f(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",N(function(){return f(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),ne.exports?ne.exports.Base64=y.Base64:(C=[],_=function(){return y.Base64}.apply(H,C),_!==void 0&&(ne.exports=_)),{Base64:y.Base64}})},93681:function(ne,H,n){"use strict";n.r(H),n.d(H,{BaseInput:function(){return c},default:function(){return S}});var C=n(14809),_=n(20439),y=n(4635),u=n(93664),h=n(92310),l=n.n(h),p=n(59301),i=n(5643),o=function(x){var m,d,g=x.inputElement,b=x.prefixCls,D=x.prefix,L=x.suffix,k=x.addonBefore,I=x.addonAfter,N=x.className,M=x.style,U=x.disabled,A=x.readOnly,O=x.focused,R=x.triggerFocus,P=x.allowClear,T=x.value,B=x.handleReset,j=x.hidden,z=x.classes,Z=x.classNames,q=x.dataAttrs,F=x.styles,W=x.components,$=(W==null?void 0:W.affixWrapper)||"span",V=(W==null?void 0:W.groupWrapper)||"span",Y=(W==null?void 0:W.wrapper)||"span",de=(W==null?void 0:W.groupAddon)||"span",te=(0,p.useRef)(null),G=function(re){var ce;(ce=te.current)!==null&&ce!==void 0&&ce.contains(re.target)&&(R==null||R())},se=function(){var re;if(!P)return null;var ce=!U&&!A&&T,le="".concat(b,"-clear-icon"),ge=(0,u.Z)(P)==="object"&&P!==null&&P!==void 0&&P.clearIcon?P.clearIcon:"\u2716";return p.createElement("span",{onClick:B,onMouseDown:function(ie){return ie.preventDefault()},className:l()(le,(re={},(0,y.Z)(re,"".concat(le,"-hidden"),!ce),(0,y.Z)(re,"".concat(le,"-has-suffix"),!!L),re)),role:"button",tabIndex:-1},ge)},_e=(0,p.cloneElement)(g,{value:T,hidden:j,className:l()((m=g.props)===null||m===void 0?void 0:m.className,!(0,i.X3)(x)&&!(0,i.He)(x)&&N)||null,style:(0,_.Z)((0,_.Z)({},(d=g.props)===null||d===void 0?void 0:d.style),!(0,i.X3)(x)&&!(0,i.He)(x)?M:{})});if((0,i.X3)(x)){var Q,J="".concat(b,"-affix-wrapper"),ue=l()(J,(Q={},(0,y.Z)(Q,"".concat(J,"-disabled"),U),(0,y.Z)(Q,"".concat(J,"-focused"),O),(0,y.Z)(Q,"".concat(J,"-readonly"),A),(0,y.Z)(Q,"".concat(J,"-input-with-clear-btn"),L&&P&&T),Q),!(0,i.He)(x)&&N,z==null?void 0:z.affixWrapper,Z==null?void 0:Z.affixWrapper),ae=(L||P)&&p.createElement("span",{className:l()("".concat(b,"-suffix"),Z==null?void 0:Z.suffix),style:F==null?void 0:F.suffix},se(),L);_e=p.createElement($,(0,C.Z)({className:ue,style:(0,_.Z)((0,_.Z)({},(0,i.He)(x)?void 0:M),F==null?void 0:F.affixWrapper),hidden:!(0,i.He)(x)&&j,onClick:G},q==null?void 0:q.affixWrapper,{ref:te}),D&&p.createElement("span",{className:l()("".concat(b,"-prefix"),Z==null?void 0:Z.prefix),style:F==null?void 0:F.prefix},D),(0,p.cloneElement)(g,{value:T,hidden:null}),ae)}if((0,i.He)(x)){var oe="".concat(b,"-group"),pe="".concat(oe,"-addon"),ee=l()("".concat(b,"-wrapper"),oe,z==null?void 0:z.wrapper),K=l()("".concat(b,"-group-wrapper"),N,z==null?void 0:z.group);return p.createElement(V,{className:K,style:M,hidden:j},p.createElement(Y,{className:ee},k&&p.createElement(de,{className:pe},k),(0,p.cloneElement)(_e,{hidden:null}),I&&p.createElement(de,{className:pe},I)))}return _e},c=o,t=n(95190),s=n(50298),e=n(62646),r=n(18929),a=n(2738),f=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],E=(0,p.forwardRef)(function(v,x){var m=v.autoComplete,d=v.onChange,g=v.onFocus,b=v.onBlur,D=v.onPressEnter,L=v.onKeyDown,k=v.prefixCls,I=k===void 0?"rc-input":k,N=v.disabled,M=v.htmlSize,U=v.className,A=v.maxLength,O=v.suffix,R=v.showCount,P=v.type,T=P===void 0?"text":P,B=v.classes,j=v.classNames,z=v.styles,Z=(0,e.Z)(v,f),q=(0,r.Z)(v.defaultValue,{value:v.value}),F=(0,s.Z)(q,2),W=F[0],$=F[1],V=(0,p.useState)(!1),Y=(0,s.Z)(V,2),de=Y[0],te=Y[1],G=(0,p.useRef)(null),se=function(K){G.current&&(0,i.nH)(G.current,K)};(0,p.useImperativeHandle)(x,function(){return{focus:se,blur:function(){var K;(K=G.current)===null||K===void 0||K.blur()},setSelectionRange:function(K,ve,re){var ce;(ce=G.current)===null||ce===void 0||ce.setSelectionRange(K,ve,re)},select:function(){var K;(K=G.current)===null||K===void 0||K.select()},input:G.current}}),(0,p.useEffect)(function(){te(function(ee){return ee&&N?!1:ee})},[N]);var _e=function(K){v.value===void 0&&$(K.target.value),G.current&&(0,i.rJ)(G.current,K,d)},Q=function(K){D&&K.key==="Enter"&&D(K),L==null||L(K)},J=function(K){te(!0),g==null||g(K)},ue=function(K){te(!1),b==null||b(K)},ae=function(K){$(""),se(),G.current&&(0,i.rJ)(G.current,K,d)},oe=function(){var K=(0,a.Z)(v,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return p.createElement("input",(0,C.Z)({autoComplete:m},K,{onChange:_e,onFocus:J,onBlur:ue,onKeyDown:Q,className:l()(I,(0,y.Z)({},"".concat(I,"-disabled"),N),j==null?void 0:j.input),style:z==null?void 0:z.input,ref:G,size:M,type:T}))},pe=function(){var K=Number(A)>0;if(O||R){var ve=(0,i.D7)(W),re=(0,t.Z)(ve).length,ce=(0,u.Z)(R)==="object"?R.formatter({value:ve,count:re,maxLength:A}):"".concat(re).concat(K?" / ".concat(A):"");return p.createElement(p.Fragment,null,!!R&&p.createElement("span",{className:l()("".concat(I,"-show-count-suffix"),(0,y.Z)({},"".concat(I,"-show-count-has-suffix"),!!O),j==null?void 0:j.count),style:(0,_.Z)({},z==null?void 0:z.count)},ce),O)}return null};return p.createElement(c,(0,C.Z)({},Z,{prefixCls:I,className:U,inputElement:oe(),handleReset:ae,value:(0,i.D7)(W),focused:de,triggerFocus:se,suffix:pe(),disabled:N,classes:B,classNames:j,styles:z}))}),w=E,S=w},5643:function(ne,H,n){"use strict";n.d(H,{D7:function(){return h},He:function(){return C},X3:function(){return _},nH:function(){return u},rJ:function(){return y}});function C(l){return!!(l.addonBefore||l.addonAfter)}function _(l){return!!(l.prefix||l.suffix||l.allowClear)}function y(l,p,i,o){if(i){var c=p;if(p.type==="click"){var t=l.cloneNode(!0);c=Object.create(p,{target:{value:t},currentTarget:{value:t}}),t.value="",i(c);return}if(o!==void 0){c=Object.create(p,{target:{value:l},currentTarget:{value:l}}),l.value=o,i(c);return}i(c)}}function u(l,p){if(l){l.focus(p);var i=p||{},o=i.cursor;if(o){var c=l.value.length;switch(o){case"start":l.setSelectionRange(0,0);break;case"end":l.setSelectionRange(c,c);break;default:l.setSelectionRange(0,c)}}}}function h(l){return typeof l=="undefined"||l===null?"":String(l)}},9296:function(ne,H,n){"use strict";n.r(H),n.d(H,{ResizableTextArea:function(){return k},default:function(){return O}});var C=n(14809),_=n(20439),y=n(4635),u=n(93664),h=n(50298),l=n(62646),p=n(95190),i=n(92310),o=n.n(i),c=n(93681),t=n(5643),s=n(18929),e=n(59301),r=n(29301),a=n(34280),f=n(16089),E=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,w=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],S={},v;function x(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=R.getAttribute("id")||R.getAttribute("data-reactid")||R.getAttribute("name");if(P&&S[T])return S[T];var B=window.getComputedStyle(R),j=B.getPropertyValue("box-sizing")||B.getPropertyValue("-moz-box-sizing")||B.getPropertyValue("-webkit-box-sizing"),z=parseFloat(B.getPropertyValue("padding-bottom"))+parseFloat(B.getPropertyValue("padding-top")),Z=parseFloat(B.getPropertyValue("border-bottom-width"))+parseFloat(B.getPropertyValue("border-top-width")),q=w.map(function(W){return"".concat(W,":").concat(B.getPropertyValue(W))}).join(";"),F={sizingStyle:q,paddingSize:z,borderSize:Z,boxSizing:j};return P&&T&&(S[T]=F),F}function m(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;v||(v=document.createElement("textarea"),v.setAttribute("tab-index","-1"),v.setAttribute("aria-hidden","true"),document.body.appendChild(v)),R.getAttribute("wrap")?v.setAttribute("wrap",R.getAttribute("wrap")):v.removeAttribute("wrap");var j=x(R,P),z=j.paddingSize,Z=j.borderSize,q=j.boxSizing,F=j.sizingStyle;v.setAttribute("style","".concat(F,";").concat(E)),v.value=R.value||R.placeholder||"";var W=void 0,$=void 0,V,Y=v.scrollHeight;if(q==="border-box"?Y+=Z:q==="content-box"&&(Y-=z),T!==null||B!==null){v.value=" ";var de=v.scrollHeight-z;T!==null&&(W=de*T,q==="border-box"&&(W=W+z+Z),Y=Math.max(W,Y)),B!==null&&($=de*B,q==="border-box"&&($=$+z+Z),V=Y>$?"":"hidden",Y=Math.min($,Y))}var te={height:Y,overflowY:V,resize:"none"};return W&&(te.minHeight=W),$&&(te.maxHeight=$),te}var d=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],g=0,b=1,D=2,L=e.forwardRef(function(R,P){var T=R,B=T.prefixCls,j=T.onPressEnter,z=T.defaultValue,Z=T.value,q=T.autoSize,F=T.onResize,W=T.className,$=T.style,V=T.disabled,Y=T.onChange,de=T.onInternalAutoSize,te=(0,l.Z)(T,d),G=(0,s.Z)(z,{value:Z,postState:function(me){return me!=null?me:""}}),se=(0,h.Z)(G,2),_e=se[0],Q=se[1],J=function(me){Q(me.target.value),Y==null||Y(me)},ue=e.useRef();e.useImperativeHandle(P,function(){return{textArea:ue.current}});var ae=e.useMemo(function(){return q&&(0,u.Z)(q)==="object"?[q.minRows,q.maxRows]:[]},[q]),oe=(0,h.Z)(ae,2),pe=oe[0],ee=oe[1],K=!!q,ve=function(){try{if(document.activeElement===ue.current){var me=ue.current,Ie=me.selectionStart,Me=me.selectionEnd,we=me.scrollTop;ue.current.setSelectionRange(Ie,Me),ue.current.scrollTop=we}}catch(Be){}},re=e.useState(D),ce=(0,h.Z)(re,2),le=ce[0],ge=ce[1],ye=e.useState(),ie=(0,h.Z)(ye,2),he=ie[0],be=ie[1],xe=function(){ge(g)};(0,a.Z)(function(){K&&xe()},[Z,pe,ee,K]),(0,a.Z)(function(){if(le===g)ge(b);else if(le===b){var Ce=m(ue.current,!1,pe,ee);ge(D),be(Ce)}else ve()},[le]);var Ae=e.useRef(),Re=function(){f.Z.cancel(Ae.current)},Le=function(me){le===D&&(F==null||F(me),q&&(Re(),Ae.current=(0,f.Z)(function(){xe()})))};e.useEffect(function(){return Re},[]);var Oe=K?he:null,De=(0,_.Z)((0,_.Z)({},$),Oe);return(le===g||le===b)&&(De.overflowY="hidden",De.overflowX="hidden"),e.createElement(r.Z,{onResize:Le,disabled:!(q||F)},e.createElement("textarea",(0,C.Z)({},te,{ref:ue,style:De,className:o()(B,W,(0,y.Z)({},"".concat(B,"-disabled"),V)),disabled:V,value:_e,onChange:J})))}),k=L,I=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function N(R,P){return(0,p.Z)(R||"").slice(0,P).join("")}function M(R,P,T,B){var j=T;return R?j=N(T,B):(0,p.Z)(P||"").length<T.length&&(0,p.Z)(T||"").length>B&&(j=P),j}var U=e.forwardRef(function(R,P){var T,B=R.defaultValue,j=R.value,z=R.onFocus,Z=R.onBlur,q=R.onChange,F=R.allowClear,W=R.maxLength,$=R.onCompositionStart,V=R.onCompositionEnd,Y=R.suffix,de=R.prefixCls,te=de===void 0?"rc-textarea":de,G=R.classes,se=R.showCount,_e=R.className,Q=R.style,J=R.disabled,ue=R.hidden,ae=R.classNames,oe=R.styles,pe=R.onResize,ee=(0,l.Z)(R,I),K=(0,s.Z)(B,{value:j,defaultValue:B}),ve=(0,h.Z)(K,2),re=ve[0],ce=ve[1],le=(0,e.useRef)(null),ge=e.useState(!1),ye=(0,h.Z)(ge,2),ie=ye[0],he=ye[1],be=e.useState(!1),xe=(0,h.Z)(be,2),Ae=xe[0],Re=xe[1],Le=e.useRef(),Oe=e.useRef(0),De=e.useState(null),Ce=(0,h.Z)(De,2),me=Ce[0],Ie=Ce[1],Me=function(){var X;(X=le.current)===null||X===void 0||X.textArea.focus()};(0,e.useImperativeHandle)(P,function(){return{resizableTextArea:le.current,focus:Me,blur:function(){var X;(X=le.current)===null||X===void 0||X.textArea.blur()}}}),(0,e.useEffect)(function(){he(function(Se){return!J&&Se})},[J]);var we=Number(W)>0,Be=function(X){Re(!0),Le.current=re,Oe.current=X.currentTarget.selectionStart,$==null||$(X)},Fe=function(X){Re(!1);var fe=X.currentTarget.value;if(we){var Ee,Ke=Oe.current>=W+1||Oe.current===((Ee=Le.current)===null||Ee===void 0?void 0:Ee.length);fe=M(Ke,Le.current,fe,W)}fe!==re&&(ce(fe),(0,t.rJ)(X.currentTarget,X,q,fe)),V==null||V(X)},je=function(X){var fe=X.target.value;if(!Ae&&we){var Ee=X.target.selectionStart>=W+1||X.target.selectionStart===fe.length||!X.target.selectionStart;fe=M(Ee,re,fe,W)}ce(fe),(0,t.rJ)(X.currentTarget,X,q,fe)},Ue=function(X){var fe=ee.onPressEnter,Ee=ee.onKeyDown;X.key==="Enter"&&fe&&fe(X),Ee==null||Ee(X)},We=function(X){he(!0),z==null||z(X)},Ne=function(X){he(!1),Z==null||Z(X)},ze=function(X){var fe;ce(""),Me(),(0,t.rJ)((fe=le.current)===null||fe===void 0?void 0:fe.textArea,X,q)},Te=(0,t.D7)(re);!Ae&&we&&j==null&&(Te=N(Te,W));var ke=Y,Pe;if(se){var He=(0,p.Z)(Te).length;(0,u.Z)(se)==="object"?Pe=se.formatter({value:Te,count:He,maxLength:W}):Pe="".concat(He).concat(we?" / ".concat(W):""),ke=e.createElement(e.Fragment,null,ke,e.createElement("span",{className:o()("".concat(te,"-data-count"),ae==null?void 0:ae.count),style:oe==null?void 0:oe.count},Pe))}var $e=function(X){var fe;pe==null||pe(X),(fe=le.current)!==null&&fe!==void 0&&fe.textArea.style.height&&Ie(!0)},qe=!ee.autoSize&&!se&&!F,Ze=e.createElement(c.BaseInput,{value:Te,allowClear:F,handleReset:ze,suffix:ke,prefixCls:te,classes:{affixWrapper:o()(G==null?void 0:G.affixWrapper,(T={},(0,y.Z)(T,"".concat(te,"-show-count"),se),(0,y.Z)(T,"".concat(te,"-textarea-allow-clear"),F),T))},disabled:J,focused:ie,className:_e,style:(0,_.Z)((0,_.Z)({},Q),me&&!qe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Pe=="string"?Pe:void 0}},hidden:ue,inputElement:e.createElement(k,(0,C.Z)({},ee,{onKeyDown:Ue,onChange:je,onFocus:We,onBlur:Ne,onCompositionStart:Be,onCompositionEnd:Fe,className:ae==null?void 0:ae.textarea,style:(0,_.Z)((0,_.Z)({},oe==null?void 0:oe.textarea),{},{resize:Q==null?void 0:Q.resize}),disabled:J,prefixCls:te,onResize:$e,ref:le}))});return Ze}),A=U,O=A},34376:function(ne){(function(H,n){if(1)ne.exports=n();else var C,_})(window,function(){return function(H){var n={};function C(_){if(n[_])return n[_].exports;var y=n[_]={i:_,l:!1,exports:{}};return H[_].call(y.exports,y,y.exports,C),y.l=!0,y.exports}return C.m=H,C.c=n,C.d=function(_,y,u){C.o(_,y)||Object.defineProperty(_,y,{enumerable:!0,get:u})},C.r=function(_){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})},C.t=function(_,y){if(1&y&&(_=C(_)),8&y||4&y&&typeof _=="object"&&_&&_.__esModule)return _;var u=Object.create(null);if(C.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:_}),2&y&&typeof _!="string")for(var h in _)C.d(u,h,function(l){return _[l]}.bind(null,h));return u},C.n=function(_){var y=_&&_.__esModule?function(){return _.default}:function(){return _};return C.d(y,"a",y),y},C.o=function(_,y){return Object.prototype.hasOwnProperty.call(_,y)},C.p="",C(C.s=34)}([function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.forwardEvent=n.EventEmitter=void 0;var _=function(){function y(){this._listeners=[],this._disposed=!1}return Object.defineProperty(y.prototype,"event",{get:function(){var u=this;return this._event||(this._event=function(h){return u._listeners.push(h),{dispose:function(){if(!u._disposed){for(var l=0;l<u._listeners.length;l++)if(u._listeners[l]===h)return void u._listeners.splice(l,1)}}}}),this._event},enumerable:!1,configurable:!0}),y.prototype.fire=function(u,h){for(var l=[],p=0;p<this._listeners.length;p++)l.push(this._listeners[p]);for(p=0;p<l.length;p++)l[p].call(void 0,u,h)},y.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},y}();n.EventEmitter=_,n.forwardEvent=function(y,u){return y(function(h){return u.fire(h)})}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IUnicodeService=n.IOptionsService=n.ILogService=n.IInstantiationService=n.IDirtyRowService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;var _=C(14);n.IBufferService=_.createDecorator("BufferService"),n.ICoreMouseService=_.createDecorator("CoreMouseService"),n.ICoreService=_.createDecorator("CoreService"),n.ICharsetService=_.createDecorator("CharsetService"),n.IDirtyRowService=_.createDecorator("DirtyRowService"),n.IInstantiationService=_.createDecorator("InstantiationService"),n.ILogService=_.createDecorator("LogService"),n.IOptionsService=_.createDecorator("OptionsService"),n.IUnicodeService=_.createDecorator("UnicodeService")},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.Disposable=void 0;var _=function(){function u(){this._disposables=[],this._isDisposed=!1}return u.prototype.dispose=function(){this._isDisposed=!0;for(var h=0,l=this._disposables;h<l.length;h++)l[h].dispose();this._disposables.length=0},u.prototype.register=function(h){return this._disposables.push(h),h},u.prototype.unregister=function(h){var l=this._disposables.indexOf(h);l!==-1&&this._disposables.splice(l,1)},u}();function y(u){for(var h=0,l=u;h<l.length;h++)l[h].dispose();u.length=0}n.Disposable=_,n.disposeArray=y,n.getDisposeArrayDisposable=function(u){return{dispose:function(){return y(u)}}}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=256,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(i,o){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,t){c.__proto__=t}||function(c,t){for(var s in t)t.hasOwnProperty(s)&&(c[s]=t[s])})(i,o)},function(i,o){function c(){this.constructor=i}_(i,o),i.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)});Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;var u=C(8),h=C(3),l=C(6),p=function(i){function o(){var c=i!==null&&i.apply(this,arguments)||this;return c.content=0,c.fg=0,c.bg=0,c.extended=new l.ExtendedAttrs,c.combinedData="",c}return y(o,i),o.fromCharData=function(c){var t=new o;return t.setFromCharData(c),t},o.prototype.isCombined=function(){return 2097152&this.content},o.prototype.getWidth=function(){return this.content>>22},o.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?u.stringFromCodePoint(2097151&this.content):""},o.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},o.prototype.setFromCharData=function(c){this.fg=c[h.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(c[h.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(c[h.CHAR_DATA_CHAR_INDEX].length===2){var s=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=s&&s<=56319){var e=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(s-55296)+e-56320+65536|c[h.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=c[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|c[h.CHAR_DATA_WIDTH_INDEX]<<22)},o.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},o}(l.AttributeData);n.CellData=p},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ISoundService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;var _=C(14);n.ICharSizeService=_.createDecorator("CharSizeService"),n.ICoreBrowserService=_.createDecorator("CoreBrowserService"),n.IMouseService=_.createDecorator("MouseService"),n.IRenderService=_.createDecorator("RenderService"),n.ISelectionService=_.createDecorator("SelectionService"),n.ISoundService=_.createDecorator("SoundService")},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;var _=function(){function u(){this.fg=0,this.bg=0,this.extended=new y}return u.toColorRGB=function(h){return[h>>>16&255,h>>>8&255,255&h]},u.fromColorRGB=function(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]},u.prototype.clone=function(){var h=new u;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h},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.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}();n.AttributeData=_;var y=function(){function u(h,l){h===void 0&&(h=0),l===void 0&&(l=-1),this.underlineStyle=h,this.underlineColor=l}return u.prototype.clone=function(){return new u(this.underlineStyle,this.underlineColor)},u.prototype.isEmpty=function(){return this.underlineStyle===0},u}();n.ExtendedAttrs=y},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(_,y,u,h){_.addEventListener(y,u,h);var l=!1;return{dispose:function(){l||(l=!0,_.removeEventListener(y,u,h))}}}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,h,l){h===void 0&&(h=0),l===void 0&&(l=u.length);for(var p="",i=h;i<l;++i){var o=u[i];o>65535?(o-=65536,p+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):p+=String.fromCharCode(o)}return p};var _=function(){function u(){this._interim=0}return u.prototype.clear=function(){this._interim=0},u.prototype.decode=function(h,l){var p=h.length;if(!p)return 0;var i=0,o=0;this._interim&&(56320<=(s=h.charCodeAt(o++))&&s<=57343?l[i++]=1024*(this._interim-55296)+s-56320+65536:(l[i++]=this._interim,l[i++]=s),this._interim=0);for(var c=o;c<p;++c){var t=h.charCodeAt(c);if(55296<=t&&t<=56319){if(++c>=p)return this._interim=t,i;var s;56320<=(s=h.charCodeAt(c))&&s<=57343?l[i++]=1024*(t-55296)+s-56320+65536:(l[i++]=t,l[i++]=s)}else l[i++]=t}return i},u}();n.StringToUtf32=_;var y=function(){function u(){this.interim=new Uint8Array(3)}return u.prototype.clear=function(){this.interim.fill(0)},u.prototype.decode=function(h,l){var p=h.length;if(!p)return 0;var i,o,c,t,s=0,e=0,r=0;if(this.interim[0]){var a=!1,f=this.interim[0];f&=(224&f)==192?31:(240&f)==224?15:7;for(var E=0,w=void 0;(w=63&this.interim[++E])&&E<4;)f<<=6,f|=w;for(var S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,v=S-E;r<v;){if(r>=p)return 0;if((192&(w=h[r++]))!=128){r--,a=!0;break}this.interim[E++]=w,f<<=6,f|=63&w}a||(S===2?f<128?r--:l[s++]=f:S===3?f<2048||f>=55296&&f<=57343||(l[s++]=f):f<65536||f>1114111||(l[s++]=f)),this.interim.fill(0)}for(var x=p-4,m=r;m<p;){for(;!(!(m<x)||128&(i=h[m])||128&(o=h[m+1])||128&(c=h[m+2])||128&(t=h[m+3]));)l[s++]=i,l[s++]=o,l[s++]=c,l[s++]=t,m+=4;if((i=h[m++])<128)l[s++]=i;else if((224&i)==192){if(m>=p)return this.interim[0]=i,s;if((192&(o=h[m++]))!=128){m--;continue}if((e=(31&i)<<6|63&o)<128){m--;continue}l[s++]=e}else if((240&i)==224){if(m>=p)return this.interim[0]=i,s;if((192&(o=h[m++]))!=128){m--;continue}if(m>=p)return this.interim[0]=i,this.interim[1]=o,s;if((192&(c=h[m++]))!=128){m--;continue}if((e=(15&i)<<12|(63&o)<<6|63&c)<2048||e>=55296&&e<=57343)continue;l[s++]=e}else if((248&i)==240){if(m>=p)return this.interim[0]=i,s;if((192&(o=h[m++]))!=128){m--;continue}if(m>=p)return this.interim[0]=i,this.interim[1]=o,s;if((192&(c=h[m++]))!=128){m--;continue}if(m>=p)return this.interim[0]=i,this.interim[1]=o,this.interim[2]=c,s;if((192&(t=h[m++]))!=128){m--;continue}if((e=(7&i)<<18|(63&o)<<12|(63&c)<<6|63&t)<65536||e>1114111)continue;l[s++]=e}}return s},u}();n.Utf8ToUtf32=y},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CHAR_ATLAS_CELL_SPACING=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0,n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.CHAR_ATLAS_CELL_SPACING=1},function(H,n,C){"use strict";var _,y,u,h;function l(i){var o=i.toString(16);return o.length<2?"0"+o:o}function p(i,o){return i<o?(o+.05)/(i+.05):(i+.05)/(o+.05)}Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=void 0,function(i){i.toCss=function(o,c,t,s){return s!==void 0?"#"+l(o)+l(c)+l(t)+l(s):"#"+l(o)+l(c)+l(t)},i.toRgba=function(o,c,t,s){return s===void 0&&(s=255),(o<<24|c<<16|t<<8|s)>>>0}}(_=n.channels||(n.channels={})),(y=n.color||(n.color={})).blend=function(i,o){var c=(255&o.rgba)/255;if(c===1)return{css:o.css,rgba:o.rgba};var t=o.rgba>>24&255,s=o.rgba>>16&255,e=o.rgba>>8&255,r=i.rgba>>24&255,a=i.rgba>>16&255,f=i.rgba>>8&255,E=r+Math.round((t-r)*c),w=a+Math.round((s-a)*c),S=f+Math.round((e-f)*c);return{css:_.toCss(E,w,S),rgba:_.toRgba(E,w,S)}},y.isOpaque=function(i){return(255&i.rgba)==255},y.ensureContrastRatio=function(i,o,c){var t=h.ensureContrastRatio(i.rgba,o.rgba,c);if(t)return h.toColor(t>>24&255,t>>16&255,t>>8&255)},y.opaque=function(i){var o=(255|i.rgba)>>>0,c=h.toChannels(o),t=c[0],s=c[1],e=c[2];return{css:_.toCss(t,s,e),rgba:o}},y.opacity=function(i,o){var c=Math.round(255*o),t=h.toChannels(i.rgba),s=t[0],e=t[1],r=t[2];return{css:_.toCss(s,e,r,c),rgba:_.toRgba(s,e,r,c)}},(n.css||(n.css={})).toColor=function(i){switch(i.length){case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(i){function o(c,t,s){var e=c/255,r=t/255,a=s/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4))}i.relativeLuminance=function(c){return o(c>>16&255,c>>8&255,255&c)},i.relativeLuminance2=o}(u=n.rgb||(n.rgb={})),function(i){function o(t,s,e){for(var r=t>>24&255,a=t>>16&255,f=t>>8&255,E=s>>24&255,w=s>>16&255,S=s>>8&255,v=p(u.relativeLuminance2(E,S,w),u.relativeLuminance2(r,a,f));v<e&&(E>0||w>0||S>0);)E-=Math.max(0,Math.ceil(.1*E)),w-=Math.max(0,Math.ceil(.1*w)),S-=Math.max(0,Math.ceil(.1*S)),v=p(u.relativeLuminance2(E,S,w),u.relativeLuminance2(r,a,f));return(E<<24|w<<16|S<<8|255)>>>0}function c(t,s,e){for(var r=t>>24&255,a=t>>16&255,f=t>>8&255,E=s>>24&255,w=s>>16&255,S=s>>8&255,v=p(u.relativeLuminance2(E,S,w),u.relativeLuminance2(r,a,f));v<e&&(E<255||w<255||S<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),w=Math.min(255,w+Math.ceil(.1*(255-w))),S=Math.min(255,S+Math.ceil(.1*(255-S))),v=p(u.relativeLuminance2(E,S,w),u.relativeLuminance2(r,a,f));return(E<<24|w<<16|S<<8|255)>>>0}i.ensureContrastRatio=function(t,s,e){var r=u.relativeLuminance(t>>8),a=u.relativeLuminance(s>>8);if(p(r,a)<e)return a<r?o(t,s,e):c(t,s,e)},i.reduceLuminance=o,i.increaseLuminance=c,i.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},i.toColor=function(t,s,e){return{css:_.toCss(t,s,e),rgba:_.toRgba(t,s,e)}}}(h=n.rgba||(n.rgba={})),n.toPaddedHex=l,n.contrastRatio=p},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.isSafari=n.isFirefox=void 0;var _=typeof navigator=="undefined",y=_?"node":navigator.userAgent,u=_?"node":navigator.platform;function h(l,p){return l.indexOf(p)>=0}n.isFirefox=!!~y.indexOf("Firefox"),n.isSafari=/^((?!chrome|android).)*safari/i.test(y),n.isMac=h(["Macintosh","MacIntel","MacPPC","Mac68K"],u),n.isIpad=u==="iPad",n.isIphone=u==="iPhone",n.isWindows=h(["Windows","Win16","Win32","WinCE"],u),n.isLinux=u.indexOf("Linux")>=0},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.C1=n.C0=void 0,function(_){_.NUL="\0",_.SOH="",_.STX="",_.ETX="",_.EOT="",_.ENQ="",_.ACK="",_.BEL="\x07",_.BS="\b",_.HT=" ",_.LF=`
|
|
|
`,_.VT="\v",_.FF="\f",_.CR="\r",_.SO="",_.SI="",_.DLE="",_.DC1="",_.DC2="",_.DC3="",_.DC4="",_.NAK="",_.SYN="",_.ETB="",_.CAN="",_.EM="",_.SUB="",_.ESC="\x1B",_.FS="",_.GS="",_.RS="",_.US="",_.SP=" ",_.DEL="\x7F"}(n.C0||(n.C0={})),function(_){_.PAD="\x80",_.HOP="\x81",_.BPH="\x82",_.NBH="\x83",_.IND="\x84",_.NEL="\x85",_.SSA="\x86",_.ESA="\x87",_.HTS="\x88",_.HTJ="\x89",_.VTS="\x8A",_.PLD="\x8B",_.PLU="\x8C",_.RI="\x8D",_.SS2="\x8E",_.SS3="\x8F",_.DCS="\x90",_.PU1="\x91",_.PU2="\x92",_.STS="\x93",_.CCH="\x94",_.MW="\x95",_.SPA="\x96",_.EPA="\x97",_.SOS="\x98",_.SGCI="\x99",_.SCI="\x9A",_.CSI="\x9B",_.ST="\x9C",_.OSC="\x9D",_.PM="\x9E",_.APC="\x9F"}(n.C1||(n.C1={}))},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;var _=C(3),y=C(9),u=C(25),h=C(6),l=C(28),p=C(10),i=C(17),o=function(){function c(t,s,e,r,a,f,E,w){this._container=t,this._alpha=r,this._colors=a,this._rendererId=f,this._bufferService=E,this._optionsService=w,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-"+s+"-layer"),this._canvas.style.zIndex=e.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return c.prototype.dispose=function(){var t;i.removeElementFromParent(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},c.prototype._initCanvas=function(){this._ctx=l.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},c.prototype.onOptionsChanged=function(){},c.prototype.onBlur=function(){},c.prototype.onFocus=function(){},c.prototype.onCursorMove=function(){},c.prototype.onGridChanged=function(t,s){},c.prototype.onSelectionChanged=function(t,s,e){e===void 0&&(e=!1)},c.prototype.setColors=function(t){this._refreshCharAtlas(t)},c.prototype._setTransparency=function(t){if(t!==this._alpha){var s=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,s),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},c.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=u.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},c.prototype.resize=function(t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},c.prototype._fillCells=function(t,s,e,r){this._ctx.fillRect(t*this._scaledCellWidth,s*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight)},c.prototype._fillBottomLineAtCells=function(t,s,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(s+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},c.prototype._fillLeftLineAtCell=function(t,s,e){this._ctx.fillRect(t*this._scaledCellWidth,s*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},c.prototype._strokeRectAtCell=function(t,s,e,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,s*this._scaledCellHeight+window.devicePixelRatio/2,e*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},c.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))},c.prototype._clearCells=function(t,s,e,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,s*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,s*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight))},c.prototype._fillCharTrueColor=function(t,s,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),s*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},c.prototype._drawChars=function(t,s,e){var r,a,f=this._getContrastColor(t);f||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,s,e,f):(t.isInverse()?(r=t.isBgDefault()?y.INVERTED_DEFAULT_COLOR:t.getBgColor(),a=t.isFgDefault()?y.INVERTED_DEFAULT_COLOR:t.getFgColor()):(a=t.isBgDefault()?_.DEFAULT_COLOR:t.getBgColor(),r=t.isFgDefault()?_.DEFAULT_COLOR:t.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||_.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||_.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=a,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,s*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,s,e))},c.prototype._drawUncachedChars=function(t,s,e,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(r)this._ctx.fillStyle=r.css;else if(t.isBgDefault())this._ctx.fillStyle=p.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var a=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&a<8&&(a+=8),this._ctx.fillStyle=this._colors.ansi[a].css}else if(r)this._ctx.fillStyle=r.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var f=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&f<8&&(f+=8),this._ctx.fillStyle=this._colors.ansi[f].css}this._clipRow(e),t.isDim()&&(this._ctx.globalAlpha=y.DIM_OPACITY),this._ctx.fillText(t.getChars(),s*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},c.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},c.prototype._getFont=function(t,s){return(s?"italic":"")+" "+(t?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},c.prototype._getContrastColor=function(t){if(this._optionsService.options.minimumContrastRatio!==1){var s=this._colors.contrastCache.getColor(t.bg,t.fg);if(s!==void 0)return s||void 0;var e=t.getFgColor(),r=t.getFgColorMode(),a=t.getBgColor(),f=t.getBgColorMode(),E=!!t.isInverse(),w=!!t.isInverse();if(E){var S=e;e=a,a=S;var v=r;r=f,f=v}var x=this._resolveBackgroundRgba(f,a,E),m=this._resolveForegroundRgba(r,e,E,w),d=p.rgba.ensureContrastRatio(x,m,this._optionsService.options.minimumContrastRatio);if(d){var g={css:p.channels.toCss(d>>24&255,d>>16&255,d>>8&255),rgba:d};return this._colors.contrastCache.setColor(t.bg,t.fg,g),g}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},c.prototype._resolveBackgroundRgba=function(t,s,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[s].rgba;case 50331648:return s<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},c.prototype._resolveForegroundRgba=function(t,s,e,r){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&s<8&&(s+=8),this._colors.ansi[s].rgba;case 50331648:return s<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},c}();n.BaseRenderLayer=o},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;function _(y,u,h){u.di$target===u?u.di$dependencies.push({id:y,index:h}):(u.di$dependencies=[{id:y,index:h}],u.di$target=u)}n.serviceRegistry=new Map,n.getServiceDependencies=function(y){return y.di$dependencies||[]},n.createDecorator=function(y){if(n.serviceRegistry.has(y))return n.serviceRegistry.get(y);var u=function(h,l,p){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");_(u,h,p)};return u.toString=function(){return y},n.serviceRegistry.set(y,u),u}},function(H,n,C){"use strict";function _(y,u,h,l){if(h===void 0&&(h=0),l===void 0&&(l=y.length),h>=y.length)return y;h=(y.length+h)%y.length,l=l>=y.length?y.length:(y.length+l)%y.length;for(var p=h;p<l;++p)y[p]=u;return y}Object.defineProperty(n,"__esModule",{value:!0}),n.concat=n.fillFallback=n.fill=void 0,n.fill=function(y,u,h,l){return y.fill?y.fill(u,h,l):_(y,u,h,l)},n.fillFallback=_,n.concat=function(y,u){var h=new y.constructor(y.length+u.length);return h.set(y),h.set(u,y.length),h}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;var _=C(8),y=C(3),u=C(4),h=C(6);n.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);var l=function(){function p(i,o,c){c===void 0&&(c=!1),this.isWrapped=c,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*i);for(var t=o||u.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),s=0;s<i;++s)this.setCell(s,t);this.length=i}return p.prototype.get=function(i){var o=this._data[3*i+0],c=2097151&o;return[this._data[3*i+1],2097152&o?this._combined[i]:c?_.stringFromCodePoint(c):"",o>>22,2097152&o?this._combined[i].charCodeAt(this._combined[i].length-1):c]},p.prototype.set=function(i,o){this._data[3*i+1]=o[y.CHAR_DATA_ATTR_INDEX],o[y.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[i]=o[1],this._data[3*i+0]=2097152|i|o[y.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*i+0]=o[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[y.CHAR_DATA_WIDTH_INDEX]<<22},p.prototype.getWidth=function(i){return this._data[3*i+0]>>22},p.prototype.hasWidth=function(i){return 12582912&this._data[3*i+0]},p.prototype.getFg=function(i){return this._data[3*i+1]},p.prototype.getBg=function(i){return this._data[3*i+2]},p.prototype.hasContent=function(i){return 4194303&this._data[3*i+0]},p.prototype.getCodePoint=function(i){var o=this._data[3*i+0];return 2097152&o?this._combined[i].charCodeAt(this._combined[i].length-1):2097151&o},p.prototype.isCombined=function(i){return 2097152&this._data[3*i+0]},p.prototype.getString=function(i){var o=this._data[3*i+0];return 2097152&o?this._combined[i]:2097151&o?_.stringFromCodePoint(2097151&o):""},p.prototype.loadCell=function(i,o){var c=3*i;return o.content=this._data[c+0],o.fg=this._data[c+1],o.bg=this._data[c+2],2097152&o.content&&(o.combinedData=this._combined[i]),268435456&o.bg&&(o.extended=this._extendedAttrs[i]),o},p.prototype.setCell=function(i,o){2097152&o.content&&(this._combined[i]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[i]=o.extended),this._data[3*i+0]=o.content,this._data[3*i+1]=o.fg,this._data[3*i+2]=o.bg},p.prototype.setCellFromCodePoint=function(i,o,c,t,s,e){268435456&s&&(this._extendedAttrs[i]=e),this._data[3*i+0]=o|c<<22,this._data[3*i+1]=t,this._data[3*i+2]=s},p.prototype.addCodepointToCell=function(i,o){var c=this._data[3*i+0];2097152&c?this._combined[i]+=_.stringFromCodePoint(o):(2097151&c?(this._combined[i]=_.stringFromCodePoint(2097151&c)+_.stringFromCodePoint(o),c&=-2097152,c|=2097152):c=o|1<<22,this._data[3*i+0]=c)},p.prototype.insertCells=function(i,o,c,t){if((i%=this.length)&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new h.ExtendedAttrs),o<this.length-i){for(var s=new u.CellData,e=this.length-i-o-1;e>=0;--e)this.setCell(i+o+e,this.loadCell(i+e,s));for(e=0;e<o;++e)this.setCell(i+e,c)}else for(e=i;e<this.length;++e)this.setCell(e,c);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new h.ExtendedAttrs)},p.prototype.deleteCells=function(i,o,c,t){if(i%=this.length,o<this.length-i){for(var s=new u.CellData,e=0;e<this.length-i-o;++e)this.setCell(i+e,this.loadCell(i+o+e,s));for(e=this.length-o;e<this.length;++e)this.setCell(e,c)}else for(e=i;e<this.length;++e)this.setCell(e,c);i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new h.ExtendedAttrs),this.getWidth(i)!==0||this.hasContent(i)||this.setCellFromCodePoint(i,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new h.ExtendedAttrs)},p.prototype.replaceCells=function(i,o,c,t){for(i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new h.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new h.ExtendedAttrs);i<o&&i<this.length;)this.setCell(i++,c)},p.prototype.resize=function(i,o){if(i!==this.length){if(i>this.length){var c=new Uint32Array(3*i);this.length&&(3*i<this._data.length?c.set(this._data.subarray(0,3*i)):c.set(this._data)),this._data=c;for(var t=this.length;t<i;++t)this.setCell(t,o)}else if(i){(c=new Uint32Array(3*i)).set(this._data.subarray(0,3*i)),this._data=c;var s=Object.keys(this._combined);for(t=0;t<s.length;t++){var e=parseInt(s[t],10);e>=i&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=i}},p.prototype.fill=function(i){this._combined={},this._extendedAttrs={};for(var o=0;o<this.length;++o)this.setCell(o,i)},p.prototype.copyFrom=function(i){for(var o in this.length!==i.length?this._data=new Uint32Array(i._data):this._data.set(i._data),this.length=i.length,this._combined={},i._combined)this._combined[o]=i._combined[o];for(var o in this._extendedAttrs={},i._extendedAttrs)this._extendedAttrs[o]=i._extendedAttrs[o];this.isWrapped=i.isWrapped},p.prototype.clone=function(){var i=new p(0);for(var o in i._data=new Uint32Array(this._data),i.length=this.length,this._combined)i._combined[o]=this._combined[o];for(var o in this._extendedAttrs)i._extendedAttrs[o]=this._extendedAttrs[o];return i.isWrapped=this.isWrapped,i},p.prototype.getTrimmedLength=function(){for(var i=this.length-1;i>=0;--i)if(4194303&this._data[3*i+0])return i+(this._data[3*i+0]>>22);return 0},p.prototype.copyCellsFrom=function(i,o,c,t,s){var e=i._data;if(s)for(var r=t-1;r>=0;r--)for(var a=0;a<3;a++)this._data[3*(c+r)+a]=e[3*(o+r)+a];else for(r=0;r<t;r++)for(a=0;a<3;a++)this._data[3*(c+r)+a]=e[3*(o+r)+a];var f=Object.keys(i._combined);for(a=0;a<f.length;a++){var E=parseInt(f[a],10);E>=o&&(this._combined[E-o+c]=i._combined[E])}},p.prototype.translateToString=function(i,o,c){i===void 0&&(i=!1),o===void 0&&(o=0),c===void 0&&(c=this.length),i&&(c=Math.min(c,this.getTrimmedLength()));for(var t="";o<c;){var s=this._data[3*o+0],e=2097151&s;t+=2097152&s?this._combined[o]:e?_.stringFromCodePoint(e):y.WHITESPACE_CELL_CHAR,o+=s>>22||1}return t},p}();n.BufferLine=l},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeElementFromParent=void 0,n.removeElementFromParent=function(){for(var _,y=[],u=0;u<arguments.length;u++)y[u]=arguments[u];for(var h=0,l=y;h<l.length;h++){var p=l[h];(_=p==null?void 0:p.parentElement)===null||_===void 0||_.removeChild(p)}}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(m,d){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var D in b)b.hasOwnProperty(D)&&(g[D]=b[D])})(m,d)},function(m,d){function g(){this.constructor=m}_(m,d),m.prototype=d===null?Object.create(d):(g.prototype=d.prototype,new g)});Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;var u,h=C(12),l=C(20),p=C(39),i=C(2),o=C(15),c=C(8),t=C(16),s=C(0),e=C(3),r=C(4),a=C(6),f=C(22),E=C(24),w={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function S(m,d){if(m>24)return d.setWinLines||!1;switch(m){case 1:return!!d.restoreWin;case 2:return!!d.minimizeWin;case 3:return!!d.setWinPosition;case 4:return!!d.setWinSizePixels;case 5:return!!d.raiseWin;case 6:return!!d.lowerWin;case 7:return!!d.refreshWin;case 8:return!!d.setWinSizeChars;case 9:return!!d.maximizeWin;case 10:return!!d.fullscreenWin;case 11:return!!d.getWinState;case 13:return!!d.getWinPosition;case 14:return!!d.getWinSizePixels;case 15:return!!d.getScreenSizePixels;case 16:return!!d.getCellSizePixels;case 18:return!!d.getWinSizeChars;case 19:return!!d.getScreenSizeChars;case 20:return!!d.getIconTitle;case 21:return!!d.getWinTitle;case 22:return!!d.pushTitle;case 23:return!!d.popTitle;case 24:return!!d.setWinLines}return!1}(function(m){m[m.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",m[m.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(u=n.WindowsOptionsReportType||(n.WindowsOptionsReportType={}));var v=function(){function m(d,g,b,D){this._bufferService=d,this._coreService=g,this._logService=b,this._optionsService=D,this._data=new Uint32Array(0)}return m.prototype.hook=function(d){this._data=new Uint32Array(0)},m.prototype.put=function(d,g,b){this._data=o.concat(this._data,d.subarray(g,b))},m.prototype.unhook=function(d){if(d){var g=c.utf32ToString(this._data);switch(this._data=new Uint32Array(0),g){case'"q':return this._coreService.triggerDataEvent(h.C0.ESC+'P1$r0"q'+h.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(h.C0.ESC+'P1$r61;1"p'+h.C0.ESC+"\\");case"r":var b=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(h.C0.ESC+"P1$r"+b+h.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(h.C0.ESC+"P1$r0m"+h.C0.ESC+"\\");case" q":var D={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return D-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(h.C0.ESC+"P1$r"+D+" q"+h.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",g),this._coreService.triggerDataEvent(h.C0.ESC+"P0$r"+h.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},m}(),x=function(m){function d(g,b,D,L,k,I,N,M,U){U===void 0&&(U=new p.EscapeSequenceParser);var A=m.call(this)||this;A._bufferService=g,A._charsetService=b,A._coreService=D,A._dirtyRowService=L,A._logService=k,A._optionsService=I,A._coreMouseService=N,A._unicodeService=M,A._parser=U,A._parseBuffer=new Uint32Array(4096),A._stringDecoder=new c.StringToUtf32,A._utf8Decoder=new c.Utf8ToUtf32,A._workCell=new r.CellData,A._windowTitle="",A._iconName="",A._windowTitleStack=[],A._iconNameStack=[],A._curAttrData=t.DEFAULT_ATTR_DATA.clone(),A._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),A._onRequestBell=new s.EventEmitter,A._onRequestRefreshRows=new s.EventEmitter,A._onRequestReset=new s.EventEmitter,A._onRequestScroll=new s.EventEmitter,A._onRequestSyncScrollBar=new s.EventEmitter,A._onRequestWindowsOptionsReport=new s.EventEmitter,A._onA11yChar=new s.EventEmitter,A._onA11yTab=new s.EventEmitter,A._onCursorMove=new s.EventEmitter,A._onLineFeed=new s.EventEmitter,A._onScroll=new s.EventEmitter,A._onTitleChange=new s.EventEmitter,A.register(A._parser),A._parser.setCsiHandlerFallback(function(T,B){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(T),params:B.toArray()})}),A._parser.setEscHandlerFallback(function(T){A._logService.debug("Unknown ESC code: ",{identifier:A._parser.identToString(T)})}),A._parser.setExecuteHandlerFallback(function(T){A._logService.debug("Unknown EXECUTE code: ",{code:T})}),A._parser.setOscHandlerFallback(function(T,B,j){A._logService.debug("Unknown OSC code: ",{identifier:T,action:B,data:j})}),A._parser.setDcsHandlerFallback(function(T,B,j){B==="HOOK"&&(j=j.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(T),action:B,payload:j})}),A._parser.setPrintHandler(function(T,B,j){return A.print(T,B,j)}),A._parser.setCsiHandler({final:"@"},function(T){return A.insertChars(T)}),A._parser.setCsiHandler({intermediates:" ",final:"@"},function(T){return A.scrollLeft(T)}),A._parser.setCsiHandler({final:"A"},function(T){return A.cursorUp(T)}),A._parser.setCsiHandler({intermediates:" ",final:"A"},function(T){return A.scrollRight(T)}),A._parser.setCsiHandler({final:"B"},function(T){return A.cursorDown(T)}),A._parser.setCsiHandler({final:"C"},function(T){return A.cursorForward(T)}),A._parser.setCsiHandler({final:"D"},function(T){return A.cursorBackward(T)}),A._parser.setCsiHandler({final:"E"},function(T){return A.cursorNextLine(T)}),A._parser.setCsiHandler({final:"F"},function(T){return A.cursorPrecedingLine(T)}),A._parser.setCsiHandler({final:"G"},function(T){return A.cursorCharAbsolute(T)}),A._parser.setCsiHandler({final:"H"},function(T){return A.cursorPosition(T)}),A._parser.setCsiHandler({final:"I"},function(T){return A.cursorForwardTab(T)}),A._parser.setCsiHandler({final:"J"},function(T){return A.eraseInDisplay(T)}),A._parser.setCsiHandler({prefix:"?",final:"J"},function(T){return A.eraseInDisplay(T)}),A._parser.setCsiHandler({final:"K"},function(T){return A.eraseInLine(T)}),A._parser.setCsiHandler({prefix:"?",final:"K"},function(T){return A.eraseInLine(T)}),A._parser.setCsiHandler({final:"L"},function(T){return A.insertLines(T)}),A._parser.setCsiHandler({final:"M"},function(T){return A.deleteLines(T)}),A._parser.setCsiHandler({final:"P"},function(T){return A.deleteChars(T)}),A._parser.setCsiHandler({final:"S"},function(T){return A.scrollUp(T)}),A._parser.setCsiHandler({final:"T"},function(T){return A.scrollDown(T)}),A._parser.setCsiHandler({final:"X"},function(T){return A.eraseChars(T)}),A._parser.setCsiHandler({final:"Z"},function(T){return A.cursorBackwardTab(T)}),A._parser.setCsiHandler({final:"`"},function(T){return A.charPosAbsolute(T)}),A._parser.setCsiHandler({final:"a"},function(T){return A.hPositionRelative(T)}),A._parser.setCsiHandler({final:"b"},function(T){return A.repeatPrecedingCharacter(T)}),A._parser.setCsiHandler({final:"c"},function(T){return A.sendDeviceAttributesPrimary(T)}),A._parser.setCsiHandler({prefix:">",final:"c"},function(T){return A.sendDeviceAttributesSecondary(T)}),A._parser.setCsiHandler({final:"d"},function(T){return A.linePosAbsolute(T)}),A._parser.setCsiHandler({final:"e"},function(T){return A.vPositionRelative(T)}),A._parser.setCsiHandler({final:"f"},function(T){return A.hVPosition(T)}),A._parser.setCsiHandler({final:"g"},function(T){return A.tabClear(T)}),A._parser.setCsiHandler({final:"h"},function(T){return A.setMode(T)}),A._parser.setCsiHandler({prefix:"?",final:"h"},function(T){return A.setModePrivate(T)}),A._parser.setCsiHandler({final:"l"},function(T){return A.resetMode(T)}),A._parser.setCsiHandler({prefix:"?",final:"l"},function(T){return A.resetModePrivate(T)}),A._parser.setCsiHandler({final:"m"},function(T){return A.charAttributes(T)}),A._parser.setCsiHandler({final:"n"},function(T){return A.deviceStatus(T)}),A._parser.setCsiHandler({prefix:"?",final:"n"},function(T){return A.deviceStatusPrivate(T)}),A._parser.setCsiHandler({intermediates:"!",final:"p"},function(T){return A.softReset(T)}),A._parser.setCsiHandler({intermediates:" ",final:"q"},function(T){return A.setCursorStyle(T)}),A._parser.setCsiHandler({final:"r"},function(T){return A.setScrollRegion(T)}),A._parser.setCsiHandler({final:"s"},function(T){return A.saveCursor(T)}),A._parser.setCsiHandler({final:"t"},function(T){return A.windowOptions(T)}),A._parser.setCsiHandler({final:"u"},function(T){return A.restoreCursor(T)}),A._parser.setCsiHandler({intermediates:"'",final:"}"},function(T){return A.insertColumns(T)}),A._parser.setCsiHandler({intermediates:"'",final:"~"},function(T){return A.deleteColumns(T)}),A._parser.setExecuteHandler(h.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(h.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(h.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(h.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(h.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(h.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(h.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(h.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(h.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(h.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(h.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(h.C1.HTS,function(){return A.tabSet()}),A._parser.setOscHandler(0,new f.OscHandler(function(T){A.setTitle(T),A.setIconName(T)})),A._parser.setOscHandler(1,new f.OscHandler(function(T){return A.setIconName(T)})),A._parser.setOscHandler(2,new f.OscHandler(function(T){return A.setTitle(T)})),A._parser.setEscHandler({final:"7"},function(){return A.saveCursor()}),A._parser.setEscHandler({final:"8"},function(){return A.restoreCursor()}),A._parser.setEscHandler({final:"D"},function(){return A.index()}),A._parser.setEscHandler({final:"E"},function(){return A.nextLine()}),A._parser.setEscHandler({final:"H"},function(){return A.tabSet()}),A._parser.setEscHandler({final:"M"},function(){return A.reverseIndex()}),A._parser.setEscHandler({final:"="},function(){return A.keypadApplicationMode()}),A._parser.setEscHandler({final:">"},function(){return A.keypadNumericMode()}),A._parser.setEscHandler({final:"c"},function(){return A.fullReset()}),A._parser.setEscHandler({final:"n"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"o"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"|"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"}"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"~"},function(){return A.setgLevel(1)}),A._parser.setEscHandler({intermediates:"%",final:"@"},function(){return A.selectDefaultCharset()}),A._parser.setEscHandler({intermediates:"%",final:"G"},function(){return A.selectDefaultCharset()});var O=function(T){R._parser.setEscHandler({intermediates:"(",final:T},function(){return A.selectCharset("("+T)}),R._parser.setEscHandler({intermediates:")",final:T},function(){return A.selectCharset(")"+T)}),R._parser.setEscHandler({intermediates:"*",final:T},function(){return A.selectCharset("*"+T)}),R._parser.setEscHandler({intermediates:"+",final:T},function(){return A.selectCharset("+"+T)}),R._parser.setEscHandler({intermediates:"-",final:T},function(){return A.selectCharset("-"+T)}),R._parser.setEscHandler({intermediates:".",final:T},function(){return A.selectCharset("."+T)}),R._parser.setEscHandler({intermediates:"/",final:T},function(){return A.selectCharset("/"+T)})},R=this;for(var P in l.CHARSETS)O(P);return A._parser.setEscHandler({intermediates:"#",final:"8"},function(){return A.screenAlignmentPattern()}),A._parser.setErrorHandler(function(T){return A._logService.error("Parsing error: ",T),T}),A._parser.setDcsHandler({intermediates:"$",final:"q"},new v(A._bufferService,A._coreService,A._logService,A._optionsService)),A}return y(d,m),Object.defineProperty(d.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),d.prototype.dispose=function(){m.prototype.dispose.call(this)},d.prototype.parse=function(g){var b=this._bufferService.buffer,D=b.x,L=b.y;if(this._logService.debug("parsing data",g),this._parseBuffer.length<g.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(g.length,131072))),this._dirtyRowService.clearRange(),g.length>131072)for(var k=0;k<g.length;k+=131072){var I=k+131072<g.length?k+131072:g.length,N=typeof g=="string"?this._stringDecoder.decode(g.substring(k,I),this._parseBuffer):this._utf8Decoder.decode(g.subarray(k,I),this._parseBuffer);this._parser.parse(this._parseBuffer,N)}else N=typeof g=="string"?this._stringDecoder.decode(g,this._parseBuffer):this._utf8Decoder.decode(g,this._parseBuffer),this._parser.parse(this._parseBuffer,N);(b=this._bufferService.buffer).x===D&&b.y===L||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},d.prototype.print=function(g,b,D){var L,k,I=this._bufferService.buffer,N=this._charsetService.charset,M=this._optionsService.options.screenReaderMode,U=this._bufferService.cols,A=this._coreService.decPrivateModes.wraparound,O=this._coreService.modes.insertMode,R=this._curAttrData,P=I.lines.get(I.ybase+I.y);this._dirtyRowService.markDirty(I.y),I.x&&D-b>0&&P.getWidth(I.x-1)===2&&P.setCellFromCodePoint(I.x-1,0,1,R.fg,R.bg,R.extended);for(var T=b;T<D;++T){if(L=g[T],k=this._unicodeService.wcwidth(L),L<127&&N){var B=N[String.fromCharCode(L)];B&&(L=B.charCodeAt(0))}if(M&&this._onA11yChar.fire(c.stringFromCodePoint(L)),k||!I.x){if(I.x+k-1>=U){if(A){for(;I.x<U;)P.setCellFromCodePoint(I.x++,0,1,R.fg,R.bg,R.extended);I.x=0,I.y++,I.y===I.scrollBottom+1?(I.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(I.y>=this._bufferService.rows&&(I.y=this._bufferService.rows-1),I.lines.get(I.ybase+I.y).isWrapped=!0),P=I.lines.get(I.ybase+I.y)}else if(I.x=U-1,k===2)continue}if(O&&(P.insertCells(I.x,k,I.getNullCell(R),R),P.getWidth(U-1)===2&&P.setCellFromCodePoint(U-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,R.fg,R.bg,R.extended)),P.setCellFromCodePoint(I.x++,L,k,R.fg,R.bg,R.extended),k>0)for(;--k;)P.setCellFromCodePoint(I.x++,0,0,R.fg,R.bg,R.extended)}else P.getWidth(I.x-1)?P.addCodepointToCell(I.x-1,L):P.addCodepointToCell(I.x-2,L)}D-b>0&&(P.loadCell(I.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),I.x<U&&D-b>0&&P.getWidth(I.x)===0&&!P.hasContent(I.x)&&P.setCellFromCodePoint(I.x,0,1,R.fg,R.bg,R.extended),this._dirtyRowService.markDirty(I.y)},d.prototype.addCsiHandler=function(g,b){var D=this;return g.final!=="t"||g.prefix||g.intermediates?this._parser.addCsiHandler(g,b):this._parser.addCsiHandler(g,function(L){return!S(L.params[0],D._optionsService.options.windowOptions)||b(L)})},d.prototype.addDcsHandler=function(g,b){return this._parser.addDcsHandler(g,new E.DcsHandler(b))},d.prototype.addEscHandler=function(g,b){return this._parser.addEscHandler(g,b)},d.prototype.addOscHandler=function(g,b){return this._parser.addOscHandler(g,new f.OscHandler(b))},d.prototype.bell=function(){this._onRequestBell.fire()},d.prototype.lineFeed=function(){var g=this._bufferService.buffer;this._dirtyRowService.markDirty(g.y),this._optionsService.options.convertEol&&(g.x=0),g.y++,g.y===g.scrollBottom+1?(g.y--,this._onRequestScroll.fire(this._eraseAttrData())):g.y>=this._bufferService.rows&&(g.y=this._bufferService.rows-1),g.x>=this._bufferService.cols&&g.x--,this._dirtyRowService.markDirty(g.y),this._onLineFeed.fire()},d.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},d.prototype.backspace=function(){var g,b=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(b.x>0&&b.x--);if(this._restrictCursor(this._bufferService.cols),b.x>0)b.x--;else if(b.x===0&&b.y>b.scrollTop&&b.y<=b.scrollBottom&&(!((g=b.lines.get(b.ybase+b.y))===null||g===void 0)&&g.isWrapped)){b.lines.get(b.ybase+b.y).isWrapped=!1,b.y--,b.x=this._bufferService.cols-1;var D=b.lines.get(b.ybase+b.y);D.hasWidth(b.x)&&!D.hasContent(b.x)&&b.x--}this._restrictCursor()},d.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var g=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-g)}},d.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},d.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},d.prototype._restrictCursor=function(g){g===void 0&&(g=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(g,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},d.prototype._setCursor=function(g,b){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=g,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+b):(this._bufferService.buffer.x=g,this._bufferService.buffer.y=b),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},d.prototype._moveCursor=function(g,b){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+g,this._bufferService.buffer.y+b)},d.prototype.cursorUp=function(g){var b=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;b>=0?this._moveCursor(0,-Math.min(b,g.params[0]||1)):this._moveCursor(0,-(g.params[0]||1))},d.prototype.cursorDown=function(g){var b=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;b>=0?this._moveCursor(0,Math.min(b,g.params[0]||1)):this._moveCursor(0,g.params[0]||1)},d.prototype.cursorForward=function(g){this._moveCursor(g.params[0]||1,0)},d.prototype.cursorBackward=function(g){this._moveCursor(-(g.params[0]||1),0)},d.prototype.cursorNextLine=function(g){this.cursorDown(g),this._bufferService.buffer.x=0},d.prototype.cursorPrecedingLine=function(g){this.cursorUp(g),this._bufferService.buffer.x=0},d.prototype.cursorCharAbsolute=function(g){this._setCursor((g.params[0]||1)-1,this._bufferService.buffer.y)},d.prototype.cursorPosition=function(g){this._setCursor(g.length>=2?(g.params[1]||1)-1:0,(g.params[0]||1)-1)},d.prototype.charPosAbsolute=function(g){this._setCursor((g.params[0]||1)-1,this._bufferService.buffer.y)},d.prototype.hPositionRelative=function(g){this._moveCursor(g.params[0]||1,0)},d.prototype.linePosAbsolute=function(g){this._setCursor(this._bufferService.buffer.x,(g.params[0]||1)-1)},d.prototype.vPositionRelative=function(g){this._moveCursor(0,g.params[0]||1)},d.prototype.hVPosition=function(g){this.cursorPosition(g)},d.prototype.tabClear=function(g){var b=g.params[0];b===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:b===3&&(this._bufferService.buffer.tabs={})},d.prototype.cursorForwardTab=function(g){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=g.params[0]||1;b--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},d.prototype.cursorBackwardTab=function(g){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var b=g.params[0]||1,D=this._bufferService.buffer;b--;)D.x=D.prevStop()},d.prototype._eraseInBufferLine=function(g,b,D,L){L===void 0&&(L=!1);var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+g);k.replaceCells(b,D,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),L&&(k.isWrapped=!1)},d.prototype._resetBufferLine=function(g){var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+g);b.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),b.isWrapped=!1},d.prototype.eraseInDisplay=function(g){var b;switch(this._restrictCursor(),g.params[0]){case 0:for(b=this._bufferService.buffer.y,this._dirtyRowService.markDirty(b),this._eraseInBufferLine(b++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);b<this._bufferService.rows;b++)this._resetBufferLine(b);this._dirtyRowService.markDirty(b);break;case 1:for(b=this._bufferService.buffer.y,this._dirtyRowService.markDirty(b),this._eraseInBufferLine(b,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(b+1).isWrapped=!1);b--;)this._resetBufferLine(b);this._dirtyRowService.markDirty(0);break;case 2:for(b=this._bufferService.rows,this._dirtyRowService.markDirty(b-1);b--;)this._resetBufferLine(b);this._dirtyRowService.markDirty(0);break;case 3:var D=this._bufferService.buffer.lines.length-this._bufferService.rows;D>0&&(this._bufferService.buffer.lines.trimStart(D),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-D,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-D,0),this._onScroll.fire(0))}},d.prototype.eraseInLine=function(g){switch(this._restrictCursor(),g.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},d.prototype.insertLines=function(g){this._restrictCursor();var b=g.params[0]||1,D=this._bufferService.buffer;if(!(D.y>D.scrollBottom||D.y<D.scrollTop)){for(var L=D.ybase+D.y,k=this._bufferService.rows-1-D.scrollBottom,I=this._bufferService.rows-1+D.ybase-k+1;b--;)D.lines.splice(I-1,1),D.lines.splice(L,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.y,D.scrollBottom),D.x=0}},d.prototype.deleteLines=function(g){this._restrictCursor();var b=g.params[0]||1,D=this._bufferService.buffer;if(!(D.y>D.scrollBottom||D.y<D.scrollTop)){var L,k=D.ybase+D.y;for(L=this._bufferService.rows-1-D.scrollBottom,L=this._bufferService.rows-1+D.ybase-L;b--;)D.lines.splice(k,1),D.lines.splice(L,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.y,D.scrollBottom),D.x=0}},d.prototype.insertChars=function(g){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.insertCells(this._bufferService.buffer.x,g.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},d.prototype.deleteChars=function(g){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.deleteCells(this._bufferService.buffer.x,g.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},d.prototype.scrollUp=function(g){for(var b=g.params[0]||1,D=this._bufferService.buffer;b--;)D.lines.splice(D.ybase+D.scrollTop,1),D.lines.splice(D.ybase+D.scrollBottom,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.scrollTop,D.scrollBottom)},d.prototype.scrollDown=function(g){for(var b=g.params[0]||1,D=this._bufferService.buffer;b--;)D.lines.splice(D.ybase+D.scrollBottom,1),D.lines.splice(D.ybase+D.scrollTop,0,D.getBlankLine(t.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(D.scrollTop,D.scrollBottom)},d.prototype.scrollLeft=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=b.lines.get(b.ybase+L);k.deleteCells(0,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.scrollRight=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=b.lines.get(b.ybase+L);k.insertCells(0,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.insertColumns=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=this._bufferService.buffer.lines.get(b.ybase+L);k.insertCells(b.x,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.deleteColumns=function(g){var b=this._bufferService.buffer;if(!(b.y>b.scrollBottom||b.y<b.scrollTop)){for(var D=g.params[0]||1,L=b.scrollTop;L<=b.scrollBottom;++L){var k=b.lines.get(b.ybase+L);k.deleteCells(b.x,D,b.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom)}},d.prototype.eraseChars=function(g){this._restrictCursor();var b=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);b&&(b.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(g.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},d.prototype.repeatPrecedingCharacter=function(g){if(this._parser.precedingCodepoint){for(var b=g.params[0]||1,D=new Uint32Array(b),L=0;L<b;++L)D[L]=this._parser.precedingCodepoint;this.print(D,0,D.length)}},d.prototype.sendDeviceAttributesPrimary=function(g){g.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"))},d.prototype.sendDeviceAttributesSecondary=function(g){g.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(g.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c"))},d.prototype._is=function(g){return(this._optionsService.options.termName+"").indexOf(g)===0},d.prototype.setMode=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){case 4:this._coreService.modes.insertMode=!0}},d.prototype.setModePrivate=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,l.DEFAULT_CHARSET),this._charsetService.setgCharset(1,l.DEFAULT_CHARSET),this._charsetService.setgCharset(2,l.DEFAULT_CHARSET),this._charsetService.setgCharset(3,l.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;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}},d.prototype.resetMode=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){case 4:this._coreService.modes.insertMode=!1}},d.prototype.resetModePrivate=function(g){for(var b=0;b<g.length;b++)switch(g.params[b]){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(),g.params[b]===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}},d.prototype._updateAttrColor=function(g,b,D,L,k){return b===2?(g|=50331648,g&=-16777216,g|=a.AttributeData.fromColorRGB([D,L,k])):b===5&&(g&=-50331904,g|=33554432|255&D),g},d.prototype._extractColor=function(g,b,D){var L=[0,0,-1,0,0,0],k=0,I=0;do{if(L[I+k]=g.params[b+I],g.hasSubParams(b+I)){var N=g.getSubParams(b+I),M=0;do L[1]===5&&(k=1),L[I+M+1+k]=N[M];while(++M<N.length&&M+I+1+k<L.length);break}if(L[1]===5&&I+k>=2||L[1]===2&&I+k>=5)break;L[1]&&(k=1)}while(++I+b<g.length&&I+k<L.length);for(M=2;M<L.length;++M)L[M]===-1&&(L[M]=0);switch(L[0]){case 38:D.fg=this._updateAttrColor(D.fg,L[1],L[3],L[4],L[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,L[1],L[3],L[4],L[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,L[1],L[3],L[4],L[5])}return I},d.prototype._processUnderline=function(g,b){b.extended=b.extended.clone(),(!~g||g>5)&&(g=1),b.extended.underlineStyle=g,b.fg|=268435456,g===0&&(b.fg&=-268435457),b.updateExtended()},d.prototype.charAttributes=function(g){if(g.length===1&&g.params[0]===0)return this._curAttrData.fg=t.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=t.DEFAULT_ATTR_DATA.bg);for(var b,D=g.length,L=this._curAttrData,k=0;k<D;k++)(b=g.params[k])>=30&&b<=37?(L.fg&=-50331904,L.fg|=16777216|b-30):b>=40&&b<=47?(L.bg&=-50331904,L.bg|=16777216|b-40):b>=90&&b<=97?(L.fg&=-50331904,L.fg|=16777224|b-90):b>=100&&b<=107?(L.bg&=-50331904,L.bg|=16777224|b-100):b===0?(L.fg=t.DEFAULT_ATTR_DATA.fg,L.bg=t.DEFAULT_ATTR_DATA.bg):b===1?L.fg|=134217728:b===3?L.bg|=67108864:b===4?(L.fg|=268435456,this._processUnderline(g.hasSubParams(k)?g.getSubParams(k)[0]:1,L)):b===5?L.fg|=536870912:b===7?L.fg|=67108864:b===8?L.fg|=1073741824:b===2?L.bg|=134217728:b===21?this._processUnderline(2,L):b===22?(L.fg&=-134217729,L.bg&=-134217729):b===23?L.bg&=-67108865:b===24?L.fg&=-268435457:b===25?L.fg&=-536870913:b===27?L.fg&=-67108865:b===28?L.fg&=-1073741825:b===39?(L.fg&=-67108864,L.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):b===49?(L.bg&=-67108864,L.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):b===38||b===48||b===58?k+=this._extractColor(g,k,L):b===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):b===100?(L.fg&=-67108864,L.fg|=16777215&t.DEFAULT_ATTR_DATA.fg,L.bg&=-67108864,L.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",b)},d.prototype.deviceStatus=function(g){switch(g.params[0]){case 5:this._coreService.triggerDataEvent(h.C0.ESC+"[0n");break;case 6:var b=this._bufferService.buffer.y+1,D=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(h.C0.ESC+"["+b+";"+D+"R")}},d.prototype.deviceStatusPrivate=function(g){switch(g.params[0]){case 6:var b=this._bufferService.buffer.y+1,D=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(h.C0.ESC+"[?"+b+";"+D+"R")}},d.prototype.softReset=function(g){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},d.prototype.setCursorStyle=function(g){var b=g.params[0]||1;switch(b){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 D=b%2==1;this._optionsService.options.cursorBlink=D},d.prototype.setScrollRegion=function(g){var b,D=g.params[0]||1;(g.length<2||(b=g.params[1])>this._bufferService.rows||b===0)&&(b=this._bufferService.rows),b>D&&(this._bufferService.buffer.scrollTop=D-1,this._bufferService.buffer.scrollBottom=b-1,this._setCursor(0,0))},d.prototype.windowOptions=function(g){if(S(g.params[0],this._optionsService.options.windowOptions)){var b=g.length>1?g.params[1]:0;switch(g.params[0]){case 14:b!==2&&this._onRequestWindowsOptionsReport.fire(u.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(u.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(h.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:b!==0&&b!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),b!==0&&b!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:b!==0&&b!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),b!==0&&b!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},d.prototype.saveCursor=function(g){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},d.prototype.restoreCursor=function(g){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},d.prototype.setTitle=function(g){this._windowTitle=g,this._onTitleChange.fire(g)},d.prototype.setIconName=function(g){this._iconName=g},d.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},d.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},d.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},d.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,l.DEFAULT_CHARSET)},d.prototype.selectCharset=function(g){g.length===2?g[0]!=="/"&&this._charsetService.setgCharset(w[g[0]],l.CHARSETS[g[1]]||l.DEFAULT_CHARSET):this.selectDefaultCharset()},d.prototype.index=function(){this._restrictCursor();var g=this._bufferService.buffer;this._bufferService.buffer.y++,g.y===g.scrollBottom+1?(g.y--,this._onRequestScroll.fire(this._eraseAttrData())):g.y>=this._bufferService.rows&&(g.y=this._bufferService.rows-1),this._restrictCursor()},d.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},d.prototype.reverseIndex=function(){this._restrictCursor();var g=this._bufferService.buffer;if(g.y===g.scrollTop){var b=g.scrollBottom-g.scrollTop;g.lines.shiftElements(g.ybase+g.y,b,1),g.lines.set(g.ybase+g.y,g.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(g.scrollTop,g.scrollBottom)}else g.y--,this._restrictCursor()},d.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},d.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},d.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},d.prototype.setgLevel=function(g){this._charsetService.setgLevel(g)},d.prototype.screenAlignmentPattern=function(){var g=new r.CellData;g.content=1<<22|69,g.fg=this._curAttrData.fg,g.bg=this._curAttrData.bg;var b=this._bufferService.buffer;this._setCursor(0,0);for(var D=0;D<this._bufferService.rows;++D){var L=b.ybase+b.y+D,k=b.lines.get(L);k&&(k.fill(g),k.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},d}(i.Disposable);n.InputHandler=x},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.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"},n.CHARSETS.A={"#":"\xA3"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},n.CHARSETS.C=n.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},n.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},n.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},n.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},n.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},n.CHARSETS.E=n.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},n.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},n.CHARSETS.H=n.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},n.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;var _=function(){function y(u,h){if(u===void 0&&(u=32),h===void 0&&(h=32),this.maxLength=u,this.maxSubParamsLength=h,h>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(h),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return y.fromArray=function(u){var h=new y;if(!u.length)return h;for(var l=u[0]instanceof Array?1:0;l<u.length;++l){var p=u[l];if(p instanceof Array)for(var i=0;i<p.length;++i)h.addSubParam(p[i]);else h.addParam(p)}return h},y.prototype.clone=function(){var u=new y(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u},y.prototype.toArray=function(){for(var u=[],h=0;h<this.length;++h){u.push(this.params[h]);var l=this._subParamsIdx[h]>>8,p=255&this._subParamsIdx[h];p-l>0&&u.push(Array.prototype.slice.call(this._subParams,l,p))}return u},y.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},y.prototype.addParam=function(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>2147483647?2147483647:u}},y.prototype.addSubParam=function(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>2147483647?2147483647:u,this._subParamsIdx[this.length-1]++}},y.prototype.hasSubParams=function(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0},y.prototype.getSubParams=function(u){var h=this._subParamsIdx[u]>>8,l=255&this._subParamsIdx[u];return l-h>0?this._subParams.subarray(h,l):null},y.prototype.getSubParamsAll=function(){for(var u={},h=0;h<this.length;++h){var l=this._subParamsIdx[h]>>8,p=255&this._subParamsIdx[h];p-l>0&&(u[h]=this._subParams.slice(l,p))}return u},y.prototype.addDigit=function(u){var h;if(!(this._rejectDigits||!(h=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var l=this._digitIsSub?this._subParams:this.params,p=l[h-1];l[h-1]=~p?Math.min(10*p+u,2147483647):u}},y}();n.Params=_},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;var _=C(23),y=C(8),u=function(){function l(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return l.prototype.addHandler=function(p,i){this._handlers[p]===void 0&&(this._handlers[p]=[]);var o=this._handlers[p];return o.push(i),{dispose:function(){var c=o.indexOf(i);c!==-1&&o.splice(c,1)}}},l.prototype.setHandler=function(p,i){this._handlers[p]=[i]},l.prototype.clearHandler=function(p){this._handlers[p]&&delete this._handlers[p]},l.prototype.setHandlerFallback=function(p){this._handlerFb=p},l.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},l.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},l.prototype._start=function(){var p=this._handlers[this._id];if(p)for(var i=p.length-1;i>=0;i--)p[i].start();else this._handlerFb(this._id,"START")},l.prototype._put=function(p,i,o){var c=this._handlers[this._id];if(c)for(var t=c.length-1;t>=0;t--)c[t].put(p,i,o);else this._handlerFb(this._id,"PUT",y.utf32ToString(p,i,o))},l.prototype._end=function(p){var i=this._handlers[this._id];if(i){for(var o=i.length-1;o>=0&&i[o].end(p)===!1;o--);for(o--;o>=0;o--)i[o].end(!1)}else this._handlerFb(this._id,"END",p)},l.prototype.start=function(){this.reset(),this._id=-1,this._state=1},l.prototype.put=function(p,i,o){if(this._state!==3){if(this._state===1)for(;i<o;){var c=p[i++];if(c===59){this._state=2,this._start();break}if(c<48||57<c)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+c-48}this._state===2&&o-i>0&&this._put(p,i,o)}},l.prototype.end=function(p){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(p)),this._id=-1,this._state=0)},l}();n.OscParser=u;var h=function(){function l(p){this._handler=p,this._data="",this._hitLimit=!1}return l.prototype.start=function(){this._data="",this._hitLimit=!1},l.prototype.put=function(p,i,o){this._hitLimit||(this._data+=y.utf32ToString(p,i,o),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},l.prototype.end=function(p){var i;return this._hitLimit?i=!1:p&&(i=this._handler(this._data)),this._data="",this._hitLimit=!1,i},l}();n.OscHandler=h},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;var _=C(8),y=C(21),u=C(23),h=[],l=function(){function i(){this._handlers=Object.create(null),this._active=h,this._ident=0,this._handlerFb=function(){}}return i.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},i.prototype.addHandler=function(o,c){this._handlers[o]===void 0&&(this._handlers[o]=[]);var t=this._handlers[o];return t.push(c),{dispose:function(){var s=t.indexOf(c);s!==-1&&t.splice(s,1)}}},i.prototype.setHandler=function(o,c){this._handlers[o]=[c]},i.prototype.clearHandler=function(o){this._handlers[o]&&delete this._handlers[o]},i.prototype.setHandlerFallback=function(o){this._handlerFb=o},i.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=h,this._ident=0},i.prototype.hook=function(o,c){if(this.reset(),this._ident=o,this._active=this._handlers[o]||h,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(c);else this._handlerFb(this._ident,"HOOK",c)},i.prototype.put=function(o,c,t){if(this._active.length)for(var s=this._active.length-1;s>=0;s--)this._active[s].put(o,c,t);else this._handlerFb(this._ident,"PUT",_.utf32ToString(o,c,t))},i.prototype.unhook=function(o){if(this._active.length){for(var c=this._active.length-1;c>=0&&this._active[c].unhook(o)===!1;c--);for(c--;c>=0;c--)this._active[c].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",o);this._active=h,this._ident=0},i}();n.DcsParser=l;var p=function(){function i(o){this._handler=o,this._data="",this._hitLimit=!1}return i.prototype.hook=function(o){this._params=o.clone(),this._data="",this._hitLimit=!1},i.prototype.put=function(o,c,t){this._hitLimit||(this._data+=_.utf32ToString(o,c,t),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},i.prototype.unhook=function(o){var c;return this._hitLimit?c=!1:o&&(c=this._handler(this._data,this._params||new y.Params)),this._params=void 0,this._data="",this._hitLimit=!1,c},i}();n.DcsHandler=p},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireCharAtlas=void 0;var _=C(26),y=C(43),u=[];n.acquireCharAtlas=function(h,l,p,i,o){for(var c=_.generateConfig(i,o,h,p),t=0;t<u.length;t++){var s=(e=u[t]).ownedBy.indexOf(l);if(s>=0){if(_.configEquals(e.config,c))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),u.splice(t,1)):e.ownedBy.splice(s,1);break}}for(t=0;t<u.length;t++){var e=u[t];if(_.configEquals(e.config,c))return e.ownedBy.push(l),e.atlas}var r={atlas:new y.DynamicCharAtlas(document,c),config:c,ownedBy:[l]};return u.push(r),r.atlas},n.removeTerminalFromCache=function(h){for(var l=0;l<u.length;l++){var p=u[l].ownedBy.indexOf(h);if(p!==-1){u[l].ownedBy.length===1?(u[l].atlas.dispose(),u.splice(l,1)):u[l].ownedBy.splice(p,1);break}}}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;var _=C(3);n.generateConfig=function(y,u,h,l){var p={foreground:l.foreground,background:l.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:l.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:y,scaledCharHeight:u,fontFamily:h.fontFamily,fontSize:h.fontSize,fontWeight:h.fontWeight,fontWeightBold:h.fontWeightBold,allowTransparency:h.allowTransparency,colors:p}},n.configEquals=function(y,u){for(var h=0;h<y.colors.ansi.length;h++)if(y.colors.ansi[h].rgba!==u.colors.ansi[h].rgba)return!1;return y.devicePixelRatio===u.devicePixelRatio&&y.fontFamily===u.fontFamily&&y.fontSize===u.fontSize&&y.fontWeight===u.fontWeight&&y.fontWeightBold===u.fontWeightBold&&y.allowTransparency===u.allowTransparency&&y.scaledCharWidth===u.scaledCharWidth&&y.scaledCharHeight===u.scaledCharHeight&&y.colors.foreground===u.colors.foreground&&y.colors.background===u.colors.background},n.is256Color=function(y){return y<_.DEFAULT_COLOR}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ColorManager=n.DEFAULT_ANSI_COLORS=void 0;var _=C(10),y=C(45),u=_.css.toColor("#ffffff"),h=_.css.toColor("#000000"),l=_.css.toColor("#ffffff"),p=_.css.toColor("#000000"),i={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=function(){for(var c=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],s=0;s<216;s++){var e=t[s/36%6|0],r=t[s/6%6|0],a=t[s%6];c.push({css:_.channels.toCss(e,r,a),rgba:_.channels.toRgba(e,r,a)})}for(s=0;s<24;s++){var f=8+10*s;c.push({css:_.channels.toCss(f,f,f),rgba:_.channels.toRgba(f,f,f)})}return c}();var o=function(){function c(t,s){this.allowTransparency=s;var e=t.createElement("canvas");e.width=1,e.height=1;var r=e.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new y.ColorContrastCache,this.colors={foreground:u,background:h,cursor:l,cursorAccent:p,selectionTransparent:i,selectionOpaque:_.color.blend(h,i),ansi:n.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return c.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},c.prototype.setTheme=function(t){t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,u),this.colors.background=this._parseColor(t.background,h),this.colors.cursor=this._parseColor(t.cursor,l,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,p,!0),this.colors.selectionTransparent=this._parseColor(t.selection,i,!0),this.colors.selectionOpaque=_.color.blend(this.colors.background,this.colors.selectionTransparent),_.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=_.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,n.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,n.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,n.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,n.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,n.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,n.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,n.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,n.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,n.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,n.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,n.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,n.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,n.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,n.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,n.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},c.prototype._parseColor=function(t,s,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return s;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+s.css),s;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(r[3]!==255){if(!e)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+s.css+"."),s;var a=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(x){return Number(x)}),f=a[0],E=a[1],w=a[2],S=a[3],v=Math.round(255*S);return{rgba:_.channels.toRgba(f,E,w,v),css:t}}return{css:this._ctx.fillStyle,rgba:_.channels.toRgba(r[0],r[1],r[2],r[3])}},c}();n.ColorManager=o},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.throwIfFalsy=void 0,n.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _}},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(o,c){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var e in s)s.hasOwnProperty(e)&&(t[e]=s[e])})(o,c)},function(o,c){function t(){this.constructor=o}_(o,c),o.prototype=c===null?Object.create(c):(t.prototype=c.prototype,new t)});Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerRegistry=n.JoinedCellData=void 0;var u=C(6),h=C(3),l=C(4),p=function(o){function c(t,s,e){var r=o.call(this)||this;return r.content=0,r.combinedData="",r.fg=t.fg,r.bg=t.bg,r.combinedData=s,r._width=e,r}return y(c,o),c.prototype.isCombined=function(){return 2097152},c.prototype.getWidth=function(){return this._width},c.prototype.getChars=function(){return this.combinedData},c.prototype.getCode=function(){return 2097151},c.prototype.setFromCharData=function(t){throw new Error("not implemented")},c.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},c}(u.AttributeData);n.JoinedCellData=p;var i=function(){function o(c){this._bufferService=c,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new l.CellData}return o.prototype.registerCharacterJoiner=function(c){var t={id:this._nextCharacterJoinerId++,handler:c};return this._characterJoiners.push(t),t.id},o.prototype.deregisterCharacterJoiner=function(c){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===c)return this._characterJoiners.splice(t,1),!0;return!1},o.prototype.getJoinedCharacters=function(c){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(c);if(!t||t.length===0)return[];for(var s=[],e=t.translateToString(!0),r=0,a=0,f=0,E=t.getFg(0),w=t.getBg(0),S=0;S<t.getTrimmedLength();S++)if(t.loadCell(S,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==w){if(S-r>1)for(var v=this._getJoinedRanges(e,f,a,t,r),x=0;x<v.length;x++)s.push(v[x]);r=S,f=a,E=this._workCell.fg,w=this._workCell.bg}a+=this._workCell.getChars().length||h.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-r>1)for(v=this._getJoinedRanges(e,f,a,t,r),x=0;x<v.length;x++)s.push(v[x]);return s},o.prototype._getJoinedRanges=function(c,t,s,e,r){for(var a=c.substring(t,s),f=this._characterJoiners[0].handler(a),E=1;E<this._characterJoiners.length;E++)for(var w=this._characterJoiners[E].handler(a),S=0;S<w.length;S++)o._mergeRanges(f,w[S]);return this._stringRangesToCellRanges(f,e,r),f},o.prototype._stringRangesToCellRanges=function(c,t,s){var e=0,r=!1,a=0,f=c[e];if(f){for(var E=s;E<this._bufferService.cols;E++){var w=t.getWidth(E),S=t.getString(E).length||h.WHITESPACE_CELL_CHAR.length;if(w!==0){if(!r&&f[0]<=a&&(f[0]=E,r=!0),f[1]<=a){if(f[1]=E,!(f=c[++e]))break;f[0]<=a?(f[0]=E,r=!0):r=!1}a+=S}}f&&(f[1]=this._bufferService.cols)}},o._mergeRanges=function(c,t){for(var s=!1,e=0;e<c.length;e++){var r=c[e];if(s){if(t[1]<=r[0])return c[e-1][1]=t[1],c;if(t[1]<=r[1])return c[e-1][1]=Math.max(t[1],r[1]),c.splice(e,1),c;c.splice(e,1),e--}else{if(t[1]<=r[0])return c.splice(e,0,t),c;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),c;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),s=!0)}}return s?c[c.length-1][1]=t[1]:c.push(t),c},o}();n.CharacterJoinerRegistry=i},function(H,n,C){"use strict";function _(y,u){var h=u.getBoundingClientRect();return[y.clientX-h.left,y.clientY-h.top]}Object.defineProperty(n,"__esModule",{value:!0}),n.getRawByteCoords=n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=_,n.getCoords=function(y,u,h,l,p,i,o,c){if(p){var t=_(y,u);if(t)return t[0]=Math.ceil((t[0]+(c?i/2:0))/i),t[1]=Math.ceil(t[1]/o),t[0]=Math.min(Math.max(t[0],1),h+(c?1:0)),t[1]=Math.min(Math.max(t[1],1),l),t}},n.getRawByteCoords=function(y){if(y)return{x:y[0]+32,y:y[1]+32}}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0;var _=function(){function y(u){this._renderCallback=u}return y.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},y.prototype.refresh=function(u,h,l){var p=this;this._rowCount=l,u=u!==void 0?u:0,h=h!==void 0?h: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,h):h,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return p._innerRefresh()}))},y.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(u,h)}},y}();n.RenderDebouncer=_},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(h,l){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var o in i)i.hasOwnProperty(o)&&(p[o]=i[o])})(h,l)},function(h,l){function p(){this.constructor=h}_(h,l),h.prototype=l===null?Object.create(l):(p.prototype=l.prototype,new p)});Object.defineProperty(n,"__esModule",{value:!0}),n.ScreenDprMonitor=void 0;var u=function(h){function l(){var p=h!==null&&h.apply(this,arguments)||this;return p._currentDevicePixelRatio=window.devicePixelRatio,p}return y(l,h),l.prototype.setListener=function(p){var i=this;this._listener&&this.clearListener(),this._listener=p,this._outerListener=function(){i._listener&&(i._listener(window.devicePixelRatio,i._currentDevicePixelRatio),i._updateDpr())},this._updateDpr()},l.prototype.dispose=function(){h.prototype.dispose.call(this),this.clearListener()},l.prototype._updateDpr=function(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)===null||p===void 0||p.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},l.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)},l}(C(2).Disposable);n.ScreenDprMonitor=u},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function _(y,u){if(u===void 0&&(u=5),typeof y!="object")return y;var h=Array.isArray(y)?[]:{};for(var l in y)h[l]=u<=1?y[l]:y[l]?_(y[l],u-1):y[l];return h}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;var _=C(4),y=C(35),u=C(18),h=C(0),l=C(83),p=function(){function e(r){this._core=new y.Terminal(r),this._addonManager=new l.AddonManager}return e.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(e.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new t(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new s(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._checkProposedApi(),new o(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._core.blur()},e.prototype.focus=function(){this._core.focus()},e.prototype.resize=function(r,a){this._verifyIntegers(r,a),this._core.resize(r,a)},e.prototype.open=function(r){this._core.open(r)},e.prototype.attachCustomKeyEventHandler=function(r){this._core.attachCustomKeyEventHandler(r)},e.prototype.registerLinkMatcher=function(r,a,f){return this._checkProposedApi(),this._core.registerLinkMatcher(r,a,f)},e.prototype.deregisterLinkMatcher=function(r){this._checkProposedApi(),this._core.deregisterLinkMatcher(r)},e.prototype.registerLinkProvider=function(r){return this._checkProposedApi(),this._core.registerLinkProvider(r)},e.prototype.registerCharacterJoiner=function(r){return this._checkProposedApi(),this._core.registerCharacterJoiner(r)},e.prototype.deregisterCharacterJoiner=function(r){this._checkProposedApi(),this._core.deregisterCharacterJoiner(r)},e.prototype.registerMarker=function(r){return this._checkProposedApi(),this._verifyIntegers(r),this._core.addMarker(r)},e.prototype.addMarker=function(r){return this.registerMarker(r)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(r,a,f){this._verifyIntegers(r,a,f),this._core.select(r,a,f)},e.prototype.getSelection=function(){return this._core.getSelection()},e.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},e.prototype.clearSelection=function(){this._core.clearSelection()},e.prototype.selectAll=function(){this._core.selectAll()},e.prototype.selectLines=function(r,a){this._verifyIntegers(r,a),this._core.selectLines(r,a)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(r){this._verifyIntegers(r),this._core.scrollLines(r)},e.prototype.scrollPages=function(r){this._verifyIntegers(r),this._core.scrollPages(r)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(r){this._verifyIntegers(r),this._core.scrollToLine(r)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(r,a){this._core.write(r,a)},e.prototype.writeUtf8=function(r,a){this._core.write(r,a)},e.prototype.writeln=function(r,a){this._core.write(r),this._core.write(`\r
|
|
|
`,a)},e.prototype.paste=function(r){this._core.paste(r)},e.prototype.getOption=function(r){return this._core.optionsService.getOption(r)},e.prototype.setOption=function(r,a){this._core.optionsService.setOption(r,a)},e.prototype.refresh=function(r,a){this._verifyIntegers(r,a),this._core.refresh(r,a)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(r){return this._addonManager.loadAddon(this,r)},Object.defineProperty(e,"strings",{get:function(){return u},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];for(var f=0,E=r;f<E.length;f++){var w=E[f];if(w===1/0||isNaN(w)||w%1!=0)throw new Error("This API only accepts integers")}},e}();n.Terminal=p;var i=function(){function e(r,a){this._buffer=r,this.type=a}return e.prototype.init=function(r){return this._buffer=r,this},Object.defineProperty(e.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),e.prototype.getLine=function(r){var a=this._buffer.lines.get(r);if(a)return new c(a)},e.prototype.getNullCell=function(){return new _.CellData},e}(),o=function(){function e(r){var a=this;this._buffers=r,this._onBufferChange=new h.EventEmitter,this._normal=new i(this._buffers.normal,"normal"),this._alternate=new i(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return a._onBufferChange.fire(a.active)})}return Object.defineProperty(e.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),e}(),c=function(){function e(r){this._line=r}return Object.defineProperty(e.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),e.prototype.getCell=function(r,a){if(!(r<0||r>=this._line.length))return a?(this._line.loadCell(r,a),a):this._line.loadCell(r,new _.CellData)},e.prototype.translateToString=function(r,a,f){return this._line.translateToString(r,a,f)},e}(),t=function(){function e(r){this._core=r}return e.prototype.registerCsiHandler=function(r,a){return this._core.addCsiHandler(r,function(f){return a(f.toArray())})},e.prototype.addCsiHandler=function(r,a){return this.registerCsiHandler(r,a)},e.prototype.registerDcsHandler=function(r,a){return this._core.addDcsHandler(r,function(f,E){return a(f,E.toArray())})},e.prototype.addDcsHandler=function(r,a){return this.registerDcsHandler(r,a)},e.prototype.registerEscHandler=function(r,a){return this._core.addEscHandler(r,a)},e.prototype.addEscHandler=function(r,a){return this.registerEscHandler(r,a)},e.prototype.registerOscHandler=function(r,a){return this._core.addOscHandler(r,a)},e.prototype.addOscHandler=function(r,a){return this.registerOscHandler(r,a)},e}(),s=function(){function e(r){this._core=r}return e.prototype.register=function(r){this._core.unicodeService.register(r)},Object.defineProperty(e.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(r){this._core.unicodeService.activeVersion=r},enumerable:!1,configurable:!0}),e}()},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(U,A){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,R){O.__proto__=R}||function(O,R){for(var P in R)R.hasOwnProperty(P)&&(O[P]=R[P])})(U,A)},function(U,A){function O(){this.constructor=U}_(U,A),U.prototype=A===null?Object.create(A):(O.prototype=A.prototype,new O)});Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;var u=C(36),h=C(37),l=C(38),p=C(12),i=C(19),o=C(40),c=C(50),t=C(51),s=C(11),e=C(7),r=C(18),a=C(54),f=C(55),E=C(56),w=C(57),S=C(59),v=C(0),x=C(16),m=C(27),d=C(60),g=C(5),b=C(61),D=C(62),L=C(63),k=C(64),I=C(65),N=typeof window!="undefined"?window.document:null,M=function(U){function A(O){O===void 0&&(O={});var R=U.call(this,O)||this;return R.browser=s,R._keyDownHandled=!1,R._onCursorMove=new v.EventEmitter,R._onKey=new v.EventEmitter,R._onRender=new v.EventEmitter,R._onSelectionChange=new v.EventEmitter,R._onTitleChange=new v.EventEmitter,R._onFocus=new v.EventEmitter,R._onBlur=new v.EventEmitter,R._onA11yCharEmitter=new v.EventEmitter,R._onA11yTabEmitter=new v.EventEmitter,R._setup(),R.linkifier=R._instantiationService.createInstance(c.Linkifier),R.linkifier2=R.register(R._instantiationService.createInstance(L.Linkifier2)),R.register(R._inputHandler.onRequestBell(function(){return R.bell()})),R.register(R._inputHandler.onRequestRefreshRows(function(P,T){return R.refresh(P,T)})),R.register(R._inputHandler.onRequestReset(function(){return R.reset()})),R.register(R._inputHandler.onRequestScroll(function(P,T){return R.scroll(P,T||void 0)})),R.register(R._inputHandler.onRequestWindowsOptionsReport(function(P){return R._reportWindowsOptions(P)})),R.register(v.forwardEvent(R._inputHandler.onCursorMove,R._onCursorMove)),R.register(v.forwardEvent(R._inputHandler.onTitleChange,R._onTitleChange)),R.register(v.forwardEvent(R._inputHandler.onA11yChar,R._onA11yCharEmitter)),R.register(v.forwardEvent(R._inputHandler.onA11yTab,R._onA11yTabEmitter)),R.register(R._bufferService.onResize(function(P){return R._afterResize(P.cols,P.rows)})),R}return y(A,U),Object.defineProperty(A.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),A.prototype.dispose=function(){var O,R,P;this._isDisposed||(U.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(P=(R=this.element)===null||R===void 0?void 0:R.parentNode)===null||P===void 0||P.removeChild(this.element))},A.prototype._setup=function(){U.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(A.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),A.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},A.prototype._updateOptions=function(O){var R,P,T,B;switch(U.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(R=this._renderService)===null||R===void 0||R.clear(),(P=this._charSizeService)===null||P===void 0||P.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;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":(T=this.viewport)===null||T===void 0||T.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new E.AccessibilityManager(this,this._renderService)):((B=this._accessibilityManager)===null||B===void 0||B.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},A.prototype._onTextAreaFocus=function(O){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(p.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},A.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},A.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(p.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},A.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var O=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),R=this._bufferService.buffer.y*O,P=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=P+"px",this.textarea.style.top=R+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=O+"px",this.textarea.style.lineHeight=O+"px",this.textarea.style.zIndex="-5"}},A.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register(e.addDisposableDomListener(this.element,"copy",function(P){O.hasSelection()&&l.copyHandler(P,O._selectionService)}));var R=function(P){return l.handlePasteEvent(P,O.textarea,O._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",R)),this.register(e.addDisposableDomListener(this.element,"paste",R)),s.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(P){P.button===2&&l.rightClickHandler(P,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(P){l.rightClickHandler(P,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),s.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(P){P.button===1&&l.moveTextAreaUnderMouseCursor(P,O.textarea,O.screenElement)}))},A.prototype._bindKeys=function(){var O=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(R){return O._keyUp(R)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(R){return O._keyDown(R)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(R){return O._keyPress(R)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(R){return O._compositionHelper.compositionupdate(R)})),this.register(e.addDisposableDomListener(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(R){return O._queueLinkification(R.start,R.end)}))},A.prototype.open=function(O){var R=this;if(!O)throw new Error("Terminal requires a parent element.");N.body.contains(O)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.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"),O.appendChild(this.element);var P=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),P.appendChild(this._viewportElement),this._viewportScrollArea=N.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=N.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=N.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),P.appendChild(this.screenElement),this.textarea=N.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",r.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(e.addDisposableDomListener(this.textarea,"focus",function(j){return R._onTextAreaFocus(j)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return R._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var T=this._instantiationService.createInstance(k.CoreBrowserService,this.textarea);this._instantiationService.setService(g.ICoreBrowserService,T),this._charSizeService=this._instantiationService.createInstance(b.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(g.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(u.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(P),this._theme=this.options.theme||this._theme,this._colorManager=new m.ColorManager(N,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(j){return R._colorManager.onOptionsChange(j)})),this._colorManager.setTheme(this._theme);var B=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(d.RenderService,B,this.rows,this.screenElement)),this._instantiationService.setService(g.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(j){return R._onRender.fire(j)})),this.onResize(function(j){return R._renderService.resize(j.cols,j.rows)}),this._soundService=this._instantiationService.createInstance(a.SoundService),this._instantiationService.setService(g.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(g.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(h.Viewport,function(j,z){return R.scrollLines(j,z)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return R.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){R._renderService.onCursorMove(),R._syncTextArea()})),this.register(this.onResize(function(){return R._renderService.onResize(R.cols,R.rows)})),this.register(this.onBlur(function(){return R._renderService.onBlur()})),this.register(this.onFocus(function(){return R._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return R.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(g.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(j){return R.scrollLines(j.amount,j.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return R._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(j){return R._renderService.onSelectionChanged(j.start,j.end,j.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(j){R.textarea.value=j,R.textarea.focus(),R.textarea.select()})),this.register(this.onScroll(function(){R.viewport.syncScrollArea(),R._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return R._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(f.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return R._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(e.addDisposableDomListener(this.element,"mousedown",function(j){return R._selectionService.onMouseDown(j)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new E.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},A.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(o.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(w.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},A.prototype._setTheme=function(O){var R,P,T;this._theme=O,(R=this._colorManager)===null||R===void 0||R.setTheme(O),(P=this._renderService)===null||P===void 0||P.setColors(this._colorManager.colors),(T=this.viewport)===null||T===void 0||T.onThemeChange(this._colorManager.colors)},A.prototype.bindMouse=function(){var O=this,R=this,P=this.element;function T(F){var W,$,V=R._mouseService.getRawByteCoords(F,R.screenElement,R.cols,R.rows);if(!V)return!1;switch(F.overrideType||F.type){case"mousemove":$=32,F.buttons===void 0?(W=3,F.button!==void 0&&(W=F.button<3?F.button:3)):W=1&F.buttons?0:4&F.buttons?1:2&F.buttons?2:3;break;case"mouseup":$=0,W=F.button<3?F.button:3;break;case"mousedown":$=1,W=F.button<3?F.button:3;break;case"wheel":F.deltaY!==0&&($=F.deltaY<0?0:1),W=4;break;default:return!1}return!($===void 0||W===void 0||W>4)&&R._coreMouseService.triggerMouseEvent({col:V.x-33,row:V.y-33,button:W,action:$,ctrl:F.ctrlKey,alt:F.altKey,shift:F.shiftKey})}var B={mouseup:null,wheel:null,mousedrag:null,mousemove:null},j=function(F){return T(F),F.buttons||(O._document.removeEventListener("mouseup",B.mouseup),B.mousedrag&&O._document.removeEventListener("mousemove",B.mousedrag)),O.cancel(F)},z=function(F){return T(F),F.preventDefault(),O.cancel(F)},Z=function(F){F.buttons&&T(F)},q=function(F){F.buttons||T(F)};this.register(this._coreMouseService.onProtocolChange(function(F){F?(O.optionsService.options.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O._coreMouseService.explainEvents(F)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&F?B.mousemove||(P.addEventListener("mousemove",q),B.mousemove=q):(P.removeEventListener("mousemove",B.mousemove),B.mousemove=null),16&F?B.wheel||(P.addEventListener("wheel",z,{passive:!1}),B.wheel=z):(P.removeEventListener("wheel",B.wheel),B.wheel=null),2&F?B.mouseup||(B.mouseup=j):(O._document.removeEventListener("mouseup",B.mouseup),B.mouseup=null),4&F?B.mousedrag||(B.mousedrag=Z):(O._document.removeEventListener("mousemove",B.mousedrag),B.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(P,"mousedown",function(F){if(F.preventDefault(),O.focus(),O._coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(F))return T(F),B.mouseup&&O._document.addEventListener("mouseup",B.mouseup),B.mousedrag&&O._document.addEventListener("mousemove",B.mousedrag),O.cancel(F)})),this.register(e.addDisposableDomListener(P,"wheel",function(F){if(!B.wheel){if(!O.buffer.hasScrollback){var W=O.viewport.getLinesScrolled(F);if(W===0)return;for(var $=p.C0.ESC+(O._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(F.deltaY<0?"A":"B"),V="",Y=0;Y<Math.abs(W);Y++)V+=$;O._coreService.triggerDataEvent(V,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(P,"wheel",function(F){if(!B.wheel)return O.viewport.onWheel(F)?void 0:O.cancel(F)},{passive:!1})),this.register(e.addDisposableDomListener(P,"touchstart",function(F){if(!O._coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(F),O.cancel(F)},{passive:!0})),this.register(e.addDisposableDomListener(P,"touchmove",function(F){if(!O._coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(F)?void 0:O.cancel(F)},{passive:!1}))},A.prototype.refresh=function(O,R){var P;(P=this._renderService)===null||P===void 0||P.refreshRows(O,R)},A.prototype._queueLinkification=function(O,R){var P;(P=this.linkifier)===null||P===void 0||P.linkifyRows(O,R)},A.prototype.updateCursorStyle=function(O){this._selectionService&&this._selectionService.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},A.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},A.prototype.scrollLines=function(O,R){U.prototype.scrollLines.call(this,O,R),this.refresh(0,this.rows-1)},A.prototype.paste=function(O){l.paste(O,this.textarea,this._coreService)},A.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},A.prototype.registerLinkMatcher=function(O,R,P){var T=this.linkifier.registerLinkMatcher(O,R,P);return this.refresh(0,this.rows-1),T},A.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},A.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},A.prototype.registerCharacterJoiner=function(O){var R=this._renderService.registerCharacterJoiner(O);return this.refresh(0,this.rows-1),R},A.prototype.deregisterCharacterJoiner=function(O){this._renderService.deregisterCharacterJoiner(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(A.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),A.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},A.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},A.prototype.select=function(O,R,P){this._selectionService.setSelection(O,R,P)},A.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},A.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]}},A.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},A.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},A.prototype.selectLines=function(O,R){var P;(P=this._selectionService)===null||P===void 0||P.selectLines(O,R)},A.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var R=S.evaluateKeyboardEvent(O,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),R.type===3||R.type===2){var P=this.rows-1;return this.scrollLines(R.type===2?-P:P),this.cancel(O,!0)}return R.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(R.cancel&&this.cancel(O,!0),!R.key||(R.key!==p.C0.ETX&&R.key!==p.C0.CR||(this.textarea.value=""),this._onKey.fire({key:R.key,domEvent:O}),this._showCursor(),this._coreService.triggerDataEvent(R.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0)))},A.prototype._isThirdLevelShift=function(O,R){var P=O.isMac&&!this.options.macOptionIsMeta&&R.altKey&&!R.ctrlKey&&!R.metaKey||O.isWindows&&R.altKey&&R.ctrlKey&&!R.metaKey;return R.type==="keypress"?P:P&&(!R.keyCode||R.keyCode>47)},A.prototype._keyUp=function(O){this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(R){return R.keyCode===16||R.keyCode===17||R.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O))},A.prototype._keyPress=function(O){var R;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)R=O.charCode;else if(O.which===null||O.which===void 0)R=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;R=O.which}return!(!R||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O))&&(R=String.fromCharCode(R),this._onKey.fire({key:R,domEvent:O}),this._showCursor(),this._coreService.triggerDataEvent(R,!0),!0)},A.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},A.prototype.resize=function(O,R){O!==this.cols||R!==this.rows?U.prototype.resize.call(this,O,R):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},A.prototype._afterResize=function(O,R){var P,T;(P=this._charSizeService)===null||P===void 0||P.measure(),(T=this.viewport)===null||T===void 0||T.syncScrollArea(!0)},A.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 O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(x.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},A.prototype.reset=function(){var O,R;this.options.rows=this.rows,this.options.cols=this.cols;var P=this._customKeyEventHandler;this._setup(),U.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._customKeyEventHandler=P,this.refresh(0,this.rows-1),(R=this.viewport)===null||R===void 0||R.syncScrollArea()},A.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case i.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var R=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),P=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(p.C0.ESC+"[4;"+P+";"+R+"t");break;case i.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var T=this._renderService.dimensions.scaledCellWidth.toFixed(0),B=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(p.C0.ESC+"[6;"+B+";"+T+"t")}},A.prototype.cancel=function(O,R){if(this.options.cancelEvents||R)return O.preventDefault(),O.stopPropagation(),!1},A.prototype._visualBell=function(){return!1},A.prototype._soundBell=function(){return this.options.bellStyle==="sound"},A}(I.CoreTerminal);n.Terminal=M},function(H,n,C){"use strict";var _=this&&this.__decorate||function(p,i,o,c){var t,s=arguments.length,e=s<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(p,i,o,c);else for(var r=p.length-1;r>=0;r--)(t=p[r])&&(e=(s<3?t(e):s>3?t(i,o,e):t(i,o))||e);return s>3&&e&&Object.defineProperty(i,o,e),e},y=this&&this.__param||function(p,i){return function(o,c){i(o,c,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;var u=C(5),h=C(1),l=function(){function p(i,o,c,t,s,e){this._textarea=i,this._compositionView=o,this._bufferService=c,this._optionsService=t,this._charSizeService=s,this._coreService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(p.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),p.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},p.prototype.compositionupdate=function(i){var o=this;this._compositionView.textContent=i.data,this.updateCompositionElements(),setTimeout(function(){o._compositionPosition.end=o._textarea.value.length},0)},p.prototype.compositionend=function(){this._finalizeComposition(!0)},p.prototype.keydown=function(i){if(this._isComposing||this._isSendingComposition){if(i.keyCode===229||i.keyCode===16||i.keyCode===17||i.keyCode===18)return!1;this._finalizeComposition(!1)}return i.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},p.prototype._finalizeComposition=function(i){var o=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,i){var c={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(o._isSendingComposition){o._isSendingComposition=!1;var s=void 0;s=o._isComposing?o._textarea.value.substring(c.start,c.end):o._textarea.value.substring(c.start),o._coreService.triggerDataEvent(s,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},p.prototype._handleAnyTextareaChanges=function(){var i=this,o=this._textarea.value;setTimeout(function(){if(!i._isComposing){var c=i._textarea.value.replace(o,"");c.length>0&&i._coreService.triggerDataEvent(c,!0)}},0)},p.prototype.updateCompositionElements=function(i){var o=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var c=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),t=this._bufferService.buffer.y*c,s=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=s+"px",this._compositionView.style.top=t+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var e=this._compositionView.getBoundingClientRect();this._textarea.style.left=s+"px",this._textarea.style.top=t+"px",this._textarea.style.width=e.width+"px",this._textarea.style.height=e.height+"px",this._textarea.style.lineHeight=e.height+"px"}i||setTimeout(function(){return o.updateCompositionElements(!0)},0)}},p=_([y(2,h.IBufferService),y(3,h.IOptionsService),y(4,u.ICharSizeService),y(5,h.ICoreService)],p)}();n.CompositionHelper=l},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),u=this&&this.__decorate||function(t,s,e,r){var a,f=arguments.length,E=f<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(s,e,E):a(s,e))||E);return f>3&&E&&Object.defineProperty(s,e,E),E},h=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;var l=C(2),p=C(7),i=C(5),o=C(1),c=function(t){function s(e,r,a,f,E,w,S){var v=t.call(this)||this;return v._scrollLines=e,v._viewportElement=r,v._scrollArea=a,v._bufferService=f,v._optionsService=E,v._charSizeService=w,v._renderService=S,v.scrollBarWidth=0,v._currentRowHeight=0,v._lastRecordedBufferLength=0,v._lastRecordedViewportHeight=0,v._lastRecordedBufferHeight=0,v._lastTouchY=0,v._lastScrollTop=0,v._wheelPartialScroll=0,v._refreshAnimationFrame=null,v._ignoreNextScrollEvent=!1,v.scrollBarWidth=v._viewportElement.offsetWidth-v._scrollArea.offsetWidth||15,v.register(p.addDisposableDomListener(v._viewportElement,"scroll",v._onScroll.bind(v))),setTimeout(function(){return v.syncScrollArea()},0),v}return y(s,t),s.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},s.prototype._refresh=function(e){var r=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return r._innerRefresh()}))},s.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==r&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=r),this._refreshAnimationFrame=null},s.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===r&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},s.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var r=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(r,!0)}},s.prototype._bubbleScroll=function(e,r){var a=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(r<0&&this._viewportElement.scrollTop!==0||r>0&&a<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},s.prototype.onWheel=function(e){var r=this._getPixelsScrolled(e);return r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},s.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?r*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._currentRowHeight*this._bufferService.rows),r},s.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=this._currentRowHeight+0,this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r},s.prototype._applyScrollModifier=function(e,r){var a=this._optionsService.options.fastScrollModifier;return a==="alt"&&r.altKey||a==="ctrl"&&r.ctrlKey||a==="shift"&&r.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},s.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},s.prototype.onTouchMove=function(e){var r=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},s=u([h(3,o.IBufferService),h(4,o.IOptionsService),h(5,i.ICharSizeService),h(6,i.IRenderService)],s)}(l.Disposable);n.Viewport=c},function(H,n,C){"use strict";function _(l){return l.replace(/\r?\n/g,"\r")}function y(l,p){return p?"\x1B[200~"+l+"\x1B[201~":l}function u(l,p,i){l=y(l=_(l),i.decPrivateModes.bracketedPasteMode),i.triggerDataEvent(l,!0),p.value=""}function h(l,p,i){var o=i.getBoundingClientRect(),c=l.clientX-o.left-10,t=l.clientY-o.top-10;p.style.width="20px",p.style.height="20px",p.style.left=c+"px",p.style.top=t+"px",p.style.zIndex="1000",p.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=_,n.bracketTextForPaste=y,n.copyHandler=function(l,p){l.clipboardData&&l.clipboardData.setData("text/plain",p.selectionText),l.preventDefault()},n.handlePasteEvent=function(l,p,i){l.stopPropagation(),l.clipboardData&&u(l.clipboardData.getData("text/plain"),p,i)},n.paste=u,n.moveTextAreaUnderMouseCursor=h,n.rightClickHandler=function(l,p,i,o,c){h(l,p,i),c&&!o.isClickInSelection(l)&&o.selectWordAtCursor(l),p.value=o.selectionText,p.select()}},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)});Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;var u=C(2),h=C(15),l=C(21),p=C(22),i=C(24),o=function(){function t(s){this.table=new Uint8Array(s)}return t.prototype.setDefault=function(s,e){h.fill(this.table,s<<4|e)},t.prototype.add=function(s,e,r,a){this.table[e<<8|s]=r<<4|a},t.prototype.addMany=function(s,e,r,a){for(var f=0;f<s.length;f++)this.table[e<<8|s[f]]=r<<4|a},t}();n.TransitionTable=o,n.VT500_TRANSITION_TABLE=function(){var t=new o(4095),s=Array.apply(null,Array(256)).map(function(w,S){return S}),e=function(w,S){return s.slice(w,S)},r=e(32,127),a=e(0,24);a.push(25),a.push.apply(a,e(28,32));var f,E=e(0,14);for(f in t.setDefault(1,0),t.addMany(r,0,2,0),E)t.addMany([24,26,153,154],f,3,0),t.addMany(e(128,144),f,3,0),t.addMany(e(144,152),f,3,0),t.add(156,f,0,0),t.add(27,f,11,1),t.add(157,f,4,8),t.addMany([152,158,159],f,0,7),t.add(155,f,11,3),t.add(144,f,11,9);return t.addMany(a,0,3,0),t.addMany(a,1,3,1),t.add(127,1,0,1),t.addMany(a,8,0,8),t.addMany(a,3,3,3),t.add(127,3,0,3),t.addMany(a,4,3,4),t.add(127,4,0,4),t.addMany(a,6,3,6),t.addMany(a,5,3,5),t.add(127,5,0,5),t.addMany(a,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(r,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(e(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(r,7,0,7),t.addMany(a,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(e(64,127),3,7,0),t.addMany(e(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(e(48,60),4,8,4),t.addMany(e(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(e(32,64),6,0,6),t.add(127,6,0,6),t.addMany(e(64,127),6,0,0),t.addMany(e(32,48),3,9,5),t.addMany(e(32,48),5,9,5),t.addMany(e(48,64),5,0,6),t.addMany(e(64,127),5,7,0),t.addMany(e(32,48),4,9,5),t.addMany(e(32,48),1,9,2),t.addMany(e(32,48),2,9,2),t.addMany(e(48,127),2,10,0),t.addMany(e(48,80),1,10,0),t.addMany(e(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(e(96,127),1,10,0),t.add(80,1,11,9),t.addMany(a,9,0,9),t.add(127,9,0,9),t.addMany(e(28,32),9,0,9),t.addMany(e(32,48),9,9,12),t.addMany(e(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(a,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(a,10,0,10),t.add(127,10,0,10),t.addMany(e(28,32),10,0,10),t.addMany(e(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(e(32,48),10,9,12),t.addMany(a,12,0,12),t.add(127,12,0,12),t.addMany(e(28,32),12,0,12),t.addMany(e(32,48),12,9,12),t.addMany(e(48,64),12,0,11),t.addMany(e(64,127),12,12,13),t.addMany(e(64,127),10,12,13),t.addMany(e(64,127),9,12,13),t.addMany(a,13,13,13),t.addMany(r,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(160,0,2,0),t.add(160,8,5,8),t.add(160,6,0,6),t.add(160,11,0,11),t.add(160,13,13,13),t}();var c=function(t){function s(e){e===void 0&&(e=n.VT500_TRANSITION_TABLE);var r=t.call(this)||this;return r._transitions=e,r.initialState=0,r.currentState=r.initialState,r._params=new l.Params,r._params.addParam(0),r._collect=0,r.precedingCodepoint=0,r._printHandlerFb=function(a,f,E){},r._executeHandlerFb=function(a){},r._csiHandlerFb=function(a,f){},r._escHandlerFb=function(a){},r._errorHandlerFb=function(a){return a},r._printHandler=r._printHandlerFb,r._executeHandlers=Object.create(null),r._csiHandlers=Object.create(null),r._escHandlers=Object.create(null),r._oscParser=new p.OscParser,r._dcsParser=new i.DcsParser,r._errorHandler=r._errorHandlerFb,r.setEscHandler({final:"\\"},function(){}),r}return y(s,t),s.prototype._identifier=function(e,r){r===void 0&&(r=[64,126]);var a=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((a=e.prefix.charCodeAt(0))&&60>a||a>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var f=0;f<e.intermediates.length;++f){var E=e.intermediates.charCodeAt(f);if(32>E||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");a<<=8,a|=E}}if(e.final.length!==1)throw new Error("final must be a single byte");var w=e.final.charCodeAt(0);if(r[0]>w||w>r[1])throw new Error("final must be in range "+r[0]+" .. "+r[1]);return a<<=8,a|=w},s.prototype.identToString=function(e){for(var r=[];e;)r.push(String.fromCharCode(255&e)),e>>=8;return r.reverse().join("")},s.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},s.prototype.setPrintHandler=function(e){this._printHandler=e},s.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},s.prototype.addEscHandler=function(e,r){var a=this._identifier(e,[48,126]);this._escHandlers[a]===void 0&&(this._escHandlers[a]=[]);var f=this._escHandlers[a];return f.push(r),{dispose:function(){var E=f.indexOf(r);E!==-1&&f.splice(E,1)}}},s.prototype.setEscHandler=function(e,r){this._escHandlers[this._identifier(e,[48,126])]=[r]},s.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},s.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},s.prototype.setExecuteHandler=function(e,r){this._executeHandlers[e.charCodeAt(0)]=r},s.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},s.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},s.prototype.addCsiHandler=function(e,r){var a=this._identifier(e);this._csiHandlers[a]===void 0&&(this._csiHandlers[a]=[]);var f=this._csiHandlers[a];return f.push(r),{dispose:function(){var E=f.indexOf(r);E!==-1&&f.splice(E,1)}}},s.prototype.setCsiHandler=function(e,r){this._csiHandlers[this._identifier(e)]=[r]},s.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},s.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},s.prototype.addDcsHandler=function(e,r){return this._dcsParser.addHandler(this._identifier(e),r)},s.prototype.setDcsHandler=function(e,r){this._dcsParser.setHandler(this._identifier(e),r)},s.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},s.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},s.prototype.addOscHandler=function(e,r){return this._oscParser.addHandler(e,r)},s.prototype.setOscHandler=function(e,r){this._oscParser.setHandler(e,r)},s.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},s.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},s.prototype.setErrorHandler=function(e){this._errorHandler=e},s.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},s.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},s.prototype.parse=function(e,r){for(var a=0,f=0,E=this.currentState,w=this._oscParser,S=this._dcsParser,v=this._collect,x=this._params,m=this._transitions.table,d=0;d<r;++d){switch((f=m[E<<8|((a=e[d])<160?a:160)])>>4){case 2:for(var g=d+1;;++g){if(g>=r||(a=e[g])<32||a>126&&a<160){this._printHandler(e,d,g),d=g-1;break}if(++g>=r||(a=e[g])<32||a>126&&a<160){this._printHandler(e,d,g),d=g-1;break}if(++g>=r||(a=e[g])<32||a>126&&a<160){this._printHandler(e,d,g),d=g-1;break}if(++g>=r||(a=e[g])<32||a>126&&a<160){this._printHandler(e,d,g),d=g-1;break}}break;case 3:this._executeHandlers[a]?this._executeHandlers[a]():this._executeHandlerFb(a),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:d,code:a,currentState:E,collect:v,params:x,abort:!1}).abort)return;break;case 7:for(var b=this._csiHandlers[v<<8|a],D=b?b.length-1:-1;D>=0&&b[D](x)===!1;D--);D<0&&this._csiHandlerFb(v<<8|a,x),this.precedingCodepoint=0;break;case 8:do switch(a){case 59:x.addParam(0);break;case 58:x.addSubParam(-1);break;default:x.addDigit(a-48)}while(++d<r&&(a=e[d])>47&&a<60);d--;break;case 9:v<<=8,v|=a;break;case 10:for(var L=this._escHandlers[v<<8|a],k=L?L.length-1:-1;k>=0&&L[k]()===!1;k--);k<0&&this._escHandlerFb(v<<8|a),this.precedingCodepoint=0;break;case 11:x.reset(),x.addParam(0),v=0;break;case 12:S.hook(v<<8|a,x);break;case 13:for(var I=d+1;;++I)if(I>=r||(a=e[I])===24||a===26||a===27||a>127&&a<160){S.put(e,d,I),d=I-1;break}break;case 14:S.unhook(a!==24&&a!==26),a===27&&(f|=1),x.reset(),x.addParam(0),v=0,this.precedingCodepoint=0;break;case 4:w.start();break;case 5:for(var N=d+1;;N++)if(N>=r||(a=e[N])<32||a>127&&a<=159){w.put(e,d,N),d=N-1;break}break;case 6:w.end(a!==24&&a!==26),a===27&&(f|=1),x.reset(),x.addParam(0),v=0,this.precedingCodepoint=0}E=15&f}this._collect=v,this.currentState=E},s}(u.Disposable);n.EscapeSequenceParser=c},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(w,S){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var m in x)x.hasOwnProperty(m)&&(v[m]=x[m])})(w,S)},function(w,S){function v(){this.constructor=w}_(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),u=this&&this.__decorate||function(w,S,v,x){var m,d=arguments.length,g=d<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(m=w[b])&&(g=(d<3?m(g):d>3?m(S,v,g):m(S,v))||g);return d>3&&g&&Object.defineProperty(S,v,g),g},h=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Renderer=void 0;var l=C(41),p=C(47),i=C(48),o=C(49),c=C(29),t=C(2),s=C(5),e=C(1),r=C(25),a=C(0),f=1,E=function(w){function S(v,x,m,d,g,b,D,L,k){var I=w.call(this)||this;I._colors=v,I._screenElement=x,I._bufferService=g,I._charSizeService=b,I._optionsService=D,I._id=f++,I._onRequestRedraw=new a.EventEmitter;var N=I._optionsService.options.allowTransparency;return I._characterJoinerRegistry=new c.CharacterJoinerRegistry(I._bufferService),I._renderLayers=[new l.TextRenderLayer(I._screenElement,0,I._colors,I._characterJoinerRegistry,N,I._id,I._bufferService,D),new p.SelectionRenderLayer(I._screenElement,1,I._colors,I._id,I._bufferService,D),new o.LinkRenderLayer(I._screenElement,2,I._colors,I._id,m,d,I._bufferService,D),new i.CursorRenderLayer(I._screenElement,3,I._colors,I._id,I._onRequestRedraw,I._bufferService,D,L,k)],I.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},I._devicePixelRatio=window.devicePixelRatio,I._updateDimensions(),I.onOptionsChanged(),I}return y(S,w),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){for(var v=0,x=this._renderLayers;v<x.length;v++)x[v].dispose();w.prototype.dispose.call(this),r.removeTerminalFromCache(this._id)},S.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},S.prototype.setColors=function(v){this._colors=v;for(var x=0,m=this._renderLayers;x<m.length;x++){var d=m[x];d.setColors(this._colors),d.reset()}},S.prototype.onResize=function(v,x){this._updateDimensions();for(var m=0,d=this._renderLayers;m<d.length;m++)d[m].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},S.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},S.prototype.onBlur=function(){this._runOperation(function(v){return v.onBlur()})},S.prototype.onFocus=function(){this._runOperation(function(v){return v.onFocus()})},S.prototype.onSelectionChanged=function(v,x,m){m===void 0&&(m=!1),this._runOperation(function(d){return d.onSelectionChanged(v,x,m)})},S.prototype.onCursorMove=function(){this._runOperation(function(v){return v.onCursorMove()})},S.prototype.onOptionsChanged=function(){this._runOperation(function(v){return v.onOptionsChanged()})},S.prototype.clear=function(){this._runOperation(function(v){return v.reset()})},S.prototype._runOperation=function(v){for(var x=0,m=this._renderLayers;x<m.length;x++)v(m[x])},S.prototype.renderRows=function(v,x){for(var m=0,d=this._renderLayers;m<d.length;m++)d[m].onGridChanged(v,x)},S.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)},S.prototype.registerCharacterJoiner=function(v){return this._characterJoinerRegistry.registerCharacterJoiner(v)},S.prototype.deregisterCharacterJoiner=function(v){return this._characterJoinerRegistry.deregisterCharacterJoiner(v)},S=u([h(4,e.IBufferService),h(5,s.ICharSizeService),h(6,e.IOptionsService),h(7,e.ICoreService),h(8,s.ICoreBrowserService)],S)}(t.Disposable);n.Renderer=E},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)});Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;var u=C(42),h=C(13),l=C(6),p=C(3),i=C(29),o=C(4),c=function(t){function s(e,r,a,f,E,w,S,v){var x=t.call(this,e,"text",r,E,a,w,S,v)||this;return x._characterWidth=0,x._characterFont="",x._characterOverlapCache={},x._workCell=new o.CellData,x._state=new u.GridCache,x._characterJoinerRegistry=f,x}return y(s,t),s.prototype.resize=function(e){t.prototype.resize.call(this,e);var r=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===r||(this._characterWidth=e.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},s.prototype.reset=function(){this._state.clear(),this._clearAll()},s.prototype._forEachCell=function(e,r,a,f){for(var E=e;E<=r;E++)for(var w=E+this._bufferService.buffer.ydisp,S=this._bufferService.buffer.lines.get(w),v=a?a.getJoinedCharacters(w):[],x=0;x<this._bufferService.cols;x++){S.loadCell(x,this._workCell);var m=this._workCell,d=!1,g=x;if(m.getWidth()!==0){if(v.length>0&&x===v[0][0]){d=!0;var b=v.shift();m=new i.JoinedCellData(this._workCell,S.translateToString(!0,b[0],b[1]),b[1]-b[0]),g=b[1]-1}!d&&this._isOverlapping(m)&&g<S.length-1&&S.getCodePoint(g+1)===p.NULL_CELL_CODE&&(m.content&=-12582913,m.content|=2<<22),f(m,x,E),x=g}}},s.prototype._drawBackground=function(e,r){var a=this,f=this._ctx,E=this._bufferService.cols,w=0,S=0,v=null;f.save(),this._forEachCell(e,r,null,function(x,m,d){var g=null;x.isInverse()?g=x.isFgDefault()?a._colors.foreground.css:x.isFgRGB()?"rgb("+l.AttributeData.toColorRGB(x.getFgColor()).join(",")+")":a._colors.ansi[x.getFgColor()].css:x.isBgRGB()?g="rgb("+l.AttributeData.toColorRGB(x.getBgColor()).join(",")+")":x.isBgPalette()&&(g=a._colors.ansi[x.getBgColor()].css),v===null&&(w=m,S=d),d!==S?(f.fillStyle=v||"",a._fillCells(w,S,E-w,1),w=m,S=d):v!==g&&(f.fillStyle=v||"",a._fillCells(w,S,m-w,1),w=m,S=d),v=g}),v!==null&&(f.fillStyle=v,this._fillCells(w,S,E-w,1)),f.restore()},s.prototype._drawForeground=function(e,r){var a=this;this._forEachCell(e,r,this._characterJoinerRegistry,function(f,E,w){if(!f.isInvisible()&&(a._drawChars(f,E,w),f.isUnderline())){if(a._ctx.save(),f.isInverse())if(f.isBgDefault())a._ctx.fillStyle=a._colors.background.css;else if(f.isBgRGB())a._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(f.getBgColor()).join(",")+")";else{var S=f.getBgColor();a._optionsService.options.drawBoldTextInBrightColors&&f.isBold()&&S<8&&(S+=8),a._ctx.fillStyle=a._colors.ansi[S].css}else if(f.isFgDefault())a._ctx.fillStyle=a._colors.foreground.css;else if(f.isFgRGB())a._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(f.getFgColor()).join(",")+")";else{var v=f.getFgColor();a._optionsService.options.drawBoldTextInBrightColors&&f.isBold()&&v<8&&(v+=8),a._ctx.fillStyle=a._colors.ansi[v].css}a._fillBottomLineAtCells(E,w,f.getWidth()),a._ctx.restore()}})},s.prototype.onGridChanged=function(e,r){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,r-e+1),this._drawBackground(e,r),this._drawForeground(e,r))},s.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},s.prototype._isOverlapping=function(e){if(e.getWidth()!==1||e.getCode()<256)return!1;var r=e.getChars();if(this._characterOverlapCache.hasOwnProperty(r))return this._characterOverlapCache[r];this._ctx.save(),this._ctx.font=this._characterFont;var a=Math.floor(this._ctx.measureText(r).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[r]=a,a},s}(h.BaseRenderLayer);n.TextRenderLayer=c},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0;var _=function(){function y(){this.cache=[]}return y.prototype.resize=function(u,h){for(var l=0;l<u;l++){this.cache.length<=l&&this.cache.push([]);for(var p=this.cache[l].length;p<h;p++)this.cache[l].push(void 0);this.cache[l].length=h}this.cache.length=u},y.prototype.clear=function(){for(var u=0;u<this.cache.length;u++)for(var h=0;h<this.cache[u].length;h++)this.cache[u][h]=void 0},y}();n.GridCache=_},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(a,f){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,w){E.__proto__=w}||function(E,w){for(var S in w)w.hasOwnProperty(S)&&(E[S]=w[S])})(a,f)},function(a,f){function E(){this.constructor=a}_(a,f),a.prototype=f===null?Object.create(f):(E.prototype=f.prototype,new E)});Object.defineProperty(n,"__esModule",{value:!0}),n.NoneCharAtlas=n.DynamicCharAtlas=n.getGlyphCacheKey=void 0;var u=C(9),h=C(44),l=C(27),p=C(46),i=C(11),o=C(28),c=C(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function s(a){return a.code<<21|a.bg<<12|a.fg<<3|(a.bold?0:4)+(a.dim?0:2)+(a.italic?0:1)}n.getGlyphCacheKey=s;var e=function(a){function f(E,w){var S=a.call(this)||this;S._config=w,S._drawToCacheCount=0,S._glyphsWaitingOnBitmap=[],S._bitmapCommitTimeout=null,S._bitmap=null,S._cacheCanvas=E.createElement("canvas"),S._cacheCanvas.width=1024,S._cacheCanvas.height=1024,S._cacheCtx=o.throwIfFalsy(S._cacheCanvas.getContext("2d",{alpha:!0}));var v=E.createElement("canvas");v.width=S._config.scaledCharWidth,v.height=S._config.scaledCharHeight,S._tmpCtx=o.throwIfFalsy(v.getContext("2d",{alpha:S._config.allowTransparency})),S._width=Math.floor(1024/S._config.scaledCharWidth),S._height=Math.floor(1024/S._config.scaledCharHeight);var x=S._width*S._height;return S._cacheMap=new p.LRUMap(x),S._cacheMap.prealloc(x),S}return y(f,a),f.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},f.prototype.beginFrame=function(){this._drawToCacheCount=0},f.prototype.draw=function(E,w,S,v){if(w.code===32)return!0;if(!this._canCache(w))return!1;var x=s(w),m=this._cacheMap.get(x);if(m!=null)return this._drawFromCache(E,m,S,v),!0;if(this._drawToCacheCount<100){var d=void 0;d=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var g=this._drawToCache(w,d);return this._cacheMap.set(x,g),this._drawFromCache(E,g,S,v),!0}return!1},f.prototype._canCache=function(E){return E.code<256},f.prototype._toCoordinateX=function(E){return E%this._width*this._config.scaledCharWidth},f.prototype._toCoordinateY=function(E){return Math.floor(E/this._width)*this._config.scaledCharHeight},f.prototype._drawFromCache=function(E,w,S,v){if(!w.isEmpty){var x=this._toCoordinateX(w.index),m=this._toCoordinateY(w.index);E.drawImage(w.inBitmap?this._bitmap:this._cacheCanvas,x,m,this._config.scaledCharWidth,this._config.scaledCharHeight,S,v,this._config.scaledCharWidth,this._config.scaledCharHeight)}},f.prototype._getColorFromAnsiIndex=function(E){return E<this._config.colors.ansi.length?this._config.colors.ansi[E]:l.DEFAULT_ANSI_COLORS[E]},f.prototype._getBackgroundColor=function(E){return this._config.allowTransparency?t:E.bg===u.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:E.bg<256?this._getColorFromAnsiIndex(E.bg):this._config.colors.background},f.prototype._getForegroundColor=function(E){return E.fg===u.INVERTED_DEFAULT_COLOR?c.color.opaque(this._config.colors.background):E.fg<256?this._getColorFromAnsiIndex(E.fg):this._config.colors.foreground},f.prototype._drawToCache=function(E,w){this._drawToCacheCount++,this._tmpCtx.save();var S=this._getBackgroundColor(E);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=S.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var v=E.bold?this._config.fontWeightBold:this._config.fontWeight,x=E.italic?"italic":"";this._tmpCtx.font=x+" "+v+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(E).css,E.dim&&(this._tmpCtx.globalAlpha=u.DIM_OPACITY),this._tmpCtx.fillText(E.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var m=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),d=!1;this._config.allowTransparency||(d=function(L,k){for(var I=!0,N=k.rgba>>>24,M=k.rgba>>>16&255,U=k.rgba>>>8&255,A=0;A<L.data.length;A+=4)L.data[A]===N&&L.data[A+1]===M&&L.data[A+2]===U?L.data[A+3]=0:I=!1;return I}(m,S));var g=this._toCoordinateX(w),b=this._toCoordinateY(w);this._cacheCtx.putImageData(m,g,b);var D={index:w,isEmpty:d,inBitmap:!1};return this._addGlyphToBitmap(D),D},f.prototype._addGlyphToBitmap=function(E){var w=this;!("createImageBitmap"in window)||i.isFirefox||i.isSafari||(this._glyphsWaitingOnBitmap.push(E),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return w._generateBitmap()},100)))},f.prototype._generateBitmap=function(){var E=this,w=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(S){E._bitmap=S;for(var v=0;v<w.length;v++)w[v].inBitmap=!0}),this._bitmapCommitTimeout=null},f}(h.BaseCharAtlas);n.DynamicCharAtlas=e;var r=function(a){function f(E,w){return a.call(this)||this}return y(f,a),f.prototype.draw=function(E,w,S,v){return!1},f}(h.BaseCharAtlas);n.NoneCharAtlas=r},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BaseCharAtlas=void 0;var _=function(){function y(){this._didWarmUp=!1}return y.prototype.dispose=function(){},y.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},y.prototype._doWarmUp=function(){},y.prototype.beginFrame=function(){},y}();n.BaseCharAtlas=_},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;var _=function(){function y(){this._color={},this._rgba={}}return y.prototype.clear=function(){this._color={},this._rgba={}},y.prototype.setCss=function(u,h,l){this._rgba[u]||(this._rgba[u]={}),this._rgba[u][h]=l},y.prototype.getCss=function(u,h){return this._rgba[u]?this._rgba[u][h]:void 0},y.prototype.setColor=function(u,h,l){this._color[u]||(this._color[u]={}),this._color[u][h]=l},y.prototype.getColor=function(u,h){return this._color[u]?this._color[u][h]:void 0},y}();n.ColorContrastCache=_},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LRUMap=void 0;var _=function(){function y(u){this.capacity=u,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return y.prototype._unlinkNode=function(u){var h=u.prev,l=u.next;u===this._head&&(this._head=l),u===this._tail&&(this._tail=h),h!==null&&(h.next=l),l!==null&&(l.prev=h)},y.prototype._appendNode=function(u){var h=this._tail;h!==null&&(h.next=u),u.prev=h,u.next=null,this._tail=u,this._head===null&&(this._head=u)},y.prototype.prealloc=function(u){for(var h=this._nodePool,l=0;l<u;l++)h.push({prev:null,next:null,key:null,value:null})},y.prototype.get=function(u){var h=this._map[u];return h!==void 0?(this._unlinkNode(h),this._appendNode(h),h.value):null},y.prototype.peekValue=function(u){var h=this._map[u];return h!==void 0?h.value:null},y.prototype.peek=function(){var u=this._head;return u===null?null:u.value},y.prototype.set=function(u,h){var l=this._map[u];if(l!==void 0)l=this._map[u],this._unlinkNode(l),l.value=h;else if(this.size>=this.capacity)l=this._head,this._unlinkNode(l),delete this._map[l.key],l.key=u,l.value=h,this._map[u]=l;else{var p=this._nodePool;p.length>0?((l=p.pop()).key=u,l.value=h):l={prev:null,next:null,key:u,value:h},this._map[u]=l,this.size++}this._appendNode(l)},y}();n.LRUMap=_},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(h,l){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,i){p.__proto__=i}||function(p,i){for(var o in i)i.hasOwnProperty(o)&&(p[o]=i[o])})(h,l)},function(h,l){function p(){this.constructor=h}_(h,l),h.prototype=l===null?Object.create(l):(p.prototype=l.prototype,new p)});Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;var u=function(h){function l(p,i,o,c,t,s){var e=h.call(this,p,"selection",i,!0,o,c,t,s)||this;return e._clearState(),e}return y(l,h),l.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},l.prototype.resize=function(p){h.prototype.resize.call(this,p),this._clearState()},l.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},l.prototype.onSelectionChanged=function(p,i,o){if(this._didStateChange(p,i,o,this._bufferService.buffer.ydisp))if(this._clearAll(),p&&i){var c=p[1]-this._bufferService.buffer.ydisp,t=i[1]-this._bufferService.buffer.ydisp,s=Math.max(c,0),e=Math.min(t,this._bufferService.rows-1);if(!(s>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,o){var r=p[0],a=i[0]-r,f=e-s+1;this._fillCells(r,s,a,f)}else{r=c===s?p[0]:0;var E=s===e?i[0]:this._bufferService.cols;this._fillCells(r,s,E-r,1);var w=Math.max(e-s-1,0);if(this._fillCells(0,s+1,this._bufferService.cols,w),s!==e){var S=t===e?i[0]:this._bufferService.cols;this._fillCells(0,e,S,1)}}this._state.start=[p[0],p[1]],this._state.end=[i[0],i[1]],this._state.columnSelectMode=o,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},l.prototype._didStateChange=function(p,i,o,c){return!this._areCoordinatesEqual(p,this._state.start)||!this._areCoordinatesEqual(i,this._state.end)||o!==this._state.columnSelectMode||c!==this._state.ydisp},l.prototype._areCoordinatesEqual=function(p,i){return!(!p||!i)&&p[0]===i[0]&&p[1]===i[1]},l}(C(13).BaseRenderLayer);n.SelectionRenderLayer=u},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(i,o){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,t){c.__proto__=t}||function(c,t){for(var s in t)t.hasOwnProperty(s)&&(c[s]=t[s])})(i,o)},function(i,o){function c(){this.constructor=i}_(i,o),i.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)});Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;var u=C(13),h=C(4),l=function(i){function o(c,t,s,e,r,a,f,E,w){var S=i.call(this,c,"cursor",t,!0,s,e,a,f)||this;return S._onRequestRedraw=r,S._coreService=E,S._coreBrowserService=w,S._cell=new h.CellData,S._state={x:0,y:0,isFocused:!1,style:"",width:0},S._cursorRenderers={bar:S._renderBarCursor.bind(S),block:S._renderBlockCursor.bind(S),underline:S._renderUnderlineCursor.bind(S)},S}return y(o,i),o.prototype.resize=function(c){i.prototype.resize.call(this,c),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},o.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},o.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},o.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},o.prototype.onOptionsChanged=function(){var c,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new p(this._coreBrowserService.isFocused,function(){t._render(!0)})):((c=this._cursorBlinkStateManager)===null||c===void 0||c.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},o.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},o.prototype.onGridChanged=function(c,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},o.prototype._render=function(c){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,s=t-this._bufferService.buffer.ydisp;if(s<0||s>=this._bufferService.rows)this._clearCursor();else{var e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(e,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var r=this._optionsService.options.cursorStyle;return r&&r!=="block"?this._cursorRenderers[r](e,s,this._cell):this._renderBlurCursor(e,s,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=s,this._state.isFocused=!1,this._state.style=r,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===s&&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"](e,s,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=s,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},o.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},o.prototype._renderBarCursor=function(c,t,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(c,t,this._optionsService.options.cursorWidth),this._ctx.restore()},o.prototype._renderBlockCursor=function(c,t,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(c,t,s.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(s,c,t),this._ctx.restore()},o.prototype._renderUnderlineCursor=function(c,t,s){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(c,t),this._ctx.restore()},o.prototype._renderBlurCursor=function(c,t,s){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(c,t,s.getWidth(),1),this._ctx.restore()},o}(u.BaseRenderLayer);n.CursorRenderLayer=l;var p=function(){function i(o,c){this._renderCallback=c,this.isCursorVisible=!0,o&&this._restartInterval()}return Object.defineProperty(i.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),i.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)},i.prototype.restartBlinkAnimation=function(){var o=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){o._renderCallback(),o._animationFrame=void 0})))},i.prototype._restartInterval=function(o){var c=this;o===void 0&&(o=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(c._animationTimeRestarted){var t=600-(Date.now()-c._animationTimeRestarted);if(c._animationTimeRestarted=void 0,t>0)return void c._restartInterval(t)}c.isCursorVisible=!1,c._animationFrame=window.requestAnimationFrame(function(){c._renderCallback(),c._animationFrame=void 0}),c._blinkInterval=window.setInterval(function(){if(c._animationTimeRestarted){var s=600-(Date.now()-c._animationTimeRestarted);return c._animationTimeRestarted=void 0,void c._restartInterval(s)}c.isCursorVisible=!c.isCursorVisible,c._animationFrame=window.requestAnimationFrame(function(){c._renderCallback(),c._animationFrame=void 0})},600)},o)},i.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)},i.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},i}()},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(i,o){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,t){c.__proto__=t}||function(c,t){for(var s in t)t.hasOwnProperty(s)&&(c[s]=t[s])})(i,o)},function(i,o){function c(){this.constructor=i}_(i,o),i.prototype=o===null?Object.create(o):(c.prototype=o.prototype,new c)});Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;var u=C(13),h=C(9),l=C(26),p=function(i){function o(c,t,s,e,r,a,f,E){var w=i.call(this,c,"link",t,!0,s,e,f,E)||this;return r.onShowLinkUnderline(function(S){return w._onShowLinkUnderline(S)}),r.onHideLinkUnderline(function(S){return w._onHideLinkUnderline(S)}),a.onShowLinkUnderline(function(S){return w._onShowLinkUnderline(S)}),a.onHideLinkUnderline(function(S){return w._onHideLinkUnderline(S)}),w}return y(o,i),o.prototype.resize=function(c){i.prototype.resize.call(this,c),this._state=void 0},o.prototype.reset=function(){this._clearCurrentLink()},o.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var c=this._state.y2-this._state.y1-1;c>0&&this._clearCells(0,this._state.y1+1,this._state.cols,c),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},o.prototype._onShowLinkUnderline=function(c){if(c.fg===h.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:c.fg&&l.is256Color(c.fg)?this._ctx.fillStyle=this._colors.ansi[c.fg].css:this._ctx.fillStyle=this._colors.foreground.css,c.y1===c.y2)this._fillBottomLineAtCells(c.x1,c.y1,c.x2-c.x1);else{this._fillBottomLineAtCells(c.x1,c.y1,c.cols-c.x1);for(var t=c.y1+1;t<c.y2;t++)this._fillBottomLineAtCells(0,t,c.cols);this._fillBottomLineAtCells(0,c.y2,c.x2)}this._state=c},o.prototype._onHideLinkUnderline=function(c){this._clearCurrentLink()},o}(u.BaseRenderLayer);n.LinkRenderLayer=p},function(H,n,C){"use strict";var _=this&&this.__decorate||function(i,o,c,t){var s,e=arguments.length,r=e<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,c):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,o,c,t);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(e<3?s(r):e>3?s(o,c,r):s(o,c))||r);return e>3&&r&&Object.defineProperty(o,c,r),r},y=this&&this.__param||function(i,o){return function(c,t){o(c,t,i)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseZone=n.Linkifier=void 0;var u=C(0),h=C(1),l=function(){function i(o,c,t){this._bufferService=o,this._logService=c,this._unicodeService=t,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new u.EventEmitter,this._onHideLinkUnderline=new u.EventEmitter,this._onLinkTooltip=new u.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(i.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),i.prototype.attachToDom=function(o,c){this._element=o,this._mouseZoneManager=c},i.prototype.linkifyRows=function(o,c){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=o,this._rowsToLinkify.end=c):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,o),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,c)),this._mouseZoneManager.clearAll(o,c),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},i._timeBeforeLatency))},i.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var o=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var c=o.ydisp+this._rowsToLinkify.start;if(!(c>=o.lines.length)){for(var t=o.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,s=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,c,t,s,s);e.hasNext();)for(var r=e.next(),a=0;a<this._linkMatchers.length;a++)this._doLinkifyRow(r.range.first,r.content,this._linkMatchers[a]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},i.prototype.registerLinkMatcher=function(o,c,t){if(t===void 0&&(t={}),!c)throw new Error("handler must be defined");var s={id:this._nextLinkMatcherId++,regex:o,handler:c,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(s),s.id},i.prototype._addLinkMatcherToList=function(o){if(this._linkMatchers.length!==0){for(var c=this._linkMatchers.length-1;c>=0;c--)if(o.priority<=this._linkMatchers[c].priority)return void this._linkMatchers.splice(c+1,0,o);this._linkMatchers.splice(0,0,o)}else this._linkMatchers.push(o)},i.prototype.deregisterLinkMatcher=function(o){for(var c=0;c<this._linkMatchers.length;c++)if(this._linkMatchers[c].id===o)return this._linkMatchers.splice(c,1),!0;return!1},i.prototype._doLinkifyRow=function(o,c,t){for(var s,e=this,r=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),a=-1,f=function(){var w=s[typeof t.matchIndex!="number"?0:t.matchIndex];if(!w)return E._logService.debug("match found without corresponding matchIndex",s,t),"break";if(a=c.indexOf(w,a+1),r.lastIndex=a+w.length,a<0)return"break";var S=E._bufferService.buffer.stringIndexToBufferIndex(o,a);if(S[0]<0)return"break";var v=E._bufferService.buffer.lines.get(S[0]);if(!v)return"break";var x=v.getFg(S[1]),m=x?x>>9&511:void 0;t.validationCallback?t.validationCallback(w,function(d){e._rowsTimeoutId||d&&e._addLink(S[1],S[0]-e._bufferService.buffer.ydisp,w,t,m)}):E._addLink(S[1],S[0]-E._bufferService.buffer.ydisp,w,t,m)},E=this;(s=r.exec(c))!==null&&f()!=="break";);},i.prototype._addLink=function(o,c,t,s,e){var r=this;if(this._mouseZoneManager&&this._element){var a=this._unicodeService.getStringCellWidth(t),f=o%this._bufferService.cols,E=c+Math.floor(o/this._bufferService.cols),w=(f+a)%this._bufferService.cols,S=E+Math.floor((f+a)/this._bufferService.cols);w===0&&(w=this._bufferService.cols,S--),this._mouseZoneManager.add(new p(f+1,E+1,w+1,S+1,function(v){if(s.handler)return s.handler(v,t);var x=window.open();x?(x.opener=null,x.location.href=t):console.warn("Opening link blocked as opener could not be cleared")},function(){r._onShowLinkUnderline.fire(r._createLinkHoverEvent(f,E,w,S,e)),r._element.classList.add("xterm-cursor-pointer")},function(v){r._onLinkTooltip.fire(r._createLinkHoverEvent(f,E,w,S,e)),s.hoverTooltipCallback&&s.hoverTooltipCallback(v,t,{start:{x:f,y:E},end:{x:w,y:S}})},function(){r._onHideLinkUnderline.fire(r._createLinkHoverEvent(f,E,w,S,e)),r._element.classList.remove("xterm-cursor-pointer"),s.hoverLeaveCallback&&s.hoverLeaveCallback()},function(v){return!s.willLinkActivate||s.willLinkActivate(v,t)}))}},i.prototype._createLinkHoverEvent=function(o,c,t,s,e){return{x1:o,y1:c,x2:t,y2:s,cols:this._bufferService.cols,fg:e}},i._timeBeforeLatency=200,i=_([y(0,h.IBufferService),y(1,h.ILogService),y(2,h.IUnicodeService)],i)}();n.Linkifier=l;var p=function(i,o,c,t,s,e,r,a,f){this.x1=i,this.y1=o,this.x2=c,this.y2=t,this.clickCallback=s,this.hoverCallback=e,this.tooltipCallback=r,this.leaveCallback=a,this.willLinkActivate=f};n.MouseZone=p},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(w,S){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,x){v.__proto__=x}||function(v,x){for(var m in x)x.hasOwnProperty(m)&&(v[m]=x[m])})(w,S)},function(w,S){function v(){this.constructor=w}_(w,S),w.prototype=S===null?Object.create(S):(v.prototype=S.prototype,new v)}),u=this&&this.__decorate||function(w,S,v,x){var m,d=arguments.length,g=d<3?S:x===null?x=Object.getOwnPropertyDescriptor(S,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,S,v,x);else for(var b=w.length-1;b>=0;b--)(m=w[b])&&(g=(d<3?m(g):d>3?m(S,v,g):m(S,v))||g);return d>3&&g&&Object.defineProperty(S,v,g),g},h=this&&this.__param||function(w,S){return function(v,x){S(v,x,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;var l=C(11),p=C(52),i=C(4),o=C(0),c=C(5),t=C(1),s=C(30),e=C(53),r=C(2),a="\xA0",f=new RegExp(a,"g"),E=function(w){function S(v,x,m,d,g,b,D){var L=w.call(this)||this;return L._element=v,L._screenElement=x,L._bufferService=m,L._coreService=d,L._mouseService=g,L._optionsService=b,L._renderService=D,L._dragScrollAmount=0,L._enabled=!0,L._workCell=new i.CellData,L._mouseDownTimeStamp=0,L._onLinuxMouseSelection=L.register(new o.EventEmitter),L._onRedrawRequest=L.register(new o.EventEmitter),L._onSelectionChange=L.register(new o.EventEmitter),L._onRequestScrollLines=L.register(new o.EventEmitter),L._mouseMoveListener=function(k){return L._onMouseMove(k)},L._mouseUpListener=function(k){return L._onMouseUp(k)},L._coreService.onUserInput(function(){L.hasSelection&&L.clearSelection()}),L._trimListener=L._bufferService.buffer.lines.onTrim(function(k){return L._onTrim(k)}),L.register(L._bufferService.buffers.onBufferActivate(function(k){return L._onBufferActivate(k)})),L.enable(),L._model=new p.SelectionModel(L._bufferService),L._activeSelectionMode=0,L}return y(S,w),Object.defineProperty(S.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){this._removeMouseDownListeners()},S.prototype.reset=function(){this.clearSelection()},S.prototype.disable=function(){this.clearSelection(),this._enabled=!1},S.prototype.enable=function(){this._enabled=!0},Object.defineProperty(S.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"hasSelection",{get:function(){var v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!v||!x)&&(v[0]!==x[0]||v[1]!==x[1])},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"selectionText",{get:function(){var v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!v||!x)return"";var m=this._bufferService.buffer,d=[];if(this._activeSelectionMode===3){if(v[0]===x[0])return"";for(var g=v[1];g<=x[1];g++){var b=m.translateBufferLineToString(g,!0,v[0],x[0]);d.push(b)}}else{var D=v[1]===x[1]?x[0]:void 0;for(d.push(m.translateBufferLineToString(v[1],!0,v[0],D)),g=v[1]+1;g<=x[1]-1;g++){var L=m.lines.get(g);b=m.translateBufferLineToString(g,!0),L&&L.isWrapped?d[d.length-1]+=b:d.push(b)}v[1]!==x[1]&&(L=m.lines.get(x[1]),b=m.translateBufferLineToString(x[1],!0,0,x[0]),L&&L.isWrapped?d[d.length-1]+=b:d.push(b))}return d.map(function(k){return k.replace(f," ")}).join(l.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),S.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},S.prototype.refresh=function(v){var x=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return x._refresh()})),l.isLinux&&v&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},S.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},S.prototype.isClickInSelection=function(v){var x=this._getMouseBufferCoords(v),m=this._model.finalSelectionStart,d=this._model.finalSelectionEnd;return!!(m&&d&&x)&&this._areCoordsInSelection(x,m,d)},S.prototype._areCoordsInSelection=function(v,x,m){return v[1]>x[1]&&v[1]<m[1]||x[1]===m[1]&&v[1]===x[1]&&v[0]>=x[0]&&v[0]<m[0]||x[1]<m[1]&&v[1]===m[1]&&v[0]<m[0]||x[1]<m[1]&&v[1]===x[1]&&v[0]>=x[0]},S.prototype.selectWordAtCursor=function(v){var x=this._getMouseBufferCoords(v);x&&(this._selectWordAt(x,!1),this._model.selectionEnd=void 0,this.refresh(!0))},S.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},S.prototype.selectLines=function(v,x){this._model.clearSelection(),v=Math.max(v,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()},S.prototype._onTrim=function(v){this._model.onTrim(v)&&this.refresh()},S.prototype._getMouseBufferCoords=function(v){var x=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x},S.prototype._getMouseEventScrollAmount=function(v){var x=s.getCoordsRelativeToElement(v,this._screenElement)[1],m=this._renderService.dimensions.canvasHeight;return x>=0&&x<=m?0:(x>m&&(x-=m),x=Math.min(Math.max(x,-50),50),(x/=50)/Math.abs(x)+Math.round(14*x))},S.prototype.shouldForceSelection=function(v){return l.isMac?v.altKey&&this._optionsService.options.macOptionClickForcesSelection:v.shiftKey},S.prototype.onMouseDown=function(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._onIncrementalClick(v):v.detail===1?this._onSingleClick(v):v.detail===2?this._onDoubleClick(v):v.detail===3&&this._onTripleClick(v),this._addMouseDownListeners(),this.refresh(!0)}},S.prototype._addMouseDownListeners=function(){var v=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return v._dragScroll()},50)},S.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},S.prototype._onIncrementalClick=function(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))},S.prototype._onSingleClick=function(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),this._model.selectionStart){this._model.selectionEnd=void 0;var x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},S.prototype._onDoubleClick=function(v){var x=this._getMouseBufferCoords(v);x&&(this._activeSelectionMode=1,this._selectWordAt(x,!0))},S.prototype._onTripleClick=function(v){var x=this._getMouseBufferCoords(v);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))},S.prototype.shouldColumnSelect=function(v){return v.altKey&&!(l.isMac&&this._optionsService.options.macOptionClickForcesSelection)},S.prototype._onMouseMove=function(v){if(v.stopImmediatePropagation(),this._model.selectionStart){var x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),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(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var m=this._bufferService.buffer;if(this._model.selectionEnd[1]<m.lines.length){var d=m.lines.get(this._model.selectionEnd[1]);d&&d.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},S.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}},S.prototype._onMouseUp=function(v){var x=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&v.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var m=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(m&&m[0]!==void 0&&m[1]!==void 0){var d=e.moveToCellSequence(m[0]-1,m[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(d,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},S.prototype._onBufferActivate=function(v){var x=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim(function(m){return x._onTrim(m)})},S.prototype._convertViewportColToCharacterIndex=function(v,x){for(var m=x[0],d=0;x[0]>=d;d++){var g=v.loadCell(d,this._workCell).getChars().length;this._workCell.getWidth()===0?m--:g>1&&x[0]!==d&&(m+=g-1)}return m},S.prototype.setSelection=function(v,x,m){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,x],this._model.selectionStartLength=m,this.refresh()},S.prototype._getWordAt=function(v,x,m,d){if(m===void 0&&(m=!0),d===void 0&&(d=!0),!(v[0]>=this._bufferService.cols)){var g=this._bufferService.buffer,b=g.lines.get(v[1]);if(b){var D=g.translateBufferLineToString(v[1],!1),L=this._convertViewportColToCharacterIndex(b,v),k=L,I=v[0]-L,N=0,M=0,U=0,A=0;if(D.charAt(L)===" "){for(;L>0&&D.charAt(L-1)===" ";)L--;for(;k<D.length&&D.charAt(k+1)===" ";)k++}else{var O=v[0],R=v[0];b.getWidth(O)===0&&(N++,O--),b.getWidth(R)===2&&(M++,R++);var P=b.getString(R).length;for(P>1&&(A+=P-1,k+=P-1);O>0&&L>0&&!this._isCharWordSeparator(b.loadCell(O-1,this._workCell));){b.loadCell(O-1,this._workCell);var T=this._workCell.getChars().length;this._workCell.getWidth()===0?(N++,O--):T>1&&(U+=T-1,L-=T-1),L--,O--}for(;R<b.length&&k+1<D.length&&!this._isCharWordSeparator(b.loadCell(R+1,this._workCell));){b.loadCell(R+1,this._workCell);var B=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,R++):B>1&&(A+=B-1,k+=B-1),k++,R++}}k++;var j=L+I-N+U,z=Math.min(this._bufferService.cols,k-L+N+M-U-A);if(x||D.slice(L,k).trim()!==""){if(m&&j===0&&b.getCodePoint(0)!==32){var Z=g.lines.get(v[1]-1);if(Z&&b.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){var q=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(q){var F=this._bufferService.cols-q.start;j-=F,z+=F}}}if(d&&j+z===this._bufferService.cols&&b.getCodePoint(this._bufferService.cols-1)!==32){var W=g.lines.get(v[1]+1);if(W&&W.isWrapped&&W.getCodePoint(0)!==32){var $=this._getWordAt([0,v[1]+1],!1,!1,!0);$&&(z+=$.length)}}return{start:j,length:z}}}}},S.prototype._selectWordAt=function(v,x){var m=this._getWordAt(v,x);if(m){for(;m.start<0;)m.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[m.start,v[1]],this._model.selectionStartLength=m.length}},S.prototype._selectToWordAt=function(v){var x=this._getWordAt(v,!0);if(x){for(var m=v[1];x.start<0;)x.start+=this._bufferService.cols,m--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,m++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,m]}},S.prototype._isCharWordSeparator=function(v){return v.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(v.getChars())>=0},S.prototype._selectLineAt=function(v){var x=this._bufferService.buffer.getWrappedRangeForLine(v);this._model.selectionStart=[0,x.first],this._model.selectionEnd=[this._bufferService.cols,x.last],this._model.selectionStartLength=0},S=u([h(2,t.IBufferService),h(3,t.ICoreService),h(4,c.IMouseService),h(5,t.IOptionsService),h(6,c.IRenderService)],S)}(r.Disposable);n.SelectionService=E},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0;var _=function(){function y(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}return y.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(y.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(y.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,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}),y.prototype.areSelectionValuesReversed=function(){var u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])},y.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)},y}();n.SelectionModel=_},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;var _=C(12);function y(o,c,t,s){var e=o-u(t,o),r=c-u(t,c);return i(Math.abs(e-r)-function(a,f,E){for(var w=0,S=a-u(E,a),v=f-u(E,f),x=0;x<Math.abs(S-v);x++){var m=h(a,f)==="A"?-1:1,d=E.buffer.lines.get(S+m*x);d&&d.isWrapped&&w++}return w}(o,c,t),p(h(o,c),s))}function u(o,c){for(var t=0,s=o.buffer.lines.get(c),e=s&&s.isWrapped;e&&c>=0&&c<o.rows;)t++,e=(s=o.buffer.lines.get(--c))&&s.isWrapped;return t}function h(o,c){return o>c?"A":"B"}function l(o,c,t,s,e,r){for(var a=o,f=c,E="";a!==t||f!==s;)a+=e?1:-1,e&&a>r.cols-1?(E+=r.buffer.translateBufferLineToString(f,!1,o,a),a=0,o=0,f++):!e&&a<0&&(E+=r.buffer.translateBufferLineToString(f,!1,0,o+1),o=a=r.cols-1,f--);return E+r.buffer.translateBufferLineToString(f,!1,o,a)}function p(o,c){var t=c?"O":"[";return _.C0.ESC+t+o}function i(o,c){o=Math.floor(o);for(var t="",s=0;s<o;s++)t+=c;return t}n.moveToCellSequence=function(o,c,t,s){var e,r=t.buffer.x,a=t.buffer.y;if(!t.buffer.hasScrollback)return function(E,w,S,v,x,m){return y(w,v,x,m).length===0?"":i(l(E,w,E,w-u(x,w),!1,x).length,p("D",m))}(r,a,0,c,t,s)+y(a,c,t,s)+function(E,w,S,v,x,m){var d;d=y(w,v,x,m).length>0?v-u(x,v):w;var g=v,b=function(D,L,k,I,N,M){var U;return U=y(k,I,N,M).length>0?I-u(N,I):L,D<k&&U<=I||D>=k&&U<I?"C":"D"}(E,w,S,v,x,m);return i(l(E,d,S,g,b==="C",x).length,p(b,m))}(r,a,o,c,t,s);if(a===c)return e=r>o?"D":"C",i(Math.abs(r-o),p(e,s));e=a>c?"D":"C";var f=Math.abs(a-c);return i(function(E,w){return w.cols-E}(a>c?o:r,t)+(f-1)*t.cols+1+((a>c?r:o)-1),p(e,s))}},function(H,n,C){"use strict";var _=this&&this.__decorate||function(l,p,i,o){var c,t=arguments.length,s=t<3?p:o===null?o=Object.getOwnPropertyDescriptor(p,i):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(l,p,i,o);else for(var e=l.length-1;e>=0;e--)(c=l[e])&&(s=(t<3?c(s):t>3?c(p,i,s):c(p,i))||s);return t>3&&s&&Object.defineProperty(p,i,s),s},y=this&&this.__param||function(l,p){return function(i,o){p(i,o,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SoundService=void 0;var u=C(1),h=function(){function l(p){this._optionsService=p}return Object.defineProperty(l,"audioContext",{get:function(){if(!l._audioContext){var p=window.AudioContext||window.webkitAudioContext;if(!p)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;l._audioContext=new p}return l._audioContext},enumerable:!1,configurable:!0}),l.prototype.playBellSound=function(){var p=l.audioContext;if(p){var i=p.createBufferSource();p.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(o){i.buffer=o,i.connect(p.destination),i.start(0)})}},l.prototype._base64ToArrayBuffer=function(p){for(var i=window.atob(p),o=i.length,c=new Uint8Array(o),t=0;t<o;t++)c[t]=i.charCodeAt(t);return c.buffer},l.prototype._removeMimeType=function(p){return p.split(",")[1]},l=_([y(0,u.IOptionsService)],l)}();n.SoundService=h},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),u=this&&this.__decorate||function(t,s,e,r){var a,f=arguments.length,E=f<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(s,e,E):a(s,e))||E);return f>3&&E&&Object.defineProperty(s,e,E),E},h=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseZoneManager=void 0;var l=C(2),p=C(7),i=C(5),o=C(1),c=function(t){function s(e,r,a,f,E,w){var S=t.call(this)||this;return S._element=e,S._screenElement=r,S._bufferService=a,S._mouseService=f,S._selectionService=E,S._optionsService=w,S._zones=[],S._areZonesActive=!1,S._lastHoverCoords=[void 0,void 0],S._initialSelectionLength=0,S.register(p.addDisposableDomListener(S._element,"mousedown",function(v){return S._onMouseDown(v)})),S._mouseMoveListener=function(v){return S._onMouseMove(v)},S._mouseLeaveListener=function(v){return S._onMouseLeave(v)},S._clickListener=function(v){return S._onClick(v)},S}return y(s,t),s.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},s.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},s.prototype.clearAll=function(e,r){if(this._zones.length!==0){e&&r||(e=0,r=this._bufferService.rows-1);for(var a=0;a<this._zones.length;a++){var f=this._zones[a];(f.y1>e&&f.y1<=r+1||f.y2>e&&f.y2<=r+1||f.y1<e&&f.y2>r+1)&&(this._currentZone&&this._currentZone===f&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(a--,1))}this._zones.length===0&&this._deactivate()}},s.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))},s.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))},s.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},s.prototype._onHover=function(e){var r=this,a=this._findZoneEventAt(e);a!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),a&&(this._currentZone=a,a.hoverCallback&&a.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return r._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},s.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var r=this._findZoneEventAt(e);r&&r.tooltipCallback&&r.tooltipCallback(e)},s.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var r=this._findZoneEventAt(e);r!=null&&r.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},s.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},s.prototype._onClick=function(e){var r=this._findZoneEventAt(e),a=this._getSelectionLength();r&&a===this._initialSelectionLength&&(r.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},s.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},s.prototype._findZoneEventAt=function(e){var r=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(r)for(var a=r[0],f=r[1],E=0;E<this._zones.length;E++){var w=this._zones[E];if(w.y1===w.y2){if(f===w.y1&&a>=w.x1&&a<w.x2)return w}else if(f===w.y1&&a>=w.x1||f===w.y2&&a<w.x2||f>w.y1&&f<w.y2)return w}},s=u([h(2,o.IBufferService),h(3,i.IMouseService),h(4,i.ISelectionService),h(5,o.IOptionsService)],s)}(l.Disposable);n.MouseZoneManager=c},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(s,e){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var f in a)a.hasOwnProperty(f)&&(r[f]=a[f])})(s,e)},function(s,e){function r(){this.constructor=s}_(s,e),s.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;var u=C(18),h=C(11),l=C(31),p=C(7),i=C(2),o=C(32),c=C(17),t=function(s){function e(r,a){var f=s.call(this)||this;f._terminal=r,f._renderService=a,f._liveRegionLineCount=0,f._charsToConsume=[],f._charsToAnnounce="",f._accessibilityTreeRoot=document.createElement("div"),f._accessibilityTreeRoot.classList.add("xterm-accessibility"),f._rowContainer=document.createElement("div"),f._rowContainer.classList.add("xterm-accessibility-tree"),f._rowContainer.setAttribute("role","list"),f._rowElements=[];for(var E=0;E<f._terminal.rows;E++)f._rowElements[E]=f._createAccessibilityTreeNode(),f._rowContainer.appendChild(f._rowElements[E]);if(f._topBoundaryFocusListener=function(w){return f._onBoundaryFocus(w,0)},f._bottomBoundaryFocusListener=function(w){return f._onBoundaryFocus(w,1)},f._rowElements[0].addEventListener("focus",f._topBoundaryFocusListener),f._rowElements[f._rowElements.length-1].addEventListener("focus",f._bottomBoundaryFocusListener),f._refreshRowsDimensions(),f._accessibilityTreeRoot.appendChild(f._rowContainer),f._renderRowsDebouncer=new l.RenderDebouncer(f._renderRows.bind(f)),f._refreshRows(),f._liveRegion=document.createElement("div"),f._liveRegion.classList.add("live-region"),f._liveRegion.setAttribute("aria-live","assertive"),f._accessibilityTreeRoot.appendChild(f._liveRegion),!f._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return f._terminal.element.insertAdjacentElement("afterbegin",f._accessibilityTreeRoot),f.register(f._renderRowsDebouncer),f.register(f._terminal.onResize(function(w){return f._onResize(w.rows)})),f.register(f._terminal.onRender(function(w){return f._refreshRows(w.start,w.end)})),f.register(f._terminal.onScroll(function(){return f._refreshRows()})),f.register(f._terminal.onA11yChar(function(w){return f._onChar(w)})),f.register(f._terminal.onLineFeed(function(){return f._onChar(`
|
|
|
`)})),f.register(f._terminal.onA11yTab(function(w){return f._onTab(w)})),f.register(f._terminal.onKey(function(w){return f._onKey(w.key)})),f.register(f._terminal.onBlur(function(){return f._clearLiveRegion()})),f.register(f._renderService.onDimensionsChange(function(){return f._refreshRowsDimensions()})),f._screenDprMonitor=new o.ScreenDprMonitor,f.register(f._screenDprMonitor),f._screenDprMonitor.setListener(function(){return f._refreshRowsDimensions()}),f.register(p.addDisposableDomListener(window,"resize",function(){return f._refreshRowsDimensions()})),f}return y(e,s),e.prototype.dispose=function(){s.prototype.dispose.call(this),c.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(r,a){var f=r.target,E=this._rowElements[a===0?1:this._rowElements.length-2];if(f.getAttribute("aria-posinset")!==(a===0?"1":""+this._terminal.buffer.lines.length)&&r.relatedTarget===E){var w,S;if(a===0?(w=f,S=this._rowElements.pop(),this._rowContainer.removeChild(S)):(w=this._rowElements.shift(),S=f,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),S.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){var v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else v=this._createAccessibilityTreeNode(),this._rowElements.push(v),this._rowContainer.appendChild(v);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),r.preventDefault(),r.stopImmediatePropagation()}},e.prototype._onResize=function(r){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>r;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var r=document.createElement("div");return r.setAttribute("role","listitem"),r.tabIndex=-1,this._refreshRowDimensions(r),r},e.prototype._onTab=function(r){for(var a=0;a<r;a++)this._onChar(" ")},e.prototype._onChar=function(r){var a=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==r&&(this._charsToAnnounce+=r):this._charsToAnnounce+=r,r===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)),h.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){a._accessibilityTreeRoot.appendChild(a._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,h.isMac&&c.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(r){this._clearLiveRegion(),this._charsToConsume.push(r)},e.prototype._refreshRows=function(r,a){this._renderRowsDebouncer.refresh(r,a,this._terminal.rows)},e.prototype._renderRows=function(r,a){for(var f=this._terminal.buffer,E=f.lines.length.toString(),w=r;w<=a;w++){var S=f.translateBufferLineToString(f.ydisp+w,!0),v=(f.ydisp+w+1).toString(),x=this._rowElements[w];x&&(S.length===0?x.innerHTML=" ":x.textContent=S,x.setAttribute("aria-posinset",v),x.setAttribute("aria-setsize",E))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var r=0;r<this._terminal.rows;r++)this._refreshRowDimensions(this._rowElements[r])}},e.prototype._refreshRowDimensions=function(r){r.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(i.Disposable);n.AccessibilityManager=t},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(f,E){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,S){w.__proto__=S}||function(w,S){for(var v in S)S.hasOwnProperty(v)&&(w[v]=S[v])})(f,E)},function(f,E){function w(){this.constructor=f}_(f,E),f.prototype=E===null?Object.create(E):(w.prototype=E.prototype,new w)}),u=this&&this.__decorate||function(f,E,w,S){var v,x=arguments.length,m=x<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,w):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(f,E,w,S);else for(var d=f.length-1;d>=0;d--)(v=f[d])&&(m=(x<3?v(m):x>3?v(E,w,m):v(E,w))||m);return x>3&&m&&Object.defineProperty(E,w,m),m},h=this&&this.__param||function(f,E){return function(w,S){E(w,S,f)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;var l=C(58),p=C(9),i=C(2),o=C(5),c=C(1),t=C(0),s=C(10),e=C(17),r=1,a=function(f){function E(w,S,v,x,m,d,g,b,D){var L=f.call(this)||this;return L._colors=w,L._element=S,L._screenElement=v,L._viewportElement=x,L._linkifier=m,L._linkifier2=d,L._charSizeService=g,L._optionsService=b,L._bufferService=D,L._terminalClass=r++,L._rowElements=[],L._rowContainer=document.createElement("div"),L._rowContainer.classList.add("xterm-rows"),L._rowContainer.style.lineHeight="normal",L._rowContainer.setAttribute("aria-hidden","true"),L._refreshRowElements(L._bufferService.cols,L._bufferService.rows),L._selectionContainer=document.createElement("div"),L._selectionContainer.classList.add("xterm-selection"),L._selectionContainer.setAttribute("aria-hidden","true"),L.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},L._updateDimensions(),L._injectCss(),L._rowFactory=new l.DomRendererRowFactory(document,L._optionsService,L._colors),L._element.classList.add("xterm-dom-renderer-owner-"+L._terminalClass),L._screenElement.appendChild(L._rowContainer),L._screenElement.appendChild(L._selectionContainer),L._linkifier.onShowLinkUnderline(function(k){return L._onLinkHover(k)}),L._linkifier.onHideLinkUnderline(function(k){return L._onLinkLeave(k)}),L._linkifier2.onShowLinkUnderline(function(k){return L._onLinkHover(k)}),L._linkifier2.onHideLinkUnderline(function(k){return L._onLinkLeave(k)}),L}return y(E,f),Object.defineProperty(E.prototype,"onRequestRedraw",{get:function(){return new t.EventEmitter().event},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),e.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),f.prototype.dispose.call(this)},E.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 w=0,S=this._rowElements;w<S.length;w++){var v=S[w];v.style.width=this.dimensions.canvasWidth+"px",v.style.height=this.dimensions.actualCellHeight+"px",v.style.lineHeight=this.dimensions.actualCellHeight+"px",v.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var x=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=x,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},E.prototype.setColors=function(w){this._colors=w,this._injectCss()},E.prototype._injectCss=function(){var w=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var S=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";S+=this._terminalSelector+" span:not(."+l.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+l.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+l.ITALIC_CLASS+" { font-style: italic;}",S+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",S+="@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+"; }}",S+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+l.CURSOR_CLASS+"."+l.CURSOR_BLINK_CLASS+":not(."+l.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+l.CURSOR_CLASS+"."+l.CURSOR_BLINK_CLASS+"."+l.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+l.CURSOR_CLASS+"."+l.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",S+=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(v,x){S+=w._terminalSelector+" .xterm-fg-"+x+" { color: "+v.css+"; }"+w._terminalSelector+" .xterm-bg-"+x+" { background-color: "+v.css+"; }"}),S+=this._terminalSelector+" .xterm-fg-"+p.INVERTED_DEFAULT_COLOR+" { color: "+s.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+p.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=S},E.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},E.prototype._refreshRowElements=function(w,S){for(var v=this._rowElements.length;v<=S;v++){var x=document.createElement("div");this._rowContainer.appendChild(x),this._rowElements.push(x)}for(;this._rowElements.length>S;)this._rowContainer.removeChild(this._rowElements.pop())},E.prototype.onResize=function(w,S){this._refreshRowElements(w,S),this._updateDimensions()},E.prototype.onCharSizeChanged=function(){this._updateDimensions()},E.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},E.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},E.prototype.onSelectionChanged=function(w,S,v){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(w&&S){var x=w[1]-this._bufferService.buffer.ydisp,m=S[1]-this._bufferService.buffer.ydisp,d=Math.max(x,0),g=Math.min(m,this._bufferService.rows-1);if(!(d>=this._bufferService.rows||g<0)){var b=document.createDocumentFragment();if(v)b.appendChild(this._createSelectionElement(d,w[0],S[0],g-d+1));else{var D=x===d?w[0]:0,L=d===g?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(d,D,L));var k=g-d-1;if(b.appendChild(this._createSelectionElement(d+1,0,this._bufferService.cols,k)),d!==g){var I=m===g?S[0]:this._bufferService.cols;b.appendChild(this._createSelectionElement(g,0,I))}}this._selectionContainer.appendChild(b)}}},E.prototype._createSelectionElement=function(w,S,v,x){x===void 0&&(x=1);var m=document.createElement("div");return m.style.height=x*this.dimensions.actualCellHeight+"px",m.style.top=w*this.dimensions.actualCellHeight+"px",m.style.left=S*this.dimensions.actualCellWidth+"px",m.style.width=this.dimensions.actualCellWidth*(v-S)+"px",m},E.prototype.onCursorMove=function(){},E.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},E.prototype.clear=function(){for(var w=0,S=this._rowElements;w<S.length;w++)S[w].innerHTML=""},E.prototype.renderRows=function(w,S){for(var v=this._bufferService.buffer.ybase+this._bufferService.buffer.y,x=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),m=this._optionsService.options.cursorBlink,d=w;d<=S;d++){var g=this._rowElements[d];g.innerHTML="";var b=d+this._bufferService.buffer.ydisp,D=this._bufferService.buffer.lines.get(b),L=this._optionsService.options.cursorStyle;g.appendChild(this._rowFactory.createRow(D,b===v,L,x,m,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(E.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),E.prototype.registerCharacterJoiner=function(w){return-1},E.prototype.deregisterCharacterJoiner=function(w){return!1},E.prototype._onLinkHover=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!0)},E.prototype._onLinkLeave=function(w){this._setCellUnderline(w.x1,w.x2,w.y1,w.y2,w.cols,!1)},E.prototype._setCellUnderline=function(w,S,v,x,m,d){for(;w!==S||v!==x;){var g=this._rowElements[v];if(!g)return;var b=g.children[w];b&&(b.style.textDecoration=d?"underline":"none"),++w>=m&&(w=0,v++)}},E=u([h(6,o.ICharSizeService),h(7,c.IOptionsService),h(8,c.IBufferService)],E)}(i.Disposable);n.DomRenderer=a},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=n.CURSOR_STYLE_UNDERLINE_CLASS=n.CURSOR_STYLE_BAR_CLASS=n.CURSOR_STYLE_BLOCK_CLASS=n.CURSOR_BLINK_CLASS=n.CURSOR_CLASS=n.UNDERLINE_CLASS=n.ITALIC_CLASS=n.DIM_CLASS=n.BOLD_CLASS=void 0;var _=C(9),y=C(3),u=C(4),h=C(10);n.BOLD_CLASS="xterm-bold",n.DIM_CLASS="xterm-dim",n.ITALIC_CLASS="xterm-italic",n.UNDERLINE_CLASS="xterm-underline",n.CURSOR_CLASS="xterm-cursor",n.CURSOR_BLINK_CLASS="xterm-cursor-blink",n.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",n.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",n.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var l=function(){function i(o,c,t){this._document=o,this._optionsService=c,this._colors=t,this._workCell=new u.CellData}return i.prototype.setColors=function(o){this._colors=o},i.prototype.createRow=function(o,c,t,s,e,r,a){for(var f=this._document.createDocumentFragment(),E=0,w=Math.min(o.length,a)-1;w>=0;w--)if(o.loadCell(w,this._workCell).getCode()!==y.NULL_CELL_CODE||c&&w===s){E=w+1;break}for(w=0;w<E;w++){o.loadCell(w,this._workCell);var S=this._workCell.getWidth();if(S!==0){var v=this._document.createElement("span");if(S>1&&(v.style.width=r*S+"px"),c&&w===s)switch(v.classList.add(n.CURSOR_CLASS),e&&v.classList.add(n.CURSOR_BLINK_CLASS),t){case"bar":v.classList.add(n.CURSOR_STYLE_BAR_CLASS);break;case"underline":v.classList.add(n.CURSOR_STYLE_UNDERLINE_CLASS);break;default:v.classList.add(n.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&v.classList.add(n.BOLD_CLASS),this._workCell.isItalic()&&v.classList.add(n.ITALIC_CLASS),this._workCell.isDim()&&v.classList.add(n.DIM_CLASS),this._workCell.isUnderline()&&v.classList.add(n.UNDERLINE_CLASS),this._workCell.isInvisible()?v.textContent=y.WHITESPACE_CELL_CHAR:v.textContent=this._workCell.getChars()||y.WHITESPACE_CELL_CHAR;var x=this._workCell.getFgColor(),m=this._workCell.getFgColorMode(),d=this._workCell.getBgColor(),g=this._workCell.getBgColorMode(),b=!!this._workCell.isInverse();if(b){var D=x;x=d,d=D;var L=m;m=g,g=L}switch(m){case 16777216:case 33554432:this._workCell.isBold()&&x<8&&this._optionsService.options.drawBoldTextInBrightColors&&(x+=8),this._applyMinimumContrast(v,this._colors.background,this._colors.ansi[x])||v.classList.add("xterm-fg-"+x);break;case 50331648:var k=h.rgba.toColor(x>>16&255,x>>8&255,255&x);this._applyMinimumContrast(v,this._colors.background,k)||this._addStyle(v,"color:#"+p(x.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(v,this._colors.background,this._colors.foreground)||b&&v.classList.add("xterm-fg-"+_.INVERTED_DEFAULT_COLOR)}switch(g){case 16777216:case 33554432:v.classList.add("xterm-bg-"+d);break;case 50331648:this._addStyle(v,"background-color:#"+p(d.toString(16),"0",6));break;case 0:default:b&&v.classList.add("xterm-bg-"+_.INVERTED_DEFAULT_COLOR)}f.appendChild(v)}}return f},i.prototype._applyMinimumContrast=function(o,c,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var s=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return s===void 0&&(s=h.color.ensureContrastRatio(c,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,s!=null?s:null)),!!s&&(this._addStyle(o,"color:"+s.css),!0)},i.prototype._addStyle=function(o,c){o.setAttribute("style",""+(o.getAttribute("style")||"")+c+";")},i}();function p(i,o,c){for(;i.length<c;)i=o+i;return i}n.DomRendererRowFactory=l},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;var _=C(12),y={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:["'",'"']};n.evaluateKeyboardEvent=function(u,h,l,p){var i={type:0,cancel:!1,key:void 0},o=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?i.key=h?_.C0.ESC+"OA":_.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?i.key=h?_.C0.ESC+"OD":_.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?i.key=h?_.C0.ESC+"OC":_.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(i.key=h?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:if(u.shiftKey){i.key=_.C0.BS;break}if(u.altKey){i.key=_.C0.ESC+_.C0.DEL;break}i.key=_.C0.DEL;break;case 9:if(u.shiftKey){i.key=_.C0.ESC+"[Z";break}i.key=_.C0.HT,i.cancel=!0;break;case 13:i.key=u.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,i.cancel=!0;break;case 27:i.key=_.C0.ESC,u.altKey&&(i.key=_.C0.ESC+_.C0.ESC),i.cancel=!0;break;case 37:if(u.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"D",i.key===_.C0.ESC+"[1;3D"&&(i.key=_.C0.ESC+(l?"b":"[1;5D"))):i.key=h?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(u.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"C",i.key===_.C0.ESC+"[1;3C"&&(i.key=_.C0.ESC+(l?"f":"[1;5C"))):i.key=h?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(u.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"A",l||i.key!==_.C0.ESC+"[1;3A"||(i.key=_.C0.ESC+"[1;5A")):i.key=h?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(u.metaKey)break;o?(i.key=_.C0.ESC+"[1;"+(o+1)+"B",l||i.key!==_.C0.ESC+"[1;3B"||(i.key=_.C0.ESC+"[1;5B")):i.key=h?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(i.key=_.C0.ESC+"[2~");break;case 46:i.key=o?_.C0.ESC+"[3;"+(o+1)+"~":_.C0.ESC+"[3~";break;case 36:i.key=o?_.C0.ESC+"[1;"+(o+1)+"H":h?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:i.key=o?_.C0.ESC+"[1;"+(o+1)+"F":h?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:u.shiftKey?i.type=2:i.key=_.C0.ESC+"[5~";break;case 34:u.shiftKey?i.type=3:i.key=_.C0.ESC+"[6~";break;case 112:i.key=o?_.C0.ESC+"[1;"+(o+1)+"P":_.C0.ESC+"OP";break;case 113:i.key=o?_.C0.ESC+"[1;"+(o+1)+"Q":_.C0.ESC+"OQ";break;case 114:i.key=o?_.C0.ESC+"[1;"+(o+1)+"R":_.C0.ESC+"OR";break;case 115:i.key=o?_.C0.ESC+"[1;"+(o+1)+"S":_.C0.ESC+"OS";break;case 116:i.key=o?_.C0.ESC+"[15;"+(o+1)+"~":_.C0.ESC+"[15~";break;case 117:i.key=o?_.C0.ESC+"[17;"+(o+1)+"~":_.C0.ESC+"[17~";break;case 118:i.key=o?_.C0.ESC+"[18;"+(o+1)+"~":_.C0.ESC+"[18~";break;case 119:i.key=o?_.C0.ESC+"[19;"+(o+1)+"~":_.C0.ESC+"[19~";break;case 120:i.key=o?_.C0.ESC+"[20;"+(o+1)+"~":_.C0.ESC+"[20~";break;case 121:i.key=o?_.C0.ESC+"[21;"+(o+1)+"~":_.C0.ESC+"[21~";break;case 122:i.key=o?_.C0.ESC+"[23;"+(o+1)+"~":_.C0.ESC+"[23~";break;case 123:i.key=o?_.C0.ESC+"[24;"+(o+1)+"~":_.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(l&&!p||!u.altKey||u.metaKey)l&&!u.altKey&&!u.ctrlKey&&u.metaKey?u.keyCode===65&&(i.type=1):u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?i.key=u.key:u.key&&u.ctrlKey&&u.key==="_"&&(i.key=_.C0.US);else{var c=y[u.keyCode],t=c&&c[u.shiftKey?1:0];if(t)i.key=_.C0.ESC+t;else if(u.keyCode>=65&&u.keyCode<=90){var s=u.ctrlKey?u.keyCode-64:u.keyCode+32;i.key=_.C0.ESC+String.fromCharCode(s)}}else u.keyCode>=65&&u.keyCode<=90?i.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?i.key=_.C0.NUL:u.keyCode>=51&&u.keyCode<=55?i.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?i.key=_.C0.DEL:u.keyCode===219?i.key=_.C0.ESC:u.keyCode===220?i.key=_.C0.FS:u.keyCode===221&&(i.key=_.C0.GS)}return i}},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(r,a){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,E){f.__proto__=E}||function(f,E){for(var w in E)E.hasOwnProperty(w)&&(f[w]=E[w])})(r,a)},function(r,a){function f(){this.constructor=r}_(r,a),r.prototype=a===null?Object.create(a):(f.prototype=a.prototype,new f)}),u=this&&this.__decorate||function(r,a,f,E){var w,S=arguments.length,v=S<3?a:E===null?E=Object.getOwnPropertyDescriptor(a,f):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,a,f,E);else for(var x=r.length-1;x>=0;x--)(w=r[x])&&(v=(S<3?w(v):S>3?w(a,f,v):w(a,f))||v);return S>3&&v&&Object.defineProperty(a,f,v),v},h=this&&this.__param||function(r,a){return function(f,E){a(f,E,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;var l=C(31),p=C(0),i=C(2),o=C(32),c=C(7),t=C(1),s=C(5),e=function(r){function a(f,E,w,S,v,x){var m=r.call(this)||this;if(m._renderer=f,m._rowCount=E,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 p.EventEmitter,m._onRender=new p.EventEmitter,m._onRefreshRequest=new p.EventEmitter,m.register({dispose:function(){return m._renderer.dispose()}}),m._renderDebouncer=new l.RenderDebouncer(function(g,b){return m._renderRows(g,b)}),m.register(m._renderDebouncer),m._screenDprMonitor=new o.ScreenDprMonitor,m._screenDprMonitor.setListener(function(){return m.onDevicePixelRatioChange()}),m.register(m._screenDprMonitor),m.register(x.onResize(function(g){return m._fullRefresh()})),m.register(S.onOptionChange(function(){return m._renderer.onOptionsChanged()})),m.register(v.onCharSizeChange(function(){return m.onCharSizeChanged()})),m._renderer.onRequestRedraw(function(g){return m.refreshRows(g.start,g.end,!0)}),m.register(c.addDisposableDomListener(window,"resize",function(){return m.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var d=new IntersectionObserver(function(g){return m._onIntersectionChange(g[g.length-1])},{threshold:0});d.observe(w),m.register({dispose:function(){return d.disconnect()}})}return m}return y(a,r),Object.defineProperty(a.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),a.prototype._onIntersectionChange=function(f){this._isPaused=f.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},a.prototype.refreshRows=function(f,E,w){w===void 0&&(w=!1),this._isPaused?this._needsFullRefresh=!0:(w||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(f,E,this._rowCount))},a.prototype._renderRows=function(f,E){this._renderer.renderRows(f,E),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:f,end:E}),this._isNextRenderRedrawOnly=!0},a.prototype.resize=function(f,E){this._rowCount=E,this._fireOnCanvasResize()},a.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},a.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},a.prototype.dispose=function(){r.prototype.dispose.call(this)},a.prototype.setRenderer=function(f){var E=this;this._renderer.dispose(),this._renderer=f,this._renderer.onRequestRedraw(function(w){return E.refreshRows(w.start,w.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},a.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},a.prototype.setColors=function(f){this._renderer.setColors(f),this._fullRefresh()},a.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},a.prototype.onResize=function(f,E){this._renderer.onResize(f,E),this._fullRefresh()},a.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},a.prototype.onBlur=function(){this._renderer.onBlur()},a.prototype.onFocus=function(){this._renderer.onFocus()},a.prototype.onSelectionChanged=function(f,E,w){this._selectionState.start=f,this._selectionState.end=E,this._selectionState.columnSelectMode=w,this._renderer.onSelectionChanged(f,E,w)},a.prototype.onCursorMove=function(){this._renderer.onCursorMove()},a.prototype.clear=function(){this._renderer.clear()},a.prototype.registerCharacterJoiner=function(f){return this._renderer.registerCharacterJoiner(f)},a.prototype.deregisterCharacterJoiner=function(f){return this._renderer.deregisterCharacterJoiner(f)},a=u([h(3,t.IOptionsService),h(4,s.ICharSizeService),h(5,t.IBufferService)],a)}(i.Disposable);n.RenderService=e},function(H,n,C){"use strict";var _=this&&this.__decorate||function(i,o,c,t){var s,e=arguments.length,r=e<3?o:t===null?t=Object.getOwnPropertyDescriptor(o,c):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,o,c,t);else for(var a=i.length-1;a>=0;a--)(s=i[a])&&(r=(e<3?s(r):e>3?s(o,c,r):s(o,c))||r);return e>3&&r&&Object.defineProperty(o,c,r),r},y=this&&this.__param||function(i,o){return function(c,t){o(c,t,i)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;var u=C(1),h=C(0),l=function(){function i(o,c,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new h.EventEmitter,this._measureStrategy=new p(o,c,this._optionsService)}return Object.defineProperty(i.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),i.prototype.measure=function(){var o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())},i=_([y(2,u.IOptionsService)],i)}();n.CharSizeService=l;var p=function(){function i(o,c,t){this._document=o,this._parentElement=c,this._optionsService=t,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 i.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var o=this._measureElement.getBoundingClientRect();return o.width!==0&&o.height!==0&&(this._result.width=o.width,this._result.height=Math.ceil(o.height)),this._result},i}()},function(H,n,C){"use strict";var _=this&&this.__decorate||function(p,i,o,c){var t,s=arguments.length,e=s<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(p,i,o,c);else for(var r=p.length-1;r>=0;r--)(t=p[r])&&(e=(s<3?t(e):s>3?t(i,o,e):t(i,o))||e);return s>3&&e&&Object.defineProperty(i,o,e),e},y=this&&this.__param||function(p,i){return function(o,c){i(o,c,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;var u=C(5),h=C(30),l=function(){function p(i,o){this._renderService=i,this._charSizeService=o}return p.prototype.getCoords=function(i,o,c,t,s){return h.getCoords(i,o,c,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,s)},p.prototype.getRawByteCoords=function(i,o,c,t){var s=this.getCoords(i,o,c,t);return h.getRawByteCoords(s)},p=_([y(0,u.IRenderService),y(1,u.ICharSizeService)],p)}();n.MouseService=l},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),u=this&&this.__decorate||function(t,s,e,r){var a,f=arguments.length,E=f<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(s,e,E):a(s,e))||E);return f>3&&E&&Object.defineProperty(s,e,E),E},h=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier2=void 0;var l=C(1),p=C(0),i=C(2),o=C(7),c=function(t){function s(e){var r=t.call(this)||this;return r._bufferService=e,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new p.EventEmitter),r._onHideLinkUnderline=r.register(new p.EventEmitter),r.register(i.getDisposeArrayDisposable(r._linkCacheDisposables)),r}return y(s,t),Object.defineProperty(s.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),s.prototype.registerLinkProvider=function(e){var r=this;return this._linkProviders.push(e),{dispose:function(){var a=r._linkProviders.indexOf(e);a!==-1&&r._linkProviders.splice(a,1)}}},s.prototype.attachToDom=function(e,r,a){var f=this;this._element=e,this._mouseService=r,this._renderService=a,this.register(o.addDisposableDomListener(this._element,"mouseleave",function(){f._isMouseOut=!0,f._clearCurrentLink()})),this.register(o.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(o.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},s.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(r){this._isMouseOut=!1;for(var a=e.composedPath(),f=0;f<a.length;f++){var E=a[f];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._onHover(r),this._lastBufferCell=r)}}},s.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},s.prototype._askForLink=function(e,r){var a=this;this._activeProviderReplies&&r||(this._activeProviderReplies=new Map,this._activeLine=e.y);var f=!1;this._linkProviders.forEach(function(E,w){var S;r?!((S=a._activeProviderReplies)===null||S===void 0)&&S.get(w)&&(f=a._checkLinkProviderResult(w,e,f)):E.provideLinks(e.y,function(v){var x,m;if(!a._isMouseOut){var d=v==null?void 0:v.map(function(g){return{link:g}});(x=a._activeProviderReplies)===null||x===void 0||x.set(w,d),f=a._checkLinkProviderResult(w,e,f),((m=a._activeProviderReplies)===null||m===void 0?void 0:m.size)===a._linkProviders.length&&a._removeIntersectingLinks(e.y,a._activeProviderReplies)}})})},s.prototype._removeIntersectingLinks=function(e,r){for(var a=new Set,f=0;f<r.size;f++){var E=r.get(f);if(E)for(var w=0;w<E.length;w++)for(var S=E[w],v=S.link.range.start.y<e?0:S.link.range.start.x,x=S.link.range.end.y>e?this._bufferService.cols:S.link.range.end.x,m=v;m<=x;m++){if(a.has(m)){E.splice(w--,1);break}a.add(m)}}},s.prototype._checkLinkProviderResult=function(e,r,a){var f,E=this;if(!this._activeProviderReplies)return a;for(var w=this._activeProviderReplies.get(e),S=!1,v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(S=!0);if(!S&&w){var x=w.find(function(d){return E._linkAtPosition(d.link,r)});x&&(a=!0,this._handleNewLink(x))}if(this._activeProviderReplies.size===this._linkProviders.length&&!a)for(v=0;v<this._activeProviderReplies.size;v++){var m=(f=this._activeProviderReplies.get(v))===null||f===void 0?void 0:f.find(function(d){return E._linkAtPosition(d.link,r)});if(m){a=!0,this._handleNewLink(m);break}}return a},s.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},s.prototype._clearCurrentLink=function(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,i.disposeArray(this._linkCacheDisposables))},s.prototype._handleNewLink=function(e){var r=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(e.link,a)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var f,E;return(E=(f=r._currentLink)===null||f===void 0?void 0:f.state)===null||E===void 0?void 0:E.decorations.pointerCursor},set:function(f){var E,w;!((E=r._currentLink)===null||E===void 0)&&E.state&&r._currentLink.state.decorations.pointerCursor!==f&&(r._currentLink.state.decorations.pointerCursor=f,r._currentLink.state.isHovered&&((w=r._element)===null||w===void 0||w.classList.toggle("xterm-cursor-pointer",f)))}},underline:{get:function(){var f,E;return(E=(f=r._currentLink)===null||f===void 0?void 0:f.state)===null||E===void 0?void 0:E.decorations.underline},set:function(f){var E,w,S;!((E=r._currentLink)===null||E===void 0)&&E.state&&((S=(w=r._currentLink)===null||w===void 0?void 0:w.state)===null||S===void 0?void 0:S.decorations.underline)!==f&&(r._currentLink.state.decorations.underline=f,r._currentLink.state.isHovered&&r._fireUnderlineEvent(e.link,f))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(f){var E=f.start===0?0:f.start+1+r._bufferService.buffer.ydisp;r._clearCurrentLink(E,f.end+1+r._bufferService.buffer.ydisp)})))}},s.prototype._linkHover=function(e,r,a){var f;!((f=this._currentLink)===null||f===void 0)&&f.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(a,r.text)},s.prototype._fireUnderlineEvent=function(e,r){var a=e.range,f=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-f-1,a.end.x,a.end.y-f-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)},s.prototype._linkLeave=function(e,r,a){var f;!((f=this._currentLink)===null||f===void 0)&&f.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(a,r.text)},s.prototype._linkAtPosition=function(e,r){var a=e.range.start.y===e.range.end.y,f=e.range.start.y<r.y,E=e.range.end.y>r.y;return(a&&e.range.start.x<=r.x&&e.range.end.x>=r.x||f&&e.range.end.x>=r.x||E&&e.range.start.x<=r.x||f&&E)&&e.range.start.y<=r.y&&e.range.end.y>=r.y},s.prototype._positionFromMouseEvent=function(e,r,a){var f=a.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(f)return{x:f[0],y:f[1]+this._bufferService.buffer.ydisp}},s.prototype._createLinkUnderlineEvent=function(e,r,a,f,E){return{x1:e,y1:r,x2:a,y2:f,cols:this._bufferService.cols,fg:E}},s=u([h(0,l.IBufferService)],s)}(i.Disposable);n.Linkifier2=c},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;var _=function(){function y(u){this._textarea=u}return Object.defineProperty(y.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),y}();n.CoreBrowserService=_},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(v,x){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,d){m.__proto__=d}||function(m,d){for(var g in d)d.hasOwnProperty(g)&&(m[g]=d[g])})(v,x)},function(v,x){function m(){this.constructor=v}_(v,x),v.prototype=x===null?Object.create(x):(m.prototype=x.prototype,new m)});Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;var u=C(2),h=C(1),l=C(66),p=C(67),i=C(68),o=C(74),c=C(75),t=C(0),s=C(76),e=C(77),r=C(78),a=C(80),f=C(81),E=C(19),w=C(82),S=function(v){function x(m){var d=v.call(this)||this;return d._onBinary=new t.EventEmitter,d._onData=new t.EventEmitter,d._onLineFeed=new t.EventEmitter,d._onResize=new t.EventEmitter,d._onScroll=new t.EventEmitter,d._instantiationService=new l.InstantiationService,d.optionsService=new o.OptionsService(m),d._instantiationService.setService(h.IOptionsService,d.optionsService),d._bufferService=d.register(d._instantiationService.createInstance(i.BufferService)),d._instantiationService.setService(h.IBufferService,d._bufferService),d._logService=d._instantiationService.createInstance(p.LogService),d._instantiationService.setService(h.ILogService,d._logService),d._coreService=d.register(d._instantiationService.createInstance(c.CoreService,function(){return d.scrollToBottom()})),d._instantiationService.setService(h.ICoreService,d._coreService),d._coreMouseService=d._instantiationService.createInstance(s.CoreMouseService),d._instantiationService.setService(h.ICoreMouseService,d._coreMouseService),d._dirtyRowService=d._instantiationService.createInstance(e.DirtyRowService),d._instantiationService.setService(h.IDirtyRowService,d._dirtyRowService),d.unicodeService=d._instantiationService.createInstance(r.UnicodeService),d._instantiationService.setService(h.IUnicodeService,d.unicodeService),d._charsetService=d._instantiationService.createInstance(a.CharsetService),d._instantiationService.setService(h.ICharsetService,d._charsetService),d._inputHandler=new E.InputHandler(d._bufferService,d._charsetService,d._coreService,d._dirtyRowService,d._logService,d.optionsService,d._coreMouseService,d.unicodeService),d.register(t.forwardEvent(d._inputHandler.onLineFeed,d._onLineFeed)),d.register(d._inputHandler),d.register(t.forwardEvent(d._bufferService.onResize,d._onResize)),d.register(t.forwardEvent(d._coreService.onData,d._onData)),d.register(t.forwardEvent(d._coreService.onBinary,d._onBinary)),d.register(d.optionsService.onOptionChange(function(g){return d._updateOptions(g)})),d._writeBuffer=new w.WriteBuffer(function(g){return d._inputHandler.parse(g)}),d}return y(x,v),Object.defineProperty(x.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),x.prototype.dispose=function(){var m;this._isDisposed||(v.prototype.dispose.call(this),(m=this._windowsMode)===null||m===void 0||m.dispose(),this._windowsMode=void 0)},x.prototype.write=function(m,d){this._writeBuffer.write(m,d)},x.prototype.writeSync=function(m){this._writeBuffer.writeSync(m)},x.prototype.resize=function(m,d){isNaN(m)||isNaN(d)||(m=Math.max(m,i.MINIMUM_COLS),d=Math.max(d,i.MINIMUM_ROWS),this._bufferService.resize(m,d))},x.prototype.scroll=function(m,d){d===void 0&&(d=!1);var g,b=this._bufferService.buffer;(g=this._cachedBlankLine)&&g.length===this.cols&&g.getFg(0)===m.fg&&g.getBg(0)===m.bg||(g=b.getBlankLine(m,d),this._cachedBlankLine=g),g.isWrapped=d;var D=b.ybase+b.scrollTop,L=b.ybase+b.scrollBottom;if(b.scrollTop===0){var k=b.lines.isFull;L===b.lines.length-1?k?b.lines.recycle().copyFrom(g):b.lines.push(g.clone()):b.lines.splice(L+1,0,g.clone()),k?this._bufferService.isUserScrolling&&(b.ydisp=Math.max(b.ydisp-1,0)):(b.ybase++,this._bufferService.isUserScrolling||b.ydisp++)}else{var I=L-D+1;b.lines.shiftElements(D+1,I-1,-1),b.lines.set(L,g.clone())}this._bufferService.isUserScrolling||(b.ydisp=b.ybase),this._dirtyRowService.markRangeDirty(b.scrollTop,b.scrollBottom),this._onScroll.fire(b.ydisp)},x.prototype.scrollLines=function(m,d){var g=this._bufferService.buffer;if(m<0){if(g.ydisp===0)return;this._bufferService.isUserScrolling=!0}else m+g.ydisp>=g.ybase&&(this._bufferService.isUserScrolling=!1);var b=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+m,g.ybase),0),b!==g.ydisp&&(d||this._onScroll.fire(g.ydisp))},x.prototype.scrollPages=function(m){this.scrollLines(m*(this.rows-1))},x.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},x.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},x.prototype.scrollToLine=function(m){var d=m-this._bufferService.buffer.ydisp;d!==0&&this.scrollLines(d)},x.prototype.addEscHandler=function(m,d){return this._inputHandler.addEscHandler(m,d)},x.prototype.addDcsHandler=function(m,d){return this._inputHandler.addDcsHandler(m,d)},x.prototype.addCsiHandler=function(m,d){return this._inputHandler.addCsiHandler(m,d)},x.prototype.addOscHandler=function(m,d){return this._inputHandler.addOscHandler(m,d)},x.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},x.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},x.prototype._updateOptions=function(m){var d;switch(m){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((d=this._windowsMode)===null||d===void 0||d.dispose(),this._windowsMode=void 0)}},x.prototype._enableWindowsMode=function(){var m=this;if(!this._windowsMode){var d=[];d.push(this.onLineFeed(f.updateWindowsModeWrappedState.bind(null,this._bufferService))),d.push(this.addCsiHandler({final:"H"},function(){return f.updateWindowsModeWrappedState(m._bufferService),!1})),this._windowsMode={dispose:function(){for(var g=0,b=d;g<b.length;g++)b[g].dispose()}}}},x}(u.Disposable);n.CoreTerminal=S},function(H,n,C){"use strict";var _=this&&this.__spreadArrays||function(){for(var p=0,i=0,o=arguments.length;i<o;i++)p+=arguments[i].length;var c=Array(p),t=0;for(i=0;i<o;i++)for(var s=arguments[i],e=0,r=s.length;e<r;e++,t++)c[t]=s[e];return c};Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;var y=C(1),u=C(14),h=function(){function p(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];this._entries=new Map;for(var c=0,t=i;c<t.length;c++){var s=t[c],e=s[0],r=s[1];this.set(e,r)}}return p.prototype.set=function(i,o){var c=this._entries.get(i);return this._entries.set(i,o),c},p.prototype.forEach=function(i){this._entries.forEach(function(o,c){return i(c,o)})},p.prototype.has=function(i){return this._entries.has(i)},p.prototype.get=function(i){return this._entries.get(i)},p}();n.ServiceCollection=h;var l=function(){function p(){this._services=new h,this._services.set(y.IInstantiationService,this)}return p.prototype.setService=function(i,o){this._services.set(i,o)},p.prototype.getService=function(i){return this._services.get(i)},p.prototype.createInstance=function(i){for(var o=[],c=1;c<arguments.length;c++)o[c-1]=arguments[c];for(var t=u.getServiceDependencies(i).sort(function(w,S){return w.index-S.index}),s=[],e=0,r=t;e<r.length;e++){var a=r[e],f=this._services.get(a.id);if(!f)throw new Error("[createInstance] "+i.name+" depends on UNKNOWN service "+a.id+".");s.push(f)}var E=t.length>0?t[0].index:o.length;if(o.length!==E)throw new Error("[createInstance] First service dependency of "+i.name+" at position "+(E+1)+" conflicts with "+o.length+" static arguments");return new(i.bind.apply(i,_([void 0],_(o,s))))},p}();n.InstantiationService=l},function(H,n,C){"use strict";var _=this&&this.__decorate||function(o,c,t,s){var e,r=arguments.length,a=r<3?c:s===null?s=Object.getOwnPropertyDescriptor(c,t):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,c,t,s);else for(var f=o.length-1;f>=0;f--)(e=o[f])&&(a=(r<3?e(a):r>3?e(c,t,a):e(c,t))||a);return r>3&&a&&Object.defineProperty(c,t,a),a},y=this&&this.__param||function(o,c){return function(t,s){c(t,s,o)}},u=this&&this.__spreadArrays||function(){for(var o=0,c=0,t=arguments.length;c<t;c++)o+=arguments[c].length;var s=Array(o),e=0;for(c=0;c<t;c++)for(var r=arguments[c],a=0,f=r.length;a<f;a++,e++)s[e]=r[a];return s};Object.defineProperty(n,"__esModule",{value:!0}),n.LogService=n.LogLevel=void 0;var h,l=C(1);(function(o){o[o.DEBUG=0]="DEBUG",o[o.INFO=1]="INFO",o[o.WARN=2]="WARN",o[o.ERROR=3]="ERROR",o[o.OFF=4]="OFF"})(h=n.LogLevel||(n.LogLevel={}));var p={debug:h.DEBUG,info:h.INFO,warn:h.WARN,error:h.ERROR,off:h.OFF},i=function(){function o(c){var t=this;this._optionsService=c,this._updateLogLevel(),this._optionsService.onOptionChange(function(s){s==="logLevel"&&t._updateLogLevel()})}return o.prototype._updateLogLevel=function(){this._logLevel=p[this._optionsService.options.logLevel]},o.prototype._evalLazyOptionalParams=function(c){for(var t=0;t<c.length;t++)typeof c[t]=="function"&&(c[t]=c[t]())},o.prototype._log=function(c,t,s){this._evalLazyOptionalParams(s),c.call.apply(c,u([console,"xterm.js: "+t],s))},o.prototype.debug=function(c){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=h.DEBUG&&this._log(console.log,c,t)},o.prototype.info=function(c){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=h.INFO&&this._log(console.info,c,t)},o.prototype.warn=function(c){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=h.WARN&&this._log(console.warn,c,t)},o.prototype.error=function(c){for(var t=[],s=1;s<arguments.length;s++)t[s-1]=arguments[s];this._logLevel<=h.ERROR&&this._log(console.error,c,t)},o=_([y(0,l.IOptionsService)],o)}();n.LogService=i},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(t,s){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])})(t,s)},function(t,s){function e(){this.constructor=t}_(t,s),t.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)}),u=this&&this.__decorate||function(t,s,e,r){var a,f=arguments.length,E=f<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(s,e,E):a(s,e))||E);return f>3&&E&&Object.defineProperty(s,e,E),E},h=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;var l=C(1),p=C(69),i=C(0),o=C(2);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;var c=function(t){function s(e){var r=t.call(this)||this;return r._optionsService=e,r.isUserScrolling=!1,r._onResize=new i.EventEmitter,r.cols=Math.max(e.options.cols,n.MINIMUM_COLS),r.rows=Math.max(e.options.rows,n.MINIMUM_ROWS),r.buffers=new p.BufferSet(e,r),r}return y(s,t),Object.defineProperty(s.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),s.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},s.prototype.resize=function(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:r})},s.prototype.reset=function(){this.buffers.dispose(),this.buffers=new p.BufferSet(this._optionsService,this),this.isUserScrolling=!1},s=u([h(0,l.IOptionsService)],s)}(o.Disposable);n.BufferService=c},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(p,i){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var t in c)c.hasOwnProperty(t)&&(o[t]=c[t])})(p,i)},function(p,i){function o(){this.constructor=p}_(p,i),p.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)});Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;var u=C(70),h=C(0),l=function(p){function i(o,c){var t=p.call(this)||this;return t._onBufferActivate=t.register(new h.EventEmitter),t._normal=new u.Buffer(!0,o,c),t._normal.fillViewportRows(),t._alt=new u.Buffer(!1,o,c),t._activeBuffer=t._normal,t.setupTabStops(),t}return y(i,p),Object.defineProperty(i.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),i.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}))},i.prototype.activateAltBuffer=function(o){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(o),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}))},i.prototype.resize=function(o,c){this._normal.resize(o,c),this._alt.resize(o,c)},i.prototype.setupTabStops=function(o){this._normal.setupTabStops(o),this._alt.setupTabStops(o)},i}(C(2).Disposable);n.BufferSet=l},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BufferStringIterator=n.Buffer=n.MAX_BUFFER_SIZE=void 0;var _=C(71),y=C(16),u=C(4),h=C(3),l=C(72),p=C(73),i=C(20),o=C(6);n.MAX_BUFFER_SIZE=4294967295;var c=function(){function s(e,r,a){this._hasScrollback=e,this._optionsService=r,this._bufferService=a,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=i.DEFAULT_CHARSET,this.markers=[],this._nullCell=u.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]),this._whitespaceCell=u.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 _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return s.prototype.getNullCell=function(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new o.ExtendedAttrs),this._nullCell},s.prototype.getWhitespaceCell=function(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new o.ExtendedAttrs),this._whitespaceCell},s.prototype.getBlankLine=function(e,r){return new y.BufferLine(this._bufferService.cols,this.getNullCell(e),r)},Object.defineProperty(s.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),s.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.options.scrollback;return r>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:r},s.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=y.DEFAULT_ATTR_DATA);for(var r=this._rows;r--;)this.lines.push(this.getBlankLine(e))}},s.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},s.prototype.resize=function(e,r){var a=this.getNullCell(y.DEFAULT_ATTR_DATA),f=this._getCorrectBufferLength(r);if(f>this.lines.maxLength&&(this.lines.maxLength=f),this.lines.length>0){if(this._cols<e)for(var E=0;E<this.lines.length;E++)this.lines.get(E).resize(e,a);var w=0;if(this._rows<r)for(var S=this._rows;S<r;S++)this.lines.length<r+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new y.BufferLine(e,a)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(e,a)));else for(S=this._rows;S>r;S--)this.lines.length>r+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(f<this.lines.maxLength){var v=this.lines.length-f;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=f}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,r-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=r-1,this._isReflowEnabled&&(this._reflow(e,r),this._cols>e))for(E=0;E<this.lines.length;E++)this.lines.get(E).resize(e,a);this._cols=e,this._rows=r},Object.defineProperty(s.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),s.prototype._reflow=function(e,r){this._cols!==e&&(e>this._cols?this._reflowLarger(e,r):this._reflowSmaller(e,r))},s.prototype._reflowLarger=function(e,r){var a=l.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(a.length>0){var f=l.reflowLargerCreateNewLayout(this.lines,a);l.reflowLargerApplyNewLayout(this.lines,f.layout),this._reflowLargerAdjustViewport(e,r,f.countRemoved)}},s.prototype._reflowLargerAdjustViewport=function(e,r,a){for(var f=this.getNullCell(y.DEFAULT_ATTR_DATA),E=a;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<r&&this.lines.push(new y.BufferLine(e,f))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-a,0)},s.prototype._reflowSmaller=function(e,r){for(var a=this.getNullCell(y.DEFAULT_ATTR_DATA),f=[],E=0,w=this.lines.length-1;w>=0;w--){var S=this.lines.get(w);if(!(!S||!S.isWrapped&&S.getTrimmedLength()<=e)){for(var v=[S];S.isWrapped&&w>0;)S=this.lines.get(--w),v.unshift(S);var x=this.ybase+this.y;if(!(x>=w&&x<w+v.length)){var m=v[v.length-1].getTrimmedLength(),d=l.reflowSmallerGetNewLineLengths(v,this._cols,e),g=d.length-v.length,b=void 0;b=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+g):Math.max(0,this.lines.length-this.lines.maxLength+g);for(var D=[],L=0;L<g;L++){var k=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);D.push(k)}D.length>0&&(f.push({start:w+v.length+E,newLines:D}),E+=D.length),v.push.apply(v,D);var I=d.length-1,N=d[I];N===0&&(N=d[--I]);for(var M=v.length-g-1,U=m;M>=0;){var A=Math.min(U,N);if(v[I].copyCellsFrom(v[M],U-A,N-A,A,!0),(N-=A)===0&&(N=d[--I]),(U-=A)===0){M--;var O=Math.max(M,0);U=l.getWrappedLineTrimmedLength(v,O,this._cols)}}for(L=0;L<v.length;L++)d[L]<e&&v[L].setCell(d[L],a);for(var R=g-b;R-- >0;)this.ybase===0?this.y<r-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+E)-r&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+g,this.ybase+r-1)}}}if(f.length>0){var P=[],T=[];for(L=0;L<this.lines.length;L++)T.push(this.lines.get(L));var B=this.lines.length,j=B-1,z=0,Z=f[z];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+E);var q=0;for(L=Math.min(this.lines.maxLength-1,B+E-1);L>=0;L--)if(Z&&Z.start>j+q){for(var F=Z.newLines.length-1;F>=0;F--)this.lines.set(L--,Z.newLines[F]);L++,P.push({index:j+1,amount:Z.newLines.length}),q+=Z.newLines.length,Z=f[++z]}else this.lines.set(L,T[j--]);var W=0;for(L=P.length-1;L>=0;L--)P[L].index+=W,this.lines.onInsertEmitter.fire(P[L]),W+=P[L].amount;var $=Math.max(0,B+E-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}},s.prototype.stringIndexToBufferIndex=function(e,r,a){for(a===void 0&&(a=!1);r;){var f=this.lines.get(e);if(!f)return[-1,-1];for(var E=a?f.getTrimmedLength():f.length,w=0;w<E;++w)if(f.get(w)[h.CHAR_DATA_WIDTH_INDEX]&&(r-=f.get(w)[h.CHAR_DATA_CHAR_INDEX].length||1),r<0)return[e,w];e++}return[e,0]},s.prototype.translateBufferLineToString=function(e,r,a,f){a===void 0&&(a=0);var E=this.lines.get(e);return E?E.translateToString(r,a,f):""},s.prototype.getWrappedRangeForLine=function(e){for(var r=e,a=e;r>0&&this.lines.get(r).isWrapped;)r--;for(;a+1<this.lines.length&&this.lines.get(a+1).isWrapped;)a++;return{first:r,last:a}},s.prototype.setupTabStops=function(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.options.tabStopWidth)this.tabs[e]=!0},s.prototype.prevStop=function(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},s.prototype.nextStop=function(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},s.prototype.addMarker=function(e){var r=this,a=new p.Marker(e);return this.markers.push(a),a.register(this.lines.onTrim(function(f){a.line-=f,a.line<0&&a.dispose()})),a.register(this.lines.onInsert(function(f){a.line>=f.index&&(a.line+=f.amount)})),a.register(this.lines.onDelete(function(f){a.line>=f.index&&a.line<f.index+f.amount&&a.dispose(),a.line>f.index&&(a.line-=f.amount)})),a.register(a.onDispose(function(){return r._removeMarker(a)})),a},s.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},s.prototype.iterator=function(e,r,a,f,E){return new t(this,e,r,a,f,E)},s}();n.Buffer=c;var t=function(){function s(e,r,a,f,E,w){a===void 0&&(a=0),f===void 0&&(f=e.lines.length),E===void 0&&(E=0),w===void 0&&(w=0),this._buffer=e,this._trimRight=r,this._startIndex=a,this._endIndex=f,this._startOverscan=E,this._endOverscan=w,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return s.prototype.hasNext=function(){return this._current<this._endIndex},s.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var r="",a=e.first;a<=e.last;++a)r+=this._buffer.translateBufferLineToString(a,this._trimRight);return this._current=e.last+1,{range:e,content:r}},s}();n.BufferStringIterator=t},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;var _=C(0),y=function(){function u(h){this._maxLength=h,this.onDeleteEmitter=new _.EventEmitter,this.onInsertEmitter=new _.EventEmitter,this.onTrimEmitter=new _.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(u.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"maxLength",{get:function(){return this._maxLength},set:function(h){if(this._maxLength!==h){for(var l=new Array(h),p=0;p<Math.min(h,this.length);p++)l[p]=this._array[this._getCyclicIndex(p)];this._array=l,this._maxLength=h,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"length",{get:function(){return this._length},set:function(h){if(h>this._length)for(var l=this._length;l<h;l++)this._array[l]=void 0;this._length=h},enumerable:!1,configurable:!0}),u.prototype.get=function(h){return this._array[this._getCyclicIndex(h)]},u.prototype.set=function(h,l){this._array[this._getCyclicIndex(h)]=l},u.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++},u.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(u.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),u.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},u.prototype.splice=function(h,l){for(var p=[],i=2;i<arguments.length;i++)p[i-2]=arguments[i];if(l){for(var o=h;o<this._length-l;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+l)];this._length-=l}for(o=this._length-1;o>=h;o--)this._array[this._getCyclicIndex(o+p.length)]=this._array[this._getCyclicIndex(o)];for(o=0;o<p.length;o++)this._array[this._getCyclicIndex(h+o)]=p[o];if(this._length+p.length>this._maxLength){var c=this._length+p.length-this._maxLength;this._startIndex+=c,this._length=this._maxLength,this.onTrimEmitter.fire(c)}else this._length+=p.length},u.prototype.trimStart=function(h){h>this._length&&(h=this._length),this._startIndex+=h,this._length-=h,this.onTrimEmitter.fire(h)},u.prototype.shiftElements=function(h,l,p){if(!(l<=0)){if(h<0||h>=this._length)throw new Error("start argument out of range");if(h+p<0)throw new Error("Cannot shift elements in list beyond index 0");if(p>0){for(var i=l-1;i>=0;i--)this.set(h+i+p,this.get(h+i));var o=h+l+p-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<l;i++)this.set(h+i+p,this.get(h+i))}},u.prototype._getCyclicIndex=function(h){return(this._startIndex+h)%this._maxLength},u}();n.CircularList=y},function(H,n,C){"use strict";function _(y,u,h){if(u===y.length-1)return y[u].getTrimmedLength();var l=!y[u].hasContent(h-1)&&y[u].getWidth(h-1)===1,p=y[u+1].getWidth(0)===2;return l&&p?h-1:h}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(y,u,h,l,p){for(var i=[],o=0;o<y.length-1;o++){var c=o,t=y.get(++c);if(t.isWrapped){for(var s=[y.get(o)];c<y.length&&t.isWrapped;)s.push(t),t=y.get(++c);if(l>=o&&l<c)o+=s.length-1;else{for(var e=0,r=_(s,e,u),a=1,f=0;a<s.length;){var E=_(s,a,u),w=E-f,S=h-r,v=Math.min(w,S);s[e].copyCellsFrom(s[a],f,r,v,!1),(r+=v)===h&&(e++,r=0),(f+=v)===E&&(a++,f=0),r===0&&e!==0&&s[e-1].getWidth(h-1)===2&&(s[e].copyCellsFrom(s[e-1],h-1,r++,1,!1),s[e-1].setCell(h-1,p))}s[e].replaceCells(r,h,p);for(var x=0,m=s.length-1;m>0&&(m>e||s[m].getTrimmedLength()===0);m--)x++;x>0&&(i.push(o+s.length-x),i.push(x)),o+=s.length-1}}}return i},n.reflowLargerCreateNewLayout=function(y,u){for(var h=[],l=0,p=u[l],i=0,o=0;o<y.length;o++)if(p===o){var c=u[++l];y.onDeleteEmitter.fire({index:o-i,amount:c}),o+=c-1,i+=c,p=u[++l]}else h.push(o);return{layout:h,countRemoved:i}},n.reflowLargerApplyNewLayout=function(y,u){for(var h=[],l=0;l<u.length;l++)h.push(y.get(u[l]));for(l=0;l<h.length;l++)y.set(l,h[l]);y.length=u.length},n.reflowSmallerGetNewLineLengths=function(y,u,h){for(var l=[],p=y.map(function(r,a){return _(y,a,u)}).reduce(function(r,a){return r+a}),i=0,o=0,c=0;c<p;){if(p-c<h){l.push(p-c);break}i+=h;var t=_(y,o,u);i>t&&(i-=t,o++);var s=y[o].getWidth(i-1)===2;s&&i--;var e=s?h-1:h;l.push(e),c+=e}return l},n.getWrappedLineTrimmedLength=_},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(l,p){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var c in o)o.hasOwnProperty(c)&&(i[c]=o[c])})(l,p)},function(l,p){function i(){this.constructor=l}_(l,p),l.prototype=p===null?Object.create(p):(i.prototype=p.prototype,new i)});Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;var u=C(0),h=function(l){function p(i){var o=l.call(this)||this;return o.line=i,o._id=p._nextId++,o.isDisposed=!1,o._onDispose=new u.EventEmitter,o}return y(p,l),Object.defineProperty(p.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},p._nextId=1,p}(C(2).Disposable);n.Marker=h},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=n.DEFAULT_BELL_SOUND=void 0;var _=C(0),y=C(11),u=C(33);n.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",n.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:n.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:y.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var h=["cols","rows"],l=function(){function p(i){this._onOptionChange=new _.EventEmitter,this.options=u.clone(n.DEFAULT_OPTIONS);for(var o=0,c=Object.keys(i);o<c.length;o++){var t=c[o];if(t in this.options){var s=i[t];this.options[t]=s}}}return Object.defineProperty(p.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),p.prototype.setOption=function(i,o){if(!(i in n.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');if(h.indexOf(i)!==-1)throw new Error('Option "'+i+'" can only be set in the constructor');this.options[i]!==o&&(o=this._sanitizeAndValidateOption(i,o),this.options[i]!==o&&(this.options[i]=o,this._onOptionChange.fire(i)))},p.prototype._sanitizeAndValidateOption=function(i,o){switch(i){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":o||(o=n.DEFAULT_OPTIONS[i]);break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(i+" cannot be less than 1, value: "+o);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(i+" cannot be less than 0, value: "+o);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(i+" cannot be less than or equal to 0, value: "+o)}return o},p.prototype.getOption=function(i){if(!(i in n.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');return this.options[i]},p}();n.OptionsService=l},function(H,n,C){"use strict";var _,y=this&&this.__extends||(_=function(e,r){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,f){a.__proto__=f}||function(a,f){for(var E in f)f.hasOwnProperty(E)&&(a[E]=f[E])})(e,r)},function(e,r){function a(){this.constructor=e}_(e,r),e.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}),u=this&&this.__decorate||function(e,r,a,f){var E,w=arguments.length,S=w<3?r:f===null?f=Object.getOwnPropertyDescriptor(r,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(e,r,a,f);else for(var v=e.length-1;v>=0;v--)(E=e[v])&&(S=(w<3?E(S):w>3?E(r,a,S):E(r,a))||S);return w>3&&S&&Object.defineProperty(r,a,S),S},h=this&&this.__param||function(e,r){return function(a,f){r(a,f,e)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;var l=C(1),p=C(0),i=C(33),o=C(2),c=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),s=function(e){function r(a,f,E,w){var S=e.call(this)||this;return S._bufferService=f,S._logService=E,S._optionsService=w,S.isCursorInitialized=!1,S.isCursorHidden=!1,S._onData=S.register(new p.EventEmitter),S._onUserInput=S.register(new p.EventEmitter),S._onBinary=S.register(new p.EventEmitter),S._scrollToBottom=a,S.register({dispose:function(){return S._scrollToBottom=void 0}}),S.modes=i.clone(c),S.decPrivateModes=i.clone(t),S}return y(r,e),Object.defineProperty(r.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.modes=i.clone(c),this.decPrivateModes=i.clone(t)},r.prototype.triggerDataEvent=function(a,f){if(f===void 0&&(f=!1),!this._optionsService.options.disableStdin){var E=this._bufferService.buffer;E.ybase!==E.ydisp&&this._scrollToBottom(),f&&this._onUserInput.fire(),this._logService.debug('sending data "'+a+'"',function(){return a.split("").map(function(w){return w.charCodeAt(0)})}),this._onData.fire(a)}},r.prototype.triggerBinaryEvent=function(a){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+a+'"',function(){return a.split("").map(function(f){return f.charCodeAt(0)})}),this._onBinary.fire(a))},r=u([h(1,l.IBufferService),h(2,l.ILogService),h(3,l.IOptionsService)],r)}(o.Disposable);n.CoreService=s},function(H,n,C){"use strict";var _=this&&this.__decorate||function(t,s,e,r){var a,f=arguments.length,E=f<3?s:r===null?r=Object.getOwnPropertyDescriptor(s,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(t,s,e,r);else for(var w=t.length-1;w>=0;w--)(a=t[w])&&(E=(f<3?a(E):f>3?a(s,e,E):a(s,e))||E);return f>3&&E&&Object.defineProperty(s,e,E),E},y=this&&this.__param||function(t,s){return function(e,r){s(e,r,t)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;var u=C(1),h=C(0),l={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(t){return t.button!==4&&t.action===1&&(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)}},VT200:{events:19,restrict:function(t){return t.action!==32}},DRAG:{events:23,restrict:function(t){return t.action!==32||t.button!==3}},ANY:{events:31,restrict:function(t){return!0}}};function p(t,s){var e=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return t.button===4?(e|=64,e|=t.action):(e|=3&t.button,4&t.button&&(e|=64),8&t.button&&(e|=128),t.action===32?e|=32:t.action!==0||s||(e|=3)),e}var i=String.fromCharCode,o={DEFAULT:function(t){var s=[p(t,!1)+32,t.col+32,t.row+32];return s[0]>255||s[1]>255||s[2]>255?"":"\x1B[M"+i(s[0])+i(s[1])+i(s[2])},SGR:function(t){var s=t.action===0&&t.button!==4?"m":"M";return"\x1B[<"+p(t,!0)+";"+t.col+";"+t.row+s}},c=function(){function t(s,e){this._bufferService=s,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new h.EventEmitter,this._lastEvent=null;for(var r=0,a=Object.keys(l);r<a.length;r++){var f=a[r];this.addProtocol(f,l[f])}for(var E=0,w=Object.keys(o);E<w.length;E++){var S=w[E];this.addEncoding(S,o[S])}this.reset()}return t.prototype.addProtocol=function(s,e){this._protocols[s]=e},t.prototype.addEncoding=function(s,e){this._encodings[s]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(s){if(!this._protocols[s])throw new Error('unknown protocol "'+s+'"');this._activeProtocol=s,this._onProtocolChange.fire(this._protocols[s].events)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(s){if(!this._encodings[s])throw new Error('unknown encoding "'+s+'"');this._activeEncoding=s},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(t.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),t.prototype.triggerMouseEvent=function(s){if(s.col<0||s.col>=this._bufferService.cols||s.row<0||s.row>=this._bufferService.rows||s.button===4&&s.action===32||s.button===3&&s.action!==32||s.button!==4&&(s.action===2||s.action===3)||(s.col++,s.row++,s.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,s))||!this._protocols[this._activeProtocol].restrict(s))return!1;var e=this._encodings[this._activeEncoding](s);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=s,!0},t.prototype.explainEvents=function(s){return{down:!!(1&s),up:!!(2&s),drag:!!(4&s),move:!!(8&s),wheel:!!(16&s)}},t.prototype._compareEvents=function(s,e){return s.col===e.col&&s.row===e.row&&s.button===e.button&&s.action===e.action&&s.ctrl===e.ctrl&&s.alt===e.alt&&s.shift===e.shift},t=_([y(0,u.IBufferService),y(1,u.ICoreService)],t)}();n.CoreMouseService=c},function(H,n,C){"use strict";var _=this&&this.__decorate||function(l,p,i,o){var c,t=arguments.length,s=t<3?p:o===null?o=Object.getOwnPropertyDescriptor(p,i):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(l,p,i,o);else for(var e=l.length-1;e>=0;e--)(c=l[e])&&(s=(t<3?c(s):t>3?c(p,i,s):c(p,i))||s);return t>3&&s&&Object.defineProperty(p,i,s),s},y=this&&this.__param||function(l,p){return function(i,o){p(i,o,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DirtyRowService=void 0;var u=C(1),h=function(){function l(p){this._bufferService=p,this.clearRange()}return Object.defineProperty(l.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),l.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},l.prototype.markDirty=function(p){p<this._start?this._start=p:p>this._end&&(this._end=p)},l.prototype.markRangeDirty=function(p,i){if(p>i){var o=p;p=i,i=o}p<this._start&&(this._start=p),i>this._end&&(this._end=i)},l.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},l=_([y(0,u.IBufferService)],l)}();n.DirtyRowService=h},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;var _=C(0),y=C(79),u=function(){function h(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter;var l=new y.UnicodeV6;this.register(l),this._active=l.version,this._activeProvider=l}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(l){if(!this._providers[l])throw new Error('unknown Unicode version "'+l+'"');this._active=l,this._activeProvider=this._providers[l],this._onChange.fire(l)},enumerable:!1,configurable:!0}),h.prototype.register=function(l){this._providers[l.version]=l},h.prototype.wcwidth=function(l){return this._activeProvider.wcwidth(l)},h.prototype.getStringCellWidth=function(l){for(var p=0,i=l.length,o=0;o<i;++o){var c=l.charCodeAt(o);if(55296<=c&&c<=56319){if(++o>=i)return p+this.wcwidth(c);var t=l.charCodeAt(o);56320<=t&&t<=57343?c=1024*(c-55296)+t-56320+65536:p+=this.wcwidth(t)}p+=this.wcwidth(c)}return p},h}();n.UnicodeService=u},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;var _,y=C(15),u=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],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]],l=function(){function p(){if(this.version="6",!_){_=new Uint8Array(65536),y.fill(_,1),_[0]=0,y.fill(_,0,1,32),y.fill(_,0,127,160),y.fill(_,2,4352,4448),_[9001]=2,_[9002]=2,y.fill(_,2,11904,42192),_[12351]=1,y.fill(_,2,44032,55204),y.fill(_,2,63744,64256),y.fill(_,2,65040,65050),y.fill(_,2,65072,65136),y.fill(_,2,65280,65377),y.fill(_,2,65504,65511);for(var i=0;i<u.length;++i)y.fill(_,0,u[i][0],u[i][1]+1)}}return p.prototype.wcwidth=function(i){return i<32?0:i<127?1:i<65536?_[i]:function(o,c){var t,s=0,e=c.length-1;if(o<c[0][0]||o>c[e][1])return!1;for(;e>=s;)if(o>c[t=s+e>>1][1])s=t+1;else{if(!(o<c[t][0]))return!0;e=t-1}return!1}(i,h)?0:i>=131072&&i<=196605||i>=196608&&i<=262141?2:1},p}();n.UnicodeV6=l},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0;var _=function(){function y(){this.glevel=0,this._charsets=[]}return y.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},y.prototype.setgLevel=function(u){this.glevel=u,this.charset=this._charsets[u]},y.prototype.setgCharset=function(u,h){this._charsets[u]=h,this.glevel===u&&(this.charset=h)},y}();n.CharsetService=_},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;var _=C(3);n.updateWindowsModeWrappedState=function(y){var u=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),h=u==null?void 0:u.get(y.cols-1),l=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);l&&h&&(l.isWrapped=h[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&h[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;var _=function(){function y(u){this._action=u,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return y.prototype.writeSync=function(u){if(this._writeBuffer.length){for(var h=this._bufferOffset;h<this._writeBuffer.length;++h){var l=this._writeBuffer[h],p=this._callbacks[h];this._action(l),p&&p()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(u)},y.prototype.write=function(u,h){var l=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 l._innerWrite()})),this._pendingData+=u.length,this._writeBuffer.push(u),this._callbacks.push(h)},y.prototype._innerWrite=function(){for(var u=this,h=Date.now();this._writeBuffer.length>this._bufferOffset;){var l=this._writeBuffer[this._bufferOffset],p=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(l),this._pendingData-=l.length,p&&p(),Date.now()-h>=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 u._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},y}();n.WriteBuffer=_},function(H,n,C){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0;var _=function(){function y(){this._addons=[]}return y.prototype.dispose=function(){for(var u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()},y.prototype.loadAddon=function(u,h){var l=this,p={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(p),h.dispose=function(){return l._wrappedAddonDispose(p)},h.activate(u)},y.prototype._wrappedAddonDispose=function(u){if(!u.isDisposed){for(var h=-1,l=0;l<this._addons.length;l++)if(this._addons[l]===u){h=l;break}if(h===-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(h,1)}},y}();n.AddonManager=_}])})}}]);
|