You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Terminal__index.73eae965...

40 lines
570 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(self.webpackChunk=self.webpackChunk||[]).push([[5111],{18299:function(Te,D,c){"use strict";c.d(D,{Z:function(){return d}});var _=c(87462),m=c(67294),y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},h=y,o=c(74643),u=function(i,a){return m.createElement(o.Z,(0,_.Z)({},i,{ref:a,icon:h}))},d=m.forwardRef(u)},63237:function(Te,D,c){"use strict";c.d(D,{Z:function(){return d}});var _=c(87462),m=c(67294),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"},h=y,o=c(74643),u=function(i,a){return m.createElement(o.Z,(0,_.Z)({},i,{ref:a,icon:h}))},d=m.forwardRef(u)},99569:function(Te,D,c){"use strict";c.d(D,{Z:function(){return d}});var _=c(87462),m=c(67294),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"},h=y,o=c(74643),u=function(i,a){return m.createElement(o.Z,(0,_.Z)({},i,{ref:a,icon:h}))},d=m.forwardRef(u)},72395:function(Te,D,c){"use strict";c.d(D,{Z:function(){return d}});var _=c(87462),m=c(67294),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"},h=y,o=c(74643),u=function(i,a){return m.createElement(o.Z,(0,_.Z)({},i,{ref:a,icon:h}))},d=m.forwardRef(u)},89629:function(){"use strict"},45954:function(){"use strict"},31246:function(Te,D,c){"use strict";c.d(D,{G0:function(){return Oe},JW:function(){return Ke},Jd:function(){return I},Kl:function(){return Pe},L5:function(){return s},MH:function(){return fe},MI:function(){return ye},Qo:function(){return v},SO:function(){return n},Tf:function(){return b},VT:function(){return Z},XO:function(){return f},Xy:function(){return E},Y0:function(){return U},Ye:function(){return Ee},Yv:function(){return Ce},ZH:function(){return Ie},am:function(){return X},bD:function(){return we},eA:function(){return C},fA:function(){return me},fY:function(){return k},g6:function(){return t},g7:function(){return De},gT:function(){return O},gn:function(){return Me},h$:function(){return ve},hG:function(){return x},i8:function(){return le},j3:function(){return ke},lH:function(){return B},li:function(){return l},n4:function(){return p},pU:function(){return N},qK:function(){return g},sA:function(){return _e},sP:function(){return q},t$:function(){return j},wj:function(){return Re},zl:function(){return S}});var _=c(33170),m=c(28706),y=Object.defineProperty,h=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(ee,ie,Ae)=>ie in ee?y(ee,ie,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):ee[ie]=Ae,r=(ee,ie)=>{for(var Ae in ie||(ie={}))o.call(ie,Ae)&&d(ee,Ae,ie[Ae]);if(h)for(var Ae of h(ie))u.call(ie,Ae)&&d(ee,Ae,ie[Ae]);return ee},i=(ee,ie,Ae)=>new Promise((Se,he)=>{var ae=F=>{try{V(Ae.next(F))}catch(H){he(H)}},ce=F=>{try{V(Ae.throw(F))}catch(H){he(H)}},V=F=>F.done?Se(F.value):Promise.resolve(F.value).then(ae,ce);V((Ae=Ae.apply(ee,ie)).next())});const a=(0,m.oP)(),e={};a!=null&&a.homework_common_id&&(e.homework_common_id=a==null?void 0:a.homework_common_id),a!=null&&a.exercisesId&&(e.exercise_id=a==null?void 0:a.exercisesId),console.log(a,e,"urlParamsAll");function f(ee,ie){return(0,_.U2)(`tasks/${ee}.json`,r(r({},ie),e))}function t(ee,ie={}){return(0,_.U2)(`myshixuns/${ee}/challenges.json`,r({},ie))}function n(ee,ie){return(0,_.U2)(`myshixuns/${ee}/subject_challenges.json`,ie)}function s(ee,ie,Ae){return(0,_.U2)(`tasks/${ee}/star.json`,{shixun_id:ie,star:Ae})}function l(ee,ie){return ie.path&&(ie.path=encodeURIComponent(ie.path)),(0,_.U2)(`tasks/${ee}/rep_content.json`,r(r({},ie),e))}function p(ee,ie){return(0,_.v_)(`myshixuns/${ee}/update_file.json`,r(r({},ie),e))}function g(ee,ie){return(0,_.U2)(`tasks/${ee}/reset_original_code.json`,r(r({},ie),e))}function b(ee,ie){return(0,_.v_)(`myshixuns/${ee}/reset_repository.json`,ie)}function x(ee,ie){return(0,_.U2)(`tasks/${ee}/reset_passed_code.json`,r(r({},ie),e))}function E(ee,ie){return(0,_.v_)(`tasks/${ee}/game_build.json`,r(r({},ie),e))}function C(ee){return(0,_.ZP)("http://localhost:49352/api/game_build",{method:"post",body:ee})}function v(ee,ie){return(0,_.U2)(`tasks/${ee}/game_status.json`,r(r({},ie),e))}function S(ee,ie){return(0,_.v_)(`tasks/${ee}/choose_build.json`,r(r({},ie),e))}function k(ee){return(0,_.U2)(`myshixuns/${ee}/get_remaining_time.json`)}function O(ee){return(0,_.U2)(`tasks/${ee}/picture_display.json`,e)}function R(ee,ie){return get(`courses/${ee}/inform_detail.json`,ie)}function U(ee){return(0,_.v_)(`tasks/${ee}/plus_or_cancel_praise.json`)}function N(ee,ie={}){return(0,_.v_)(`myshixuns/${ee}/repository.json`,ie)}function _e(ee,ie={}){return(0,_.U2)(`myshixuns/${ee}/start.json`,ie)}function Z(ee,ie={}){return(0,_.v_)(`myshixuns/${ee}/force_delete_pod.json`,ie)}function oe(ee,ie={}){return get(`myshixuns/${ee}/set_tpisession.json`,ie)}function L(ee){return get(`myshixuns/${ee}/reset_pod.json`)}function X(ee,ie){return(0,_.U2)(`myshixuns/${ee}/reset_pod.json`,ie)}function I(ee,ie){return(0,_.ZP)(`/api/tasks/${ee}/reboot_esc.json`,{method:"post",body:ie})}function j(ee){return(0,_.U2)(`tasks/${ee}/check_test_sets.json`)}function B(ee){return(0,_.U2)(`tasks/${ee}/get_answer_info.json`)}function q(ee){return(0,_.U2)(`tasks/${ee}/get_choose_answer.json`)}function fe(ee){return(0,_.U2)(`tasks/${ee}/unlock_choose_answer.json`)}function ke(ee,ie){return(0,_.U2)(`tasks/${ee}/unlock_answer.json`,{answer_id:ie})}function Ke(ee,ie,Ae,Se){return(0,_.v_)(`tasks/${ee}/set_games_status.json`,r({result:ie,data:Ae},Se||{}))}function Pe(ee,ie){return(0,_.U2)(`myshixuns/${ee}/active_pod.json`,ie)}function le(ee,ie){return(0,_.U2)(`tasks/${ee}/rank_list.json`,ie)}function me(ee,ie){return(0,_.v_)(`tasks/${ee}/close_windows_vnc.json`,{tpi_id:ie})}function Ie(ee,ie){return(0,_.U2)(`tasks/${ee}/commit_files.json`,ie)}function Me(ee,ie){return(0,_.U2)(`tasks/${ee}/pull_files.json`,ie)}function ve(ee,ie){return(0,_.v_)(`tasks/${ee}/log_output`,ie)}function Ce(ee,ie){return(0,_.U2)(`tasks/${ee}/stop_log_output.json`,ie)}function ye(ee){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${ee.id}/add_file.json`,{method:"post",body:ee})})}function we(ee){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${ee.id}/delete_git_file.json`,{method:"Delete",body:ee})})}function De(ee){return i(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${ee.id}/mv_file.json`,{method:"post",body:ee})})}function Xe(ee){return i(this,null,function*(){return ee.path&&(ee.path=encodeURIComponent(ee.path)),Fetch(`/api/tasks/${ee.id}/rep_content.json`,{method:"get",params:ee})})}function Ee(ee,ie){return(0,_.ZP)(`/api/shixuns/${ee}/set_start_permanent.json`,{method:"put",body:ie})}function Re(ee){return i(this,null,function*(){return(0,_.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:ee})})}function Oe(ee){return i(this,null,function*(){return(0,_.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:ee})})}},7621:function(Te,D,c){"use strict";c.d(D,{Z:function(){return h}});var _=c(35973),m={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},y=c(67294),h=({message:o,className:u,children:d,style:r={}})=>y.createElement("div",{className:`custom-spinner ${m.idsRingWrapper} ${u}`},y.createElement("div",{className:m.ldsRing},y.createElement("div",null),y.createElement("div",null),y.createElement("div",null),y.createElement("div",null)),o?y.createElement("p",{style:r},o):null,d,y.createElement(_.Outlet,null))},76621:function(Te,D,c){"use strict";c.d(D,{Z:function(){return y}});var _=c(67294),m=c(73935);class y extends _.Component{constructor(o){super(o);const u=window.document;this.node=u.createElement("div"),u.body.appendChild(this.node)}render(){const{children:o}=this.props;return(0,m.createPortal)(o,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},95458:function(Te,D,c){"use strict";c.r(D);var _=c(67294),m=c(35973),y=c(90512),h=c(18943),o=c(45954),u=c(33054),d=c(33170),r=c(67294),i=Object.defineProperty,a=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,t=(p,g,b)=>g in p?i(p,g,{enumerable:!0,configurable:!0,writable:!0,value:b}):p[g]=b,n=(p,g)=>{for(var b in g||(g={}))e.call(g,b)&&t(p,b,g[b]);if(a)for(var b of a(g))f.call(g,b)&&t(p,b,g[b]);return p},s=(p,g,b)=>new Promise((x,E)=>{var C=k=>{try{S(b.next(k))}catch(O){E(O)}},v=k=>{try{S(b.throw(k))}catch(O){E(O)}},S=k=>k.done?x(k.value):Promise.resolve(k.value).then(C,v);S((b=b.apply(p,g)).next())});const l=({classroomList:p,globalSetting:g,loading:b,dispatch:x})=>{var E;const[C,v]=(0,_.useState)({}),[S,k]=(0,_.useState)({}),O=(0,m.useParams)(),[R]=(0,m.useSearchParams)();let U="68yrbx3ech4a";switch(R.get("type")){case"windows":U="hvp5tzfof4wl";break;case"vnc":U="m3ifqz82epo9";break}let N;(0,_.useEffect)(()=>{_e()},[]),(0,_.useEffect)(()=>{C.host&&setTimeout(()=>{u.Z.publish("create-socket",1)},500)},[C]);const _e=()=>s(void 0,null,function*(){var Z,oe;const L=yield(0,d.ZP)(`/api/tasks/${R.get("taskId")||U||"68yrbx3ech4a"}.json`,{method:"get"});if(k(n({},L)),R.get("type")==="terminal"){const X=yield(0,d.ZP)(`/api/myshixuns/${(Z=L==null?void 0:L.myshixun)==null?void 0:Z.identifier}/start.json`,{method:"get",game_id:(oe=L==null?void 0:L.game)==null?void 0:oe.id});v(n({},(X==null?void 0:X.data)||{}))}R.get("type")});return r.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},R.get("type")==="terminal"&&r.createElement(y.Z,{sshConfigData:C,sid:1}),R.get("type")!=="terminal"&&(S==null?void 0:S.challenge)&&r.createElement(h.Z,{taskId:U,myshixunId:(E=S==null?void 0:S.myshixun)==null?void 0:E.identifier,vnc_url:R.get("type")==="vnc",window_vnc_url:R.get("type")==="windows",taskData:S}))};D.default=(0,m.connect)(({classroomList:p,loading:g,globalSetting:b})=>({classroomList:p,globalSetting:b,loading:g.models.classroomList}))(l)},18943:function(Te,D,c){"use strict";c.d(D,{Z:function(){return I}});var _=c(67294),m=c(14446),y=c(2453),h=c(38703),o=c(7621),u=c(91033),d=c(76621),r=c(35973),i=c(28706),a=c(69677),e=c(71577);const f=a.default.TextArea;var t=({onCancel:j,onSave:B,content:q})=>{const[fe,ke]=(0,_.useState)(q);function Ke(le){ke(le.target.value)}function Pe(){B(fe)}return(0,_.useEffect)(()=>{ke(q)},[q]),_.createElement("div",{className:"clipboard-box"},_.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),_.createElement(f,{value:fe,onChange:Ke,className:"clipboard"}),_.createElement("p",null," ",_.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," \u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002 "),_.createElement("p",null," ",_.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," \u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002 "),_.createElement("div",{className:"btn-action-container"},_.createElement(e.ZP,{type:"ghost",onClick:j,style:{marginRight:10}},"\u53D6\u6D88"),_.createElement(e.ZP,{type:"primary",onClick:Pe},"\u4FDD\u5B58")))},n=c(51959),s=c(31246),l=c(51256),p=c(33054),g=c(33170),b=c(67294),x=Object.defineProperty,E=Object.defineProperties,C=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,O=(j,B,q)=>B in j?x(j,B,{enumerable:!0,configurable:!0,writable:!0,value:q}):j[B]=q,R=(j,B)=>{for(var q in B||(B={}))S.call(B,q)&&O(j,q,B[q]);if(v)for(var q of v(B))k.call(B,q)&&O(j,q,B[q]);return j},U=(j,B)=>E(j,C(B)),N=(j,B,q)=>new Promise((fe,ke)=>{var Ke=me=>{try{le(q.next(me))}catch(Ie){ke(Ie)}},Pe=me=>{try{le(q.throw(me))}catch(Ie){ke(Ie)}},le=me=>me.done?fe(me.value):Promise.resolve(me.value).then(Ke,Pe);le((q=q.apply(j,B)).next())});function _e(j){return j.replace(/\\u([\dA-Za-z]{4})/g,function(B,q){return String.fromCharCode(parseInt("0x"+q))})}function Z(j){j||(j=window.location.search);let B=j.substr(1),q={};return B.split("&").forEach(function(fe){let ke=fe.split("=");q[ke[0]]=decodeURIComponent(ke[1])}),q}const oe={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var L=(j=>(j[j.SET_LOADING=0]="SET_LOADING",j[j.SET_IS_LARGE=1]="SET_IS_LARGE",j[j.SET_MES=2]="SET_MES",j[j.SET_STATE=3]="SET_STATE",j[j.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",j[j.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",j[j.UPDATE_ALL=6]="UPDATE_ALL",j))(L||{});function X(j,B){switch(B.type){case 0:return U(R({},j),{loading:B.payload});case 1:return R({},U(R({},j),{isLarge:B.payload}));case 2:return U(R({},j),{mes:B.payload});case 3:return R(R({},j),B.payload);case 5:return U(R({},j),{transferContent:B.payload});case 4:return U(R({},j),{showClipBoardBox:B.payload});case 6:return R({loading:j.loading},B.payload);default:throw new Error}}var I=({vnc_url:j,window_vnc_url:B,linux_vnc:q,virtual_machine:fe,taskData:ke,shixun_environment_id:Ke,tab_type:Pe,instance_startup_type:le,index_tab:me,tpi_type:Ie})=>{const Me=(0,_.useRef)(),ve=(0,_.useRef)(),Ce=(0,_.useRef)(),ye=(0,_.useRef)(),we=(0,_.useRef)(),De=(0,_.useRef)(),Xe=(0,_.useRef)(),Ee=(0,_.useRef)(),[Re,Oe]=(0,_.useReducer)(X,oe),[ee,ie]=(0,_.useState)(0),{mes:Ae,loading:Se,showClipBoardBox:he,isLarge:ae,transferContent:ce}=Re,V=(0,_.useRef)(),F=(0,_.useRef)(),[H]=(0,r.useSearchParams)();let[T,Q]=(0,_.useState)(0),de=(0,_.useRef)();const be=(0,r.useParams)();(0,_.useEffect)(()=>()=>{var G,P;(P=(G=ve.current)==null?void 0:G.disconnect)==null||P.call(G),clearTimeout(Ee.current),clearInterval(V.current)},[]),(0,_.useEffect)(()=>{F.current=Re.loading},[Re.loading]);const z=()=>{var G;le===2?setTimeout(()=>{Fe()},1500):((G=Ce==null?void 0:Ce.current)==null?void 0:G.resizeSession)!==void 0&&((0,n.vp)()?Ce.current.resizeSession=!0:setTimeout(()=>{},900))};(0,_.useEffect)(()=>(document.addEventListener((0,n.gH)(),z),()=>{document.removeEventListener((0,n.gH)(),z)}),[]);function A(){Oe({type:4,payload:!1})}function $(){Oe({type:1,payload:!ae})}function Y(G){return Me.current&&(ye.current=new u.Z(P=>{var W;for(let J of P)le===2&&Fe(),(J.target.offsetHeight>0||J.target.offsetWidth>0)&&G&&(G.scaleViewport=!0,(W=G==null?void 0:G._eventHandlers)==null||W.windowResize())}),ye.current.observe(Me.current)),ye.current}const se=()=>N(void 0,null,function*(){var G,P,W,J,Le,ge,xe;let Be={};H.get("type")==="exercises"?Be.exercise_id=H.get("exercisesId"):be.courseId&&be.homeworkId&&(Be.homework_common_id=be.homeworkId);const Ne=yield(0,s.sA)((G=ke.myshixun)==null?void 0:G.identifier,R(U(R({},be),{taskId:be.taskId,shixun_environment_id:Ke,tab_type:Pe}),Be));if((W=(P=Ne==null?void 0:Ne.data)==null?void 0:P.data_list)!=null&&W.length)return p.Z.publish("pod-restrict-data",{identifier:(J=Ne==null?void 0:Ne.data)==null?void 0:J.identifier,data_list:(Le=Ne==null?void 0:Ne.data)==null?void 0:Le.data_list}),Promise.reject();if((Ne==null?void 0:Ne.status)===-3)return new Promise((Ue,He)=>N(void 0,null,function*(){m.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>N(void 0,null,function*(){clearTimeout(de.current),Q(0),yield(0,s.fA)(be.taskId,Ne==null?void 0:Ne.message),ie(ee+1)})})}));if((Ne==null?void 0:Ne.status)===-1)throw new String(Ne==null?void 0:Ne.message);if((Ne==null?void 0:Ne.status)===0)return fe&&((0,i.d8)("PVEAuthCookie",(xe=(ge=Ne==null?void 0:Ne.data)==null?void 0:ge.cookie_options)==null?void 0:xe.cookies_value,1),(0,i.d8)("PVELangCookie","zh_CN",1)),p.Z.publish("update-windows-time",Ne==null?void 0:Ne.data),p.Z.publish("send-tabs-result-data",U(R({},Ne==null?void 0:Ne.data),{index_tab:me})),Ne});function pe(){Q(100),clearTimeout(de.current),setTimeout(()=>{Oe({type:0,payload:!1})},1300),clearTimeout(V.current)}const ne=()=>{Ce.current=null,Me.current.innerHTML="",Ce.current&&(Ce.current.removeEventListener("disconnect",re),Ce.current.removeEventListener("connect",pe),Ce.current.removeEventListener("clipboard",K)),Ce.current=new l.Z(Me.current,Xe.current,{credentials:{password:De.current},wsProtocols:["binary"],show_dot:!0}),ye.current=Y(Ce.current),Ce.current.viewOnly=be.view_only||!1,Ce.current.scaleViewport=be.scale||!0,Ce.current.showDotCursor=!0,Ce.current.resizeSession=!0,Ce.current.addEventListener("disconnect",re),Ce.current.addEventListener("connect",pe),Ce.current.addEventListener("clipboard",K)};function K(G){const P=_e(G.detail.text);Oe({type:5,payload:P})}function re(){if(B)Oe({type:0,payload:!0}),ie(ee+1);else{if(clearTimeout(Ee.current),ne(),F.current)return;Ee.current=setTimeout(()=>{ie(ee+1)},6e3)}setTimeout(()=>{var G,P;(P=(G=Ce.current)==null?void 0:G.connect)==null||P.call(G)},3e3)}(0,_.useEffect)(()=>{if(p.Z.subscribe(`reset-linux-windows-vnc-${me}`,()=>{ie(ee+1)}),(B||j||q||fe)&&Me.current){clearTimeout(de.current),le===2&&Fe(),new Promise(()=>N(void 0,null,function*(){var J,Le,ge,xe,Be;const Ne=Z();let Ue=yield se();if(q||fe){const He=(Le=(J=Ue==null?void 0:Ue.data)==null?void 0:J.link_url)!=null&&Le.includes("?")?"&":"?";we.current.src=((ge=Ue==null?void 0:Ue.data)==null?void 0:ge.link_url)+He+"time="+Date.now(),Oe({type:0,payload:!1});return}else if(B)De.current="Edu123",Xe.current=decodeURIComponent((xe=Ue==null?void 0:Ue.data)==null?void 0:xe.link_url);else{const He=new URL(decodeURIComponent((Be=Ue==null?void 0:Ue.data)==null?void 0:Be.link_url)),{protocol:$e,searchParams:je,host:Ve,search:Ye}=He,Ge=(0,i.en)(Ye);De.current=je.get("password"),Xe.current=`${$e==="https:"?"wss":"ws"}://${Ve}/${Ge.path||"websockify"}`}if(le===2){setTimeout(()=>{var He,$e,je,Ve;Y(),we.current.style.cssText=we.current.style.cssText+"width:1920px;height:1080px;position:initial",we.current.src=`${window.ENV==="build"?"/react/build/":""}/rdp.html?${(He=Ue==null?void 0:Ue.data)!=null&&He.gpPort?"gpPort="+(($e=Ue==null?void 0:Ue.data)==null?void 0:$e.gpPort)+"&password="+((je=Ue==null?void 0:Ue.data)==null?void 0:je.password)+"&":""}tpiId=${(Ve=ke==null?void 0:ke.myshixun)==null?void 0:Ve.id}&envId=${Ke}&tpiType=${Ie}`,Oe({type:0,payload:!1})},5e3);return}ne()}));const G=p.Z.subscribe(`vnc-reset-${me}`,J=>{if(J==="\u53D6\u6D88"){Oe({type:0,payload:!1});return}Q(0),Oe({type:3,payload:{loading:!0,mes:J||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),P=p.Z.subscribe(`send-ctrl-alt-delete-${me}`,()=>{var J;(J=Ce.current)==null||J.sendCtrlAltDel(),y.ZP.success("\u53D1\u9001\u6210\u529F")}),W=p.Z.subscribe(`show-clipboard-box-${me}`,()=>{Oe({type:4,payload:!0})});return Q(0),()=>{var J,Le,ge,xe;(J=Ce.current)==null||J.removeEventListener("disconnect",re),(Le=Ce.current)==null||Le.removeEventListener("connect",pe),(ge=Ce.current)==null||ge.removeEventListener("clipboard",K),G(),P(),W(),Me.current&&((xe=ye.current)==null||xe.unobserve(Me.current))}}},[j,B,q,ee,Ke,Pe]);function M(){var G,P;(P=(G=Ce.current)==null?void 0:G.sendKey)==null||P.call(G,135)}function ue(G){return N(this,null,function*(){var P;if(j){const W=G,J=yield(0,g.ZP)(`/api/tasks/${be.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(W),shixun_environment_id:Ke}});(J==null?void 0:J.status)===0&&(Oe({type:5,payload:G}),y.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A())}else(P=Ce.current)==null||P.clipboardPasteFrom(G),Oe({type:5,payload:G}),y.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A()})}function Fe(){var G,P;G=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),we.current.parentElement.className="wh1080p",we.current.parentElement.style.cssText=`transform:scale(${G});transform-origin:center center`,Me.current.style.cssText="translate(-50%, -50%) scale("+G+")"}(0,_.useEffect)(()=>{T==0&&(clearTimeout(de.current),w())},[T]);const w=()=>{T>99?T=99:(T=T+1,de.current=setTimeout(()=>{w()},1500)),T<100&&Q(T)},te=(0,_.useMemo)(()=>Se?"none":q||fe||B&&le===2?"block":"none",[q,Se,fe,B]);return b.createElement(_.Fragment,null,ae&&b.createElement("a",{className:"btn-vnc-resize",onClick:$},b.createElement("i",{className:"iconfont icon-tuichuquanping"})),b.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:te==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},b.createElement("div",null,b.createElement("iframe",{style:{position:ae?"fixed":"absolute",left:0,top:ae?40:0,width:"100%",height:`calc(100% - ${ae?"100px":"0px"})`},frameBorder:"0",ref:we,allowFullScreen:!0}))),b.createElement("div",{style:{position:ae?"fixed":"absolute",left:0,top:ae?40:0,zIndex:5,width:"100%",height:`calc(100% - ${ae?"100px":"0px"})`},className:`${B?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${ae?"full-screen":""}`},Se?b.createElement(o.Z,{message:Ae,style:{color:"#0152d9"}},b.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},b.createElement(h.Z,{percent:T,format:G=>b.createElement("span",{className:"c-white"},G,"%")}))):null,b.createElement("div",{ref:Me,className:`vnc-panel ${Se?"hidden zIndexf1":"animated fadeIn"}`})),b.createElement(d.Z,null,b.createElement(m.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:he,onCancel:A,footer:null},b.createElement(t,{onCancel:A,onSave:ue,content:ce}))))}},90512:function(Te,D,c){"use strict";c.d(D,{Z:function(){return S}});var _=c(67294),m=c(19575),y=c(12320),h=c(89629),o={"xterm-panel":"xterm-panel___XA0p9"},u=c(33054),d=c(91033),r=c(31246),i=c(35973),a=c(28706),e=c(14446),f=c(67294),t=Object.defineProperty,n=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,b=(k,O,R)=>O in k?t(k,O,{enumerable:!0,configurable:!0,writable:!0,value:R}):k[O]=R,x=(k,O)=>{for(var R in O||(O={}))p.call(O,R)&&b(k,R,O[R]);if(l)for(var R of l(O))g.call(O,R)&&b(k,R,O[R]);return k},E=(k,O)=>n(k,s(O)),C=(k,O,R)=>new Promise((U,N)=>{var _e=L=>{try{oe(R.next(L))}catch(X){N(X)}},Z=L=>{try{oe(R.throw(L))}catch(X){N(X)}},oe=L=>L.done?U(L.value):Promise.resolve(L.value).then(_e,Z);oe((R=R.apply(k,O)).next())});const v=3e4;var S=({itemData:k={},game:O,myshixun:R})=>{const U=(0,i.useParams)(),[N,_e]=(0,_.useState)(null),[Z,oe]=(0,_.useState)({}),{link_url:L,password:X,port:I}=Z,j=(0,_.useRef)(),B=(0,_.useRef)(),q=(0,_.useRef)(!1),fe=(0,_.useRef)(!1),ke=(0,_.useRef)(!0),Ke=(0,a.oP)(),[Pe]=(0,i.useSearchParams)(),{shixun_environment_id:le,position:me,tab_type:Ie,index_tab:Me,command_string:ve}=k;(0,_.useEffect)(()=>{we()},[]);function Ce(De,Xe,Ee){let Re=Ee._core._renderService.dimensions.actualCellWidth||9.5,Oe=Ee._core._renderService.dimensions.actualCellHeight||18;const ee=Math.floor(Xe/Oe);return[Math.floor(De/Re),ee]}function ye(De,Xe){const Ee=new d.Z(Re=>{for(let Oe of Re)if(Oe.target.offsetHeight>0||Oe.target.offsetWidth>0){const[ee,ie]=Ce(Oe.target.offsetWidth,Oe.target.offsetHeight,De);console.log("cols, rows",ee,ie),u.Z.publish(`ssh-xterm-resize-${Me}`,{columns:ee,rows:ie,width:Oe.target.offsetWidth,height:Oe.target.offsetHeight}),De.resize(ee,ie);const Ae=m.Base64.decode("IA=="),Se=m.Base64.decode("CBtbSw==");De.write(Ae),De.write(Se)}});return Ee.observe(Xe),Ee}function we(){return C(this,null,function*(){var De,Xe,Ee,Re,Oe;let ee={};Pe.get("type")==="exercises"?ee.exercise_id=Pe.get("exercisesId"):U.courseId&&U.homeworkId&&(ee.homework_common_id=U.homeworkId);const ie=yield(0,r.sA)(R==null?void 0:R.identifier,x(x({shixun_environment_id:le,tab_type:Ie,game_id:O.id},Ke),ee));if((Xe=(De=ie==null?void 0:ie.data)==null?void 0:De.data_list)!=null&&Xe.length){u.Z.publish("pod-restrict-data",{identifier:(Ee=ie==null?void 0:ie.data)==null?void 0:Ee.identifier,data_list:(Re=ie==null?void 0:ie.data)==null?void 0:Re.data_list});return}if((ie==null?void 0:ie.status)===-3)return new Promise((Ae,Se)=>C(this,null,function*(){e.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>C(this,null,function*(){yield closeWindowsVnc(U.taskId,ie==null?void 0:ie.message),init()})})}));if(((Oe=ie==null?void 0:ie.data)==null?void 0:Oe.code)===200036){e.default.confirm({centered:!0,icon:null,width:430,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:f.createElement("div",{className:"mb10"},"\u7531\u4E8E\u4E0A\u6B21\u7684\u5B9E\u9A8C\u73AF\u5883\u672A\u6B63\u5E38\u5173\u95ED\uFF0C\u65E0\u6CD5\u518D\u5F00\u542F\u65B0\u7684\u5B9E\u9A8C\u73AF\u5883,",f.createElement("br",null),f.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,r.VT)(R==null?void 0:R.identifier,{shixun_environment_id:le,tab_type:Ie,game_id:O.id}).then(Ae=>{(Ae==null?void 0:Ae.status)==0&&we()})}});return}(ie==null?void 0:ie.status)===0&&(u.Z.publish("update-windows-time",ie==null?void 0:ie.data),u.Z.publish("send-tabs-result-data",E(x({},ie==null?void 0:ie.data),{index_tab:Me})),oe(ie.data),setTimeout(()=>u.Z.publish(`create-socket-${Me}`),300))})}return(0,_.useEffect)(()=>{if(j.current&&L){const De=new y.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});De.open(j.current),De.onData(Ee=>{B.current&&B.current.readyState===1&&B.current.send(JSON.stringify({tp:"client",data:Ee}))}),De.write("Connecting..."),_e(De);const Xe=ye(De,j.current);return()=>{De.dispose(),j.current&&(Xe==null||Xe.unobserve(j.current))}}},[L,j.current]),(0,_.useEffect)(()=>{if(N&&L){let De=function(){const Re=new WebSocket(L);B.current=Re,Re.onopen=()=>{let ee=N.element.parentElement;if(ee){let ie=ee.offsetWidth,Ae=ee.offsetHeight;console.log("init",{tp:"init",data:E(x({},Z),{secret:X,width:ie,height:Ae,rows:N.rows,columns:N.cols})}),Re.send(JSON.stringify({tp:"init",data:E(x({},Z),{secret:X,width:ie,height:Ae,rows:N.rows,columns:N.cols})}))}N.focus()},Re.onerror=ee=>{console.log("------in socket error----",ee,Re,L)},Re.onmessage=ee=>{fe.current=!1,q.current||(N.write("\r"),setTimeout(()=>{},1e3)),q.current=!0,console.log("event:",ee);const ie=m.Base64.decode(ee.data.toString());let Ae=N._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",ie,Ae,N),N.write(ie),ve!=null&&ve.length?ke.current&&(ke.current=!1,setTimeout(()=>{B.current.send(JSON.stringify({tp:"client",data:(ve==null?void 0:ve.join("\r"))+"\r"})),N.setOption("disableStdin",!1)},1e3)):(ke.current=!1,N.setOption("disableStdin",!1))};const Oe=setInterval(()=>{var ee;B.current&&((ee=B.current)==null||ee.send(JSON.stringify({tp:"h"})))},v);Re.onclose=ee=>{Oe&&clearInterval(Oe),console.log(Oe,"tid",Me),fe.current||N.write(`\r
connection closed`),fe.current=!0,setTimeout(()=>{De()},1e4)}};const Xe=u.Z.subscribe(`create-socket-${Me}`,()=>{De()}),Ee=u.Z.subscribe(`ssh-xterm-resize-${Me}`,Re=>{B.current&&B.current.readyState===1&&B.current.send(JSON.stringify({tp:"resize",data:x({},Re)}))});return()=>{Xe(),Ee(),B.current&&(B.current.close(),q.current=!1)}}},[N,L,I]),f.createElement("div",{ref:j,className:o["xterm-panel"]},L?null:f.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},51959:function(Te,D,c){"use strict";c.d(D,{BU:function(){return m},Dj:function(){return _},gH:function(){return y},vp:function(){return h}});function _(o){try{o.mozRequestFullScreen?o.mozRequestFullScreen():o.webkitRequestFullScreen&&o.webkitRequestFullScreen()}catch(u){console.log(u,":e")}}function m(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const y=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function h(){var o=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,u=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",o),window.isFullScreen?window.isFullScreen:o!=null}},9708:function(Te,D,c){"use strict";c.d(D,{F:function(){return o},Z:function(){return h}});var _=c(94184),m=c.n(_);const y=null;function h(u,d,r){return m()({[`${u}-status-success`]:d==="success",[`${u}-status-warning`]:d==="warning",[`${u}-status-error`]:d==="error",[`${u}-status-validating`]:d==="validating",[`${u}-has-feedback`]:r})}const o=(u,d)=>d||u},82586:function(Te,D,c){"use strict";c.d(D,{Z:function(){return b},n:function(){return p}});var _=c(16646),m=c(94184),y=c.n(m),h=c(67656),o=c(17799),u=c(67294),d=c(9708),r=c(53124),i=c(98866),a=c(98675),e=c(65223),f=c(4173),t=c(72922),n=c(47673);function s(x){return!!(x.prefix||x.suffix||x.allowClear)}var l=function(x,E){var C={};for(var v in x)Object.prototype.hasOwnProperty.call(x,v)&&E.indexOf(v)<0&&(C[v]=x[v]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,v=Object.getOwnPropertySymbols(x);S<v.length;S++)E.indexOf(v[S])<0&&Object.prototype.propertyIsEnumerable.call(x,v[S])&&(C[v[S]]=x[v[S]]);return C};function p(x,E){if(!x)return;x.focus(E);const{cursor:C}=E||{};if(C){const v=x.value.length;switch(C){case"start":x.setSelectionRange(0,0);break;case"end":x.setSelectionRange(v,v);break;default:x.setSelectionRange(0,v);break}}}var b=(0,u.forwardRef)((x,E)=>{var C;const{prefixCls:v,bordered:S=!0,status:k,size:O,disabled:R,onBlur:U,onFocus:N,suffix:_e,allowClear:Z,addonAfter:oe,addonBefore:L,className:X,style:I,styles:j,rootClassName:B,onChange:q,classNames:fe}=x,ke=l(x,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Ke,direction:Pe,input:le}=u.useContext(r.E_),me=Ke("input",v),Ie=(0,u.useRef)(null),[Me,ve]=(0,n.ZP)(me),{compactSize:Ce,compactItemClassnames:ye}=(0,f.ri)(me,Pe),we=(0,a.Z)(H=>{var T;return(T=O!=null?O:Ce)!==null&&T!==void 0?T:H}),De=u.useContext(i.Z),Xe=R!=null?R:De,{status:Ee,hasFeedback:Re,feedbackIcon:Oe}=(0,u.useContext)(e.aM),ee=(0,d.F)(Ee,k),ie=s(x)||!!Re,Ae=(0,u.useRef)(ie);(0,u.useEffect)(()=>{var H;ie&&Ae.current,Ae.current=ie},[ie]);const Se=(0,t.Z)(Ie,!0),he=H=>{Se(),U==null||U(H)},ae=H=>{Se(),N==null||N(H)},ce=H=>{Se(),q==null||q(H)},V=(Re||_e)&&u.createElement(u.Fragment,null,_e,Re&&Oe);let F;return typeof Z=="object"&&(Z!=null&&Z.clearIcon)?F=Z:Z&&(F={clearIcon:u.createElement(_.Z,null)}),Me(u.createElement(h.default,Object.assign({ref:(0,o.sQ)(E,Ie),prefixCls:me,autoComplete:le==null?void 0:le.autoComplete},ke,{disabled:Xe,onBlur:he,onFocus:ae,style:Object.assign(Object.assign({},le==null?void 0:le.style),I),styles:Object.assign(Object.assign({},le==null?void 0:le.styles),j),suffix:V,allowClear:F,className:y()(X,B,ye,le==null?void 0:le.className),onChange:ce,addonAfter:oe&&u.createElement(f.BR,null,u.createElement(e.Ux,{override:!0,status:!0},oe)),addonBefore:L&&u.createElement(f.BR,null,u.createElement(e.Ux,{override:!0,status:!0},L)),classNames:Object.assign(Object.assign(Object.assign({},fe),le==null?void 0:le.classNames),{input:y()({[`${me}-sm`]:we==="small",[`${me}-lg`]:we==="large",[`${me}-rtl`]:Pe==="rtl",[`${me}-borderless`]:!S},!ie&&(0,d.Z)(me,ee),fe==null?void 0:fe.input,(C=le==null?void 0:le.classNames)===null||C===void 0?void 0:C.input,ve)}),classes:{affixWrapper:y()({[`${me}-affix-wrapper-sm`]:we==="small",[`${me}-affix-wrapper-lg`]:we==="large",[`${me}-affix-wrapper-rtl`]:Pe==="rtl",[`${me}-affix-wrapper-borderless`]:!S},(0,d.Z)(`${me}-affix-wrapper`,ee,Re),ve),wrapper:y()({[`${me}-group-rtl`]:Pe==="rtl"},ve),group:y()({[`${me}-group-wrapper-sm`]:we==="small",[`${me}-group-wrapper-lg`]:we==="large",[`${me}-group-wrapper-rtl`]:Pe==="rtl",[`${me}-group-wrapper-disabled`]:Xe},(0,d.Z)(`${me}-group-wrapper`,ee,Re),ve)}})))})},96330:function(Te,D,c){"use strict";var _=c(16646),m=c(94184),y=c.n(m),h=c(64701),o=c(67294),u=c(9708),d=c(53124),r=c(98866),i=c(98675),a=c(65223),e=c(82586),f=c(47673),t=function(s,l){var p={};for(var g in s)Object.prototype.hasOwnProperty.call(s,g)&&l.indexOf(g)<0&&(p[g]=s[g]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var b=0,g=Object.getOwnPropertySymbols(s);b<g.length;b++)l.indexOf(g[b])<0&&Object.prototype.propertyIsEnumerable.call(s,g[b])&&(p[g[b]]=s[g[b]]);return p};const n=(0,o.forwardRef)((s,l)=>{const{prefixCls:p,bordered:g=!0,size:b,disabled:x,status:E,allowClear:C,showCount:v,classNames:S,rootClassName:k,className:O}=s,R=t(s,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:U,direction:N}=o.useContext(d.E_),_e=(0,i.Z)(b),Z=o.useContext(r.Z),oe=x!=null?x:Z,{status:L,hasFeedback:X,feedbackIcon:I}=o.useContext(a.aM),j=(0,u.F)(L,E),B=o.useRef(null);o.useImperativeHandle(l,()=>{var Pe;return{resizableTextArea:(Pe=B.current)===null||Pe===void 0?void 0:Pe.resizableTextArea,focus:le=>{var me,Ie;(0,e.n)((Ie=(me=B.current)===null||me===void 0?void 0:me.resizableTextArea)===null||Ie===void 0?void 0:Ie.textArea,le)},blur:()=>{var le;return(le=B.current)===null||le===void 0?void 0:le.blur()}}});const q=U("input",p);let fe;typeof C=="object"&&(C!=null&&C.clearIcon)?fe=C:C&&(fe={clearIcon:o.createElement(_.Z,null)});const[ke,Ke]=(0,f.ZP)(q);return ke(o.createElement(h.default,Object.assign({},R,{disabled:oe,allowClear:fe,className:y()(O,k),classes:{affixWrapper:y()(`${q}-textarea-affix-wrapper`,{[`${q}-affix-wrapper-rtl`]:N==="rtl",[`${q}-affix-wrapper-borderless`]:!g,[`${q}-affix-wrapper-sm`]:_e==="small",[`${q}-affix-wrapper-lg`]:_e==="large",[`${q}-textarea-show-count`]:v},(0,u.Z)(`${q}-affix-wrapper`,j),Ke)},classNames:Object.assign(Object.assign({},S),{textarea:y()({[`${q}-borderless`]:!g,[`${q}-sm`]:_e==="small",[`${q}-lg`]:_e==="large"},(0,u.Z)(q,j),Ke,S==null?void 0:S.textarea)}),prefixCls:q,suffix:X&&o.createElement("span",{className:`${q}-textarea-suffix`},I),showCount:v,ref:B})))});D.Z=n},72922:function(Te,D,c){"use strict";c.d(D,{Z:function(){return m}});var _=c(67294);function m(y,h){const o=(0,_.useRef)([]),u=()=>{o.current.push(setTimeout(()=>{var d,r,i,a;!((d=y.current)===null||d===void 0)&&d.input&&((r=y.current)===null||r===void 0?void 0:r.input.getAttribute("type"))==="password"&&(!((i=y.current)===null||i===void 0)&&i.input.hasAttribute("value"))&&((a=y.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return(0,_.useEffect)(()=>(h&&u(),()=>o.current.forEach(d=>{d&&clearTimeout(d)})),[]),u}},69677:function(Te,D,c){"use strict";c.d(D,{default:function(){return _e}});var _=c(94184),m=c.n(_),y=c(67294),h=c(53124),o=c(65223),u=c(47673),r=Z=>{const{getPrefixCls:oe,direction:L}=(0,y.useContext)(h.E_),{prefixCls:X,className:I}=Z,j=oe("input-group",X),B=oe("input"),[q,fe]=(0,u.ZP)(B),ke=m()(j,{[`${j}-lg`]:Z.size==="large",[`${j}-sm`]:Z.size==="small",[`${j}-compact`]:Z.compact,[`${j}-rtl`]:L==="rtl"},fe,I),Ke=(0,y.useContext)(o.aM),Pe=(0,y.useMemo)(()=>Object.assign(Object.assign({},Ke),{isFormItemInput:!1}),[Ke]);return q(y.createElement("span",{className:ke,style:Z.style,onMouseEnter:Z.onMouseEnter,onMouseLeave:Z.onMouseLeave,onFocus:Z.onFocus,onBlur:Z.onBlur},y.createElement(o.aM.Provider,{value:Pe},Z.children)))},i=c(82586),a=c(63237),e=c(99569),f=c(10366),t=c(17799),n=c(72922),s=function(Z,oe){var L={};for(var X in Z)Object.prototype.hasOwnProperty.call(Z,X)&&oe.indexOf(X)<0&&(L[X]=Z[X]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,X=Object.getOwnPropertySymbols(Z);I<X.length;I++)oe.indexOf(X[I])<0&&Object.prototype.propertyIsEnumerable.call(Z,X[I])&&(L[X[I]]=Z[X[I]]);return L};const l=Z=>Z?y.createElement(e.Z,null):y.createElement(a.Z,null),p={click:"onClick",hover:"onMouseOver"};var b=y.forwardRef((Z,oe)=>{const{visibilityToggle:L=!0}=Z,X=typeof L=="object"&&L.visible!==void 0,[I,j]=(0,y.useState)(()=>X?L.visible:!1),B=(0,y.useRef)(null);y.useEffect(()=>{X&&j(L.visible)},[X,L]);const q=(0,n.Z)(B),fe=()=>{const{disabled:Xe}=Z;Xe||(I&&q(),j(Ee=>{var Re;const Oe=!Ee;return typeof L=="object"&&((Re=L.onVisibleChange)===null||Re===void 0||Re.call(L,Oe)),Oe}))},ke=Xe=>{const{action:Ee="click",iconRender:Re=l}=Z,Oe=p[Ee]||"",ee=Re(I),ie={[Oe]:fe,className:`${Xe}-icon`,key:"passwordIcon",onMouseDown:Ae=>{Ae.preventDefault()},onMouseUp:Ae=>{Ae.preventDefault()}};return y.cloneElement(y.isValidElement(ee)?ee:y.createElement("span",null,ee),ie)},{className:Ke,prefixCls:Pe,inputPrefixCls:le,size:me}=Z,Ie=s(Z,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Me}=y.useContext(h.E_),ve=Me("input",le),Ce=Me("input-password",Pe),ye=L&&ke(Ce),we=m()(Ce,Ke,{[`${Ce}-${me}`]:!!me}),De=Object.assign(Object.assign({},(0,f.Z)(Ie,["suffix","iconRender","visibilityToggle"])),{type:I?"text":"password",className:we,prefixCls:ve,suffix:ye});return me&&(De.size=me),y.createElement(i.Z,Object.assign({ref:(0,t.sQ)(oe,B)},De))}),x=c(72395),E=c(96159),C=c(71577),v=c(98675),S=c(4173),k=function(Z,oe){var L={};for(var X in Z)Object.prototype.hasOwnProperty.call(Z,X)&&oe.indexOf(X)<0&&(L[X]=Z[X]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,X=Object.getOwnPropertySymbols(Z);I<X.length;I++)oe.indexOf(X[I])<0&&Object.prototype.propertyIsEnumerable.call(Z,X[I])&&(L[X[I]]=Z[X[I]]);return L},R=y.forwardRef((Z,oe)=>{const{prefixCls:L,inputPrefixCls:X,className:I,size:j,suffix:B,enterButton:q=!1,addonAfter:fe,loading:ke,disabled:Ke,onSearch:Pe,onChange:le,onCompositionStart:me,onCompositionEnd:Ie}=Z,Me=k(Z,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:ve,direction:Ce}=y.useContext(h.E_),ye=y.useRef(!1),we=ve("input-search",L),De=ve("input",X),{compactSize:Xe}=(0,S.ri)(we,Ce),Ee=(0,v.Z)(Q=>{var de;return(de=j!=null?j:Xe)!==null&&de!==void 0?de:Q}),Re=y.useRef(null),Oe=Q=>{Q&&Q.target&&Q.type==="click"&&Pe&&Pe(Q.target.value,Q,{source:"clear"}),le&&le(Q)},ee=Q=>{var de;document.activeElement===((de=Re.current)===null||de===void 0?void 0:de.input)&&Q.preventDefault()},ie=Q=>{var de,be;Pe&&Pe((be=(de=Re.current)===null||de===void 0?void 0:de.input)===null||be===void 0?void 0:be.value,Q,{source:"input"})},Ae=Q=>{ye.current||ke||ie(Q)},Se=typeof q=="boolean"?y.createElement(x.Z,null):null,he=`${we}-button`;let ae;const ce=q||{},V=ce.type&&ce.type.__ANT_BUTTON===!0;V||ce.type==="button"?ae=(0,E.Tm)(ce,Object.assign({onMouseDown:ee,onClick:Q=>{var de,be;(be=(de=ce==null?void 0:ce.props)===null||de===void 0?void 0:de.onClick)===null||be===void 0||be.call(de,Q),ie(Q)},key:"enterButton"},V?{className:he,size:Ee}:{})):ae=y.createElement(C.ZP,{className:he,type:q?"primary":void 0,size:Ee,disabled:Ke,key:"enterButton",onMouseDown:ee,onClick:ie,loading:ke,icon:Se},q),fe&&(ae=[ae,(0,E.Tm)(fe,{key:"addonAfter"})]);const F=m()(we,{[`${we}-rtl`]:Ce==="rtl",[`${we}-${Ee}`]:!!Ee,[`${we}-with-button`]:!!q},I),H=Q=>{ye.current=!0,me==null||me(Q)},T=Q=>{ye.current=!1,Ie==null||Ie(Q)};return y.createElement(i.Z,Object.assign({ref:(0,t.sQ)(Re,oe),onPressEnter:Ae},Me,{size:Ee,onCompositionStart:H,onCompositionEnd:T,prefixCls:De,addonAfter:ae,suffix:B,onChange:Oe,className:F,disabled:Ke}))}),U=c(96330);const N=i.Z;N.Group=r,N.Search=R,N.TextArea=U.Z,N.Password=b;var _e=N},47673:function(Te,D,c){"use strict";c.d(D,{M1:function(){return d},TM:function(){return E},Xy:function(){return r},bi:function(){return e},e5:function(){return x},ik:function(){return f},nz:function(){return o},pU:function(){return u},s7:function(){return t},x0:function(){return a}});var _=c(14747),m=c(80110),y=c(45503),h=c(67968);const o=C=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:C,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),u=C=>({borderColor:C.hoverBorderColor}),d=C=>({borderColor:C.activeBorderColor,boxShadow:C.activeShadow,outline:0}),r=C=>({color:C.colorTextDisabled,backgroundColor:C.colorBgContainerDisabled,borderColor:C.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},u((0,y.TS)(C,{hoverBorderColor:C.colorBorder})))}),i=C=>{const{paddingBlockLG:v,fontSizeLG:S,lineHeightLG:k,borderRadiusLG:O,paddingInlineLG:R}=C;return{padding:`${v}px ${R}px`,fontSize:S,lineHeight:k,borderRadius:O}},a=C=>({padding:`${C.paddingBlockSM}px ${C.paddingInlineSM}px`,borderRadius:C.borderRadiusSM}),e=(C,v)=>{const{componentCls:S,colorError:k,colorWarning:O,errorActiveShadow:R,warningActiveShadow:U,colorErrorBorderHover:N,colorWarningBorderHover:_e}=C;return{[`&-status-error:not(${v}-disabled):not(${v}-borderless)${v}`]:{borderColor:k,"&:hover":{borderColor:N},"&:focus, &-focused":Object.assign({},d((0,y.TS)(C,{activeBorderColor:k,activeShadow:R}))),[`${S}-prefix, ${S}-suffix`]:{color:k}},[`&-status-warning:not(${v}-disabled):not(${v}-borderless)${v}`]:{borderColor:O,"&:hover":{borderColor:_e},"&:focus, &-focused":Object.assign({},d((0,y.TS)(C,{activeBorderColor:O,activeShadow:U}))),[`${S}-prefix, ${S}-suffix`]:{color:O}}}},f=C=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${C.paddingBlock}px ${C.paddingInline}px`,color:C.colorText,fontSize:C.fontSize,lineHeight:C.lineHeight,backgroundColor:C.colorBgContainer,backgroundImage:"none",borderWidth:C.lineWidth,borderStyle:C.lineType,borderColor:C.colorBorder,borderRadius:C.borderRadius,transition:`all ${C.motionDurationMid}`},o(C.colorTextPlaceholder)),{"&:hover":Object.assign({},u(C)),"&:focus, &-focused":Object.assign({},d(C)),"&-disabled, &[disabled]":Object.assign({},r(C)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:C.controlHeight,lineHeight:C.lineHeight,verticalAlign:"bottom",transition:`all ${C.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},i(C)),"&-sm":Object.assign({},a(C)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),t=C=>{const{componentCls:v,antCls:S}=C;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:C.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${v}, &-lg > ${v}-group-addon`]:Object.assign({},i(C)),[`&-sm ${v}, &-sm > ${v}-group-addon`]:Object.assign({},a(C)),[`&-lg ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightLG},[`&-sm ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightSM},[`> ${v}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${v}-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 ${C.paddingInline}px`,color:C.colorText,fontWeight:"normal",fontSize:C.fontSize,textAlign:"center",backgroundColor:C.colorFillAlter,border:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`,borderRadius:C.borderRadius,transition:`all ${C.motionDurationSlow}`,lineHeight:1,[`${S}-select`]:{margin:`-${C.paddingBlock+1}px -${C.paddingInline}px`,[`&${S}-select-single:not(${S}-select-customize-input)`]:{[`${S}-select-selector`]:{backgroundColor:"inherit",border:`${C.lineWidth}px ${C.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${S}-select-selector`]:{color:C.colorPrimary}}},[`${S}-cascader-picker`]:{margin:`-9px -${C.paddingInline}px`,backgroundColor:"transparent",[`${S}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${v}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${v}-search-with-button &`]:{zIndex:0}}},[`> ${v}:first-child, ${v}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${v}-affix-wrapper`]:{[`&:not(:first-child) ${v}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${v}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${v}:last-child, ${v}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${v}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${v}-search &`]:{borderStartStartRadius:C.borderRadius,borderEndStartRadius:C.borderRadius}},[`&:not(:first-child), ${v}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${v}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,_.dF)()),{[`${v}-group-addon, ${v}-group-wrap, > ${v}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:C.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${v}-affix-wrapper,
& > ${v}-number-affix-wrapper,
& > ${S}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-C.lineWidth,borderInlineEndWidth:C.lineWidth},[`${v}`]:{float:"none"},[`& > ${S}-select > ${S}-select-selector,
& > ${S}-select-auto-complete ${v},
& > ${S}-cascader-picker ${v},
& > ${v}-group-wrapper ${v}`]:{borderInlineEndWidth:C.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${S}-select-focused`]:{zIndex:1},[`& > ${S}-select > ${S}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${S}-select:first-child > ${S}-select-selector,
& > ${S}-select-auto-complete:first-child ${v},
& > ${S}-cascader-picker:first-child ${v}`]:{borderStartStartRadius:C.borderRadius,borderEndStartRadius:C.borderRadius},[`& > *:last-child,
& > ${S}-select:last-child > ${S}-select-selector,
& > ${S}-cascader-picker:last-child ${v},
& > ${S}-cascader-picker-focused:last-child ${v}`]:{borderInlineEndWidth:C.lineWidth,borderStartEndRadius:C.borderRadius,borderEndEndRadius:C.borderRadius},[`& > ${S}-select-auto-complete ${v}`]:{verticalAlign:"top"},[`${v}-group-wrapper + ${v}-group-wrapper`]:{marginInlineStart:-C.lineWidth,[`${v}-affix-wrapper`]:{borderRadius:0}},[`${v}-group-wrapper:not(:last-child)`]:{[`&${v}-search > ${v}-group`]:{[`& > ${v}-group-addon > ${v}-search-button`]:{borderRadius:0},[`& > ${v}`]:{borderStartStartRadius:C.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:C.borderRadius}}}})}},n=C=>{const{componentCls:v,controlHeightSM:S,lineWidth:k}=C,R=(S-k*2-16)/2;return{[v]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,_.Wf)(C)),f(C)),e(C,v)),{'&[type="color"]':{height:C.controlHeight,[`&${v}-lg`]:{height:C.controlHeightLG},[`&${v}-sm`]:{height:S,paddingTop:R,paddingBottom:R}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},s=C=>{const{componentCls:v}=C;return{[`${v}-clear-icon`]:{margin:0,color:C.colorTextQuaternary,fontSize:C.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${C.motionDurationSlow}`,"&:hover":{color:C.colorTextTertiary},"&:active":{color:C.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${C.inputAffixPadding}px`}}}},l=C=>{const{componentCls:v,inputAffixPadding:S,colorTextDescription:k,motionDurationSlow:O,colorIcon:R,colorIconHover:U,iconCls:N}=C;return{[`${v}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},f(C)),{display:"inline-flex",[`&:not(${v}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},u(C)),{zIndex:1,[`${v}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${v}[disabled]`]:{background:"transparent"}},[`> input${v}`]:{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"'},[`${v}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:C.paddingXS}},"&-show-count-suffix":{color:k},"&-show-count-has-suffix":{marginInlineEnd:C.paddingXXS},"&-prefix":{marginInlineEnd:S},"&-suffix":{marginInlineStart:S}}}),s(C)),{[`${N}${v}-password-icon`]:{color:R,cursor:"pointer",transition:`all ${O}`,"&:hover":{color:U}}}),e(C,`${v}-affix-wrapper`))}},p=C=>{const{componentCls:v,colorError:S,colorWarning:k,borderRadiusLG:O,borderRadiusSM:R}=C;return{[`${v}-group`]:Object.assign(Object.assign(Object.assign({},(0,_.Wf)(C)),t(C)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${v}-group-addon`]:{borderRadius:O,fontSize:C.fontSizeLG}},"&-sm":{[`${v}-group-addon`]:{borderRadius:R}},"&-status-error":{[`${v}-group-addon`]:{color:S,borderColor:S}},"&-status-warning":{[`${v}-group-addon`]:{color:k,borderColor:k}},"&-disabled":{[`${v}-group-addon`]:Object.assign({},r(C))},[`&:not(${v}-compact-first-item):not(${v}-compact-last-item)${v}-compact-item`]:{[`${v}, ${v}-group-addon`]:{borderRadius:0}},[`&:not(${v}-compact-last-item)${v}-compact-first-item`]:{[`${v}, ${v}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${v}-compact-first-item)${v}-compact-last-item`]:{[`${v}, ${v}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},g=C=>{const{componentCls:v,antCls:S}=C,k=`${v}-search`;return{[k]:{[`${v}`]:{"&:hover, &:focus":{borderColor:C.colorPrimaryHover,[`+ ${v}-group-addon ${k}-button:not(${S}-btn-primary)`]:{borderInlineStartColor:C.colorPrimaryHover}}},[`${v}-affix-wrapper`]:{borderRadius:0},[`${v}-lg`]:{lineHeight:C.lineHeightLG-2e-4},[`> ${v}-group`]:{[`> ${v}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${k}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:C.borderRadius,borderEndEndRadius:C.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${k}-button:not(${S}-btn-primary)`]:{color:C.colorTextDescription,"&:hover":{color:C.colorPrimaryHover},"&:active":{color:C.colorPrimaryActive},[`&${S}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${k}-button`]:{height:C.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${k}-button`]:{height:C.controlHeightLG},[`&-small ${k}-button`]:{height:C.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${v}-compact-item`]:{[`&:not(${v}-compact-last-item)`]:{[`${v}-group-addon`]:{[`${v}-search-button`]:{marginInlineEnd:-C.lineWidth,borderRadius:0}}},[`&:not(${v}-compact-first-item)`]:{[`${v},${v}-affix-wrapper`]:{borderRadius:0}},[`> ${v}-group-addon ${v}-search-button,
> ${v},
${v}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${v}-affix-wrapper-focused`]:{zIndex:2}}}}},b=C=>{const{componentCls:v,paddingLG:S}=C,k=`${v}-textarea`;return{[k]:{position:"relative","&-show-count":{[`> ${v}`]:{height:"100%"},[`${v}-data-count`]:{position:"absolute",bottom:-C.fontSize*C.lineHeight,insetInlineEnd:0,color:C.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${v}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${k}-has-feedback`]:{[`${v}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${v}-affix-wrapper`]:{padding:0,[`> textarea${v}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${v}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${v}-clear-icon`]:{position:"absolute",insetInlineEnd:C.paddingXS,insetBlockStart:C.paddingXS},[`${k}-suffix`]:{position:"absolute",top:0,insetInlineEnd:C.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function x(C){return(0,y.TS)(C,{inputAffixPadding:C.paddingXXS})}const E=C=>{const{controlHeight:v,fontSize:S,lineHeight:k,lineWidth:O,controlHeightSM:R,controlHeightLG:U,fontSizeLG:N,lineHeightLG:_e,paddingSM:Z,controlPaddingHorizontalSM:oe,controlPaddingHorizontal:L,colorFillAlter:X,colorPrimaryHover:I,controlOutlineWidth:j,controlOutline:B,colorErrorOutline:q,colorWarningOutline:fe}=C;return{paddingBlock:Math.max(Math.round((v-S*k)/2*10)/10-O,3),paddingBlockSM:Math.max(Math.round((R-S*k)/2*10)/10-O,0),paddingBlockLG:Math.ceil((U-N*_e)/2*10)/10-O,paddingInline:Z-O,paddingInlineSM:oe-O,paddingInlineLG:L-O,addonBg:X,activeBorderColor:I,hoverBorderColor:I,activeShadow:`0 0 0 ${j}px ${B}`,errorActiveShadow:`0 0 0 ${j}px ${q}`,warningActiveShadow:`0 0 0 ${j}px ${fe}`}};D.ZP=(0,h.Z)("Input",C=>{const v=(0,y.TS)(C,x(C));return[n(v),b(v),l(v),p(v),g(v),(0,m.c)(v)]},E)},38703:function(Te,D,c){"use strict";c.d(D,{Z:function(){return be}});var _=c(67294),m=c(87725),y=c(18299),h=c(16646),o=c(73475),u=c(94184),d=c.n(u),r=c(10366),i=c(53124),a=c(87462),e=c(1413),f=c(45987),t={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},n=function(){var A=(0,_.useRef)([]),$=(0,_.useRef)(null);return(0,_.useEffect)(function(){var Y=Date.now(),se=!1;A.current.forEach(function(pe){if(pe){se=!0;var ne=pe.style;ne.transitionDuration=".3s, .3s, .3s, .06s",$.current&&Y-$.current<100&&(ne.transitionDuration="0s, 0s")}}),se&&($.current=Date.now())}),A.current},s=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],l=function(A){var $=(0,e.Z)((0,e.Z)({},t),A),Y=$.className,se=$.percent,pe=$.prefixCls,ne=$.strokeColor,K=$.strokeLinecap,re=$.strokeWidth,M=$.style,ue=$.trailColor,Fe=$.trailWidth,w=$.transition,te=(0,f.Z)($,s);delete te.gapPosition;var G=Array.isArray(se)?se:[se],P=Array.isArray(ne)?ne:[ne],W=n(),J=re/2,Le=100-re/2,ge="M ".concat(K==="round"?J:0,",").concat(J,`
L `).concat(K==="round"?Le:100,",").concat(J),xe="0 0 100 ".concat(re),Be=0;return _.createElement("svg",(0,a.Z)({className:d()("".concat(pe,"-line"),Y),viewBox:xe,preserveAspectRatio:"none",style:M},te),_.createElement("path",{className:"".concat(pe,"-line-trail"),d:ge,strokeLinecap:K,stroke:ue,strokeWidth:Fe||re,fillOpacity:"0"}),G.map(function(Ne,Ue){var He=1;switch(K){case"round":He=1-re/100;break;case"square":He=1-re/2/100;break;default:He=1;break}var $e={strokeDasharray:"".concat(Ne*He,"px, 100px"),strokeDashoffset:"-".concat(Be,"px"),transition:w||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},je=P[Ue]||P[P.length-1];return Be+=Ne,_.createElement("path",{key:Ue,className:"".concat(pe,"-line-path"),d:ge,strokeLinecap:K,stroke:je,strokeWidth:re,fillOpacity:"0",ref:function(Ye){W[Ue]=Ye},style:$e})}))},p=l,g=c(71002),b=c(97685),x=c(98924),E=0,C=(0,x.Z)();function v(){var z;return C?(z=E,E+=1):z="TEST_OR_SSR",z}var S=function(z){var A=_.useState(),$=(0,b.Z)(A,2),Y=$[0],se=$[1];return _.useEffect(function(){se("rc_progress_".concat(v()))},[]),z||Y},k=function(A){var $=A.bg,Y=A.children;return _.createElement("div",{style:{width:"100%",height:"100%",background:$}},Y)};function O(z,A){return Object.keys(z).map(function($){var Y=parseFloat($),se="".concat(Math.floor(Y*A),"%");return"".concat(z[$]," ").concat(se)})}var R=_.forwardRef(function(z,A){var $=z.prefixCls,Y=z.color,se=z.gradientId,pe=z.radius,ne=z.style,K=z.ptg,re=z.strokeLinecap,M=z.strokeWidth,ue=z.size,Fe=z.gapDegree,w=Y&&(0,g.Z)(Y)==="object",te=w?"#FFF":void 0,G=ue/2,P=_.createElement("circle",{className:"".concat($,"-circle-path"),r:pe,cx:G,cy:G,stroke:te,strokeLinecap:re,strokeWidth:M,opacity:K===0?0:1,style:ne,ref:A});if(!w)return P;var W="".concat(se,"-conic"),J=Fe?"".concat(180+Fe/2,"deg"):"0deg",Le=O(Y,(360-Fe)/360),ge=O(Y,1),xe="conic-gradient(from ".concat(J,", ").concat(Le.join(", "),")"),Be="linear-gradient(to ".concat(Fe?"bottom":"top",", ").concat(ge.join(", "),")");return _.createElement(_.Fragment,null,_.createElement("mask",{id:W},P),_.createElement("foreignObject",{x:0,y:0,width:ue,height:ue,mask:"url(#".concat(W,")")},_.createElement(k,{bg:Be},_.createElement(k,{bg:xe}))))}),U=R,N=100,_e=function(A,$,Y,se,pe,ne,K,re,M,ue){var Fe=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,w=Y/100*360*((360-ne)/360),te=ne===0?0:{bottom:0,top:180,left:90,right:-90}[K],G=(100-se)/100*$;M==="round"&&se!==100&&(G+=ue/2,G>=$&&(G=$-.01));var P=N/2;return{stroke:typeof re=="string"?re:void 0,strokeDasharray:"".concat($,"px ").concat(A),strokeDashoffset:G+Fe,transform:"rotate(".concat(pe+w+te,"deg)"),transformOrigin:"".concat(P,"px ").concat(P,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Z=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function oe(z){var A=z!=null?z:[];return Array.isArray(A)?A:[A]}var L=function(A){var $=(0,e.Z)((0,e.Z)({},t),A),Y=$.id,se=$.prefixCls,pe=$.steps,ne=$.strokeWidth,K=$.trailWidth,re=$.gapDegree,M=re===void 0?0:re,ue=$.gapPosition,Fe=$.trailColor,w=$.strokeLinecap,te=$.style,G=$.className,P=$.strokeColor,W=$.percent,J=(0,f.Z)($,Z),Le=N/2,ge=S(Y),xe="".concat(ge,"-gradient"),Be=Le-ne/2,Ne=Math.PI*2*Be,Ue=M>0?90+M/2:-90,He=Ne*((360-M)/360),$e=(0,g.Z)(pe)==="object"?pe:{count:pe,space:2},je=$e.count,Ve=$e.space,Ye=oe(W),Ge=oe(P),ze=Ge.find(function(Je){return Je&&(0,g.Z)(Je)==="object"}),qe=ze&&(0,g.Z)(ze)==="object",Ze=qe?"butt":w,rt=_e(Ne,He,0,100,Ue,M,ue,Fe,Ze,ne),tt=n(),it=function(){var We=0;return Ye.map(function(Qe,et){var nt=Ge[et]||Ge[Ge.length-1],ot=_e(Ne,He,We,Qe,Ue,M,ue,nt,Ze,ne);return We+=Qe,_.createElement(U,{key:et,color:nt,ptg:Qe,radius:Be,prefixCls:se,gradientId:xe,style:ot,strokeLinecap:Ze,strokeWidth:ne,gapDegree:M,ref:function(lt){tt[et]=lt},size:N})}).reverse()},at=function(){var We=Math.round(je*(Ye[0]/100)),Qe=100/je,et=0;return new Array(je).fill(null).map(function(nt,ot){var st=ot<=We-1?Ge[0]:Fe,lt=st&&(0,g.Z)(st)==="object"?"url(#".concat(xe,")"):void 0,ct=_e(Ne,He,et,Qe,Ue,M,ue,st,"butt",ne,Ve);return et+=(He-ct.strokeDashoffset+Ve)*100/He,_.createElement("circle",{key:ot,className:"".concat(se,"-circle-path"),r:Be,cx:Le,cy:Le,stroke:lt,strokeWidth:ne,opacity:1,style:ct,ref:function(ut){tt[ot]=ut}})})};return _.createElement("svg",(0,a.Z)({className:d()("".concat(se,"-circle"),G),viewBox:"0 0 ".concat(N," ").concat(N),style:te,id:Y,role:"presentation"},J),!je&&_.createElement("circle",{className:"".concat(se,"-circle-trail"),r:Be,cx:Le,cy:Le,stroke:Fe,strokeLinecap:Ze,strokeWidth:K||ne,style:rt}),je?at():it())},X=L,I={Line:p,Circle:X},j=c(83062),B=c(47448);function q(z){return!z||z<0?0:z>100?100:z}function fe(z){let{success:A,successPercent:$}=z,Y=$;return A&&"progress"in A&&(Y=A.progress),A&&"percent"in A&&(Y=A.percent),Y}const ke=z=>{let{percent:A,success:$,successPercent:Y}=z;const se=q(fe({success:$,successPercent:Y}));return[se,q(q(A)-se)]},Ke=z=>{let{success:A={},strokeColor:$}=z;const{strokeColor:Y}=A;return[Y||B.presetPrimaryColors.green,$||null]},Pe=(z,A,$)=>{var Y,se,pe,ne;let K=-1,re=-1;if(A==="step"){const M=$.steps,ue=$.strokeWidth;typeof z=="string"||typeof z=="undefined"?(K=z==="small"?2:14,re=ue!=null?ue:8):typeof z=="number"?[K,re]=[z,z]:[K=14,re=8]=z,K*=M}else if(A==="line"){const M=$==null?void 0:$.strokeWidth;typeof z=="string"||typeof z=="undefined"?re=M||(z==="small"?6:8):typeof z=="number"?[K,re]=[z,z]:[K=-1,re=8]=z}else(A==="circle"||A==="dashboard")&&(typeof z=="string"||typeof z=="undefined"?[K,re]=z==="small"?[60,60]:[120,120]:typeof z=="number"?[K,re]=[z,z]:(K=(se=(Y=z[0])!==null&&Y!==void 0?Y:z[1])!==null&&se!==void 0?se:120,re=(ne=(pe=z[0])!==null&&pe!==void 0?pe:z[1])!==null&&ne!==void 0?ne:120));return[K,re]},le=3,me=z=>le/z*100;var Me=z=>{const{prefixCls:A,trailColor:$=null,strokeLinecap:Y="round",gapPosition:se,gapDegree:pe,width:ne=120,type:K,children:re,success:M,size:ue=ne}=z,[Fe,w]=Pe(ue,"circle");let{strokeWidth:te}=z;te===void 0&&(te=Math.max(me(Fe),6));const G={width:Fe,height:w,fontSize:Fe*.15+6},P=_.useMemo(()=>{if(pe||pe===0)return pe;if(K==="dashboard")return 75},[pe,K]),W=se||K==="dashboard"&&"bottom"||void 0,J=Object.prototype.toString.call(z.strokeColor)==="[object Object]",Le=Ke({success:M,strokeColor:z.strokeColor}),ge=d()(`${A}-inner`,{[`${A}-circle-gradient`]:J}),xe=_.createElement(X,{percent:ke(z),strokeWidth:te,trailWidth:te,strokeColor:Le,strokeLinecap:Y,trailColor:$,prefixCls:A,gapDegree:P,gapPosition:W});return _.createElement("div",{className:ge,style:G},Fe<=20?_.createElement(j.Z,{title:re},_.createElement("span",null,xe)):_.createElement(_.Fragment,null,xe,re))},ve=function(z,A){var $={};for(var Y in z)Object.prototype.hasOwnProperty.call(z,Y)&&A.indexOf(Y)<0&&($[Y]=z[Y]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,Y=Object.getOwnPropertySymbols(z);se<Y.length;se++)A.indexOf(Y[se])<0&&Object.prototype.propertyIsEnumerable.call(z,Y[se])&&($[Y[se]]=z[Y[se]]);return $};const Ce=z=>{let A=[];return Object.keys(z).forEach($=>{const Y=parseFloat($.replace(/%/g,""));isNaN(Y)||A.push({key:Y,value:z[$]})}),A=A.sort(($,Y)=>$.key-Y.key),A.map($=>{let{key:Y,value:se}=$;return`${se} ${Y}%`}).join(", ")},ye=(z,A)=>{const{from:$=B.presetPrimaryColors.blue,to:Y=B.presetPrimaryColors.blue,direction:se=A==="rtl"?"to left":"to right"}=z,pe=ve(z,["from","to","direction"]);if(Object.keys(pe).length!==0){const ne=Ce(pe);return{backgroundImage:`linear-gradient(${se}, ${ne})`}}return{backgroundImage:`linear-gradient(${se}, ${$}, ${Y})`}};var De=z=>{const{prefixCls:A,direction:$,percent:Y,size:se,strokeWidth:pe,strokeColor:ne,strokeLinecap:K="round",children:re,trailColor:M=null,success:ue}=z,Fe=ne&&typeof ne!="string"?ye(ne,$):{backgroundColor:ne},w=K==="square"||K==="butt"?0:void 0,te={backgroundColor:M||void 0,borderRadius:w},G=se!=null?se:[-1,pe||(se==="small"?6:8)],[P,W]=Pe(G,"line",{strokeWidth:pe}),J=Object.assign({width:`${q(Y)}%`,height:W,borderRadius:w},Fe),Le=fe(z),ge={width:`${q(Le)}%`,height:W,borderRadius:w,backgroundColor:ue==null?void 0:ue.strokeColor},xe={width:P<0?"100%":P,height:W};return _.createElement(_.Fragment,null,_.createElement("div",{className:`${A}-outer`,style:xe},_.createElement("div",{className:`${A}-inner`,style:te},_.createElement("div",{className:`${A}-bg`,style:J}),Le!==void 0?_.createElement("div",{className:`${A}-success-bg`,style:ge}):null)),re)},Ee=z=>{const{size:A,steps:$,percent:Y=0,strokeWidth:se=8,strokeColor:pe,trailColor:ne=null,prefixCls:K,children:re}=z,M=Math.round($*(Y/100)),ue=A==="small"?2:14,Fe=A!=null?A:[ue,se],[w,te]=Pe(Fe,"step",{steps:$,strokeWidth:se}),G=w/$,P=new Array($);for(let W=0;W<$;W++){const J=Array.isArray(pe)?pe[W]:pe;P[W]=_.createElement("div",{key:W,className:d()(`${K}-steps-item`,{[`${K}-steps-item-active`]:W<=M-1}),style:{backgroundColor:W<=M-1?J:ne,width:G,height:te}})}return _.createElement("div",{className:`${K}-steps-outer`},P,re)},Re=c(45930),Oe=c(14747),ee=c(67968),ie=c(45503);const Ae=z=>{const A=z?"100%":"-100%";return new Re.Keyframes(`antProgress${z?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${A}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${A}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Se=z=>{const{componentCls:A,iconCls:$}=z;return{[A]:Object.assign(Object.assign({},(0,Oe.Wf)(z)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:z.fontSize,marginInlineEnd:z.marginXS,marginBottom:z.marginXS},[`${A}-outer`]:{display:"inline-block",width:"100%"},[`&${A}-show-info`]:{[`${A}-outer`]:{marginInlineEnd:`calc(-2em - ${z.marginXS}px)`,paddingInlineEnd:`calc(2em + ${z.paddingXS}px)`}},[`${A}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:z.remainingColor,borderRadius:z.lineBorderRadius},[`${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:z.defaultColor}},[`${A}-success-bg, ${A}-bg`]:{position:"relative",backgroundColor:z.defaultColor,borderRadius:z.lineBorderRadius,transition:`all ${z.motionDurationSlow} ${z.motionEaseInOutCirc}`},[`${A}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:z.colorSuccess},[`${A}-text`]:{display:"inline-block",width:"2em",marginInlineStart:z.marginXS,color:z.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[$]:{fontSize:z.fontSize}},[`&${A}-status-active`]:{[`${A}-bg::before`]:{position:"absolute",inset:0,backgroundColor:z.colorBgContainer,borderRadius:z.lineBorderRadius,opacity:0,animationName:Ae(),animationDuration:z.progressActiveMotionDuration,animationTimingFunction:z.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${A}-rtl${A}-status-active`]:{[`${A}-bg::before`]:{animationName:Ae(!0)}},[`&${A}-status-exception`]:{[`${A}-bg`]:{backgroundColor:z.colorError},[`${A}-text`]:{color:z.colorError}},[`&${A}-status-exception ${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:z.colorError}},[`&${A}-status-success`]:{[`${A}-bg`]:{backgroundColor:z.colorSuccess},[`${A}-text`]:{color:z.colorSuccess}},[`&${A}-status-success ${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:z.colorSuccess}}})}},he=z=>{const{componentCls:A,iconCls:$}=z;return{[A]:{[`${A}-circle-trail`]:{stroke:z.remainingColor},[`&${A}-circle ${A}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${A}-circle ${A}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:z.circleTextColor,fontSize:z.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[$]:{fontSize:`${z.fontSize/z.fontSizeSM}em`}},[`${A}-circle&-status-exception`]:{[`${A}-text`]:{color:z.colorError}},[`${A}-circle&-status-success`]:{[`${A}-text`]:{color:z.colorSuccess}}},[`${A}-inline-circle`]:{lineHeight:1,[`${A}-inner`]:{verticalAlign:"bottom"}}}},ae=z=>{const{componentCls:A}=z;return{[A]:{[`${A}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:z.progressStepMinWidth,marginInlineEnd:z.progressStepMarginInlineEnd,backgroundColor:z.remainingColor,transition:`all ${z.motionDurationSlow}`,"&-active":{backgroundColor:z.defaultColor}}}}}},ce=z=>{const{componentCls:A,iconCls:$}=z;return{[A]:{[`${A}-small&-line, ${A}-small&-line ${A}-text ${$}`]:{fontSize:z.fontSizeSM}}}};var V=(0,ee.Z)("Progress",z=>{const A=z.marginXXS/2,$=(0,ie.TS)(z,{progressStepMarginInlineEnd:A,progressStepMinWidth:A,progressActiveMotionDuration:"2.4s"});return[Se($),he($),ae($),ce($)]},z=>({circleTextColor:z.colorText,defaultColor:z.colorInfo,remainingColor:z.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),F=function(z,A){var $={};for(var Y in z)Object.prototype.hasOwnProperty.call(z,Y)&&A.indexOf(Y)<0&&($[Y]=z[Y]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var se=0,Y=Object.getOwnPropertySymbols(z);se<Y.length;se++)A.indexOf(Y[se])<0&&Object.prototype.propertyIsEnumerable.call(z,Y[se])&&($[Y[se]]=z[Y[se]]);return $};const H=null,T=["normal","exception","active","success"];var de=_.forwardRef((z,A)=>{const{prefixCls:$,className:Y,rootClassName:se,steps:pe,strokeColor:ne,percent:K=0,size:re="default",showInfo:M=!0,type:ue="line",status:Fe,format:w,style:te}=z,G=F(z,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),P=_.useMemo(()=>{var Ye,Ge;const ze=fe(z);return parseInt(ze!==void 0?(Ye=ze!=null?ze:0)===null||Ye===void 0?void 0:Ye.toString():(Ge=K!=null?K:0)===null||Ge===void 0?void 0:Ge.toString(),10)},[K,z.success,z.successPercent]),W=_.useMemo(()=>!T.includes(Fe)&&P>=100?"success":Fe||"normal",[Fe,P]),{getPrefixCls:J,direction:Le,progress:ge}=_.useContext(i.E_),xe=J("progress",$),[Be,Ne]=V(xe),Ue=_.useMemo(()=>{if(!M)return null;const Ye=fe(z);let Ge;const ze=w||(Ze=>`${Ze}%`),qe=ue==="line";return w||W!=="exception"&&W!=="success"?Ge=ze(q(K),q(Ye)):W==="exception"?Ge=qe?_.createElement(h.Z,null):_.createElement(o.Z,null):W==="success"&&(Ge=qe?_.createElement(m.Z,null):_.createElement(y.Z,null)),_.createElement("span",{className:`${xe}-text`,title:typeof Ge=="string"?Ge:void 0},Ge)},[M,K,P,W,ue,xe,w]),He=Array.isArray(ne)?ne[0]:ne,$e=typeof ne=="string"||Array.isArray(ne)?ne:void 0;let je;ue==="line"?je=pe?_.createElement(Ee,Object.assign({},z,{strokeColor:$e,prefixCls:xe,steps:pe}),Ue):_.createElement(De,Object.assign({},z,{strokeColor:He,prefixCls:xe,direction:Le}),Ue):(ue==="circle"||ue==="dashboard")&&(je=_.createElement(Me,Object.assign({},z,{strokeColor:He,prefixCls:xe,progressStatus:W}),Ue));const Ve=d()(xe,`${xe}-status-${W}`,`${xe}-${ue==="dashboard"&&"circle"||pe&&"steps"||ue}`,{[`${xe}-inline-circle`]:ue==="circle"&&Pe(re,"circle")[0]<=20,[`${xe}-show-info`]:M,[`${xe}-${re}`]:typeof re=="string",[`${xe}-rtl`]:Le==="rtl"},ge==null?void 0:ge.className,Y,se,Ne);return Be(_.createElement("div",Object.assign({ref:A,style:Object.assign(Object.assign({},ge==null?void 0:ge.style),te),className:Ve,role:"progressbar","aria-valuenow":P},(0,r.Z)(G,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),je))}),be=de},64701:function(Te,D,c){"use strict";c.r(D),c.d(D,{ResizableTextArea:function(){return ke},default:function(){return Me}});var _=c(87462),m=c(1413),y=c(4942),h=c(71002),o=c(97685),u=c(45987),d=c(74902),r=c(94184),i=c.n(r),a=c(67656),e=c(87887),f=c(67294);function t(ve){var Ce=f.useRef();Ce.current=ve;var ye=f.useCallback(function(){for(var we,De=arguments.length,Xe=new Array(De),Ee=0;Ee<De;Ee++)Xe[Ee]=arguments[Ee];return(we=Ce.current)===null||we===void 0?void 0:we.call.apply(we,[Ce].concat(Xe))},[]);return ye}function n(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var s=n()?f.useLayoutEffect:f.useEffect,l=s,p=function(Ce,ye){var we=f.useRef(!0);s(function(){if(!we.current)return Ce()},ye),s(function(){return we.current=!1,function(){we.current=!0}},[])};function g(ve){var Ce=f.useRef(!1),ye=f.useState(ve),we=(0,o.Z)(ye,2),De=we[0],Xe=we[1];f.useEffect(function(){return Ce.current=!1,function(){Ce.current=!0}},[]);function Ee(Re,Oe){Oe&&Ce.current||Xe(Re)}return[De,Ee]}function b(ve){return ve!==void 0}function x(ve,Ce){var ye=Ce||{},we=ye.defaultValue,De=ye.value,Xe=ye.onChange,Ee=ye.postState,Re=g(function(){return b(De)?De:b(we)?typeof we=="function"?we():we:typeof ve=="function"?ve():ve}),Oe=(0,o.Z)(Re,2),ee=Oe[0],ie=Oe[1],Ae=De!==void 0?De:ee,Se=Ee?Ee(Ae):Ae,he=t(Xe),ae=g([Ae]),ce=(0,o.Z)(ae,2),V=ce[0],F=ce[1];p(function(){var T=V[0];ee!==T&&he(ee,T)},[V]),p(function(){b(De)||ie(De)},[De]);var H=t(function(T,Q){ie(T,Q),F([Ae],Q)});return[Se,H]}var E=c(48555),C=function(Ce){return+setTimeout(Ce,16)},v=function(Ce){return clearTimeout(Ce)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(C=function(Ce){return window.requestAnimationFrame(Ce)},v=function(Ce){return window.cancelAnimationFrame(Ce)});var S=0,k=new Map;function O(ve){k.delete(ve)}var R=function(Ce){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;S+=1;var we=S;function De(Xe){if(Xe===0)O(we),Ce();else{var Ee=C(function(){De(Xe-1)});k.set(we,Ee)}}return De(ye),we};R.cancel=function(ve){var Ce=k.get(ve);return O(Ce),v(Ce)};var U=R,N=`
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;
`,_e=["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"],Z={},oe;function L(ve){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=ve.getAttribute("id")||ve.getAttribute("data-reactid")||ve.getAttribute("name");if(Ce&&Z[ye])return Z[ye];var we=window.getComputedStyle(ve),De=we.getPropertyValue("box-sizing")||we.getPropertyValue("-moz-box-sizing")||we.getPropertyValue("-webkit-box-sizing"),Xe=parseFloat(we.getPropertyValue("padding-bottom"))+parseFloat(we.getPropertyValue("padding-top")),Ee=parseFloat(we.getPropertyValue("border-bottom-width"))+parseFloat(we.getPropertyValue("border-top-width")),Re=_e.map(function(ee){return"".concat(ee,":").concat(we.getPropertyValue(ee))}).join(";"),Oe={sizingStyle:Re,paddingSize:Xe,borderSize:Ee,boxSizing:De};return Ce&&ye&&(Z[ye]=Oe),Oe}function X(ve){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,we=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;oe||(oe=document.createElement("textarea"),oe.setAttribute("tab-index","-1"),oe.setAttribute("aria-hidden","true"),document.body.appendChild(oe)),ve.getAttribute("wrap")?oe.setAttribute("wrap",ve.getAttribute("wrap")):oe.removeAttribute("wrap");var De=L(ve,Ce),Xe=De.paddingSize,Ee=De.borderSize,Re=De.boxSizing,Oe=De.sizingStyle;oe.setAttribute("style","".concat(Oe,";").concat(N)),oe.value=ve.value||ve.placeholder||"";var ee=void 0,ie=void 0,Ae,Se=oe.scrollHeight;if(Re==="border-box"?Se+=Ee:Re==="content-box"&&(Se-=Xe),ye!==null||we!==null){oe.value=" ";var he=oe.scrollHeight-Xe;ye!==null&&(ee=he*ye,Re==="border-box"&&(ee=ee+Xe+Ee),Se=Math.max(ee,Se)),we!==null&&(ie=he*we,Re==="border-box"&&(ie=ie+Xe+Ee),Ae=Se>ie?"":"hidden",Se=Math.min(ie,Se))}var ae={height:Se,overflowY:Ae,resize:"none"};return ee&&(ae.minHeight=ee),ie&&(ae.maxHeight=ie),ae}var I=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],j=0,B=1,q=2,fe=f.forwardRef(function(ve,Ce){var ye=ve,we=ye.prefixCls,De=ye.onPressEnter,Xe=ye.defaultValue,Ee=ye.value,Re=ye.autoSize,Oe=ye.onResize,ee=ye.className,ie=ye.style,Ae=ye.disabled,Se=ye.onChange,he=ye.onInternalAutoSize,ae=(0,u.Z)(ye,I),ce=x(Xe,{value:Ee,postState:function(ge){return ge!=null?ge:""}}),V=(0,o.Z)(ce,2),F=V[0],H=V[1],T=function(ge){H(ge.target.value),Se==null||Se(ge)},Q=f.useRef();f.useImperativeHandle(Ce,function(){return{textArea:Q.current}});var de=f.useMemo(function(){return Re&&(0,h.Z)(Re)==="object"?[Re.minRows,Re.maxRows]:[]},[Re]),be=(0,o.Z)(de,2),z=be[0],A=be[1],$=!!Re,Y=function(){try{if(document.activeElement===Q.current){var ge=Q.current,xe=ge.selectionStart,Be=ge.selectionEnd,Ne=ge.scrollTop;Q.current.setSelectionRange(xe,Be),Q.current.scrollTop=Ne}}catch(Ue){}},se=f.useState(q),pe=(0,o.Z)(se,2),ne=pe[0],K=pe[1],re=f.useState(),M=(0,o.Z)(re,2),ue=M[0],Fe=M[1],w=function(){K(j)};l(function(){$&&w()},[Ee,z,A,$]),l(function(){if(ne===j)K(B);else if(ne===B){var Le=X(Q.current,!1,z,A);K(q),Fe(Le)}else Y()},[ne]);var te=f.useRef(),G=function(){U.cancel(te.current)},P=function(ge){ne===q&&(Oe==null||Oe(ge),Re&&(G(),te.current=U(function(){w()})))};f.useEffect(function(){return G},[]);var W=$?ue:null,J=(0,m.Z)((0,m.Z)({},ie),W);return(ne===j||ne===B)&&(J.overflowY="hidden",J.overflowX="hidden"),f.createElement(E.Z,{onResize:P,disabled:!(Re||Oe)},f.createElement("textarea",(0,_.Z)({},ae,{ref:Q,style:J,className:i()(we,ee,(0,y.Z)({},"".concat(we,"-disabled"),Ae)),disabled:Ae,value:F,onChange:T})))}),ke=fe,Ke=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Pe(ve,Ce){return(0,d.Z)(ve||"").slice(0,Ce).join("")}function le(ve,Ce,ye,we){var De=ye;return ve?De=Pe(ye,we):(0,d.Z)(Ce||"").length<ye.length&&(0,d.Z)(ye||"").length>we&&(De=Ce),De}var me=f.forwardRef(function(ve,Ce){var ye,we=ve.defaultValue,De=ve.value,Xe=ve.onFocus,Ee=ve.onBlur,Re=ve.onChange,Oe=ve.allowClear,ee=ve.maxLength,ie=ve.onCompositionStart,Ae=ve.onCompositionEnd,Se=ve.suffix,he=ve.prefixCls,ae=he===void 0?"rc-textarea":he,ce=ve.classes,V=ve.showCount,F=ve.className,H=ve.style,T=ve.disabled,Q=ve.hidden,de=ve.classNames,be=ve.styles,z=ve.onResize,A=(0,u.Z)(ve,Ke),$=x(we,{value:De,defaultValue:we}),Y=(0,o.Z)($,2),se=Y[0],pe=Y[1],ne=(0,f.useRef)(null),K=f.useState(!1),re=(0,o.Z)(K,2),M=re[0],ue=re[1],Fe=f.useState(!1),w=(0,o.Z)(Fe,2),te=w[0],G=w[1],P=f.useRef(),W=f.useRef(0),J=f.useState(null),Le=(0,o.Z)(J,2),ge=Le[0],xe=Le[1],Be=function(){var We;(We=ne.current)===null||We===void 0||We.textArea.focus()};(0,f.useImperativeHandle)(Ce,function(){return{resizableTextArea:ne.current,focus:Be,blur:function(){var We;(We=ne.current)===null||We===void 0||We.textArea.blur()}}}),(0,f.useEffect)(function(){ue(function(Je){return!T&&Je})},[T]);var Ne=Number(ee)>0,Ue=function(We){G(!0),P.current=se,W.current=We.currentTarget.selectionStart,ie==null||ie(We)},He=function(We){G(!1);var Qe=We.currentTarget.value;if(Ne){var et,nt=W.current>=ee+1||W.current===((et=P.current)===null||et===void 0?void 0:et.length);Qe=le(nt,P.current,Qe,ee)}Qe!==se&&(pe(Qe),(0,e.rJ)(We.currentTarget,We,Re,Qe)),Ae==null||Ae(We)},$e=function(We){var Qe=We.target.value;if(!te&&Ne){var et=We.target.selectionStart>=ee+1||We.target.selectionStart===Qe.length||!We.target.selectionStart;Qe=le(et,se,Qe,ee)}pe(Qe),(0,e.rJ)(We.currentTarget,We,Re,Qe)},je=function(We){var Qe=A.onPressEnter,et=A.onKeyDown;We.key==="Enter"&&Qe&&Qe(We),et==null||et(We)},Ve=function(We){ue(!0),Xe==null||Xe(We)},Ye=function(We){ue(!1),Ee==null||Ee(We)},Ge=function(We){var Qe;pe(""),Be(),(0,e.rJ)((Qe=ne.current)===null||Qe===void 0?void 0:Qe.textArea,We,Re)},ze=(0,e.D7)(se);!te&&Ne&&De==null&&(ze=Pe(ze,ee));var qe=Se,Ze;if(V){var rt=(0,d.Z)(ze).length;(0,h.Z)(V)==="object"?Ze=V.formatter({value:ze,count:rt,maxLength:ee}):Ze="".concat(rt).concat(Ne?" / ".concat(ee):""),qe=f.createElement(f.Fragment,null,qe,f.createElement("span",{className:i()("".concat(ae,"-data-count"),de==null?void 0:de.count),style:be==null?void 0:be.count},Ze))}var tt=function(We){var Qe;z==null||z(We),(Qe=ne.current)!==null&&Qe!==void 0&&Qe.textArea.style.height&&xe(!0)},it=!A.autoSize&&!V&&!Oe,at=f.createElement(a.BaseInput,{value:ze,allowClear:Oe,handleReset:Ge,suffix:qe,prefixCls:ae,classes:{affixWrapper:i()(ce==null?void 0:ce.affixWrapper,(ye={},(0,y.Z)(ye,"".concat(ae,"-show-count"),V),(0,y.Z)(ye,"".concat(ae,"-textarea-allow-clear"),Oe),ye))},disabled:T,focused:M,className:F,style:(0,m.Z)((0,m.Z)({},H),ge&&!it?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ze=="string"?Ze:void 0}},hidden:Q,inputElement:f.createElement(ke,(0,_.Z)({},A,{onKeyDown:je,onChange:$e,onFocus:Ve,onBlur:Ye,onCompositionStart:Ue,onCompositionEnd:He,className:de==null?void 0:de.textarea,style:(0,m.Z)((0,m.Z)({},be==null?void 0:be.textarea),{},{resize:H==null?void 0:H.resize}),disabled:T,prefixCls:ae,onResize:tt,ref:ne}))});return at}),Ie=me,Me=Ie},19575:function(Te,D,c){var _,m;(function(y,h){Te.exports=h(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof c.g!="undefined"?c.g:this,function(y){"use strict";y=y||{};var h=y.Base64,o="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(Z){for(var oe={},L=0,X=Z.length;L<X;L++)oe[Z.charAt(L)]=L;return oe}(u),r=String.fromCharCode,i=function(Z){if(Z.length<2){var oe=Z.charCodeAt(0);return oe<128?Z:oe<2048?r(192|oe>>>6)+r(128|oe&63):r(224|oe>>>12&15)+r(128|oe>>>6&63)+r(128|oe&63)}else{var oe=65536+(Z.charCodeAt(0)-55296)*1024+(Z.charCodeAt(1)-56320);return r(240|oe>>>18&7)+r(128|oe>>>12&63)+r(128|oe>>>6&63)+r(128|oe&63)}},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,e=function(Z){return Z.replace(a,i)},f=function(Z){var oe=[0,2,1][Z.length%3],L=Z.charCodeAt(0)<<16|(Z.length>1?Z.charCodeAt(1):0)<<8|(Z.length>2?Z.charCodeAt(2):0),X=[u.charAt(L>>>18),u.charAt(L>>>12&63),oe>=2?"=":u.charAt(L>>>6&63),oe>=1?"=":u.charAt(L&63)];return X.join("")},t=y.btoa&&typeof y.btoa=="function"?function(Z){return y.btoa(Z)}:function(Z){if(Z.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Z.replace(/[\s\S]{1,3}/g,f)},n=function(Z){return t(e(String(Z)))},s=function(Z){return Z.replace(/[+\/]/g,function(oe){return oe=="+"?"-":"_"}).replace(/=/g,"")},l=function(Z,oe){return oe?s(n(Z)):n(Z)},p=function(Z){return l(Z,!0)},g;y.Uint8Array&&(g=function(Z,oe){for(var L="",X=0,I=Z.length;X<I;X+=3){var j=Z[X],B=Z[X+1],q=Z[X+2],fe=j<<16|B<<8|q;L+=u.charAt(fe>>>18)+u.charAt(fe>>>12&63)+(typeof B!="undefined"?u.charAt(fe>>>6&63):"=")+(typeof q!="undefined"?u.charAt(fe&63):"=")}return oe?s(L):L});var b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,x=function(Z){switch(Z.length){case 4:var oe=(7&Z.charCodeAt(0))<<18|(63&Z.charCodeAt(1))<<12|(63&Z.charCodeAt(2))<<6|63&Z.charCodeAt(3),L=oe-65536;return r((L>>>10)+55296)+r((L&1023)+56320);case 3:return r((15&Z.charCodeAt(0))<<12|(63&Z.charCodeAt(1))<<6|63&Z.charCodeAt(2));default:return r((31&Z.charCodeAt(0))<<6|63&Z.charCodeAt(1))}},E=function(Z){return Z.replace(b,x)},C=function(Z){var oe=Z.length,L=oe%4,X=(oe>0?d[Z.charAt(0)]<<18:0)|(oe>1?d[Z.charAt(1)]<<12:0)|(oe>2?d[Z.charAt(2)]<<6:0)|(oe>3?d[Z.charAt(3)]:0),I=[r(X>>>16),r(X>>>8&255),r(X&255)];return I.length-=[0,0,2,1][L],I.join("")},v=y.atob&&typeof y.atob=="function"?function(Z){return y.atob(Z)}:function(Z){return Z.replace(/\S{1,4}/g,C)},S=function(Z){return v(String(Z).replace(/[^A-Za-z0-9\+\/]/g,""))},k=function(Z){return E(v(Z))},O=function(Z){return String(Z).replace(/[-_]/g,function(oe){return oe=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},R=function(Z){return k(O(Z))},U;y.Uint8Array&&(U=function(Z){return Uint8Array.from(S(O(Z)),function(oe){return oe.charCodeAt(0)})});var N=function(){var Z=y.Base64;return y.Base64=h,Z};if(y.Base64={VERSION:o,atob:S,btoa:t,fromBase64:R,toBase64:l,utob:e,encode:l,encodeURI:p,btou:E,decode:R,noConflict:N,fromUint8Array:g,toUint8Array:U},typeof Object.defineProperty=="function"){var _e=function(Z){return{value:Z,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",_e(function(){return R(this)})),Object.defineProperty(String.prototype,"toBase64",_e(function(Z){return l(this,Z)})),Object.defineProperty(String.prototype,"toBase64URI",_e(function(){return l(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),Te.exports?Te.exports.Base64=y.Base64:(_=[],m=function(){return y.Base64}.apply(D,_),m!==void 0&&(Te.exports=m)),{Base64:y.Base64}})},10729:function(Te,D,c){"use strict";function _(u){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(r){return typeof r}:_=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_(u)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var m=h(c(37095));function y(){if(typeof WeakMap!="function")return null;var u=new WeakMap;return y=function(){return u},u}function h(u){if(u&&u.__esModule)return u;if(u===null||_(u)!=="object"&&typeof u!="function")return{default:u};var d=y();if(d&&d.has(u))return d.get(u);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in u)if(Object.prototype.hasOwnProperty.call(u,a)){var e=i?Object.getOwnPropertyDescriptor(u,a):null;e&&(e.get||e.set)?Object.defineProperty(r,a,e):r[a]=u[a]}return r.default=u,d&&d.set(u,r),r}var o={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(d){"use strict";for(var r="",i=d.length,a=i%3,e=0;e<i-2;e+=3)r+=this.toBase64Table[d[e]>>2],r+=this.toBase64Table[((d[e]&3)<<4)+(d[e+1]>>4)],r+=this.toBase64Table[((d[e+1]&15)<<2)+(d[e+2]>>6)],r+=this.toBase64Table[d[e+2]&63];var f=i-a;return a===2?(r+=this.toBase64Table[d[f]>>2],r+=this.toBase64Table[((d[f]&3)<<4)+(d[f+1]>>4)],r+=this.toBase64Table[(d[f+1]&15)<<2],r+=this.toBase64Table[64]):a===1&&(r+=this.toBase64Table[d[f]>>2],r+=this.toBase64Table[(d[f]&3)<<4],r+=this.toBase64Table[64],r+=this.toBase64Table[64]),r},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(d){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=d.indexOf("=")-r;i<0&&(i=d.length-r);for(var a=(i>>2)*3+Math.floor(i%4/1.5),e=new Array(a),f=0,t=0,n=0,s=r;s<d.length;s++){var l=this.toBinaryTable[d.charCodeAt(s)&127],p=d.charAt(s)===this.base64Pad;if(l===-1){m.Error("Illegal character code "+d.charCodeAt(s)+" at position "+s);continue}t=t<<6|l,f+=6,f>=8&&(f-=8,p||(e[n++]=t>>f&255),t&=(1<<f)-1)}if(f){var g=new Error("Corrupted base64 string");throw g.name="Base64-Error",g}return e}};D.default=o},62175:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function m(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var y=function(){function h(){c(this,h)}return m(h,[{key:"decodeRect",value:function(u,d,r,i,a,e,f){if(a.rQwait("COPYRECT",4))return!1;var t=a.rQshift16(),n=a.rQshift16();return e.copyImage(t,n,u,d,r,i),!0}}]),h}();D.default=y},55901:function(Te,D,c){"use strict";function _(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(e){return typeof e}:_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(i)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var m=h(c(37095));function y(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return y=function(){return i},i}function h(i){if(i&&i.__esModule)return i;if(i===null||_(i)!=="object"&&typeof i!="function")return{default:i};var a=y();if(a&&a.has(i))return a.get(i);var e={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var n=f?Object.getOwnPropertyDescriptor(i,t):null;n&&(n.get||n.set)?Object.defineProperty(e,t,n):e[t]=i[t]}return e.default=i,a&&a.set(i,e),e}function o(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}function u(i,a){for(var e=0;e<a.length;e++){var f=a[e];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(i,f.key,f)}}function d(i,a,e){return a&&u(i.prototype,a),e&&u(i,e),i}var r=function(){function i(){o(this,i),this._tiles=0,this._lastsubencoding=0}return d(i,[{key:"decodeRect",value:function(e,f,t,n,s,l,p){for(this._tiles===0&&(this._tilesX=Math.ceil(t/16),this._tilesY=Math.ceil(n/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){var g=1;if(s.rQwait("HEXTILE",g))return!1;var b=s.rQ,x=s.rQi,E=b[x];if(E>30)throw new Error("Illegal hextile subencoding (subencoding: "+E+")");var C=this._totalTiles-this._tiles,v=C%this._tilesX,S=Math.floor(C/this._tilesX),k=e+v*16,O=f+S*16,R=Math.min(16,e+t-k),U=Math.min(16,f+n-O);if(E&1)g+=R*U*4;else if(E&2&&(g+=4),E&4&&(g+=4),E&8){if(g++,s.rQwait("HEXTILE",g))return!1;var N=b[x+g-1];E&16?g+=N*6:g+=N*2}if(s.rQwait("HEXTILE",g))return!1;if(x++,E===0)this._lastsubencoding&1?m.Debug(" Ignoring blank after RAW"):l.fillRect(k,O,R,U,this._background);else if(E&1)l.blitImage(k,O,R,U,b,x),x+=g-1;else{if(E&2&&(this._background=[b[x],b[x+1],b[x+2],b[x+3]],x+=4),E&4&&(this._foreground=[b[x],b[x+1],b[x+2],b[x+3]],x+=4),l.startTile(k,O,R,U,this._background),E&8){var _e=b[x];x++;for(var Z=0;Z<_e;Z++){var oe=void 0;E&16?(oe=[b[x],b[x+1],b[x+2],b[x+3]],x+=4):oe=this._foreground;var L=b[x];x++;var X=L>>4,I=L&15,j=b[x];x++;var B=(j>>4)+1,q=(j&15)+1;l.subTile(X,I,B,q,oe)}}l.finishTile()}s.rQi=x,this._lastsubencoding=E,this._tiles--}return!0}}]),i}();D.default=r},12133:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function m(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var y=function(){function h(){c(this,h),this._lines=0}return m(h,[{key:"decodeRect",value:function(u,d,r,i,a,e,f){this._lines===0&&(this._lines=i);var t=f==8?1:4,n=r*t;if(a.rQwait("RAW",n))return!1;var s=d+(i-this._lines),l=Math.min(this._lines,Math.floor(a.rQlen/n)),p=a.rQ,g=a.rQi;if(f==8){for(var b=r*l,x=new Uint8Array(b*4),E=0;E<b;E++)x[E*4+0]=(p[g+E]>>0&3)*255/3,x[E*4+1]=(p[g+E]>>2&3)*255/3,x[E*4+2]=(p[g+E]>>4&3)*255/3,x[E*4+4]=0;p=x,g=0}return e.blitImage(u,s,r,l,p,g),a.rQskipBytes(l*n),this._lines-=l,!(this._lines>0)}}]),h}();D.default=y},18966:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function m(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var y=function(){function h(){c(this,h),this._subrects=0}return m(h,[{key:"decodeRect",value:function(u,d,r,i,a,e,f){if(this._subrects===0){if(a.rQwait("RRE",8))return!1;this._subrects=a.rQshift32();var t=a.rQshiftBytes(4);e.fillRect(u,d,r,i,t)}for(;this._subrects>0;){if(a.rQwait("RRE",12))return!1;var n=a.rQshiftBytes(4),s=a.rQshift16(),l=a.rQshift16(),p=a.rQshift16(),g=a.rQshift16();e.fillRect(u+s,d+l,p,g,n),this._subrects--}return!0}}]),h}();D.default=y},37856:function(Te,D,c){"use strict";function _(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(t){return typeof t}:_=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(e)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var m=u(c(37095)),y=h(c(77367));function h(e){return e&&e.__esModule?e:{default:e}}function o(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return o=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(e===null||_(e)!=="object"&&typeof e!="function")return{default:e};var f=o();if(f&&f.has(e))return f.get(e);var t={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var l=n?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(t,s,l):t[s]=e[s]}return t.default=e,f&&f.set(e,t),t}function d(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function")}function r(e,f){for(var t=0;t<f.length;t++){var n=f[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,f,t){return f&&r(e.prototype,f),t&&r(e,t),e}var a=function(){function e(){d(this,e),this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(var f=0;f<4;f++)this._zlibs[f]=new y.default}return i(e,[{key:"decodeRect",value:function(t,n,s,l,p,g,b){if(this._ctl===null){if(p.rQwait("TIGHT compression-control",1))return!1;this._ctl=p.rQshift8();for(var x=0;x<4;x++)this._ctl>>x&1&&(this._zlibs[x].reset(),m.Info("Reset zlib stream "+x));this._ctl=this._ctl>>4}var E;if(this._ctl===8)E=this._fillRect(t,n,s,l,p,g,b);else if(this._ctl===9)E=this._jpegRect(t,n,s,l,p,g,b);else if(this._ctl===10)E=this._pngRect(t,n,s,l,p,g,b);else if(!(this._ctl&128))E=this._basicRect(this._ctl,t,n,s,l,p,g,b);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return E&&(this._ctl=null),E}},{key:"_fillRect",value:function(t,n,s,l,p,g,b){if(p.rQwait("TIGHT",3))return!1;var x=p.rQi,E=p.rQ;return g.fillRect(t,n,s,l,[E[x+2],E[x+1],E[x]],!1),p.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(t,n,s,l,p,g,b){var x=this._readData(p);return x===null?!1:(g.imageRect(t,n,s,l,"image/jpeg",x),!0)}},{key:"_pngRect",value:function(t,n,s,l,p,g,b){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(t,n,s,l,p,g,b,x){if(this._filter===null)if(t&4){if(g.rQwait("TIGHT",1))return!1;this._filter=g.rQshift8()}else this._filter=0;var E=t&3,C;switch(this._filter){case 0:C=this._copyFilter(E,n,s,l,p,g,b,x);break;case 1:C=this._paletteFilter(E,n,s,l,p,g,b,x);break;case 2:C=this._gradientFilter(E,n,s,l,p,g,b,x);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return C&&(this._filter=null),C}},{key:"_copyFilter",value:function(t,n,s,l,p,g,b,x){var E=l*p*3,C;if(E<12){if(g.rQwait("TIGHT",E))return!1;C=g.rQshiftBytes(E)}else{if(C=this._readData(g),C===null)return!1;this._zlibs[t].setInput(C),C=this._zlibs[t].inflate(E),this._zlibs[t].setInput(null)}return b.blitRgbImage(n,s,l,p,C,0,!1),!0}},{key:"_paletteFilter",value:function(t,n,s,l,p,g,b,x){if(this._numColors===0){if(g.rQwait("TIGHT palette",1))return!1;var E=g.rQpeek8()+1,C=E*3;if(g.rQwait("TIGHT palette",1+C))return!1;this._numColors=E,g.rQskipBytes(1),g.rQshiftTo(this._palette,C)}var v=this._numColors<=2?1:8,S=Math.floor((l*v+7)/8),k=S*p,O;if(k<12){if(g.rQwait("TIGHT",k))return!1;O=g.rQshiftBytes(k)}else{if(O=this._readData(g),O===null)return!1;this._zlibs[t].setInput(O),O=this._zlibs[t].inflate(k),this._zlibs[t].setInput(null)}return this._numColors==2?this._monoRect(n,s,l,p,O,this._palette,b):this._paletteRect(n,s,l,p,O,this._palette,b),this._numColors=0,!0}},{key:"_monoRect",value:function(t,n,s,l,p,g,b){for(var x=this._getScratchBuffer(s*l*4),E=Math.floor((s+7)/8),C=Math.floor(s/8),v=0;v<l;v++){var S=void 0,k=void 0,O=void 0;for(O=0;O<C;O++)for(var R=7;R>=0;R--)S=(v*s+O*8+7-R)*4,k=(p[v*E+O]>>R&1)*3,x[S]=g[k],x[S+1]=g[k+1],x[S+2]=g[k+2],x[S+3]=255;for(var U=7;U>=8-s%8;U--)S=(v*s+O*8+7-U)*4,k=(p[v*E+O]>>U&1)*3,x[S]=g[k],x[S+1]=g[k+1],x[S+2]=g[k+2],x[S+3]=255}b.blitRgbxImage(t,n,s,l,x,0,!1)}},{key:"_paletteRect",value:function(t,n,s,l,p,g,b){for(var x=this._getScratchBuffer(s*l*4),E=s*l*4,C=0,v=0;C<E;C+=4,v++){var S=p[v]*3;x[C]=g[S],x[C+1]=g[S+1],x[C+2]=g[S+2],x[C+3]=255}b.blitRgbxImage(t,n,s,l,x,0,!1)}},{key:"_gradientFilter",value:function(t,n,s,l,p,g,b,x){throw new Error("Gradient filter not implemented")}},{key:"_readData",value:function(t){if(this._len===0){if(t.rQwait("TIGHT",3))return null;var n;n=t.rQshift8(),this._len=n&127,n&128&&(n=t.rQshift8(),this._len|=(n&127)<<7,n&128&&(n=t.rQshift8(),this._len|=n<<14))}if(t.rQwait("TIGHT",this._len))return null;var s=t.rQshiftBytes(this._len);return this._len=0,s}},{key:"_getScratchBuffer",value:function(t){return(!this._scratchBuffer||this._scratchBuffer.length<t)&&(this._scratchBuffer=new Uint8Array(t)),this._scratchBuffer}}]),e}();D.default=a},19442:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=m(c(37856));function m(s){return s&&s.__esModule?s:{default:s}}function y(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(p){return typeof p}:y=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},y(s)}function h(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}function o(s,l){for(var p=0;p<l.length;p++){var g=l[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(s,g.key,g)}}function u(s,l,p){return l&&o(s.prototype,l),p&&o(s,p),s}function d(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),l&&r(s,l)}function r(s,l){return r=Object.setPrototypeOf||function(g,b){return g.__proto__=b,g},r(s,l)}function i(s){var l=f();return function(){var g=t(s),b;if(l){var x=t(this).constructor;b=Reflect.construct(g,arguments,x)}else b=g.apply(this,arguments);return a(this,b)}}function a(s,l){return l&&(y(l)==="object"||typeof l=="function")?l:e(s)}function e(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function f(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(s){return!1}}function t(s){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},t(s)}var n=function(s){d(p,s);var l=i(p);function p(){return h(this,p),l.apply(this,arguments)}return u(p,[{key:"_pngRect",value:function(b,x,E,C,v,S,k){var O=this._readData(v);return O===null?!1:(S.imageRect(b,x,E,C,"image/png",O),!0)}},{key:"_basicRect",value:function(b,x,E,C,v,S,k,O){throw new Error("BasicCompression received in TightPNG rect")}}]),p}(_.default);D.default=n},77160:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=c(8293),m=y(c(696));function y(r){return r&&r.__esModule?r:{default:r}}function h(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var a=0;a<i.length;a++){var e=i[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function u(r,i,a){return i&&o(r.prototype,i),a&&o(r,a),r}var d=function(){function r(){h(this,r),this.strm=new m.default,this.chunkSize=1024*10*10,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,(0,_.deflateInit)(this.strm,this.windowBits)}return u(r,[{key:"deflate",value:function(a){this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0,this.strm.output=this.outputBuffer,this.strm.avail_out=this.chunkSize,this.strm.next_out=0;var e=(0,_.deflate)(this.strm,_.Z_FULL_FLUSH),f=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);if(e<0)throw new Error("zlib deflate failed");if(this.strm.avail_in>0){var t=[f],n=f.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,e=(0,_.deflate)(this.strm,_.Z_FULL_FLUSH),e<0)throw new Error("zlib deflate failed");var s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);n+=s.length,t.push(s)}while(this.strm.avail_in>0);for(var l=new Uint8Array(n),p=0,g=0;g<t.length;g++)l.set(t[g],p),p+=t[g].length;f=l}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,f}}]),r}();D.default=d},44693:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(E,C){if(!(E instanceof C))throw new TypeError("Cannot call a class as a function")}function _(E,C){for(var v=0;v<C.length;v++){var S=C[v];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(E,S.key,S)}}function m(E,C,v){return C&&_(E.prototype,C),v&&_(E,v),E}var y=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=0,u,d,r,i,a,e;u=65536,d=1<<24,r=u|d,i=4,a=1024,e=i|a;var f=[r|a,o|o,u|o,r|e,r|i,u|e,o|i,u|o,o|a,r|a,r|e,o|a,d|e,r|i,d|o,o|i,o|e,d|a,d|a,u|a,u|a,r|o,r|o,d|e,u|i,d|i,d|i,u|i,o|o,o|e,u|e,d|o,u|o,r|e,o|i,r|o,r|a,d|o,d|o,o|a,r|i,u|o,u|a,d|i,o|a,o|i,d|e,u|e,r|e,u|i,r|o,d|e,d|i,o|e,u|e,r|a,o|e,d|a,d|a,o|o,u|i,u|a,o|o,r|i];u=1<<20,d=1<<31,r=u|d,i=32,a=32768,e=i|a;var t=[r|e,d|a,o|a,u|e,u|o,o|i,r|i,d|e,d|i,r|e,r|a,d|o,d|a,u|o,o|i,r|i,u|a,u|i,d|e,o|o,d|o,o|a,u|e,r|o,u|i,d|i,o|o,u|a,o|e,r|a,r|o,o|e,o|o,u|e,r|i,u|o,d|e,r|o,r|a,o|a,r|o,d|a,o|i,r|e,u|e,o|i,o|a,d|o,o|e,r|a,u|o,d|i,u|i,d|e,d|i,u|i,u|a,o|o,d|a,o|e,d|o,r|i,r|e,u|a];u=1<<17,d=1<<27,r=u|d,i=8,a=512,e=i|a;var n=[o|e,r|a,o|o,r|i,d|a,o|o,u|e,d|a,u|i,d|i,d|i,u|o,r|e,u|i,r|o,o|e,d|o,o|i,r|a,o|a,u|a,r|o,r|i,u|e,d|e,u|a,u|o,d|e,o|i,r|e,o|a,d|o,r|a,d|o,u|i,o|e,u|o,r|a,d|a,o|o,o|a,u|i,r|e,d|a,d|i,o|a,o|o,r|i,d|e,u|o,d|o,r|e,o|i,u|e,u|a,d|i,r|o,d|e,o|e,r|o,u|e,o|i,r|i,u|a];u=8192,d=1<<23,r=u|d,i=1,a=128,e=i|a;var s=[r|i,u|e,u|e,o|a,r|a,d|e,d|i,u|i,o|o,r|o,r|o,r|e,o|e,o|o,d|a,d|i,o|i,u|o,d|o,r|i,o|a,d|o,u|i,u|a,d|e,o|i,u|a,d|a,u|o,r|a,r|e,o|e,d|a,d|i,r|o,r|e,o|e,o|o,o|o,r|o,u|a,d|a,d|e,o|i,r|i,u|e,u|e,o|a,r|e,o|e,o|i,u|o,d|i,u|i,r|a,d|e,u|i,u|a,d|o,r|i,o|a,d|o,u|o,r|a];u=1<<25,d=1<<30,r=u|d,i=256,a=1<<19,e=i|a;var l=[o|i,u|e,u|a,r|i,o|a,o|i,d|o,u|a,d|e,o|a,u|i,d|e,r|i,r|a,o|e,d|o,u|o,d|a,d|a,o|o,d|i,r|e,r|e,u|i,r|a,d|i,o|o,r|o,u|e,u|o,r|o,o|e,o|a,r|i,o|i,u|o,d|o,u|a,r|i,d|e,u|i,d|o,r|a,u|e,d|e,o|i,u|o,r|a,r|e,o|e,r|o,r|e,u|a,o|o,d|a,r|o,o|e,u|i,d|i,o|a,o|o,d|a,u|e,d|i];u=1<<22,d=1<<29,r=u|d,i=16,a=16384,e=i|a;var p=[d|i,r|o,o|a,r|e,r|o,o|i,r|e,u|o,d|a,u|e,u|o,d|i,u|i,d|a,d|o,o|e,o|o,u|i,d|e,o|a,u|a,d|e,o|i,r|i,r|i,o|o,u|e,r|a,o|e,u|a,r|a,d|o,d|a,o|i,r|i,u|a,r|e,u|o,o|e,d|i,u|o,d|a,d|o,o|e,d|i,r|e,u|a,r|o,u|e,r|a,o|o,r|i,o|i,o|a,r|o,u|e,o|a,u|i,d|e,o|o,r|a,d|o,u|i,d|e];u=1<<21,d=1<<26,r=u|d,i=2,a=2048,e=i|a;var g=[u|o,r|i,d|e,o|o,o|a,d|e,u|e,r|a,r|e,u|o,o|o,d|i,o|i,d|o,r|i,o|e,d|a,u|e,u|i,d|a,d|i,r|o,r|a,u|i,r|o,o|a,o|e,r|e,u|a,o|i,d|o,u|a,d|o,u|a,u|o,d|e,d|e,r|i,r|i,o|i,u|i,d|o,d|a,u|o,r|a,o|e,u|e,r|a,o|e,d|i,r|e,r|o,u|a,o|o,o|i,r|e,o|o,u|e,r|o,o|a,d|i,d|a,o|a,u|i];u=1<<18,d=1<<28,r=u|d,i=64,a=4096,e=i|a;var b=[d|e,o|a,u|o,r|e,d|o,d|e,o|i,d|o,u|i,r|o,r|e,u|a,r|a,u|e,o|a,o|i,r|o,d|i,d|a,o|e,u|a,u|i,r|i,r|a,o|e,o|o,o|o,r|i,d|i,d|a,u|e,u|o,u|e,u|o,r|a,o|a,o|i,r|i,o|a,u|e,d|a,o|i,d|i,r|o,r|i,d|o,u|o,d|e,o|o,r|e,u|i,d|i,r|o,d|a,d|e,o|o,r|e,u|a,u|a,o|e,o|e,u|i,d|o,r|a],x=function(){function E(C){c(this,E),this.keys=[];for(var v=[],S=[],k=[],O=0,R=56;O<56;++O,R-=8){R+=R<-5?65:R<-3?31:R<-1?63:R===27?35:0;var U=R&7;v[O]=C[R>>>3]&1<<U?1:0}for(var N=0;N<16;++N){var _e=N<<1,Z=_e+1;k[_e]=k[Z]=0;for(var oe=28;oe<59;oe+=28)for(var L=oe-28;L<oe;++L){var X=L+h[N];S[L]=X<oe?v[X]:v[X-28]}for(var I=0;I<24;++I)S[y[I]]!==0&&(k[_e]|=1<<23-I),S[y[I+24]]!==0&&(k[Z]|=1<<23-I)}for(var j=0,B=0,q=0;j<16;++j){var fe=k[B++],ke=k[B++];this.keys[q]=(fe&16515072)<<6,this.keys[q]|=(fe&4032)<<10,this.keys[q]|=(ke&16515072)>>>10,this.keys[q]|=(ke&4032)>>>6,++q,this.keys[q]=(fe&258048)<<12,this.keys[q]|=(fe&63)<<16,this.keys[q]|=(ke&258048)>>>4,this.keys[q]|=ke&63,++q}}return m(E,[{key:"enc8",value:function(v){var S=v.slice(),k=0,O,R,U;O=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],R=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],U=(O>>>4^R)&252645135,R^=U,O^=U<<4,U=(O>>>16^R)&65535,R^=U,O^=U<<16,U=(R>>>2^O)&858993459,O^=U,R^=U<<2,U=(R>>>8^O)&16711935,O^=U,R^=U<<8,R=R<<1|R>>>31&1,U=(O^R)&2863311530,O^=U,R^=U,O=O<<1|O>>>31&1;for(var N=0,_e=0;N<8;++N){U=R<<28|R>>>4,U^=this.keys[_e++];var Z=g[U&63];Z|=l[U>>>8&63],Z|=n[U>>>16&63],Z|=f[U>>>24&63],U=R^this.keys[_e++],Z|=b[U&63],Z|=p[U>>>8&63],Z|=s[U>>>16&63],Z|=t[U>>>24&63],O^=Z,U=O<<28|O>>>4,U^=this.keys[_e++],Z=g[U&63],Z|=l[U>>>8&63],Z|=n[U>>>16&63],Z|=f[U>>>24&63],U=O^this.keys[_e++],Z|=b[U&63],Z|=p[U>>>8&63],Z|=s[U>>>16&63],Z|=t[U>>>24&63],R^=Z}for(R=R<<31|R>>>1,U=(O^R)&2863311530,O^=U,R^=U,O=O<<31|O>>>1,U=(O>>>8^R)&16711935,R^=U,O^=U<<8,U=(O>>>2^R)&858993459,R^=U,O^=U<<2,U=(R>>>16^O)&65535,O^=U,R^=U<<16,U=(R>>>4^O)&252645135,O^=U,R^=U<<4,U=[R,O],k=0;k<8;k++)S[k]=(U[k>>>2]>>>8*(3-k%4))%256,S[k]<0&&(S[k]+=256);return S}},{key:"encrypt",value:function(v){return this.enc8(v.slice(0,8)).concat(this.enc8(v.slice(8,16)))}}]),E}();D.default=x},61307:function(Te,D,c){"use strict";function _(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(s){return typeof s}:_=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},_(t)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var m=r(c(37095)),y=u(c(10729)),h=c(58863),o=c(77676);function u(t){return t&&t.__esModule?t:{default:t}}function d(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return d=function(){return t},t}function r(t){if(t&&t.__esModule)return t;if(t===null||_(t)!=="object"&&typeof t!="function")return{default:t};var n=d();if(n&&n.has(t))return n.get(t);var s={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in t)if(Object.prototype.hasOwnProperty.call(t,p)){var g=l?Object.getOwnPropertyDescriptor(t,p):null;g&&(g.get||g.set)?Object.defineProperty(s,p,g):s[p]=t[p]}return s.default=t,n&&n.set(t,s),s}function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function a(t,n){for(var s=0;s<n.length;s++){var l=n[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,l.key,l)}}function e(t,n,s){return n&&a(t.prototype,n),s&&a(t,s),t}var f=function(){function t(n){if(i(this,t),this._drawCtx=null,this._renderQ=[],this._flushing=!1,this._fbWidth=0,this._fbHeight=0,this._prevDrawStyle="",this._tile=null,this._tile16x16=null,this._tileX=0,this._tileY=0,m.Debug(">> Display.constructor"),this._target=n,!this._target)throw new Error("Target must be set");if(typeof this._target=="string")throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");if(this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},m.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),m.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return e(t,[{key:"viewportChangePos",value:function(s,l){var p=this._viewportLoc;s=Math.floor(s),l=Math.floor(l),this._clipViewport||(s=-p.w,l=-p.h);var g=p.x+p.w-1,b=p.y+p.h-1;s<0&&p.x+s<0&&(s=-p.x),g+s>=this._fbWidth&&(s-=g+s-this._fbWidth+1),p.y+l<0&&(l=-p.y),b+l>=this._fbHeight&&(l-=b+l-this._fbHeight+1),!(s===0&&l===0)&&(m.Debug("viewportChange deltaX: "+s+", deltaY: "+l),p.x+=s,p.y+=l,this._damage(p.x,p.y,p.w,p.h),this.flip())}},{key:"viewportChangeSize",value:function(s,l){(!this._clipViewport||typeof s=="undefined"||typeof l=="undefined")&&(m.Debug("Setting viewport to full display region"),s=this._fbWidth,l=this._fbHeight),s=Math.floor(s),l=Math.floor(l),s>this._fbWidth&&(s=this._fbWidth),l>this._fbHeight&&(l=this._fbHeight);var p=this._viewportLoc;if(p.w!==s||p.h!==l){p.w=s,p.h=l;var g=this._target;g.width=s,g.height=l,this.viewportChangePos(0,0),this._damage(p.x,p.y,p.w,p.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(s){return this._scale===0?0:(0,o.toSigned32bit)(s/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(s){return this._scale===0?0:(0,o.toSigned32bit)(s/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(s,l){this._prevDrawStyle="",this._fbWidth=s,this._fbHeight=l;var p=this._backbuffer;if(p.width!==s||p.height!==l){var g=null;p.width>0&&p.height>0&&(g=this._drawCtx.getImageData(0,0,p.width,p.height)),p.width!==s&&(p.width=s),p.height!==l&&(p.height=l),g&&this._drawCtx.putImageData(g,0,0)}var b=this._viewportLoc;this.viewportChangeSize(b.w,b.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(s,l,p,g){s<this._damageBounds.left&&(this._damageBounds.left=s),l<this._damageBounds.top&&(this._damageBounds.top=l),s+p>this._damageBounds.right&&(this._damageBounds.right=s+p),l+g>this._damageBounds.bottom&&(this._damageBounds.bottom=l+g)}},{key:"flip",value:function(s){if(this._renderQ.length!==0&&!s)this._renderQPush({type:"flip"});else{var l=this._damageBounds.left,p=this._damageBounds.top,g=this._damageBounds.right-l,b=this._damageBounds.bottom-p,x=l-this._viewportLoc.x,E=p-this._viewportLoc.y;x<0&&(g+=x,l-=x,x=0),E<0&&(b+=E,p-=E,E=0),x+g>this._viewportLoc.w&&(g=this._viewportLoc.w-x),E+b>this._viewportLoc.h&&(b=this._viewportLoc.h-E),g>0&&b>0&&this._targetCtx.drawImage(this._backbuffer,l,p,g,b,x,E,g,b),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}}},{key:"pending",value:function(){return this._renderQ.length>0}},{key:"flush",value:function(){this._renderQ.length===0?this.onflush():this._flushing=!0}},{key:"fillRect",value:function(s,l,p,g,b,x){this._renderQ.length!==0&&!x?this._renderQPush({type:"fill",x:s,y:l,width:p,height:g,color:b}):(this._setFillColor(b),this._drawCtx.fillRect(s,l,p,g),this._damage(s,l,p,g))}},{key:"copyImage",value:function(s,l,p,g,b,x,E){this._renderQ.length!==0&&!E?this._renderQPush({type:"copy",oldX:s,oldY:l,x:p,y:g,width:b,height:x}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,s,l,b,x,p,g,b,x),this._damage(p,g,b,x))}},{key:"imageRect",value:function(s,l,p,g,b,x){if(!(p===0||g===0)){var E=new Image;E.src="data: "+b+";base64,"+y.default.encode(x),this._renderQPush({type:"img",img:E,x:s,y:l,width:p,height:g})}}},{key:"startTile",value:function(s,l,p,g,b){this._tileX=s,this._tileY=l,p===16&&g===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(p,g);for(var x=b[2],E=b[1],C=b[0],v=this._tile.data,S=0;S<p*g*4;S+=4)v[S]=x,v[S+1]=E,v[S+2]=C,v[S+3]=255}},{key:"subTile",value:function(s,l,p,g,b){for(var x=b[2],E=b[1],C=b[0],v=s+p,S=l+g,k=this._tile.data,O=this._tile.width,R=l;R<S;R++)for(var U=s;U<v;U++){var N=(U+R*O)*4;k[N]=x,k[N+1]=E,k[N+2]=C,k[N+3]=255}}},{key:"finishTile",value:function(){this._drawCtx.putImageData(this._tile,this._tileX,this._tileY),this._damage(this._tileX,this._tileY,this._tile.width,this._tile.height)}},{key:"blitImage",value:function(s,l,p,g,b,x,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(p*g*4);C.set(new Uint8Array(b.buffer,0,C.length)),this._renderQPush({type:"blit",data:C,x:s,y:l,width:p,height:g})}else this._bgrxImageData(s,l,p,g,b,x)}},{key:"blitRgbImage",value:function(s,l,p,g,b,x,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(p*g*3);C.set(new Uint8Array(b.buffer,0,C.length)),this._renderQPush({type:"blitRgb",data:C,x:s,y:l,width:p,height:g})}else this._rgbImageData(s,l,p,g,b,x)}},{key:"blitRgbxImage",value:function(s,l,p,g,b,x,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(p*g*4);C.set(new Uint8Array(b.buffer,0,C.length)),this._renderQPush({type:"blitRgbx",data:C,x:s,y:l,width:p,height:g})}else this._rgbxImageData(s,l,p,g,b,x)}},{key:"drawImage",value:function(s,l,p){this._drawCtx.drawImage(s,l,p),this._damage(l,p,s.width,s.height)}},{key:"autoscale",value:function(s,l){var p;if(s===0||l===0)p=0;else{var g=this._viewportLoc,b=s/l,x=g.w/g.h;x>=b?p=s/g.w:p=l/g.h}this._rescale(p)}},{key:"_rescale",value:function(s){this._scale=s;var l=this._viewportLoc,p=s*l.w+"px",g=s*l.h+"px";(this._target.style.width!==p||this._target.style.height!==g)&&(this._target.style.width=p,this._target.style.height=g)}},{key:"_setFillColor",value:function(s){var l="rgb("+s[2]+","+s[1]+","+s[0]+")";l!==this._prevDrawStyle&&(this._drawCtx.fillStyle=l,this._prevDrawStyle=l)}},{key:"_rgbImageData",value:function(s,l,p,g,b,x){for(var E=this._drawCtx.createImageData(p,g),C=E.data,v=0,S=x;v<p*g*4;v+=4,S+=3)C[v]=b[S],C[v+1]=b[S+1],C[v+2]=b[S+2],C[v+3]=255;this._drawCtx.putImageData(E,s,l),this._damage(s,l,E.width,E.height)}},{key:"_bgrxImageData",value:function(s,l,p,g,b,x){for(var E=this._drawCtx.createImageData(p,g),C=E.data,v=0,S=x;v<p*g*4;v+=4,S+=4)C[v]=b[S+2],C[v+1]=b[S+1],C[v+2]=b[S],C[v+3]=255;this._drawCtx.putImageData(E,s,l),this._damage(s,l,E.width,E.height)}},{key:"_rgbxImageData",value:function(s,l,p,g,b,x){var E;h.supportsImageMetadata?E=new ImageData(new Uint8ClampedArray(b.buffer,b.byteOffset,p*g*4),p,g):(E=this._drawCtx.createImageData(p,g),E.data.set(new Uint8ClampedArray(b.buffer,b.byteOffset,p*g*4))),this._drawCtx.putImageData(E,s,l),this._damage(s,l,E.width,E.height)}},{key:"_renderQPush",value:function(s){this._renderQ.push(s),this._renderQ.length===1&&this._scanRenderQ()}},{key:"_resumeRenderQ",value:function(){this.removeEventListener("load",this._noVNCDisplay._resumeRenderQ),this._noVNCDisplay._scanRenderQ()}},{key:"_scanRenderQ",value:function(){for(var s=!0;s&&this._renderQ.length>0;){var l=this._renderQ[0];switch(l.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(l.oldX,l.oldY,l.x,l.y,l.width,l.height,!0);break;case"fill":this.fillRect(l.x,l.y,l.width,l.height,l.color,!0);break;case"blit":this.blitImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"blitRgb":this.blitRgbImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"img":if(l.img.complete&&l.img.width!==0&&l.img.height!==0){if(l.img.width!==l.width||l.img.height!==l.height){m.Error("Decoded image has incorrect dimensions. Got "+l.img.width+"x"+l.img.height+". Expected "+l.width+"x"+l.height+".");return}this.drawImage(l.img,l.x,l.y)}else l.img._noVNCDisplay=this,l.img.addEventListener("load",this._resumeRenderQ),s=!1;break}s&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(s){this._rescale(s)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(s){this._clipViewport=s;var l=this._viewportLoc;this.viewportChangeSize(l.w,l.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),t}();D.default=f},29274:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.encodingName=_,D.encodings=void 0;var c={encodingRaw:0,encodingCopyRect:1,encodingRRE:2,encodingHextile:5,encodingTight:7,encodingTightPNG:-260,pseudoEncodingQualityLevel9:-23,pseudoEncodingQualityLevel0:-32,pseudoEncodingDesktopSize:-223,pseudoEncodingLastRect:-224,pseudoEncodingCursor:-239,pseudoEncodingQEMUExtendedKeyEvent:-258,pseudoEncodingDesktopName:-307,pseudoEncodingExtendedDesktopSize:-308,pseudoEncodingXvp:-309,pseudoEncodingFence:-312,pseudoEncodingContinuousUpdates:-313,pseudoEncodingCompressLevel9:-247,pseudoEncodingCompressLevel0:-256,pseudoEncodingVMwareCursor:1464686180,pseudoEncodingExtendedClipboard:3231835598};D.encodings=c;function _(m){switch(m){case c.encodingRaw:return"Raw";case c.encodingCopyRect:return"CopyRect";case c.encodingRRE:return"RRE";case c.encodingHextile:return"Hextile";case c.encodingTight:return"Tight";case c.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+m+"]"}}},77367:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=c(47169),m=y(c(696));function y(r){return r&&r.__esModule?r:{default:r}}function h(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var a=0;a<i.length;a++){var e=i[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function u(r,i,a){return i&&o(r.prototype,i),a&&o(r,a),r}var d=function(){function r(){h(this,r),this.strm=new m.default,this.chunkSize=1024*10*10,this.strm.output=new Uint8Array(this.chunkSize),this.windowBits=5,(0,_.inflateInit)(this.strm,this.windowBits)}return u(r,[{key:"setInput",value:function(a){a?(this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0):(this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0)}},{key:"inflate",value:function(a){a>this.chunkSize&&(this.chunkSize=a,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=a;var e=(0,_.inflate)(this.strm,0);if(e<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=a)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,_.inflateReset)(this.strm)}}]),r}();D.default=d},14455:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=m(c(93126));function m(r){return r&&r.__esModule?r:{default:r}}var y={};function h(r,i){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in y)throw new Error('Duplicate entry for key "'+r+'"');y[r]=[i,i,i,i]}function o(r,i,a){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in y)throw new Error('Duplicate entry for key "'+r+'"');y[r]=[i,i,a,i]}function u(r,i,a){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in y)throw new Error('Duplicate entry for key "'+r+'"');y[r]=[i,i,i,a]}o("Alt",_.default.XK_Alt_L,_.default.XK_Alt_R),h("AltGraph",_.default.XK_ISO_Level3_Shift),h("CapsLock",_.default.XK_Caps_Lock),o("Control",_.default.XK_Control_L,_.default.XK_Control_R),o("Meta",_.default.XK_Super_L,_.default.XK_Super_R),h("NumLock",_.default.XK_Num_Lock),h("ScrollLock",_.default.XK_Scroll_Lock),o("Shift",_.default.XK_Shift_L,_.default.XK_Shift_R),u("Enter",_.default.XK_Return,_.default.XK_KP_Enter),h("Tab",_.default.XK_Tab),u(" ",_.default.XK_space,_.default.XK_KP_Space),u("ArrowDown",_.default.XK_Down,_.default.XK_KP_Down),u("ArrowUp",_.default.XK_Up,_.default.XK_KP_Up),u("ArrowLeft",_.default.XK_Left,_.default.XK_KP_Left),u("ArrowRight",_.default.XK_Right,_.default.XK_KP_Right),u("End",_.default.XK_End,_.default.XK_KP_End),u("Home",_.default.XK_Home,_.default.XK_KP_Home),u("PageDown",_.default.XK_Next,_.default.XK_KP_Next),u("PageUp",_.default.XK_Prior,_.default.XK_KP_Prior),h("Backspace",_.default.XK_BackSpace),u("Clear",_.default.XK_Clear,_.default.XK_KP_Begin),h("Copy",_.default.XF86XK_Copy),h("Cut",_.default.XF86XK_Cut),u("Delete",_.default.XK_Delete,_.default.XK_KP_Delete),u("Insert",_.default.XK_Insert,_.default.XK_KP_Insert),h("Paste",_.default.XF86XK_Paste),h("Redo",_.default.XK_Redo),h("Undo",_.default.XK_Undo),h("Cancel",_.default.XK_Cancel),h("ContextMenu",_.default.XK_Menu),h("Escape",_.default.XK_Escape),h("Execute",_.default.XK_Execute),h("Find",_.default.XK_Find),h("Help",_.default.XK_Help),h("Pause",_.default.XK_Pause),h("Select",_.default.XK_Select),h("ZoomIn",_.default.XF86XK_ZoomIn),h("ZoomOut",_.default.XF86XK_ZoomOut),h("BrightnessDown",_.default.XF86XK_MonBrightnessDown),h("BrightnessUp",_.default.XF86XK_MonBrightnessUp),h("Eject",_.default.XF86XK_Eject),h("LogOff",_.default.XF86XK_LogOff),h("Power",_.default.XF86XK_PowerOff),h("PowerOff",_.default.XF86XK_PowerDown),h("PrintScreen",_.default.XK_Print),h("Hibernate",_.default.XF86XK_Hibernate),h("Standby",_.default.XF86XK_Standby),h("WakeUp",_.default.XF86XK_WakeUp),h("AllCandidates",_.default.XK_MultipleCandidate),h("Alphanumeric",_.default.XK_Eisu_Shift),h("CodeInput",_.default.XK_Codeinput),h("Compose",_.default.XK_Multi_key),h("Convert",_.default.XK_Henkan),h("GroupFirst",_.default.XK_ISO_First_Group),h("GroupLast",_.default.XK_ISO_Last_Group),h("GroupNext",_.default.XK_ISO_Next_Group),h("GroupPrevious",_.default.XK_ISO_Prev_Group),h("NonConvert",_.default.XK_Muhenkan),h("PreviousCandidate",_.default.XK_PreviousCandidate),h("SingleCandidate",_.default.XK_SingleCandidate),h("HangulMode",_.default.XK_Hangul),h("HanjaMode",_.default.XK_Hangul_Hanja),h("JunjuaMode",_.default.XK_Hangul_Jeonja),h("Eisu",_.default.XK_Eisu_toggle),h("Hankaku",_.default.XK_Hankaku),h("Hiragana",_.default.XK_Hiragana),h("HiraganaKatakana",_.default.XK_Hiragana_Katakana),h("KanaMode",_.default.XK_Kana_Shift),h("KanjiMode",_.default.XK_Kanji),h("Katakana",_.default.XK_Katakana),h("Romaji",_.default.XK_Romaji),h("Zenkaku",_.default.XK_Zenkaku),h("ZenkakuHanaku",_.default.XK_Zenkaku_Hankaku),h("F1",_.default.XK_F1),h("F2",_.default.XK_F2),h("F3",_.default.XK_F3),h("F4",_.default.XK_F4),h("F5",_.default.XK_F5),h("F6",_.default.XK_F6),h("F7",_.default.XK_F7),h("F8",_.default.XK_F8),h("F9",_.default.XK_F9),h("F10",_.default.XK_F10),h("F11",_.default.XK_F11),h("F12",_.default.XK_F12),h("F13",_.default.XK_F13),h("F14",_.default.XK_F14),h("F15",_.default.XK_F15),h("F16",_.default.XK_F16),h("F17",_.default.XK_F17),h("F18",_.default.XK_F18),h("F19",_.default.XK_F19),h("F20",_.default.XK_F20),h("F21",_.default.XK_F21),h("F22",_.default.XK_F22),h("F23",_.default.XK_F23),h("F24",_.default.XK_F24),h("F25",_.default.XK_F25),h("F26",_.default.XK_F26),h("F27",_.default.XK_F27),h("F28",_.default.XK_F28),h("F29",_.default.XK_F29),h("F30",_.default.XK_F30),h("F31",_.default.XK_F31),h("F32",_.default.XK_F32),h("F33",_.default.XK_F33),h("F34",_.default.XK_F34),h("F35",_.default.XK_F35),h("Close",_.default.XF86XK_Close),h("MailForward",_.default.XF86XK_MailForward),h("MailReply",_.default.XF86XK_Reply),h("MailSend",_.default.XF86XK_Send),h("MediaFastForward",_.default.XF86XK_AudioForward),h("MediaPause",_.default.XF86XK_AudioPause),h("MediaPlay",_.default.XF86XK_AudioPlay),h("MediaRecord",_.default.XF86XK_AudioRecord),h("MediaRewind",_.default.XF86XK_AudioRewind),h("MediaStop",_.default.XF86XK_AudioStop),h("MediaTrackNext",_.default.XF86XK_AudioNext),h("MediaTrackPrevious",_.default.XF86XK_AudioPrev),h("New",_.default.XF86XK_New),h("Open",_.default.XF86XK_Open),h("Print",_.default.XK_Print),h("Save",_.default.XF86XK_Save),h("SpellCheck",_.default.XF86XK_Spell),h("AudioVolumeDown",_.default.XF86XK_AudioLowerVolume),h("AudioVolumeUp",_.default.XF86XK_AudioRaiseVolume),h("AudioVolumeMute",_.default.XF86XK_AudioMute),h("MicrophoneVolumeMute",_.default.XF86XK_AudioMicMute),h("LaunchApplication1",_.default.XF86XK_MyComputer),h("LaunchApplication2",_.default.XF86XK_Calculator),h("LaunchCalendar",_.default.XF86XK_Calendar),h("LaunchMail",_.default.XF86XK_Mail),h("LaunchMediaPlayer",_.default.XF86XK_AudioMedia),h("LaunchMusicPlayer",_.default.XF86XK_Music),h("LaunchPhone",_.default.XF86XK_Phone),h("LaunchScreenSaver",_.default.XF86XK_ScreenSaver),h("LaunchSpreadsheet",_.default.XF86XK_Excel),h("LaunchWebBrowser",_.default.XF86XK_WWW),h("LaunchWebCam",_.default.XF86XK_WebCam),h("LaunchWordProcessor",_.default.XF86XK_Word),h("BrowserBack",_.default.XF86XK_Back),h("BrowserFavorites",_.default.XF86XK_Favorites),h("BrowserForward",_.default.XF86XK_Forward),h("BrowserHome",_.default.XF86XK_HomePage),h("BrowserRefresh",_.default.XF86XK_Refresh),h("BrowserSearch",_.default.XF86XK_Search),h("BrowserStop",_.default.XF86XK_Stop),h("Dimmer",_.default.XF86XK_BrightnessAdjust),h("MediaAudioTrack",_.default.XF86XK_AudioCycleTrack),h("RandomToggle",_.default.XF86XK_AudioRandomPlay),h("SplitScreenToggle",_.default.XF86XK_SplitScreen),h("Subtitle",_.default.XF86XK_Subtitle),h("VideoModeNext",_.default.XF86XK_Next_VMode),u("=",_.default.XK_equal,_.default.XK_KP_Equal),u("+",_.default.XK_plus,_.default.XK_KP_Add),u("-",_.default.XK_minus,_.default.XK_KP_Subtract),u("*",_.default.XK_asterisk,_.default.XK_KP_Multiply),u("/",_.default.XK_slash,_.default.XK_KP_Divide),u(".",_.default.XK_period,_.default.XK_KP_Decimal),u(",",_.default.XK_comma,_.default.XK_KP_Separator),u("0",_.default.XK_0,_.default.XK_KP_0),u("1",_.default.XK_1,_.default.XK_KP_1),u("2",_.default.XK_2,_.default.XK_KP_2),u("3",_.default.XK_3,_.default.XK_KP_3),u("4",_.default.XK_4,_.default.XK_KP_4),u("5",_.default.XK_5,_.default.XK_KP_5),u("6",_.default.XK_6,_.default.XK_KP_6),u("7",_.default.XK_7,_.default.XK_KP_7),u("8",_.default.XK_8,_.default.XK_KP_8),u("9",_.default.XK_9,_.default.XK_KP_9);var d=y;D.default=d},2090:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};D.default=c},64526:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(b,x){if(!(b instanceof x))throw new TypeError("Cannot call a class as a function")}function _(b,x){for(var E=0;E<x.length;E++){var C=x[E];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(b,C.key,C)}}function m(b,x,E){return x&&_(b.prototype,x),E&&_(b,E),b}var y=0,h=1,o=2,u=4,d=8,r=16,i=32,a=64,e=127,f=50,t=90,n=250,s=1e3,l=1e3,p=50,g=function(){function b(){c(this,b),this._target=null,this._state=e,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}return m(b,[{key:"attach",value:function(E){this.detach(),this._target=E,this._target.addEventListener("touchstart",this._boundEventHandler),this._target.addEventListener("touchmove",this._boundEventHandler),this._target.addEventListener("touchend",this._boundEventHandler),this._target.addEventListener("touchcancel",this._boundEventHandler)}},{key:"detach",value:function(){this._target&&(this._stopLongpressTimeout(),this._stopTwoTouchTimeout(),this._target.removeEventListener("touchstart",this._boundEventHandler),this._target.removeEventListener("touchmove",this._boundEventHandler),this._target.removeEventListener("touchend",this._boundEventHandler),this._target.removeEventListener("touchcancel",this._boundEventHandler),this._target=null)}},{key:"_eventHandler",value:function(E){var C;switch(E.stopPropagation(),E.preventDefault(),E.type){case"touchstart":C=this._touchStart;break;case"touchmove":C=this._touchMove;break;case"touchend":case"touchcancel":C=this._touchEnd;break}for(var v=0;v<E.changedTouches.length;v++){var S=E.changedTouches[v];C.call(this,S.identifier,S.clientX,S.clientY)}}},{key:"_touchStart",value:function(E,C,v){if(this._hasDetectedGesture()||this._state===y){this._ignored.push(E);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>n){this._state=y,this._ignored.push(E);return}if(this._waitingRelease){this._state=y,this._ignored.push(E);return}switch(this._tracked.push({id:E,started:Date.now(),active:!0,firstX:C,firstY:v,lastX:C,lastY:v,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(h|d|r),this._stopLongpressTimeout();break;case 3:this._state&=~(o|i|a);break;default:this._state=y}}},{key:"_touchMove",value:function(E,C,v){var S=this._tracked.find(function(_e){return _e.id===E});if(S!==void 0){S.lastX=C,S.lastY=v;var k=C-S.firstX,O=v-S.firstY;if((S.firstX!==S.lastX||S.firstY!==S.lastY)&&(S.angle=Math.atan2(O,k)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(k,O)<f)return;if(this._state&=~(h|o|u|r),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~d),this._tracked.length!==2&&(this._state&=~(i|a)),this._tracked.length===2){var R=this._tracked.find(function(_e){return _e.id!==E}),U=Math.hypot(R.firstX-R.lastX,R.firstY-R.lastY);if(U>f){var N=Math.abs(S.angle-R.angle);N=Math.abs((N+180)%360-180),N>t?this._state&=~i:this._state&=~a,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}}},{key:"_touchEnd",value:function(E,C,v){if(this._ignored.indexOf(E)!==-1){this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=e,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=y),!this._hasDetectedGesture()&&(this._state&=~(d|i|a),this._state&=~r,this._stopLongpressTimeout(),!this._waitingRelease))switch(this._releaseStart=Date.now(),this._waitingRelease=!0,this._tracked.length){case 1:this._state&=~(o|u);break;case 2:this._state&=~(h|u);break}if(this._waitingRelease){Date.now()-this._releaseStart>n&&(this._state=y),this._tracked.some(function(O){return Date.now()-O.started>s})&&(this._state=y);var S=this._tracked.find(function(O){return O.id===E});if(S.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==y)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var k=0;k<this._tracked.length;k++)this._tracked[k].active&&this._ignored.push(this._tracked[k].id);this._tracked=[],this._state=y,this._ignored.indexOf(E)!==-1&&this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&(this._state=e,this._waitingRelease=!1)}},{key:"_hasDetectedGesture",value:function(){return!(this._state===y||this._state&this._state-1||this._state&(h|o|u)&&this._tracked.some(function(E){return E.active}))}},{key:"_startLongpressTimeout",value:function(){var E=this;this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout(function(){return E._longpressTimeout()},l)}},{key:"_stopLongpressTimeout",value:function(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}},{key:"_longpressTimeout",value:function(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=r,this._pushEvent("gesturestart")}},{key:"_startTwoTouchTimeout",value:function(){var E=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return E._twoTouchTimeout()},p)}},{key:"_stopTwoTouchTimeout",value:function(){clearTimeout(this._twoTouchTimeoutId),this._twoTouchTimeoutId=null}},{key:"_isTwoTouchTimeoutRunning",value:function(){return this._twoTouchTimeoutId!==null}},{key:"_twoTouchTimeout",value:function(){if(this._tracked.length===0)throw new Error("A pinch or two drag gesture failed, no tracked touches");var E=this._getAverageMovement(),C=Math.abs(E.x),v=Math.abs(E.y),S=this._getAverageDistance(),k=Math.abs(Math.hypot(S.first.x,S.first.y)-Math.hypot(S.last.x,S.last.y));v<k&&C<k?this._state=a:this._state=i,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(E){var C={type:this._stateToGesture(this._state)},v=this._getPosition(),S=v.last;switch(E==="gesturestart"&&(S=v.first),this._state){case i:case a:S=v.first;break}if(C.clientX=S.x,C.clientY=S.y,this._state===a){var k=this._getAverageDistance();E==="gesturestart"?(C.magnitudeX=k.first.x,C.magnitudeY=k.first.y):(C.magnitudeX=k.last.x,C.magnitudeY=k.last.y)}else if(this._state===i)if(E==="gesturestart")C.magnitudeX=0,C.magnitudeY=0;else{var O=this._getAverageMovement();C.magnitudeX=O.x,C.magnitudeY=O.y}var R=new CustomEvent(E,{detail:C});this._target.dispatchEvent(R)}},{key:"_stateToGesture",value:function(E){switch(E){case h:return"onetap";case o:return"twotap";case u:return"threetap";case d:return"drag";case r:return"longpress";case i:return"twodrag";case a:return"pinch"}throw new Error("Unknown gesture state: "+E)}},{key:"_getPosition",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture position, no tracked touches");for(var E=this._tracked.length,C=0,v=0,S=0,k=0,O=0;O<this._tracked.length;O++)C+=this._tracked[O].firstX,v+=this._tracked[O].firstY,S+=this._tracked[O].lastX,k+=this._tracked[O].lastY;return{first:{x:C/E,y:v/E},last:{x:S/E,y:k/E}}}},{key:"_getAverageMovement",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture movement, no tracked touches");var E,C;E=C=0;for(var v=this._tracked.length,S=0;S<this._tracked.length;S++)E+=this._tracked[S].lastX-this._tracked[S].firstX,C+=this._tracked[S].lastY-this._tracked[S].firstY;return{x:E/v,y:C/v}}},{key:"_getAverageDistance",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture distance, no tracked touches");var E=this._tracked[0],C=this._tracked[this._tracked.length-1],v=Math.abs(C.firstX-E.firstX),S=Math.abs(C.firstY-E.firstY),k=Math.abs(C.lastX-E.lastX),O=Math.abs(C.lastY-E.lastY);return{first:{x:v,y:S},last:{x:k,y:O}}}}]),b}();D.default=g},40195:function(Te,D,c){"use strict";function _(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(l){return typeof l}:_=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_(n)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var m=i(c(37095)),y=c(32466),h=i(c(58150)),o=d(c(93126)),u=i(c(58863));function d(n){return n&&n.__esModule?n:{default:n}}function r(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return r=function(){return n},n}function i(n){if(n&&n.__esModule)return n;if(n===null||_(n)!=="object"&&typeof n!="function")return{default:n};var s=r();if(s&&s.has(n))return s.get(n);var l={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in n)if(Object.prototype.hasOwnProperty.call(n,g)){var b=p?Object.getOwnPropertyDescriptor(n,g):null;b&&(b.get||b.set)?Object.defineProperty(l,g,b):l[g]=n[g]}return l.default=n,s&&s.set(n,l),l}function a(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function e(n,s){for(var l=0;l<s.length;l++){var p=s[l];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(n,p.key,p)}}function f(n,s,l){return s&&e(n.prototype,s),l&&e(n,l),n}var t=function(){function n(s){a(this,n),this._target=s||null,this._keyDownList={},this._pendingKey=null,this._altGrArmed=!1,this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),keypress:this._handleKeyPress.bind(this),blur:this._allKeysUp.bind(this),checkalt:this._checkAlt.bind(this)},this.onkeyevent=function(){}}return f(n,[{key:"_sendKeyEvent",value:function(l,p,g){if(g)this._keyDownList[p]=l;else{if(!(p in this._keyDownList))return;delete this._keyDownList[p]}m.Debug("onkeyevent "+(g?"down":"up")+", keysym: "+l,", code: "+p),this.onkeyevent(l,p,g)}},{key:"_getKeyCode",value:function(l){var p=h.getKeycode(l);if(p!=="Unidentified")return p;if(l.keyCode&&l.type!=="keypress"&&l.keyCode!==229)return"Platform"+l.keyCode;if(l.keyIdentifier){if(l.keyIdentifier.substr(0,2)!=="U+")return l.keyIdentifier;var g=parseInt(l.keyIdentifier.substr(2),16),b=String.fromCharCode(g).toUpperCase();return"Platform"+b.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(l){var p=this._getKeyCode(l),g=h.getKeysym(l);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),p==="AltRight"&&l.timeStamp-this._altGrCtrlTime<50?g=o.default.XK_ISO_Level3_Shift:this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),p==="Unidentified"){g&&(this._sendKeyEvent(g,p,!0),this._sendKeyEvent(g,p,!1)),(0,y.stopEvent)(l);return}if(u.isMac()||u.isIOS())switch(g){case o.default.XK_Super_L:g=o.default.XK_Alt_L;break;case o.default.XK_Super_R:g=o.default.XK_Super_L;break;case o.default.XK_Alt_L:g=o.default.XK_Mode_switch;break;case o.default.XK_Alt_R:g=o.default.XK_ISO_Level3_Shift;break}if(p in this._keyDownList&&(g=this._keyDownList[p]),(u.isMac()||u.isIOS())&&p==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1),(0,y.stopEvent)(l);return}if(!g&&(!l.key||u.isIE()||u.isEdge())){this._pendingKey=p,setTimeout(this._handleKeyPressTimeout.bind(this),10,l);return}if(this._pendingKey=null,(0,y.stopEvent)(l),p==="ControlLeft"&&u.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=l.timeStamp;return}this._sendKeyEvent(g,p,!0)}},{key:"_handleKeyPress",value:function(l){if((0,y.stopEvent)(l),this._pendingKey!==null){var p=this._getKeyCode(l),g=h.getKeysym(l);if(!(p!=="Unidentified"&&p!=this._pendingKey)){if(p=this._pendingKey,this._pendingKey=null,!g){m.Info("keypress with no keysym:",l);return}this._sendKeyEvent(g,p,!0)}}}},{key:"_handleKeyPressTimeout",value:function(l){if(this._pendingKey!==null){var p,g=this._pendingKey;if(this._pendingKey=null,l.keyCode>=48&&l.keyCode<=57)p=l.keyCode;else if(l.keyCode>=65&&l.keyCode<=90){var b=String.fromCharCode(l.keyCode);l.shiftKey?b=b.toUpperCase():b=b.toLowerCase(),p=b.charCodeAt()}else p=0;this._sendKeyEvent(p,g,!0)}}},{key:"_handleKeyUp",value:function(l){(0,y.stopEvent)(l);var p=this._getKeyCode(l);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),(u.isMac()||u.isIOS())&&p==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[p],p,!1),u.isWindows()&&(p==="ShiftLeft"||p==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){m.Debug(">> Keyboard.allKeysUp");for(var l in this._keyDownList)this._sendKeyEvent(this._keyDownList[l],l,!1);m.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(l){if(!l.skipCheckAlt&&!l.altKey){var p=this._target,g=this._keyDownList;["AltLeft","AltRight"].forEach(function(b){if(b in g){var x=new KeyboardEvent("keyup",{key:g[b],code:b});x.skipCheckAlt=!0,p.dispatchEvent(x)}})}}},{key:"grab",value:function(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),u.isWindows()&&u.isFirefox()){var l=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(p){return document.addEventListener(p,l,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(u.isWindows()&&u.isFirefox()){var l=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(p){return document.removeEventListener(p,l)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),n}();D.default=t},93126:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={XK_VoidSymbol:16777215,XK_BackSpace:65288,XK_Tab:65289,XK_Linefeed:65290,XK_Clear:65291,XK_Return:65293,XK_Pause:65299,XK_Scroll_Lock:65300,XK_Sys_Req:65301,XK_Escape:65307,XK_Delete:65535,XK_Multi_key:65312,XK_Codeinput:65335,XK_SingleCandidate:65340,XK_MultipleCandidate:65341,XK_PreviousCandidate:65342,XK_Kanji:65313,XK_Muhenkan:65314,XK_Henkan_Mode:65315,XK_Henkan:65315,XK_Romaji:65316,XK_Hiragana:65317,XK_Katakana:65318,XK_Hiragana_Katakana:65319,XK_Zenkaku:65320,XK_Hankaku:65321,XK_Zenkaku_Hankaku:65322,XK_Touroku:65323,XK_Massyo:65324,XK_Kana_Lock:65325,XK_Kana_Shift:65326,XK_Eisu_Shift:65327,XK_Eisu_toggle:65328,XK_Kanji_Bangou:65335,XK_Zen_Koho:65341,XK_Mae_Koho:65342,XK_Home:65360,XK_Left:65361,XK_Up:65362,XK_Right:65363,XK_Down:65364,XK_Prior:65365,XK_Page_Up:65365,XK_Next:65366,XK_Page_Down:65366,XK_End:65367,XK_Begin:65368,XK_Select:65376,XK_Print:65377,XK_Execute:65378,XK_Insert:65379,XK_Undo:65381,XK_Redo:65382,XK_Menu:65383,XK_Find:65384,XK_Cancel:65385,XK_Help:65386,XK_Break:65387,XK_Mode_switch:65406,XK_script_switch:65406,XK_Num_Lock:65407,XK_KP_Space:65408,XK_KP_Tab:65417,XK_KP_Enter:65421,XK_KP_F1:65425,XK_KP_F2:65426,XK_KP_F3:65427,XK_KP_F4:65428,XK_KP_Home:65429,XK_KP_Left:65430,XK_KP_Up:65431,XK_KP_Right:65432,XK_KP_Down:65433,XK_KP_Prior:65434,XK_KP_Page_Up:65434,XK_KP_Next:65435,XK_KP_Page_Down:65435,XK_KP_End:65436,XK_KP_Begin:65437,XK_KP_Insert:65438,XK_KP_Delete:65439,XK_KP_Equal:65469,XK_KP_Multiply:65450,XK_KP_Add:65451,XK_KP_Separator:65452,XK_KP_Subtract:65453,XK_KP_Decimal:65454,XK_KP_Divide:65455,XK_KP_0:65456,XK_KP_1:65457,XK_KP_2:65458,XK_KP_3:65459,XK_KP_4:65460,XK_KP_5:65461,XK_KP_6:65462,XK_KP_7:65463,XK_KP_8:65464,XK_KP_9:65465,XK_F1:65470,XK_F2:65471,XK_F3:65472,XK_F4:65473,XK_F5:65474,XK_F6:65475,XK_F7:65476,XK_F8:65477,XK_F9:65478,XK_F10:65479,XK_F11:65480,XK_L1:65480,XK_F12:65481,XK_L2:65481,XK_F13:65482,XK_L3:65482,XK_F14:65483,XK_L4:65483,XK_F15:65484,XK_L5:65484,XK_F16:65485,XK_L6:65485,XK_F17:65486,XK_L7:65486,XK_F18:65487,XK_L8:65487,XK_F19:65488,XK_L9:65488,XK_F20:65489,XK_L10:65489,XK_F21:65490,XK_R1:65490,XK_F22:65491,XK_R2:65491,XK_F23:65492,XK_R3:65492,XK_F24:65493,XK_R4:65493,XK_F25:65494,XK_R5:65494,XK_F26:65495,XK_R6:65495,XK_F27:65496,XK_R7:65496,XK_F28:65497,XK_R8:65497,XK_F29:65498,XK_R9:65498,XK_F30:65499,XK_R10:65499,XK_F31:65500,XK_R11:65500,XK_F32:65501,XK_R12:65501,XK_F33:65502,XK_R13:65502,XK_F34:65503,XK_R14:65503,XK_F35:65504,XK_R15:65504,XK_Shift_L:65505,XK_Shift_R:65506,XK_Control_L:65507,XK_Control_R:65508,XK_Caps_Lock:65509,XK_Shift_Lock:65510,XK_Meta_L:65511,XK_Meta_R:65512,XK_Alt_L:65513,XK_Alt_R:65514,XK_Super_L:65515,XK_Super_R:65516,XK_Hyper_L:65517,XK_Hyper_R:65518,XK_ISO_Level3_Shift:65027,XK_ISO_Next_Group:65032,XK_ISO_Prev_Group:65034,XK_ISO_First_Group:65036,XK_ISO_Last_Group:65038,XK_space:32,XK_exclam:33,XK_quotedbl:34,XK_numbersign:35,XK_dollar:36,XK_percent:37,XK_ampersand:38,XK_apostrophe:39,XK_quoteright:39,XK_parenleft:40,XK_parenright:41,XK_asterisk:42,XK_plus:43,XK_comma:44,XK_minus:45,XK_period:46,XK_slash:47,XK_0:48,XK_1:49,XK_2:50,XK_3:51,XK_4:52,XK_5:53,XK_6:54,XK_7:55,XK_8:56,XK_9:57,XK_colon:58,XK_semicolon:59,XK_less:60,XK_equal:61,XK_greater:62,XK_question:63,XK_at:64,XK_A:65,XK_B:66,XK_C:67,XK_D:68,XK_E:69,XK_F:70,XK_G:71,XK_H:72,XK_I:73,XK_J:74,XK_K:75,XK_L:76,XK_M:77,XK_N:78,XK_O:79,XK_P:80,XK_Q:81,XK_R:82,XK_S:83,XK_T:84,XK_U:85,XK_V:86,XK_W:87,XK_X:88,XK_Y:89,XK_Z:90,XK_bracketleft:91,XK_backslash:92,XK_bracketright:93,XK_asciicircum:94,XK_underscore:95,XK_grave:96,XK_quoteleft:96,XK_a:97,XK_b:98,XK_c:99,XK_d:100,XK_e:101,XK_f:102,XK_g:103,XK_h:104,XK_i:105,XK_j:106,XK_k:107,XK_l:108,XK_m:109,XK_n:110,XK_o:111,XK_p:112,XK_q:113,XK_r:114,XK_s:115,XK_t:116,XK_u:117,XK_v:118,XK_w:119,XK_x:120,XK_y:121,XK_z:122,XK_braceleft:123,XK_bar:124,XK_braceright:125,XK_asciitilde:126,XK_nobreakspace:160,XK_exclamdown:161,XK_cent:162,XK_sterling:163,XK_currency:164,XK_yen:165,XK_brokenbar:166,XK_section:167,XK_diaeresis:168,XK_copyright:169,XK_ordfeminine:170,XK_guillemotleft:171,XK_notsign:172,XK_hyphen:173,XK_registered:174,XK_macron:175,XK_degree:176,XK_plusminus:177,XK_twosuperior:178,XK_threesuperior:179,XK_acute:180,XK_mu:181,XK_paragraph:182,XK_periodcentered:183,XK_cedilla:184,XK_onesuperior:185,XK_masculine:186,XK_guillemotright:187,XK_onequarter:188,XK_onehalf:189,XK_threequarters:190,XK_questiondown:191,XK_Agrave:192,XK_Aacute:193,XK_Acircumflex:194,XK_Atilde:195,XK_Adiaeresis:196,XK_Aring:197,XK_AE:198,XK_Ccedilla:199,XK_Egrave:200,XK_Eacute:201,XK_Ecircumflex:202,XK_Ediaeresis:203,XK_Igrave:204,XK_Iacute:205,XK_Icircumflex:206,XK_Idiaeresis:207,XK_ETH:208,XK_Eth:208,XK_Ntilde:209,XK_Ograve:210,XK_Oacute:211,XK_Ocircumflex:212,XK_Otilde:213,XK_Odiaeresis:214,XK_multiply:215,XK_Oslash:216,XK_Ooblique:216,XK_Ugrave:217,XK_Uacute:218,XK_Ucircumflex:219,XK_Udiaeresis:220,XK_Yacute:221,XK_THORN:222,XK_Thorn:222,XK_ssharp:223,XK_agrave:224,XK_aacute:225,XK_acircumflex:226,XK_atilde:227,XK_adiaeresis:228,XK_aring:229,XK_ae:230,XK_ccedilla:231,XK_egrave:232,XK_eacute:233,XK_ecircumflex:234,XK_ediaeresis:235,XK_igrave:236,XK_iacute:237,XK_icircumflex:238,XK_idiaeresis:239,XK_eth:240,XK_ntilde:241,XK_ograve:242,XK_oacute:243,XK_ocircumflex:244,XK_otilde:245,XK_odiaeresis:246,XK_division:247,XK_oslash:248,XK_ooblique:248,XK_ugrave:249,XK_uacute:250,XK_ucircumflex:251,XK_udiaeresis:252,XK_yacute:253,XK_thorn:254,XK_ydiaeresis:255,XK_Hangul:65329,XK_Hangul_Hanja:65332,XK_Hangul_Jeonja:65336,XF86XK_ModeLock:269025025,XF86XK_MonBrightnessUp:269025026,XF86XK_MonBrightnessDown:269025027,XF86XK_KbdLightOnOff:269025028,XF86XK_KbdBrightnessUp:269025029,XF86XK_KbdBrightnessDown:269025030,XF86XK_Standby:269025040,XF86XK_AudioLowerVolume:269025041,XF86XK_AudioMute:269025042,XF86XK_AudioRaiseVolume:269025043,XF86XK_AudioPlay:269025044,XF86XK_AudioStop:269025045,XF86XK_AudioPrev:269025046,XF86XK_AudioNext:269025047,XF86XK_HomePage:269025048,XF86XK_Mail:269025049,XF86XK_Start:269025050,XF86XK_Search:269025051,XF86XK_AudioRecord:269025052,XF86XK_Calculator:269025053,XF86XK_Memo:269025054,XF86XK_ToDoList:269025055,XF86XK_Calendar:269025056,XF86XK_PowerDown:269025057,XF86XK_ContrastAdjust:269025058,XF86XK_RockerUp:269025059,XF86XK_RockerDown:269025060,XF86XK_RockerEnter:269025061,XF86XK_Back:269025062,XF86XK_Forward:269025063,XF86XK_Stop:269025064,XF86XK_Refresh:269025065,XF86XK_PowerOff:269025066,XF86XK_WakeUp:269025067,XF86XK_Eject:269025068,XF86XK_ScreenSaver:269025069,XF86XK_WWW:269025070,XF86XK_Sleep:269025071,XF86XK_Favorites:269025072,XF86XK_AudioPause:269025073,XF86XK_AudioMedia:269025074,XF86XK_MyComputer:269025075,XF86XK_VendorHome:269025076,XF86XK_LightBulb:269025077,XF86XK_Shop:269025078,XF86XK_History:269025079,XF86XK_OpenURL:269025080,XF86XK_AddFavorite:269025081,XF86XK_HotLinks:269025082,XF86XK_BrightnessAdjust:269025083,XF86XK_Finance:269025084,XF86XK_Community:269025085,XF86XK_AudioRewind:269025086,XF86XK_BackForward:269025087,XF86XK_Launch0:269025088,XF86XK_Launch1:269025089,XF86XK_Launch2:269025090,XF86XK_Launch3:269025091,XF86XK_Launch4:269025092,XF86XK_Launch5:269025093,XF86XK_Launch6:269025094,XF86XK_Launch7:269025095,XF86XK_Launch8:269025096,XF86XK_Launch9:269025097,XF86XK_LaunchA:269025098,XF86XK_LaunchB:269025099,XF86XK_LaunchC:269025100,XF86XK_LaunchD:269025101,XF86XK_LaunchE:269025102,XF86XK_LaunchF:269025103,XF86XK_ApplicationLeft:269025104,XF86XK_ApplicationRight:269025105,XF86XK_Book:269025106,XF86XK_CD:269025107,XF86XK_Calculater:269025108,XF86XK_Clear:269025109,XF86XK_Close:269025110,XF86XK_Copy:269025111,XF86XK_Cut:269025112,XF86XK_Display:269025113,XF86XK_DOS:269025114,XF86XK_Documents:269025115,XF86XK_Excel:269025116,XF86XK_Explorer:269025117,XF86XK_Game:269025118,XF86XK_Go:269025119,XF86XK_iTouch:269025120,XF86XK_LogOff:269025121,XF86XK_Market:269025122,XF86XK_Meeting:269025123,XF86XK_MenuKB:269025125,XF86XK_MenuPB:269025126,XF86XK_MySites:269025127,XF86XK_New:269025128,XF86XK_News:269025129,XF86XK_OfficeHome:269025130,XF86XK_Open:269025131,XF86XK_Option:269025132,XF86XK_Paste:269025133,XF86XK_Phone:269025134,XF86XK_Q:269025136,XF86XK_Reply:269025138,XF86XK_Reload:269025139,XF86XK_RotateWindows:269025140,XF86XK_RotationPB:269025141,XF86XK_RotationKB:269025142,XF86XK_Save:269025143,XF86XK_ScrollUp:269025144,XF86XK_ScrollDown:269025145,XF86XK_ScrollClick:269025146,XF86XK_Send:269025147,XF86XK_Spell:269025148,XF86XK_SplitScreen:269025149,XF86XK_Support:269025150,XF86XK_TaskPane:269025151,XF86XK_Terminal:269025152,XF86XK_Tools:269025153,XF86XK_Travel:269025154,XF86XK_UserPB:269025156,XF86XK_User1KB:269025157,XF86XK_User2KB:269025158,XF86XK_Video:269025159,XF86XK_WheelButton:269025160,XF86XK_Word:269025161,XF86XK_Xfer:269025162,XF86XK_ZoomIn:269025163,XF86XK_ZoomOut:269025164,XF86XK_Away:269025165,XF86XK_Messenger:269025166,XF86XK_WebCam:269025167,XF86XK_MailForward:269025168,XF86XK_Pictures:269025169,XF86XK_Music:269025170,XF86XK_Battery:269025171,XF86XK_Bluetooth:269025172,XF86XK_WLAN:269025173,XF86XK_UWB:269025174,XF86XK_AudioForward:269025175,XF86XK_AudioRepeat:269025176,XF86XK_AudioRandomPlay:269025177,XF86XK_Subtitle:269025178,XF86XK_AudioCycleTrack:269025179,XF86XK_CycleAngle:269025180,XF86XK_FrameBack:269025181,XF86XK_FrameForward:269025182,XF86XK_Time:269025183,XF86XK_Select:269025184,XF86XK_View:269025185,XF86XK_TopMenu:269025186,XF86XK_Red:269025187,XF86XK_Green:269025188,XF86XK_Yellow:269025189,XF86XK_Blue:269025190,XF86XK_Suspend:269025191,XF86XK_Hibernate:269025192,XF86XK_TouchpadToggle:269025193,XF86XK_TouchpadOn:269025200,XF86XK_TouchpadOff:269025201,XF86XK_AudioMicMute:269025202,XF86XK_Switch_VT_1:269024769,XF86XK_Switch_VT_2:269024770,XF86XK_Switch_VT_3:269024771,XF86XK_Switch_VT_4:269024772,XF86XK_Switch_VT_5:269024773,XF86XK_Switch_VT_6:269024774,XF86XK_Switch_VT_7:269024775,XF86XK_Switch_VT_8:269024776,XF86XK_Switch_VT_9:269024777,XF86XK_Switch_VT_10:269024778,XF86XK_Switch_VT_11:269024779,XF86XK_Switch_VT_12:269024780,XF86XK_Ungrab:269024800,XF86XK_ClearGrab:269024801,XF86XK_Next_VMode:269024802,XF86XK_Prev_VMode:269024803,XF86XK_LogWindowTree:269024804,XF86XK_LogGrabInfo:269024805};D.default=c},95644:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={256:960,257:992,258:451,259:483,260:417,261:433,262:454,263:486,264:710,265:742,266:709,267:741,268:456,269:488,270:463,271:495,272:464,273:496,274:938,275:954,278:972,279:1004,280:458,281:490,282:460,283:492,284:728,285:760,286:683,287:699,288:725,289:757,290:939,291:955,292:678,293:694,294:673,295:689,296:933,297:949,298:975,299:1007,302:967,303:999,304:681,305:697,308:684,309:700,310:979,311:1011,312:930,313:453,314:485,315:934,316:950,317:421,318:437,321:419,322:435,323:465,324:497,325:977,326:1009,327:466,328:498,330:957,331:959,332:978,333:1010,336:469,337:501,338:5052,339:5053,340:448,341:480,342:931,343:947,344:472,345:504,346:422,347:438,348:734,349:766,350:426,351:442,352:425,353:441,354:478,355:510,356:427,357:443,358:940,359:956,360:989,361:1021,362:990,363:1022,364:733,365:765,366:473,367:505,368:475,369:507,370:985,371:1017,376:5054,377:428,378:444,379:431,380:447,381:430,382:446,402:2294,466:16777681,711:439,728:418,729:511,731:434,733:445,901:1966,902:1953,904:1954,905:1955,906:1956,908:1959,910:1960,911:1963,912:1974,913:1985,914:1986,915:1987,916:1988,917:1989,918:1990,919:1991,920:1992,921:1993,922:1994,923:1995,924:1996,925:1997,926:1998,927:1999,928:2e3,929:2001,931:2002,932:2004,933:2005,934:2006,935:2007,936:2008,937:2009,938:1957,939:1961,940:1969,941:1970,942:1971,943:1972,944:1978,945:2017,946:2018,947:2019,948:2020,949:2021,950:2022,951:2023,952:2024,953:2025,954:2026,955:2027,956:2028,957:2029,958:2030,959:2031,960:2032,961:2033,962:2035,963:2034,964:2036,965:2037,966:2038,967:2039,968:2040,969:2041,970:1973,971:1977,972:1975,973:1976,974:1979,1025:1715,1026:1713,1027:1714,1028:1716,1029:1717,1030:1718,1031:1719,1032:1720,1033:1721,1034:1722,1035:1723,1036:1724,1038:1726,1039:1727,1040:1761,1041:1762,1042:1783,1043:1767,1044:1764,1045:1765,1046:1782,1047:1786,1048:1769,1049:1770,1050:1771,1051:1772,1052:1773,1053:1774,1054:1775,1055:1776,1056:1778,1057:1779,1058:1780,1059:1781,1060:1766,1061:1768,1062:1763,1063:1790,1064:1787,1065:1789,1066:1791,1067:1785,1068:1784,1069:1788,1070:1760,1071:1777,1072:1729,1073:1730,1074:1751,1075:1735,1076:1732,1077:1733,1078:1750,1079:1754,1080:1737,1081:1738,1082:1739,1083:1740,1084:1741,1085:1742,1086:1743,1087:1744,1088:1746,1089:1747,1090:1748,1091:1749,1092:1734,1093:1736,1094:1731,1095:1758,1096:1755,1097:1757,1098:1759,1099:1753,1100:1752,1101:1756,1102:1728,1103:1745,1105:1699,1106:1697,1107:1698,1108:1700,1109:1701,1110:1702,1111:1703,1112:1704,1113:1705,1114:1706,1115:1707,1116:1708,1118:1710,1119:1711,1168:1725,1169:1709,1488:3296,1489:3297,1490:3298,1491:3299,1492:3300,1493:3301,1494:3302,1495:3303,1496:3304,1497:3305,1498:3306,1499:3307,1500:3308,1501:3309,1502:3310,1503:3311,1504:3312,1505:3313,1506:3314,1507:3315,1508:3316,1509:3317,1510:3318,1511:3319,1512:3320,1513:3321,1514:3322,1548:1452,1563:1467,1567:1471,1569:1473,1570:1474,1571:1475,1572:1476,1573:1477,1574:1478,1575:1479,1576:1480,1577:1481,1578:1482,1579:1483,1580:1484,1581:1485,1582:1486,1583:1487,1584:1488,1585:1489,1586:1490,1587:1491,1588:1492,1589:1493,1590:1494,1591:1495,1592:1496,1593:1497,1594:1498,1600:1504,1601:1505,1602:1506,1603:1507,1604:1508,1605:1509,1606:1510,1607:1511,1608:1512,1609:1513,1610:1514,1611:1515,1612:1516,1613:1517,1614:1518,1615:1519,1616:1520,1617:1521,1618:1522,3585:3489,3586:3490,3587:3491,3588:3492,3589:3493,3590:3494,3591:3495,3592:3496,3593:3497,3594:3498,3595:3499,3596:3500,3597:3501,3598:3502,3599:3503,3600:3504,3601:3505,3602:3506,3603:3507,3604:3508,3605:3509,3606:3510,3607:3511,3608:3512,3609:3513,3610:3514,3611:3515,3612:3516,3613:3517,3614:3518,3615:3519,3616:3520,3617:3521,3618:3522,3619:3523,3620:3524,3621:3525,3622:3526,3623:3527,3624:3528,3625:3529,3626:3530,3627:3531,3628:3532,3629:3533,3630:3534,3631:3535,3632:3536,3633:3537,3634:3538,3635:3539,3636:3540,3637:3541,3638:3542,3639:3543,3640:3544,3641:3545,3642:3546,3647:3551,3648:3552,3649:3553,3650:3554,3651:3555,3652:3556,3653:3557,3654:3558,3655:3559,3656:3560,3657:3561,3658:3562,3659:3563,3660:3564,3661:3565,3664:3568,3665:3569,3666:3570,3667:3571,3668:3572,3669:3573,3670:3574,3671:3575,3672:3576,3673:3577,8194:2722,8195:2721,8196:2723,8197:2724,8199:2725,8200:2726,8201:2727,8202:2728,8210:2747,8211:2730,8212:2729,8213:1967,8215:3295,8216:2768,8217:2769,8218:2813,8220:2770,8221:2771,8222:2814,8224:2801,8225:2802,8226:2790,8229:2735,8230:2734,8240:2773,8242:2774,8243:2775,8248:2812,8254:1150,8361:3839,8364:8364,8453:2744,8470:1712,8471:2811,8478:2772,8482:2761,8531:2736,8532:2737,8533:2738,8534:2739,8535:2740,8536:2741,8537:2742,8538:2743,8539:2755,8540:2756,8541:2757,8542:2758,8592:2299,8593:2300,8594:2301,8595:2302,8658:2254,8660:2253,8706:2287,8711:2245,8728:3018,8730:2262,8733:2241,8734:2242,8743:2270,8744:2271,8745:2268,8746:2269,8747:2239,8756:2240,8764:2248,8771:2249,8773:16785992,8800:2237,8801:2255,8804:2236,8805:2238,8834:2266,8835:2267,8866:3068,8867:3036,8868:3010,8869:3022,8968:3027,8970:3012,8981:2810,8992:2212,8993:2213,9109:3020,9115:2219,9117:2220,9118:2221,9120:2222,9121:2215,9123:2216,9124:2217,9126:2218,9128:2223,9132:2224,9143:2209,9146:2543,9147:2544,9148:2546,9149:2547,9225:2530,9226:2533,9227:2537,9228:2531,9229:2532,9251:2732,9252:2536,9472:2211,9474:2214,9484:2210,9488:2539,9492:2541,9496:2538,9500:2548,9508:2549,9516:2551,9524:2550,9532:2542,9618:2529,9642:2791,9643:2785,9644:2779,9645:2786,9646:2783,9647:2767,9650:2792,9651:2787,9654:2781,9655:2765,9660:2793,9661:2788,9664:2780,9665:2764,9670:2528,9675:2766,9679:2782,9702:2784,9734:2789,9742:2809,9747:2762,9756:2794,9758:2795,9792:2808,9794:2807,9827:2796,9829:2798,9830:2797,9837:2806,9839:2805,10003:2803,10007:2804,10013:2777,10016:2800,10216:2748,10217:2750,12289:1188,12290:1185,12300:1186,12301:1187,12443:1246,12444:1247,12449:1191,12450:1201,12451:1192,12452:1202,12453:1193,12454:1203,12455:1194,12456:1204,12457:1195,12458:1205,12459:1206,12461:1207,12463:1208,12465:1209,12467:1210,12469:1211,12471:1212,12473:1213,12475:1214,12477:1215,12479:1216,12481:1217,12483:1199,12484:1218,12486:1219,12488:1220,12490:1221,12491:1222,12492:1223,12493:1224,12494:1225,12495:1226,12498:1227,12501:1228,12504:1229,12507:1230,12510:1231,12511:1232,12512:1233,12513:1234,12514:1235,12515:1196,12516:1236,12517:1197,12518:1237,12519:1198,12520:1238,12521:1239,12522:1240,12523:1241,12524:1242,12525:1243,12527:1244,12530:1190,12531:1245,12539:1189,12540:1200},_={lookup:function(y){if(y>=32&&y<=255)return y;var h=c[y];return h!==void 0?h:16777216|y}};D.default=_},58150:function(Te,D,c){"use strict";function _(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(l){return typeof l}:_=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_(n)}Object.defineProperty(D,"__esModule",{value:!0}),D.getKeycode=e,D.getKey=f,D.getKeysym=t;var m=a(c(93126)),y=a(c(95644)),h=a(c(85586)),o=a(c(2090)),u=a(c(14455)),d=i(c(58863));function r(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return r=function(){return n},n}function i(n){if(n&&n.__esModule)return n;if(n===null||_(n)!=="object"&&typeof n!="function")return{default:n};var s=r();if(s&&s.has(n))return s.get(n);var l={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in n)if(Object.prototype.hasOwnProperty.call(n,g)){var b=p?Object.getOwnPropertyDescriptor(n,g):null;b&&(b.get||b.set)?Object.defineProperty(l,g,b):l[g]=n[g]}return l.default=n,s&&s.set(n,l),l}function a(n){return n&&n.__esModule?n:{default:n}}function e(n){if(n.code){switch(n.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return n.code}if(n.type!=="keypress"&&n.keyCode in h.default){var s=h.default[n.keyCode];if(d.isMac()&&s==="ContextMenu"&&(s="MetaRight"),n.location===2)switch(s){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(n.location===3)switch(s){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return s}return"Unidentified"}function f(n){if(n.key!==void 0){switch(n.key){case"Spacebar":return" ";case"Esc":return"Escape";case"Scroll":return"ScrollLock";case"Win":return"Meta";case"Apps":return"ContextMenu";case"Up":return"ArrowUp";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Del":return"Delete";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Add":return"+";case"Decimal":return n.char}switch(n.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(n.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(n.key==="\0"&&n.code==="NumpadDecimal")return"Delete";if(!d.isIE()&&!d.isEdge()||n.key.length!==1&&n.key!=="Unidentified")return n.key}var s=e(n);return s in o.default?o.default[s]:n.charCode?String.fromCharCode(n.charCode):"Unidentified"}function t(n){var s=f(n);if(s==="Unidentified")return null;if(s in u.default){var l=n.location;if(s==="Meta"&&l===0&&(l=2),s==="Clear"&&l===3){var p=e(n);p==="NumLock"&&(l=0)}if((l===void 0||l>3)&&(l=0),s==="Meta"){var g=e(n);if(g==="AltLeft")return m.default.XK_Meta_L;if(g==="AltRight")return m.default.XK_Meta_R}if(s==="Clear"){var b=e(n);if(b==="NumLock")return m.default.XK_Num_Lock}return u.default[s][l]}if(s.length!==1)return null;var x=s.charCodeAt();return x?y.default.lookup(x):null}},85586:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={8:"Backspace",9:"Tab",10:"NumpadClear",12:"Numpad5",13:"Enter",16:"ShiftLeft",17:"ControlLeft",18:"AltLeft",19:"Pause",20:"CapsLock",21:"Lang1",25:"Lang2",27:"Escape",28:"Convert",29:"NonConvert",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",44:"PrintScreen",45:"Insert",46:"Delete",47:"Help",48:"Digit0",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",91:"MetaLeft",92:"MetaRight",93:"ContextMenu",95:"Sleep",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",108:"NumpadDecimal",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",124:"F13",125:"F14",126:"F15",127:"F16",128:"F17",129:"F18",130:"F19",131:"F20",132:"F21",133:"F22",134:"F23",135:"F24",144:"NumLock",145:"ScrollLock",166:"BrowserBack",167:"BrowserForward",168:"BrowserRefresh",169:"BrowserStop",170:"BrowserSearch",171:"BrowserFavorites",172:"BrowserHome",173:"AudioVolumeMute",174:"AudioVolumeDown",175:"AudioVolumeUp",176:"MediaTrackNext",177:"MediaTrackPrevious",178:"MediaStop",179:"MediaPlayPause",180:"LaunchMail",181:"MediaSelect",182:"LaunchApp1",183:"LaunchApp2",225:"AltRight"};D.default=c},73596:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};D.default=c},51256:function(Te,D,c){"use strict";var _;_={value:!0},D.Z=void 0;var m=c(77676),y=U(c(37095)),h=c(38955),o=c(58863),u=c(80957),d=c(32466),r=O(c(45458)),i=O(c(61307)),a=O(c(77367)),e=O(c(77160)),f=O(c(40195)),t=O(c(64526)),n=O(c(87975)),s=O(c(53707)),l=O(c(44693)),p=O(c(93126)),g=O(c(73596)),b=c(29274);c(21146);var x=O(c(12133)),E=O(c(62175)),C=O(c(18966)),v=O(c(55901)),S=O(c(37856)),k=O(c(19442));function O(he){return he&&he.__esModule?he:{default:he}}function R(){if(typeof WeakMap!="function")return null;var he=new WeakMap;return R=function(){return he},he}function U(he){if(he&&he.__esModule)return he;if(he===null||N(he)!=="object"&&typeof he!="function")return{default:he};var ae=R();if(ae&&ae.has(he))return ae.get(he);var ce={},V=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in he)if(Object.prototype.hasOwnProperty.call(he,F)){var H=V?Object.getOwnPropertyDescriptor(he,F):null;H&&(H.get||H.set)?Object.defineProperty(ce,F,H):ce[F]=he[F]}return ce.default=he,ae&&ae.set(he,ce),ce}function N(he){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?N=function(ce){return typeof ce}:N=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},N(he)}function _e(he,ae){if(!(he instanceof ae))throw new TypeError("Cannot call a class as a function")}function Z(he,ae){for(var ce=0;ce<ae.length;ce++){var V=ae[ce];V.enumerable=V.enumerable||!1,V.configurable=!0,"value"in V&&(V.writable=!0),Object.defineProperty(he,V.key,V)}}function oe(he,ae,ce){return ae&&Z(he.prototype,ae),ce&&Z(he,ce),he}function L(he,ae){if(typeof ae!="function"&&ae!==null)throw new TypeError("Super expression must either be null or a function");he.prototype=Object.create(ae&&ae.prototype,{constructor:{value:he,writable:!0,configurable:!0}}),ae&&X(he,ae)}function X(he,ae){return X=Object.setPrototypeOf||function(V,F){return V.__proto__=F,V},X(he,ae)}function I(he){var ae=q();return function(){var V=fe(he),F;if(ae){var H=fe(this).constructor;F=Reflect.construct(V,arguments,H)}else F=V.apply(this,arguments);return j(this,F)}}function j(he,ae){return ae&&(N(ae)==="object"||typeof ae=="function")?ae:B(he)}function B(he){if(he===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return he}function q(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(he){return!1}}function fe(he){return fe=Object.setPrototypeOf?Object.getPrototypeOf:function(ce){return ce.__proto__||Object.getPrototypeOf(ce)},fe(he)}var ke=3,Ke="rgb(40, 40, 40)",Pe=17,le=50,me=19,Ie=75,Me=50,ve=1e3,Ce=50,ye=1,we=null,De=null,Xe=null,Ee=null,Re=1<<24,Oe=1<<25,ee=1<<26,ie=1<<27,Ae=1<<28,Se=function(he){L(ce,he);var ae=I(ce);function ce(V,F,H){var T;if(_e(this,ce),!V)throw new Error("Must specify target");if(!F)throw new Error("Must specify URL");T=ae.call(this),T._target=V,T._url=F,H=H||{},T._rfbCredentials=H.credentials||{},T._shared="shared"in H?!!H.shared:!0,T._repeaterID=H.repeaterID||"",T._wsProtocols=H.wsProtocols||[],T._rfbConnectionState="",T._rfbInitState="",T._rfbAuthScheme=-1,T._rfbCleanDisconnect=!0,T._rfbVersion=0,T._rfbMaxVersion=3.8,T._rfbTightVNC=!1,T._rfbVeNCryptState=0,T._rfbXvpVer=0,T._fbWidth=0,T._fbHeight=0,T._fbName="",T._capabilities={power:!1},T._supportsFence=!1,T._supportsContinuousUpdates=!1,T._enabledContinuousUpdates=!1,T._supportsSetDesktopSize=!1,T._screenID=0,T._screenFlags=0,T._qemuExtKeyEventSupported=!1,T._clipboardText=null,T._clipboardServerCapabilitiesActions={},T._clipboardServerCapabilitiesFormats={},T._sock=null,T._display=null,T._flushing=!1,T._keyboard=null,T._gestures=null,T._disconnTimer=null,T._resizeTimeout=null,T._mouseMoveTimer=null,T._decoders={},T._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},T._mousePos={},T._mouseButtonMask=0,T._mouseLastMoveTime=0,T._viewportDragging=!1,T._viewportDragPos={},T._viewportHasMoved=!1,T._accumulatedWheelDeltaX=0,T._accumulatedWheelDeltaY=0,T._gestureLastTapTime=null,T._gestureFirstDoubleTapEv=null,T._gestureLastMagnitudeX=0,T._gestureLastMagnitudeY=0,T._eventHandlers={focusCanvas:T._focusCanvas.bind(B(T)),windowResize:T._windowResize.bind(B(T)),handleMouse:T._handleMouse.bind(B(T)),handleWheel:T._handleWheel.bind(B(T)),handleGesture:T._handleGesture.bind(B(T))},y.Debug(">> RFB.constructor"),T._screen=document.createElement("div"),T._screen.style.display="flex",T._screen.style.width="100%",T._screen.style.height="100%",T._screen.style.overflow="auto",T._screen.style.background=Ke,T._canvas=document.createElement("canvas"),T._canvas.style.margin="auto",T._canvas.style.outline="none",T._canvas.style.flexShrink="0",T._canvas.width=0,T._canvas.height=0,T._canvas.tabIndex=-1,T._screen.appendChild(T._canvas),T._cursor=new n.default,T._cursorImage=ce.cursors.none,T._decoders[b.encodings.encodingRaw]=new x.default,T._decoders[b.encodings.encodingCopyRect]=new E.default,T._decoders[b.encodings.encodingRRE]=new C.default,T._decoders[b.encodings.encodingHextile]=new v.default,T._decoders[b.encodings.encodingTight]=new S.default,T._decoders[b.encodings.encodingTightPNG]=new k.default;try{T._display=new i.default(T._canvas)}catch(Q){throw y.Error("Display exception: "+Q),Q}return T._display.onflush=T._onFlush.bind(B(T)),T._keyboard=new f.default(T._canvas),T._keyboard.onkeyevent=T._handleKeyEvent.bind(B(T)),T._gestures=new t.default,T._sock=new s.default,T._sock.on("message",function(){T._handleMessage()}),T._sock.on("open",function(){T._rfbConnectionState==="connecting"&&T._rfbInitState===""?(T._rfbInitState="ProtocolVersion",y.Debug("Starting VNC handshake")):T._fail("Unexpected server connection while "+T._rfbConnectionState)}),T._sock.on("close",function(Q){y.Debug("WebSocket on-close event");var de="";switch(Q.code&&(de="(code: "+Q.code,Q.reason&&(de+=", reason: "+Q.reason),de+=")"),T._rfbConnectionState){case"connecting":T._fail("Connection closed "+de);break;case"connected":T._updateConnectionState("disconnecting"),T._updateConnectionState("disconnected");break;case"disconnecting":T._updateConnectionState("disconnected");break;case"disconnected":T._fail("Unexpected server disconnect when already disconnected "+de);break;default:T._fail("Unexpected server disconnect before connecting "+de);break}T._sock.off("close")}),T._sock.on("error",function(Q){return y.Warn("WebSocket on-error event")}),setTimeout(T._updateConnectionState.bind(B(T),"connecting")),y.Debug("<< RFB.constructor"),T.dragViewport=!1,T.focusOnClick=!0,T._viewOnly=!1,T._clipViewport=!1,T._scaleViewport=!1,T._resizeSession=!1,T._showDotCursor=!1,H.showDotCursor!==void 0&&(y.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),T._showDotCursor=H.showDotCursor),T._qualityLevel=6,T._compressionLevel=2,T}return oe(ce,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(F){this._rfbCredentials=F,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){this._rfbConnectionState!=="connected"||this._viewOnly||(y.Info("Sending Ctrl-Alt-Del"),this.sendKey(p.default.XK_Control_L,"ControlLeft",!0),this.sendKey(p.default.XK_Alt_L,"AltLeft",!0),this.sendKey(p.default.XK_Delete,"Delete",!0),this.sendKey(p.default.XK_Delete,"Delete",!1),this.sendKey(p.default.XK_Alt_L,"AltLeft",!1),this.sendKey(p.default.XK_Control_L,"ControlLeft",!1))}},{key:"machineShutdown",value:function(){this._xvpOp(1,2)}},{key:"machineReboot",value:function(){this._xvpOp(1,3)}},{key:"machineReset",value:function(){this._xvpOp(1,4)}},{key:"sendKey",value:function(F,H,T){if(!(this._rfbConnectionState!=="connected"||this._viewOnly)){if(T===void 0){this.sendKey(F,H,!0),this.sendKey(F,H,!1);return}var Q=g.default[H];if(this._qemuExtKeyEventSupported&&Q)F=F||0,y.Info("Sending key ("+(T?"down":"up")+"): keysym "+F+", scancode "+Q),ce.messages.QEMUExtendedKeyEvent(this._sock,F,T,Q);else{if(!F)return;y.Info("Sending keysym ("+(T?"down":"up")+"): "+F),ce.messages.keyEvent(this._sock,F,T?1:0)}}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(F){if(!(this._rfbConnectionState!=="connected"||this._viewOnly))if(this._clipboardServerCapabilitiesFormats[ye]&&this._clipboardServerCapabilitiesActions[ie])this._clipboardText=F,ce.messages.extendedClipboardNotify(this._sock,[ye]);else{for(var H=new Uint8Array(F.length),T=0;T<F.length;T++)H[T]=F.charCodeAt(T);ce.messages.clientCutText(this._sock,H)}}},{key:"_connect",value:function(){y.Debug(">> RFB.connect"),y.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(F){F.name==="SyntaxError"?this._fail("Invalid host or port ("+F+")"):this._fail("Error when opening socket ("+F+")")}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),window.addEventListener("resize",this._eventHandlers.windowResize),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),y.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){y.Debug(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),window.removeEventListener("resize",this._eventHandlers.windowResize),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(F){if(F.name!=="NotFoundError")throw F}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),y.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(F){this.focusOnClick&&this.focus()}},{key:"_setDesktopName",value:function(F){this._fbName=F,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(F){var H=this;window.requestAnimationFrame(function(){H._updateClip(),H._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var F=this._display.clipViewport,H=this._clipViewport;if(this._scaleViewport&&(H=!1),F!==H&&(this._display.clipViewport=H),H){var T=this._screenSize();this._display.viewportChangeSize(T.w,T.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var F=this._screenSize();this._display.autoscale(F.w,F.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!(!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)){var F=this._screenSize();ce.messages.setDesktopSize(this._sock,Math.floor(F.w),Math.floor(F.h),this._screenID,this._screenFlags),y.Debug("Requested new desktop size: "+F.w+"x"+F.h)}}},{key:"_screenSize",value:function(){var F=this._screen.getBoundingClientRect();return{w:F.width,h:F.height}}},{key:"_fixScrollbars",value:function(){var F=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=F}},{key:"_updateConnectionState",value:function(F){var H=this,T=this._rfbConnectionState;if(F===T){y.Debug("Already in state '"+F+"', ignoring");return}if(T==="disconnected"){y.Error("Tried changing state of a disconnected RFB object");return}switch(F){case"connected":if(T!=="connecting"){y.Error("Bad transition to connected state, previous connection state: "+T);return}break;case"disconnected":if(T!=="disconnecting"){y.Error("Bad transition to disconnected state, previous connection state: "+T);return}break;case"connecting":if(T!==""){y.Error("Bad transition to connecting state, previous connection state: "+T);return}break;case"disconnecting":if(T!=="connected"&&T!=="connecting"){y.Error("Bad transition to disconnecting state, previous connection state: "+T);return}break;default:y.Error("Unknown connection state: "+F);return}switch(this._rfbConnectionState=F,y.Debug("New state '"+F+"', was '"+T+"'."),this._disconnTimer&&F!=="disconnecting"&&(y.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close")),F){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){y.Error("Disconnection timed out."),H._updateConnectionState("disconnected")},ke*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(F){switch(this._rfbConnectionState){case"disconnecting":y.Error("Failed when disconnecting: "+F);break;case"connected":y.Error("Failed while connected: "+F);break;case"connecting":y.Error("Failed when connecting: "+F);break;default:y.Error("RFB failure: "+F);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(F,H){this._capabilities[F]=H,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){y.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":y.Error("Got data while disconnected");break;case"connected":for(;!(this._flushing||!this._normalMsg()||this._sock.rQlen===0););break;default:this._initMsg();break}}},{key:"_handleKeyEvent",value:function(F,H,T){this.sendKey(F,H,T)}},{key:"_handleMouse",value:function(F){if(!(F.type==="click"&&F.target!==this._canvas)&&(F.stopPropagation(),F.preventDefault(),!(F.type==="click"||F.type==="contextmenu"))){var H=(0,u.clientToElement)(F.clientX,F.clientY,this._canvas);switch(F.type){case"mousedown":(0,d.setCapture)(this._canvas),this._handleMouseButton(H.x,H.y,!0,1<<F.button);break;case"mouseup":this._handleMouseButton(H.x,H.y,!1,1<<F.button);break;case"mousemove":this._handleMouseMove(H.x,H.y);break}}}},{key:"_handleMouseButton",value:function(F,H,T,Q){if(this.dragViewport)if(T&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:F,y:H},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(F,H,Q)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(F,H,this._mouseButtonMask)),T?this._mouseButtonMask|=Q:this._mouseButtonMask&=~Q,this._sendMouse(F,H,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(F,H){var T=this;if(this._viewportDragging){var Q=this._viewportDragPos.x-F,de=this._viewportDragPos.y-H;(this._viewportHasMoved||Math.abs(Q)>o.dragThreshold||Math.abs(de)>o.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:F,y:H},this._display.viewportChangePos(Q,de));return}if(this._mousePos={x:F,y:H},this._mouseMoveTimer==null){var be=Date.now()-this._mouseLastMoveTime;be>Pe?(this._sendMouse(F,H,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){T._handleDelayedMouseMove()},Pe-be)}}},{key:"_handleDelayedMouseMove",value:function(){this._mouseMoveTimer=null,this._sendMouse(this._mousePos.x,this._mousePos.y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()}},{key:"_sendMouse",value:function(F,H,T){this._rfbConnectionState==="connected"&&(this._viewOnly||ce.messages.pointerEvent(this._sock,this._display.absX(F),this._display.absY(H),T))}},{key:"_handleWheel",value:function(F){if(this._rfbConnectionState==="connected"&&!this._viewOnly){F.stopPropagation(),F.preventDefault();var H=(0,u.clientToElement)(F.clientX,F.clientY,this._canvas),T=F.deltaX,Q=F.deltaY;F.deltaMode!==0&&(T*=me,Q*=me),this._accumulatedWheelDeltaX+=T,this._accumulatedWheelDeltaY+=Q,Math.abs(this._accumulatedWheelDeltaX)>=le&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(H.x,H.y,!0,32),this._handleMouseButton(H.x,H.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(H.x,H.y,!0,64),this._handleMouseButton(H.x,H.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=le&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(H.x,H.y,!0,8),this._handleMouseButton(H.x,H.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(H.x,H.y,!0,16),this._handleMouseButton(H.x,H.y,!1,16)),this._accumulatedWheelDeltaY=0)}}},{key:"_fakeMouseMove",value:function(F,H,T){this._handleMouseMove(H,T),this._cursor.move(F.detail.clientX,F.detail.clientY)}},{key:"_handleTapEvent",value:function(F,H){var T=(0,u.clientToElement)(F.detail.clientX,F.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<ve&&this._gestureFirstDoubleTapEv.detail.type===F.detail.type){var Q=this._gestureFirstDoubleTapEv.detail.clientX-F.detail.clientX,de=this._gestureFirstDoubleTapEv.detail.clientY-F.detail.clientY,be=Math.hypot(Q,de);be<Ce?T=(0,u.clientToElement)(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=F}else this._gestureFirstDoubleTapEv=F;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,H),this._handleMouseButton(T.x,T.y,!1,H)}},{key:"_handleGesture",value:function(F){var H,T=(0,u.clientToElement)(F.detail.clientX,F.detail.clientY,this._canvas);switch(F.type){case"gesturestart":switch(F.detail.type){case"onetap":this._handleTapEvent(F,1);break;case"twotap":this._handleTapEvent(F,4);break;case"threetap":this._handleTapEvent(F,2);break;case"drag":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,1);break;case"longpress":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=F.detail.magnitudeX,this._gestureLastMagnitudeY=F.detail.magnitudeY,this._fakeMouseMove(F,T.x,T.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(F.detail.magnitudeX,F.detail.magnitudeY),this._fakeMouseMove(F,T.x,T.y);break}break;case"gesturemove":switch(F.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(F,T.x,T.y);break;case"twodrag":for(this._fakeMouseMove(F,T.x,T.y);F.detail.magnitudeY-this._gestureLastMagnitudeY>Me;)this._handleMouseButton(T.x,T.y,!0,8),this._handleMouseButton(T.x,T.y,!1,8),this._gestureLastMagnitudeY+=Me;for(;F.detail.magnitudeY-this._gestureLastMagnitudeY<-Me;)this._handleMouseButton(T.x,T.y,!0,16),this._handleMouseButton(T.x,T.y,!1,16),this._gestureLastMagnitudeY-=Me;for(;F.detail.magnitudeX-this._gestureLastMagnitudeX>Me;)this._handleMouseButton(T.x,T.y,!0,32),this._handleMouseButton(T.x,T.y,!1,32),this._gestureLastMagnitudeX+=Me;for(;F.detail.magnitudeX-this._gestureLastMagnitudeX<-Me;)this._handleMouseButton(T.x,T.y,!0,64),this._handleMouseButton(T.x,T.y,!1,64),this._gestureLastMagnitudeX-=Me;break;case"pinch":if(this._fakeMouseMove(F,T.x,T.y),H=Math.hypot(F.detail.magnitudeX,F.detail.magnitudeY),Math.abs(H-this._gestureLastMagnitudeX)>Ie){for(this._handleKeyEvent(p.default.XK_Control_L,"ControlLeft",!0);H-this._gestureLastMagnitudeX>Ie;)this._handleMouseButton(T.x,T.y,!0,8),this._handleMouseButton(T.x,T.y,!1,8),this._gestureLastMagnitudeX+=Ie;for(;H-this._gestureLastMagnitudeX<-Ie;)this._handleMouseButton(T.x,T.y,!0,16),this._handleMouseButton(T.x,T.y,!1,16),this._gestureLastMagnitudeX-=Ie}this._handleKeyEvent(p.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(F.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!1,1);break;case"longpress":this._fakeMouseMove(F,T.x,T.y),this._handleMouseButton(T.x,T.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var F=this._sock.rQshiftStr(12).substr(4,7);y.Info("Server ProtocolVersion: "+F);var H=0;switch(F){case"000.000":H=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+F)}if(H){for(var T="ID:"+this._repeaterID;T.length<250;)T+="\0";return this._sock.sendString(T),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var Q="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+Q+`
`),y.Debug("Sent ProtocolVersion: "+Q),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function F(Q,de){for(var be=0;be<de.length;be++)if(de[be]===Q)return!0;return!1}if(this._rfbVersion>=3.7){var H=this._sock.rQshift8();if(this._sock.rQwait("security type",H,1))return!1;if(H===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var T=this._sock.rQshiftBytes(H);if(y.Debug("Server security types: "+T),F(1,T))this._rfbAuthScheme=1;else if(F(22,T))this._rfbAuthScheme=22;else if(F(16,T))this._rfbAuthScheme=16;else if(F(2,T))this._rfbAuthScheme=2;else if(F(19,T))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+T+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",y.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var F=this._sock.rQshift32(),H="";if(F>0){if(this._sock.rQwait("reason",F,4))return!1;H=this._sock.rQshiftStr(F)}return H!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:H}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+H+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var F=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(F),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var F=this._sock.rQshift8(),H=this._sock.rQshift8();if(!(F==0&&H==2))return this._fail("Unsupported VeNCrypt version "+F+"."+H);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var T=this._sock.rQshift8();if(T!=0)return this._fail("VeNCrypt failure "+T);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var Q=this._sock.rQshift8();if(Q<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=Q,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var de=[],be=0;be<this._rfbVeNCryptSubtypesLength;be++)de.push(this._sock.rQshift32());if(de.indexOf(256)!=-1)this._sock.send([0,0,1,0]),this._rfbVeNCryptState=4;else return this._fail("VeNCrypt Plain subtype not offered by server")}if(this._rfbVeNCryptState==4){if(!this._rfbCredentials.username||!this._rfbCredentials.password)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1;var z=(0,h.encodeUTF8)(this._rfbCredentials.username),A=(0,h.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,z.length]),this._sock.send([0,0,0,A.length]),this._sock.sendString(z),this._sock.sendString(A),this._rfbInitState="SecurityResult",!0}}},{key:"_negotiateStdVNCAuth",value:function(){if(this._sock.rQwait("auth challenge",16))return!1;if(this._rfbCredentials.password===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["password"]}})),!1;var F=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),H=ce.genDES(this._rfbCredentials.password,F);return this._sock.send(H),this._rfbInitState="SecurityResult",!0}},{key:"_negotiateTightUnixAuth",value:function(){return this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0?(this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1):(this._sock.send([0,0,0,this._rfbCredentials.username.length]),this._sock.send([0,0,0,this._rfbCredentials.password.length]),this._sock.sendString(this._rfbCredentials.username),this._sock.sendString(this._rfbCredentials.password),this._rfbInitState="SecurityResult",!0)}},{key:"_negotiateTightTunnels",value:function(F){for(var H={0:{vendor:"TGHT",signature:"NOTUNNEL"}},T={},Q=0;Q<F;Q++){var de=this._sock.rQshift32(),be=this._sock.rQshiftStr(4),z=this._sock.rQshiftStr(8);T[de]={vendor:be,signature:z}}return y.Debug("Server Tight tunnel types: "+T),T[1]&&T[1].vendor==="SICR"&&T[1].signature==="SCHANNEL"&&(y.Debug("Detected Siemens server. Assuming NOTUNNEL support."),T[0]={vendor:"TGHT",signature:"NOTUNNEL"}),T[0]?T[0].vendor!=H[0].vendor||T[0].signature!=H[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(y.Debug("Selected tunnel type: "+H[0]),this._sock.send([0,0,0,0]),!1):this._fail("Server wanted tunnels, but doesn't support the notunnel type")}},{key:"_negotiateTightAuth",value:function(){if(!this._rfbTightVNC){if(this._sock.rQwait("num tunnels",4))return!1;var F=this._sock.rQshift32();if(F>0&&this._sock.rQwait("tunnel capabilities",16*F,4))return!1;if(this._rfbTightVNC=!0,F>0)return this._negotiateTightTunnels(F),!1}if(this._sock.rQwait("sub auth count",4))return!1;var H=this._sock.rQshift32();if(H===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*H,4))return!1;for(var T={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},Q=[],de=0;de<H;de++){this._sock.rQshift32();var be=this._sock.rQshiftStr(12);Q.push(be)}y.Debug("Server Tight authentication types: "+Q);for(var z in T)if(Q.indexOf(z)!=-1)switch(this._sock.send([0,0,0,T[z]]),y.Debug("Selected authentication type: "+z),z){case"STDVNOAUTH__":return this._rfbInitState="SecurityResult",!0;case"STDVVNCAUTH_":return this._rfbAuthScheme=2,this._initMsg();case"TGHTULGNAUTH":return this._rfbAuthScheme=129,this._initMsg();default:return this._fail("Unsupported tiny auth scheme (scheme: "+z+")")}return this._fail("No supported sub-auth types!")}},{key:"_negotiateAuthentication",value:function(){switch(this._rfbAuthScheme){case 1:return this._rfbVersion>=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var F=this._sock.rQshift32();return F===0?(this._rfbInitState="ClientInitialisation",y.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=F,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:F}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var F=this._sock.rQshift16(),H=this._sock.rQshift16(),T=this._sock.rQshift8(),Q=this._sock.rQshift8(),de=this._sock.rQshift8(),be=this._sock.rQshift8(),z=this._sock.rQshift16(),A=this._sock.rQshift16(),$=this._sock.rQshift16(),Y=this._sock.rQshift8(),se=this._sock.rQshift8(),pe=this._sock.rQshift8();this._sock.rQskipBytes(3);var ne=this._sock.rQshift32();if(this._sock.rQwait("server init name",ne,24))return!1;var K=this._sock.rQshiftStr(ne);if(K=(0,h.decodeUTF8)(K,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+ne))return!1;var re=this._sock.rQshift16(),M=this._sock.rQshift16(),ue=this._sock.rQshift16();this._sock.rQskipBytes(2);var Fe=(re+M+ue)*16;if(this._sock.rQwait("TightVNC extended server init header",Fe,32+ne))return!1;this._sock.rQskipBytes(16*re),this._sock.rQskipBytes(16*M),this._sock.rQskipBytes(16*ue)}return y.Info("Screen: "+F+"x"+H+", bpp: "+T+", depth: "+Q+", bigEndian: "+de+", trueColor: "+be+", redMax: "+z+", greenMax: "+A+", blueMax: "+$+", redShift: "+Y+", greenShift: "+se+", blueShift: "+pe),this._setDesktopName(K),this._resize(F,H),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(y.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),ce.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),ce.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var F=[];F.push(b.encodings.encodingCopyRect),this._fbDepth==24&&(F.push(b.encodings.encodingTight),F.push(b.encodings.encodingTightPNG),F.push(b.encodings.encodingHextile),F.push(b.encodings.encodingRRE)),F.push(b.encodings.encodingRaw),F.push(b.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),F.push(b.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),F.push(b.encodings.pseudoEncodingDesktopSize),F.push(b.encodings.pseudoEncodingLastRect),F.push(b.encodings.pseudoEncodingQEMUExtendedKeyEvent),F.push(b.encodings.pseudoEncodingExtendedDesktopSize),F.push(b.encodings.pseudoEncodingXvp),F.push(b.encodings.pseudoEncodingFence),F.push(b.encodings.pseudoEncodingContinuousUpdates),F.push(b.encodings.pseudoEncodingDesktopName),F.push(b.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(F.push(b.encodings.pseudoEncodingVMwareCursor),F.push(b.encodings.pseudoEncodingCursor)),ce.messages.clientEncodings(this._sock,F)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return y.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(y.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var F=this._sock.rQshift32();if(F=(0,m.toSigned32bit)(F),this._sock.rQwait("ServerCutText content",Math.abs(F),8))return!1;if(F>=0){var H=this._sock.rQshiftStr(F);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:H}}))}else{F=Math.abs(F);var T=this._sock.rQshift32(),Q=T&65535,de=T&4278190080,be=!!(de&Re);if(be){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var z=0;z<=15;z++){var A=1<<z;Q&A&&(this._clipboardServerCapabilitiesFormats[A]=!0,this._sock.rQshift32())}for(var $=24;$<=31;$++){var Y=1<<$;this._clipboardServerCapabilitiesActions[Y]=!!(de&Y)}var se=[Re,Oe,ee,ie,Ae];ce.messages.extendedClipboardCaps(this._sock,se,{extendedClipboardFormatText:0})}else if(de===Oe){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[Ae]&&Q&ye&&ce.messages.extendedClipboardProvide(this._sock,[ye],[this._clipboardText])}else if(de===ee){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[ie]&&(this._clipboardText!=null?ce.messages.extendedClipboardNotify(this._sock,[ye]):ce.messages.extendedClipboardNotify(this._sock,[]))}else if(de===ie){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[Oe]&&Q&ye&&ce.messages.extendedClipboardRequest(this._sock,[ye])}else if(de===Ae){if(this._viewOnly||!(Q&ye))return!0;this._clipboardText=null;var pe=this._sock.rQshiftBytes(F-4),ne=new a.default,K=null;ne.setInput(pe);for(var re=0;re<=15;re++){var M=1<<re;if(Q&M){var ue=0,Fe=ne.inflate(4);ue|=Fe[0]<<24,ue|=Fe[1]<<16,ue|=Fe[2]<<8,ue|=Fe[3];var w=ne.inflate(ue);M===ye&&(K=w)}}if(ne.setInput(null),K!==null){for(var te="",G=0;G<K.length;G++)te+=String.fromCharCode(K[G]);K=te,K=(0,h.decodeUTF8)(K),K.length>0&&K.charAt(K.length-1)==="\0"&&(K=K.slice(0,-1)),K=K.replace(`\r
`,`
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:K}}))}}else return this._fail("Unexpected action in extended clipboard message: "+de)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var F=this._sock.rQshift32(),H=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",H,9))return!1;H>64&&(y.Warn("Bad payload length ("+H+") in fence response"),H=64);var T=this._sock.rQshiftStr(H);return this._supportsFence=!0,F&1<<31?(F&=3,ce.messages.clientFence(this._sock,F,T),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var F=this._sock.rQshift8(),H=this._sock.rQshift8();switch(H){case 0:y.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=F,y.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+H+")");break}return!0}},{key:"_normalMsg",value:function(){var F;this._FBU.rects>0?F=0:F=this._sock.rQshift8();var H,T;switch(F){case 0:return T=this._framebufferUpdate(),T&&!this._enabledContinuousUpdates&&ce.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),T;case 1:return this._handleSetColourMapMsg();case 2:return y.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return H=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,H&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),y.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+F+")"),y.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var F=this._sock.rQshiftBytes(12);this._FBU.x=(F[0]<<8)+F[1],this._FBU.y=(F[2]<<8)+F[3],this._FBU.width=(F[4]<<8)+F[5],this._FBU.height=(F[6]<<8)+F[7],this._FBU.encoding=parseInt((F[8]<<24)+(F[9]<<16)+(F[10]<<8)+F[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case b.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case b.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case b.encodings.pseudoEncodingCursor:return this._handleCursor();case b.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var F=document.createEvent("keyboardEvent");F.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(H){}return!0;case b.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case b.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case b.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var F=this._FBU.x,H=this._FBU.y,T=this._FBU.width,Q=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var de=this._sock.rQshift8();this._sock.rQshift8();var be,z=4;if(de==0){var A=-256;if(be=new Array(T*Q*z),this._sock.rQwait("VMware cursor classic encoding",T*Q*z*2,2))return!1;for(var $=new Array(T*Q),Y=0;Y<T*Q;Y++)$[Y]=this._sock.rQshift32();for(var se=new Array(T*Q),pe=0;pe<T*Q;pe++)se[pe]=this._sock.rQshift32();for(var ne=0;ne<T*Q;ne++)if($[ne]==0){var K=se[ne],re=K>>8&255,M=K>>16&255,ue=K>>24&255;be[ne*z]=re,be[ne*z+1]=M,be[ne*z+2]=ue,be[ne*z+3]=255}else($[ne]&A)==A?se[ne]==0?(be[ne*z]=0,be[ne*z+1]=0,be[ne*z+2]=0,be[ne*z+3]=0):((se[ne]&A)==A,be[ne*z]=0,be[ne*z+1]=0,be[ne*z+2]=0,be[ne*z+3]=255):(be[ne*z]=0,be[ne*z+1]=0,be[ne*z+2]=0,be[ne*z+3]=255)}else if(de==1){if(this._sock.rQwait("VMware cursor alpha encoding",T*Q*4,2))return!1;be=new Array(T*Q*z);for(var Fe=0;Fe<T*Q;Fe++){var w=this._sock.rQshift32();be[Fe*4]=w>>24&255,be[Fe*4+1]=w>>16&255,be[Fe*4+2]=w>>8&255,be[Fe*4+3]=w&255}}else return y.Warn("The given cursor type is not supported: "+de+" given."),!1;return this._updateCursor(be,F,H,T,Q),!0}},{key:"_handleCursor",value:function(){var F=this._FBU.x,H=this._FBU.y,T=this._FBU.width,Q=this._FBU.height,de=T*Q*4,be=Math.ceil(T/8)*Q,z=de+be;if(this._sock.rQwait("cursor encoding",z))return!1;for(var A=this._sock.rQshiftBytes(de),$=this._sock.rQshiftBytes(be),Y=new Uint8Array(T*Q*4),se=0,pe=0;pe<Q;pe++)for(var ne=0;ne<T;ne++){var K=pe*Math.ceil(T/8)+Math.floor(ne/8),re=$[K]<<ne%8&128?255:0;Y[se]=A[se+2],Y[se+1]=A[se+1],Y[se+2]=A[se],Y[se+3]=re,se+=4}return this._updateCursor(Y,F,H,T,Q),!0}},{key:"_handleDesktopName",value:function(){if(this._sock.rQwait("DesktopName",4))return!1;var F=this._sock.rQshift32();if(this._sock.rQwait("DesktopName",F,4))return!1;var H=this._sock.rQshiftStr(F);return H=(0,h.decodeUTF8)(H,!0),this._setDesktopName(H),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var F=this._sock.rQpeek8(),H=4+F*16;if(this._sock.rQwait("ExtendedDesktopSize",H))return!1;var T=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,T&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var Q=0;Q<F;Q+=1)Q===0?(this._screenID=this._sock.rQshiftBytes(4),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._screenFlags=this._sock.rQshiftBytes(4)):this._sock.rQskipBytes(16);if(this._FBU.x===1&&this._FBU.y!==0){var de="";switch(this._FBU.y){case 1:de="Resize is administratively prohibited";break;case 2:de="Out of resources";break;case 3:de="Invalid screen layout";break;default:de="Unknown reason";break}y.Warn("Server did not accept the resize request: "+de)}else this._resize(this._FBU.width,this._FBU.height);return!0}},{key:"_handleDataRect",value:function(){var F=this._decoders[this._FBU.encoding];if(!F)return this._fail("Unsupported encoding (encoding: "+this._FBU.encoding+")"),!1;try{return F.decodeRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,this._sock,this._display,this._fbDepth)}catch(H){return this._fail("Error decoding rect: "+H),!1}}},{key:"_updateContinuousUpdates",value:function(){this._enabledContinuousUpdates&&ce.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(F,H){this._fbWidth=F,this._fbHeight=H,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(F,H){this._rfbXvpVer<F||(y.Info("Sending XVP operation "+H+" (version "+F+")"),ce.messages.xvpOp(this._sock,F,H))}},{key:"_updateCursor",value:function(F,H,T,Q,de){this._cursorImage={rgbaPixels:F,hotx:H,hoty:T,w:Q,h:de},this._refreshCursor()}},{key:"_shouldShowDotCursor",value:function(){if(!this._showDotCursor)return!1;for(var F=3;F<this._cursorImage.rgbaPixels.length;F+=4)if(this._cursorImage.rgbaPixels[F])return!1;return!0}},{key:"_refreshCursor",value:function(){if(!(this._rfbConnectionState!=="connecting"&&this._rfbConnectionState!=="connected")){var F=this._shouldShowDotCursor()?ce.cursors.dot:this._cursorImage;this._cursor.change(F.rgbaPixels,F.hotx,F.hoty,F.w,F.h)}}},{key:"viewOnly",get:function(){return this._viewOnly},set:function(F){this._viewOnly=F,(this._rfbConnectionState==="connecting"||this._rfbConnectionState==="connected")&&(F?this._keyboard.ungrab():this._keyboard.grab())}},{key:"capabilities",get:function(){return this._capabilities}},{key:"touchButton",get:function(){return 0},set:function(F){y.Warn("Using old API!")}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(F){this._clipViewport=F,this._updateClip()}},{key:"scaleViewport",get:function(){return this._scaleViewport},set:function(F){this._scaleViewport=F,F&&this._clipViewport&&this._updateClip(),this._updateScale(),!F&&this._clipViewport&&this._updateClip()}},{key:"resizeSession",get:function(){return this._resizeSession},set:function(F){this._resizeSession=F,F&&this._requestRemoteResize()}},{key:"showDotCursor",get:function(){return this._showDotCursor},set:function(F){this._showDotCursor=F,this._refreshCursor()}},{key:"background",get:function(){return this._screen.style.background},set:function(F){this._screen.style.background=F}},{key:"qualityLevel",get:function(){return this._qualityLevel},set:function(F){if(!Number.isInteger(F)||F<0||F>9){y.Error("qualityLevel must be an integer between 0 and 9");return}this._qualityLevel!==F&&(this._qualityLevel=F,this._rfbConnectionState==="connected"&&this._sendEncodings())}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(F){if(!Number.isInteger(F)||F<0||F>9){y.Error("compressionLevel must be an integer between 0 and 9");return}this._compressionLevel!==F&&(this._compressionLevel=F,this._rfbConnectionState==="connected"&&this._sendEncodings())}}],[{key:"genDES",value:function(F,H){var T=F.split("").map(function(Q){return Q.charCodeAt(0)});return new l.default(T).encrypt(H)}}]),ce}(r.default);D.Z=Se,Se.messages={keyEvent:function(ae,ce,V){var F=ae._sQ,H=ae._sQlen;F[H]=4,F[H+1]=V,F[H+2]=0,F[H+3]=0,F[H+4]=ce>>24,F[H+5]=ce>>16,F[H+6]=ce>>8,F[H+7]=ce,ae._sQlen+=8,ae.flush()},QEMUExtendedKeyEvent:function(ae,ce,V,F){function H(be){var z=F>>8,A=F&255;return z===224&&A<127?A|128:be}var T=ae._sQ,Q=ae._sQlen;T[Q]=255,T[Q+1]=0,T[Q+2]=V>>8,T[Q+3]=V,T[Q+4]=ce>>24,T[Q+5]=ce>>16,T[Q+6]=ce>>8,T[Q+7]=ce;var de=H(F);T[Q+8]=de>>24,T[Q+9]=de>>16,T[Q+10]=de>>8,T[Q+11]=de,ae._sQlen+=12,ae.flush()},pointerEvent:function(ae,ce,V,F){var H=ae._sQ,T=ae._sQlen;H[T]=5,H[T+1]=F,H[T+2]=ce>>8,H[T+3]=ce,H[T+4]=V>>8,H[T+5]=V,ae._sQlen+=6,ae.flush()},_buildExtendedClipboardFlags:function(ae,ce){for(var V=new Uint8Array(4),F=0,H=0,T=0;T<ae.length;T++)H|=ae[T];for(var Q=0;Q<ce.length;Q++)F|=ce[Q];return V[0]=H>>24,V[1]=0,V[2]=0,V[3]=F,V},extendedClipboardProvide:function(ae,ce,V){for(var F=new e.default,H=[],T=0;T<ce.length;T++){if(ce[T]!=ye)throw new Error("Unsupported extended clipboard format for Provide message.");V[T]=V[T].replace(/\r\n|\r|\n/gm,`\r
`);var Q=(0,h.encodeUTF8)(V[T]+"\0");H.push(Q.length>>24&255,Q.length>>16&255,Q.length>>8&255,Q.length&255);for(var de=0;de<Q.length;de++)H.push(Q.charCodeAt(de))}var be=F.deflate(new Uint8Array(H)),z=new Uint8Array(4+be.length);z.set(Se.messages._buildExtendedClipboardFlags([Ae],ce)),z.set(be,4),Se.messages.clientCutText(ae,z,!0)},extendedClipboardNotify:function(ae,ce){var V=Se.messages._buildExtendedClipboardFlags([ie],ce);Se.messages.clientCutText(ae,V,!0)},extendedClipboardRequest:function(ae,ce){var V=Se.messages._buildExtendedClipboardFlags([Oe],ce);Se.messages.clientCutText(ae,V,!0)},extendedClipboardCaps:function(ae,ce,V){var F=Object.keys(V),H=new Uint8Array(4+4*F.length);F.map(function(de){return parseInt(de)}),F.sort(function(de,be){return de-be}),H.set(Se.messages._buildExtendedClipboardFlags(ce,[]));for(var T=4,Q=0;Q<F.length;Q++)H[T]=V[F[Q]]>>24,H[T+1]=V[F[Q]]>>16,H[T+2]=V[F[Q]]>>8,H[T+3]=V[F[Q]]>>0,T+=4,H[3]|=1<<F[Q];Se.messages.clientCutText(ae,H,!0)},clientCutText:function(ae,ce){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,F=ae._sQ,H=ae._sQlen;F[H]=6,F[H+1]=0,F[H+2]=0,F[H+3]=0;var T;V?T=(0,m.toUnsigned32bit)(-ce.length):T=ce.length,F[H+4]=T>>24,F[H+5]=T>>16,F[H+6]=T>>8,F[H+7]=T,ae._sQlen+=8;for(var Q=0,de=ce.length;de>0;){for(var be=Math.min(de,ae._sQbufferSize-ae._sQlen),z=0;z<be;z++)F[ae._sQlen+z]=ce[Q+z];ae._sQlen+=be,ae.flush(),de-=be,Q+=be}},setDesktopSize:function(ae,ce,V,F,H){var T=ae._sQ,Q=ae._sQlen;T[Q]=251,T[Q+1]=0,T[Q+2]=ce>>8,T[Q+3]=ce,T[Q+4]=V>>8,T[Q+5]=V,T[Q+6]=1,T[Q+7]=0,T[Q+8]=F>>24,T[Q+9]=F>>16,T[Q+10]=F>>8,T[Q+11]=F,T[Q+12]=0,T[Q+13]=0,T[Q+14]=0,T[Q+15]=0,T[Q+16]=ce>>8,T[Q+17]=ce,T[Q+18]=V>>8,T[Q+19]=V,T[Q+20]=H>>24,T[Q+21]=H>>16,T[Q+22]=H>>8,T[Q+23]=H,ae._sQlen+=24,ae.flush()},clientFence:function(ae,ce,V){var F=ae._sQ,H=ae._sQlen;F[H]=248,F[H+1]=0,F[H+2]=0,F[H+3]=0,F[H+4]=ce>>24,F[H+5]=ce>>16,F[H+6]=ce>>8,F[H+7]=ce;var T=V.length;F[H+8]=T;for(var Q=0;Q<T;Q++)F[H+9+Q]=V.charCodeAt(Q);ae._sQlen+=9+T,ae.flush()},enableContinuousUpdates:function(ae,ce,V,F,H,T){var Q=ae._sQ,de=ae._sQlen;Q[de]=150,Q[de+1]=ce,Q[de+2]=V>>8,Q[de+3]=V,Q[de+4]=F>>8,Q[de+5]=F,Q[de+6]=H>>8,Q[de+7]=H,Q[de+8]=T>>8,Q[de+9]=T,ae._sQlen+=10,ae.flush()},pixelFormat:function(ae,ce,V){var F=ae._sQ,H=ae._sQlen,T;ce>16?T=32:ce>8?T=16:T=8;var Q=Math.floor(ce/3);F[H]=0,F[H+1]=0,F[H+2]=0,F[H+3]=0,F[H+4]=T,F[H+5]=ce,F[H+6]=0,F[H+7]=V?1:0,F[H+8]=0,F[H+9]=(1<<Q)-1,F[H+10]=0,F[H+11]=(1<<Q)-1,F[H+12]=0,F[H+13]=(1<<Q)-1,F[H+14]=Q*2,F[H+15]=Q*1,F[H+16]=Q*0,F[H+17]=0,F[H+18]=0,F[H+19]=0,ae._sQlen+=20,ae.flush()},clientEncodings:function(ae,ce){var V=ae._sQ,F=ae._sQlen;V[F]=2,V[F+1]=0,V[F+2]=ce.length>>8,V[F+3]=ce.length;for(var H=F+4,T=0;T<ce.length;T++){var Q=ce[T];V[H]=Q>>24,V[H+1]=Q>>16,V[H+2]=Q>>8,V[H+3]=Q,H+=4}ae._sQlen+=H-F,ae.flush()},fbUpdateRequest:function(ae,ce,V,F,H,T){var Q=ae._sQ,de=ae._sQlen;typeof V=="undefined"&&(V=0),typeof F=="undefined"&&(F=0),Q[de]=3,Q[de+1]=ce?1:0,Q[de+2]=V>>8&255,Q[de+3]=V&255,Q[de+4]=F>>8&255,Q[de+5]=F&255,Q[de+6]=H>>8&255,Q[de+7]=H&255,Q[de+8]=T>>8&255,Q[de+9]=T&255,ae._sQlen+=10,ae.flush()},xvpOp:function(ae,ce,V){var F=ae._sQ,H=ae._sQlen;F[H]=250,F[H+1]=0,F[H+2]=ce,F[H+3]=V,ae._sQlen+=4,ae.flush()}},Se.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},58863:function(Te,D,c){"use strict";function _(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(O){return typeof O}:_=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},_(S)}Object.defineProperty(D,"__esModule",{value:!0}),D.isMac=p,D.isWindows=g,D.isIOS=b,D.isSafari=x,D.isIE=E,D.isEdge=C,D.isFirefox=v,D.hasScrollbarGutter=D.supportsImageMetadata=D.supportsCursorURIs=D.dragThreshold=D.isTouchDevice=void 0;var m=h(c(37095));function y(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return y=function(){return S},S}function h(S){if(S&&S.__esModule)return S;if(S===null||_(S)!=="object"&&typeof S!="function")return{default:S};var k=y();if(k&&k.has(S))return k.get(S);var O={},R=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in S)if(Object.prototype.hasOwnProperty.call(S,U)){var N=R?Object.getOwnPropertyDescriptor(S,U):null;N&&(N.get||N.set)?Object.defineProperty(O,U,N):O[U]=S[U]}return O.default=S,k&&k.set(S,O),O}var o=!1;D.isTouchDevice=o,window.addEventListener("touchstart",function(){},!1);var u=10*(window.devicePixelRatio||1);D.dragThreshold=u;var d=!1;try{var r=document.createElement("canvas");r.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',r.style.cursor.indexOf("url")===0?(m.Info("Data URI scheme cursor supported"),d=!0):m.Warn("Data URI scheme cursor not supported")}catch(S){m.Error("Data URI scheme cursor test exception: "+S)}var i=d;D.supportsCursorURIs=i;var a=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),a=!0}catch(S){}var e=a;D.supportsImageMetadata=e;var f=!0;try{var t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);var n=document.createElement("div");t.appendChild(n);var s=t.offsetWidth-n.offsetWidth;t.parentNode.removeChild(t),f=s!=0}catch(S){m.Error("Scrollbar test exception: "+S)}var l=f;D.hasScrollbarGutter=l;function p(){return navigator&&!!/mac/i.exec(navigator.platform)}function g(){return navigator&&!!/win/i.exec(navigator.platform)}function b(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function x(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function E(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function C(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function v(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},87975:function(Te,D,c){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=c(58863);function m(d,r){if(!(d instanceof r))throw new TypeError("Cannot call a class as a function")}function y(d,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}function h(d,r,i){return r&&y(d.prototype,r),i&&y(d,i),d}var o=!_.supportsCursorURIs||_.isTouchDevice,u=function(){function d(){m(this,d),this._target=null,this._canvas=document.createElement("canvas"),o&&(this._canvas.style.position="fixed",this._canvas.style.zIndex="65535",this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden"),this._position={x:0,y:0},this._hotSpot={x:0,y:0},this._eventHandlers={mouseover:this._handleMouseOver.bind(this),mouseleave:this._handleMouseLeave.bind(this),mousemove:this._handleMouseMove.bind(this),mouseup:this._handleMouseUp.bind(this)}}return h(d,[{key:"attach",value:function(i){if(this._target&&this.detach(),this._target=i,o){document.body.appendChild(this._canvas);var a={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,a),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,a),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,a),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,a)}this.clear()}},{key:"detach",value:function(){if(this._target){if(o){var i={capture:!0,passive:!0};this._target.removeEventListener("mouseover",this._eventHandlers.mouseover,i),this._target.removeEventListener("mouseleave",this._eventHandlers.mouseleave,i),this._target.removeEventListener("mousemove",this._eventHandlers.mousemove,i),this._target.removeEventListener("mouseup",this._eventHandlers.mouseup,i),document.body.removeChild(this._canvas)}this._target=null}}},{key:"change",value:function(i,a,e,f,t){if(f===0||t===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-a,this._position.y=this._position.y+this._hotSpot.y-e,this._hotSpot.x=a,this._hotSpot.y=e;var n=this._canvas.getContext("2d");this._canvas.width=f,this._canvas.height=t;var s;try{s=new ImageData(new Uint8ClampedArray(i),f,t)}catch(p){s=n.createImageData(f,t),s.data.set(new Uint8ClampedArray(i))}if(n.clearRect(0,0,f,t),n.putImageData(s,0,0),o)this._updatePosition();else{var l=this._canvas.toDataURL();this._target.style.cursor="url("+l+")"+a+" "+e+", default"}}},{key:"clear",value:function(){this._target.style.cursor="none",this._canvas.width=0,this._canvas.height=0,this._position.x=this._position.x+this._hotSpot.x,this._position.y=this._position.y+this._hotSpot.y,this._hotSpot.x=0,this._hotSpot.y=0}},{key:"move",value:function(i,a){if(o){window.visualViewport?(this._position.x=i+window.visualViewport.offsetLeft,this._position.y=a+window.visualViewport.offsetTop):(this._position.x=i,this._position.y=a),this._updatePosition();var e=document.elementFromPoint(i,a);this._updateVisibility(e)}}},{key:"_handleMouseOver",value:function(i){this._handleMouseMove(i)}},{key:"_handleMouseLeave",value:function(i){this._updateVisibility(i.relatedTarget)}},{key:"_handleMouseMove",value:function(i){this._updateVisibility(i.target),this._position.x=i.clientX-this._hotSpot.x,this._position.y=i.clientY-this._hotSpot.y,this._updatePosition()}},{key:"_handleMouseUp",value:function(i){var a=this,e=document.elementFromPoint(i.clientX,i.clientY);this._updateVisibility(e),this._captureIsActive()&&window.setTimeout(function(){a._target&&(e=document.elementFromPoint(i.clientX,i.clientY),a._updateVisibility(e))},0)}},{key:"_showCursor",value:function(){this._canvas.style.visibility==="hidden"&&(this._canvas.style.visibility="")}},{key:"_hideCursor",value:function(){this._canvas.style.visibility!=="hidden"&&(this._canvas.style.visibility="hidden")}},{key:"_shouldShowCursor",value:function(i){return i?i===this._target?!0:!(!this._target.contains(i)||window.getComputedStyle(i).cursor!=="none"):!1}},{key:"_updateVisibility",value:function(i){this._captureIsActive()&&(i=document.captureElement),this._shouldShowCursor(i)?this._showCursor():this._hideCursor()}},{key:"_updatePosition",value:function(){this._canvas.style.left=this._position.x+"px",this._canvas.style.top=this._position.y+"px"}},{key:"_captureIsActive",value:function(){return document.captureElement&&document.documentElement.contains(document.captureElement)}}]),d}();D.default=u},80957:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.clientToElement=c;function c(_,m,y){var h=y.getBoundingClientRect(),o={x:0,y:0};return _<h.left?o.x=0:_>=h.right?o.x=h.width-1:o.x=_-h.left,m<h.top?o.y=0:m>=h.bottom?o.y=h.height-1:o.y=m-h.top,o}},32466:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getPointerEvent=c,D.stopEvent=_,D.setCapture=d,D.releaseCapture=r;function c(i){return i.changedTouches?i.changedTouches[0]:i.touches?i.touches[0]:i}function _(i){i.stopPropagation(),i.preventDefault()}var m=!1,y=null;document.captureElement=null;function h(i){if(!m){var a=new i.constructor(i.type,i);m=!0,document.captureElement?document.captureElement.dispatchEvent(a):y.dispatchEvent(a),m=!1,i.stopPropagation(),a.defaultPrevented&&i.preventDefault(),i.type==="mouseup"&&r()}}function o(){var i=document.getElementById("noVNC_mouse_capture_elem");i.style.cursor=window.getComputedStyle(document.captureElement).cursor}var u=new MutationObserver(o);function d(i){if(i.setCapture)i.setCapture(),document.captureElement=i,i.addEventListener("mouseup",r);else{r();var a=document.getElementById("noVNC_mouse_capture_elem");a===null&&(a=document.createElement("div"),a.id="noVNC_mouse_capture_elem",a.style.position="fixed",a.style.top="0px",a.style.left="0px",a.style.width="100%",a.style.height="100%",a.style.zIndex=1e4,a.style.display="none",document.body.appendChild(a),a.addEventListener("contextmenu",h),a.addEventListener("mousemove",h),a.addEventListener("mouseup",h)),document.captureElement=i,u.observe(i,{attributes:!0}),o(),a.style.display="",window.addEventListener("mousemove",h),window.addEventListener("mouseup",h)}}function r(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;y=document.captureElement,document.captureElement=null,u.disconnect();var i=document.getElementById("noVNC_mouse_capture_elem");i.style.display="none",window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",h)}}},45458:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function c(h,o){if(!(h instanceof o))throw new TypeError("Cannot call a class as a function")}function _(h,o){for(var u=0;u<o.length;u++){var d=o[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function m(h,o,u){return o&&_(h.prototype,o),u&&_(h,u),h}var y=function(){function h(){c(this,h),this._listeners=new Map}return m(h,[{key:"addEventListener",value:function(u,d){this._listeners.has(u)||this._listeners.set(u,new Set),this._listeners.get(u).add(d)}},{key:"removeEventListener",value:function(u,d){this._listeners.has(u)&&this._listeners.get(u).delete(d)}},{key:"dispatchEvent",value:function(u){var d=this;return this._listeners.has(u.type)?(this._listeners.get(u.type).forEach(function(r){return r.call(d,u)}),!u.defaultPrevented):!0}}]),h}();D.default=y},77676:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.toUnsigned32bit=c,D.toSigned32bit=_;function c(m){return m>>>0}function _(m){return m|0}},37095:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.initLogging=o,D.getLogging=u,D.Error=D.Warn=D.Info=D.Debug=void 0;var c="warn",_=function(){};D.Debug=_;var m=function(){};D.Info=m;var y=function(){};D.Warn=y;var h=function(){};D.Error=h;function o(d){if(typeof d=="undefined"?d=c:c=d,D.Debug=_=D.Info=m=D.Warn=y=D.Error=h=function(){},typeof window.console!="undefined")switch(d){case"debug":D.Debug=_=console.debug.bind(window.console);case"info":D.Info=m=console.info.bind(window.console);case"warn":D.Warn=y=console.warn.bind(window.console);case"error":D.Error=h=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+d+"'")}}function u(){return c}o()},21146:function(){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(D,c){"use strict";if(D==null)throw new TypeError("Cannot convert undefined or null to object");for(var _=Object(D),m=1;m<arguments.length;m++){var y=arguments[m];if(y!=null)for(var h in y)Object.prototype.hasOwnProperty.call(y,h)&&(_[h]=y[h])}return _},writable:!0,configurable:!0}),function(){function Te(D,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var _=document.createEvent("CustomEvent");return _.initCustomEvent(D,c.bubbles,c.cancelable,c.detail),_}Te.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=Te)}(),Number.isInteger=Number.isInteger||function(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}},38955:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.decodeUTF8=c,D.encodeUTF8=_;function c(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(m))}catch(h){if(h instanceof URIError&&y)return m;throw h}}function _(m){return unescape(encodeURIComponent(m))}},21437:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.shrinkBuf=c,D.arraySet=_,D.flattenChunks=m,D.Buf32=D.Buf16=D.Buf8=void 0;function c(u,d){return u.length===d?u:u.subarray?u.subarray(0,d):(u.length=d,u)}function _(u,d,r,i,a){if(d.subarray&&u.subarray){u.set(d.subarray(r,r+i),a);return}for(var e=0;e<i;e++)u[a+e]=d[r+e]}function m(u){var d,r,i,a,e,f;for(i=0,d=0,r=u.length;d<r;d++)i+=u[d].length;for(f=new Uint8Array(i),a=0,d=0,r=u.length;d<r;d++)e=u[d],f.set(e,a),a+=e.length;return f}var y=Uint8Array;D.Buf8=y;var h=Uint16Array;D.Buf16=h;var o=Int32Array;D.Buf32=o},324:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=c;function c(_,m,y,h){for(var o=_&65535|0,u=_>>>16&65535|0,d=0;y!==0;){d=y>2e3?2e3:y,y-=d;do o=o+m[h++]|0,u=u+o|0;while(--d);o%=65521,u%=65521}return o|u<<16|0}},2895:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=c;function c(){for(var y,h=[],o=0;o<256;o++){y=o;for(var u=0;u<8;u++)y=y&1?3988292384^y>>>1:y>>>1;h[o]=y}return h}var _=c();function m(y,h,o,u){var d=_,r=u+o;y^=-1;for(var i=u;i<r;i++)y=y>>>8^d[(y^h[i])&255];return y^-1}},8293:function(Te,D,c){"use strict";function _(w){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(G){return typeof G}:_=function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},_(w)}Object.defineProperty(D,"__esModule",{value:!0}),D.deflateInit=K,D.deflateInit2=ne,D.deflateReset=se,D.deflateResetKeep=Y,D.deflateSetHeader=pe,D.deflate=re,D.deflateEnd=M,D.deflateSetDictionary=ue,D.deflateInfo=D.Z_DEFLATED=D.Z_UNKNOWN=D.Z_DEFAULT_STRATEGY=D.Z_FIXED=D.Z_RLE=D.Z_HUFFMAN_ONLY=D.Z_FILTERED=D.Z_DEFAULT_COMPRESSION=D.Z_BUF_ERROR=D.Z_DATA_ERROR=D.Z_STREAM_ERROR=D.Z_STREAM_END=D.Z_OK=D.Z_BLOCK=D.Z_FINISH=D.Z_FULL_FLUSH=D.Z_PARTIAL_FLUSH=D.Z_NO_FLUSH=void 0;var m=i(c(21437)),y=i(c(4500)),h=d(c(324)),o=d(c(2895)),u=d(c(41020));function d(w){return w&&w.__esModule?w:{default:w}}function r(){if(typeof WeakMap!="function")return null;var w=new WeakMap;return r=function(){return w},w}function i(w){if(w&&w.__esModule)return w;if(w===null||_(w)!=="object"&&typeof w!="function")return{default:w};var te=r();if(te&&te.has(w))return te.get(w);var G={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in w)if(Object.prototype.hasOwnProperty.call(w,W)){var J=P?Object.getOwnPropertyDescriptor(w,W):null;J&&(J.get||J.set)?Object.defineProperty(G,W,J):G[W]=w[W]}return G.default=w,te&&te.set(w,G),G}var a=0;D.Z_NO_FLUSH=a;var e=1;D.Z_PARTIAL_FLUSH=e;var f=3;D.Z_FULL_FLUSH=f;var t=4;D.Z_FINISH=t;var n=5;D.Z_BLOCK=n;var s=0;D.Z_OK=s;var l=1;D.Z_STREAM_END=l;var p=-2;D.Z_STREAM_ERROR=p;var g=-3;D.Z_DATA_ERROR=g;var b=-5;D.Z_BUF_ERROR=b;var x=-1;D.Z_DEFAULT_COMPRESSION=x;var E=1;D.Z_FILTERED=E;var C=2;D.Z_HUFFMAN_ONLY=C;var v=3;D.Z_RLE=v;var S=4;D.Z_FIXED=S;var k=0;D.Z_DEFAULT_STRATEGY=k;var O=2;D.Z_UNKNOWN=O;var R=8;D.Z_DEFLATED=R;var U=9,N=15,_e=8,Z=29,oe=256,L=oe+1+Z,X=30,I=19,j=2*L+1,B=15,q=3,fe=258,ke=fe+q+1,Ke=32,Pe=42,le=69,me=73,Ie=91,Me=103,ve=113,Ce=666,ye=1,we=2,De=3,Xe=4,Ee=3;function Re(w,te){return w.msg=u.default[te],te}function Oe(w){return(w<<1)-(w>4?9:0)}function ee(w){for(var te=w.length;--te>=0;)w[te]=0}function ie(w){var te=w.state,G=te.pending;G>w.avail_out&&(G=w.avail_out),G!==0&&(m.arraySet(w.output,te.pending_buf,te.pending_out,G,w.next_out),w.next_out+=G,te.pending_out+=G,w.total_out+=G,w.avail_out-=G,te.pending-=G,te.pending===0&&(te.pending_out=0))}function Ae(w,te){y._tr_flush_block(w,w.block_start>=0?w.block_start:-1,w.strstart-w.block_start,te),w.block_start=w.strstart,ie(w.strm)}function Se(w,te){w.pending_buf[w.pending++]=te}function he(w,te){w.pending_buf[w.pending++]=te>>>8&255,w.pending_buf[w.pending++]=te&255}function ae(w,te,G,P){var W=w.avail_in;return W>P&&(W=P),W===0?0:(w.avail_in-=W,m.arraySet(te,w.input,w.next_in,W,G),w.state.wrap===1?w.adler=(0,h.default)(w.adler,te,W,G):w.state.wrap===2&&(w.adler=(0,o.default)(w.adler,te,W,G)),w.next_in+=W,w.total_in+=W,W)}function ce(w,te){var G=w.max_chain_length,P=w.strstart,W,J,Le=w.prev_length,ge=w.nice_match,xe=w.strstart>w.w_size-ke?w.strstart-(w.w_size-ke):0,Be=w.window,Ne=w.w_mask,Ue=w.prev,He=w.strstart+fe,$e=Be[P+Le-1],je=Be[P+Le];w.prev_length>=w.good_match&&(G>>=2),ge>w.lookahead&&(ge=w.lookahead);do if(W=te,!(Be[W+Le]!==je||Be[W+Le-1]!==$e||Be[W]!==Be[P]||Be[++W]!==Be[P+1])){P+=2,W++;do;while(Be[++P]===Be[++W]&&Be[++P]===Be[++W]&&Be[++P]===Be[++W]&&Be[++P]===Be[++W]&&Be[++P]===Be[++W]&&Be[++P]===Be[++W]&&Be[++P]===Be[++W]&&Be[++P]===Be[++W]&&P<He);if(J=fe-(He-P),P=He-fe,J>Le){if(w.match_start=te,Le=J,J>=ge)break;$e=Be[P+Le-1],je=Be[P+Le]}}while((te=Ue[te&Ne])>xe&&--G!==0);return Le<=w.lookahead?Le:w.lookahead}function V(w){var te=w.w_size,G,P,W,J,Le;do{if(J=w.window_size-w.lookahead-w.strstart,w.strstart>=te+(te-ke)){m.arraySet(w.window,w.window,te,te,0),w.match_start-=te,w.strstart-=te,w.block_start-=te,P=w.hash_size,G=P;do W=w.head[--G],w.head[G]=W>=te?W-te:0;while(--P);P=te,G=P;do W=w.prev[--G],w.prev[G]=W>=te?W-te:0;while(--P);J+=te}if(w.strm.avail_in===0)break;if(P=ae(w.strm,w.window,w.strstart+w.lookahead,J),w.lookahead+=P,w.lookahead+w.insert>=q)for(Le=w.strstart-w.insert,w.ins_h=w.window[Le],w.ins_h=(w.ins_h<<w.hash_shift^w.window[Le+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[Le+q-1])&w.hash_mask,w.prev[Le&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=Le,Le++,w.insert--,!(w.lookahead+w.insert<q)););}while(w.lookahead<ke&&w.strm.avail_in!==0)}function F(w,te){var G=65535;for(G>w.pending_buf_size-5&&(G=w.pending_buf_size-5);;){if(w.lookahead<=1){if(V(w),w.lookahead===0&&te===a)return ye;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var P=w.block_start+G;if((w.strstart===0||w.strstart>=P)&&(w.lookahead=w.strstart-P,w.strstart=P,Ae(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-ke&&(Ae(w,!1),w.strm.avail_out===0))return ye}return w.insert=0,te===t?(Ae(w,!0),w.strm.avail_out===0?De:Xe):(w.strstart>w.block_start&&(Ae(w,!1),w.strm.avail_out===0),ye)}function H(w,te){for(var G,P;;){if(w.lookahead<ke){if(V(w),w.lookahead<ke&&te===a)return ye;if(w.lookahead===0)break}if(G=0,w.lookahead>=q&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+q-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),G!==0&&w.strstart-G<=w.w_size-ke&&(w.match_length=ce(w,G)),w.match_length>=q)if(P=y._tr_tally(w,w.strstart-w.match_start,w.match_length-q),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=q){w.match_length--;do w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+q-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart;while(--w.match_length!==0);w.strstart++}else w.strstart+=w.match_length,w.match_length=0,w.ins_h=w.window[w.strstart],w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+1])&w.hash_mask;else P=y._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(P&&(Ae(w,!1),w.strm.avail_out===0))return ye}return w.insert=w.strstart<q-1?w.strstart:q-1,te===t?(Ae(w,!0),w.strm.avail_out===0?De:Xe):w.last_lit&&(Ae(w,!1),w.strm.avail_out===0)?ye:we}function T(w,te){for(var G,P,W;;){if(w.lookahead<ke){if(V(w),w.lookahead<ke&&te===a)return ye;if(w.lookahead===0)break}if(G=0,w.lookahead>=q&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+q-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),w.prev_length=w.match_length,w.prev_match=w.match_start,w.match_length=q-1,G!==0&&w.prev_length<w.max_lazy_match&&w.strstart-G<=w.w_size-ke&&(w.match_length=ce(w,G),w.match_length<=5&&(w.strategy===E||w.match_length===q&&w.strstart-w.match_start>4096)&&(w.match_length=q-1)),w.prev_length>=q&&w.match_length<=w.prev_length){W=w.strstart+w.lookahead-q,P=y._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-q),w.lookahead-=w.prev_length-1,w.prev_length-=2;do++w.strstart<=W&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+q-1])&w.hash_mask,G=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart);while(--w.prev_length!==0);if(w.match_available=0,w.match_length=q-1,w.strstart++,P&&(Ae(w,!1),w.strm.avail_out===0))return ye}else if(w.match_available){if(P=y._tr_tally(w,0,w.window[w.strstart-1]),P&&Ae(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return ye}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(P=y._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<q-1?w.strstart:q-1,te===t?(Ae(w,!0),w.strm.avail_out===0?De:Xe):w.last_lit&&(Ae(w,!1),w.strm.avail_out===0)?ye:we}function Q(w,te){for(var G,P,W,J,Le=w.window;;){if(w.lookahead<=fe){if(V(w),w.lookahead<=fe&&te===a)return ye;if(w.lookahead===0)break}if(w.match_length=0,w.lookahead>=q&&w.strstart>0&&(W=w.strstart-1,P=Le[W],P===Le[++W]&&P===Le[++W]&&P===Le[++W])){J=w.strstart+fe;do;while(P===Le[++W]&&P===Le[++W]&&P===Le[++W]&&P===Le[++W]&&P===Le[++W]&&P===Le[++W]&&P===Le[++W]&&P===Le[++W]&&W<J);w.match_length=fe-(J-W),w.match_length>w.lookahead&&(w.match_length=w.lookahead)}if(w.match_length>=q?(G=y._tr_tally(w,1,w.match_length-q),w.lookahead-=w.match_length,w.strstart+=w.match_length,w.match_length=0):(G=y._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++),G&&(Ae(w,!1),w.strm.avail_out===0))return ye}return w.insert=0,te===t?(Ae(w,!0),w.strm.avail_out===0?De:Xe):w.last_lit&&(Ae(w,!1),w.strm.avail_out===0)?ye:we}function de(w,te){for(var G;;){if(w.lookahead===0&&(V(w),w.lookahead===0)){if(te===a)return ye;break}if(w.match_length=0,G=y._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++,G&&(Ae(w,!1),w.strm.avail_out===0))return ye}return w.insert=0,te===t?(Ae(w,!0),w.strm.avail_out===0?De:Xe):w.last_lit&&(Ae(w,!1),w.strm.avail_out===0)?ye:we}function be(w,te,G,P,W){this.good_length=w,this.max_lazy=te,this.nice_length=G,this.max_chain=P,this.func=W}var z;z=[new be(0,0,0,0,F),new be(4,4,8,4,H),new be(4,5,16,8,H),new be(4,6,32,32,H),new be(4,4,16,16,T),new be(8,16,32,32,T),new be(8,16,128,128,T),new be(8,32,128,256,T),new be(32,128,258,1024,T),new be(32,258,258,4096,T)];function A(w){w.window_size=2*w.w_size,ee(w.head),w.max_lazy_match=z[w.level].max_lazy,w.good_match=z[w.level].good_length,w.nice_match=z[w.level].nice_length,w.max_chain_length=z[w.level].max_chain,w.strstart=0,w.block_start=0,w.lookahead=0,w.insert=0,w.match_length=w.prev_length=q-1,w.match_available=0,w.ins_h=0}function $(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=R,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new m.Buf16(j*2),this.dyn_dtree=new m.Buf16((2*X+1)*2),this.bl_tree=new m.Buf16((2*I+1)*2),ee(this.dyn_ltree),ee(this.dyn_dtree),ee(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(B+1),this.heap=new m.Buf16(2*L+1),ee(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*L+1),ee(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Y(w){var te;return!w||!w.state?Re(w,p):(w.total_in=w.total_out=0,w.data_type=O,te=w.state,te.pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?Pe:ve,w.adler=te.wrap===2?0:1,te.last_flush=a,y._tr_init(te),s)}function se(w){var te=Y(w);return te===s&&A(w.state),te}function pe(w,te){return!w||!w.state||w.state.wrap!==2?p:(w.state.gzhead=te,s)}function ne(w,te,G,P,W,J){if(!w)return p;var Le=1;if(te===x&&(te=6),P<0?(Le=0,P=-P):P>15&&(Le=2,P-=16),W<1||W>U||G!==R||P<8||P>15||te<0||te>9||J<0||J>S)return Re(w,p);P===8&&(P=9);var ge=new $;return w.state=ge,ge.strm=w,ge.wrap=Le,ge.gzhead=null,ge.w_bits=P,ge.w_size=1<<ge.w_bits,ge.w_mask=ge.w_size-1,ge.hash_bits=W+7,ge.hash_size=1<<ge.hash_bits,ge.hash_mask=ge.hash_size-1,ge.hash_shift=~~((ge.hash_bits+q-1)/q),ge.window=new m.Buf8(ge.w_size*2),ge.head=new m.Buf16(ge.hash_size),ge.prev=new m.Buf16(ge.w_size),ge.lit_bufsize=1<<W+6,ge.pending_buf_size=ge.lit_bufsize*4,ge.pending_buf=new m.Buf8(ge.pending_buf_size),ge.d_buf=1*ge.lit_bufsize,ge.l_buf=3*ge.lit_bufsize,ge.level=te,ge.strategy=J,ge.method=G,se(w)}function K(w,te){return ne(w,te,R,N,_e,k)}function re(w,te){var G,P,W,J;if(!w||!w.state||te>n||te<0)return w?Re(w,p):p;if(P=w.state,!w.output||!w.input&&w.avail_in!==0||P.status===Ce&&te!==t)return Re(w,w.avail_out===0?b:p);if(P.strm=w,G=P.last_flush,P.last_flush=te,P.status===Pe)if(P.wrap===2)w.adler=0,Se(P,31),Se(P,139),Se(P,8),P.gzhead?(Se(P,(P.gzhead.text?1:0)+(P.gzhead.hcrc?2:0)+(P.gzhead.extra?4:0)+(P.gzhead.name?8:0)+(P.gzhead.comment?16:0)),Se(P,P.gzhead.time&255),Se(P,P.gzhead.time>>8&255),Se(P,P.gzhead.time>>16&255),Se(P,P.gzhead.time>>24&255),Se(P,P.level===9?2:P.strategy>=C||P.level<2?4:0),Se(P,P.gzhead.os&255),P.gzhead.extra&&P.gzhead.extra.length&&(Se(P,P.gzhead.extra.length&255),Se(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=le):(Se(P,0),Se(P,0),Se(P,0),Se(P,0),Se(P,0),Se(P,P.level===9?2:P.strategy>=C||P.level<2?4:0),Se(P,Ee),P.status=ve);else{var Le=R+(P.w_bits-8<<4)<<8,ge=-1;P.strategy>=C||P.level<2?ge=0:P.level<6?ge=1:P.level===6?ge=2:ge=3,Le|=ge<<6,P.strstart!==0&&(Le|=Ke),Le+=31-Le%31,P.status=ve,he(P,Le),P.strstart!==0&&(he(P,w.adler>>>16),he(P,w.adler&65535)),w.adler=1}if(P.status===le)if(P.gzhead.extra){for(W=P.pending;P.gzindex<(P.gzhead.extra.length&65535)&&!(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),ie(w),W=P.pending,P.pending===P.pending_buf_size));)Se(P,P.gzhead.extra[P.gzindex]&255),P.gzindex++;P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=me)}else P.status=me;if(P.status===me)if(P.gzhead.name){W=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),ie(w),W=P.pending,P.pending===P.pending_buf_size)){J=1;break}P.gzindex<P.gzhead.name.length?J=P.gzhead.name.charCodeAt(P.gzindex++)&255:J=0,Se(P,J)}while(J!==0);P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),J===0&&(P.gzindex=0,P.status=Ie)}else P.status=Ie;if(P.status===Ie)if(P.gzhead.comment){W=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),ie(w),W=P.pending,P.pending===P.pending_buf_size)){J=1;break}P.gzindex<P.gzhead.comment.length?J=P.gzhead.comment.charCodeAt(P.gzindex++)&255:J=0,Se(P,J)}while(J!==0);P.gzhead.hcrc&&P.pending>W&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-W,W)),J===0&&(P.status=Me)}else P.status=Me;if(P.status===Me&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&ie(w),P.pending+2<=P.pending_buf_size&&(Se(P,w.adler&255),Se(P,w.adler>>8&255),w.adler=0,P.status=ve)):P.status=ve),P.pending!==0){if(ie(w),w.avail_out===0)return P.last_flush=-1,s}else if(w.avail_in===0&&Oe(te)<=Oe(G)&&te!==t)return Re(w,b);if(P.status===Ce&&w.avail_in!==0)return Re(w,b);if(w.avail_in!==0||P.lookahead!==0||te!==a&&P.status!==Ce){var xe=P.strategy===C?de(P,te):P.strategy===v?Q(P,te):z[P.level].func(P,te);if((xe===De||xe===Xe)&&(P.status=Ce),xe===ye||xe===De)return w.avail_out===0&&(P.last_flush=-1),s;if(xe===we&&(te===e?y._tr_align(P):te!==n&&(y._tr_stored_block(P,0,0,!1),te===f&&(ee(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),ie(w),w.avail_out===0))return P.last_flush=-1,s}return te!==t?s:P.wrap<=0?l:(P.wrap===2?(Se(P,w.adler&255),Se(P,w.adler>>8&255),Se(P,w.adler>>16&255),Se(P,w.adler>>24&255),Se(P,w.total_in&255),Se(P,w.total_in>>8&255),Se(P,w.total_in>>16&255),Se(P,w.total_in>>24&255)):(he(P,w.adler>>>16),he(P,w.adler&65535)),ie(w),P.wrap>0&&(P.wrap=-P.wrap),P.pending!==0?s:l)}function M(w){var te;return!w||!w.state?p:(te=w.state.status,te!==Pe&&te!==le&&te!==me&&te!==Ie&&te!==Me&&te!==ve&&te!==Ce?Re(w,p):(w.state=null,te===ve?Re(w,g):s))}function ue(w,te){var G=te.length,P,W,J,Le,ge,xe,Be,Ne;if(!w||!w.state||(P=w.state,Le=P.wrap,Le===2||Le===1&&P.status!==Pe||P.lookahead))return p;for(Le===1&&(w.adler=(0,h.default)(w.adler,te,G,0)),P.wrap=0,G>=P.w_size&&(Le===0&&(ee(P.head),P.strstart=0,P.block_start=0,P.insert=0),Ne=new m.Buf8(P.w_size),m.arraySet(Ne,te,G-P.w_size,P.w_size,0),te=Ne,G=P.w_size),ge=w.avail_in,xe=w.next_in,Be=w.input,w.avail_in=G,w.next_in=0,w.input=te,V(P);P.lookahead>=q;){W=P.strstart,J=P.lookahead-(q-1);do P.ins_h=(P.ins_h<<P.hash_shift^P.window[W+q-1])&P.hash_mask,P.prev[W&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=W,W++;while(--J);P.strstart=W,P.lookahead=q-1,V(P)}return P.strstart+=P.lookahead,P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=q-1,P.match_available=0,w.next_in=xe,w.input=Be,w.avail_in=ge,P.wrap=Le,s}var Fe="pako deflate (from Nodeca project)";D.deflateInfo=Fe},61928:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=m;var c=30,_=12;function m(y,h){var o,u,d,r,i,a,e,f,t,n,s,l,p,g,b,x,E,C,v,S,k,O,R,U,N;o=y.state,u=y.next_in,U=y.input,d=u+(y.avail_in-5),r=y.next_out,N=y.output,i=r-(h-y.avail_out),a=r+(y.avail_out-257),e=o.dmax,f=o.wsize,t=o.whave,n=o.wnext,s=o.window,l=o.hold,p=o.bits,g=o.lencode,b=o.distcode,x=(1<<o.lenbits)-1,E=(1<<o.distbits)-1;e:do{p<15&&(l+=U[u++]<<p,p+=8,l+=U[u++]<<p,p+=8),C=g[l&x];t:for(;;){if(v=C>>>24,l>>>=v,p-=v,v=C>>>16&255,v===0)N[r++]=C&65535;else if(v&16){S=C&65535,v&=15,v&&(p<v&&(l+=U[u++]<<p,p+=8),S+=l&(1<<v)-1,l>>>=v,p-=v),p<15&&(l+=U[u++]<<p,p+=8,l+=U[u++]<<p,p+=8),C=b[l&E];r:for(;;){if(v=C>>>24,l>>>=v,p-=v,v=C>>>16&255,v&16){if(k=C&65535,v&=15,p<v&&(l+=U[u++]<<p,p+=8,p<v&&(l+=U[u++]<<p,p+=8)),k+=l&(1<<v)-1,k>e){y.msg="invalid distance too far back",o.mode=c;break e}if(l>>>=v,p-=v,v=r-i,k>v){if(v=k-v,v>t&&o.sane){y.msg="invalid distance too far back",o.mode=c;break e}if(O=0,R=s,n===0){if(O+=f-v,v<S){S-=v;do N[r++]=s[O++];while(--v);O=r-k,R=N}}else if(n<v){if(O+=f+n-v,v-=n,v<S){S-=v;do N[r++]=s[O++];while(--v);if(O=0,n<S){v=n,S-=v;do N[r++]=s[O++];while(--v);O=r-k,R=N}}}else if(O+=n-v,v<S){S-=v;do N[r++]=s[O++];while(--v);O=r-k,R=N}for(;S>2;)N[r++]=R[O++],N[r++]=R[O++],N[r++]=R[O++],S-=3;S&&(N[r++]=R[O++],S>1&&(N[r++]=R[O++]))}else{O=r-k;do N[r++]=N[O++],N[r++]=N[O++],N[r++]=N[O++],S-=3;while(S>2);S&&(N[r++]=N[O++],S>1&&(N[r++]=N[O++]))}}else if(v&64){y.msg="invalid distance code",o.mode=c;break e}else{C=b[(C&65535)+(l&(1<<v)-1)];continue r}break}}else if(v&64)if(v&32){o.mode=_;break e}else{y.msg="invalid literal/length code",o.mode=c;break e}else{C=g[(C&65535)+(l&(1<<v)-1)];continue t}break}}while(u<d&&r<a);S=p>>3,u-=S,p-=S<<3,l&=(1<<p)-1,y.next_in=u,y.next_out=r,y.avail_in=u<d?5+(d-u):5-(u-d),y.avail_out=r<a?257+(a-r):257-(r-a),o.hold=l,o.bits=p}},47169:function(Te,D,c){"use strict";function _(K){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(M){return typeof M}:_=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},_(K)}Object.defineProperty(D,"__esModule",{value:!0}),D.inflateReset=V,D.inflateReset2=F,D.inflateResetKeep=ce,D.inflateInit=T,D.inflateInit2=H,D.inflate=$,D.inflateEnd=Y,D.inflateGetHeader=se,D.inflateSetDictionary=pe,D.inflateInfo=D.Z_DEFLATED=D.Z_BUF_ERROR=D.Z_MEM_ERROR=D.Z_DATA_ERROR=D.Z_STREAM_ERROR=D.Z_NEED_DICT=D.Z_STREAM_END=D.Z_OK=D.Z_TREES=D.Z_BLOCK=D.Z_FINISH=void 0;var m=i(c(21437)),y=d(c(324)),h=d(c(2895)),o=d(c(61928)),u=d(c(27074));function d(K){return K&&K.__esModule?K:{default:K}}function r(){if(typeof WeakMap!="function")return null;var K=new WeakMap;return r=function(){return K},K}function i(K){if(K&&K.__esModule)return K;if(K===null||_(K)!=="object"&&typeof K!="function")return{default:K};var re=r();if(re&&re.has(K))return re.get(K);var M={},ue=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Fe in K)if(Object.prototype.hasOwnProperty.call(K,Fe)){var w=ue?Object.getOwnPropertyDescriptor(K,Fe):null;w&&(w.get||w.set)?Object.defineProperty(M,Fe,w):M[Fe]=K[Fe]}return M.default=K,re&&re.set(K,M),M}var a=0,e=1,f=2,t=4;D.Z_FINISH=t;var n=5;D.Z_BLOCK=n;var s=6;D.Z_TREES=s;var l=0;D.Z_OK=l;var p=1;D.Z_STREAM_END=p;var g=2;D.Z_NEED_DICT=g;var b=-2;D.Z_STREAM_ERROR=b;var x=-3;D.Z_DATA_ERROR=x;var E=-4;D.Z_MEM_ERROR=E;var C=-5;D.Z_BUF_ERROR=C;var v=8;D.Z_DEFLATED=v;var S=1,k=2,O=3,R=4,U=5,N=6,_e=7,Z=8,oe=9,L=10,X=11,I=12,j=13,B=14,q=15,fe=16,ke=17,Ke=18,Pe=19,le=20,me=21,Ie=22,Me=23,ve=24,Ce=25,ye=26,we=27,De=28,Xe=29,Ee=30,Re=31,Oe=32,ee=852,ie=592,Ae=15,Se=Ae;function he(K){return(K>>>24&255)+(K>>>8&65280)+((K&65280)<<8)+((K&255)<<24)}function ae(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ce(K){var re;return!K||!K.state?b:(re=K.state,K.total_in=K.total_out=re.total=0,K.msg="",re.wrap&&(K.adler=re.wrap&1),re.mode=S,re.last=0,re.havedict=0,re.dmax=32768,re.head=null,re.hold=0,re.bits=0,re.lencode=re.lendyn=new m.Buf32(ee),re.distcode=re.distdyn=new m.Buf32(ie),re.sane=1,re.back=-1,l)}function V(K){var re;return!K||!K.state?b:(re=K.state,re.wsize=0,re.whave=0,re.wnext=0,ce(K))}function F(K,re){var M,ue;return!K||!K.state||(ue=K.state,re<0?(M=0,re=-re):(M=(re>>4)+1,re<48&&(re&=15)),re&&(re<8||re>15))?b:(ue.window!==null&&ue.wbits!==re&&(ue.window=null),ue.wrap=M,ue.wbits=re,V(K))}function H(K,re){var M,ue;return K?(ue=new ae,K.state=ue,ue.window=null,M=F(K,re),M!==l&&(K.state=null),M):b}function T(K){return H(K,Se)}var Q=!0,de,be;function z(K){if(Q){var re;for(de=new m.Buf32(512),be=new m.Buf32(32),re=0;re<144;)K.lens[re++]=8;for(;re<256;)K.lens[re++]=9;for(;re<280;)K.lens[re++]=7;for(;re<288;)K.lens[re++]=8;for((0,u.default)(e,K.lens,0,288,de,0,K.work,{bits:9}),re=0;re<32;)K.lens[re++]=5;(0,u.default)(f,K.lens,0,32,be,0,K.work,{bits:5}),Q=!1}K.lencode=de,K.lenbits=9,K.distcode=be,K.distbits=5}function A(K,re,M,ue){var Fe,w=K.state;return w.window===null&&(w.wsize=1<<w.wbits,w.wnext=0,w.whave=0,w.window=new m.Buf8(w.wsize)),ue>=w.wsize?(m.arraySet(w.window,re,M-w.wsize,w.wsize,0),w.wnext=0,w.whave=w.wsize):(Fe=w.wsize-w.wnext,Fe>ue&&(Fe=ue),m.arraySet(w.window,re,M-ue,Fe,w.wnext),ue-=Fe,ue?(m.arraySet(w.window,re,M-ue,ue,0),w.wnext=ue,w.whave=w.wsize):(w.wnext+=Fe,w.wnext===w.wsize&&(w.wnext=0),w.whave<w.wsize&&(w.whave+=Fe))),0}function $(K,re){var M,ue,Fe,w,te,G,P,W,J,Le,ge,xe,Be,Ne,Ue=0,He,$e,je,Ve,Ye,Ge,ze,qe,Ze=new m.Buf8(4),rt,tt,it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!K||!K.state||!K.output||!K.input&&K.avail_in!==0)return b;M=K.state,M.mode===I&&(M.mode=j),te=K.next_out,Fe=K.output,P=K.avail_out,w=K.next_in,ue=K.input,G=K.avail_in,W=M.hold,J=M.bits,Le=G,ge=P,qe=l;e:for(;;)switch(M.mode){case S:if(M.wrap===0){M.mode=j;break}for(;J<16;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(M.wrap&2&&W===35615){M.check=0,Ze[0]=W&255,Ze[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ze,2,0),W=0,J=0,M.mode=k;break}if(M.flags=0,M.head&&(M.head.done=!1),!(M.wrap&1)||(((W&255)<<8)+(W>>8))%31){K.msg="incorrect header check",M.mode=Ee;break}if((W&15)!==v){K.msg="unknown compression method",M.mode=Ee;break}if(W>>>=4,J-=4,ze=(W&15)+8,M.wbits===0)M.wbits=ze;else if(ze>M.wbits){K.msg="invalid window size",M.mode=Ee;break}M.dmax=1<<ze,K.adler=M.check=1,M.mode=W&512?L:I,W=0,J=0;break;case k:for(;J<16;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(M.flags=W,(M.flags&255)!==v){K.msg="unknown compression method",M.mode=Ee;break}if(M.flags&57344){K.msg="unknown header flags set",M.mode=Ee;break}M.head&&(M.head.text=W>>8&1),M.flags&512&&(Ze[0]=W&255,Ze[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ze,2,0)),W=0,J=0,M.mode=O;case O:for(;J<32;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}M.head&&(M.head.time=W),M.flags&512&&(Ze[0]=W&255,Ze[1]=W>>>8&255,Ze[2]=W>>>16&255,Ze[3]=W>>>24&255,M.check=(0,h.default)(M.check,Ze,4,0)),W=0,J=0,M.mode=R;case R:for(;J<16;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}M.head&&(M.head.xflags=W&255,M.head.os=W>>8),M.flags&512&&(Ze[0]=W&255,Ze[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ze,2,0)),W=0,J=0,M.mode=U;case U:if(M.flags&1024){for(;J<16;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}M.length=W,M.head&&(M.head.extra_len=W),M.flags&512&&(Ze[0]=W&255,Ze[1]=W>>>8&255,M.check=(0,h.default)(M.check,Ze,2,0)),W=0,J=0}else M.head&&(M.head.extra=null);M.mode=N;case N:if(M.flags&1024&&(xe=M.length,xe>G&&(xe=G),xe&&(M.head&&(ze=M.head.extra_len-M.length,M.head.extra||(M.head.extra=new Array(M.head.extra_len)),m.arraySet(M.head.extra,ue,w,xe,ze)),M.flags&512&&(M.check=(0,h.default)(M.check,ue,xe,w)),G-=xe,w+=xe,M.length-=xe),M.length))break e;M.length=0,M.mode=_e;case _e:if(M.flags&2048){if(G===0)break e;xe=0;do ze=ue[w+xe++],M.head&&ze&&M.length<65536&&(M.head.name+=String.fromCharCode(ze));while(ze&&xe<G);if(M.flags&512&&(M.check=(0,h.default)(M.check,ue,xe,w)),G-=xe,w+=xe,ze)break e}else M.head&&(M.head.name=null);M.length=0,M.mode=Z;case Z:if(M.flags&4096){if(G===0)break e;xe=0;do ze=ue[w+xe++],M.head&&ze&&M.length<65536&&(M.head.comment+=String.fromCharCode(ze));while(ze&&xe<G);if(M.flags&512&&(M.check=(0,h.default)(M.check,ue,xe,w)),G-=xe,w+=xe,ze)break e}else M.head&&(M.head.comment=null);M.mode=oe;case oe:if(M.flags&512){for(;J<16;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(W!==(M.check&65535)){K.msg="header crc mismatch",M.mode=Ee;break}W=0,J=0}M.head&&(M.head.hcrc=M.flags>>9&1,M.head.done=!0),K.adler=M.check=0,M.mode=I;break;case L:for(;J<32;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}K.adler=M.check=he(W),W=0,J=0,M.mode=X;case X:if(M.havedict===0)return K.next_out=te,K.avail_out=P,K.next_in=w,K.avail_in=G,M.hold=W,M.bits=J,g;K.adler=M.check=1,M.mode=I;case I:if(re===n||re===s)break e;case j:if(M.last){W>>>=J&7,J-=J&7,M.mode=we;break}for(;J<3;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}switch(M.last=W&1,W>>>=1,J-=1,W&3){case 0:M.mode=B;break;case 1:if(z(M),M.mode=le,re===s){W>>>=2,J-=2;break e}break;case 2:M.mode=ke;break;case 3:K.msg="invalid block type",M.mode=Ee}W>>>=2,J-=2;break;case B:for(W>>>=J&7,J-=J&7;J<32;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if((W&65535)!==(W>>>16^65535)){K.msg="invalid stored block lengths",M.mode=Ee;break}if(M.length=W&65535,W=0,J=0,M.mode=q,re===s)break e;case q:M.mode=fe;case fe:if(xe=M.length,xe){if(xe>G&&(xe=G),xe>P&&(xe=P),xe===0)break e;m.arraySet(Fe,ue,w,xe,te),G-=xe,w+=xe,P-=xe,te+=xe,M.length-=xe;break}M.mode=I;break;case ke:for(;J<14;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(M.nlen=(W&31)+257,W>>>=5,J-=5,M.ndist=(W&31)+1,W>>>=5,J-=5,M.ncode=(W&15)+4,W>>>=4,J-=4,M.nlen>286||M.ndist>30){K.msg="too many length or distance symbols",M.mode=Ee;break}M.have=0,M.mode=Ke;case Ke:for(;M.have<M.ncode;){for(;J<3;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}M.lens[it[M.have++]]=W&7,W>>>=3,J-=3}for(;M.have<19;)M.lens[it[M.have++]]=0;if(M.lencode=M.lendyn,M.lenbits=7,rt={bits:M.lenbits},qe=(0,u.default)(a,M.lens,0,19,M.lencode,0,M.work,rt),M.lenbits=rt.bits,qe){K.msg="invalid code lengths set",M.mode=Ee;break}M.have=0,M.mode=Pe;case Pe:for(;M.have<M.nlen+M.ndist;){for(;Ue=M.lencode[W&(1<<M.lenbits)-1],He=Ue>>>24,$e=Ue>>>16&255,je=Ue&65535,!(He<=J);){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(je<16)W>>>=He,J-=He,M.lens[M.have++]=je;else{if(je===16){for(tt=He+2;J<tt;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(W>>>=He,J-=He,M.have===0){K.msg="invalid bit length repeat",M.mode=Ee;break}ze=M.lens[M.have-1],xe=3+(W&3),W>>>=2,J-=2}else if(je===17){for(tt=He+3;J<tt;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}W>>>=He,J-=He,ze=0,xe=3+(W&7),W>>>=3,J-=3}else{for(tt=He+7;J<tt;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}W>>>=He,J-=He,ze=0,xe=11+(W&127),W>>>=7,J-=7}if(M.have+xe>M.nlen+M.ndist){K.msg="invalid bit length repeat",M.mode=Ee;break}for(;xe--;)M.lens[M.have++]=ze}}if(M.mode===Ee)break;if(M.lens[256]===0){K.msg="invalid code -- missing end-of-block",M.mode=Ee;break}if(M.lenbits=9,rt={bits:M.lenbits},qe=(0,u.default)(e,M.lens,0,M.nlen,M.lencode,0,M.work,rt),M.lenbits=rt.bits,qe){K.msg="invalid literal/lengths set",M.mode=Ee;break}if(M.distbits=6,M.distcode=M.distdyn,rt={bits:M.distbits},qe=(0,u.default)(f,M.lens,M.nlen,M.ndist,M.distcode,0,M.work,rt),M.distbits=rt.bits,qe){K.msg="invalid distances set",M.mode=Ee;break}if(M.mode=le,re===s)break e;case le:M.mode=me;case me:if(G>=6&&P>=258){K.next_out=te,K.avail_out=P,K.next_in=w,K.avail_in=G,M.hold=W,M.bits=J,(0,o.default)(K,ge),te=K.next_out,Fe=K.output,P=K.avail_out,w=K.next_in,ue=K.input,G=K.avail_in,W=M.hold,J=M.bits,M.mode===I&&(M.back=-1);break}for(M.back=0;Ue=M.lencode[W&(1<<M.lenbits)-1],He=Ue>>>24,$e=Ue>>>16&255,je=Ue&65535,!(He<=J);){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if($e&&!($e&240)){for(Ve=He,Ye=$e,Ge=je;Ue=M.lencode[Ge+((W&(1<<Ve+Ye)-1)>>Ve)],He=Ue>>>24,$e=Ue>>>16&255,je=Ue&65535,!(Ve+He<=J);){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}W>>>=Ve,J-=Ve,M.back+=Ve}if(W>>>=He,J-=He,M.back+=He,M.length=je,$e===0){M.mode=ye;break}if($e&32){M.back=-1,M.mode=I;break}if($e&64){K.msg="invalid literal/length code",M.mode=Ee;break}M.extra=$e&15,M.mode=Ie;case Ie:if(M.extra){for(tt=M.extra;J<tt;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}M.length+=W&(1<<M.extra)-1,W>>>=M.extra,J-=M.extra,M.back+=M.extra}M.was=M.length,M.mode=Me;case Me:for(;Ue=M.distcode[W&(1<<M.distbits)-1],He=Ue>>>24,$e=Ue>>>16&255,je=Ue&65535,!(He<=J);){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(!($e&240)){for(Ve=He,Ye=$e,Ge=je;Ue=M.distcode[Ge+((W&(1<<Ve+Ye)-1)>>Ve)],He=Ue>>>24,$e=Ue>>>16&255,je=Ue&65535,!(Ve+He<=J);){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}W>>>=Ve,J-=Ve,M.back+=Ve}if(W>>>=He,J-=He,M.back+=He,$e&64){K.msg="invalid distance code",M.mode=Ee;break}M.offset=je,M.extra=$e&15,M.mode=ve;case ve:if(M.extra){for(tt=M.extra;J<tt;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}M.offset+=W&(1<<M.extra)-1,W>>>=M.extra,J-=M.extra,M.back+=M.extra}if(M.offset>M.dmax){K.msg="invalid distance too far back",M.mode=Ee;break}M.mode=Ce;case Ce:if(P===0)break e;if(xe=ge-P,M.offset>xe){if(xe=M.offset-xe,xe>M.whave&&M.sane){K.msg="invalid distance too far back",M.mode=Ee;break}xe>M.wnext?(xe-=M.wnext,Be=M.wsize-xe):Be=M.wnext-xe,xe>M.length&&(xe=M.length),Ne=M.window}else Ne=Fe,Be=te-M.offset,xe=M.length;xe>P&&(xe=P),P-=xe,M.length-=xe;do Fe[te++]=Ne[Be++];while(--xe);M.length===0&&(M.mode=me);break;case ye:if(P===0)break e;Fe[te++]=M.length,P--,M.mode=me;break;case we:if(M.wrap){for(;J<32;){if(G===0)break e;G--,W|=ue[w++]<<J,J+=8}if(ge-=P,K.total_out+=ge,M.total+=ge,ge&&(K.adler=M.check=M.flags?(0,h.default)(M.check,Fe,ge,te-ge):(0,y.default)(M.check,Fe,ge,te-ge)),ge=P,(M.flags?W:he(W))!==M.check){K.msg="incorrect data check",M.mode=Ee;break}W=0,J=0}M.mode=De;case De:if(M.wrap&&M.flags){for(;J<32;){if(G===0)break e;G--,W+=ue[w++]<<J,J+=8}if(W!==(M.total&4294967295)){K.msg="incorrect length check",M.mode=Ee;break}W=0,J=0}M.mode=Xe;case Xe:qe=p;break e;case Ee:qe=x;break e;case Re:return E;case Oe:default:return b}return K.next_out=te,K.avail_out=P,K.next_in=w,K.avail_in=G,M.hold=W,M.bits=J,(M.wsize||ge!==K.avail_out&&M.mode<Ee&&(M.mode<we||re!==t))&&A(K,K.output,K.next_out,ge-K.avail_out)?(M.mode=Re,E):(Le-=K.avail_in,ge-=K.avail_out,K.total_in+=Le,K.total_out+=ge,M.total+=ge,M.wrap&&ge&&(K.adler=M.check=M.flags?(0,h.default)(M.check,Fe,ge,K.next_out-ge):(0,y.default)(M.check,Fe,ge,K.next_out-ge)),K.data_type=M.bits+(M.last?64:0)+(M.mode===I?128:0)+(M.mode===le||M.mode===q?256:0),(Le===0&&ge===0||re===t)&&qe===l&&(qe=C),qe)}function Y(K){if(!K||!K.state)return b;var re=K.state;return re.window&&(re.window=null),K.state=null,l}function se(K,re){var M;return!K||!K.state||(M=K.state,!(M.wrap&2))?b:(M.head=re,re.done=!1,l)}function pe(K,re){var M=re.length,ue,Fe,w;return!K||!K.state||(ue=K.state,ue.wrap!==0&&ue.mode!==X)?b:ue.mode===X&&(Fe=1,Fe=(0,y.default)(Fe,re,M,0),Fe!==ue.check)?x:(w=A(K,re,M,M),w?(ue.mode=Re,E):(ue.havedict=1,l))}var ne="pako inflate (from Nodeca project)";D.inflateInfo=ne},27074:function(Te,D,c){"use strict";function _(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(g){return typeof g}:_=function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},_(l)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=s;var m=h(c(21437));function y(){if(typeof WeakMap!="function")return null;var l=new WeakMap;return y=function(){return l},l}function h(l){if(l&&l.__esModule)return l;if(l===null||_(l)!=="object"&&typeof l!="function")return{default:l};var p=y();if(p&&p.has(l))return p.get(l);var g={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in l)if(Object.prototype.hasOwnProperty.call(l,x)){var E=b?Object.getOwnPropertyDescriptor(l,x):null;E&&(E.get||E.set)?Object.defineProperty(g,x,E):g[x]=l[x]}return g.default=l,p&&p.set(l,g),g}var o=15,u=852,d=592,r=0,i=1,a=2,e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],t=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function s(l,p,g,b,x,E,C,v){var S=v.bits,k=0,O=0,R=0,U=0,N=0,_e=0,Z=0,oe=0,L=0,X=0,I,j,B,q,fe,ke=null,Ke=0,Pe,le=new m.Buf16(o+1),me=new m.Buf16(o+1),Ie=null,Me=0,ve,Ce,ye;for(k=0;k<=o;k++)le[k]=0;for(O=0;O<b;O++)le[p[g+O]]++;for(N=S,U=o;U>=1&&le[U]===0;U--);if(N>U&&(N=U),U===0)return x[E++]=1<<24|64<<16|0,x[E++]=1<<24|64<<16|0,v.bits=1,0;for(R=1;R<U&&le[R]===0;R++);for(N<R&&(N=R),oe=1,k=1;k<=o;k++)if(oe<<=1,oe-=le[k],oe<0)return-1;if(oe>0&&(l===r||U!==1))return-1;for(me[1]=0,k=1;k<o;k++)me[k+1]=me[k]+le[k];for(O=0;O<b;O++)p[g+O]!==0&&(C[me[p[g+O]]++]=O);if(l===r?(ke=Ie=C,Pe=19):l===i?(ke=e,Ke-=257,Ie=f,Me-=257,Pe=256):(ke=t,Ie=n,Pe=-1),X=0,O=0,k=R,fe=E,_e=N,Z=0,B=-1,L=1<<N,q=L-1,l===i&&L>u||l===a&&L>d)return 1;for(;;){ve=k-Z,C[O]<Pe?(Ce=0,ye=C[O]):C[O]>Pe?(Ce=Ie[Me+C[O]],ye=ke[Ke+C[O]]):(Ce=96,ye=0),I=1<<k-Z,j=1<<_e,R=j;do j-=I,x[fe+(X>>Z)+j]=ve<<24|Ce<<16|ye|0;while(j!==0);for(I=1<<k-1;X&I;)I>>=1;if(I!==0?(X&=I-1,X+=I):X=0,O++,--le[k]===0){if(k===U)break;k=p[g+C[O]]}if(k>N&&(X&q)!==B){for(Z===0&&(Z=N),fe+=R,_e=k-Z,oe=1<<_e;_e+Z<U&&(oe-=le[_e+Z],!(oe<=0));)_e++,oe<<=1;if(L+=1<<_e,l===i&&L>u||l===a&&L>d)return 1;B=X&q,x[B]=N<<24|_e<<16|fe-E|0}}return X!==0&&(x[fe+X]=k-Z<<24|64<<16|0),v.bits=N,0}},41020:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var c={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};D.default=c},4500:function(Te,D,c){"use strict";function _(A){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(Y){return typeof Y}:_=function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},_(A)}Object.defineProperty(D,"__esModule",{value:!0}),D._tr_init=T,D._tr_stored_block=Q,D._tr_flush_block=be,D._tr_tally=z,D._tr_align=de;var m=h(c(21437));function y(){if(typeof WeakMap!="function")return null;var A=new WeakMap;return y=function(){return A},A}function h(A){if(A&&A.__esModule)return A;if(A===null||_(A)!=="object"&&typeof A!="function")return{default:A};var $=y();if($&&$.has(A))return $.get(A);var Y={},se=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pe in A)if(Object.prototype.hasOwnProperty.call(A,pe)){var ne=se?Object.getOwnPropertyDescriptor(A,pe):null;ne&&(ne.get||ne.set)?Object.defineProperty(Y,pe,ne):Y[pe]=A[pe]}return Y.default=A,$&&$.set(A,Y),Y}var o=4,u=0,d=1,r=2;function i(A){for(var $=A.length;--$>=0;)A[$]=0}var a=0,e=1,f=2,t=3,n=258,s=29,l=256,p=l+1+s,g=30,b=19,x=2*p+1,E=15,C=16,v=7,S=256,k=16,O=17,R=18,U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],N=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],oe=512,L=new Array((p+2)*2);i(L);var X=new Array(g*2);i(X);var I=new Array(oe);i(I);var j=new Array(n-t+1);i(j);var B=new Array(s);i(B);var q=new Array(g);i(q);function fe(A,$,Y,se,pe){this.static_tree=A,this.extra_bits=$,this.extra_base=Y,this.elems=se,this.max_length=pe,this.has_stree=A&&A.length}var ke,Ke,Pe;function le(A,$){this.dyn_tree=A,this.max_code=0,this.stat_desc=$}function me(A){return A<256?I[A]:I[256+(A>>>7)]}function Ie(A,$){A.pending_buf[A.pending++]=$&255,A.pending_buf[A.pending++]=$>>>8&255}function Me(A,$,Y){A.bi_valid>C-Y?(A.bi_buf|=$<<A.bi_valid&65535,Ie(A,A.bi_buf),A.bi_buf=$>>C-A.bi_valid,A.bi_valid+=Y-C):(A.bi_buf|=$<<A.bi_valid&65535,A.bi_valid+=Y)}function ve(A,$,Y){Me(A,Y[$*2],Y[$*2+1])}function Ce(A,$){var Y=0;do Y|=A&1,A>>>=1,Y<<=1;while(--$>0);return Y>>>1}function ye(A){A.bi_valid===16?(Ie(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):A.bi_valid>=8&&(A.pending_buf[A.pending++]=A.bi_buf&255,A.bi_buf>>=8,A.bi_valid-=8)}function we(A,$){var Y=$.dyn_tree,se=$.max_code,pe=$.stat_desc.static_tree,ne=$.stat_desc.has_stree,K=$.stat_desc.extra_bits,re=$.stat_desc.extra_base,M=$.stat_desc.max_length,ue,Fe,w,te,G,P,W=0;for(te=0;te<=E;te++)A.bl_count[te]=0;for(Y[A.heap[A.heap_max]*2+1]=0,ue=A.heap_max+1;ue<x;ue++)Fe=A.heap[ue],te=Y[Y[Fe*2+1]*2+1]+1,te>M&&(te=M,W++),Y[Fe*2+1]=te,!(Fe>se)&&(A.bl_count[te]++,G=0,Fe>=re&&(G=K[Fe-re]),P=Y[Fe*2],A.opt_len+=P*(te+G),ne&&(A.static_len+=P*(pe[Fe*2+1]+G)));if(W!==0){do{for(te=M-1;A.bl_count[te]===0;)te--;A.bl_count[te]--,A.bl_count[te+1]+=2,A.bl_count[M]--,W-=2}while(W>0);for(te=M;te!==0;te--)for(Fe=A.bl_count[te];Fe!==0;)w=A.heap[--ue],!(w>se)&&(Y[w*2+1]!==te&&(A.opt_len+=(te-Y[w*2+1])*Y[w*2],Y[w*2+1]=te),Fe--)}}function De(A,$,Y){var se=new Array(E+1),pe=0,ne,K;for(ne=1;ne<=E;ne++)se[ne]=pe=pe+Y[ne-1]<<1;for(K=0;K<=$;K++){var re=A[K*2+1];re!==0&&(A[K*2]=Ce(se[re]++,re))}}function Xe(){var A,$,Y,se,pe,ne=new Array(E+1);for(Y=0,se=0;se<s-1;se++)for(B[se]=Y,A=0;A<1<<U[se];A++)j[Y++]=se;for(j[Y-1]=se,pe=0,se=0;se<16;se++)for(q[se]=pe,A=0;A<1<<N[se];A++)I[pe++]=se;for(pe>>=7;se<g;se++)for(q[se]=pe<<7,A=0;A<1<<N[se]-7;A++)I[256+pe++]=se;for($=0;$<=E;$++)ne[$]=0;for(A=0;A<=143;)L[A*2+1]=8,A++,ne[8]++;for(;A<=255;)L[A*2+1]=9,A++,ne[9]++;for(;A<=279;)L[A*2+1]=7,A++,ne[7]++;for(;A<=287;)L[A*2+1]=8,A++,ne[8]++;for(De(L,p+1,ne),A=0;A<g;A++)X[A*2+1]=5,X[A*2]=Ce(A,5);ke=new fe(L,U,l+1,p,E),Ke=new fe(X,N,0,g,E),Pe=new fe(new Array(0),_e,0,b,v)}function Ee(A){var $;for($=0;$<p;$++)A.dyn_ltree[$*2]=0;for($=0;$<g;$++)A.dyn_dtree[$*2]=0;for($=0;$<b;$++)A.bl_tree[$*2]=0;A.dyn_ltree[S*2]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function Re(A){A.bi_valid>8?Ie(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function Oe(A,$,Y,se){Re(A),se&&(Ie(A,Y),Ie(A,~Y)),m.arraySet(A.pending_buf,A.window,$,Y,A.pending),A.pending+=Y}function ee(A,$,Y,se){var pe=$*2,ne=Y*2;return A[pe]<A[ne]||A[pe]===A[ne]&&se[$]<=se[Y]}function ie(A,$,Y){for(var se=A.heap[Y],pe=Y<<1;pe<=A.heap_len&&(pe<A.heap_len&&ee($,A.heap[pe+1],A.heap[pe],A.depth)&&pe++,!ee($,se,A.heap[pe],A.depth));)A.heap[Y]=A.heap[pe],Y=pe,pe<<=1;A.heap[Y]=se}function Ae(A,$,Y){var se,pe,ne=0,K,re;if(A.last_lit!==0)do se=A.pending_buf[A.d_buf+ne*2]<<8|A.pending_buf[A.d_buf+ne*2+1],pe=A.pending_buf[A.l_buf+ne],ne++,se===0?ve(A,pe,$):(K=j[pe],ve(A,K+l+1,$),re=U[K],re!==0&&(pe-=B[K],Me(A,pe,re)),se--,K=me(se),ve(A,K,Y),re=N[K],re!==0&&(se-=q[K],Me(A,se,re)));while(ne<A.last_lit);ve(A,S,$)}function Se(A,$){var Y=$.dyn_tree,se=$.stat_desc.static_tree,pe=$.stat_desc.has_stree,ne=$.stat_desc.elems,K,re,M=-1,ue;for(A.heap_len=0,A.heap_max=x,K=0;K<ne;K++)Y[K*2]!==0?(A.heap[++A.heap_len]=M=K,A.depth[K]=0):Y[K*2+1]=0;for(;A.heap_len<2;)ue=A.heap[++A.heap_len]=M<2?++M:0,Y[ue*2]=1,A.depth[ue]=0,A.opt_len--,pe&&(A.static_len-=se[ue*2+1]);for($.max_code=M,K=A.heap_len>>1;K>=1;K--)ie(A,Y,K);ue=ne;do K=A.heap[1],A.heap[1]=A.heap[A.heap_len--],ie(A,Y,1),re=A.heap[1],A.heap[--A.heap_max]=K,A.heap[--A.heap_max]=re,Y[ue*2]=Y[K*2]+Y[re*2],A.depth[ue]=(A.depth[K]>=A.depth[re]?A.depth[K]:A.depth[re])+1,Y[K*2+1]=Y[re*2+1]=ue,A.heap[1]=ue++,ie(A,Y,1);while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],we(A,$),De(Y,M,A.bl_count)}function he(A,$,Y){var se,pe=-1,ne,K=$[0*2+1],re=0,M=7,ue=4;for(K===0&&(M=138,ue=3),$[(Y+1)*2+1]=65535,se=0;se<=Y;se++)ne=K,K=$[(se+1)*2+1],!(++re<M&&ne===K)&&(re<ue?A.bl_tree[ne*2]+=re:ne!==0?(ne!==pe&&A.bl_tree[ne*2]++,A.bl_tree[k*2]++):re<=10?A.bl_tree[O*2]++:A.bl_tree[R*2]++,re=0,pe=ne,K===0?(M=138,ue=3):ne===K?(M=6,ue=3):(M=7,ue=4))}function ae(A,$,Y){var se,pe=-1,ne,K=$[0*2+1],re=0,M=7,ue=4;for(K===0&&(M=138,ue=3),se=0;se<=Y;se++)if(ne=K,K=$[(se+1)*2+1],!(++re<M&&ne===K)){if(re<ue)do ve(A,ne,A.bl_tree);while(--re!==0);else ne!==0?(ne!==pe&&(ve(A,ne,A.bl_tree),re--),ve(A,k,A.bl_tree),Me(A,re-3,2)):re<=10?(ve(A,O,A.bl_tree),Me(A,re-3,3)):(ve(A,R,A.bl_tree),Me(A,re-11,7));re=0,pe=ne,K===0?(M=138,ue=3):ne===K?(M=6,ue=3):(M=7,ue=4)}}function ce(A){var $;for(he(A,A.dyn_ltree,A.l_desc.max_code),he(A,A.dyn_dtree,A.d_desc.max_code),Se(A,A.bl_desc),$=b-1;$>=3&&A.bl_tree[Z[$]*2+1]===0;$--);return A.opt_len+=3*($+1)+5+5+4,$}function V(A,$,Y,se){var pe;for(Me(A,$-257,5),Me(A,Y-1,5),Me(A,se-4,4),pe=0;pe<se;pe++)Me(A,A.bl_tree[Z[pe]*2+1],3);ae(A,A.dyn_ltree,$-1),ae(A,A.dyn_dtree,Y-1)}function F(A){var $=4093624447,Y;for(Y=0;Y<=31;Y++,$>>>=1)if($&1&&A.dyn_ltree[Y*2]!==0)return u;if(A.dyn_ltree[9*2]!==0||A.dyn_ltree[10*2]!==0||A.dyn_ltree[13*2]!==0)return d;for(Y=32;Y<l;Y++)if(A.dyn_ltree[Y*2]!==0)return d;return u}var H=!1;function T(A){H||(Xe(),H=!0),A.l_desc=new le(A.dyn_ltree,ke),A.d_desc=new le(A.dyn_dtree,Ke),A.bl_desc=new le(A.bl_tree,Pe),A.bi_buf=0,A.bi_valid=0,Ee(A)}function Q(A,$,Y,se){Me(A,(a<<1)+(se?1:0),3),Oe(A,$,Y,!0)}function de(A){Me(A,e<<1,3),ve(A,S,L),ye(A)}function be(A,$,Y,se){var pe,ne,K=0;A.level>0?(A.strm.data_type===r&&(A.strm.data_type=F(A)),Se(A,A.l_desc),Se(A,A.d_desc),K=ce(A),pe=A.opt_len+3+7>>>3,ne=A.static_len+3+7>>>3,ne<=pe&&(pe=ne)):pe=ne=Y+5,Y+4<=pe&&$!==-1?Q(A,$,Y,se):A.strategy===o||ne===pe?(Me(A,(e<<1)+(se?1:0),3),Ae(A,L,X)):(Me(A,(f<<1)+(se?1:0),3),V(A,A.l_desc.max_code+1,A.d_desc.max_code+1,K+1),Ae(A,A.dyn_ltree,A.dyn_dtree)),Ee(A),se&&Re(A)}function z(A,$,Y){return A.pending_buf[A.d_buf+A.last_lit*2]=$>>>8&255,A.pending_buf[A.d_buf+A.last_lit*2+1]=$&255,A.pending_buf[A.l_buf+A.last_lit]=Y&255,A.last_lit++,$===0?A.dyn_ltree[Y*2]++:(A.matches++,$--,A.dyn_ltree[(j[Y]+l+1)*2]++,A.dyn_dtree[me($)*2]++),A.last_lit===A.lit_bufsize-1}},696:function(Te,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=c;function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},53707:function(Te,D,c){"use strict";function _(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(t){return typeof t}:_=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(e)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var m=h(c(37095));function y(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return y=function(){return e},e}function h(e){if(e&&e.__esModule)return e;if(e===null||_(e)!=="object"&&typeof e!="function")return{default:e};var f=y();if(f&&f.has(e))return f.get(e);var t={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var l=n?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(t,s,l):t[s]=e[s]}return t.default=e,f&&f.set(e,t),t}function o(e,f){if(!(e instanceof f))throw new TypeError("Cannot call a class as a function")}function u(e,f){for(var t=0;t<f.length;t++){var n=f[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,f,t){return f&&u(e.prototype,f),t&&u(e,t),e}var r=!1,i=40*1024*1024,a=function(){function e(){o(this,e),this._websocket=null,this._rQi=0,this._rQlen=0,this._rQbufferSize=1024*1024*4,this._rQ=null,this._sQbufferSize=1024*10,this._sQlen=0,this._sQ=null,this._eventHandlers={message:function(){},open:function(){},close:function(){},error:function(){}}}return d(e,[{key:"rQpeek8",value:function(){return this._rQ[this._rQi]}},{key:"rQskipBytes",value:function(t){this._rQi+=t}},{key:"rQshift8",value:function(){return this._rQshift(1)}},{key:"rQshift16",value:function(){return this._rQshift(2)}},{key:"rQshift32",value:function(){return this._rQshift(4)}},{key:"_rQshift",value:function(t){for(var n=0,s=t-1;s>=0;s--)n+=this._rQ[this._rQi++]<<s*8;return n}},{key:"rQshiftStr",value:function(t){typeof t=="undefined"&&(t=this.rQlen);for(var n="",s=0;s<t;s+=4096){var l=this.rQshiftBytes(Math.min(4096,t-s));n+=String.fromCharCode.apply(null,l)}return n}},{key:"rQshiftBytes",value:function(t){return typeof t=="undefined"&&(t=this.rQlen),this._rQi+=t,new Uint8Array(this._rQ.buffer,this._rQi-t,t)}},{key:"rQshiftTo",value:function(t,n){n===void 0&&(n=this.rQlen),t.set(new Uint8Array(this._rQ.buffer,this._rQi,n)),this._rQi+=n}},{key:"rQslice",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+t,n-t)}},{key:"rQwait",value:function(t,n,s){if(this.rQlen<n){if(s){if(this._rQi<s)throw new Error("rQwait cannot backup "+s+" bytes");this._rQi-=s}return!0}return!1}},{key:"flush",value:function(){this._sQlen>0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(t){this._sQ.set(t,this._sQlen),this._sQlen+=t.length,this.flush()}},{key:"sendString",value:function(t){this.send(t.split("").map(function(n){return n.charCodeAt(0)}))}},{key:"off",value:function(t){this._eventHandlers[t]=function(){}}},{key:"on",value:function(t,n){this._eventHandlers[t]=n}},{key:"_allocateBuffers",value:function(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}},{key:"init",value:function(){this._allocateBuffers(),this._rQi=0,this._websocket=null}},{key:"open",value:function(t,n){var s=this;this.init(),this._websocket=new WebSocket(t,n),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){m.Debug(">> WebSock.onopen"),s._websocket.protocol&&m.Info("Server choose sub-protocol: "+s._websocket.protocol),s._eventHandlers.open(),m.Debug("<< WebSock.onopen")},this._websocket.onclose=function(l){m.Debug(">> WebSock.onclose"),s._eventHandlers.close(l),m.Debug("<< WebSock.onclose")},this._websocket.onerror=function(l){m.Debug(">> WebSock.onerror: "+l),s._eventHandlers.error(l),m.Debug("<< WebSock.onerror: "+l)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(m.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(){})}},{key:"_encodeMessage",value:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}},{key:"_expandCompactRQ",value:function(t){var n=(this._rQlen-this._rQi+t)*8,s=this._rQbufferSize<n;if(s&&(this._rQbufferSize=Math.max(this._rQbufferSize*2,n)),this._rQbufferSize>i&&(this._rQbufferSize=i,this._rQbufferSize-this.rQlen<t))throw new Error("Receive Queue buffer exceeded "+i+" bytes, and the new message could not fit");if(s){var l=this._rQ.buffer;this._rQ=new Uint8Array(this._rQbufferSize),this._rQ.set(new Uint8Array(l,this._rQi,this._rQlen-this._rQi))}else r?this._rQ.copyWithin(0,this._rQi,this._rQlen):this._rQ.set(new Uint8Array(this._rQ.buffer,this._rQi,this._rQlen-this._rQi));this._rQlen=this._rQlen-this._rQi,this._rQi=0}},{key:"_DecodeMessage",value:function(t){var n=new Uint8Array(t);n.length>this._rQbufferSize-this._rQlen&&this._expandCompactRQ(n.length),this._rQ.set(n,this._rQlen),this._rQlen+=n.length}},{key:"_recvMessage",value:function(t){this._DecodeMessage(t.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):m.Debug("Ignoring empty message")}},{key:"sQ",get:function(){return this._sQ}},{key:"rQ",get:function(){return this._rQ}},{key:"rQi",get:function(){return this._rQi},set:function(t){this._rQi=t}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),e}();D.default=a},67656:function(Te,D,c){"use strict";c.r(D),c.d(D,{BaseInput:function(){return a},default:function(){return b}});var _=c(87462),m=c(1413),y=c(4942),h=c(71002),o=c(94184),u=c.n(o),d=c(67294),r=c(87887),i=function(E){var C,v,S=E.inputElement,k=E.prefixCls,O=E.prefix,R=E.suffix,U=E.addonBefore,N=E.addonAfter,_e=E.className,Z=E.style,oe=E.disabled,L=E.readOnly,X=E.focused,I=E.triggerFocus,j=E.allowClear,B=E.value,q=E.handleReset,fe=E.hidden,ke=E.classes,Ke=E.classNames,Pe=E.dataAttrs,le=E.styles,me=E.components,Ie=(me==null?void 0:me.affixWrapper)||"span",Me=(me==null?void 0:me.groupWrapper)||"span",ve=(me==null?void 0:me.wrapper)||"span",Ce=(me==null?void 0:me.groupAddon)||"span",ye=(0,d.useRef)(null),we=function(ce){var V;(V=ye.current)!==null&&V!==void 0&&V.contains(ce.target)&&(I==null||I())},De=function(){var ce;if(!j)return null;var V=!oe&&!L&&B,F="".concat(k,"-clear-icon"),H=(0,h.Z)(j)==="object"&&j!==null&&j!==void 0&&j.clearIcon?j.clearIcon:"\u2716";return d.createElement("span",{onClick:q,onMouseDown:function(Q){return Q.preventDefault()},className:u()(F,(ce={},(0,y.Z)(ce,"".concat(F,"-hidden"),!V),(0,y.Z)(ce,"".concat(F,"-has-suffix"),!!R),ce)),role:"button",tabIndex:-1},H)},Xe=(0,d.cloneElement)(S,{value:B,hidden:fe,className:u()((C=S.props)===null||C===void 0?void 0:C.className,!(0,r.X3)(E)&&!(0,r.He)(E)&&_e)||null,style:(0,m.Z)((0,m.Z)({},(v=S.props)===null||v===void 0?void 0:v.style),!(0,r.X3)(E)&&!(0,r.He)(E)?Z:{})});if((0,r.X3)(E)){var Ee,Re="".concat(k,"-affix-wrapper"),Oe=u()(Re,(Ee={},(0,y.Z)(Ee,"".concat(Re,"-disabled"),oe),(0,y.Z)(Ee,"".concat(Re,"-focused"),X),(0,y.Z)(Ee,"".concat(Re,"-readonly"),L),(0,y.Z)(Ee,"".concat(Re,"-input-with-clear-btn"),R&&j&&B),Ee),!(0,r.He)(E)&&_e,ke==null?void 0:ke.affixWrapper,Ke==null?void 0:Ke.affixWrapper),ee=(R||j)&&d.createElement("span",{className:u()("".concat(k,"-suffix"),Ke==null?void 0:Ke.suffix),style:le==null?void 0:le.suffix},De(),R);Xe=d.createElement(Ie,(0,_.Z)({className:Oe,style:(0,m.Z)((0,m.Z)({},(0,r.He)(E)?void 0:Z),le==null?void 0:le.affixWrapper),hidden:!(0,r.He)(E)&&fe,onClick:we},Pe==null?void 0:Pe.affixWrapper,{ref:ye}),O&&d.createElement("span",{className:u()("".concat(k,"-prefix"),Ke==null?void 0:Ke.prefix),style:le==null?void 0:le.prefix},O),(0,d.cloneElement)(S,{value:B,hidden:null}),ee)}if((0,r.He)(E)){var ie="".concat(k,"-group"),Ae="".concat(ie,"-addon"),Se=u()("".concat(k,"-wrapper"),ie,ke==null?void 0:ke.wrapper),he=u()("".concat(k,"-group-wrapper"),_e,ke==null?void 0:ke.group);return d.createElement(Me,{className:he,style:Z,hidden:fe},d.createElement(ve,{className:Se},U&&d.createElement(Ce,{className:Ae},U),(0,d.cloneElement)(Xe,{hidden:null}),N&&d.createElement(Ce,{className:Ae},N)))}return Xe},a=i,e=c(74902),f=c(97685),t=c(45987),n=c(21770),s=c(98423),l=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],p=(0,d.forwardRef)(function(x,E){var C=x.autoComplete,v=x.onChange,S=x.onFocus,k=x.onBlur,O=x.onPressEnter,R=x.onKeyDown,U=x.prefixCls,N=U===void 0?"rc-input":U,_e=x.disabled,Z=x.htmlSize,oe=x.className,L=x.maxLength,X=x.suffix,I=x.showCount,j=x.type,B=j===void 0?"text":j,q=x.classes,fe=x.classNames,ke=x.styles,Ke=(0,t.Z)(x,l),Pe=(0,n.Z)(x.defaultValue,{value:x.value}),le=(0,f.Z)(Pe,2),me=le[0],Ie=le[1],Me=(0,d.useState)(!1),ve=(0,f.Z)(Me,2),Ce=ve[0],ye=ve[1],we=(0,d.useRef)(null),De=function(he){we.current&&(0,r.nH)(we.current,he)};(0,d.useImperativeHandle)(E,function(){return{focus:De,blur:function(){var he;(he=we.current)===null||he===void 0||he.blur()},setSelectionRange:function(he,ae,ce){var V;(V=we.current)===null||V===void 0||V.setSelectionRange(he,ae,ce)},select:function(){var he;(he=we.current)===null||he===void 0||he.select()},input:we.current}}),(0,d.useEffect)(function(){ye(function(Se){return Se&&_e?!1:Se})},[_e]);var Xe=function(he){x.value===void 0&&Ie(he.target.value),we.current&&(0,r.rJ)(we.current,he,v)},Ee=function(he){O&&he.key==="Enter"&&O(he),R==null||R(he)},Re=function(he){ye(!0),S==null||S(he)},Oe=function(he){ye(!1),k==null||k(he)},ee=function(he){Ie(""),De(),we.current&&(0,r.rJ)(we.current,he,v)},ie=function(){var he=(0,s.Z)(x,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return d.createElement("input",(0,_.Z)({autoComplete:C},he,{onChange:Xe,onFocus:Re,onBlur:Oe,onKeyDown:Ee,className:u()(N,(0,y.Z)({},"".concat(N,"-disabled"),_e),fe==null?void 0:fe.input),style:ke==null?void 0:ke.input,ref:we,size:Z,type:B}))},Ae=function(){var he=Number(L)>0;if(X||I){var ae=(0,r.D7)(me),ce=(0,e.Z)(ae).length,V=(0,h.Z)(I)==="object"?I.formatter({value:ae,count:ce,maxLength:L}):"".concat(ce).concat(he?" / ".concat(L):"");return d.createElement(d.Fragment,null,!!I&&d.createElement("span",{className:u()("".concat(N,"-show-count-suffix"),(0,y.Z)({},"".concat(N,"-show-count-has-suffix"),!!X),fe==null?void 0:fe.count),style:(0,m.Z)({},ke==null?void 0:ke.count)},V),X)}return null};return d.createElement(a,(0,_.Z)({},Ke,{prefixCls:N,className:oe,inputElement:ie(),handleReset:ee,value:(0,r.D7)(me),focused:Ce,triggerFocus:De,suffix:Ae(),disabled:_e,classes:q,classNames:fe,styles:ke}))}),g=p,b=g},87887:function(Te,D,c){"use strict";c.d(D,{D7:function(){return o},He:function(){return _},X3:function(){return m},nH:function(){return h},rJ:function(){return y}});function _(u){return!!(u.addonBefore||u.addonAfter)}function m(u){return!!(u.prefix||u.suffix||u.allowClear)}function y(u,d,r,i){if(r){var a=d;if(d.type==="click"){var e=u.cloneNode(!0);a=Object.create(d,{target:{value:e},currentTarget:{value:e}}),e.value="",r(a);return}if(i!==void 0){a=Object.create(d,{target:{value:u},currentTarget:{value:u}}),u.value=i,r(a);return}r(a)}}function h(u,d){if(u){u.focus(d);var r=d||{},i=r.cursor;if(i){var a=u.value.length;switch(i){case"start":u.setSelectionRange(0,0);break;case"end":u.setSelectionRange(a,a);break;default:u.setSelectionRange(0,a)}}}}function o(u){return typeof u=="undefined"||u===null?"":String(u)}},66680:function(Te,D,c){"use strict";c.d(D,{Z:function(){return m}});var _=c(67294);function m(y){var h=_.useRef();h.current=y;var o=_.useCallback(function(){for(var u,d=arguments.length,r=new Array(d),i=0;i<d;i++)r[i]=arguments[i];return(u=h.current)===null||u===void 0?void 0:u.call.apply(u,[h].concat(r))},[]);return o}},21770:function(Te,D,c){"use strict";c.d(D,{Z:function(){return u}});var _=c(97685),m=c(66680),y=c(8410),h=c(63896);function o(d){return d!==void 0}function u(d,r){var i=r||{},a=i.defaultValue,e=i.value,f=i.onChange,t=i.postState,n=(0,h.Z)(function(){return o(e)?e:o(a)?typeof a=="function"?a():a:typeof d=="function"?d():d}),s=(0,_.Z)(n,2),l=s[0],p=s[1],g=e!==void 0?e:l,b=t?t(g):g,x=(0,m.Z)(f),E=(0,h.Z)([g]),C=(0,_.Z)(E,2),v=C[0],S=C[1];(0,y.o)(function(){var O=v[0];l!==O&&x(l,O)},[v]),(0,y.o)(function(){o(e)||p(e)},[e]);var k=(0,m.Z)(function(O,R){p(O,R),S([g],R)});return[b,k]}},98423:function(Te,D,c){"use strict";c.d(D,{Z:function(){return m}});var _=c(1413);function m(y,h){var o=(0,_.Z)({},y);return Array.isArray(h)&&h.forEach(function(u){delete o[u]}),o}},12320:function(Te){(function(D,c){if(1)Te.exports=c();else var _,m})(window,function(){return function(D){var c={};function _(m){if(c[m])return c[m].exports;var y=c[m]={i:m,l:!1,exports:{}};return D[m].call(y.exports,y,y.exports,_),y.l=!0,y.exports}return _.m=D,_.c=c,_.d=function(m,y,h){_.o(m,y)||Object.defineProperty(m,y,{enumerable:!0,get:h})},_.r=function(m){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},_.t=function(m,y){if(1&y&&(m=_(m)),8&y||4&y&&typeof m=="object"&&m&&m.__esModule)return m;var h=Object.create(null);if(_.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:m}),2&y&&typeof m!="string")for(var o in m)_.d(h,o,function(u){return m[u]}.bind(null,o));return h},_.n=function(m){var y=m&&m.__esModule?function(){return m.default}:function(){return m};return _.d(y,"a",y),y},_.o=function(m,y){return Object.prototype.hasOwnProperty.call(m,y)},_.p="",_(_.s=34)}([function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.forwardEvent=c.EventEmitter=void 0;var m=function(){function y(){this._listeners=[],this._disposed=!1}return Object.defineProperty(y.prototype,"event",{get:function(){var h=this;return this._event||(this._event=function(o){return h._listeners.push(o),{dispose:function(){if(!h._disposed){for(var u=0;u<h._listeners.length;u++)if(h._listeners[u]===o)return void h._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),y.prototype.fire=function(h,o){for(var u=[],d=0;d<this._listeners.length;d++)u.push(this._listeners[d]);for(d=0;d<u.length;d++)u[d].call(void 0,h,o)},y.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},y}();c.EventEmitter=m,c.forwardEvent=function(y,h){return y(function(o){return h.fire(o)})}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.IUnicodeService=c.IOptionsService=c.ILogService=c.IInstantiationService=c.IDirtyRowService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;var m=_(14);c.IBufferService=m.createDecorator("BufferService"),c.ICoreMouseService=m.createDecorator("CoreMouseService"),c.ICoreService=m.createDecorator("CoreService"),c.ICharsetService=m.createDecorator("CharsetService"),c.IDirtyRowService=m.createDecorator("DirtyRowService"),c.IInstantiationService=m.createDecorator("InstantiationService"),c.ILogService=m.createDecorator("LogService"),c.IOptionsService=m.createDecorator("OptionsService"),c.IUnicodeService=m.createDecorator("UnicodeService")},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.Disposable=void 0;var m=function(){function h(){this._disposables=[],this._isDisposed=!1}return h.prototype.dispose=function(){this._isDisposed=!0;for(var o=0,u=this._disposables;o<u.length;o++)u[o].dispose();this._disposables.length=0},h.prototype.register=function(o){return this._disposables.push(o),o},h.prototype.unregister=function(o){var u=this._disposables.indexOf(o);u!==-1&&this._disposables.splice(u,1)},h}();function y(h){for(var o=0,u=h;o<u.length;o++)u[o].dispose();h.length=0}c.Disposable=m,c.disposeArray=y,c.getDisposeArrayDisposable=function(h){return{dispose:function(){return y(h)}}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=256,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(r,i){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,e){a.__proto__=e}||function(a,e){for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])})(r,i)},function(r,i){function a(){this.constructor=r}m(r,i),r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)});Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;var h=_(8),o=_(3),u=_(6),d=function(r){function i(){var a=r!==null&&r.apply(this,arguments)||this;return a.content=0,a.fg=0,a.bg=0,a.extended=new u.ExtendedAttrs,a.combinedData="",a}return y(i,r),i.fromCharData=function(a){var e=new i;return e.setFromCharData(a),e},i.prototype.isCombined=function(){return 2097152&this.content},i.prototype.getWidth=function(){return this.content>>22},i.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?h.stringFromCodePoint(2097151&this.content):""},i.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},i.prototype.setFromCharData=function(a){this.fg=a[o.CHAR_DATA_ATTR_INDEX],this.bg=0;var e=!1;if(a[o.CHAR_DATA_CHAR_INDEX].length>2)e=!0;else if(a[o.CHAR_DATA_CHAR_INDEX].length===2){var f=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=f&&f<=56319){var t=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=t&&t<=57343?this.content=1024*(f-55296)+t-56320+65536|a[o.CHAR_DATA_WIDTH_INDEX]<<22:e=!0}else e=!0}else this.content=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[o.CHAR_DATA_WIDTH_INDEX]<<22;e&&(this.combinedData=a[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|a[o.CHAR_DATA_WIDTH_INDEX]<<22)},i.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},i}(u.AttributeData);c.CellData=d},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ISoundService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;var m=_(14);c.ICharSizeService=m.createDecorator("CharSizeService"),c.ICoreBrowserService=m.createDecorator("CoreBrowserService"),c.IMouseService=m.createDecorator("MouseService"),c.IRenderService=m.createDecorator("RenderService"),c.ISelectionService=m.createDecorator("SelectionService"),c.ISoundService=m.createDecorator("SoundService")},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;var m=function(){function h(){this.fg=0,this.bg=0,this.extended=new y}return h.toColorRGB=function(o){return[o>>>16&255,o>>>8&255,255&o]},h.fromColorRGB=function(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]},h.prototype.clone=function(){var o=new h;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o},h.prototype.isInverse=function(){return 67108864&this.fg},h.prototype.isBold=function(){return 134217728&this.fg},h.prototype.isUnderline=function(){return 268435456&this.fg},h.prototype.isBlink=function(){return 536870912&this.fg},h.prototype.isInvisible=function(){return 1073741824&this.fg},h.prototype.isItalic=function(){return 67108864&this.bg},h.prototype.isDim=function(){return 134217728&this.bg},h.prototype.getFgColorMode=function(){return 50331648&this.fg},h.prototype.getBgColorMode=function(){return 50331648&this.bg},h.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},h.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},h.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},h.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},h.prototype.isFgDefault=function(){return(50331648&this.fg)==0},h.prototype.isBgDefault=function(){return(50331648&this.bg)==0},h.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},h.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},h.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},h.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},h.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},h.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()},h.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},h.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},h.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},h.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},h.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},h}();c.AttributeData=m;var y=function(){function h(o,u){o===void 0&&(o=0),u===void 0&&(u=-1),this.underlineStyle=o,this.underlineColor=u}return h.prototype.clone=function(){return new h(this.underlineStyle,this.underlineColor)},h.prototype.isEmpty=function(){return this.underlineStyle===0},h}();c.ExtendedAttrs=y},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(m,y,h,o){m.addEventListener(y,h,o);var u=!1;return{dispose:function(){u||(u=!0,m.removeEventListener(y,h,o))}}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},c.utf32ToString=function(h,o,u){o===void 0&&(o=0),u===void 0&&(u=h.length);for(var d="",r=o;r<u;++r){var i=h[r];i>65535?(i-=65536,d+=String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):d+=String.fromCharCode(i)}return d};var m=function(){function h(){this._interim=0}return h.prototype.clear=function(){this._interim=0},h.prototype.decode=function(o,u){var d=o.length;if(!d)return 0;var r=0,i=0;this._interim&&(56320<=(f=o.charCodeAt(i++))&&f<=57343?u[r++]=1024*(this._interim-55296)+f-56320+65536:(u[r++]=this._interim,u[r++]=f),this._interim=0);for(var a=i;a<d;++a){var e=o.charCodeAt(a);if(55296<=e&&e<=56319){if(++a>=d)return this._interim=e,r;var f;56320<=(f=o.charCodeAt(a))&&f<=57343?u[r++]=1024*(e-55296)+f-56320+65536:(u[r++]=e,u[r++]=f)}else u[r++]=e}return r},h}();c.StringToUtf32=m;var y=function(){function h(){this.interim=new Uint8Array(3)}return h.prototype.clear=function(){this.interim.fill(0)},h.prototype.decode=function(o,u){var d=o.length;if(!d)return 0;var r,i,a,e,f=0,t=0,n=0;if(this.interim[0]){var s=!1,l=this.interim[0];l&=(224&l)==192?31:(240&l)==224?15:7;for(var p=0,g=void 0;(g=63&this.interim[++p])&&p<4;)l<<=6,l|=g;for(var b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=b-p;n<x;){if(n>=d)return 0;if((192&(g=o[n++]))!=128){n--,s=!0;break}this.interim[p++]=g,l<<=6,l|=63&g}s||(b===2?l<128?n--:u[f++]=l:b===3?l<2048||l>=55296&&l<=57343||(u[f++]=l):l<65536||l>1114111||(u[f++]=l)),this.interim.fill(0)}for(var E=d-4,C=n;C<d;){for(;!(!(C<E)||128&(r=o[C])||128&(i=o[C+1])||128&(a=o[C+2])||128&(e=o[C+3]));)u[f++]=r,u[f++]=i,u[f++]=a,u[f++]=e,C+=4;if((r=o[C++])<128)u[f++]=r;else if((224&r)==192){if(C>=d)return this.interim[0]=r,f;if((192&(i=o[C++]))!=128){C--;continue}if((t=(31&r)<<6|63&i)<128){C--;continue}u[f++]=t}else if((240&r)==224){if(C>=d)return this.interim[0]=r,f;if((192&(i=o[C++]))!=128){C--;continue}if(C>=d)return this.interim[0]=r,this.interim[1]=i,f;if((192&(a=o[C++]))!=128){C--;continue}if((t=(15&r)<<12|(63&i)<<6|63&a)<2048||t>=55296&&t<=57343)continue;u[f++]=t}else if((248&r)==240){if(C>=d)return this.interim[0]=r,f;if((192&(i=o[C++]))!=128){C--;continue}if(C>=d)return this.interim[0]=r,this.interim[1]=i,f;if((192&(a=o[C++]))!=128){C--;continue}if(C>=d)return this.interim[0]=r,this.interim[1]=i,this.interim[2]=a,f;if((192&(e=o[C++]))!=128){C--;continue}if((t=(7&r)<<18|(63&i)<<12|(63&a)<<6|63&e)<65536||t>1114111)continue;u[f++]=t}}return f},h}();c.Utf8ToUtf32=y},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CHAR_ATLAS_CELL_SPACING=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0,c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.CHAR_ATLAS_CELL_SPACING=1},function(D,c,_){"use strict";var m,y,h,o;function u(r){var i=r.toString(16);return i.length<2?"0"+i:i}function d(r,i){return r<i?(i+.05)/(r+.05):(r+.05)/(i+.05)}Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=void 0,function(r){r.toCss=function(i,a,e,f){return f!==void 0?"#"+u(i)+u(a)+u(e)+u(f):"#"+u(i)+u(a)+u(e)},r.toRgba=function(i,a,e,f){return f===void 0&&(f=255),(i<<24|a<<16|e<<8|f)>>>0}}(m=c.channels||(c.channels={})),(y=c.color||(c.color={})).blend=function(r,i){var a=(255&i.rgba)/255;if(a===1)return{css:i.css,rgba:i.rgba};var e=i.rgba>>24&255,f=i.rgba>>16&255,t=i.rgba>>8&255,n=r.rgba>>24&255,s=r.rgba>>16&255,l=r.rgba>>8&255,p=n+Math.round((e-n)*a),g=s+Math.round((f-s)*a),b=l+Math.round((t-l)*a);return{css:m.toCss(p,g,b),rgba:m.toRgba(p,g,b)}},y.isOpaque=function(r){return(255&r.rgba)==255},y.ensureContrastRatio=function(r,i,a){var e=o.ensureContrastRatio(r.rgba,i.rgba,a);if(e)return o.toColor(e>>24&255,e>>16&255,e>>8&255)},y.opaque=function(r){var i=(255|r.rgba)>>>0,a=o.toChannels(i),e=a[0],f=a[1],t=a[2];return{css:m.toCss(e,f,t),rgba:i}},y.opacity=function(r,i){var a=Math.round(255*i),e=o.toChannels(r.rgba),f=e[0],t=e[1],n=e[2];return{css:m.toCss(f,t,n,a),rgba:m.toRgba(f,t,n,a)}},(c.css||(c.css={})).toColor=function(r){switch(r.length){case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(r){function i(a,e,f){var t=a/255,n=e/255,s=f/255;return .2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))}r.relativeLuminance=function(a){return i(a>>16&255,a>>8&255,255&a)},r.relativeLuminance2=i}(h=c.rgb||(c.rgb={})),function(r){function i(e,f,t){for(var n=e>>24&255,s=e>>16&255,l=e>>8&255,p=f>>24&255,g=f>>16&255,b=f>>8&255,x=d(h.relativeLuminance2(p,b,g),h.relativeLuminance2(n,s,l));x<t&&(p>0||g>0||b>0);)p-=Math.max(0,Math.ceil(.1*p)),g-=Math.max(0,Math.ceil(.1*g)),b-=Math.max(0,Math.ceil(.1*b)),x=d(h.relativeLuminance2(p,b,g),h.relativeLuminance2(n,s,l));return(p<<24|g<<16|b<<8|255)>>>0}function a(e,f,t){for(var n=e>>24&255,s=e>>16&255,l=e>>8&255,p=f>>24&255,g=f>>16&255,b=f>>8&255,x=d(h.relativeLuminance2(p,b,g),h.relativeLuminance2(n,s,l));x<t&&(p<255||g<255||b<255);)p=Math.min(255,p+Math.ceil(.1*(255-p))),g=Math.min(255,g+Math.ceil(.1*(255-g))),b=Math.min(255,b+Math.ceil(.1*(255-b))),x=d(h.relativeLuminance2(p,b,g),h.relativeLuminance2(n,s,l));return(p<<24|g<<16|b<<8|255)>>>0}r.ensureContrastRatio=function(e,f,t){var n=h.relativeLuminance(e>>8),s=h.relativeLuminance(f>>8);if(d(n,s)<t)return s<n?i(e,f,t):a(e,f,t)},r.reduceLuminance=i,r.increaseLuminance=a,r.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},r.toColor=function(e,f,t){return{css:m.toCss(e,f,t),rgba:m.toRgba(e,f,t)}}}(o=c.rgba||(c.rgba={})),c.toPaddedHex=u,c.contrastRatio=d},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.isSafari=c.isFirefox=void 0;var m=typeof navigator=="undefined",y=m?"node":navigator.userAgent,h=m?"node":navigator.platform;function o(u,d){return u.indexOf(d)>=0}c.isFirefox=!!~y.indexOf("Firefox"),c.isSafari=/^((?!chrome|android).)*safari/i.test(y),c.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],h),c.isIpad=h==="iPad",c.isIphone=h==="iPhone",c.isWindows=o(["Windows","Win16","Win32","WinCE"],h),c.isLinux=h.indexOf("Linux")>=0},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.C1=c.C0=void 0,function(m){m.NUL="\0",m.SOH="",m.STX="",m.ETX="",m.EOT="",m.ENQ="",m.ACK="",m.BEL="\x07",m.BS="\b",m.HT=" ",m.LF=`
`,m.VT="\v",m.FF="\f",m.CR="\r",m.SO="",m.SI="",m.DLE="",m.DC1="",m.DC2="",m.DC3="",m.DC4="",m.NAK="",m.SYN="",m.ETB="",m.CAN="",m.EM="",m.SUB="",m.ESC="\x1B",m.FS="",m.GS="",m.RS="",m.US="",m.SP=" ",m.DEL="\x7F"}(c.C0||(c.C0={})),function(m){m.PAD="\x80",m.HOP="\x81",m.BPH="\x82",m.NBH="\x83",m.IND="\x84",m.NEL="\x85",m.SSA="\x86",m.ESA="\x87",m.HTS="\x88",m.HTJ="\x89",m.VTS="\x8A",m.PLD="\x8B",m.PLU="\x8C",m.RI="\x8D",m.SS2="\x8E",m.SS3="\x8F",m.DCS="\x90",m.PU1="\x91",m.PU2="\x92",m.STS="\x93",m.CCH="\x94",m.MW="\x95",m.SPA="\x96",m.EPA="\x97",m.SOS="\x98",m.SGCI="\x99",m.SCI="\x9A",m.CSI="\x9B",m.ST="\x9C",m.OSC="\x9D",m.PM="\x9E",m.APC="\x9F"}(c.C1||(c.C1={}))},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BaseRenderLayer=void 0;var m=_(3),y=_(9),h=_(25),o=_(6),u=_(28),d=_(10),r=_(17),i=function(){function a(e,f,t,n,s,l,p,g){this._container=e,this._alpha=n,this._colors=s,this._rendererId=l,this._bufferService=p,this._optionsService=g,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-"+f+"-layer"),this._canvas.style.zIndex=t.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return a.prototype.dispose=function(){var e;r.removeElementFromParent(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},a.prototype._initCanvas=function(){this._ctx=u.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},a.prototype.onOptionsChanged=function(){},a.prototype.onBlur=function(){},a.prototype.onFocus=function(){},a.prototype.onCursorMove=function(){},a.prototype.onGridChanged=function(e,f){},a.prototype.onSelectionChanged=function(e,f,t){t===void 0&&(t=!1)},a.prototype.setColors=function(e){this._refreshCharAtlas(e)},a.prototype._setTransparency=function(e){if(e!==this._alpha){var f=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,f),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},a.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=h.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},a.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},a.prototype._fillCells=function(e,f,t,n){this._ctx.fillRect(e*this._scaledCellWidth,f*this._scaledCellHeight,t*this._scaledCellWidth,n*this._scaledCellHeight)},a.prototype._fillBottomLineAtCells=function(e,f,t){t===void 0&&(t=1),this._ctx.fillRect(e*this._scaledCellWidth,(f+1)*this._scaledCellHeight-window.devicePixelRatio-1,t*this._scaledCellWidth,window.devicePixelRatio)},a.prototype._fillLeftLineAtCell=function(e,f,t){this._ctx.fillRect(e*this._scaledCellWidth,f*this._scaledCellHeight,window.devicePixelRatio*t,this._scaledCellHeight)},a.prototype._strokeRectAtCell=function(e,f,t,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,f*this._scaledCellHeight+window.devicePixelRatio/2,t*this._scaledCellWidth-window.devicePixelRatio,n*this._scaledCellHeight-window.devicePixelRatio)},a.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))},a.prototype._clearCells=function(e,f,t,n){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,f*this._scaledCellHeight,t*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,f*this._scaledCellHeight,t*this._scaledCellWidth,n*this._scaledCellHeight))},a.prototype._fillCharTrueColor=function(e,f,t){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(t),this._ctx.fillText(e.getChars(),f*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},a.prototype._drawChars=function(e,f,t){var n,s,l=this._getContrastColor(e);l||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,f,t,l):(e.isInverse()?(n=e.isBgDefault()?y.INVERTED_DEFAULT_COLOR:e.getBgColor(),s=e.isFgDefault()?y.INVERTED_DEFAULT_COLOR:e.getFgColor()):(s=e.isBgDefault()?m.DEFAULT_COLOR:e.getBgColor(),n=e.isFgDefault()?m.DEFAULT_COLOR:e.getFgColor()),n+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&n<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||m.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||m.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=s,this._currentGlyphIdentifier.fg=n,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,f*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,f,t))},a.prototype._drawUncachedChars=function(e,f,t,n){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse())if(n)this._ctx.fillStyle=n.css;else if(e.isBgDefault())this._ctx.fillStyle=d.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var s=e.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&s<8&&(s+=8),this._ctx.fillStyle=this._colors.ansi[s].css}else if(n)this._ctx.fillStyle=n.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var l=e.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}this._clipRow(t),e.isDim()&&(this._ctx.globalAlpha=y.DIM_OPACITY),this._ctx.fillText(e.getChars(),f*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},a.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},a.prototype._getFont=function(e,f){return(f?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},a.prototype._getContrastColor=function(e){if(this._optionsService.options.minimumContrastRatio!==1){var f=this._colors.contrastCache.getColor(e.bg,e.fg);if(f!==void 0)return f||void 0;var t=e.getFgColor(),n=e.getFgColorMode(),s=e.getBgColor(),l=e.getBgColorMode(),p=!!e.isInverse(),g=!!e.isInverse();if(p){var b=t;t=s,s=b;var x=n;n=l,l=x}var E=this._resolveBackgroundRgba(l,s,p),C=this._resolveForegroundRgba(n,t,p,g),v=d.rgba.ensureContrastRatio(E,C,this._optionsService.options.minimumContrastRatio);if(v){var S={css:d.channels.toCss(v>>24&255,v>>16&255,v>>8&255),rgba:v};return this._colors.contrastCache.setColor(e.bg,e.fg,S),S}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},a.prototype._resolveBackgroundRgba=function(e,f,t){switch(e){case 16777216:case 33554432:return this._colors.ansi[f].rgba;case 50331648:return f<<8;case 0:default:return t?this._colors.foreground.rgba:this._colors.background.rgba}},a.prototype._resolveForegroundRgba=function(e,f,t,n){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&n&&f<8&&(f+=8),this._colors.ansi[f].rgba;case 50331648:return f<<8;case 0:default:return t?this._colors.background.rgba:this._colors.foreground.rgba}},a}();c.BaseRenderLayer=i},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0;function m(y,h,o){h.di$target===h?h.di$dependencies.push({id:y,index:o}):(h.di$dependencies=[{id:y,index:o}],h.di$target=h)}c.serviceRegistry=new Map,c.getServiceDependencies=function(y){return y.di$dependencies||[]},c.createDecorator=function(y){if(c.serviceRegistry.has(y))return c.serviceRegistry.get(y);var h=function(o,u,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");m(h,o,d)};return h.toString=function(){return y},c.serviceRegistry.set(y,h),h}},function(D,c,_){"use strict";function m(y,h,o,u){if(o===void 0&&(o=0),u===void 0&&(u=y.length),o>=y.length)return y;o=(y.length+o)%y.length,u=u>=y.length?y.length:(y.length+u)%y.length;for(var d=o;d<u;++d)y[d]=h;return y}Object.defineProperty(c,"__esModule",{value:!0}),c.concat=c.fillFallback=c.fill=void 0,c.fill=function(y,h,o,u){return y.fill?y.fill(h,o,u):m(y,h,o,u)},c.fillFallback=m,c.concat=function(y,h){var o=new y.constructor(y.length+h.length);return o.set(y),o.set(h,y.length),o}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;var m=_(8),y=_(3),h=_(4),o=_(6);c.DEFAULT_ATTR_DATA=Object.freeze(new o.AttributeData);var u=function(){function d(r,i,a){a===void 0&&(a=!1),this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);for(var e=i||h.CellData.fromCharData([0,y.NULL_CELL_CHAR,y.NULL_CELL_WIDTH,y.NULL_CELL_CODE]),f=0;f<r;++f)this.setCell(f,e);this.length=r}return d.prototype.get=function(r){var i=this._data[3*r+0],a=2097151&i;return[this._data[3*r+1],2097152&i?this._combined[r]:a?m.stringFromCodePoint(a):"",i>>22,2097152&i?this._combined[r].charCodeAt(this._combined[r].length-1):a]},d.prototype.set=function(r,i){this._data[3*r+1]=i[y.CHAR_DATA_ATTR_INDEX],i[y.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=i[1],this._data[3*r+0]=2097152|r|i[y.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=i[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|i[y.CHAR_DATA_WIDTH_INDEX]<<22},d.prototype.getWidth=function(r){return this._data[3*r+0]>>22},d.prototype.hasWidth=function(r){return 12582912&this._data[3*r+0]},d.prototype.getFg=function(r){return this._data[3*r+1]},d.prototype.getBg=function(r){return this._data[3*r+2]},d.prototype.hasContent=function(r){return 4194303&this._data[3*r+0]},d.prototype.getCodePoint=function(r){var i=this._data[3*r+0];return 2097152&i?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&i},d.prototype.isCombined=function(r){return 2097152&this._data[3*r+0]},d.prototype.getString=function(r){var i=this._data[3*r+0];return 2097152&i?this._combined[r]:2097151&i?m.stringFromCodePoint(2097151&i):""},d.prototype.loadCell=function(r,i){var a=3*r;return i.content=this._data[a+0],i.fg=this._data[a+1],i.bg=this._data[a+2],2097152&i.content&&(i.combinedData=this._combined[r]),268435456&i.bg&&(i.extended=this._extendedAttrs[r]),i},d.prototype.setCell=function(r,i){2097152&i.content&&(this._combined[r]=i.combinedData),268435456&i.bg&&(this._extendedAttrs[r]=i.extended),this._data[3*r+0]=i.content,this._data[3*r+1]=i.fg,this._data[3*r+2]=i.bg},d.prototype.setCellFromCodePoint=function(r,i,a,e,f,t){268435456&f&&(this._extendedAttrs[r]=t),this._data[3*r+0]=i|a<<22,this._data[3*r+1]=e,this._data[3*r+2]=f},d.prototype.addCodepointToCell=function(r,i){var a=this._data[3*r+0];2097152&a?this._combined[r]+=m.stringFromCodePoint(i):(2097151&a?(this._combined[r]=m.stringFromCodePoint(2097151&a)+m.stringFromCodePoint(i),a&=-2097152,a|=2097152):a=i|1<<22,this._data[3*r+0]=a)},d.prototype.insertCells=function(r,i,a,e){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new o.ExtendedAttrs),i<this.length-r){for(var f=new h.CellData,t=this.length-r-i-1;t>=0;--t)this.setCell(r+i+t,this.loadCell(r+t,f));for(t=0;t<i;++t)this.setCell(r+t,a)}else for(t=r;t<this.length;++t)this.setCell(t,a);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new o.ExtendedAttrs)},d.prototype.deleteCells=function(r,i,a,e){if(r%=this.length,i<this.length-r){for(var f=new h.CellData,t=0;t<this.length-r-i;++t)this.setCell(r+t,this.loadCell(r+i+t,f));for(t=this.length-i;t<this.length;++t)this.setCell(t,a)}else for(t=r;t<this.length;++t)this.setCell(t,a);r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new o.ExtendedAttrs),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodePoint(r,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new o.ExtendedAttrs)},d.prototype.replaceCells=function(r,i,a,e){for(r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new o.ExtendedAttrs),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new o.ExtendedAttrs);r<i&&r<this.length;)this.setCell(r++,a)},d.prototype.resize=function(r,i){if(r!==this.length){if(r>this.length){var a=new Uint32Array(3*r);this.length&&(3*r<this._data.length?a.set(this._data.subarray(0,3*r)):a.set(this._data)),this._data=a;for(var e=this.length;e<r;++e)this.setCell(e,i)}else if(r){(a=new Uint32Array(3*r)).set(this._data.subarray(0,3*r)),this._data=a;var f=Object.keys(this._combined);for(e=0;e<f.length;e++){var t=parseInt(f[e],10);t>=r&&delete this._combined[t]}}else this._data=new Uint32Array(0),this._combined={};this.length=r}},d.prototype.fill=function(r){this._combined={},this._extendedAttrs={};for(var i=0;i<this.length;++i)this.setCell(i,r)},d.prototype.copyFrom=function(r){for(var i in this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={},r._combined)this._combined[i]=r._combined[i];for(var i in this._extendedAttrs={},r._extendedAttrs)this._extendedAttrs[i]=r._extendedAttrs[i];this.isWrapped=r.isWrapped},d.prototype.clone=function(){var r=new d(0);for(var i in r._data=new Uint32Array(this._data),r.length=this.length,this._combined)r._combined[i]=this._combined[i];for(var i in this._extendedAttrs)r._extendedAttrs[i]=this._extendedAttrs[i];return r.isWrapped=this.isWrapped,r},d.prototype.getTrimmedLength=function(){for(var r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0},d.prototype.copyCellsFrom=function(r,i,a,e,f){var t=r._data;if(f)for(var n=e-1;n>=0;n--)for(var s=0;s<3;s++)this._data[3*(a+n)+s]=t[3*(i+n)+s];else for(n=0;n<e;n++)for(s=0;s<3;s++)this._data[3*(a+n)+s]=t[3*(i+n)+s];var l=Object.keys(r._combined);for(s=0;s<l.length;s++){var p=parseInt(l[s],10);p>=i&&(this._combined[p-i+a]=r._combined[p])}},d.prototype.translateToString=function(r,i,a){r===void 0&&(r=!1),i===void 0&&(i=0),a===void 0&&(a=this.length),r&&(a=Math.min(a,this.getTrimmedLength()));for(var e="";i<a;){var f=this._data[3*i+0],t=2097151&f;e+=2097152&f?this._combined[i]:t?m.stringFromCodePoint(t):y.WHITESPACE_CELL_CHAR,i+=f>>22||1}return e},d}();c.BufferLine=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.removeElementFromParent=void 0,c.removeElementFromParent=function(){for(var m,y=[],h=0;h<arguments.length;h++)y[h]=arguments[h];for(var o=0,u=y;o<u.length;o++){var d=u[o];(m=d==null?void 0:d.parentElement)===null||m===void 0||m.removeChild(d)}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(C,v){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,k){S.__proto__=k}||function(S,k){for(var O in k)k.hasOwnProperty(O)&&(S[O]=k[O])})(C,v)},function(C,v){function S(){this.constructor=C}m(C,v),C.prototype=v===null?Object.create(v):(S.prototype=v.prototype,new S)});Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;var h,o=_(12),u=_(20),d=_(39),r=_(2),i=_(15),a=_(8),e=_(16),f=_(0),t=_(3),n=_(4),s=_(6),l=_(22),p=_(24),g={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function b(C,v){if(C>24)return v.setWinLines||!1;switch(C){case 1:return!!v.restoreWin;case 2:return!!v.minimizeWin;case 3:return!!v.setWinPosition;case 4:return!!v.setWinSizePixels;case 5:return!!v.raiseWin;case 6:return!!v.lowerWin;case 7:return!!v.refreshWin;case 8:return!!v.setWinSizeChars;case 9:return!!v.maximizeWin;case 10:return!!v.fullscreenWin;case 11:return!!v.getWinState;case 13:return!!v.getWinPosition;case 14:return!!v.getWinSizePixels;case 15:return!!v.getScreenSizePixels;case 16:return!!v.getCellSizePixels;case 18:return!!v.getWinSizeChars;case 19:return!!v.getScreenSizeChars;case 20:return!!v.getIconTitle;case 21:return!!v.getWinTitle;case 22:return!!v.pushTitle;case 23:return!!v.popTitle;case 24:return!!v.setWinLines}return!1}(function(C){C[C.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",C[C.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(h=c.WindowsOptionsReportType||(c.WindowsOptionsReportType={}));var x=function(){function C(v,S,k,O){this._bufferService=v,this._coreService=S,this._logService=k,this._optionsService=O,this._data=new Uint32Array(0)}return C.prototype.hook=function(v){this._data=new Uint32Array(0)},C.prototype.put=function(v,S,k){this._data=i.concat(this._data,v.subarray(S,k))},C.prototype.unhook=function(v){if(v){var S=a.utf32ToString(this._data);switch(this._data=new Uint32Array(0),S){case'"q':return this._coreService.triggerDataEvent(o.C0.ESC+'P1$r0"q'+o.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(o.C0.ESC+'P1$r61;1"p'+o.C0.ESC+"\\");case"r":var k=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r"+k+o.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r0m"+o.C0.ESC+"\\");case" q":var O={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return O-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(o.C0.ESC+"P1$r"+O+" q"+o.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",S),this._coreService.triggerDataEvent(o.C0.ESC+"P0$r"+o.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},C}(),E=function(C){function v(S,k,O,R,U,N,_e,Z,oe){oe===void 0&&(oe=new d.EscapeSequenceParser);var L=C.call(this)||this;L._bufferService=S,L._charsetService=k,L._coreService=O,L._dirtyRowService=R,L._logService=U,L._optionsService=N,L._coreMouseService=_e,L._unicodeService=Z,L._parser=oe,L._parseBuffer=new Uint32Array(4096),L._stringDecoder=new a.StringToUtf32,L._utf8Decoder=new a.Utf8ToUtf32,L._workCell=new n.CellData,L._windowTitle="",L._iconName="",L._windowTitleStack=[],L._iconNameStack=[],L._curAttrData=e.DEFAULT_ATTR_DATA.clone(),L._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone(),L._onRequestBell=new f.EventEmitter,L._onRequestRefreshRows=new f.EventEmitter,L._onRequestReset=new f.EventEmitter,L._onRequestScroll=new f.EventEmitter,L._onRequestSyncScrollBar=new f.EventEmitter,L._onRequestWindowsOptionsReport=new f.EventEmitter,L._onA11yChar=new f.EventEmitter,L._onA11yTab=new f.EventEmitter,L._onCursorMove=new f.EventEmitter,L._onLineFeed=new f.EventEmitter,L._onScroll=new f.EventEmitter,L._onTitleChange=new f.EventEmitter,L.register(L._parser),L._parser.setCsiHandlerFallback(function(B,q){L._logService.debug("Unknown CSI code: ",{identifier:L._parser.identToString(B),params:q.toArray()})}),L._parser.setEscHandlerFallback(function(B){L._logService.debug("Unknown ESC code: ",{identifier:L._parser.identToString(B)})}),L._parser.setExecuteHandlerFallback(function(B){L._logService.debug("Unknown EXECUTE code: ",{code:B})}),L._parser.setOscHandlerFallback(function(B,q,fe){L._logService.debug("Unknown OSC code: ",{identifier:B,action:q,data:fe})}),L._parser.setDcsHandlerFallback(function(B,q,fe){q==="HOOK"&&(fe=fe.toArray()),L._logService.debug("Unknown DCS code: ",{identifier:L._parser.identToString(B),action:q,payload:fe})}),L._parser.setPrintHandler(function(B,q,fe){return L.print(B,q,fe)}),L._parser.setCsiHandler({final:"@"},function(B){return L.insertChars(B)}),L._parser.setCsiHandler({intermediates:" ",final:"@"},function(B){return L.scrollLeft(B)}),L._parser.setCsiHandler({final:"A"},function(B){return L.cursorUp(B)}),L._parser.setCsiHandler({intermediates:" ",final:"A"},function(B){return L.scrollRight(B)}),L._parser.setCsiHandler({final:"B"},function(B){return L.cursorDown(B)}),L._parser.setCsiHandler({final:"C"},function(B){return L.cursorForward(B)}),L._parser.setCsiHandler({final:"D"},function(B){return L.cursorBackward(B)}),L._parser.setCsiHandler({final:"E"},function(B){return L.cursorNextLine(B)}),L._parser.setCsiHandler({final:"F"},function(B){return L.cursorPrecedingLine(B)}),L._parser.setCsiHandler({final:"G"},function(B){return L.cursorCharAbsolute(B)}),L._parser.setCsiHandler({final:"H"},function(B){return L.cursorPosition(B)}),L._parser.setCsiHandler({final:"I"},function(B){return L.cursorForwardTab(B)}),L._parser.setCsiHandler({final:"J"},function(B){return L.eraseInDisplay(B)}),L._parser.setCsiHandler({prefix:"?",final:"J"},function(B){return L.eraseInDisplay(B)}),L._parser.setCsiHandler({final:"K"},function(B){return L.eraseInLine(B)}),L._parser.setCsiHandler({prefix:"?",final:"K"},function(B){return L.eraseInLine(B)}),L._parser.setCsiHandler({final:"L"},function(B){return L.insertLines(B)}),L._parser.setCsiHandler({final:"M"},function(B){return L.deleteLines(B)}),L._parser.setCsiHandler({final:"P"},function(B){return L.deleteChars(B)}),L._parser.setCsiHandler({final:"S"},function(B){return L.scrollUp(B)}),L._parser.setCsiHandler({final:"T"},function(B){return L.scrollDown(B)}),L._parser.setCsiHandler({final:"X"},function(B){return L.eraseChars(B)}),L._parser.setCsiHandler({final:"Z"},function(B){return L.cursorBackwardTab(B)}),L._parser.setCsiHandler({final:"`"},function(B){return L.charPosAbsolute(B)}),L._parser.setCsiHandler({final:"a"},function(B){return L.hPositionRelative(B)}),L._parser.setCsiHandler({final:"b"},function(B){return L.repeatPrecedingCharacter(B)}),L._parser.setCsiHandler({final:"c"},function(B){return L.sendDeviceAttributesPrimary(B)}),L._parser.setCsiHandler({prefix:">",final:"c"},function(B){return L.sendDeviceAttributesSecondary(B)}),L._parser.setCsiHandler({final:"d"},function(B){return L.linePosAbsolute(B)}),L._parser.setCsiHandler({final:"e"},function(B){return L.vPositionRelative(B)}),L._parser.setCsiHandler({final:"f"},function(B){return L.hVPosition(B)}),L._parser.setCsiHandler({final:"g"},function(B){return L.tabClear(B)}),L._parser.setCsiHandler({final:"h"},function(B){return L.setMode(B)}),L._parser.setCsiHandler({prefix:"?",final:"h"},function(B){return L.setModePrivate(B)}),L._parser.setCsiHandler({final:"l"},function(B){return L.resetMode(B)}),L._parser.setCsiHandler({prefix:"?",final:"l"},function(B){return L.resetModePrivate(B)}),L._parser.setCsiHandler({final:"m"},function(B){return L.charAttributes(B)}),L._parser.setCsiHandler({final:"n"},function(B){return L.deviceStatus(B)}),L._parser.setCsiHandler({prefix:"?",final:"n"},function(B){return L.deviceStatusPrivate(B)}),L._parser.setCsiHandler({intermediates:"!",final:"p"},function(B){return L.softReset(B)}),L._parser.setCsiHandler({intermediates:" ",final:"q"},function(B){return L.setCursorStyle(B)}),L._parser.setCsiHandler({final:"r"},function(B){return L.setScrollRegion(B)}),L._parser.setCsiHandler({final:"s"},function(B){return L.saveCursor(B)}),L._parser.setCsiHandler({final:"t"},function(B){return L.windowOptions(B)}),L._parser.setCsiHandler({final:"u"},function(B){return L.restoreCursor(B)}),L._parser.setCsiHandler({intermediates:"'",final:"}"},function(B){return L.insertColumns(B)}),L._parser.setCsiHandler({intermediates:"'",final:"~"},function(B){return L.deleteColumns(B)}),L._parser.setExecuteHandler(o.C0.BEL,function(){return L.bell()}),L._parser.setExecuteHandler(o.C0.LF,function(){return L.lineFeed()}),L._parser.setExecuteHandler(o.C0.VT,function(){return L.lineFeed()}),L._parser.setExecuteHandler(o.C0.FF,function(){return L.lineFeed()}),L._parser.setExecuteHandler(o.C0.CR,function(){return L.carriageReturn()}),L._parser.setExecuteHandler(o.C0.BS,function(){return L.backspace()}),L._parser.setExecuteHandler(o.C0.HT,function(){return L.tab()}),L._parser.setExecuteHandler(o.C0.SO,function(){return L.shiftOut()}),L._parser.setExecuteHandler(o.C0.SI,function(){return L.shiftIn()}),L._parser.setExecuteHandler(o.C1.IND,function(){return L.index()}),L._parser.setExecuteHandler(o.C1.NEL,function(){return L.nextLine()}),L._parser.setExecuteHandler(o.C1.HTS,function(){return L.tabSet()}),L._parser.setOscHandler(0,new l.OscHandler(function(B){L.setTitle(B),L.setIconName(B)})),L._parser.setOscHandler(1,new l.OscHandler(function(B){return L.setIconName(B)})),L._parser.setOscHandler(2,new l.OscHandler(function(B){return L.setTitle(B)})),L._parser.setEscHandler({final:"7"},function(){return L.saveCursor()}),L._parser.setEscHandler({final:"8"},function(){return L.restoreCursor()}),L._parser.setEscHandler({final:"D"},function(){return L.index()}),L._parser.setEscHandler({final:"E"},function(){return L.nextLine()}),L._parser.setEscHandler({final:"H"},function(){return L.tabSet()}),L._parser.setEscHandler({final:"M"},function(){return L.reverseIndex()}),L._parser.setEscHandler({final:"="},function(){return L.keypadApplicationMode()}),L._parser.setEscHandler({final:">"},function(){return L.keypadNumericMode()}),L._parser.setEscHandler({final:"c"},function(){return L.fullReset()}),L._parser.setEscHandler({final:"n"},function(){return L.setgLevel(2)}),L._parser.setEscHandler({final:"o"},function(){return L.setgLevel(3)}),L._parser.setEscHandler({final:"|"},function(){return L.setgLevel(3)}),L._parser.setEscHandler({final:"}"},function(){return L.setgLevel(2)}),L._parser.setEscHandler({final:"~"},function(){return L.setgLevel(1)}),L._parser.setEscHandler({intermediates:"%",final:"@"},function(){return L.selectDefaultCharset()}),L._parser.setEscHandler({intermediates:"%",final:"G"},function(){return L.selectDefaultCharset()});var X=function(B){I._parser.setEscHandler({intermediates:"(",final:B},function(){return L.selectCharset("("+B)}),I._parser.setEscHandler({intermediates:")",final:B},function(){return L.selectCharset(")"+B)}),I._parser.setEscHandler({intermediates:"*",final:B},function(){return L.selectCharset("*"+B)}),I._parser.setEscHandler({intermediates:"+",final:B},function(){return L.selectCharset("+"+B)}),I._parser.setEscHandler({intermediates:"-",final:B},function(){return L.selectCharset("-"+B)}),I._parser.setEscHandler({intermediates:".",final:B},function(){return L.selectCharset("."+B)}),I._parser.setEscHandler({intermediates:"/",final:B},function(){return L.selectCharset("/"+B)})},I=this;for(var j in u.CHARSETS)X(j);return L._parser.setEscHandler({intermediates:"#",final:"8"},function(){return L.screenAlignmentPattern()}),L._parser.setErrorHandler(function(B){return L._logService.error("Parsing error: ",B),B}),L._parser.setDcsHandler({intermediates:"$",final:"q"},new x(L._bufferService,L._coreService,L._logService,L._optionsService)),L}return y(v,C),Object.defineProperty(v.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){C.prototype.dispose.call(this)},v.prototype.parse=function(S){var k=this._bufferService.buffer,O=k.x,R=k.y;if(this._logService.debug("parsing data",S),this._parseBuffer.length<S.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(S.length,131072))),this._dirtyRowService.clearRange(),S.length>131072)for(var U=0;U<S.length;U+=131072){var N=U+131072<S.length?U+131072:S.length,_e=typeof S=="string"?this._stringDecoder.decode(S.substring(U,N),this._parseBuffer):this._utf8Decoder.decode(S.subarray(U,N),this._parseBuffer);this._parser.parse(this._parseBuffer,_e)}else _e=typeof S=="string"?this._stringDecoder.decode(S,this._parseBuffer):this._utf8Decoder.decode(S,this._parseBuffer),this._parser.parse(this._parseBuffer,_e);(k=this._bufferService.buffer).x===O&&k.y===R||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},v.prototype.print=function(S,k,O){var R,U,N=this._bufferService.buffer,_e=this._charsetService.charset,Z=this._optionsService.options.screenReaderMode,oe=this._bufferService.cols,L=this._coreService.decPrivateModes.wraparound,X=this._coreService.modes.insertMode,I=this._curAttrData,j=N.lines.get(N.ybase+N.y);this._dirtyRowService.markDirty(N.y),N.x&&O-k>0&&j.getWidth(N.x-1)===2&&j.setCellFromCodePoint(N.x-1,0,1,I.fg,I.bg,I.extended);for(var B=k;B<O;++B){if(R=S[B],U=this._unicodeService.wcwidth(R),R<127&&_e){var q=_e[String.fromCharCode(R)];q&&(R=q.charCodeAt(0))}if(Z&&this._onA11yChar.fire(a.stringFromCodePoint(R)),U||!N.x){if(N.x+U-1>=oe){if(L){for(;N.x<oe;)j.setCellFromCodePoint(N.x++,0,1,I.fg,I.bg,I.extended);N.x=0,N.y++,N.y===N.scrollBottom+1?(N.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(N.y>=this._bufferService.rows&&(N.y=this._bufferService.rows-1),N.lines.get(N.ybase+N.y).isWrapped=!0),j=N.lines.get(N.ybase+N.y)}else if(N.x=oe-1,U===2)continue}if(X&&(j.insertCells(N.x,U,N.getNullCell(I),I),j.getWidth(oe-1)===2&&j.setCellFromCodePoint(oe-1,t.NULL_CELL_CODE,t.NULL_CELL_WIDTH,I.fg,I.bg,I.extended)),j.setCellFromCodePoint(N.x++,R,U,I.fg,I.bg,I.extended),U>0)for(;--U;)j.setCellFromCodePoint(N.x++,0,0,I.fg,I.bg,I.extended)}else j.getWidth(N.x-1)?j.addCodepointToCell(N.x-1,R):j.addCodepointToCell(N.x-2,R)}O-k>0&&(j.loadCell(N.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),N.x<oe&&O-k>0&&j.getWidth(N.x)===0&&!j.hasContent(N.x)&&j.setCellFromCodePoint(N.x,0,1,I.fg,I.bg,I.extended),this._dirtyRowService.markDirty(N.y)},v.prototype.addCsiHandler=function(S,k){var O=this;return S.final!=="t"||S.prefix||S.intermediates?this._parser.addCsiHandler(S,k):this._parser.addCsiHandler(S,function(R){return!b(R.params[0],O._optionsService.options.windowOptions)||k(R)})},v.prototype.addDcsHandler=function(S,k){return this._parser.addDcsHandler(S,new p.DcsHandler(k))},v.prototype.addEscHandler=function(S,k){return this._parser.addEscHandler(S,k)},v.prototype.addOscHandler=function(S,k){return this._parser.addOscHandler(S,new l.OscHandler(k))},v.prototype.bell=function(){this._onRequestBell.fire()},v.prototype.lineFeed=function(){var S=this._bufferService.buffer;this._dirtyRowService.markDirty(S.y),this._optionsService.options.convertEol&&(S.x=0),S.y++,S.y===S.scrollBottom+1?(S.y--,this._onRequestScroll.fire(this._eraseAttrData())):S.y>=this._bufferService.rows&&(S.y=this._bufferService.rows-1),S.x>=this._bufferService.cols&&S.x--,this._dirtyRowService.markDirty(S.y),this._onLineFeed.fire()},v.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},v.prototype.backspace=function(){var S,k=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(k.x>0&&k.x--);if(this._restrictCursor(this._bufferService.cols),k.x>0)k.x--;else if(k.x===0&&k.y>k.scrollTop&&k.y<=k.scrollBottom&&(!((S=k.lines.get(k.ybase+k.y))===null||S===void 0)&&S.isWrapped)){k.lines.get(k.ybase+k.y).isWrapped=!1,k.y--,k.x=this._bufferService.cols-1;var O=k.lines.get(k.ybase+k.y);O.hasWidth(k.x)&&!O.hasContent(k.x)&&k.x--}this._restrictCursor()},v.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var S=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-S)}},v.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},v.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},v.prototype._restrictCursor=function(S){S===void 0&&(S=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(S,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)},v.prototype._setCursor=function(S,k){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=S,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+k):(this._bufferService.buffer.x=S,this._bufferService.buffer.y=k),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},v.prototype._moveCursor=function(S,k){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+S,this._bufferService.buffer.y+k)},v.prototype.cursorUp=function(S){var k=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;k>=0?this._moveCursor(0,-Math.min(k,S.params[0]||1)):this._moveCursor(0,-(S.params[0]||1))},v.prototype.cursorDown=function(S){var k=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;k>=0?this._moveCursor(0,Math.min(k,S.params[0]||1)):this._moveCursor(0,S.params[0]||1)},v.prototype.cursorForward=function(S){this._moveCursor(S.params[0]||1,0)},v.prototype.cursorBackward=function(S){this._moveCursor(-(S.params[0]||1),0)},v.prototype.cursorNextLine=function(S){this.cursorDown(S),this._bufferService.buffer.x=0},v.prototype.cursorPrecedingLine=function(S){this.cursorUp(S),this._bufferService.buffer.x=0},v.prototype.cursorCharAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},v.prototype.cursorPosition=function(S){this._setCursor(S.length>=2?(S.params[1]||1)-1:0,(S.params[0]||1)-1)},v.prototype.charPosAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},v.prototype.hPositionRelative=function(S){this._moveCursor(S.params[0]||1,0)},v.prototype.linePosAbsolute=function(S){this._setCursor(this._bufferService.buffer.x,(S.params[0]||1)-1)},v.prototype.vPositionRelative=function(S){this._moveCursor(0,S.params[0]||1)},v.prototype.hVPosition=function(S){this.cursorPosition(S)},v.prototype.tabClear=function(S){var k=S.params[0];k===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:k===3&&(this._bufferService.buffer.tabs={})},v.prototype.cursorForwardTab=function(S){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var k=S.params[0]||1;k--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},v.prototype.cursorBackwardTab=function(S){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)O.x=O.prevStop()},v.prototype._eraseInBufferLine=function(S,k,O,R){R===void 0&&(R=!1);var U=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+S);U.replaceCells(k,O,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R&&(U.isWrapped=!1)},v.prototype._resetBufferLine=function(S){var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+S);k.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),k.isWrapped=!1},v.prototype.eraseInDisplay=function(S){var k;switch(this._restrictCursor(),S.params[0]){case 0:for(k=this._bufferService.buffer.y,this._dirtyRowService.markDirty(k),this._eraseInBufferLine(k++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);k<this._bufferService.rows;k++)this._resetBufferLine(k);this._dirtyRowService.markDirty(k);break;case 1:for(k=this._bufferService.buffer.y,this._dirtyRowService.markDirty(k),this._eraseInBufferLine(k,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(k+1).isWrapped=!1);k--;)this._resetBufferLine(k);this._dirtyRowService.markDirty(0);break;case 2:for(k=this._bufferService.rows,this._dirtyRowService.markDirty(k-1);k--;)this._resetBufferLine(k);this._dirtyRowService.markDirty(0);break;case 3:var O=this._bufferService.buffer.lines.length-this._bufferService.rows;O>0&&(this._bufferService.buffer.lines.trimStart(O),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-O,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-O,0),this._onScroll.fire(0))}},v.prototype.eraseInLine=function(S){switch(this._restrictCursor(),S.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)},v.prototype.insertLines=function(S){this._restrictCursor();var k=S.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){for(var R=O.ybase+O.y,U=this._bufferService.rows-1-O.scrollBottom,N=this._bufferService.rows-1+O.ybase-U+1;k--;)O.lines.splice(N-1,1),O.lines.splice(R,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},v.prototype.deleteLines=function(S){this._restrictCursor();var k=S.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){var R,U=O.ybase+O.y;for(R=this._bufferService.rows-1-O.scrollBottom,R=this._bufferService.rows-1+O.ybase-R;k--;)O.lines.splice(U,1),O.lines.splice(R,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},v.prototype.insertChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.insertCells(this._bufferService.buffer.x,S.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},v.prototype.deleteChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.deleteCells(this._bufferService.buffer.x,S.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},v.prototype.scrollUp=function(S){for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)O.lines.splice(O.ybase+O.scrollTop,1),O.lines.splice(O.ybase+O.scrollBottom,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.scrollTop,O.scrollBottom)},v.prototype.scrollDown=function(S){for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)O.lines.splice(O.ybase+O.scrollBottom,1),O.lines.splice(O.ybase+O.scrollTop,0,O.getBlankLine(e.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(O.scrollTop,O.scrollBottom)},v.prototype.scrollLeft=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=k.lines.get(k.ybase+R);U.deleteCells(0,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.scrollRight=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=k.lines.get(k.ybase+R);U.insertCells(0,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.insertColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=this._bufferService.buffer.lines.get(k.ybase+R);U.insertCells(k.x,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.deleteColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,R=k.scrollTop;R<=k.scrollBottom;++R){var U=k.lines.get(k.ybase+R);U.deleteCells(k.x,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),U.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},v.prototype.eraseChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(S.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},v.prototype.repeatPrecedingCharacter=function(S){if(this._parser.precedingCodepoint){for(var k=S.params[0]||1,O=new Uint32Array(k),R=0;R<k;++R)O[R]=this._parser.precedingCodepoint;this.print(O,0,O.length)}},v.prototype.sendDeviceAttributesPrimary=function(S){S.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c"))},v.prototype.sendDeviceAttributesSecondary=function(S){S.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(S.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c"))},v.prototype._is=function(S){return(this._optionsService.options.termName+"").indexOf(S)===0},v.prototype.setMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!0}},v.prototype.setModePrivate=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,u.DEFAULT_CHARSET),this._charsetService.setgCharset(1,u.DEFAULT_CHARSET),this._charsetService.setgCharset(2,u.DEFAULT_CHARSET),this._charsetService.setgCharset(3,u.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}},v.prototype.resetMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!1}},v.prototype.resetModePrivate=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){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(),S.params[k]===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}},v.prototype._updateAttrColor=function(S,k,O,R,U){return k===2?(S|=50331648,S&=-16777216,S|=s.AttributeData.fromColorRGB([O,R,U])):k===5&&(S&=-50331904,S|=33554432|255&O),S},v.prototype._extractColor=function(S,k,O){var R=[0,0,-1,0,0,0],U=0,N=0;do{if(R[N+U]=S.params[k+N],S.hasSubParams(k+N)){var _e=S.getSubParams(k+N),Z=0;do R[1]===5&&(U=1),R[N+Z+1+U]=_e[Z];while(++Z<_e.length&&Z+N+1+U<R.length);break}if(R[1]===5&&N+U>=2||R[1]===2&&N+U>=5)break;R[1]&&(U=1)}while(++N+k<S.length&&N+U<R.length);for(Z=2;Z<R.length;++Z)R[Z]===-1&&(R[Z]=0);switch(R[0]){case 38:O.fg=this._updateAttrColor(O.fg,R[1],R[3],R[4],R[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,R[1],R[3],R[4],R[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,R[1],R[3],R[4],R[5])}return N},v.prototype._processUnderline=function(S,k){k.extended=k.extended.clone(),(!~S||S>5)&&(S=1),k.extended.underlineStyle=S,k.fg|=268435456,S===0&&(k.fg&=-268435457),k.updateExtended()},v.prototype.charAttributes=function(S){if(S.length===1&&S.params[0]===0)return this._curAttrData.fg=e.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=e.DEFAULT_ATTR_DATA.bg);for(var k,O=S.length,R=this._curAttrData,U=0;U<O;U++)(k=S.params[U])>=30&&k<=37?(R.fg&=-50331904,R.fg|=16777216|k-30):k>=40&&k<=47?(R.bg&=-50331904,R.bg|=16777216|k-40):k>=90&&k<=97?(R.fg&=-50331904,R.fg|=16777224|k-90):k>=100&&k<=107?(R.bg&=-50331904,R.bg|=16777224|k-100):k===0?(R.fg=e.DEFAULT_ATTR_DATA.fg,R.bg=e.DEFAULT_ATTR_DATA.bg):k===1?R.fg|=134217728:k===3?R.bg|=67108864:k===4?(R.fg|=268435456,this._processUnderline(S.hasSubParams(U)?S.getSubParams(U)[0]:1,R)):k===5?R.fg|=536870912:k===7?R.fg|=67108864:k===8?R.fg|=1073741824:k===2?R.bg|=134217728:k===21?this._processUnderline(2,R):k===22?(R.fg&=-134217729,R.bg&=-134217729):k===23?R.bg&=-67108865:k===24?R.fg&=-268435457:k===25?R.fg&=-536870913:k===27?R.fg&=-67108865:k===28?R.fg&=-1073741825:k===39?(R.fg&=-67108864,R.fg|=16777215&e.DEFAULT_ATTR_DATA.fg):k===49?(R.bg&=-67108864,R.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):k===38||k===48||k===58?U+=this._extractColor(S,U,R):k===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):k===100?(R.fg&=-67108864,R.fg|=16777215&e.DEFAULT_ATTR_DATA.fg,R.bg&=-67108864,R.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",k)},v.prototype.deviceStatus=function(S){switch(S.params[0]){case 5:this._coreService.triggerDataEvent(o.C0.ESC+"[0n");break;case 6:var k=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"["+k+";"+O+"R")}},v.prototype.deviceStatusPrivate=function(S){switch(S.params[0]){case 6:var k=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"[?"+k+";"+O+"R")}},v.prototype.softReset=function(S){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=e.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},v.prototype.setCursorStyle=function(S){var k=S.params[0]||1;switch(k){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 O=k%2==1;this._optionsService.options.cursorBlink=O},v.prototype.setScrollRegion=function(S){var k,O=S.params[0]||1;(S.length<2||(k=S.params[1])>this._bufferService.rows||k===0)&&(k=this._bufferService.rows),k>O&&(this._bufferService.buffer.scrollTop=O-1,this._bufferService.buffer.scrollBottom=k-1,this._setCursor(0,0))},v.prototype.windowOptions=function(S){if(b(S.params[0],this._optionsService.options.windowOptions)){var k=S.length>1?S.params[1]:0;switch(S.params[0]){case 14:k!==2&&this._onRequestWindowsOptionsReport.fire(h.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(h.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(o.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:k!==0&&k!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),k!==0&&k!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:k!==0&&k!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),k!==0&&k!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},v.prototype.saveCursor=function(S){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},v.prototype.restoreCursor=function(S){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()},v.prototype.setTitle=function(S){this._windowTitle=S,this._onTitleChange.fire(S)},v.prototype.setIconName=function(S){this._iconName=S},v.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},v.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},v.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},v.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,u.DEFAULT_CHARSET)},v.prototype.selectCharset=function(S){S.length===2?S[0]!=="/"&&this._charsetService.setgCharset(g[S[0]],u.CHARSETS[S[1]]||u.DEFAULT_CHARSET):this.selectDefaultCharset()},v.prototype.index=function(){this._restrictCursor();var S=this._bufferService.buffer;this._bufferService.buffer.y++,S.y===S.scrollBottom+1?(S.y--,this._onRequestScroll.fire(this._eraseAttrData())):S.y>=this._bufferService.rows&&(S.y=this._bufferService.rows-1),this._restrictCursor()},v.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},v.prototype.reverseIndex=function(){this._restrictCursor();var S=this._bufferService.buffer;if(S.y===S.scrollTop){var k=S.scrollBottom-S.scrollTop;S.lines.shiftElements(S.ybase+S.y,k,1),S.lines.set(S.ybase+S.y,S.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom)}else S.y--,this._restrictCursor()},v.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},v.prototype.reset=function(){this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone()},v.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},v.prototype.setgLevel=function(S){this._charsetService.setgLevel(S)},v.prototype.screenAlignmentPattern=function(){var S=new n.CellData;S.content=1<<22|69,S.fg=this._curAttrData.fg,S.bg=this._curAttrData.bg;var k=this._bufferService.buffer;this._setCursor(0,0);for(var O=0;O<this._bufferService.rows;++O){var R=k.ybase+k.y+O,U=k.lines.get(R);U&&(U.fill(S),U.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},v}(r.Disposable);c.InputHandler=E},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.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"},c.CHARSETS.A={"#":"\xA3"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},c.CHARSETS.C=c.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},c.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},c.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},c.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},c.CHARSETS.E=c.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},c.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},c.CHARSETS.H=c.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},c.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;var m=function(){function y(h,o){if(h===void 0&&(h=32),o===void 0&&(o=32),this.maxLength=h,this.maxSubParamsLength=o,o>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(o),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return y.fromArray=function(h){var o=new y;if(!h.length)return o;for(var u=h[0]instanceof Array?1:0;u<h.length;++u){var d=h[u];if(d instanceof Array)for(var r=0;r<d.length;++r)o.addSubParam(d[r]);else o.addParam(d)}return o},y.prototype.clone=function(){var h=new y(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h},y.prototype.toArray=function(){for(var h=[],o=0;o<this.length;++o){h.push(this.params[o]);var u=this._subParamsIdx[o]>>8,d=255&this._subParamsIdx[o];d-u>0&&h.push(Array.prototype.slice.call(this._subParams,u,d))}return h},y.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},y.prototype.addParam=function(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>2147483647?2147483647:h}},y.prototype.addSubParam=function(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>2147483647?2147483647:h,this._subParamsIdx[this.length-1]++}},y.prototype.hasSubParams=function(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0},y.prototype.getSubParams=function(h){var o=this._subParamsIdx[h]>>8,u=255&this._subParamsIdx[h];return u-o>0?this._subParams.subarray(o,u):null},y.prototype.getSubParamsAll=function(){for(var h={},o=0;o<this.length;++o){var u=this._subParamsIdx[o]>>8,d=255&this._subParamsIdx[o];d-u>0&&(h[o]=this._subParams.slice(u,d))}return h},y.prototype.addDigit=function(h){var o;if(!(this._rejectDigits||!(o=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var u=this._digitIsSub?this._subParams:this.params,d=u[o-1];u[o-1]=~d?Math.min(10*d+h,2147483647):h}},y}();c.Params=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;var m=_(23),y=_(8),h=function(){function u(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return u.prototype.addHandler=function(d,r){this._handlers[d]===void 0&&(this._handlers[d]=[]);var i=this._handlers[d];return i.push(r),{dispose:function(){var a=i.indexOf(r);a!==-1&&i.splice(a,1)}}},u.prototype.setHandler=function(d,r){this._handlers[d]=[r]},u.prototype.clearHandler=function(d){this._handlers[d]&&delete this._handlers[d]},u.prototype.setHandlerFallback=function(d){this._handlerFb=d},u.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},u.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},u.prototype._start=function(){var d=this._handlers[this._id];if(d)for(var r=d.length-1;r>=0;r--)d[r].start();else this._handlerFb(this._id,"START")},u.prototype._put=function(d,r,i){var a=this._handlers[this._id];if(a)for(var e=a.length-1;e>=0;e--)a[e].put(d,r,i);else this._handlerFb(this._id,"PUT",y.utf32ToString(d,r,i))},u.prototype._end=function(d){var r=this._handlers[this._id];if(r){for(var i=r.length-1;i>=0&&r[i].end(d)===!1;i--);for(i--;i>=0;i--)r[i].end(!1)}else this._handlerFb(this._id,"END",d)},u.prototype.start=function(){this.reset(),this._id=-1,this._state=1},u.prototype.put=function(d,r,i){if(this._state!==3){if(this._state===1)for(;r<i;){var a=d[r++];if(a===59){this._state=2,this._start();break}if(a<48||57<a)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+a-48}this._state===2&&i-r>0&&this._put(d,r,i)}},u.prototype.end=function(d){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(d)),this._id=-1,this._state=0)},u}();c.OscParser=h;var o=function(){function u(d){this._handler=d,this._data="",this._hitLimit=!1}return u.prototype.start=function(){this._data="",this._hitLimit=!1},u.prototype.put=function(d,r,i){this._hitLimit||(this._data+=y.utf32ToString(d,r,i),this._data.length>m.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},u.prototype.end=function(d){var r;return this._hitLimit?r=!1:d&&(r=this._handler(this._data)),this._data="",this._hitLimit=!1,r},u}();c.OscHandler=o},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;var m=_(8),y=_(21),h=_(23),o=[],u=function(){function r(){this._handlers=Object.create(null),this._active=o,this._ident=0,this._handlerFb=function(){}}return r.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},r.prototype.addHandler=function(i,a){this._handlers[i]===void 0&&(this._handlers[i]=[]);var e=this._handlers[i];return e.push(a),{dispose:function(){var f=e.indexOf(a);f!==-1&&e.splice(f,1)}}},r.prototype.setHandler=function(i,a){this._handlers[i]=[a]},r.prototype.clearHandler=function(i){this._handlers[i]&&delete this._handlers[i]},r.prototype.setHandlerFallback=function(i){this._handlerFb=i},r.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=o,this._ident=0},r.prototype.hook=function(i,a){if(this.reset(),this._ident=i,this._active=this._handlers[i]||o,this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].hook(a);else this._handlerFb(this._ident,"HOOK",a)},r.prototype.put=function(i,a,e){if(this._active.length)for(var f=this._active.length-1;f>=0;f--)this._active[f].put(i,a,e);else this._handlerFb(this._ident,"PUT",m.utf32ToString(i,a,e))},r.prototype.unhook=function(i){if(this._active.length){for(var a=this._active.length-1;a>=0&&this._active[a].unhook(i)===!1;a--);for(a--;a>=0;a--)this._active[a].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",i);this._active=o,this._ident=0},r}();c.DcsParser=u;var d=function(){function r(i){this._handler=i,this._data="",this._hitLimit=!1}return r.prototype.hook=function(i){this._params=i.clone(),this._data="",this._hitLimit=!1},r.prototype.put=function(i,a,e){this._hitLimit||(this._data+=m.utf32ToString(i,a,e),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},r.prototype.unhook=function(i){var a;return this._hitLimit?a=!1:i&&(a=this._handler(this._data,this._params||new y.Params)),this._params=void 0,this._data="",this._hitLimit=!1,a},r}();c.DcsHandler=d},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.removeTerminalFromCache=c.acquireCharAtlas=void 0;var m=_(26),y=_(43),h=[];c.acquireCharAtlas=function(o,u,d,r,i){for(var a=m.generateConfig(r,i,o,d),e=0;e<h.length;e++){var f=(t=h[e]).ownedBy.indexOf(u);if(f>=0){if(m.configEquals(t.config,a))return t.atlas;t.ownedBy.length===1?(t.atlas.dispose(),h.splice(e,1)):t.ownedBy.splice(f,1);break}}for(e=0;e<h.length;e++){var t=h[e];if(m.configEquals(t.config,a))return t.ownedBy.push(u),t.atlas}var n={atlas:new y.DynamicCharAtlas(document,a),config:a,ownedBy:[u]};return h.push(n),n.atlas},c.removeTerminalFromCache=function(o){for(var u=0;u<h.length;u++){var d=h[u].ownedBy.indexOf(o);if(d!==-1){h[u].ownedBy.length===1?(h[u].atlas.dispose(),h.splice(u,1)):h[u].ownedBy.splice(d,1);break}}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.is256Color=c.configEquals=c.generateConfig=void 0;var m=_(3);c.generateConfig=function(y,h,o,u){var d={foreground:u.foreground,background:u.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:u.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:y,scaledCharHeight:h,fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,fontWeightBold:o.fontWeightBold,allowTransparency:o.allowTransparency,colors:d}},c.configEquals=function(y,h){for(var o=0;o<y.colors.ansi.length;o++)if(y.colors.ansi[o].rgba!==h.colors.ansi[o].rgba)return!1;return y.devicePixelRatio===h.devicePixelRatio&&y.fontFamily===h.fontFamily&&y.fontSize===h.fontSize&&y.fontWeight===h.fontWeight&&y.fontWeightBold===h.fontWeightBold&&y.allowTransparency===h.allowTransparency&&y.scaledCharWidth===h.scaledCharWidth&&y.scaledCharHeight===h.scaledCharHeight&&y.colors.foreground===h.colors.foreground&&y.colors.background===h.colors.background},c.is256Color=function(y){return y<m.DEFAULT_COLOR}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ColorManager=c.DEFAULT_ANSI_COLORS=void 0;var m=_(10),y=_(45),h=m.css.toColor("#ffffff"),o=m.css.toColor("#000000"),u=m.css.toColor("#ffffff"),d=m.css.toColor("#000000"),r={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=function(){for(var a=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],e=[0,95,135,175,215,255],f=0;f<216;f++){var t=e[f/36%6|0],n=e[f/6%6|0],s=e[f%6];a.push({css:m.channels.toCss(t,n,s),rgba:m.channels.toRgba(t,n,s)})}for(f=0;f<24;f++){var l=8+10*f;a.push({css:m.channels.toCss(l,l,l),rgba:m.channels.toRgba(l,l,l)})}return a}();var i=function(){function a(e,f){this.allowTransparency=f;var t=e.createElement("canvas");t.width=1,t.height=1;var n=t.getContext("2d");if(!n)throw new Error("Could not get rendering context");this._ctx=n,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new y.ColorContrastCache,this.colors={foreground:h,background:o,cursor:u,cursorAccent:d,selectionTransparent:r,selectionOpaque:m.color.blend(o,r),ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return a.prototype.onOptionsChange=function(e){e==="minimumContrastRatio"&&this._contrastCache.clear()},a.prototype.setTheme=function(e){e===void 0&&(e={}),this.colors.foreground=this._parseColor(e.foreground,h),this.colors.background=this._parseColor(e.background,o),this.colors.cursor=this._parseColor(e.cursor,u,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,d,!0),this.colors.selectionTransparent=this._parseColor(e.selection,r,!0),this.colors.selectionOpaque=m.color.blend(this.colors.background,this.colors.selectionTransparent),m.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=m.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(e.black,c.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,c.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,c.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,c.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,c.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,c.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,c.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,c.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,c.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,c.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,c.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,c.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,c.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,c.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,c.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},a.prototype._parseColor=function(e,f,t){if(t===void 0&&(t=this.allowTransparency),e===void 0)return f;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+e+" is invalid using fallback "+f.css),f;this._ctx.fillRect(0,0,1,1);var n=this._ctx.getImageData(0,0,1,1).data;if(n[3]!==255){if(!t)return console.warn("Color: "+e+" is using transparency, but allowTransparency is false. Using fallback "+f.css+"."),f;var s=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(E){return Number(E)}),l=s[0],p=s[1],g=s[2],b=s[3],x=Math.round(255*b);return{rgba:m.channels.toRgba(l,p,g,x),css:e}}return{css:this._ctx.fillStyle,rgba:m.channels.toRgba(n[0],n[1],n[2],n[3])}},a}();c.ColorManager=i},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.throwIfFalsy=void 0,c.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m}},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(i,a){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,f){e.__proto__=f}||function(e,f){for(var t in f)f.hasOwnProperty(t)&&(e[t]=f[t])})(i,a)},function(i,a){function e(){this.constructor=i}m(i,a),i.prototype=a===null?Object.create(a):(e.prototype=a.prototype,new e)});Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerRegistry=c.JoinedCellData=void 0;var h=_(6),o=_(3),u=_(4),d=function(i){function a(e,f,t){var n=i.call(this)||this;return n.content=0,n.combinedData="",n.fg=e.fg,n.bg=e.bg,n.combinedData=f,n._width=t,n}return y(a,i),a.prototype.isCombined=function(){return 2097152},a.prototype.getWidth=function(){return this._width},a.prototype.getChars=function(){return this.combinedData},a.prototype.getCode=function(){return 2097151},a.prototype.setFromCharData=function(e){throw new Error("not implemented")},a.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},a}(h.AttributeData);c.JoinedCellData=d;var r=function(){function i(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new u.CellData}return i.prototype.registerCharacterJoiner=function(a){var e={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(e),e.id},i.prototype.deregisterCharacterJoiner=function(a){for(var e=0;e<this._characterJoiners.length;e++)if(this._characterJoiners[e].id===a)return this._characterJoiners.splice(e,1),!0;return!1},i.prototype.getJoinedCharacters=function(a){if(this._characterJoiners.length===0)return[];var e=this._bufferService.buffer.lines.get(a);if(!e||e.length===0)return[];for(var f=[],t=e.translateToString(!0),n=0,s=0,l=0,p=e.getFg(0),g=e.getBg(0),b=0;b<e.getTrimmedLength();b++)if(e.loadCell(b,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==p||this._workCell.bg!==g){if(b-n>1)for(var x=this._getJoinedRanges(t,l,s,e,n),E=0;E<x.length;E++)f.push(x[E]);n=b,l=s,p=this._workCell.fg,g=this._workCell.bg}s+=this._workCell.getChars().length||o.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-n>1)for(x=this._getJoinedRanges(t,l,s,e,n),E=0;E<x.length;E++)f.push(x[E]);return f},i.prototype._getJoinedRanges=function(a,e,f,t,n){for(var s=a.substring(e,f),l=this._characterJoiners[0].handler(s),p=1;p<this._characterJoiners.length;p++)for(var g=this._characterJoiners[p].handler(s),b=0;b<g.length;b++)i._mergeRanges(l,g[b]);return this._stringRangesToCellRanges(l,t,n),l},i.prototype._stringRangesToCellRanges=function(a,e,f){var t=0,n=!1,s=0,l=a[t];if(l){for(var p=f;p<this._bufferService.cols;p++){var g=e.getWidth(p),b=e.getString(p).length||o.WHITESPACE_CELL_CHAR.length;if(g!==0){if(!n&&l[0]<=s&&(l[0]=p,n=!0),l[1]<=s){if(l[1]=p,!(l=a[++t]))break;l[0]<=s?(l[0]=p,n=!0):n=!1}s+=b}}l&&(l[1]=this._bufferService.cols)}},i._mergeRanges=function(a,e){for(var f=!1,t=0;t<a.length;t++){var n=a[t];if(f){if(e[1]<=n[0])return a[t-1][1]=e[1],a;if(e[1]<=n[1])return a[t-1][1]=Math.max(e[1],n[1]),a.splice(t,1),a;a.splice(t,1),t--}else{if(e[1]<=n[0])return a.splice(t,0,e),a;if(e[1]<=n[1])return n[0]=Math.min(e[0],n[0]),a;e[0]<n[1]&&(n[0]=Math.min(e[0],n[0]),f=!0)}}return f?a[a.length-1][1]=e[1]:a.push(e),a},i}();c.CharacterJoinerRegistry=r},function(D,c,_){"use strict";function m(y,h){var o=h.getBoundingClientRect();return[y.clientX-o.left,y.clientY-o.top]}Object.defineProperty(c,"__esModule",{value:!0}),c.getRawByteCoords=c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=m,c.getCoords=function(y,h,o,u,d,r,i,a){if(d){var e=m(y,h);if(e)return e[0]=Math.ceil((e[0]+(a?r/2:0))/r),e[1]=Math.ceil(e[1]/i),e[0]=Math.min(Math.max(e[0],1),o+(a?1:0)),e[1]=Math.min(Math.max(e[1],1),u),e}},c.getRawByteCoords=function(y){if(y)return{x:y[0]+32,y:y[1]+32}}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0;var m=function(){function y(h){this._renderCallback=h}return y.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},y.prototype.refresh=function(h,o,u){var d=this;this._rowCount=u,h=h!==void 0?h:0,o=o!==void 0?o:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,o):o,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()}))},y.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var h=Math.max(this._rowStart,0),o=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(h,o)}},y}();c.RenderDebouncer=m},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(o,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,r){d.__proto__=r}||function(d,r){for(var i in r)r.hasOwnProperty(i)&&(d[i]=r[i])})(o,u)},function(o,u){function d(){this.constructor=o}m(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(c,"__esModule",{value:!0}),c.ScreenDprMonitor=void 0;var h=function(o){function u(){var d=o!==null&&o.apply(this,arguments)||this;return d._currentDevicePixelRatio=window.devicePixelRatio,d}return y(u,o),u.prototype.setListener=function(d){var r=this;this._listener&&this.clearListener(),this._listener=d,this._outerListener=function(){r._listener&&(r._listener(window.devicePixelRatio,r._currentDevicePixelRatio),r._updateDpr())},this._updateDpr()},u.prototype.dispose=function(){o.prototype.dispose.call(this),this.clearListener()},u.prototype._updateDpr=function(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)===null||d===void 0||d.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},u.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)},u}(_(2).Disposable);c.ScreenDprMonitor=h},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function m(y,h){if(h===void 0&&(h=5),typeof y!="object")return y;var o=Array.isArray(y)?[]:{};for(var u in y)o[u]=h<=1?y[u]:y[u]?m(y[u],h-1):y[u];return o}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var m=_(4),y=_(35),h=_(18),o=_(0),u=_(83),d=function(){function t(n){this._core=new y.Terminal(n),this._addonManager=new u.AddonManager}return t.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(t.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new e(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unicode",{get:function(){return this._checkProposedApi(),new f(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this._checkProposedApi(),new i(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._core.blur()},t.prototype.focus=function(){this._core.focus()},t.prototype.resize=function(n,s){this._verifyIntegers(n,s),this._core.resize(n,s)},t.prototype.open=function(n){this._core.open(n)},t.prototype.attachCustomKeyEventHandler=function(n){this._core.attachCustomKeyEventHandler(n)},t.prototype.registerLinkMatcher=function(n,s,l){return this._checkProposedApi(),this._core.registerLinkMatcher(n,s,l)},t.prototype.deregisterLinkMatcher=function(n){this._checkProposedApi(),this._core.deregisterLinkMatcher(n)},t.prototype.registerLinkProvider=function(n){return this._checkProposedApi(),this._core.registerLinkProvider(n)},t.prototype.registerCharacterJoiner=function(n){return this._checkProposedApi(),this._core.registerCharacterJoiner(n)},t.prototype.deregisterCharacterJoiner=function(n){this._checkProposedApi(),this._core.deregisterCharacterJoiner(n)},t.prototype.registerMarker=function(n){return this._checkProposedApi(),this._verifyIntegers(n),this._core.addMarker(n)},t.prototype.addMarker=function(n){return this.registerMarker(n)},t.prototype.hasSelection=function(){return this._core.hasSelection()},t.prototype.select=function(n,s,l){this._verifyIntegers(n,s,l),this._core.select(n,s,l)},t.prototype.getSelection=function(){return this._core.getSelection()},t.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},t.prototype.clearSelection=function(){this._core.clearSelection()},t.prototype.selectAll=function(){this._core.selectAll()},t.prototype.selectLines=function(n,s){this._verifyIntegers(n,s),this._core.selectLines(n,s)},t.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},t.prototype.scrollLines=function(n){this._verifyIntegers(n),this._core.scrollLines(n)},t.prototype.scrollPages=function(n){this._verifyIntegers(n),this._core.scrollPages(n)},t.prototype.scrollToTop=function(){this._core.scrollToTop()},t.prototype.scrollToBottom=function(){this._core.scrollToBottom()},t.prototype.scrollToLine=function(n){this._verifyIntegers(n),this._core.scrollToLine(n)},t.prototype.clear=function(){this._core.clear()},t.prototype.write=function(n,s){this._core.write(n,s)},t.prototype.writeUtf8=function(n,s){this._core.write(n,s)},t.prototype.writeln=function(n,s){this._core.write(n),this._core.write(`\r
`,s)},t.prototype.paste=function(n){this._core.paste(n)},t.prototype.getOption=function(n){return this._core.optionsService.getOption(n)},t.prototype.setOption=function(n,s){this._core.optionsService.setOption(n,s)},t.prototype.refresh=function(n,s){this._verifyIntegers(n,s),this._core.refresh(n,s)},t.prototype.reset=function(){this._core.reset()},t.prototype.loadAddon=function(n){return this._addonManager.loadAddon(this,n)},Object.defineProperty(t,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),t.prototype._verifyIntegers=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];for(var l=0,p=n;l<p.length;l++){var g=p[l];if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}},t}();c.Terminal=d;var r=function(){function t(n,s){this._buffer=n,this.type=s}return t.prototype.init=function(n){return this._buffer=n,this},Object.defineProperty(t.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),t.prototype.getLine=function(n){var s=this._buffer.lines.get(n);if(s)return new a(s)},t.prototype.getNullCell=function(){return new m.CellData},t}(),i=function(){function t(n){var s=this;this._buffers=n,this._onBufferChange=new o.EventEmitter,this._normal=new r(this._buffers.normal,"normal"),this._alternate=new r(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return s._onBufferChange.fire(s.active)})}return Object.defineProperty(t.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.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(t.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),t}(),a=function(){function t(n){this._line=n}return Object.defineProperty(t.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),t.prototype.getCell=function(n,s){if(!(n<0||n>=this._line.length))return s?(this._line.loadCell(n,s),s):this._line.loadCell(n,new m.CellData)},t.prototype.translateToString=function(n,s,l){return this._line.translateToString(n,s,l)},t}(),e=function(){function t(n){this._core=n}return t.prototype.registerCsiHandler=function(n,s){return this._core.addCsiHandler(n,function(l){return s(l.toArray())})},t.prototype.addCsiHandler=function(n,s){return this.registerCsiHandler(n,s)},t.prototype.registerDcsHandler=function(n,s){return this._core.addDcsHandler(n,function(l,p){return s(l,p.toArray())})},t.prototype.addDcsHandler=function(n,s){return this.registerDcsHandler(n,s)},t.prototype.registerEscHandler=function(n,s){return this._core.addEscHandler(n,s)},t.prototype.addEscHandler=function(n,s){return this.registerEscHandler(n,s)},t.prototype.registerOscHandler=function(n,s){return this._core.addOscHandler(n,s)},t.prototype.addOscHandler=function(n,s){return this.registerOscHandler(n,s)},t}(),f=function(){function t(n){this._core=n}return t.prototype.register=function(n){this._core.unicodeService.register(n)},Object.defineProperty(t.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(n){this._core.unicodeService.activeVersion=n},enumerable:!1,configurable:!0}),t}()},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(oe,L){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,I){X.__proto__=I}||function(X,I){for(var j in I)I.hasOwnProperty(j)&&(X[j]=I[j])})(oe,L)},function(oe,L){function X(){this.constructor=oe}m(oe,L),oe.prototype=L===null?Object.create(L):(X.prototype=L.prototype,new X)});Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;var h=_(36),o=_(37),u=_(38),d=_(12),r=_(19),i=_(40),a=_(50),e=_(51),f=_(11),t=_(7),n=_(18),s=_(54),l=_(55),p=_(56),g=_(57),b=_(59),x=_(0),E=_(16),C=_(27),v=_(60),S=_(5),k=_(61),O=_(62),R=_(63),U=_(64),N=_(65),_e=typeof window!="undefined"?window.document:null,Z=function(oe){function L(X){X===void 0&&(X={});var I=oe.call(this,X)||this;return I.browser=f,I._keyDownHandled=!1,I._onCursorMove=new x.EventEmitter,I._onKey=new x.EventEmitter,I._onRender=new x.EventEmitter,I._onSelectionChange=new x.EventEmitter,I._onTitleChange=new x.EventEmitter,I._onFocus=new x.EventEmitter,I._onBlur=new x.EventEmitter,I._onA11yCharEmitter=new x.EventEmitter,I._onA11yTabEmitter=new x.EventEmitter,I._setup(),I.linkifier=I._instantiationService.createInstance(a.Linkifier),I.linkifier2=I.register(I._instantiationService.createInstance(R.Linkifier2)),I.register(I._inputHandler.onRequestBell(function(){return I.bell()})),I.register(I._inputHandler.onRequestRefreshRows(function(j,B){return I.refresh(j,B)})),I.register(I._inputHandler.onRequestReset(function(){return I.reset()})),I.register(I._inputHandler.onRequestScroll(function(j,B){return I.scroll(j,B||void 0)})),I.register(I._inputHandler.onRequestWindowsOptionsReport(function(j){return I._reportWindowsOptions(j)})),I.register(x.forwardEvent(I._inputHandler.onCursorMove,I._onCursorMove)),I.register(x.forwardEvent(I._inputHandler.onTitleChange,I._onTitleChange)),I.register(x.forwardEvent(I._inputHandler.onA11yChar,I._onA11yCharEmitter)),I.register(x.forwardEvent(I._inputHandler.onA11yTab,I._onA11yTabEmitter)),I.register(I._bufferService.onResize(function(j){return I._afterResize(j.cols,j.rows)})),I}return y(L,oe),Object.defineProperty(L.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),L.prototype.dispose=function(){var X,I,j;this._isDisposed||(oe.prototype.dispose.call(this),(X=this._renderService)===null||X===void 0||X.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(j=(I=this.element)===null||I===void 0?void 0:I.parentNode)===null||j===void 0||j.removeChild(this.element))},L.prototype._setup=function(){oe.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(L.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),L.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},L.prototype._updateOptions=function(X){var I,j,B,q;switch(oe.prototype._updateOptions.call(this,X),X){case"fontFamily":case"fontSize":(I=this._renderService)===null||I===void 0||I.clear(),(j=this._charSizeService)===null||j===void 0||j.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":(B=this.viewport)===null||B===void 0||B.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new p.AccessibilityManager(this,this._renderService)):((q=this._accessibilityManager)===null||q===void 0||q.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},L.prototype._onTextAreaFocus=function(X){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[I"),this.updateCursorStyle(X),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},L.prototype.blur=function(){var X;return(X=this.textarea)===null||X===void 0?void 0:X.blur()},L.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},L.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var X=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),I=this._bufferService.buffer.y*X,j=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=j+"px",this.textarea.style.top=I+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=X+"px",this.textarea.style.lineHeight=X+"px",this.textarea.style.zIndex="-5"}},L.prototype._initGlobal=function(){var X=this;this._bindKeys(),this.register(t.addDisposableDomListener(this.element,"copy",function(j){X.hasSelection()&&u.copyHandler(j,X._selectionService)}));var I=function(j){return u.handlePasteEvent(j,X.textarea,X._coreService)};this.register(t.addDisposableDomListener(this.textarea,"paste",I)),this.register(t.addDisposableDomListener(this.element,"paste",I)),f.isFirefox?this.register(t.addDisposableDomListener(this.element,"mousedown",function(j){j.button===2&&u.rightClickHandler(j,X.textarea,X.screenElement,X._selectionService,X.options.rightClickSelectsWord)})):this.register(t.addDisposableDomListener(this.element,"contextmenu",function(j){u.rightClickHandler(j,X.textarea,X.screenElement,X._selectionService,X.options.rightClickSelectsWord)})),f.isLinux&&this.register(t.addDisposableDomListener(this.element,"auxclick",function(j){j.button===1&&u.moveTextAreaUnderMouseCursor(j,X.textarea,X.screenElement)}))},L.prototype._bindKeys=function(){var X=this;this.register(t.addDisposableDomListener(this.textarea,"keyup",function(I){return X._keyUp(I)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keydown",function(I){return X._keyDown(I)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keypress",function(I){return X._keyPress(I)},!0)),this.register(t.addDisposableDomListener(this.textarea,"compositionstart",function(){return X._compositionHelper.compositionstart()})),this.register(t.addDisposableDomListener(this.textarea,"compositionupdate",function(I){return X._compositionHelper.compositionupdate(I)})),this.register(t.addDisposableDomListener(this.textarea,"compositionend",function(){return X._compositionHelper.compositionend()})),this.register(this.onRender(function(){return X._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(I){return X._queueLinkification(I.start,I.end)}))},L.prototype.open=function(X){var I=this;if(!X)throw new Error("Terminal requires a parent element.");_e.body.contains(X)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=X.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"),X.appendChild(this.element);var j=_e.createDocumentFragment();this._viewportElement=_e.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),j.appendChild(this._viewportElement),this._viewportScrollArea=_e.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=_e.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=_e.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),j.appendChild(this.screenElement),this.textarea=_e.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",n.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(t.addDisposableDomListener(this.textarea,"focus",function(fe){return I._onTextAreaFocus(fe)})),this.register(t.addDisposableDomListener(this.textarea,"blur",function(){return I._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var B=this._instantiationService.createInstance(U.CoreBrowserService,this.textarea);this._instantiationService.setService(S.ICoreBrowserService,B),this._charSizeService=this._instantiationService.createInstance(k.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(S.ICharSizeService,this._charSizeService),this._compositionView=_e.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(j),this._theme=this.options.theme||this._theme,this._colorManager=new C.ColorManager(_e,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(fe){return I._colorManager.onOptionsChange(fe)})),this._colorManager.setTheme(this._theme);var q=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(v.RenderService,q,this.rows,this.screenElement)),this._instantiationService.setService(S.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(fe){return I._onRender.fire(fe)})),this.onResize(function(fe){return I._renderService.resize(fe.cols,fe.rows)}),this._soundService=this._instantiationService.createInstance(s.SoundService),this._instantiationService.setService(S.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(O.MouseService),this._instantiationService.setService(S.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(o.Viewport,function(fe,ke){return I.scrollLines(fe,ke)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return I.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){I._renderService.onCursorMove(),I._syncTextArea()})),this.register(this.onResize(function(){return I._renderService.onResize(I.cols,I.rows)})),this.register(this.onBlur(function(){return I._renderService.onBlur()})),this.register(this.onFocus(function(){return I._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return I.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(e.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(S.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(fe){return I.scrollLines(fe.amount,fe.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return I._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(fe){return I._renderService.onSelectionChanged(fe.start,fe.end,fe.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(fe){I.textarea.value=fe,I.textarea.focus(),I.textarea.select()})),this.register(this.onScroll(function(){I.viewport.syncScrollArea(),I._selectionService.refresh()})),this.register(t.addDisposableDomListener(this._viewportElement,"scroll",function(){return I._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(l.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return I._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(t.addDisposableDomListener(this.element,"mousedown",function(fe){return I._selectionService.onMouseDown(fe)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new p.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},L.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(i.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(g.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},L.prototype._setTheme=function(X){var I,j,B;this._theme=X,(I=this._colorManager)===null||I===void 0||I.setTheme(X),(j=this._renderService)===null||j===void 0||j.setColors(this._colorManager.colors),(B=this.viewport)===null||B===void 0||B.onThemeChange(this._colorManager.colors)},L.prototype.bindMouse=function(){var X=this,I=this,j=this.element;function B(le){var me,Ie,Me=I._mouseService.getRawByteCoords(le,I.screenElement,I.cols,I.rows);if(!Me)return!1;switch(le.overrideType||le.type){case"mousemove":Ie=32,le.buttons===void 0?(me=3,le.button!==void 0&&(me=le.button<3?le.button:3)):me=1&le.buttons?0:4&le.buttons?1:2&le.buttons?2:3;break;case"mouseup":Ie=0,me=le.button<3?le.button:3;break;case"mousedown":Ie=1,me=le.button<3?le.button:3;break;case"wheel":le.deltaY!==0&&(Ie=le.deltaY<0?0:1),me=4;break;default:return!1}return!(Ie===void 0||me===void 0||me>4)&&I._coreMouseService.triggerMouseEvent({col:Me.x-33,row:Me.y-33,button:me,action:Ie,ctrl:le.ctrlKey,alt:le.altKey,shift:le.shiftKey})}var q={mouseup:null,wheel:null,mousedrag:null,mousemove:null},fe=function(le){return B(le),le.buttons||(X._document.removeEventListener("mouseup",q.mouseup),q.mousedrag&&X._document.removeEventListener("mousemove",q.mousedrag)),X.cancel(le)},ke=function(le){return B(le),le.preventDefault(),X.cancel(le)},Ke=function(le){le.buttons&&B(le)},Pe=function(le){le.buttons||B(le)};this.register(this._coreMouseService.onProtocolChange(function(le){le?(X.optionsService.options.logLevel==="debug"&&X._logService.debug("Binding to mouse events:",X._coreMouseService.explainEvents(le)),X.element.classList.add("enable-mouse-events"),X._selectionService.disable()):(X._logService.debug("Unbinding from mouse events."),X.element.classList.remove("enable-mouse-events"),X._selectionService.enable()),8&le?q.mousemove||(j.addEventListener("mousemove",Pe),q.mousemove=Pe):(j.removeEventListener("mousemove",q.mousemove),q.mousemove=null),16&le?q.wheel||(j.addEventListener("wheel",ke,{passive:!1}),q.wheel=ke):(j.removeEventListener("wheel",q.wheel),q.wheel=null),2&le?q.mouseup||(q.mouseup=fe):(X._document.removeEventListener("mouseup",q.mouseup),q.mouseup=null),4&le?q.mousedrag||(q.mousedrag=Ke):(X._document.removeEventListener("mousemove",q.mousedrag),q.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(t.addDisposableDomListener(j,"mousedown",function(le){if(le.preventDefault(),X.focus(),X._coreMouseService.areMouseEventsActive&&!X._selectionService.shouldForceSelection(le))return B(le),q.mouseup&&X._document.addEventListener("mouseup",q.mouseup),q.mousedrag&&X._document.addEventListener("mousemove",q.mousedrag),X.cancel(le)})),this.register(t.addDisposableDomListener(j,"wheel",function(le){if(!q.wheel){if(!X.buffer.hasScrollback){var me=X.viewport.getLinesScrolled(le);if(me===0)return;for(var Ie=d.C0.ESC+(X._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(le.deltaY<0?"A":"B"),Me="",ve=0;ve<Math.abs(me);ve++)Me+=Ie;X._coreService.triggerDataEvent(Me,!0)}}},{passive:!0})),this.register(t.addDisposableDomListener(j,"wheel",function(le){if(!q.wheel)return X.viewport.onWheel(le)?void 0:X.cancel(le)},{passive:!1})),this.register(t.addDisposableDomListener(j,"touchstart",function(le){if(!X._coreMouseService.areMouseEventsActive)return X.viewport.onTouchStart(le),X.cancel(le)},{passive:!0})),this.register(t.addDisposableDomListener(j,"touchmove",function(le){if(!X._coreMouseService.areMouseEventsActive)return X.viewport.onTouchMove(le)?void 0:X.cancel(le)},{passive:!1}))},L.prototype.refresh=function(X,I){var j;(j=this._renderService)===null||j===void 0||j.refreshRows(X,I)},L.prototype._queueLinkification=function(X,I){var j;(j=this.linkifier)===null||j===void 0||j.linkifyRows(X,I)},L.prototype.updateCursorStyle=function(X){this._selectionService&&this._selectionService.shouldColumnSelect(X)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},L.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},L.prototype.scrollLines=function(X,I){oe.prototype.scrollLines.call(this,X,I),this.refresh(0,this.rows-1)},L.prototype.paste=function(X){u.paste(X,this.textarea,this._coreService)},L.prototype.attachCustomKeyEventHandler=function(X){this._customKeyEventHandler=X},L.prototype.registerLinkMatcher=function(X,I,j){var B=this.linkifier.registerLinkMatcher(X,I,j);return this.refresh(0,this.rows-1),B},L.prototype.deregisterLinkMatcher=function(X){this.linkifier.deregisterLinkMatcher(X)&&this.refresh(0,this.rows-1)},L.prototype.registerLinkProvider=function(X){return this.linkifier2.registerLinkProvider(X)},L.prototype.registerCharacterJoiner=function(X){var I=this._renderService.registerCharacterJoiner(X);return this.refresh(0,this.rows-1),I},L.prototype.deregisterCharacterJoiner=function(X){this._renderService.deregisterCharacterJoiner(X)&&this.refresh(0,this.rows-1)},Object.defineProperty(L.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),L.prototype.addMarker=function(X){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+X)},L.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},L.prototype.select=function(X,I,j){this._selectionService.setSelection(X,I,j)},L.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},L.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]}},L.prototype.clearSelection=function(){var X;(X=this._selectionService)===null||X===void 0||X.clearSelection()},L.prototype.selectAll=function(){var X;(X=this._selectionService)===null||X===void 0||X.selectAll()},L.prototype.selectLines=function(X,I){var j;(j=this._selectionService)===null||j===void 0||j.selectLines(X,I)},L.prototype._keyDown=function(X){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(!this._compositionHelper.keydown(X))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var I=b.evaluateKeyboardEvent(X,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),I.type===3||I.type===2){var j=this.rows-1;return this.scrollLines(I.type===2?-j:j),this.cancel(X,!0)}return I.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(I.cancel&&this.cancel(X,!0),!I.key||(I.key!==d.C0.ETX&&I.key!==d.C0.CR||(this.textarea.value=""),this._onKey.fire({key:I.key,domEvent:X}),this._showCursor(),this._coreService.triggerDataEvent(I.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(X,!0)))},L.prototype._isThirdLevelShift=function(X,I){var j=X.isMac&&!this.options.macOptionIsMeta&&I.altKey&&!I.ctrlKey&&!I.metaKey||X.isWindows&&I.altKey&&I.ctrlKey&&!I.metaKey;return I.type==="keypress"?j:j&&(!I.keyCode||I.keyCode>47)},L.prototype._keyUp=function(X){this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||(function(I){return I.keyCode===16||I.keyCode===17||I.keyCode===18}(X)||this.focus(),this.updateCursorStyle(X))},L.prototype._keyPress=function(X){var I;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)I=X.charCode;else if(X.which===null||X.which===void 0)I=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;I=X.which}return!(!I||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X))&&(I=String.fromCharCode(I),this._onKey.fire({key:I,domEvent:X}),this._showCursor(),this._coreService.triggerDataEvent(I,!0),!0)},L.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},L.prototype.resize=function(X,I){X!==this.cols||I!==this.rows?oe.prototype.resize.call(this,X,I):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},L.prototype._afterResize=function(X,I){var j,B;(j=this._charSizeService)===null||j===void 0||j.measure(),(B=this.viewport)===null||B===void 0||B.syncScrollArea(!0)},L.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 X=1;X<this.rows;X++)this.buffer.lines.push(this.buffer.getBlankLine(E.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},L.prototype.reset=function(){var X,I;this.options.rows=this.rows,this.options.cols=this.cols;var j=this._customKeyEventHandler;this._setup(),oe.prototype.reset.call(this),(X=this._selectionService)===null||X===void 0||X.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1),(I=this.viewport)===null||I===void 0||I.syncScrollArea()},L.prototype._reportWindowsOptions=function(X){if(this._renderService)switch(X){case r.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var I=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),j=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[4;"+j+";"+I+"t");break;case r.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var B=this._renderService.dimensions.scaledCellWidth.toFixed(0),q=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[6;"+q+";"+B+"t")}},L.prototype.cancel=function(X,I){if(this.options.cancelEvents||I)return X.preventDefault(),X.stopPropagation(),!1},L.prototype._visualBell=function(){return!1},L.prototype._soundBell=function(){return this.options.bellStyle==="sound"},L}(N.CoreTerminal);c.Terminal=Z},function(D,c,_){"use strict";var m=this&&this.__decorate||function(d,r,i,a){var e,f=arguments.length,t=f<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(d,r,i,a);else for(var n=d.length-1;n>=0;n--)(e=d[n])&&(t=(f<3?e(t):f>3?e(r,i,t):e(r,i))||t);return f>3&&t&&Object.defineProperty(r,i,t),t},y=this&&this.__param||function(d,r){return function(i,a){r(i,a,d)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;var h=_(5),o=_(1),u=function(){function d(r,i,a,e,f,t){this._textarea=r,this._compositionView=i,this._bufferService=a,this._optionsService=e,this._charSizeService=f,this._coreService=t,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(d.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),d.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},d.prototype.compositionupdate=function(r){var i=this;this._compositionView.textContent=r.data,this.updateCompositionElements(),setTimeout(function(){i._compositionPosition.end=i._textarea.value.length},0)},d.prototype.compositionend=function(){this._finalizeComposition(!0)},d.prototype.keydown=function(r){if(this._isComposing||this._isSendingComposition){if(r.keyCode===229||r.keyCode===16||r.keyCode===17||r.keyCode===18)return!1;this._finalizeComposition(!1)}return r.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},d.prototype._finalizeComposition=function(r){var i=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,r){var a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(i._isSendingComposition){i._isSendingComposition=!1;var f=void 0;f=i._isComposing?i._textarea.value.substring(a.start,a.end):i._textarea.value.substring(a.start),i._coreService.triggerDataEvent(f,!0)}},0)}else{this._isSendingComposition=!1;var e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}},d.prototype._handleAnyTextareaChanges=function(){var r=this,i=this._textarea.value;setTimeout(function(){if(!r._isComposing){var a=r._textarea.value.replace(i,"");a.length>0&&r._coreService.triggerDataEvent(a,!0)}},0)},d.prototype.updateCompositionElements=function(r){var i=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var a=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),e=this._bufferService.buffer.y*a,f=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=f+"px",this._compositionView.style.top=e+"px",this._compositionView.style.height=a+"px",this._compositionView.style.lineHeight=a+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=f+"px",this._textarea.style.top=e+"px",this._textarea.style.width=t.width+"px",this._textarea.style.height=t.height+"px",this._textarea.style.lineHeight=t.height+"px"}r||setTimeout(function(){return i.updateCompositionElements(!0)},0)}},d=m([y(2,o.IBufferService),y(3,o.IOptionsService),y(4,h.ICharSizeService),y(5,o.ICoreService)],d)}();c.CompositionHelper=u},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(e,f){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)n.hasOwnProperty(s)&&(t[s]=n[s])})(e,f)},function(e,f){function t(){this.constructor=e}m(e,f),e.prototype=f===null?Object.create(f):(t.prototype=f.prototype,new t)}),h=this&&this.__decorate||function(e,f,t,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,f,t,n);else for(var g=e.length-1;g>=0;g--)(s=e[g])&&(p=(l<3?s(p):l>3?s(f,t,p):s(f,t))||p);return l>3&&p&&Object.defineProperty(f,t,p),p},o=this&&this.__param||function(e,f){return function(t,n){f(t,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;var u=_(2),d=_(7),r=_(5),i=_(1),a=function(e){function f(t,n,s,l,p,g,b){var x=e.call(this)||this;return x._scrollLines=t,x._viewportElement=n,x._scrollArea=s,x._bufferService=l,x._optionsService=p,x._charSizeService=g,x._renderService=b,x.scrollBarWidth=0,x._currentRowHeight=0,x._lastRecordedBufferLength=0,x._lastRecordedViewportHeight=0,x._lastRecordedBufferHeight=0,x._lastTouchY=0,x._lastScrollTop=0,x._wheelPartialScroll=0,x._refreshAnimationFrame=null,x._ignoreNextScrollEvent=!1,x.scrollBarWidth=x._viewportElement.offsetWidth-x._scrollArea.offsetWidth||15,x.register(d.addDisposableDomListener(x._viewportElement,"scroll",x._onScroll.bind(x))),setTimeout(function(){return x.syncScrollArea()},0),x}return y(f,e),f.prototype.onThemeChange=function(t){this._viewportElement.style.backgroundColor=t.background.css},f.prototype._refresh=function(t){var n=this;if(t)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return n._innerRefresh()}))},f.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var t=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==t&&(this._lastRecordedBufferHeight=t,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var n=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==n&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=n),this._refreshAnimationFrame=null},f.prototype.syncScrollArea=function(t){if(t===void 0&&(t=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(t);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var n=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===n&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(t)}else this._refresh(t)},f.prototype._onScroll=function(t){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var n=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(n,!0)}},f.prototype._bubbleScroll=function(t,n){var s=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(n<0&&this._viewportElement.scrollTop!==0||n>0&&s<this._lastRecordedBufferHeight)||(t.cancelable&&t.preventDefault(),!1)},f.prototype.onWheel=function(t){var n=this._getPixelsScrolled(t);return n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(t,n))},f.prototype._getPixelsScrolled=function(t){if(t.deltaY===0)return 0;var n=this._applyScrollModifier(t.deltaY,t);return t.deltaMode===WheelEvent.DOM_DELTA_LINE?n*=this._currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._currentRowHeight*this._bufferService.rows),n},f.prototype.getLinesScrolled=function(t){if(t.deltaY===0)return 0;var n=this._applyScrollModifier(t.deltaY,t);return t.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(n/=this._currentRowHeight+0,this._wheelPartialScroll+=n,n=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._bufferService.rows),n},f.prototype._applyScrollModifier=function(t,n){var s=this._optionsService.options.fastScrollModifier;return s==="alt"&&n.altKey||s==="ctrl"&&n.ctrlKey||s==="shift"&&n.shiftKey?t*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:t*this._optionsService.options.scrollSensitivity},f.prototype.onTouchStart=function(t){this._lastTouchY=t.touches[0].pageY},f.prototype.onTouchMove=function(t){var n=this._lastTouchY-t.touches[0].pageY;return this._lastTouchY=t.touches[0].pageY,n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(t,n))},f=h([o(3,i.IBufferService),o(4,i.IOptionsService),o(5,r.ICharSizeService),o(6,r.IRenderService)],f)}(u.Disposable);c.Viewport=a},function(D,c,_){"use strict";function m(u){return u.replace(/\r?\n/g,"\r")}function y(u,d){return d?"\x1B[200~"+u+"\x1B[201~":u}function h(u,d,r){u=y(u=m(u),r.decPrivateModes.bracketedPasteMode),r.triggerDataEvent(u,!0),d.value=""}function o(u,d,r){var i=r.getBoundingClientRect(),a=u.clientX-i.left-10,e=u.clientY-i.top-10;d.style.width="20px",d.style.height="20px",d.style.left=a+"px",d.style.top=e+"px",d.style.zIndex="1000",d.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=m,c.bracketTextForPaste=y,c.copyHandler=function(u,d){u.clipboardData&&u.clipboardData.setData("text/plain",d.selectionText),u.preventDefault()},c.handlePasteEvent=function(u,d,r){u.stopPropagation(),u.clipboardData&&h(u.clipboardData.getData("text/plain"),d,r)},c.paste=h,c.moveTextAreaUnderMouseCursor=o,c.rightClickHandler=function(u,d,r,i,a){o(u,d,r),a&&!i.isClickInSelection(u)&&i.selectWordAtCursor(u),d.value=i.selectionText,d.select()}},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(e,f){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)n.hasOwnProperty(s)&&(t[s]=n[s])})(e,f)},function(e,f){function t(){this.constructor=e}m(e,f),e.prototype=f===null?Object.create(f):(t.prototype=f.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;var h=_(2),o=_(15),u=_(21),d=_(22),r=_(24),i=function(){function e(f){this.table=new Uint8Array(f)}return e.prototype.setDefault=function(f,t){o.fill(this.table,f<<4|t)},e.prototype.add=function(f,t,n,s){this.table[t<<8|f]=n<<4|s},e.prototype.addMany=function(f,t,n,s){for(var l=0;l<f.length;l++)this.table[t<<8|f[l]]=n<<4|s},e}();c.TransitionTable=i,c.VT500_TRANSITION_TABLE=function(){var e=new i(4095),f=Array.apply(null,Array(256)).map(function(g,b){return b}),t=function(g,b){return f.slice(g,b)},n=t(32,127),s=t(0,24);s.push(25),s.push.apply(s,t(28,32));var l,p=t(0,14);for(l in e.setDefault(1,0),e.addMany(n,0,2,0),p)e.addMany([24,26,153,154],l,3,0),e.addMany(t(128,144),l,3,0),e.addMany(t(144,152),l,3,0),e.add(156,l,0,0),e.add(27,l,11,1),e.add(157,l,4,8),e.addMany([152,158,159],l,0,7),e.add(155,l,11,3),e.add(144,l,11,9);return e.addMany(s,0,3,0),e.addMany(s,1,3,1),e.add(127,1,0,1),e.addMany(s,8,0,8),e.addMany(s,3,3,3),e.add(127,3,0,3),e.addMany(s,4,3,4),e.add(127,4,0,4),e.addMany(s,6,3,6),e.addMany(s,5,3,5),e.add(127,5,0,5),e.addMany(s,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(t(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(s,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(t(64,127),3,7,0),e.addMany(t(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(t(48,60),4,8,4),e.addMany(t(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(t(32,64),6,0,6),e.add(127,6,0,6),e.addMany(t(64,127),6,0,0),e.addMany(t(32,48),3,9,5),e.addMany(t(32,48),5,9,5),e.addMany(t(48,64),5,0,6),e.addMany(t(64,127),5,7,0),e.addMany(t(32,48),4,9,5),e.addMany(t(32,48),1,9,2),e.addMany(t(32,48),2,9,2),e.addMany(t(48,127),2,10,0),e.addMany(t(48,80),1,10,0),e.addMany(t(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(t(96,127),1,10,0),e.add(80,1,11,9),e.addMany(s,9,0,9),e.add(127,9,0,9),e.addMany(t(28,32),9,0,9),e.addMany(t(32,48),9,9,12),e.addMany(t(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(s,11,0,11),e.addMany(t(32,128),11,0,11),e.addMany(t(28,32),11,0,11),e.addMany(s,10,0,10),e.add(127,10,0,10),e.addMany(t(28,32),10,0,10),e.addMany(t(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(t(32,48),10,9,12),e.addMany(s,12,0,12),e.add(127,12,0,12),e.addMany(t(28,32),12,0,12),e.addMany(t(32,48),12,9,12),e.addMany(t(48,64),12,0,11),e.addMany(t(64,127),12,12,13),e.addMany(t(64,127),10,12,13),e.addMany(t(64,127),9,12,13),e.addMany(s,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(160,0,2,0),e.add(160,8,5,8),e.add(160,6,0,6),e.add(160,11,0,11),e.add(160,13,13,13),e}();var a=function(e){function f(t){t===void 0&&(t=c.VT500_TRANSITION_TABLE);var n=e.call(this)||this;return n._transitions=t,n.initialState=0,n.currentState=n.initialState,n._params=new u.Params,n._params.addParam(0),n._collect=0,n.precedingCodepoint=0,n._printHandlerFb=function(s,l,p){},n._executeHandlerFb=function(s){},n._csiHandlerFb=function(s,l){},n._escHandlerFb=function(s){},n._errorHandlerFb=function(s){return s},n._printHandler=n._printHandlerFb,n._executeHandlers=Object.create(null),n._csiHandlers=Object.create(null),n._escHandlers=Object.create(null),n._oscParser=new d.OscParser,n._dcsParser=new r.DcsParser,n._errorHandler=n._errorHandlerFb,n.setEscHandler({final:"\\"},function(){}),n}return y(f,e),f.prototype._identifier=function(t,n){n===void 0&&(n=[64,126]);var s=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((s=t.prefix.charCodeAt(0))&&60>s||s>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<t.intermediates.length;++l){var p=t.intermediates.charCodeAt(l);if(32>p||p>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");s<<=8,s|=p}}if(t.final.length!==1)throw new Error("final must be a single byte");var g=t.final.charCodeAt(0);if(n[0]>g||g>n[1])throw new Error("final must be in range "+n[0]+" .. "+n[1]);return s<<=8,s|=g},f.prototype.identToString=function(t){for(var n=[];t;)n.push(String.fromCharCode(255&t)),t>>=8;return n.reverse().join("")},f.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},f.prototype.setPrintHandler=function(t){this._printHandler=t},f.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},f.prototype.addEscHandler=function(t,n){var s=this._identifier(t,[48,126]);this._escHandlers[s]===void 0&&(this._escHandlers[s]=[]);var l=this._escHandlers[s];return l.push(n),{dispose:function(){var p=l.indexOf(n);p!==-1&&l.splice(p,1)}}},f.prototype.setEscHandler=function(t,n){this._escHandlers[this._identifier(t,[48,126])]=[n]},f.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},f.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},f.prototype.setExecuteHandler=function(t,n){this._executeHandlers[t.charCodeAt(0)]=n},f.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},f.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},f.prototype.addCsiHandler=function(t,n){var s=this._identifier(t);this._csiHandlers[s]===void 0&&(this._csiHandlers[s]=[]);var l=this._csiHandlers[s];return l.push(n),{dispose:function(){var p=l.indexOf(n);p!==-1&&l.splice(p,1)}}},f.prototype.setCsiHandler=function(t,n){this._csiHandlers[this._identifier(t)]=[n]},f.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},f.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},f.prototype.addDcsHandler=function(t,n){return this._dcsParser.addHandler(this._identifier(t),n)},f.prototype.setDcsHandler=function(t,n){this._dcsParser.setHandler(this._identifier(t),n)},f.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},f.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},f.prototype.addOscHandler=function(t,n){return this._oscParser.addHandler(t,n)},f.prototype.setOscHandler=function(t,n){this._oscParser.setHandler(t,n)},f.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},f.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},f.prototype.setErrorHandler=function(t){this._errorHandler=t},f.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},f.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},f.prototype.parse=function(t,n){for(var s=0,l=0,p=this.currentState,g=this._oscParser,b=this._dcsParser,x=this._collect,E=this._params,C=this._transitions.table,v=0;v<n;++v){switch((l=C[p<<8|((s=t[v])<160?s:160)])>>4){case 2:for(var S=v+1;;++S){if(S>=n||(s=t[S])<32||s>126&&s<160){this._printHandler(t,v,S),v=S-1;break}if(++S>=n||(s=t[S])<32||s>126&&s<160){this._printHandler(t,v,S),v=S-1;break}if(++S>=n||(s=t[S])<32||s>126&&s<160){this._printHandler(t,v,S),v=S-1;break}if(++S>=n||(s=t[S])<32||s>126&&s<160){this._printHandler(t,v,S),v=S-1;break}}break;case 3:this._executeHandlers[s]?this._executeHandlers[s]():this._executeHandlerFb(s),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:s,currentState:p,collect:x,params:E,abort:!1}).abort)return;break;case 7:for(var k=this._csiHandlers[x<<8|s],O=k?k.length-1:-1;O>=0&&k[O](E)===!1;O--);O<0&&this._csiHandlerFb(x<<8|s,E),this.precedingCodepoint=0;break;case 8:do switch(s){case 59:E.addParam(0);break;case 58:E.addSubParam(-1);break;default:E.addDigit(s-48)}while(++v<n&&(s=t[v])>47&&s<60);v--;break;case 9:x<<=8,x|=s;break;case 10:for(var R=this._escHandlers[x<<8|s],U=R?R.length-1:-1;U>=0&&R[U]()===!1;U--);U<0&&this._escHandlerFb(x<<8|s),this.precedingCodepoint=0;break;case 11:E.reset(),E.addParam(0),x=0;break;case 12:b.hook(x<<8|s,E);break;case 13:for(var N=v+1;;++N)if(N>=n||(s=t[N])===24||s===26||s===27||s>127&&s<160){b.put(t,v,N),v=N-1;break}break;case 14:b.unhook(s!==24&&s!==26),s===27&&(l|=1),E.reset(),E.addParam(0),x=0,this.precedingCodepoint=0;break;case 4:g.start();break;case 5:for(var _e=v+1;;_e++)if(_e>=n||(s=t[_e])<32||s>127&&s<=159){g.put(t,v,_e),v=_e-1;break}break;case 6:g.end(s!==24&&s!==26),s===27&&(l|=1),E.reset(),E.addParam(0),x=0,this.precedingCodepoint=0}p=15&l}this._collect=x,this.currentState=p},f}(h.Disposable);c.EscapeSequenceParser=a},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(g,b){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var C in E)E.hasOwnProperty(C)&&(x[C]=E[C])})(g,b)},function(g,b){function x(){this.constructor=g}m(g,b),g.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}),h=this&&this.__decorate||function(g,b,x,E){var C,v=arguments.length,S=v<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(g,b,x,E);else for(var k=g.length-1;k>=0;k--)(C=g[k])&&(S=(v<3?C(S):v>3?C(b,x,S):C(b,x))||S);return v>3&&S&&Object.defineProperty(b,x,S),S},o=this&&this.__param||function(g,b){return function(x,E){b(x,E,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Renderer=void 0;var u=_(41),d=_(47),r=_(48),i=_(49),a=_(29),e=_(2),f=_(5),t=_(1),n=_(25),s=_(0),l=1,p=function(g){function b(x,E,C,v,S,k,O,R,U){var N=g.call(this)||this;N._colors=x,N._screenElement=E,N._bufferService=S,N._charSizeService=k,N._optionsService=O,N._id=l++,N._onRequestRedraw=new s.EventEmitter;var _e=N._optionsService.options.allowTransparency;return N._characterJoinerRegistry=new a.CharacterJoinerRegistry(N._bufferService),N._renderLayers=[new u.TextRenderLayer(N._screenElement,0,N._colors,N._characterJoinerRegistry,_e,N._id,N._bufferService,O),new d.SelectionRenderLayer(N._screenElement,1,N._colors,N._id,N._bufferService,O),new i.LinkRenderLayer(N._screenElement,2,N._colors,N._id,C,v,N._bufferService,O),new r.CursorRenderLayer(N._screenElement,3,N._colors,N._id,N._onRequestRedraw,N._bufferService,O,R,U)],N.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},N._devicePixelRatio=window.devicePixelRatio,N._updateDimensions(),N.onOptionsChanged(),N}return y(b,g),Object.defineProperty(b.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){for(var x=0,E=this._renderLayers;x<E.length;x++)E[x].dispose();g.prototype.dispose.call(this),n.removeTerminalFromCache(this._id)},b.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},b.prototype.setColors=function(x){this._colors=x;for(var E=0,C=this._renderLayers;E<C.length;E++){var v=C[E];v.setColors(this._colors),v.reset()}},b.prototype.onResize=function(x,E){this._updateDimensions();for(var C=0,v=this._renderLayers;C<v.length;C++)v[C].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},b.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},b.prototype.onBlur=function(){this._runOperation(function(x){return x.onBlur()})},b.prototype.onFocus=function(){this._runOperation(function(x){return x.onFocus()})},b.prototype.onSelectionChanged=function(x,E,C){C===void 0&&(C=!1),this._runOperation(function(v){return v.onSelectionChanged(x,E,C)})},b.prototype.onCursorMove=function(){this._runOperation(function(x){return x.onCursorMove()})},b.prototype.onOptionsChanged=function(){this._runOperation(function(x){return x.onOptionsChanged()})},b.prototype.clear=function(){this._runOperation(function(x){return x.reset()})},b.prototype._runOperation=function(x){for(var E=0,C=this._renderLayers;E<C.length;E++)x(C[E])},b.prototype.renderRows=function(x,E){for(var C=0,v=this._renderLayers;C<v.length;C++)v[C].onGridChanged(x,E)},b.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)},b.prototype.registerCharacterJoiner=function(x){return this._characterJoinerRegistry.registerCharacterJoiner(x)},b.prototype.deregisterCharacterJoiner=function(x){return this._characterJoinerRegistry.deregisterCharacterJoiner(x)},b=h([o(4,t.IBufferService),o(5,f.ICharSizeService),o(6,t.IOptionsService),o(7,t.ICoreService),o(8,f.ICoreBrowserService)],b)}(e.Disposable);c.Renderer=p},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(e,f){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)n.hasOwnProperty(s)&&(t[s]=n[s])})(e,f)},function(e,f){function t(){this.constructor=e}m(e,f),e.prototype=f===null?Object.create(f):(t.prototype=f.prototype,new t)});Object.defineProperty(c,"__esModule",{value:!0}),c.TextRenderLayer=void 0;var h=_(42),o=_(13),u=_(6),d=_(3),r=_(29),i=_(4),a=function(e){function f(t,n,s,l,p,g,b,x){var E=e.call(this,t,"text",n,p,s,g,b,x)||this;return E._characterWidth=0,E._characterFont="",E._characterOverlapCache={},E._workCell=new i.CellData,E._state=new h.GridCache,E._characterJoinerRegistry=l,E}return y(f,e),f.prototype.resize=function(t){e.prototype.resize.call(this,t);var n=this._getFont(!1,!1);this._characterWidth===t.scaledCharWidth&&this._characterFont===n||(this._characterWidth=t.scaledCharWidth,this._characterFont=n,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},f.prototype.reset=function(){this._state.clear(),this._clearAll()},f.prototype._forEachCell=function(t,n,s,l){for(var p=t;p<=n;p++)for(var g=p+this._bufferService.buffer.ydisp,b=this._bufferService.buffer.lines.get(g),x=s?s.getJoinedCharacters(g):[],E=0;E<this._bufferService.cols;E++){b.loadCell(E,this._workCell);var C=this._workCell,v=!1,S=E;if(C.getWidth()!==0){if(x.length>0&&E===x[0][0]){v=!0;var k=x.shift();C=new r.JoinedCellData(this._workCell,b.translateToString(!0,k[0],k[1]),k[1]-k[0]),S=k[1]-1}!v&&this._isOverlapping(C)&&S<b.length-1&&b.getCodePoint(S+1)===d.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=2<<22),l(C,E,p),E=S}}},f.prototype._drawBackground=function(t,n){var s=this,l=this._ctx,p=this._bufferService.cols,g=0,b=0,x=null;l.save(),this._forEachCell(t,n,null,function(E,C,v){var S=null;E.isInverse()?S=E.isFgDefault()?s._colors.foreground.css:E.isFgRGB()?"rgb("+u.AttributeData.toColorRGB(E.getFgColor()).join(",")+")":s._colors.ansi[E.getFgColor()].css:E.isBgRGB()?S="rgb("+u.AttributeData.toColorRGB(E.getBgColor()).join(",")+")":E.isBgPalette()&&(S=s._colors.ansi[E.getBgColor()].css),x===null&&(g=C,b=v),v!==b?(l.fillStyle=x||"",s._fillCells(g,b,p-g,1),g=C,b=v):x!==S&&(l.fillStyle=x||"",s._fillCells(g,b,C-g,1),g=C,b=v),x=S}),x!==null&&(l.fillStyle=x,this._fillCells(g,b,p-g,1)),l.restore()},f.prototype._drawForeground=function(t,n){var s=this;this._forEachCell(t,n,this._characterJoinerRegistry,function(l,p,g){if(!l.isInvisible()&&(s._drawChars(l,p,g),l.isUnderline())){if(s._ctx.save(),l.isInverse())if(l.isBgDefault())s._ctx.fillStyle=s._colors.background.css;else if(l.isBgRGB())s._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getBgColor()).join(",")+")";else{var b=l.getBgColor();s._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&b<8&&(b+=8),s._ctx.fillStyle=s._colors.ansi[b].css}else if(l.isFgDefault())s._ctx.fillStyle=s._colors.foreground.css;else if(l.isFgRGB())s._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getFgColor()).join(",")+")";else{var x=l.getFgColor();s._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&x<8&&(x+=8),s._ctx.fillStyle=s._colors.ansi[x].css}s._fillBottomLineAtCells(p,g,l.getWidth()),s._ctx.restore()}})},f.prototype.onGridChanged=function(t,n){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,t,this._bufferService.cols,n-t+1),this._drawBackground(t,n),this._drawForeground(t,n))},f.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},f.prototype._isOverlapping=function(t){if(t.getWidth()!==1||t.getCode()<256)return!1;var n=t.getChars();if(this._characterOverlapCache.hasOwnProperty(n))return this._characterOverlapCache[n];this._ctx.save(),this._ctx.font=this._characterFont;var s=Math.floor(this._ctx.measureText(n).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[n]=s,s},f}(o.BaseRenderLayer);c.TextRenderLayer=a},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.GridCache=void 0;var m=function(){function y(){this.cache=[]}return y.prototype.resize=function(h,o){for(var u=0;u<h;u++){this.cache.length<=u&&this.cache.push([]);for(var d=this.cache[u].length;d<o;d++)this.cache[u].push(void 0);this.cache[u].length=o}this.cache.length=h},y.prototype.clear=function(){for(var h=0;h<this.cache.length;h++)for(var o=0;o<this.cache[h].length;o++)this.cache[h][o]=void 0},y}();c.GridCache=m},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(s,l){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var b in g)g.hasOwnProperty(b)&&(p[b]=g[b])})(s,l)},function(s,l){function p(){this.constructor=s}m(s,l),s.prototype=l===null?Object.create(l):(p.prototype=l.prototype,new p)});Object.defineProperty(c,"__esModule",{value:!0}),c.NoneCharAtlas=c.DynamicCharAtlas=c.getGlyphCacheKey=void 0;var h=_(9),o=_(44),u=_(27),d=_(46),r=_(11),i=_(28),a=_(10),e={css:"rgba(0, 0, 0, 0)",rgba:0};function f(s){return s.code<<21|s.bg<<12|s.fg<<3|(s.bold?0:4)+(s.dim?0:2)+(s.italic?0:1)}c.getGlyphCacheKey=f;var t=function(s){function l(p,g){var b=s.call(this)||this;b._config=g,b._drawToCacheCount=0,b._glyphsWaitingOnBitmap=[],b._bitmapCommitTimeout=null,b._bitmap=null,b._cacheCanvas=p.createElement("canvas"),b._cacheCanvas.width=1024,b._cacheCanvas.height=1024,b._cacheCtx=i.throwIfFalsy(b._cacheCanvas.getContext("2d",{alpha:!0}));var x=p.createElement("canvas");x.width=b._config.scaledCharWidth,x.height=b._config.scaledCharHeight,b._tmpCtx=i.throwIfFalsy(x.getContext("2d",{alpha:b._config.allowTransparency})),b._width=Math.floor(1024/b._config.scaledCharWidth),b._height=Math.floor(1024/b._config.scaledCharHeight);var E=b._width*b._height;return b._cacheMap=new d.LRUMap(E),b._cacheMap.prealloc(E),b}return y(l,s),l.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},l.prototype.beginFrame=function(){this._drawToCacheCount=0},l.prototype.draw=function(p,g,b,x){if(g.code===32)return!0;if(!this._canCache(g))return!1;var E=f(g),C=this._cacheMap.get(E);if(C!=null)return this._drawFromCache(p,C,b,x),!0;if(this._drawToCacheCount<100){var v=void 0;v=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var S=this._drawToCache(g,v);return this._cacheMap.set(E,S),this._drawFromCache(p,S,b,x),!0}return!1},l.prototype._canCache=function(p){return p.code<256},l.prototype._toCoordinateX=function(p){return p%this._width*this._config.scaledCharWidth},l.prototype._toCoordinateY=function(p){return Math.floor(p/this._width)*this._config.scaledCharHeight},l.prototype._drawFromCache=function(p,g,b,x){if(!g.isEmpty){var E=this._toCoordinateX(g.index),C=this._toCoordinateY(g.index);p.drawImage(g.inBitmap?this._bitmap:this._cacheCanvas,E,C,this._config.scaledCharWidth,this._config.scaledCharHeight,b,x,this._config.scaledCharWidth,this._config.scaledCharHeight)}},l.prototype._getColorFromAnsiIndex=function(p){return p<this._config.colors.ansi.length?this._config.colors.ansi[p]:u.DEFAULT_ANSI_COLORS[p]},l.prototype._getBackgroundColor=function(p){return this._config.allowTransparency?e:p.bg===h.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:p.bg<256?this._getColorFromAnsiIndex(p.bg):this._config.colors.background},l.prototype._getForegroundColor=function(p){return p.fg===h.INVERTED_DEFAULT_COLOR?a.color.opaque(this._config.colors.background):p.fg<256?this._getColorFromAnsiIndex(p.fg):this._config.colors.foreground},l.prototype._drawToCache=function(p,g){this._drawToCacheCount++,this._tmpCtx.save();var b=this._getBackgroundColor(p);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=b.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var x=p.bold?this._config.fontWeightBold:this._config.fontWeight,E=p.italic?"italic":"";this._tmpCtx.font=E+" "+x+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(p).css,p.dim&&(this._tmpCtx.globalAlpha=h.DIM_OPACITY),this._tmpCtx.fillText(p.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var C=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),v=!1;this._config.allowTransparency||(v=function(R,U){for(var N=!0,_e=U.rgba>>>24,Z=U.rgba>>>16&255,oe=U.rgba>>>8&255,L=0;L<R.data.length;L+=4)R.data[L]===_e&&R.data[L+1]===Z&&R.data[L+2]===oe?R.data[L+3]=0:N=!1;return N}(C,b));var S=this._toCoordinateX(g),k=this._toCoordinateY(g);this._cacheCtx.putImageData(C,S,k);var O={index:g,isEmpty:v,inBitmap:!1};return this._addGlyphToBitmap(O),O},l.prototype._addGlyphToBitmap=function(p){var g=this;!("createImageBitmap"in window)||r.isFirefox||r.isSafari||(this._glyphsWaitingOnBitmap.push(p),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return g._generateBitmap()},100)))},l.prototype._generateBitmap=function(){var p=this,g=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(b){p._bitmap=b;for(var x=0;x<g.length;x++)g[x].inBitmap=!0}),this._bitmapCommitTimeout=null},l}(o.BaseCharAtlas);c.DynamicCharAtlas=t;var n=function(s){function l(p,g){return s.call(this)||this}return y(l,s),l.prototype.draw=function(p,g,b,x){return!1},l}(o.BaseCharAtlas);c.NoneCharAtlas=n},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BaseCharAtlas=void 0;var m=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}();c.BaseCharAtlas=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;var m=function(){function y(){this._color={},this._rgba={}}return y.prototype.clear=function(){this._color={},this._rgba={}},y.prototype.setCss=function(h,o,u){this._rgba[h]||(this._rgba[h]={}),this._rgba[h][o]=u},y.prototype.getCss=function(h,o){return this._rgba[h]?this._rgba[h][o]:void 0},y.prototype.setColor=function(h,o,u){this._color[h]||(this._color[h]={}),this._color[h][o]=u},y.prototype.getColor=function(h,o){return this._color[h]?this._color[h][o]:void 0},y}();c.ColorContrastCache=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.LRUMap=void 0;var m=function(){function y(h){this.capacity=h,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return y.prototype._unlinkNode=function(h){var o=h.prev,u=h.next;h===this._head&&(this._head=u),h===this._tail&&(this._tail=o),o!==null&&(o.next=u),u!==null&&(u.prev=o)},y.prototype._appendNode=function(h){var o=this._tail;o!==null&&(o.next=h),h.prev=o,h.next=null,this._tail=h,this._head===null&&(this._head=h)},y.prototype.prealloc=function(h){for(var o=this._nodePool,u=0;u<h;u++)o.push({prev:null,next:null,key:null,value:null})},y.prototype.get=function(h){var o=this._map[h];return o!==void 0?(this._unlinkNode(o),this._appendNode(o),o.value):null},y.prototype.peekValue=function(h){var o=this._map[h];return o!==void 0?o.value:null},y.prototype.peek=function(){var h=this._head;return h===null?null:h.value},y.prototype.set=function(h,o){var u=this._map[h];if(u!==void 0)u=this._map[h],this._unlinkNode(u),u.value=o;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=h,u.value=o,this._map[h]=u;else{var d=this._nodePool;d.length>0?((u=d.pop()).key=h,u.value=o):u={prev:null,next:null,key:h,value:o},this._map[h]=u,this.size++}this._appendNode(u)},y}();c.LRUMap=m},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(o,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,r){d.__proto__=r}||function(d,r){for(var i in r)r.hasOwnProperty(i)&&(d[i]=r[i])})(o,u)},function(o,u){function d(){this.constructor=o}m(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionRenderLayer=void 0;var h=function(o){function u(d,r,i,a,e,f){var t=o.call(this,d,"selection",r,!0,i,a,e,f)||this;return t._clearState(),t}return y(u,o),u.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},u.prototype.resize=function(d){o.prototype.resize.call(this,d),this._clearState()},u.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},u.prototype.onSelectionChanged=function(d,r,i){if(this._didStateChange(d,r,i,this._bufferService.buffer.ydisp))if(this._clearAll(),d&&r){var a=d[1]-this._bufferService.buffer.ydisp,e=r[1]-this._bufferService.buffer.ydisp,f=Math.max(a,0),t=Math.min(e,this._bufferService.rows-1);if(!(f>=this._bufferService.rows||t<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,i){var n=d[0],s=r[0]-n,l=t-f+1;this._fillCells(n,f,s,l)}else{n=a===f?d[0]:0;var p=f===t?r[0]:this._bufferService.cols;this._fillCells(n,f,p-n,1);var g=Math.max(t-f-1,0);if(this._fillCells(0,f+1,this._bufferService.cols,g),f!==t){var b=e===t?r[0]:this._bufferService.cols;this._fillCells(0,t,b,1)}}this._state.start=[d[0],d[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},u.prototype._didStateChange=function(d,r,i,a){return!this._areCoordinatesEqual(d,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||i!==this._state.columnSelectMode||a!==this._state.ydisp},u.prototype._areCoordinatesEqual=function(d,r){return!(!d||!r)&&d[0]===r[0]&&d[1]===r[1]},u}(_(13).BaseRenderLayer);c.SelectionRenderLayer=h},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(r,i){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,e){a.__proto__=e}||function(a,e){for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])})(r,i)},function(r,i){function a(){this.constructor=r}m(r,i),r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)});Object.defineProperty(c,"__esModule",{value:!0}),c.CursorRenderLayer=void 0;var h=_(13),o=_(4),u=function(r){function i(a,e,f,t,n,s,l,p,g){var b=r.call(this,a,"cursor",e,!0,f,t,s,l)||this;return b._onRequestRedraw=n,b._coreService=p,b._coreBrowserService=g,b._cell=new o.CellData,b._state={x:0,y:0,isFocused:!1,style:"",width:0},b._cursorRenderers={bar:b._renderBarCursor.bind(b),block:b._renderBlockCursor.bind(b),underline:b._renderUnderlineCursor.bind(b)},b}return y(i,r),i.prototype.resize=function(a){r.prototype.resize.call(this,a),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},i.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},i.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onOptionsChanged=function(){var a,e=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new d(this._coreBrowserService.isFocused,function(){e._render(!0)})):((a=this._cursorBlinkStateManager)===null||a===void 0||a.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},i.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype.onGridChanged=function(a,e){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype._render=function(a){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var e=this._bufferService.buffer.ybase+this._bufferService.buffer.y,f=e-this._bufferService.buffer.ydisp;if(f<0||f>=this._bufferService.rows)this._clearCursor();else{var t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(e).loadCell(t,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var n=this._optionsService.options.cursorStyle;return n&&n!=="block"?this._cursorRenderers[n](t,f,this._cell):this._renderBlurCursor(t,f,this._cell),this._ctx.restore(),this._state.x=t,this._state.y=f,this._state.isFocused=!1,this._state.style=n,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===t&&this._state.y===f&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](t,f,this._cell),this._ctx.restore(),this._state.x=t,this._state.y=f,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},i.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})},i.prototype._renderBarCursor=function(a,e,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(a,e,this._optionsService.options.cursorWidth),this._ctx.restore()},i.prototype._renderBlockCursor=function(a,e,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(a,e,f.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(f,a,e),this._ctx.restore()},i.prototype._renderUnderlineCursor=function(a,e,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(a,e),this._ctx.restore()},i.prototype._renderBlurCursor=function(a,e,f){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(a,e,f.getWidth(),1),this._ctx.restore()},i}(h.BaseRenderLayer);c.CursorRenderLayer=u;var d=function(){function r(i,a){this._renderCallback=a,this.isCursorVisible=!0,i&&this._restartInterval()}return Object.defineProperty(r.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),r.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)},r.prototype.restartBlinkAnimation=function(){var i=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){i._renderCallback(),i._animationFrame=void 0})))},r.prototype._restartInterval=function(i){var a=this;i===void 0&&(i=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(a._animationTimeRestarted){var e=600-(Date.now()-a._animationTimeRestarted);if(a._animationTimeRestarted=void 0,e>0)return void a._restartInterval(e)}a.isCursorVisible=!1,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0}),a._blinkInterval=window.setInterval(function(){if(a._animationTimeRestarted){var f=600-(Date.now()-a._animationTimeRestarted);return a._animationTimeRestarted=void 0,void a._restartInterval(f)}a.isCursorVisible=!a.isCursorVisible,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0})},600)},i)},r.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)},r.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},r}()},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(r,i){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,e){a.__proto__=e}||function(a,e){for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])})(r,i)},function(r,i){function a(){this.constructor=r}m(r,i),r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)});Object.defineProperty(c,"__esModule",{value:!0}),c.LinkRenderLayer=void 0;var h=_(13),o=_(9),u=_(26),d=function(r){function i(a,e,f,t,n,s,l,p){var g=r.call(this,a,"link",e,!0,f,t,l,p)||this;return n.onShowLinkUnderline(function(b){return g._onShowLinkUnderline(b)}),n.onHideLinkUnderline(function(b){return g._onHideLinkUnderline(b)}),s.onShowLinkUnderline(function(b){return g._onShowLinkUnderline(b)}),s.onHideLinkUnderline(function(b){return g._onHideLinkUnderline(b)}),g}return y(i,r),i.prototype.resize=function(a){r.prototype.resize.call(this,a),this._state=void 0},i.prototype.reset=function(){this._clearCurrentLink()},i.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var a=this._state.y2-this._state.y1-1;a>0&&this._clearCells(0,this._state.y1+1,this._state.cols,a),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},i.prototype._onShowLinkUnderline=function(a){if(a.fg===o.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:a.fg&&u.is256Color(a.fg)?this._ctx.fillStyle=this._colors.ansi[a.fg].css:this._ctx.fillStyle=this._colors.foreground.css,a.y1===a.y2)this._fillBottomLineAtCells(a.x1,a.y1,a.x2-a.x1);else{this._fillBottomLineAtCells(a.x1,a.y1,a.cols-a.x1);for(var e=a.y1+1;e<a.y2;e++)this._fillBottomLineAtCells(0,e,a.cols);this._fillBottomLineAtCells(0,a.y2,a.x2)}this._state=a},i.prototype._onHideLinkUnderline=function(a){this._clearCurrentLink()},i}(h.BaseRenderLayer);c.LinkRenderLayer=d},function(D,c,_){"use strict";var m=this&&this.__decorate||function(r,i,a,e){var f,t=arguments.length,n=t<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,a):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,i,a,e);else for(var s=r.length-1;s>=0;s--)(f=r[s])&&(n=(t<3?f(n):t>3?f(i,a,n):f(i,a))||n);return t>3&&n&&Object.defineProperty(i,a,n),n},y=this&&this.__param||function(r,i){return function(a,e){i(a,e,r)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZone=c.Linkifier=void 0;var h=_(0),o=_(1),u=function(){function r(i,a,e){this._bufferService=i,this._logService=a,this._unicodeService=e,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new h.EventEmitter,this._onHideLinkUnderline=new h.EventEmitter,this._onLinkTooltip=new h.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(r.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),r.prototype.attachToDom=function(i,a){this._element=i,this._mouseZoneManager=a},r.prototype.linkifyRows=function(i,a){var e=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=i,this._rowsToLinkify.end=a):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,i),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,a)),this._mouseZoneManager.clearAll(i,a),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return e._linkifyRows()},r._timeBeforeLatency))},r.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var i=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var a=i.ydisp+this._rowsToLinkify.start;if(!(a>=i.lines.length)){for(var e=i.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,f=Math.ceil(2e3/this._bufferService.cols),t=this._bufferService.buffer.iterator(!1,a,e,f,f);t.hasNext();)for(var n=t.next(),s=0;s<this._linkMatchers.length;s++)this._doLinkifyRow(n.range.first,n.content,this._linkMatchers[s]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},r.prototype.registerLinkMatcher=function(i,a,e){if(e===void 0&&(e={}),!a)throw new Error("handler must be defined");var f={id:this._nextLinkMatcherId++,regex:i,handler:a,matchIndex:e.matchIndex,validationCallback:e.validationCallback,hoverTooltipCallback:e.tooltipCallback,hoverLeaveCallback:e.leaveCallback,willLinkActivate:e.willLinkActivate,priority:e.priority||0};return this._addLinkMatcherToList(f),f.id},r.prototype._addLinkMatcherToList=function(i){if(this._linkMatchers.length!==0){for(var a=this._linkMatchers.length-1;a>=0;a--)if(i.priority<=this._linkMatchers[a].priority)return void this._linkMatchers.splice(a+1,0,i);this._linkMatchers.splice(0,0,i)}else this._linkMatchers.push(i)},r.prototype.deregisterLinkMatcher=function(i){for(var a=0;a<this._linkMatchers.length;a++)if(this._linkMatchers[a].id===i)return this._linkMatchers.splice(a,1),!0;return!1},r.prototype._doLinkifyRow=function(i,a,e){for(var f,t=this,n=new RegExp(e.regex.source,(e.regex.flags||"")+"g"),s=-1,l=function(){var g=f[typeof e.matchIndex!="number"?0:e.matchIndex];if(!g)return p._logService.debug("match found without corresponding matchIndex",f,e),"break";if(s=a.indexOf(g,s+1),n.lastIndex=s+g.length,s<0)return"break";var b=p._bufferService.buffer.stringIndexToBufferIndex(i,s);if(b[0]<0)return"break";var x=p._bufferService.buffer.lines.get(b[0]);if(!x)return"break";var E=x.getFg(b[1]),C=E?E>>9&511:void 0;e.validationCallback?e.validationCallback(g,function(v){t._rowsTimeoutId||v&&t._addLink(b[1],b[0]-t._bufferService.buffer.ydisp,g,e,C)}):p._addLink(b[1],b[0]-p._bufferService.buffer.ydisp,g,e,C)},p=this;(f=n.exec(a))!==null&&l()!=="break";);},r.prototype._addLink=function(i,a,e,f,t){var n=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(e),l=i%this._bufferService.cols,p=a+Math.floor(i/this._bufferService.cols),g=(l+s)%this._bufferService.cols,b=p+Math.floor((l+s)/this._bufferService.cols);g===0&&(g=this._bufferService.cols,b--),this._mouseZoneManager.add(new d(l+1,p+1,g+1,b+1,function(x){if(f.handler)return f.handler(x,e);var E=window.open();E?(E.opener=null,E.location.href=e):console.warn("Opening link blocked as opener could not be cleared")},function(){n._onShowLinkUnderline.fire(n._createLinkHoverEvent(l,p,g,b,t)),n._element.classList.add("xterm-cursor-pointer")},function(x){n._onLinkTooltip.fire(n._createLinkHoverEvent(l,p,g,b,t)),f.hoverTooltipCallback&&f.hoverTooltipCallback(x,e,{start:{x:l,y:p},end:{x:g,y:b}})},function(){n._onHideLinkUnderline.fire(n._createLinkHoverEvent(l,p,g,b,t)),n._element.classList.remove("xterm-cursor-pointer"),f.hoverLeaveCallback&&f.hoverLeaveCallback()},function(x){return!f.willLinkActivate||f.willLinkActivate(x,e)}))}},r.prototype._createLinkHoverEvent=function(i,a,e,f,t){return{x1:i,y1:a,x2:e,y2:f,cols:this._bufferService.cols,fg:t}},r._timeBeforeLatency=200,r=m([y(0,o.IBufferService),y(1,o.ILogService),y(2,o.IUnicodeService)],r)}();c.Linkifier=u;var d=function(r,i,a,e,f,t,n,s,l){this.x1=r,this.y1=i,this.x2=a,this.y2=e,this.clickCallback=f,this.hoverCallback=t,this.tooltipCallback=n,this.leaveCallback=s,this.willLinkActivate=l};c.MouseZone=d},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(g,b){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var C in E)E.hasOwnProperty(C)&&(x[C]=E[C])})(g,b)},function(g,b){function x(){this.constructor=g}m(g,b),g.prototype=b===null?Object.create(b):(x.prototype=b.prototype,new x)}),h=this&&this.__decorate||function(g,b,x,E){var C,v=arguments.length,S=v<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(g,b,x,E);else for(var k=g.length-1;k>=0;k--)(C=g[k])&&(S=(v<3?C(S):v>3?C(b,x,S):C(b,x))||S);return v>3&&S&&Object.defineProperty(b,x,S),S},o=this&&this.__param||function(g,b){return function(x,E){b(x,E,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;var u=_(11),d=_(52),r=_(4),i=_(0),a=_(5),e=_(1),f=_(30),t=_(53),n=_(2),s="\xA0",l=new RegExp(s,"g"),p=function(g){function b(x,E,C,v,S,k,O){var R=g.call(this)||this;return R._element=x,R._screenElement=E,R._bufferService=C,R._coreService=v,R._mouseService=S,R._optionsService=k,R._renderService=O,R._dragScrollAmount=0,R._enabled=!0,R._workCell=new r.CellData,R._mouseDownTimeStamp=0,R._onLinuxMouseSelection=R.register(new i.EventEmitter),R._onRedrawRequest=R.register(new i.EventEmitter),R._onSelectionChange=R.register(new i.EventEmitter),R._onRequestScrollLines=R.register(new i.EventEmitter),R._mouseMoveListener=function(U){return R._onMouseMove(U)},R._mouseUpListener=function(U){return R._onMouseUp(U)},R._coreService.onUserInput(function(){R.hasSelection&&R.clearSelection()}),R._trimListener=R._bufferService.buffer.lines.onTrim(function(U){return R._onTrim(U)}),R.register(R._bufferService.buffers.onBufferActivate(function(U){return R._onBufferActivate(U)})),R.enable(),R._model=new d.SelectionModel(R._bufferService),R._activeSelectionMode=0,R}return y(b,g),Object.defineProperty(b.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){this._removeMouseDownListeners()},b.prototype.reset=function(){this.clearSelection()},b.prototype.disable=function(){this.clearSelection(),this._enabled=!1},b.prototype.enable=function(){this._enabled=!0},Object.defineProperty(b.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"hasSelection",{get:function(){var x=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!x||!E)&&(x[0]!==E[0]||x[1]!==E[1])},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"selectionText",{get:function(){var x=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!x||!E)return"";var C=this._bufferService.buffer,v=[];if(this._activeSelectionMode===3){if(x[0]===E[0])return"";for(var S=x[1];S<=E[1];S++){var k=C.translateBufferLineToString(S,!0,x[0],E[0]);v.push(k)}}else{var O=x[1]===E[1]?E[0]:void 0;for(v.push(C.translateBufferLineToString(x[1],!0,x[0],O)),S=x[1]+1;S<=E[1]-1;S++){var R=C.lines.get(S);k=C.translateBufferLineToString(S,!0),R&&R.isWrapped?v[v.length-1]+=k:v.push(k)}x[1]!==E[1]&&(R=C.lines.get(E[1]),k=C.translateBufferLineToString(E[1],!0,0,E[0]),R&&R.isWrapped?v[v.length-1]+=k:v.push(k))}return v.map(function(U){return U.replace(l," ")}).join(u.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),b.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},b.prototype.refresh=function(x){var E=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return E._refresh()})),u.isLinux&&x&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},b.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},b.prototype.isClickInSelection=function(x){var E=this._getMouseBufferCoords(x),C=this._model.finalSelectionStart,v=this._model.finalSelectionEnd;return!!(C&&v&&E)&&this._areCoordsInSelection(E,C,v)},b.prototype._areCoordsInSelection=function(x,E,C){return x[1]>E[1]&&x[1]<C[1]||E[1]===C[1]&&x[1]===E[1]&&x[0]>=E[0]&&x[0]<C[0]||E[1]<C[1]&&x[1]===C[1]&&x[0]<C[0]||E[1]<C[1]&&x[1]===E[1]&&x[0]>=E[0]},b.prototype.selectWordAtCursor=function(x){var E=this._getMouseBufferCoords(x);E&&(this._selectWordAt(E,!1),this._model.selectionEnd=void 0,this.refresh(!0))},b.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},b.prototype.selectLines=function(x,E){this._model.clearSelection(),x=Math.max(x,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,x],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()},b.prototype._onTrim=function(x){this._model.onTrim(x)&&this.refresh()},b.prototype._getMouseBufferCoords=function(x){var E=this._mouseService.getCoords(x,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E},b.prototype._getMouseEventScrollAmount=function(x){var E=f.getCoordsRelativeToElement(x,this._screenElement)[1],C=this._renderService.dimensions.canvasHeight;return E>=0&&E<=C?0:(E>C&&(E-=C),E=Math.min(Math.max(E,-50),50),(E/=50)/Math.abs(E)+Math.round(14*E))},b.prototype.shouldForceSelection=function(x){return u.isMac?x.altKey&&this._optionsService.options.macOptionClickForcesSelection:x.shiftKey},b.prototype.onMouseDown=function(x){if(this._mouseDownTimeStamp=x.timeStamp,(x.button!==2||!this.hasSelection)&&x.button===0){if(!this._enabled){if(!this.shouldForceSelection(x))return;x.stopPropagation()}x.preventDefault(),this._dragScrollAmount=0,this._enabled&&x.shiftKey?this._onIncrementalClick(x):x.detail===1?this._onSingleClick(x):x.detail===2?this._onDoubleClick(x):x.detail===3&&this._onTripleClick(x),this._addMouseDownListeners(),this.refresh(!0)}},b.prototype._addMouseDownListeners=function(){var x=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return x._dragScroll()},50)},b.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},b.prototype._onIncrementalClick=function(x){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(x))},b.prototype._onSingleClick=function(x){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(x)?3:0,this._model.selectionStart=this._getMouseBufferCoords(x),this._model.selectionStart){this._model.selectionEnd=void 0;var E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},b.prototype._onDoubleClick=function(x){var E=this._getMouseBufferCoords(x);E&&(this._activeSelectionMode=1,this._selectWordAt(E,!0))},b.prototype._onTripleClick=function(x){var E=this._getMouseBufferCoords(x);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))},b.prototype.shouldColumnSelect=function(x){return x.altKey&&!(u.isMac&&this._optionsService.options.macOptionClickForcesSelection)},b.prototype._onMouseMove=function(x){if(x.stopImmediatePropagation(),this._model.selectionStart){var E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(x),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(x),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var C=this._bufferService.buffer;if(this._model.selectionEnd[1]<C.lines.length){var v=C.lines.get(this._model.selectionEnd[1]);v&&v.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},b.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var x=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(x.ydisp+this._bufferService.rows,x.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=x.ydisp),this.refresh()}},b.prototype._onMouseUp=function(x){var E=x.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&x.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var C=this._mouseService.getCoords(x,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){var v=t.moveToCellSequence(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(v,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},b.prototype._onBufferActivate=function(x){var E=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=x.activeBuffer.lines.onTrim(function(C){return E._onTrim(C)})},b.prototype._convertViewportColToCharacterIndex=function(x,E){for(var C=E[0],v=0;E[0]>=v;v++){var S=x.loadCell(v,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:S>1&&E[0]!==v&&(C+=S-1)}return C},b.prototype.setSelection=function(x,E,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[x,E],this._model.selectionStartLength=C,this.refresh()},b.prototype._getWordAt=function(x,E,C,v){if(C===void 0&&(C=!0),v===void 0&&(v=!0),!(x[0]>=this._bufferService.cols)){var S=this._bufferService.buffer,k=S.lines.get(x[1]);if(k){var O=S.translateBufferLineToString(x[1],!1),R=this._convertViewportColToCharacterIndex(k,x),U=R,N=x[0]-R,_e=0,Z=0,oe=0,L=0;if(O.charAt(R)===" "){for(;R>0&&O.charAt(R-1)===" ";)R--;for(;U<O.length&&O.charAt(U+1)===" ";)U++}else{var X=x[0],I=x[0];k.getWidth(X)===0&&(_e++,X--),k.getWidth(I)===2&&(Z++,I++);var j=k.getString(I).length;for(j>1&&(L+=j-1,U+=j-1);X>0&&R>0&&!this._isCharWordSeparator(k.loadCell(X-1,this._workCell));){k.loadCell(X-1,this._workCell);var B=this._workCell.getChars().length;this._workCell.getWidth()===0?(_e++,X--):B>1&&(oe+=B-1,R-=B-1),R--,X--}for(;I<k.length&&U+1<O.length&&!this._isCharWordSeparator(k.loadCell(I+1,this._workCell));){k.loadCell(I+1,this._workCell);var q=this._workCell.getChars().length;this._workCell.getWidth()===2?(Z++,I++):q>1&&(L+=q-1,U+=q-1),U++,I++}}U++;var fe=R+N-_e+oe,ke=Math.min(this._bufferService.cols,U-R+_e+Z-oe-L);if(E||O.slice(R,U).trim()!==""){if(C&&fe===0&&k.getCodePoint(0)!==32){var Ke=S.lines.get(x[1]-1);if(Ke&&k.isWrapped&&Ke.getCodePoint(this._bufferService.cols-1)!==32){var Pe=this._getWordAt([this._bufferService.cols-1,x[1]-1],!1,!0,!1);if(Pe){var le=this._bufferService.cols-Pe.start;fe-=le,ke+=le}}}if(v&&fe+ke===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){var me=S.lines.get(x[1]+1);if(me&&me.isWrapped&&me.getCodePoint(0)!==32){var Ie=this._getWordAt([0,x[1]+1],!1,!1,!0);Ie&&(ke+=Ie.length)}}return{start:fe,length:ke}}}}},b.prototype._selectWordAt=function(x,E){var C=this._getWordAt(x,E);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,x[1]--;this._model.selectionStart=[C.start,x[1]],this._model.selectionStartLength=C.length}},b.prototype._selectToWordAt=function(x){var E=this._getWordAt(x,!0);if(E){for(var C=x[1];E.start<0;)E.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,C]}},b.prototype._isCharWordSeparator=function(x){return x.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(x.getChars())>=0},b.prototype._selectLineAt=function(x){var E=this._bufferService.buffer.getWrappedRangeForLine(x);this._model.selectionStart=[0,E.first],this._model.selectionEnd=[this._bufferService.cols,E.last],this._model.selectionStartLength=0},b=h([o(2,e.IBufferService),o(3,e.ICoreService),o(4,a.IMouseService),o(5,e.IOptionsService),o(6,a.IRenderService)],b)}(n.Disposable);c.SelectionService=p},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0;var m=function(){function y(h){this._bufferService=h,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 h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,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 h=this.selectionStart,o=this.selectionEnd;return!(!h||!o)&&(h[1]>o[1]||h[1]===o[1]&&h[0]>o[0])},y.prototype.onTrim=function(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},y}();c.SelectionModel=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;var m=_(12);function y(i,a,e,f){var t=i-h(e,i),n=a-h(e,a);return r(Math.abs(t-n)-function(s,l,p){for(var g=0,b=s-h(p,s),x=l-h(p,l),E=0;E<Math.abs(b-x);E++){var C=o(s,l)==="A"?-1:1,v=p.buffer.lines.get(b+C*E);v&&v.isWrapped&&g++}return g}(i,a,e),d(o(i,a),f))}function h(i,a){for(var e=0,f=i.buffer.lines.get(a),t=f&&f.isWrapped;t&&a>=0&&a<i.rows;)e++,t=(f=i.buffer.lines.get(--a))&&f.isWrapped;return e}function o(i,a){return i>a?"A":"B"}function u(i,a,e,f,t,n){for(var s=i,l=a,p="";s!==e||l!==f;)s+=t?1:-1,t&&s>n.cols-1?(p+=n.buffer.translateBufferLineToString(l,!1,i,s),s=0,i=0,l++):!t&&s<0&&(p+=n.buffer.translateBufferLineToString(l,!1,0,i+1),i=s=n.cols-1,l--);return p+n.buffer.translateBufferLineToString(l,!1,i,s)}function d(i,a){var e=a?"O":"[";return m.C0.ESC+e+i}function r(i,a){i=Math.floor(i);for(var e="",f=0;f<i;f++)e+=a;return e}c.moveToCellSequence=function(i,a,e,f){var t,n=e.buffer.x,s=e.buffer.y;if(!e.buffer.hasScrollback)return function(p,g,b,x,E,C){return y(g,x,E,C).length===0?"":r(u(p,g,p,g-h(E,g),!1,E).length,d("D",C))}(n,s,0,a,e,f)+y(s,a,e,f)+function(p,g,b,x,E,C){var v;v=y(g,x,E,C).length>0?x-h(E,x):g;var S=x,k=function(O,R,U,N,_e,Z){var oe;return oe=y(U,N,_e,Z).length>0?N-h(_e,N):R,O<U&&oe<=N||O>=U&&oe<N?"C":"D"}(p,g,b,x,E,C);return r(u(p,v,b,S,k==="C",E).length,d(k,C))}(n,s,i,a,e,f);if(s===a)return t=n>i?"D":"C",r(Math.abs(n-i),d(t,f));t=s>a?"D":"C";var l=Math.abs(s-a);return r(function(p,g){return g.cols-p}(s>a?i:n,e)+(l-1)*e.cols+1+((s>a?n:i)-1),d(t,f))}},function(D,c,_){"use strict";var m=this&&this.__decorate||function(u,d,r,i){var a,e=arguments.length,f=e<3?d:i===null?i=Object.getOwnPropertyDescriptor(d,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,d,r,i);else for(var t=u.length-1;t>=0;t--)(a=u[t])&&(f=(e<3?a(f):e>3?a(d,r,f):a(d,r))||f);return e>3&&f&&Object.defineProperty(d,r,f),f},y=this&&this.__param||function(u,d){return function(r,i){d(r,i,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SoundService=void 0;var h=_(1),o=function(){function u(d){this._optionsService=d}return Object.defineProperty(u,"audioContext",{get:function(){if(!u._audioContext){var d=window.AudioContext||window.webkitAudioContext;if(!d)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;u._audioContext=new d}return u._audioContext},enumerable:!1,configurable:!0}),u.prototype.playBellSound=function(){var d=u.audioContext;if(d){var r=d.createBufferSource();d.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(i){r.buffer=i,r.connect(d.destination),r.start(0)})}},u.prototype._base64ToArrayBuffer=function(d){for(var r=window.atob(d),i=r.length,a=new Uint8Array(i),e=0;e<i;e++)a[e]=r.charCodeAt(e);return a.buffer},u.prototype._removeMimeType=function(d){return d.split(",")[1]},u=m([y(0,h.IOptionsService)],u)}();c.SoundService=o},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(e,f){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)n.hasOwnProperty(s)&&(t[s]=n[s])})(e,f)},function(e,f){function t(){this.constructor=e}m(e,f),e.prototype=f===null?Object.create(f):(t.prototype=f.prototype,new t)}),h=this&&this.__decorate||function(e,f,t,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,f,t,n);else for(var g=e.length-1;g>=0;g--)(s=e[g])&&(p=(l<3?s(p):l>3?s(f,t,p):s(f,t))||p);return l>3&&p&&Object.defineProperty(f,t,p),p},o=this&&this.__param||function(e,f){return function(t,n){f(t,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseZoneManager=void 0;var u=_(2),d=_(7),r=_(5),i=_(1),a=function(e){function f(t,n,s,l,p,g){var b=e.call(this)||this;return b._element=t,b._screenElement=n,b._bufferService=s,b._mouseService=l,b._selectionService=p,b._optionsService=g,b._zones=[],b._areZonesActive=!1,b._lastHoverCoords=[void 0,void 0],b._initialSelectionLength=0,b.register(d.addDisposableDomListener(b._element,"mousedown",function(x){return b._onMouseDown(x)})),b._mouseMoveListener=function(x){return b._onMouseMove(x)},b._mouseLeaveListener=function(x){return b._onMouseLeave(x)},b._clickListener=function(x){return b._onClick(x)},b}return y(f,e),f.prototype.dispose=function(){e.prototype.dispose.call(this),this._deactivate()},f.prototype.add=function(t){this._zones.push(t),this._zones.length===1&&this._activate()},f.prototype.clearAll=function(t,n){if(this._zones.length!==0){t&&n||(t=0,n=this._bufferService.rows-1);for(var s=0;s<this._zones.length;s++){var l=this._zones[s];(l.y1>t&&l.y1<=n+1||l.y2>t&&l.y2<=n+1||l.y1<t&&l.y2>n+1)&&(this._currentZone&&this._currentZone===l&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(s--,1))}this._zones.length===0&&this._deactivate()}},f.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))},f.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))},f.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},f.prototype._onHover=function(t){var n=this,s=this._findZoneEventAt(t);s!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),s&&(this._currentZone=s,s.hoverCallback&&s.hoverCallback(t),this._tooltipTimeout=window.setTimeout(function(){return n._onTooltip(t)},this._optionsService.options.linkTooltipHoverDuration)))},f.prototype._onTooltip=function(t){this._tooltipTimeout=void 0;var n=this._findZoneEventAt(t);n&&n.tooltipCallback&&n.tooltipCallback(t)},f.prototype._onMouseDown=function(t){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var n=this._findZoneEventAt(t);n!=null&&n.willLinkActivate(t)&&(t.preventDefault(),t.stopImmediatePropagation())}},f.prototype._onMouseLeave=function(t){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},f.prototype._onClick=function(t){var n=this._findZoneEventAt(t),s=this._getSelectionLength();n&&s===this._initialSelectionLength&&(n.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},f.prototype._getSelectionLength=function(){var t=this._selectionService.selectionText;return t?t.length:0},f.prototype._findZoneEventAt=function(t){var n=this._mouseService.getCoords(t,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(n)for(var s=n[0],l=n[1],p=0;p<this._zones.length;p++){var g=this._zones[p];if(g.y1===g.y2){if(l===g.y1&&s>=g.x1&&s<g.x2)return g}else if(l===g.y1&&s>=g.x1||l===g.y2&&s<g.x2||l>g.y1&&l<g.y2)return g}},f=h([o(2,i.IBufferService),o(3,r.IMouseService),o(4,r.ISelectionService),o(5,i.IOptionsService)],f)}(u.Disposable);c.MouseZoneManager=a},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(f,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var l in s)s.hasOwnProperty(l)&&(n[l]=s[l])})(f,t)},function(f,t){function n(){this.constructor=f}m(f,t),f.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;var h=_(18),o=_(11),u=_(31),d=_(7),r=_(2),i=_(32),a=_(17),e=function(f){function t(n,s){var l=f.call(this)||this;l._terminal=n,l._renderService=s,l._liveRegionLineCount=0,l._charsToConsume=[],l._charsToAnnounce="",l._accessibilityTreeRoot=document.createElement("div"),l._accessibilityTreeRoot.classList.add("xterm-accessibility"),l._rowContainer=document.createElement("div"),l._rowContainer.classList.add("xterm-accessibility-tree"),l._rowContainer.setAttribute("role","list"),l._rowElements=[];for(var p=0;p<l._terminal.rows;p++)l._rowElements[p]=l._createAccessibilityTreeNode(),l._rowContainer.appendChild(l._rowElements[p]);if(l._topBoundaryFocusListener=function(g){return l._onBoundaryFocus(g,0)},l._bottomBoundaryFocusListener=function(g){return l._onBoundaryFocus(g,1)},l._rowElements[0].addEventListener("focus",l._topBoundaryFocusListener),l._rowElements[l._rowElements.length-1].addEventListener("focus",l._bottomBoundaryFocusListener),l._refreshRowsDimensions(),l._accessibilityTreeRoot.appendChild(l._rowContainer),l._renderRowsDebouncer=new u.RenderDebouncer(l._renderRows.bind(l)),l._refreshRows(),l._liveRegion=document.createElement("div"),l._liveRegion.classList.add("live-region"),l._liveRegion.setAttribute("aria-live","assertive"),l._accessibilityTreeRoot.appendChild(l._liveRegion),!l._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return l._terminal.element.insertAdjacentElement("afterbegin",l._accessibilityTreeRoot),l.register(l._renderRowsDebouncer),l.register(l._terminal.onResize(function(g){return l._onResize(g.rows)})),l.register(l._terminal.onRender(function(g){return l._refreshRows(g.start,g.end)})),l.register(l._terminal.onScroll(function(){return l._refreshRows()})),l.register(l._terminal.onA11yChar(function(g){return l._onChar(g)})),l.register(l._terminal.onLineFeed(function(){return l._onChar(`
`)})),l.register(l._terminal.onA11yTab(function(g){return l._onTab(g)})),l.register(l._terminal.onKey(function(g){return l._onKey(g.key)})),l.register(l._terminal.onBlur(function(){return l._clearLiveRegion()})),l.register(l._renderService.onDimensionsChange(function(){return l._refreshRowsDimensions()})),l._screenDprMonitor=new i.ScreenDprMonitor,l.register(l._screenDprMonitor),l._screenDprMonitor.setListener(function(){return l._refreshRowsDimensions()}),l.register(d.addDisposableDomListener(window,"resize",function(){return l._refreshRowsDimensions()})),l}return y(t,f),t.prototype.dispose=function(){f.prototype.dispose.call(this),a.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(n,s){var l=n.target,p=this._rowElements[s===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")!==(s===0?"1":""+this._terminal.buffer.lines.length)&&n.relatedTarget===p){var g,b;if(s===0?(g=l,b=this._rowElements.pop(),this._rowContainer.removeChild(b)):(g=this._rowElements.shift(),b=l,this._rowContainer.removeChild(g)),g.removeEventListener("focus",this._topBoundaryFocusListener),b.removeEventListener("focus",this._bottomBoundaryFocusListener),s===0){var x=this._createAccessibilityTreeNode();this._rowElements.unshift(x),this._rowContainer.insertAdjacentElement("afterbegin",x)}else x=this._createAccessibilityTreeNode(),this._rowElements.push(x),this._rowContainer.appendChild(x);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),n.preventDefault(),n.stopImmediatePropagation()}},t.prototype._onResize=function(n){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>n;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},t.prototype._createAccessibilityTreeNode=function(){var n=document.createElement("div");return n.setAttribute("role","listitem"),n.tabIndex=-1,this._refreshRowDimensions(n),n},t.prototype._onTab=function(n){for(var s=0;s<n;s++)this._onChar(" ")},t.prototype._onChar=function(n){var s=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==n&&(this._charsToAnnounce+=n):this._charsToAnnounce+=n,n===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),o.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){s._accessibilityTreeRoot.appendChild(s._liveRegion)},0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,o.isMac&&a.removeElementFromParent(this._liveRegion)},t.prototype._onKey=function(n){this._clearLiveRegion(),this._charsToConsume.push(n)},t.prototype._refreshRows=function(n,s){this._renderRowsDebouncer.refresh(n,s,this._terminal.rows)},t.prototype._renderRows=function(n,s){for(var l=this._terminal.buffer,p=l.lines.length.toString(),g=n;g<=s;g++){var b=l.translateBufferLineToString(l.ydisp+g,!0),x=(l.ydisp+g+1).toString(),E=this._rowElements[g];E&&(b.length===0?E.innerHTML="&nbsp;":E.textContent=b,E.setAttribute("aria-posinset",x),E.setAttribute("aria-setsize",p))}this._announceCharacters()},t.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var n=0;n<this._terminal.rows;n++)this._refreshRowDimensions(this._rowElements[n])}},t.prototype._refreshRowDimensions=function(n){n.style.height=this._renderService.dimensions.actualCellHeight+"px"},t.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},t}(r.Disposable);c.AccessibilityManager=e},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(l,p){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,b){g.__proto__=b}||function(g,b){for(var x in b)b.hasOwnProperty(x)&&(g[x]=b[x])})(l,p)},function(l,p){function g(){this.constructor=l}m(l,p),l.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}),h=this&&this.__decorate||function(l,p,g,b){var x,E=arguments.length,C=E<3?p:b===null?b=Object.getOwnPropertyDescriptor(p,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,p,g,b);else for(var v=l.length-1;v>=0;v--)(x=l[v])&&(C=(E<3?x(C):E>3?x(p,g,C):x(p,g))||C);return E>3&&C&&Object.defineProperty(p,g,C),C},o=this&&this.__param||function(l,p){return function(g,b){p(g,b,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;var u=_(58),d=_(9),r=_(2),i=_(5),a=_(1),e=_(0),f=_(10),t=_(17),n=1,s=function(l){function p(g,b,x,E,C,v,S,k,O){var R=l.call(this)||this;return R._colors=g,R._element=b,R._screenElement=x,R._viewportElement=E,R._linkifier=C,R._linkifier2=v,R._charSizeService=S,R._optionsService=k,R._bufferService=O,R._terminalClass=n++,R._rowElements=[],R._rowContainer=document.createElement("div"),R._rowContainer.classList.add("xterm-rows"),R._rowContainer.style.lineHeight="normal",R._rowContainer.setAttribute("aria-hidden","true"),R._refreshRowElements(R._bufferService.cols,R._bufferService.rows),R._selectionContainer=document.createElement("div"),R._selectionContainer.classList.add("xterm-selection"),R._selectionContainer.setAttribute("aria-hidden","true"),R.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},R._updateDimensions(),R._injectCss(),R._rowFactory=new u.DomRendererRowFactory(document,R._optionsService,R._colors),R._element.classList.add("xterm-dom-renderer-owner-"+R._terminalClass),R._screenElement.appendChild(R._rowContainer),R._screenElement.appendChild(R._selectionContainer),R._linkifier.onShowLinkUnderline(function(U){return R._onLinkHover(U)}),R._linkifier.onHideLinkUnderline(function(U){return R._onLinkLeave(U)}),R._linkifier2.onShowLinkUnderline(function(U){return R._onLinkHover(U)}),R._linkifier2.onHideLinkUnderline(function(U){return R._onLinkLeave(U)}),R}return y(p,l),Object.defineProperty(p.prototype,"onRequestRedraw",{get:function(){return new e.EventEmitter().event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),t.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),l.prototype.dispose.call(this)},p.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 g=0,b=this._rowElements;g<b.length;g++){var x=b[g];x.style.width=this.dimensions.canvasWidth+"px",x.style.height=this.dimensions.actualCellHeight+"px",x.style.lineHeight=this.dimensions.actualCellHeight+"px",x.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var E=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=E,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},p.prototype.setColors=function(g){this._colors=g,this._injectCss()},p.prototype._injectCss=function(){var g=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var b=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";b+=this._terminalSelector+" span:not(."+u.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+u.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+u.ITALIC_CLASS+" { font-style: italic;}",b+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",b+="@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+"; }}",b+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+u.CURSOR_CLASS+"."+u.CURSOR_BLINK_CLASS+":not(."+u.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+u.CURSOR_CLASS+"."+u.CURSOR_BLINK_CLASS+"."+u.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+u.CURSOR_CLASS+"."+u.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",b+=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(x,E){b+=g._terminalSelector+" .xterm-fg-"+E+" { color: "+x.css+"; }"+g._terminalSelector+" .xterm-bg-"+E+" { background-color: "+x.css+"; }"}),b+=this._terminalSelector+" .xterm-fg-"+d.INVERTED_DEFAULT_COLOR+" { color: "+f.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+d.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=b},p.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},p.prototype._refreshRowElements=function(g,b){for(var x=this._rowElements.length;x<=b;x++){var E=document.createElement("div");this._rowContainer.appendChild(E),this._rowElements.push(E)}for(;this._rowElements.length>b;)this._rowContainer.removeChild(this._rowElements.pop())},p.prototype.onResize=function(g,b){this._refreshRowElements(g,b),this._updateDimensions()},p.prototype.onCharSizeChanged=function(){this._updateDimensions()},p.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},p.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},p.prototype.onSelectionChanged=function(g,b,x){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(g&&b){var E=g[1]-this._bufferService.buffer.ydisp,C=b[1]-this._bufferService.buffer.ydisp,v=Math.max(E,0),S=Math.min(C,this._bufferService.rows-1);if(!(v>=this._bufferService.rows||S<0)){var k=document.createDocumentFragment();if(x)k.appendChild(this._createSelectionElement(v,g[0],b[0],S-v+1));else{var O=E===v?g[0]:0,R=v===S?b[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(v,O,R));var U=S-v-1;if(k.appendChild(this._createSelectionElement(v+1,0,this._bufferService.cols,U)),v!==S){var N=C===S?b[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(S,0,N))}}this._selectionContainer.appendChild(k)}}},p.prototype._createSelectionElement=function(g,b,x,E){E===void 0&&(E=1);var C=document.createElement("div");return C.style.height=E*this.dimensions.actualCellHeight+"px",C.style.top=g*this.dimensions.actualCellHeight+"px",C.style.left=b*this.dimensions.actualCellWidth+"px",C.style.width=this.dimensions.actualCellWidth*(x-b)+"px",C},p.prototype.onCursorMove=function(){},p.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},p.prototype.clear=function(){for(var g=0,b=this._rowElements;g<b.length;g++)b[g].innerHTML=""},p.prototype.renderRows=function(g,b){for(var x=this._bufferService.buffer.ybase+this._bufferService.buffer.y,E=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),C=this._optionsService.options.cursorBlink,v=g;v<=b;v++){var S=this._rowElements[v];S.innerHTML="";var k=v+this._bufferService.buffer.ydisp,O=this._bufferService.buffer.lines.get(k),R=this._optionsService.options.cursorStyle;S.appendChild(this._rowFactory.createRow(O,k===x,R,E,C,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(p.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),p.prototype.registerCharacterJoiner=function(g){return-1},p.prototype.deregisterCharacterJoiner=function(g){return!1},p.prototype._onLinkHover=function(g){this._setCellUnderline(g.x1,g.x2,g.y1,g.y2,g.cols,!0)},p.prototype._onLinkLeave=function(g){this._setCellUnderline(g.x1,g.x2,g.y1,g.y2,g.cols,!1)},p.prototype._setCellUnderline=function(g,b,x,E,C,v){for(;g!==b||x!==E;){var S=this._rowElements[x];if(!S)return;var k=S.children[g];k&&(k.style.textDecoration=v?"underline":"none"),++g>=C&&(g=0,x++)}},p=h([o(6,i.ICharSizeService),o(7,a.IOptionsService),o(8,a.IBufferService)],p)}(r.Disposable);c.DomRenderer=s},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=c.CURSOR_STYLE_UNDERLINE_CLASS=c.CURSOR_STYLE_BAR_CLASS=c.CURSOR_STYLE_BLOCK_CLASS=c.CURSOR_BLINK_CLASS=c.CURSOR_CLASS=c.UNDERLINE_CLASS=c.ITALIC_CLASS=c.DIM_CLASS=c.BOLD_CLASS=void 0;var m=_(9),y=_(3),h=_(4),o=_(10);c.BOLD_CLASS="xterm-bold",c.DIM_CLASS="xterm-dim",c.ITALIC_CLASS="xterm-italic",c.UNDERLINE_CLASS="xterm-underline",c.CURSOR_CLASS="xterm-cursor",c.CURSOR_BLINK_CLASS="xterm-cursor-blink",c.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",c.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",c.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var u=function(){function r(i,a,e){this._document=i,this._optionsService=a,this._colors=e,this._workCell=new h.CellData}return r.prototype.setColors=function(i){this._colors=i},r.prototype.createRow=function(i,a,e,f,t,n,s){for(var l=this._document.createDocumentFragment(),p=0,g=Math.min(i.length,s)-1;g>=0;g--)if(i.loadCell(g,this._workCell).getCode()!==y.NULL_CELL_CODE||a&&g===f){p=g+1;break}for(g=0;g<p;g++){i.loadCell(g,this._workCell);var b=this._workCell.getWidth();if(b!==0){var x=this._document.createElement("span");if(b>1&&(x.style.width=n*b+"px"),a&&g===f)switch(x.classList.add(c.CURSOR_CLASS),t&&x.classList.add(c.CURSOR_BLINK_CLASS),e){case"bar":x.classList.add(c.CURSOR_STYLE_BAR_CLASS);break;case"underline":x.classList.add(c.CURSOR_STYLE_UNDERLINE_CLASS);break;default:x.classList.add(c.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&x.classList.add(c.BOLD_CLASS),this._workCell.isItalic()&&x.classList.add(c.ITALIC_CLASS),this._workCell.isDim()&&x.classList.add(c.DIM_CLASS),this._workCell.isUnderline()&&x.classList.add(c.UNDERLINE_CLASS),this._workCell.isInvisible()?x.textContent=y.WHITESPACE_CELL_CHAR:x.textContent=this._workCell.getChars()||y.WHITESPACE_CELL_CHAR;var E=this._workCell.getFgColor(),C=this._workCell.getFgColorMode(),v=this._workCell.getBgColor(),S=this._workCell.getBgColorMode(),k=!!this._workCell.isInverse();if(k){var O=E;E=v,v=O;var R=C;C=S,S=R}switch(C){case 16777216:case 33554432:this._workCell.isBold()&&E<8&&this._optionsService.options.drawBoldTextInBrightColors&&(E+=8),this._applyMinimumContrast(x,this._colors.background,this._colors.ansi[E])||x.classList.add("xterm-fg-"+E);break;case 50331648:var U=o.rgba.toColor(E>>16&255,E>>8&255,255&E);this._applyMinimumContrast(x,this._colors.background,U)||this._addStyle(x,"color:#"+d(E.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(x,this._colors.background,this._colors.foreground)||k&&x.classList.add("xterm-fg-"+m.INVERTED_DEFAULT_COLOR)}switch(S){case 16777216:case 33554432:x.classList.add("xterm-bg-"+v);break;case 50331648:this._addStyle(x,"background-color:#"+d(v.toString(16),"0",6));break;case 0:default:k&&x.classList.add("xterm-bg-"+m.INVERTED_DEFAULT_COLOR)}l.appendChild(x)}}return l},r.prototype._applyMinimumContrast=function(i,a,e){if(this._optionsService.options.minimumContrastRatio===1)return!1;var f=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return f===void 0&&(f=o.color.ensureContrastRatio(a,e,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,f!=null?f:null)),!!f&&(this._addStyle(i,"color:"+f.css),!0)},r.prototype._addStyle=function(i,a){i.setAttribute("style",""+(i.getAttribute("style")||"")+a+";")},r}();function d(r,i,a){for(;r.length<a;)r=i+r;return r}c.DomRendererRowFactory=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;var m=_(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:["'",'"']};c.evaluateKeyboardEvent=function(h,o,u,d){var r={type:0,cancel:!1,key:void 0},i=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?r.key=o?m.C0.ESC+"OA":m.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?r.key=o?m.C0.ESC+"OD":m.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?r.key=o?m.C0.ESC+"OC":m.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(r.key=o?m.C0.ESC+"OB":m.C0.ESC+"[B");break;case 8:if(h.shiftKey){r.key=m.C0.BS;break}if(h.altKey){r.key=m.C0.ESC+m.C0.DEL;break}r.key=m.C0.DEL;break;case 9:if(h.shiftKey){r.key=m.C0.ESC+"[Z";break}r.key=m.C0.HT,r.cancel=!0;break;case 13:r.key=h.altKey?m.C0.ESC+m.C0.CR:m.C0.CR,r.cancel=!0;break;case 27:r.key=m.C0.ESC,h.altKey&&(r.key=m.C0.ESC+m.C0.ESC),r.cancel=!0;break;case 37:if(h.metaKey)break;i?(r.key=m.C0.ESC+"[1;"+(i+1)+"D",r.key===m.C0.ESC+"[1;3D"&&(r.key=m.C0.ESC+(u?"b":"[1;5D"))):r.key=o?m.C0.ESC+"OD":m.C0.ESC+"[D";break;case 39:if(h.metaKey)break;i?(r.key=m.C0.ESC+"[1;"+(i+1)+"C",r.key===m.C0.ESC+"[1;3C"&&(r.key=m.C0.ESC+(u?"f":"[1;5C"))):r.key=o?m.C0.ESC+"OC":m.C0.ESC+"[C";break;case 38:if(h.metaKey)break;i?(r.key=m.C0.ESC+"[1;"+(i+1)+"A",u||r.key!==m.C0.ESC+"[1;3A"||(r.key=m.C0.ESC+"[1;5A")):r.key=o?m.C0.ESC+"OA":m.C0.ESC+"[A";break;case 40:if(h.metaKey)break;i?(r.key=m.C0.ESC+"[1;"+(i+1)+"B",u||r.key!==m.C0.ESC+"[1;3B"||(r.key=m.C0.ESC+"[1;5B")):r.key=o?m.C0.ESC+"OB":m.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(r.key=m.C0.ESC+"[2~");break;case 46:r.key=i?m.C0.ESC+"[3;"+(i+1)+"~":m.C0.ESC+"[3~";break;case 36:r.key=i?m.C0.ESC+"[1;"+(i+1)+"H":o?m.C0.ESC+"OH":m.C0.ESC+"[H";break;case 35:r.key=i?m.C0.ESC+"[1;"+(i+1)+"F":o?m.C0.ESC+"OF":m.C0.ESC+"[F";break;case 33:h.shiftKey?r.type=2:r.key=m.C0.ESC+"[5~";break;case 34:h.shiftKey?r.type=3:r.key=m.C0.ESC+"[6~";break;case 112:r.key=i?m.C0.ESC+"[1;"+(i+1)+"P":m.C0.ESC+"OP";break;case 113:r.key=i?m.C0.ESC+"[1;"+(i+1)+"Q":m.C0.ESC+"OQ";break;case 114:r.key=i?m.C0.ESC+"[1;"+(i+1)+"R":m.C0.ESC+"OR";break;case 115:r.key=i?m.C0.ESC+"[1;"+(i+1)+"S":m.C0.ESC+"OS";break;case 116:r.key=i?m.C0.ESC+"[15;"+(i+1)+"~":m.C0.ESC+"[15~";break;case 117:r.key=i?m.C0.ESC+"[17;"+(i+1)+"~":m.C0.ESC+"[17~";break;case 118:r.key=i?m.C0.ESC+"[18;"+(i+1)+"~":m.C0.ESC+"[18~";break;case 119:r.key=i?m.C0.ESC+"[19;"+(i+1)+"~":m.C0.ESC+"[19~";break;case 120:r.key=i?m.C0.ESC+"[20;"+(i+1)+"~":m.C0.ESC+"[20~";break;case 121:r.key=i?m.C0.ESC+"[21;"+(i+1)+"~":m.C0.ESC+"[21~";break;case 122:r.key=i?m.C0.ESC+"[23;"+(i+1)+"~":m.C0.ESC+"[23~";break;case 123:r.key=i?m.C0.ESC+"[24;"+(i+1)+"~":m.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(u&&!d||!h.altKey||h.metaKey)u&&!h.altKey&&!h.ctrlKey&&h.metaKey?h.keyCode===65&&(r.type=1):h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?r.key=h.key:h.key&&h.ctrlKey&&h.key==="_"&&(r.key=m.C0.US);else{var a=y[h.keyCode],e=a&&a[h.shiftKey?1:0];if(e)r.key=m.C0.ESC+e;else if(h.keyCode>=65&&h.keyCode<=90){var f=h.ctrlKey?h.keyCode-64:h.keyCode+32;r.key=m.C0.ESC+String.fromCharCode(f)}}else h.keyCode>=65&&h.keyCode<=90?r.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?r.key=m.C0.NUL:h.keyCode>=51&&h.keyCode<=55?r.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?r.key=m.C0.DEL:h.keyCode===219?r.key=m.C0.ESC:h.keyCode===220?r.key=m.C0.FS:h.keyCode===221&&(r.key=m.C0.GS)}return r}},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(n,s){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,p){l.__proto__=p}||function(l,p){for(var g in p)p.hasOwnProperty(g)&&(l[g]=p[g])})(n,s)},function(n,s){function l(){this.constructor=n}m(n,s),n.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}),h=this&&this.__decorate||function(n,s,l,p){var g,b=arguments.length,x=b<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,l):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(n,s,l,p);else for(var E=n.length-1;E>=0;E--)(g=n[E])&&(x=(b<3?g(x):b>3?g(s,l,x):g(s,l))||x);return b>3&&x&&Object.defineProperty(s,l,x),x},o=this&&this.__param||function(n,s){return function(l,p){s(l,p,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;var u=_(31),d=_(0),r=_(2),i=_(32),a=_(7),e=_(1),f=_(5),t=function(n){function s(l,p,g,b,x,E){var C=n.call(this)||this;if(C._renderer=l,C._rowCount=p,C._isPaused=!1,C._needsFullRefresh=!1,C._isNextRenderRedrawOnly=!0,C._needsSelectionRefresh=!1,C._canvasWidth=0,C._canvasHeight=0,C._selectionState={start:void 0,end:void 0,columnSelectMode:!1},C._onDimensionsChange=new d.EventEmitter,C._onRender=new d.EventEmitter,C._onRefreshRequest=new d.EventEmitter,C.register({dispose:function(){return C._renderer.dispose()}}),C._renderDebouncer=new u.RenderDebouncer(function(S,k){return C._renderRows(S,k)}),C.register(C._renderDebouncer),C._screenDprMonitor=new i.ScreenDprMonitor,C._screenDprMonitor.setListener(function(){return C.onDevicePixelRatioChange()}),C.register(C._screenDprMonitor),C.register(E.onResize(function(S){return C._fullRefresh()})),C.register(b.onOptionChange(function(){return C._renderer.onOptionsChanged()})),C.register(x.onCharSizeChange(function(){return C.onCharSizeChanged()})),C._renderer.onRequestRedraw(function(S){return C.refreshRows(S.start,S.end,!0)}),C.register(a.addDisposableDomListener(window,"resize",function(){return C.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var v=new IntersectionObserver(function(S){return C._onIntersectionChange(S[S.length-1])},{threshold:0});v.observe(g),C.register({dispose:function(){return v.disconnect()}})}return C}return y(s,n),Object.defineProperty(s.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),s.prototype._onIntersectionChange=function(l){this._isPaused=l.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},s.prototype.refreshRows=function(l,p,g){g===void 0&&(g=!1),this._isPaused?this._needsFullRefresh=!0:(g||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,p,this._rowCount))},s.prototype._renderRows=function(l,p){this._renderer.renderRows(l,p),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:l,end:p}),this._isNextRenderRedrawOnly=!0},s.prototype.resize=function(l,p){this._rowCount=p,this._fireOnCanvasResize()},s.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},s.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},s.prototype.dispose=function(){n.prototype.dispose.call(this)},s.prototype.setRenderer=function(l){var p=this;this._renderer.dispose(),this._renderer=l,this._renderer.onRequestRedraw(function(g){return p.refreshRows(g.start,g.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},s.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},s.prototype.setColors=function(l){this._renderer.setColors(l),this._fullRefresh()},s.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},s.prototype.onResize=function(l,p){this._renderer.onResize(l,p),this._fullRefresh()},s.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},s.prototype.onBlur=function(){this._renderer.onBlur()},s.prototype.onFocus=function(){this._renderer.onFocus()},s.prototype.onSelectionChanged=function(l,p,g){this._selectionState.start=l,this._selectionState.end=p,this._selectionState.columnSelectMode=g,this._renderer.onSelectionChanged(l,p,g)},s.prototype.onCursorMove=function(){this._renderer.onCursorMove()},s.prototype.clear=function(){this._renderer.clear()},s.prototype.registerCharacterJoiner=function(l){return this._renderer.registerCharacterJoiner(l)},s.prototype.deregisterCharacterJoiner=function(l){return this._renderer.deregisterCharacterJoiner(l)},s=h([o(3,e.IOptionsService),o(4,f.ICharSizeService),o(5,e.IBufferService)],s)}(r.Disposable);c.RenderService=t},function(D,c,_){"use strict";var m=this&&this.__decorate||function(r,i,a,e){var f,t=arguments.length,n=t<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,a):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,i,a,e);else for(var s=r.length-1;s>=0;s--)(f=r[s])&&(n=(t<3?f(n):t>3?f(i,a,n):f(i,a))||n);return t>3&&n&&Object.defineProperty(i,a,n),n},y=this&&this.__param||function(r,i){return function(a,e){i(a,e,r)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;var h=_(1),o=_(0),u=function(){function r(i,a,e){this._optionsService=e,this.width=0,this.height=0,this._onCharSizeChange=new o.EventEmitter,this._measureStrategy=new d(i,a,this._optionsService)}return Object.defineProperty(r.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),r.prototype.measure=function(){var i=this._measureStrategy.measure();i.width===this.width&&i.height===this.height||(this.width=i.width,this.height=i.height,this._onCharSizeChange.fire())},r=m([y(2,h.IOptionsService)],r)}();c.CharSizeService=u;var d=function(){function r(i,a,e){this._document=i,this._parentElement=a,this._optionsService=e,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 r.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var i=this._measureElement.getBoundingClientRect();return i.width!==0&&i.height!==0&&(this._result.width=i.width,this._result.height=Math.ceil(i.height)),this._result},r}()},function(D,c,_){"use strict";var m=this&&this.__decorate||function(d,r,i,a){var e,f=arguments.length,t=f<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(d,r,i,a);else for(var n=d.length-1;n>=0;n--)(e=d[n])&&(t=(f<3?e(t):f>3?e(r,i,t):e(r,i))||t);return f>3&&t&&Object.defineProperty(r,i,t),t},y=this&&this.__param||function(d,r){return function(i,a){r(i,a,d)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;var h=_(5),o=_(30),u=function(){function d(r,i){this._renderService=r,this._charSizeService=i}return d.prototype.getCoords=function(r,i,a,e,f){return o.getCoords(r,i,a,e,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,f)},d.prototype.getRawByteCoords=function(r,i,a,e){var f=this.getCoords(r,i,a,e);return o.getRawByteCoords(f)},d=m([y(0,h.IRenderService),y(1,h.ICharSizeService)],d)}();c.MouseService=u},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(e,f){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)n.hasOwnProperty(s)&&(t[s]=n[s])})(e,f)},function(e,f){function t(){this.constructor=e}m(e,f),e.prototype=f===null?Object.create(f):(t.prototype=f.prototype,new t)}),h=this&&this.__decorate||function(e,f,t,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,f,t,n);else for(var g=e.length-1;g>=0;g--)(s=e[g])&&(p=(l<3?s(p):l>3?s(f,t,p):s(f,t))||p);return l>3&&p&&Object.defineProperty(f,t,p),p},o=this&&this.__param||function(e,f){return function(t,n){f(t,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier2=void 0;var u=_(1),d=_(0),r=_(2),i=_(7),a=function(e){function f(t){var n=e.call(this)||this;return n._bufferService=t,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new d.EventEmitter),n._onHideLinkUnderline=n.register(new d.EventEmitter),n.register(r.getDisposeArrayDisposable(n._linkCacheDisposables)),n}return y(f,e),Object.defineProperty(f.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),f.prototype.registerLinkProvider=function(t){var n=this;return this._linkProviders.push(t),{dispose:function(){var s=n._linkProviders.indexOf(t);s!==-1&&n._linkProviders.splice(s,1)}}},f.prototype.attachToDom=function(t,n,s){var l=this;this._element=t,this._mouseService=n,this._renderService=s,this.register(i.addDisposableDomListener(this._element,"mouseleave",function(){l._isMouseOut=!0,l._clearCurrentLink()})),this.register(i.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(i.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},f.prototype._onMouseMove=function(t){if(this._lastMouseEvent=t,this._element&&this._mouseService){var n=this._positionFromMouseEvent(t,this._element,this._mouseService);if(n){this._isMouseOut=!1;for(var s=t.composedPath(),l=0;l<s.length;l++){var p=s[l];if(p.classList.contains("xterm"))break;if(p.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},f.prototype._onHover=function(t){if(this._activeLine!==t.y)return this._clearCurrentLink(),void this._askForLink(t,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,t)||(this._clearCurrentLink(),this._askForLink(t,!0))},f.prototype._askForLink=function(t,n){var s=this;this._activeProviderReplies&&n||(this._activeProviderReplies=new Map,this._activeLine=t.y);var l=!1;this._linkProviders.forEach(function(p,g){var b;n?!((b=s._activeProviderReplies)===null||b===void 0)&&b.get(g)&&(l=s._checkLinkProviderResult(g,t,l)):p.provideLinks(t.y,function(x){var E,C;if(!s._isMouseOut){var v=x==null?void 0:x.map(function(S){return{link:S}});(E=s._activeProviderReplies)===null||E===void 0||E.set(g,v),l=s._checkLinkProviderResult(g,t,l),((C=s._activeProviderReplies)===null||C===void 0?void 0:C.size)===s._linkProviders.length&&s._removeIntersectingLinks(t.y,s._activeProviderReplies)}})})},f.prototype._removeIntersectingLinks=function(t,n){for(var s=new Set,l=0;l<n.size;l++){var p=n.get(l);if(p)for(var g=0;g<p.length;g++)for(var b=p[g],x=b.link.range.start.y<t?0:b.link.range.start.x,E=b.link.range.end.y>t?this._bufferService.cols:b.link.range.end.x,C=x;C<=E;C++){if(s.has(C)){p.splice(g--,1);break}s.add(C)}}},f.prototype._checkLinkProviderResult=function(t,n,s){var l,p=this;if(!this._activeProviderReplies)return s;for(var g=this._activeProviderReplies.get(t),b=!1,x=0;x<t;x++)this._activeProviderReplies.has(x)&&!this._activeProviderReplies.get(x)||(b=!0);if(!b&&g){var E=g.find(function(v){return p._linkAtPosition(v.link,n)});E&&(s=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviders.length&&!s)for(x=0;x<this._activeProviderReplies.size;x++){var C=(l=this._activeProviderReplies.get(x))===null||l===void 0?void 0:l.find(function(v){return p._linkAtPosition(v.link,n)});if(C){s=!0,this._handleNewLink(C);break}}return s},f.prototype._onClick=function(t){if(this._element&&this._mouseService&&this._currentLink){var n=this._positionFromMouseEvent(t,this._element,this._mouseService);n&&this._linkAtPosition(this._currentLink.link,n)&&this._currentLink.link.activate(t,this._currentLink.link.text)}},f.prototype._clearCurrentLink=function(t,n){this._element&&this._currentLink&&this._lastMouseEvent&&(!t||!n||this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,r.disposeArray(this._linkCacheDisposables))},f.prototype._handleNewLink=function(t){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(t.link,s)&&(this._currentLink=t,this._currentLink.state={decorations:{underline:t.link.decorations===void 0||t.link.decorations.underline,pointerCursor:t.link.decorations===void 0||t.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,t.link,this._lastMouseEvent),t.link.decorations={},Object.defineProperties(t.link.decorations,{pointerCursor:{get:function(){var l,p;return(p=(l=n._currentLink)===null||l===void 0?void 0:l.state)===null||p===void 0?void 0:p.decorations.pointerCursor},set:function(l){var p,g;!((p=n._currentLink)===null||p===void 0)&&p.state&&n._currentLink.state.decorations.pointerCursor!==l&&(n._currentLink.state.decorations.pointerCursor=l,n._currentLink.state.isHovered&&((g=n._element)===null||g===void 0||g.classList.toggle("xterm-cursor-pointer",l)))}},underline:{get:function(){var l,p;return(p=(l=n._currentLink)===null||l===void 0?void 0:l.state)===null||p===void 0?void 0:p.decorations.underline},set:function(l){var p,g,b;!((p=n._currentLink)===null||p===void 0)&&p.state&&((b=(g=n._currentLink)===null||g===void 0?void 0:g.state)===null||b===void 0?void 0:b.decorations.underline)!==l&&(n._currentLink.state.decorations.underline=l,n._currentLink.state.isHovered&&n._fireUnderlineEvent(t.link,l))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(l){var p=l.start===0?0:l.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(p,l.end+1+n._bufferService.buffer.ydisp)})))}},f.prototype._linkHover=function(t,n,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!0),this._currentLink.state.decorations.pointerCursor&&t.classList.add("xterm-cursor-pointer")),n.hover&&n.hover(s,n.text)},f.prototype._fireUnderlineEvent=function(t,n){var s=t.range,l=this._bufferService.buffer.ydisp,p=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-l-1,s.end.x,s.end.y-l-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(p)},f.prototype._linkLeave=function(t,n,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(n,!1),this._currentLink.state.decorations.pointerCursor&&t.classList.remove("xterm-cursor-pointer")),n.leave&&n.leave(s,n.text)},f.prototype._linkAtPosition=function(t,n){var s=t.range.start.y===t.range.end.y,l=t.range.start.y<n.y,p=t.range.end.y>n.y;return(s&&t.range.start.x<=n.x&&t.range.end.x>=n.x||l&&t.range.end.x>=n.x||p&&t.range.start.x<=n.x||l&&p)&&t.range.start.y<=n.y&&t.range.end.y>=n.y},f.prototype._positionFromMouseEvent=function(t,n,s){var l=s.getCoords(t,n,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}},f.prototype._createLinkUnderlineEvent=function(t,n,s,l,p){return{x1:t,y1:n,x2:s,y2:l,cols:this._bufferService.cols,fg:p}},f=h([o(0,u.IBufferService)],f)}(r.Disposable);c.Linkifier2=a},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;var m=function(){function y(h){this._textarea=h}return Object.defineProperty(y.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),y}();c.CoreBrowserService=m},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(x,E){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,v){C.__proto__=v}||function(C,v){for(var S in v)v.hasOwnProperty(S)&&(C[S]=v[S])})(x,E)},function(x,E){function C(){this.constructor=x}m(x,E),x.prototype=E===null?Object.create(E):(C.prototype=E.prototype,new C)});Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;var h=_(2),o=_(1),u=_(66),d=_(67),r=_(68),i=_(74),a=_(75),e=_(0),f=_(76),t=_(77),n=_(78),s=_(80),l=_(81),p=_(19),g=_(82),b=function(x){function E(C){var v=x.call(this)||this;return v._onBinary=new e.EventEmitter,v._onData=new e.EventEmitter,v._onLineFeed=new e.EventEmitter,v._onResize=new e.EventEmitter,v._onScroll=new e.EventEmitter,v._instantiationService=new u.InstantiationService,v.optionsService=new i.OptionsService(C),v._instantiationService.setService(o.IOptionsService,v.optionsService),v._bufferService=v.register(v._instantiationService.createInstance(r.BufferService)),v._instantiationService.setService(o.IBufferService,v._bufferService),v._logService=v._instantiationService.createInstance(d.LogService),v._instantiationService.setService(o.ILogService,v._logService),v._coreService=v.register(v._instantiationService.createInstance(a.CoreService,function(){return v.scrollToBottom()})),v._instantiationService.setService(o.ICoreService,v._coreService),v._coreMouseService=v._instantiationService.createInstance(f.CoreMouseService),v._instantiationService.setService(o.ICoreMouseService,v._coreMouseService),v._dirtyRowService=v._instantiationService.createInstance(t.DirtyRowService),v._instantiationService.setService(o.IDirtyRowService,v._dirtyRowService),v.unicodeService=v._instantiationService.createInstance(n.UnicodeService),v._instantiationService.setService(o.IUnicodeService,v.unicodeService),v._charsetService=v._instantiationService.createInstance(s.CharsetService),v._instantiationService.setService(o.ICharsetService,v._charsetService),v._inputHandler=new p.InputHandler(v._bufferService,v._charsetService,v._coreService,v._dirtyRowService,v._logService,v.optionsService,v._coreMouseService,v.unicodeService),v.register(e.forwardEvent(v._inputHandler.onLineFeed,v._onLineFeed)),v.register(v._inputHandler),v.register(e.forwardEvent(v._bufferService.onResize,v._onResize)),v.register(e.forwardEvent(v._coreService.onData,v._onData)),v.register(e.forwardEvent(v._coreService.onBinary,v._onBinary)),v.register(v.optionsService.onOptionChange(function(S){return v._updateOptions(S)})),v._writeBuffer=new g.WriteBuffer(function(S){return v._inputHandler.parse(S)}),v}return y(E,x),Object.defineProperty(E.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){var C;this._isDisposed||(x.prototype.dispose.call(this),(C=this._windowsMode)===null||C===void 0||C.dispose(),this._windowsMode=void 0)},E.prototype.write=function(C,v){this._writeBuffer.write(C,v)},E.prototype.writeSync=function(C){this._writeBuffer.writeSync(C)},E.prototype.resize=function(C,v){isNaN(C)||isNaN(v)||(C=Math.max(C,r.MINIMUM_COLS),v=Math.max(v,r.MINIMUM_ROWS),this._bufferService.resize(C,v))},E.prototype.scroll=function(C,v){v===void 0&&(v=!1);var S,k=this._bufferService.buffer;(S=this._cachedBlankLine)&&S.length===this.cols&&S.getFg(0)===C.fg&&S.getBg(0)===C.bg||(S=k.getBlankLine(C,v),this._cachedBlankLine=S),S.isWrapped=v;var O=k.ybase+k.scrollTop,R=k.ybase+k.scrollBottom;if(k.scrollTop===0){var U=k.lines.isFull;R===k.lines.length-1?U?k.lines.recycle().copyFrom(S):k.lines.push(S.clone()):k.lines.splice(R+1,0,S.clone()),U?this._bufferService.isUserScrolling&&(k.ydisp=Math.max(k.ydisp-1,0)):(k.ybase++,this._bufferService.isUserScrolling||k.ydisp++)}else{var N=R-O+1;k.lines.shiftElements(O+1,N-1,-1),k.lines.set(R,S.clone())}this._bufferService.isUserScrolling||(k.ydisp=k.ybase),this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom),this._onScroll.fire(k.ydisp)},E.prototype.scrollLines=function(C,v){var S=this._bufferService.buffer;if(C<0){if(S.ydisp===0)return;this._bufferService.isUserScrolling=!0}else C+S.ydisp>=S.ybase&&(this._bufferService.isUserScrolling=!1);var k=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+C,S.ybase),0),k!==S.ydisp&&(v||this._onScroll.fire(S.ydisp))},E.prototype.scrollPages=function(C){this.scrollLines(C*(this.rows-1))},E.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},E.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},E.prototype.scrollToLine=function(C){var v=C-this._bufferService.buffer.ydisp;v!==0&&this.scrollLines(v)},E.prototype.addEscHandler=function(C,v){return this._inputHandler.addEscHandler(C,v)},E.prototype.addDcsHandler=function(C,v){return this._inputHandler.addDcsHandler(C,v)},E.prototype.addCsiHandler=function(C,v){return this._inputHandler.addCsiHandler(C,v)},E.prototype.addOscHandler=function(C,v){return this._inputHandler.addOscHandler(C,v)},E.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},E.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},E.prototype._updateOptions=function(C){var v;switch(C){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((v=this._windowsMode)===null||v===void 0||v.dispose(),this._windowsMode=void 0)}},E.prototype._enableWindowsMode=function(){var C=this;if(!this._windowsMode){var v=[];v.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),v.push(this.addCsiHandler({final:"H"},function(){return l.updateWindowsModeWrappedState(C._bufferService),!1})),this._windowsMode={dispose:function(){for(var S=0,k=v;S<k.length;S++)k[S].dispose()}}}},E}(h.Disposable);c.CoreTerminal=b},function(D,c,_){"use strict";var m=this&&this.__spreadArrays||function(){for(var d=0,r=0,i=arguments.length;r<i;r++)d+=arguments[r].length;var a=Array(d),e=0;for(r=0;r<i;r++)for(var f=arguments[r],t=0,n=f.length;t<n;t++,e++)a[e]=f[t];return a};Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;var y=_(1),h=_(14),o=function(){function d(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];this._entries=new Map;for(var a=0,e=r;a<e.length;a++){var f=e[a],t=f[0],n=f[1];this.set(t,n)}}return d.prototype.set=function(r,i){var a=this._entries.get(r);return this._entries.set(r,i),a},d.prototype.forEach=function(r){this._entries.forEach(function(i,a){return r(a,i)})},d.prototype.has=function(r){return this._entries.has(r)},d.prototype.get=function(r){return this._entries.get(r)},d}();c.ServiceCollection=o;var u=function(){function d(){this._services=new o,this._services.set(y.IInstantiationService,this)}return d.prototype.setService=function(r,i){this._services.set(r,i)},d.prototype.getService=function(r){return this._services.get(r)},d.prototype.createInstance=function(r){for(var i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];for(var e=h.getServiceDependencies(r).sort(function(g,b){return g.index-b.index}),f=[],t=0,n=e;t<n.length;t++){var s=n[t],l=this._services.get(s.id);if(!l)throw new Error("[createInstance] "+r.name+" depends on UNKNOWN service "+s.id+".");f.push(l)}var p=e.length>0?e[0].index:i.length;if(i.length!==p)throw new Error("[createInstance] First service dependency of "+r.name+" at position "+(p+1)+" conflicts with "+i.length+" static arguments");return new(r.bind.apply(r,m([void 0],m(i,f))))},d}();c.InstantiationService=u},function(D,c,_){"use strict";var m=this&&this.__decorate||function(i,a,e,f){var t,n=arguments.length,s=n<3?a:f===null?f=Object.getOwnPropertyDescriptor(a,e):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,a,e,f);else for(var l=i.length-1;l>=0;l--)(t=i[l])&&(s=(n<3?t(s):n>3?t(a,e,s):t(a,e))||s);return n>3&&s&&Object.defineProperty(a,e,s),s},y=this&&this.__param||function(i,a){return function(e,f){a(e,f,i)}},h=this&&this.__spreadArrays||function(){for(var i=0,a=0,e=arguments.length;a<e;a++)i+=arguments[a].length;var f=Array(i),t=0;for(a=0;a<e;a++)for(var n=arguments[a],s=0,l=n.length;s<l;s++,t++)f[t]=n[s];return f};Object.defineProperty(c,"__esModule",{value:!0}),c.LogService=c.LogLevel=void 0;var o,u=_(1);(function(i){i[i.DEBUG=0]="DEBUG",i[i.INFO=1]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=3]="ERROR",i[i.OFF=4]="OFF"})(o=c.LogLevel||(c.LogLevel={}));var d={debug:o.DEBUG,info:o.INFO,warn:o.WARN,error:o.ERROR,off:o.OFF},r=function(){function i(a){var e=this;this._optionsService=a,this._updateLogLevel(),this._optionsService.onOptionChange(function(f){f==="logLevel"&&e._updateLogLevel()})}return i.prototype._updateLogLevel=function(){this._logLevel=d[this._optionsService.options.logLevel]},i.prototype._evalLazyOptionalParams=function(a){for(var e=0;e<a.length;e++)typeof a[e]=="function"&&(a[e]=a[e]())},i.prototype._log=function(a,e,f){this._evalLazyOptionalParams(f),a.call.apply(a,h([console,"xterm.js: "+e],f))},i.prototype.debug=function(a){for(var e=[],f=1;f<arguments.length;f++)e[f-1]=arguments[f];this._logLevel<=o.DEBUG&&this._log(console.log,a,e)},i.prototype.info=function(a){for(var e=[],f=1;f<arguments.length;f++)e[f-1]=arguments[f];this._logLevel<=o.INFO&&this._log(console.info,a,e)},i.prototype.warn=function(a){for(var e=[],f=1;f<arguments.length;f++)e[f-1]=arguments[f];this._logLevel<=o.WARN&&this._log(console.warn,a,e)},i.prototype.error=function(a){for(var e=[],f=1;f<arguments.length;f++)e[f-1]=arguments[f];this._logLevel<=o.ERROR&&this._log(console.error,a,e)},i=m([y(0,u.IOptionsService)],i)}();c.LogService=r},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(e,f){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var s in n)n.hasOwnProperty(s)&&(t[s]=n[s])})(e,f)},function(e,f){function t(){this.constructor=e}m(e,f),e.prototype=f===null?Object.create(f):(t.prototype=f.prototype,new t)}),h=this&&this.__decorate||function(e,f,t,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,f,t,n);else for(var g=e.length-1;g>=0;g--)(s=e[g])&&(p=(l<3?s(p):l>3?s(f,t,p):s(f,t))||p);return l>3&&p&&Object.defineProperty(f,t,p),p},o=this&&this.__param||function(e,f){return function(t,n){f(t,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;var u=_(1),d=_(69),r=_(0),i=_(2);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;var a=function(e){function f(t){var n=e.call(this)||this;return n._optionsService=t,n.isUserScrolling=!1,n._onResize=new r.EventEmitter,n.cols=Math.max(t.options.cols,c.MINIMUM_COLS),n.rows=Math.max(t.options.rows,c.MINIMUM_ROWS),n.buffers=new d.BufferSet(t,n),n}return y(f,e),Object.defineProperty(f.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){e.prototype.dispose.call(this),this.buffers.dispose()},f.prototype.resize=function(t,n){this.cols=t,this.rows=n,this.buffers.resize(t,n),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:t,rows:n})},f.prototype.reset=function(){this.buffers.dispose(),this.buffers=new d.BufferSet(this._optionsService,this),this.isUserScrolling=!1},f=h([o(0,u.IOptionsService)],f)}(i.Disposable);c.BufferService=a},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(d,r){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var e in a)a.hasOwnProperty(e)&&(i[e]=a[e])})(d,r)},function(d,r){function i(){this.constructor=d}m(d,r),d.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)});Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;var h=_(70),o=_(0),u=function(d){function r(i,a){var e=d.call(this)||this;return e._onBufferActivate=e.register(new o.EventEmitter),e._normal=new h.Buffer(!0,i,a),e._normal.fillViewportRows(),e._alt=new h.Buffer(!1,i,a),e._activeBuffer=e._normal,e.setupTabStops(),e}return y(r,d),Object.defineProperty(r.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),r.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}))},r.prototype.activateAltBuffer=function(i){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(i),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}))},r.prototype.resize=function(i,a){this._normal.resize(i,a),this._alt.resize(i,a)},r.prototype.setupTabStops=function(i){this._normal.setupTabStops(i),this._alt.setupTabStops(i)},r}(_(2).Disposable);c.BufferSet=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.BufferStringIterator=c.Buffer=c.MAX_BUFFER_SIZE=void 0;var m=_(71),y=_(16),h=_(4),o=_(3),u=_(72),d=_(73),r=_(20),i=_(6);c.MAX_BUFFER_SIZE=4294967295;var a=function(){function f(t,n,s){this._hasScrollback=t,this._optionsService=n,this._bufferService=s,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=r.DEFAULT_CHARSET,this.markers=[],this._nullCell=h.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]),this._whitespaceCell=h.CellData.fromCharData([0,o.WHITESPACE_CELL_CHAR,o.WHITESPACE_CELL_WIDTH,o.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new m.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return f.prototype.getNullCell=function(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new i.ExtendedAttrs),this._nullCell},f.prototype.getWhitespaceCell=function(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new i.ExtendedAttrs),this._whitespaceCell},f.prototype.getBlankLine=function(t,n){return new y.BufferLine(this._bufferService.cols,this.getNullCell(t),n)},Object.defineProperty(f.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._rows},enumerable:!1,configurable:!0}),f.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var n=t+this._optionsService.options.scrollback;return n>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:n},f.prototype.fillViewportRows=function(t){if(this.lines.length===0){t===void 0&&(t=y.DEFAULT_ATTR_DATA);for(var n=this._rows;n--;)this.lines.push(this.getBlankLine(t))}},f.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new m.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},f.prototype.resize=function(t,n){var s=this.getNullCell(y.DEFAULT_ATTR_DATA),l=this._getCorrectBufferLength(n);if(l>this.lines.maxLength&&(this.lines.maxLength=l),this.lines.length>0){if(this._cols<t)for(var p=0;p<this.lines.length;p++)this.lines.get(p).resize(t,s);var g=0;if(this._rows<n)for(var b=this._rows;b<n;b++)this.lines.length<n+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new y.BufferLine(t,s)):this.ybase>0&&this.lines.length<=this.ybase+this.y+g+1?(this.ybase--,g++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(t,s)));else for(b=this._rows;b>n;b--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(l<this.lines.maxLength){var x=this.lines.length-l;x>0&&(this.lines.trimStart(x),this.ybase=Math.max(this.ybase-x,0),this.ydisp=Math.max(this.ydisp-x,0),this.savedY=Math.max(this.savedY-x,0)),this.lines.maxLength=l}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,n-1),g&&(this.y+=g),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(t,n),this._cols>t))for(p=0;p<this.lines.length;p++)this.lines.get(p).resize(t,s);this._cols=t,this._rows=n},Object.defineProperty(f.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),f.prototype._reflow=function(t,n){this._cols!==t&&(t>this._cols?this._reflowLarger(t,n):this._reflowSmaller(t,n))},f.prototype._reflowLarger=function(t,n){var s=u.reflowLargerGetLinesToRemove(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(s.length>0){var l=u.reflowLargerCreateNewLayout(this.lines,s);u.reflowLargerApplyNewLayout(this.lines,l.layout),this._reflowLargerAdjustViewport(t,n,l.countRemoved)}},f.prototype._reflowLargerAdjustViewport=function(t,n,s){for(var l=this.getNullCell(y.DEFAULT_ATTR_DATA),p=s;p-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new y.BufferLine(t,l))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-s,0)},f.prototype._reflowSmaller=function(t,n){for(var s=this.getNullCell(y.DEFAULT_ATTR_DATA),l=[],p=0,g=this.lines.length-1;g>=0;g--){var b=this.lines.get(g);if(!(!b||!b.isWrapped&&b.getTrimmedLength()<=t)){for(var x=[b];b.isWrapped&&g>0;)b=this.lines.get(--g),x.unshift(b);var E=this.ybase+this.y;if(!(E>=g&&E<g+x.length)){var C=x[x.length-1].getTrimmedLength(),v=u.reflowSmallerGetNewLineLengths(x,this._cols,t),S=v.length-x.length,k=void 0;k=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+S):Math.max(0,this.lines.length-this.lines.maxLength+S);for(var O=[],R=0;R<S;R++){var U=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);O.push(U)}O.length>0&&(l.push({start:g+x.length+p,newLines:O}),p+=O.length),x.push.apply(x,O);var N=v.length-1,_e=v[N];_e===0&&(_e=v[--N]);for(var Z=x.length-S-1,oe=C;Z>=0;){var L=Math.min(oe,_e);if(x[N].copyCellsFrom(x[Z],oe-L,_e-L,L,!0),(_e-=L)===0&&(_e=v[--N]),(oe-=L)===0){Z--;var X=Math.max(Z,0);oe=u.getWrappedLineTrimmedLength(x,X,this._cols)}}for(R=0;R<x.length;R++)v[R]<t&&x[R].setCell(v[R],s);for(var I=S-k;I-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+p)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+S,this.ybase+n-1)}}}if(l.length>0){var j=[],B=[];for(R=0;R<this.lines.length;R++)B.push(this.lines.get(R));var q=this.lines.length,fe=q-1,ke=0,Ke=l[ke];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+p);var Pe=0;for(R=Math.min(this.lines.maxLength-1,q+p-1);R>=0;R--)if(Ke&&Ke.start>fe+Pe){for(var le=Ke.newLines.length-1;le>=0;le--)this.lines.set(R--,Ke.newLines[le]);R++,j.push({index:fe+1,amount:Ke.newLines.length}),Pe+=Ke.newLines.length,Ke=l[++ke]}else this.lines.set(R,B[fe--]);var me=0;for(R=j.length-1;R>=0;R--)j[R].index+=me,this.lines.onInsertEmitter.fire(j[R]),me+=j[R].amount;var Ie=Math.max(0,q+p-this.lines.maxLength);Ie>0&&this.lines.onTrimEmitter.fire(Ie)}},f.prototype.stringIndexToBufferIndex=function(t,n,s){for(s===void 0&&(s=!1);n;){var l=this.lines.get(t);if(!l)return[-1,-1];for(var p=s?l.getTrimmedLength():l.length,g=0;g<p;++g)if(l.get(g)[o.CHAR_DATA_WIDTH_INDEX]&&(n-=l.get(g)[o.CHAR_DATA_CHAR_INDEX].length||1),n<0)return[t,g];t++}return[t,0]},f.prototype.translateBufferLineToString=function(t,n,s,l){s===void 0&&(s=0);var p=this.lines.get(t);return p?p.translateToString(n,s,l):""},f.prototype.getWrappedRangeForLine=function(t){for(var n=t,s=t;n>0&&this.lines.get(n).isWrapped;)n--;for(;s+1<this.lines.length&&this.lines.get(s+1).isWrapped;)s++;return{first:n,last:s}},f.prototype.setupTabStops=function(t){for(t!=null?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._cols;t+=this._optionsService.options.tabStopWidth)this.tabs[t]=!0},f.prototype.prevStop=function(t){for(t==null&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._cols?this._cols-1:t<0?0:t},f.prototype.nextStop=function(t){for(t==null&&(t=this.x);!this.tabs[++t]&&t<this._cols;);return t>=this._cols?this._cols-1:t<0?0:t},f.prototype.addMarker=function(t){var n=this,s=new d.Marker(t);return this.markers.push(s),s.register(this.lines.onTrim(function(l){s.line-=l,s.line<0&&s.dispose()})),s.register(this.lines.onInsert(function(l){s.line>=l.index&&(s.line+=l.amount)})),s.register(this.lines.onDelete(function(l){s.line>=l.index&&s.line<l.index+l.amount&&s.dispose(),s.line>l.index&&(s.line-=l.amount)})),s.register(s.onDispose(function(){return n._removeMarker(s)})),s},f.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},f.prototype.iterator=function(t,n,s,l,p){return new e(this,t,n,s,l,p)},f}();c.Buffer=a;var e=function(){function f(t,n,s,l,p,g){s===void 0&&(s=0),l===void 0&&(l=t.lines.length),p===void 0&&(p=0),g===void 0&&(g=0),this._buffer=t,this._trimRight=n,this._startIndex=s,this._endIndex=l,this._startOverscan=p,this._endOverscan=g,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return f.prototype.hasNext=function(){return this._current<this._endIndex},f.prototype.next=function(){var t=this._buffer.getWrappedRangeForLine(this._current);t.first<this._startIndex-this._startOverscan&&(t.first=this._startIndex-this._startOverscan),t.last>this._endIndex+this._endOverscan&&(t.last=this._endIndex+this._endOverscan),t.first=Math.max(t.first,0),t.last=Math.min(t.last,this._buffer.lines.length);for(var n="",s=t.first;s<=t.last;++s)n+=this._buffer.translateBufferLineToString(s,this._trimRight);return this._current=t.last+1,{range:t,content:n}},f}();c.BufferStringIterator=e},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;var m=_(0),y=function(){function h(o){this._maxLength=o,this.onDeleteEmitter=new m.EventEmitter,this.onInsertEmitter=new m.EventEmitter,this.onTrimEmitter=new m.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(h.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"maxLength",{get:function(){return this._maxLength},set:function(o){if(this._maxLength!==o){for(var u=new Array(o),d=0;d<Math.min(o,this.length);d++)u[d]=this._array[this._getCyclicIndex(d)];this._array=u,this._maxLength=o,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"length",{get:function(){return this._length},set:function(o){if(o>this._length)for(var u=this._length;u<o;u++)this._array[u]=void 0;this._length=o},enumerable:!1,configurable:!0}),h.prototype.get=function(o){return this._array[this._getCyclicIndex(o)]},h.prototype.set=function(o,u){this._array[this._getCyclicIndex(o)]=u},h.prototype.push=function(o){this._array[this._getCyclicIndex(this._length)]=o,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},h.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(h.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),h.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},h.prototype.splice=function(o,u){for(var d=[],r=2;r<arguments.length;r++)d[r-2]=arguments[r];if(u){for(var i=o;i<this._length-u;i++)this._array[this._getCyclicIndex(i)]=this._array[this._getCyclicIndex(i+u)];this._length-=u}for(i=this._length-1;i>=o;i--)this._array[this._getCyclicIndex(i+d.length)]=this._array[this._getCyclicIndex(i)];for(i=0;i<d.length;i++)this._array[this._getCyclicIndex(o+i)]=d[i];if(this._length+d.length>this._maxLength){var a=this._length+d.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=d.length},h.prototype.trimStart=function(o){o>this._length&&(o=this._length),this._startIndex+=o,this._length-=o,this.onTrimEmitter.fire(o)},h.prototype.shiftElements=function(o,u,d){if(!(u<=0)){if(o<0||o>=this._length)throw new Error("start argument out of range");if(o+d<0)throw new Error("Cannot shift elements in list beyond index 0");if(d>0){for(var r=u-1;r>=0;r--)this.set(o+r+d,this.get(o+r));var i=o+u+d-this._length;if(i>0)for(this._length+=i;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;r<u;r++)this.set(o+r+d,this.get(o+r))}},h.prototype._getCyclicIndex=function(o){return(this._startIndex+o)%this._maxLength},h}();c.CircularList=y},function(D,c,_){"use strict";function m(y,h,o){if(h===y.length-1)return y[h].getTrimmedLength();var u=!y[h].hasContent(o-1)&&y[h].getWidth(o-1)===1,d=y[h+1].getWidth(0)===2;return u&&d?o-1:o}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(y,h,o,u,d){for(var r=[],i=0;i<y.length-1;i++){var a=i,e=y.get(++a);if(e.isWrapped){for(var f=[y.get(i)];a<y.length&&e.isWrapped;)f.push(e),e=y.get(++a);if(u>=i&&u<a)i+=f.length-1;else{for(var t=0,n=m(f,t,h),s=1,l=0;s<f.length;){var p=m(f,s,h),g=p-l,b=o-n,x=Math.min(g,b);f[t].copyCellsFrom(f[s],l,n,x,!1),(n+=x)===o&&(t++,n=0),(l+=x)===p&&(s++,l=0),n===0&&t!==0&&f[t-1].getWidth(o-1)===2&&(f[t].copyCellsFrom(f[t-1],o-1,n++,1,!1),f[t-1].setCell(o-1,d))}f[t].replaceCells(n,o,d);for(var E=0,C=f.length-1;C>0&&(C>t||f[C].getTrimmedLength()===0);C--)E++;E>0&&(r.push(i+f.length-E),r.push(E)),i+=f.length-1}}}return r},c.reflowLargerCreateNewLayout=function(y,h){for(var o=[],u=0,d=h[u],r=0,i=0;i<y.length;i++)if(d===i){var a=h[++u];y.onDeleteEmitter.fire({index:i-r,amount:a}),i+=a-1,r+=a,d=h[++u]}else o.push(i);return{layout:o,countRemoved:r}},c.reflowLargerApplyNewLayout=function(y,h){for(var o=[],u=0;u<h.length;u++)o.push(y.get(h[u]));for(u=0;u<o.length;u++)y.set(u,o[u]);y.length=h.length},c.reflowSmallerGetNewLineLengths=function(y,h,o){for(var u=[],d=y.map(function(n,s){return m(y,s,h)}).reduce(function(n,s){return n+s}),r=0,i=0,a=0;a<d;){if(d-a<o){u.push(d-a);break}r+=o;var e=m(y,i,h);r>e&&(r-=e,i++);var f=y[i].getWidth(r-1)===2;f&&r--;var t=f?o-1:o;u.push(t),a+=t}return u},c.getWrappedLineTrimmedLength=m},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(u,d){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])})(u,d)},function(u,d){function r(){this.constructor=u}m(u,d),u.prototype=d===null?Object.create(d):(r.prototype=d.prototype,new r)});Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;var h=_(0),o=function(u){function d(r){var i=u.call(this)||this;return i.line=r,i._id=d._nextId++,i.isDisposed=!1,i._onDispose=new h.EventEmitter,i}return y(d,u),Object.defineProperty(d.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},d._nextId=1,d}(_(2).Disposable);c.Marker=o},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=c.DEFAULT_BELL_SOUND=void 0;var m=_(0),y=_(11),h=_(33);c.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",c.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:c.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 o=["cols","rows"],u=function(){function d(r){this._onOptionChange=new m.EventEmitter,this.options=h.clone(c.DEFAULT_OPTIONS);for(var i=0,a=Object.keys(r);i<a.length;i++){var e=a[i];if(e in this.options){var f=r[e];this.options[e]=f}}}return Object.defineProperty(d.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),d.prototype.setOption=function(r,i){if(!(r in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');if(o.indexOf(r)!==-1)throw new Error('Option "'+r+'" can only be set in the constructor');this.options[r]!==i&&(i=this._sanitizeAndValidateOption(r,i),this.options[r]!==i&&(this.options[r]=i,this._onOptionChange.fire(r)))},d.prototype._sanitizeAndValidateOption=function(r,i){switch(r){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":i||(i=c.DEFAULT_OPTIONS[r]);break;case"cursorWidth":i=Math.floor(i);case"lineHeight":case"tabStopWidth":if(i<1)throw new Error(r+" cannot be less than 1, value: "+i);break;case"minimumContrastRatio":i=Math.max(1,Math.min(21,Math.round(10*i)/10));break;case"scrollback":if((i=Math.min(i,4294967295))<0)throw new Error(r+" cannot be less than 0, value: "+i);break;case"fastScrollSensitivity":case"scrollSensitivity":if(i<=0)throw new Error(r+" cannot be less than or equal to 0, value: "+i)}return i},d.prototype.getOption=function(r){if(!(r in c.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');return this.options[r]},d}();c.OptionsService=u},function(D,c,_){"use strict";var m,y=this&&this.__extends||(m=function(t,n){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var p in l)l.hasOwnProperty(p)&&(s[p]=l[p])})(t,n)},function(t,n){function s(){this.constructor=t}m(t,n),t.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)}),h=this&&this.__decorate||function(t,n,s,l){var p,g=arguments.length,b=g<3?n:l===null?l=Object.getOwnPropertyDescriptor(n,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(t,n,s,l);else for(var x=t.length-1;x>=0;x--)(p=t[x])&&(b=(g<3?p(b):g>3?p(n,s,b):p(n,s))||b);return g>3&&b&&Object.defineProperty(n,s,b),b},o=this&&this.__param||function(t,n){return function(s,l){n(s,l,t)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;var u=_(1),d=_(0),r=_(33),i=_(2),a=Object.freeze({insertMode:!1}),e=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),f=function(t){function n(s,l,p,g){var b=t.call(this)||this;return b._bufferService=l,b._logService=p,b._optionsService=g,b.isCursorInitialized=!1,b.isCursorHidden=!1,b._onData=b.register(new d.EventEmitter),b._onUserInput=b.register(new d.EventEmitter),b._onBinary=b.register(new d.EventEmitter),b._scrollToBottom=s,b.register({dispose:function(){return b._scrollToBottom=void 0}}),b.modes=r.clone(a),b.decPrivateModes=r.clone(e),b}return y(n,t),Object.defineProperty(n.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),n.prototype.reset=function(){this.modes=r.clone(a),this.decPrivateModes=r.clone(e)},n.prototype.triggerDataEvent=function(s,l){if(l===void 0&&(l=!1),!this._optionsService.options.disableStdin){var p=this._bufferService.buffer;p.ybase!==p.ydisp&&this._scrollToBottom(),l&&this._onUserInput.fire(),this._logService.debug('sending data "'+s+'"',function(){return s.split("").map(function(g){return g.charCodeAt(0)})}),this._onData.fire(s)}},n.prototype.triggerBinaryEvent=function(s){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+s+'"',function(){return s.split("").map(function(l){return l.charCodeAt(0)})}),this._onBinary.fire(s))},n=h([o(1,u.IBufferService),o(2,u.ILogService),o(3,u.IOptionsService)],n)}(i.Disposable);c.CoreService=f},function(D,c,_){"use strict";var m=this&&this.__decorate||function(e,f,t,n){var s,l=arguments.length,p=l<3?f:n===null?n=Object.getOwnPropertyDescriptor(f,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,f,t,n);else for(var g=e.length-1;g>=0;g--)(s=e[g])&&(p=(l<3?s(p):l>3?s(f,t,p):s(f,t))||p);return l>3&&p&&Object.defineProperty(f,t,p),p},y=this&&this.__param||function(e,f){return function(t,n){f(t,n,e)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;var h=_(1),o=_(0),u={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(e){return e.button!==4&&e.action===1&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)}},VT200:{events:19,restrict:function(e){return e.action!==32}},DRAG:{events:23,restrict:function(e){return e.action!==32||e.button!==3}},ANY:{events:31,restrict:function(e){return!0}}};function d(e,f){var t=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(t|=64,t|=e.action):(t|=3&e.button,4&e.button&&(t|=64),8&e.button&&(t|=128),e.action===32?t|=32:e.action!==0||f||(t|=3)),t}var r=String.fromCharCode,i={DEFAULT:function(e){var f=[d(e,!1)+32,e.col+32,e.row+32];return f[0]>255||f[1]>255||f[2]>255?"":"\x1B[M"+r(f[0])+r(f[1])+r(f[2])},SGR:function(e){var f=e.action===0&&e.button!==4?"m":"M";return"\x1B[<"+d(e,!0)+";"+e.col+";"+e.row+f}},a=function(){function e(f,t){this._bufferService=f,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new o.EventEmitter,this._lastEvent=null;for(var n=0,s=Object.keys(u);n<s.length;n++){var l=s[n];this.addProtocol(l,u[l])}for(var p=0,g=Object.keys(i);p<g.length;p++){var b=g[p];this.addEncoding(b,i[b])}this.reset()}return e.prototype.addProtocol=function(f,t){this._protocols[f]=t},e.prototype.addEncoding=function(f,t){this._encodings[f]=t},Object.defineProperty(e.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(f){if(!this._protocols[f])throw new Error('unknown protocol "'+f+'"');this._activeProtocol=f,this._onProtocolChange.fire(this._protocols[f].events)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(f){if(!this._encodings[f])throw new Error('unknown encoding "'+f+'"');this._activeEncoding=f},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(e.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),e.prototype.triggerMouseEvent=function(f){if(f.col<0||f.col>=this._bufferService.cols||f.row<0||f.row>=this._bufferService.rows||f.button===4&&f.action===32||f.button===3&&f.action!==32||f.button!==4&&(f.action===2||f.action===3)||(f.col++,f.row++,f.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,f))||!this._protocols[this._activeProtocol].restrict(f))return!1;var t=this._encodings[this._activeEncoding](f);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=f,!0},e.prototype.explainEvents=function(f){return{down:!!(1&f),up:!!(2&f),drag:!!(4&f),move:!!(8&f),wheel:!!(16&f)}},e.prototype._compareEvents=function(f,t){return f.col===t.col&&f.row===t.row&&f.button===t.button&&f.action===t.action&&f.ctrl===t.ctrl&&f.alt===t.alt&&f.shift===t.shift},e=m([y(0,h.IBufferService),y(1,h.ICoreService)],e)}();c.CoreMouseService=a},function(D,c,_){"use strict";var m=this&&this.__decorate||function(u,d,r,i){var a,e=arguments.length,f=e<3?d:i===null?i=Object.getOwnPropertyDescriptor(d,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,d,r,i);else for(var t=u.length-1;t>=0;t--)(a=u[t])&&(f=(e<3?a(f):e>3?a(d,r,f):a(d,r))||f);return e>3&&f&&Object.defineProperty(d,r,f),f},y=this&&this.__param||function(u,d){return function(r,i){d(r,i,u)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DirtyRowService=void 0;var h=_(1),o=function(){function u(d){this._bufferService=d,this.clearRange()}return Object.defineProperty(u.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),u.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},u.prototype.markDirty=function(d){d<this._start?this._start=d:d>this._end&&(this._end=d)},u.prototype.markRangeDirty=function(d,r){if(d>r){var i=d;d=r,r=i}d<this._start&&(this._start=d),r>this._end&&(this._end=r)},u.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u=m([y(0,h.IBufferService)],u)}();c.DirtyRowService=o},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;var m=_(0),y=_(79),h=function(){function o(){this._providers=Object.create(null),this._active="",this._onChange=new m.EventEmitter;var u=new y.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}return Object.defineProperty(o.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"activeVersion",{get:function(){return this._active},set:function(u){if(!this._providers[u])throw new Error('unknown Unicode version "'+u+'"');this._active=u,this._activeProvider=this._providers[u],this._onChange.fire(u)},enumerable:!1,configurable:!0}),o.prototype.register=function(u){this._providers[u.version]=u},o.prototype.wcwidth=function(u){return this._activeProvider.wcwidth(u)},o.prototype.getStringCellWidth=function(u){for(var d=0,r=u.length,i=0;i<r;++i){var a=u.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=r)return d+this.wcwidth(a);var e=u.charCodeAt(i);56320<=e&&e<=57343?a=1024*(a-55296)+e-56320+65536:d+=this.wcwidth(e)}d+=this.wcwidth(a)}return d},o}();c.UnicodeService=h},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;var m,y=_(15),h=[[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]],o=[[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]],u=function(){function d(){if(this.version="6",!m){m=new Uint8Array(65536),y.fill(m,1),m[0]=0,y.fill(m,0,1,32),y.fill(m,0,127,160),y.fill(m,2,4352,4448),m[9001]=2,m[9002]=2,y.fill(m,2,11904,42192),m[12351]=1,y.fill(m,2,44032,55204),y.fill(m,2,63744,64256),y.fill(m,2,65040,65050),y.fill(m,2,65072,65136),y.fill(m,2,65280,65377),y.fill(m,2,65504,65511);for(var r=0;r<h.length;++r)y.fill(m,0,h[r][0],h[r][1]+1)}}return d.prototype.wcwidth=function(r){return r<32?0:r<127?1:r<65536?m[r]:function(i,a){var e,f=0,t=a.length-1;if(i<a[0][0]||i>a[t][1])return!1;for(;t>=f;)if(i>a[e=f+t>>1][1])f=e+1;else{if(!(i<a[e][0]))return!0;t=e-1}return!1}(r,o)?0:r>=131072&&r<=196605||r>=196608&&r<=262141?2:1},d}();c.UnicodeV6=u},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0;var m=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(h){this.glevel=h,this.charset=this._charsets[h]},y.prototype.setgCharset=function(h,o){this._charsets[h]=o,this.glevel===h&&(this.charset=o)},y}();c.CharsetService=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;var m=_(3);c.updateWindowsModeWrappedState=function(y){var h=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),o=h==null?void 0:h.get(y.cols-1),u=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);u&&o&&(u.isWrapped=o[m.CHAR_DATA_CODE_INDEX]!==m.NULL_CELL_CODE&&o[m.CHAR_DATA_CODE_INDEX]!==m.WHITESPACE_CELL_CODE)}},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;var m=function(){function y(h){this._action=h,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return y.prototype.writeSync=function(h){if(this._writeBuffer.length){for(var o=this._bufferOffset;o<this._writeBuffer.length;++o){var u=this._writeBuffer[o],d=this._callbacks[o];this._action(u),d&&d()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(h)},y.prototype.write=function(h,o){var u=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 u._innerWrite()})),this._pendingData+=h.length,this._writeBuffer.push(h),this._callbacks.push(o)},y.prototype._innerWrite=function(){for(var h=this,o=Date.now();this._writeBuffer.length>this._bufferOffset;){var u=this._writeBuffer[this._bufferOffset],d=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(u),this._pendingData-=u.length,d&&d(),Date.now()-o>=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 h._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},y}();c.WriteBuffer=m},function(D,c,_){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0;var m=function(){function y(){this._addons=[]}return y.prototype.dispose=function(){for(var h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()},y.prototype.loadAddon=function(h,o){var u=this,d={instance:o,dispose:o.dispose,isDisposed:!1};this._addons.push(d),o.dispose=function(){return u._wrappedAddonDispose(d)},o.activate(h)},y.prototype._wrappedAddonDispose=function(h){if(!h.isDisposed){for(var o=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===h){o=u;break}if(o===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(o,1)}},y}();c.AddonManager=m}])})}}]);