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.2a7a93c1...

45 lines
598 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],{89629:function(){"use strict"},45954:function(){"use strict"},31246:function(Le,L,a){"use strict";a.d(L,{G0:function(){return We},JW:function(){return ze},Jd:function(){return H},Kl:function(){return je},L5:function(){return l},MH:function(){return me},MI:function(){return He},Qo:function(){return k},SO:function(){return n},Tf:function(){return p},VT:function(){return re},XO:function(){return h},Xy:function(){return g},Y0:function(){return B},Ye:function(){return Oe},Yv:function(){return $e},ZH:function(){return Ie},am:function(){return N},bD:function(){return rt},eA:function(){return x},fA:function(){return ke},fY:function(){return E},g6:function(){return t},g7:function(){return Me},gT:function(){return T},gn:function(){return Te},h$:function(){return Ne},hG:function(){return m},i8:function(){return _e},j3:function(){return De},lH:function(){return W},li:function(){return c},n4:function(){return v},pU:function(){return j},qK:function(){return S},sA:function(){return ye},sP:function(){return ie},t$:function(){return Y},wj:function(){return Ue},zl:function(){return w}});var f=a(33170),y=a(28706),C=Object.defineProperty,_=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(Q,te,ve)=>te in Q?C(Q,te,{enumerable:!0,configurable:!0,writable:!0,value:ve}):Q[te]=ve,r=(Q,te)=>{for(var ve in te||(te={}))o.call(te,ve)&&d(Q,ve,te[ve]);if(_)for(var ve of _(te))u.call(te,ve)&&d(Q,ve,te[ve]);return Q},i=(Q,te,ve)=>new Promise((de,ae)=>{var oe=F=>{try{q(ve.next(F))}catch(X){ae(X)}},ue=F=>{try{q(ve.throw(F))}catch(X){ae(X)}},q=F=>F.done?de(F.value):Promise.resolve(F.value).then(oe,ue);q((ve=ve.apply(Q,te)).next())});const s=(0,y.oP)(),e={};s!=null&&s.homework_common_id&&(e.homework_common_id=s==null?void 0:s.homework_common_id),s!=null&&s.exercisesId&&(e.exercise_id=s==null?void 0:s.exercisesId),console.log(s,e,"urlParamsAll");function h(Q,te){return(0,f.U2)(`tasks/${Q}.json`,r(r({},te),e))}function t(Q,te={}){return(0,f.U2)(`myshixuns/${Q}/challenges.json`,r({},te))}function n(Q,te){return(0,f.U2)(`myshixuns/${Q}/subject_challenges.json`,te)}function l(Q,te,ve){return(0,f.U2)(`tasks/${Q}/star.json`,{shixun_id:te,star:ve})}function c(Q,te){return te.path&&(te.path=encodeURIComponent(te.path)),(0,f.U2)(`tasks/${Q}/rep_content.json`,r(r({},te),e))}function v(Q,te){return(0,f.v_)(`myshixuns/${Q}/update_file.json`,r(r({},te),e))}function S(Q,te){return(0,f.U2)(`tasks/${Q}/reset_original_code.json`,r(r({},te),e))}function p(Q,te){return(0,f.v_)(`myshixuns/${Q}/reset_repository.json`,te)}function m(Q,te){return(0,f.U2)(`tasks/${Q}/reset_passed_code.json`,r(r({},te),e))}function g(Q,te){return(0,f.v_)(`tasks/${Q}/game_build.json`,r(r({},te),e))}function x(Q){return(0,f.ZP)("http://localhost:49352/api/game_build",{method:"post",body:Q})}function k(Q,te){return(0,f.U2)(`tasks/${Q}/game_status.json`,r(r({},te),e))}function w(Q,te){return(0,f.v_)(`tasks/${Q}/choose_build.json`,r(r({},te),e))}function E(Q){return(0,f.U2)(`myshixuns/${Q}/get_remaining_time.json`)}function T(Q){return(0,f.U2)(`tasks/${Q}/picture_display.json`,e)}function A(Q,te){return get(`courses/${Q}/inform_detail.json`,te)}function B(Q){return(0,f.v_)(`tasks/${Q}/plus_or_cancel_praise.json`)}function j(Q,te={}){return(0,f.v_)(`myshixuns/${Q}/repository.json`,te)}function ye(Q,te={}){return(0,f.U2)(`myshixuns/${Q}/start.json`,te)}function re(Q,te={}){return(0,f.v_)(`myshixuns/${Q}/force_delete_pod.json`,te)}function ce(Q,te={}){return get(`myshixuns/${Q}/set_tpisession.json`,te)}function P(Q){return get(`myshixuns/${Q}/reset_pod.json`)}function N(Q,te){return(0,f.U2)(`myshixuns/${Q}/reset_pod.json`,te)}function H(Q,te){return(0,f.ZP)(`/api/tasks/${Q}/reboot_esc.json`,{method:"post",body:te})}function Y(Q){return(0,f.U2)(`tasks/${Q}/check_test_sets.json`)}function W(Q){return(0,f.U2)(`tasks/${Q}/get_answer_info.json`)}function ie(Q){return(0,f.U2)(`tasks/${Q}/get_choose_answer.json`)}function me(Q){return(0,f.U2)(`tasks/${Q}/unlock_choose_answer.json`)}function De(Q,te){return(0,f.U2)(`tasks/${Q}/unlock_answer.json`,{answer_id:te})}function ze(Q,te,ve,de){return(0,f.v_)(`tasks/${Q}/set_games_status.json`,r({result:te,data:ve},de||{}))}function je(Q,te){return(0,f.U2)(`myshixuns/${Q}/active_pod.json`,te)}function _e(Q,te){return(0,f.U2)(`tasks/${Q}/rank_list.json`,te)}function ke(Q,te){return(0,f.v_)(`tasks/${Q}/close_windows_vnc.json`,{tpi_id:te})}function Ie(Q,te){return(0,f.U2)(`tasks/${Q}/commit_files.json`,te)}function Te(Q,te){return(0,f.U2)(`tasks/${Q}/pull_files.json`,te)}function Ne(Q,te){return(0,f.v_)(`tasks/${Q}/log_output`,te)}function $e(Q,te){return(0,f.U2)(`tasks/${Q}/stop_log_output.json`,te)}function He(Q){return i(this,null,function*(){return(0,f.ZP)(`/api/myshixuns/${Q.id}/add_file.json`,{method:"post",body:Q})})}function rt(Q){return i(this,null,function*(){return(0,f.ZP)(`/api/myshixuns/${Q.id}/delete_git_file.json`,{method:"Delete",body:Q})})}function Me(Q){return i(this,null,function*(){return(0,f.ZP)(`/api/myshixuns/${Q.id}/mv_file.json`,{method:"post",body:Q})})}function Ye(Q){return i(this,null,function*(){return Q.path&&(Q.path=encodeURIComponent(Q.path)),Fetch(`/api/tasks/${Q.id}/rep_content.json`,{method:"get",params:Q})})}function Oe(Q,te){return(0,f.ZP)(`/api/shixuns/${Q}/set_start_permanent.json`,{method:"put",body:te})}function Ue(Q){return i(this,null,function*(){return(0,f.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:Q})})}function We(Q){return i(this,null,function*(){return(0,f.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:Q})})}},7621:function(Le,L,a){"use strict";a.d(L,{Z:function(){return _}});var f=a(35973),y={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},C=a(67294),_=({message:o,className:u,children:d,style:r={}})=>C.createElement("div",{className:`custom-spinner ${y.idsRingWrapper} ${u}`},C.createElement("div",{className:y.ldsRing},C.createElement("div",null),C.createElement("div",null),C.createElement("div",null),C.createElement("div",null)),o?C.createElement("p",{style:r},o):null,d,C.createElement(f.Outlet,null))},76621:function(Le,L,a){"use strict";a.d(L,{Z:function(){return C}});var f=a(67294),y=a(73935);class C extends f.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,y.createPortal)(o,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},95458:function(Le,L,a){"use strict";a.r(L);var f=a(67294),y=a(35973),C=a(90512),_=a(18943),o=a(45954),u=a(33054),d=a(33170),r=a(67294),i=Object.defineProperty,s=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,t=(v,S,p)=>S in v?i(v,S,{enumerable:!0,configurable:!0,writable:!0,value:p}):v[S]=p,n=(v,S)=>{for(var p in S||(S={}))e.call(S,p)&&t(v,p,S[p]);if(s)for(var p of s(S))h.call(S,p)&&t(v,p,S[p]);return v},l=(v,S,p)=>new Promise((m,g)=>{var x=E=>{try{w(p.next(E))}catch(T){g(T)}},k=E=>{try{w(p.throw(E))}catch(T){g(T)}},w=E=>E.done?m(E.value):Promise.resolve(E.value).then(x,k);w((p=p.apply(v,S)).next())});const c=({classroomList:v,globalSetting:S,loading:p,dispatch:m})=>{var g;const[x,k]=(0,f.useState)({}),[w,E]=(0,f.useState)({}),T=(0,y.useParams)(),[A]=(0,y.useSearchParams)();let B="68yrbx3ech4a";switch(A.get("type")){case"windows":B="hvp5tzfof4wl";break;case"vnc":B="m3ifqz82epo9";break}let j;(0,f.useEffect)(()=>{ye()},[]),(0,f.useEffect)(()=>{x.host&&setTimeout(()=>{u.Z.publish("create-socket",1)},500)},[x]);const ye=()=>l(void 0,null,function*(){var re,ce;const P=yield(0,d.ZP)(`/api/tasks/${A.get("taskId")||B||"68yrbx3ech4a"}.json`,{method:"get"});if(E(n({},P)),A.get("type")==="terminal"){const N=yield(0,d.ZP)(`/api/myshixuns/${(re=P==null?void 0:P.myshixun)==null?void 0:re.identifier}/start.json`,{method:"get",game_id:(ce=P==null?void 0:P.game)==null?void 0:ce.id});k(n({},(N==null?void 0:N.data)||{}))}A.get("type")});return r.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},A.get("type")==="terminal"&&r.createElement(C.Z,{sshConfigData:x,sid:1}),A.get("type")!=="terminal"&&(w==null?void 0:w.challenge)&&r.createElement(_.Z,{taskId:B,myshixunId:(g=w==null?void 0:w.myshixun)==null?void 0:g.identifier,vnc_url:A.get("type")==="vnc",window_vnc_url:A.get("type")==="windows",taskData:w}))};L.default=(0,y.connect)(({classroomList:v,loading:S,globalSetting:p})=>({classroomList:v,globalSetting:p,loading:S.models.classroomList}))(c)},18943:function(Le,L,a){"use strict";a.d(L,{Z:function(){return H}});var f=a(67294),y=a(62844),C=a(2453),_=a(38703),o=a(7621),u=a(91033),d=a(76621),r=a(35973),i=a(28706),s=a(28802),e=a(85804);const h=s.default.TextArea;var t=({onCancel:Y,onSave:W,content:ie})=>{const[me,De]=(0,f.useState)(ie);function ze(_e){De(_e.target.value)}function je(){W(me)}return(0,f.useEffect)(()=>{De(ie)},[ie]),f.createElement("div",{className:"clipboard-box"},f.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),f.createElement(h,{value:me,onChange:ze,className:"clipboard"}),f.createElement("p",null," ",f.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 "),f.createElement("p",null," ",f.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 "),f.createElement("div",{className:"btn-action-container"},f.createElement(e.ZP,{type:"ghost",onClick:Y,style:{marginRight:10}},"\u53D6\u6D88"),f.createElement(e.ZP,{type:"primary",onClick:je},"\u4FDD\u5B58")))},n=a(51959),l=a(31246),c=a(51256),v=a(33054),S=a(33170),p=a(67294),m=Object.defineProperty,g=Object.defineProperties,x=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,T=(Y,W,ie)=>W in Y?m(Y,W,{enumerable:!0,configurable:!0,writable:!0,value:ie}):Y[W]=ie,A=(Y,W)=>{for(var ie in W||(W={}))w.call(W,ie)&&T(Y,ie,W[ie]);if(k)for(var ie of k(W))E.call(W,ie)&&T(Y,ie,W[ie]);return Y},B=(Y,W)=>g(Y,x(W)),j=(Y,W,ie)=>new Promise((me,De)=>{var ze=ke=>{try{_e(ie.next(ke))}catch(Ie){De(Ie)}},je=ke=>{try{_e(ie.throw(ke))}catch(Ie){De(Ie)}},_e=ke=>ke.done?me(ke.value):Promise.resolve(ke.value).then(ze,je);_e((ie=ie.apply(Y,W)).next())});function ye(Y){return Y.replace(/\\u([\dA-Za-z]{4})/g,function(W,ie){return String.fromCharCode(parseInt("0x"+ie))})}function re(Y){Y||(Y=window.location.search);let W=Y.substr(1),ie={};return W.split("&").forEach(function(me){let De=me.split("=");ie[De[0]]=decodeURIComponent(De[1])}),ie}const ce={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var P=(Y=>(Y[Y.SET_LOADING=0]="SET_LOADING",Y[Y.SET_IS_LARGE=1]="SET_IS_LARGE",Y[Y.SET_MES=2]="SET_MES",Y[Y.SET_STATE=3]="SET_STATE",Y[Y.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",Y[Y.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",Y[Y.UPDATE_ALL=6]="UPDATE_ALL",Y))(P||{});function N(Y,W){switch(W.type){case 0:return B(A({},Y),{loading:W.payload});case 1:return A({},B(A({},Y),{isLarge:W.payload}));case 2:return B(A({},Y),{mes:W.payload});case 3:return A(A({},Y),W.payload);case 5:return B(A({},Y),{transferContent:W.payload});case 4:return B(A({},Y),{showClipBoardBox:W.payload});case 6:return A({loading:Y.loading},W.payload);default:throw new Error}}var H=({vnc_url:Y,window_vnc_url:W,linux_vnc:ie,virtual_machine:me,taskData:De,shixun_environment_id:ze,tab_type:je,instance_startup_type:_e,index_tab:ke,tpi_type:Ie})=>{const Te=(0,f.useRef)(),Ne=(0,f.useRef)(),$e=(0,f.useRef)(),He=(0,f.useRef)(),rt=(0,f.useRef)(),Me=(0,f.useRef)(),Ye=(0,f.useRef)(),Oe=(0,f.useRef)(),[Ue,We]=(0,f.useReducer)(N,ce),[Q,te]=(0,f.useState)(0),{mes:ve,loading:de,showClipBoardBox:ae,isLarge:oe,transferContent:ue}=Ue,q=(0,f.useRef)(),F=(0,f.useRef)(),[X]=(0,r.useSearchParams)();let[O,G]=(0,f.useState)(0),ge=(0,f.useRef)();const xe=(0,r.useParams)();(0,f.useEffect)(()=>()=>{var $,M;(M=($=Ne.current)==null?void 0:$.disconnect)==null||M.call($),clearTimeout(Oe.current),clearInterval(q.current)},[]),(0,f.useEffect)(()=>{F.current=Ue.loading},[Ue.loading]);const Ee=()=>{var $;_e===2?setTimeout(()=>{he()},1500):(($=$e==null?void 0:$e.current)==null?void 0:$.resizeSession)!==void 0&&((0,n.vp)()?$e.current.resizeSession=!0:setTimeout(()=>{},900))};(0,f.useEffect)(()=>(document.addEventListener((0,n.gH)(),Ee),()=>{document.removeEventListener((0,n.gH)(),Ee)}),[]);function I(){We({type:4,payload:!1})}function le(){We({type:1,payload:!oe})}function fe($){return Te.current&&(He.current=new u.Z(M=>{var U;for(let J of M)_e===2&&he(),(J.target.offsetHeight>0||J.target.offsetWidth>0)&&$&&($.scaleViewport=!0,(U=$==null?void 0:$._eventHandlers)==null||U.windowResize())}),He.current.observe(Te.current)),He.current}const Se=()=>j(void 0,null,function*(){var $,M,U,J,Ae,Ce,be;let Xe={};X.get("type")==="exercises"?Xe.exercise_id=X.get("exercisesId"):xe.courseId&&xe.homeworkId&&(Xe.homework_common_id=xe.homeworkId);const Ve=yield(0,l.sA)(($=De.myshixun)==null?void 0:$.identifier,A(B(A({},xe),{taskId:xe.taskId,shixun_environment_id:ze,tab_type:je}),Xe));if((U=(M=Ve==null?void 0:Ve.data)==null?void 0:M.data_list)!=null&&U.length)return v.Z.publish("pod-restrict-data",{identifier:(J=Ve==null?void 0:Ve.data)==null?void 0:J.identifier,data_list:(Ae=Ve==null?void 0:Ve.data)==null?void 0:Ae.data_list}),Promise.reject();if((Ve==null?void 0:Ve.status)===-3)return new Promise((Re,Fe)=>j(void 0,null,function*(){y.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:()=>j(void 0,null,function*(){clearTimeout(ge.current),G(0),yield(0,l.fA)(xe.taskId,Ve==null?void 0:Ve.message),te(Q+1)})})}));if((Ve==null?void 0:Ve.status)===-1)throw new String(Ve==null?void 0:Ve.message);if((Ve==null?void 0:Ve.status)===0)return me&&((0,i.d8)("PVEAuthCookie",(be=(Ce=Ve==null?void 0:Ve.data)==null?void 0:Ce.cookie_options)==null?void 0:be.cookies_value,1),(0,i.d8)("PVELangCookie","zh_CN",1)),v.Z.publish("update-windows-time",Ve==null?void 0:Ve.data),v.Z.publish("send-tabs-result-data",B(A({},Ve==null?void 0:Ve.data),{index_tab:ke})),Ve});function we(){G(100),clearTimeout(ge.current),setTimeout(()=>{We({type:0,payload:!1})},1300),clearTimeout(q.current)}const K=()=>{$e.current=new c.Z(Te.current,Ye.current,{credentials:{password:Me.current},wsProtocols:["binary"],show_dot:!0}),$e.current.removeEventListener("disconnect",z),$e.current.removeEventListener("connect",we),$e.current.removeEventListener("clipboard",D),window.rfbs2=$e.current,He.current=fe($e.current),$e.current.viewOnly=xe.view_only||!1,$e.current.scaleViewport=xe.scale||!0,$e.current.showDotCursor=!0,$e.current.resizeSession=!0,$e.current.addEventListener("disconnect",z),$e.current.addEventListener("connect",we),$e.current.addEventListener("clipboard",D)};function D($){const M=ye($.detail.text);We({type:5,payload:M})}function z(){if(W)We({type:0,payload:!0}),te(Q+1);else{if(clearTimeout(Oe.current),K(),F.current)return;Oe.current=setTimeout(()=>{te(Q+1)},6e3)}setTimeout(()=>{var $,M;(M=($=$e.current)==null?void 0:$.connect)==null||M.call($)},3e3)}(0,f.useEffect)(()=>{if(v.Z.subscribe(`reset-linux-windows-vnc-${ke}`,()=>{te(Q+1)}),(W||Y||ie||me)&&Te.current){clearTimeout(ge.current),_e===2&&he(),new Promise(()=>j(void 0,null,function*(){var J,Ae,Ce,be,Xe;const Ve=re();let Re=yield Se();if(ie||me){const Fe=(Ae=(J=Re==null?void 0:Re.data)==null?void 0:J.link_url)!=null&&Ae.includes("?")?"&":"?";rt.current.src=((Ce=Re==null?void 0:Re.data)==null?void 0:Ce.link_url)+Fe+"time="+Date.now(),We({type:0,payload:!1});return}else if(W)Me.current="Edu123",Ye.current=decodeURIComponent((be=Re==null?void 0:Re.data)==null?void 0:be.link_url);else{const Fe=new URL(decodeURIComponent((Xe=Re==null?void 0:Re.data)==null?void 0:Xe.link_url)),{protocol:qe,searchParams:Ke,host:Be,search:Ge}=Fe,at=(0,i.en)(Ge);Me.current=Ke.get("password"),Ye.current=`${qe==="https:"?"wss":"ws"}://${Be}/${at.path||"websockify"}`}if(_e===2){setTimeout(()=>{var Fe,qe,Ke,Be;fe(),rt.current.style.cssText=rt.current.style.cssText+"width:1920px;height:1080px;position:initial",rt.current.src=`${window.ENV==="build"?"/react/build/":""}/rdp.html?${(Fe=Re==null?void 0:Re.data)!=null&&Fe.gpPort?"gpPort="+((qe=Re==null?void 0:Re.data)==null?void 0:qe.gpPort)+"&password="+((Ke=Re==null?void 0:Re.data)==null?void 0:Ke.password)+"&":""}tpiId=${(Be=De==null?void 0:De.myshixun)==null?void 0:Be.id}&envId=${ze}&tpiType=${Ie}`,We({type:0,payload:!1})},5e3);return}K()}));const $=v.Z.subscribe(`vnc-reset-${ke}`,J=>{if(J==="\u53D6\u6D88"){We({type:0,payload:!1});return}G(0),We({type:3,payload:{loading:!0,mes:J||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),M=v.Z.subscribe(`send-ctrl-alt-delete-${ke}`,()=>{var J;(J=$e.current)==null||J.sendCtrlAltDel(),C.ZP.success("\u53D1\u9001\u6210\u529F")}),U=v.Z.subscribe(`show-clipboard-box-${ke}`,()=>{We({type:4,payload:!0})});return G(0),()=>{var J,Ae,Ce,be;(J=$e.current)==null||J.removeEventListener("disconnect",z),(Ae=$e.current)==null||Ae.removeEventListener("connect",we),(Ce=$e.current)==null||Ce.removeEventListener("clipboard",D),$(),M(),U(),Te.current&&((be=He.current)==null||be.unobserve(Te.current))}}},[Y,W,ie,Q,ze,je]);function R(){var $,M;(M=($=$e.current)==null?void 0:$.sendKey)==null||M.call($,135)}function ee($){return j(this,null,function*(){var M;if(Y){const U=$,J=yield(0,S.ZP)(`/api/tasks/${xe.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(U),shixun_environment_id:ze}});(J==null?void 0:J.status)===0&&(We({type:5,payload:$}),C.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),I())}else(M=$e.current)==null||M.clipboardPasteFrom($),We({type:5,payload:$}),C.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),I()})}function he(){var $,M;$=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),rt.current.parentElement.className="wh1080p",rt.current.parentElement.style.cssText=`transform:scale(${$});transform-origin:center center`,Te.current.style.cssText="translate(-50%, -50%) scale("+$+")"}(0,f.useEffect)(()=>{O==0&&(clearTimeout(ge.current),b())},[O]);const b=()=>{O>99?O=99:(O=O+1,ge.current=setTimeout(()=>{b()},1500)),O<100&&G(O)},V=(0,f.useMemo)(()=>de?"none":ie||me||W&&_e===2?"block":"none",[ie,de,me,W]);return p.createElement(f.Fragment,null,oe&&p.createElement("a",{className:"btn-vnc-resize",onClick:le},p.createElement("i",{className:"iconfont icon-tuichuquanping"})),p.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:V==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},p.createElement("div",null,p.createElement("iframe",{style:{position:oe?"fixed":"absolute",left:0,top:oe?40:0,width:"100%",height:`calc(100% - ${oe?"100px":"0px"})`},frameBorder:"0",ref:rt,allowFullScreen:!0}))),p.createElement("div",{style:{position:oe?"fixed":"absolute",left:0,top:oe?40:0,zIndex:5,width:"100%",height:`calc(100% - ${oe?"100px":"0px"})`},className:`${W?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${oe?"full-screen":""}`},de?p.createElement(o.Z,{message:ve,style:{color:"#0152d9"}},p.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},p.createElement(_.Z,{percent:O,format:$=>p.createElement("span",{className:"c-white"},$,"%")}))):null,p.createElement("div",{ref:Te,className:`vnc-panel ${de?"hidden zIndexf1":"animated fadeIn"}`})),p.createElement(d.Z,null,p.createElement(y.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:ae,onCancel:I,footer:null},p.createElement(t,{onCancel:I,onSave:ee,content:ue}))))}},90512:function(Le,L,a){"use strict";a.d(L,{Z:function(){return w}});var f=a(67294),y=a(19575),C=a(12320),_=a(89629),o={"xterm-panel":"xterm-panel___XA0p9"},u=a(33054),d=a(91033),r=a(31246),i=a(35973),s=a(28706),e=a(62844),h=a(67294),t=Object.defineProperty,n=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,p=(E,T,A)=>T in E?t(E,T,{enumerable:!0,configurable:!0,writable:!0,value:A}):E[T]=A,m=(E,T)=>{for(var A in T||(T={}))v.call(T,A)&&p(E,A,T[A]);if(c)for(var A of c(T))S.call(T,A)&&p(E,A,T[A]);return E},g=(E,T)=>n(E,l(T)),x=(E,T,A)=>new Promise((B,j)=>{var ye=P=>{try{ce(A.next(P))}catch(N){j(N)}},re=P=>{try{ce(A.throw(P))}catch(N){j(N)}},ce=P=>P.done?B(P.value):Promise.resolve(P.value).then(ye,re);ce((A=A.apply(E,T)).next())});const k=3e4;var w=({itemData:E={},game:T,myshixun:A})=>{const B=(0,i.useParams)(),[j,ye]=(0,f.useState)(null),[re,ce]=(0,f.useState)({}),{link_url:P,password:N,port:H}=re,Y=(0,f.useRef)(),W=(0,f.useRef)(),ie=(0,f.useRef)(!1),me=(0,f.useRef)(!1),De=(0,f.useRef)(!0),ze=(0,s.oP)(),[je]=(0,i.useSearchParams)(),{shixun_environment_id:_e,position:ke,tab_type:Ie,index_tab:Te,command_string:Ne}=E;(0,f.useEffect)(()=>{rt()},[]);function $e(Me,Ye,Oe){let Ue=Oe._core._renderService.dimensions.actualCellWidth||9.5,We=Oe._core._renderService.dimensions.actualCellHeight||18;const Q=Math.floor(Ye/We);return[Math.floor(Me/Ue),Q]}function He(Me,Ye){const Oe=new d.Z(Ue=>{for(let We of Ue)if(We.target.offsetHeight>0||We.target.offsetWidth>0){const[Q,te]=$e(We.target.offsetWidth,We.target.offsetHeight,Me);console.log("cols, rows",Q,te),u.Z.publish(`ssh-xterm-resize-${Te}`,{columns:Q,rows:te,width:We.target.offsetWidth,height:We.target.offsetHeight}),Me.resize(Q,te);const ve=y.Base64.decode("IA=="),de=y.Base64.decode("CBtbSw==");Me.write(ve),Me.write(de)}});return Oe.observe(Ye),Oe}function rt(){return x(this,null,function*(){var Me,Ye,Oe,Ue,We;let Q={};je.get("type")==="exercises"?Q.exercise_id=je.get("exercisesId"):B.courseId&&B.homeworkId&&(Q.homework_common_id=B.homeworkId);const te=yield(0,r.sA)(A==null?void 0:A.identifier,m(m({shixun_environment_id:_e,tab_type:Ie,game_id:T.id},ze),Q));if((Ye=(Me=te==null?void 0:te.data)==null?void 0:Me.data_list)!=null&&Ye.length){u.Z.publish("pod-restrict-data",{identifier:(Oe=te==null?void 0:te.data)==null?void 0:Oe.identifier,data_list:(Ue=te==null?void 0:te.data)==null?void 0:Ue.data_list});return}if((te==null?void 0:te.status)===-3)return new Promise((ve,de)=>x(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:()=>x(this,null,function*(){yield closeWindowsVnc(B.taskId,te==null?void 0:te.message),init()})})}));if(((We=te==null?void 0:te.data)==null?void 0:We.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:h.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,",h.createElement("br",null),h.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,r.VT)(A==null?void 0:A.identifier,{shixun_environment_id:_e,tab_type:Ie,game_id:T.id}).then(ve=>{(ve==null?void 0:ve.status)==0&&rt()})}});return}(te==null?void 0:te.status)===0&&(u.Z.publish("update-windows-time",te==null?void 0:te.data),u.Z.publish("send-tabs-result-data",g(m({},te==null?void 0:te.data),{index_tab:Te})),ce(te.data),setTimeout(()=>u.Z.publish(`create-socket-${Te}`),300))})}return(0,f.useEffect)(()=>{if(Y.current&&P){const Me=new C.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});Me.open(Y.current),Me.onData(Oe=>{W.current&&W.current.readyState===1&&W.current.send(JSON.stringify({tp:"client",data:Oe}))}),Me.write("Connecting..."),ye(Me);const Ye=He(Me,Y.current);return()=>{Me.dispose(),Y.current&&(Ye==null||Ye.unobserve(Y.current))}}},[P,Y.current]),(0,f.useEffect)(()=>{if(j&&P){let Me=function(){const Ue=new WebSocket(P);W.current=Ue,Ue.onopen=()=>{let Q=j.element.parentElement;if(Q){let te=Q.offsetWidth,ve=Q.offsetHeight;console.log("init",{tp:"init",data:g(m({},re),{secret:N,width:te,height:ve,rows:j.rows,columns:j.cols})}),Ue.send(JSON.stringify({tp:"init",data:g(m({},re),{secret:N,width:te,height:ve,rows:j.rows,columns:j.cols})}))}j.focus()},Ue.onerror=Q=>{console.log("------in socket error----",Q,Ue,P)},Ue.onmessage=Q=>{me.current=!1,ie.current||(j.write("\r"),setTimeout(()=>{},1e3)),ie.current=!0,console.log("event:",Q);const te=y.Base64.decode(Q.data.toString());let ve=j._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",te,ve,j),j.write(te),Ne!=null&&Ne.length?De.current&&(De.current=!1,setTimeout(()=>{W.current.send(JSON.stringify({tp:"client",data:(Ne==null?void 0:Ne.join("\r"))+"\r"})),j.setOption("disableStdin",!1)},1e3)):(De.current=!1,j.setOption("disableStdin",!1))};const We=setInterval(()=>{var Q;W.current&&((Q=W.current)==null||Q.send(JSON.stringify({tp:"h"})))},k);Ue.onclose=Q=>{We&&clearInterval(We),console.log(We,"tid",Te),me.current||j.write(`\r
connection closed`),me.current=!0,setTimeout(()=>{Me()},1e4)}};const Ye=u.Z.subscribe(`create-socket-${Te}`,()=>{Me()}),Oe=u.Z.subscribe(`ssh-xterm-resize-${Te}`,Ue=>{W.current&&W.current.readyState===1&&W.current.send(JSON.stringify({tp:"resize",data:m({},Ue)}))});return()=>{Ye(),Oe(),W.current&&(W.current.close(),ie.current=!1)}}},[j,P,H]),h.createElement("div",{ref:Y,className:o["xterm-panel"]},P?null:h.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},51959:function(Le,L,a){"use strict";a.d(L,{BU:function(){return y},Dj:function(){return f},gH:function(){return C},vp:function(){return _}});function f(o){try{o.mozRequestFullScreen?o.mozRequestFullScreen():o.webkitRequestFullScreen&&o.webkitRequestFullScreen()}catch(u){console.log(u,":e")}}function y(){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 C=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function _(){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}},78290:function(Le,L,a){"use strict";var f=a(67294),y=a(30186);const C=_=>{let o;return typeof _=="object"&&(_!=null&&_.clearIcon)?o=_:_&&(o={clearIcon:f.createElement(y.Z,null)}),o};L.Z=C},9708:function(Le,L,a){"use strict";a.d(L,{F:function(){return o},Z:function(){return _}});var f=a(13144),y=a.n(f);const C=null;function _(u,d,r){return y()({[`${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},27833:function(Le,L,a){"use strict";var f=a(67294),y=a(65223),C=a(53124);const _=function(o,u){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,i;const{variant:s,[o]:e}=f.useContext(C.E_),h=f.useContext(y.pg),t=e==null?void 0:e.variant;let n;typeof u!="undefined"?n=u:d===!1?n="borderless":n=(i=(r=h!=null?h:t)!==null&&r!==void 0?r:s)!==null&&i!==void 0?i:"outlined";const l=C.tr.includes(n);return[n,l]};L.Z=_},82586:function(Le,L,a){"use strict";a.d(L,{Z:function(){return g}});var f=a(67294),y=a(13144),C=a.n(y),_=a(67656),o=a(17799),u=a(89942),d=a(78290),r=a(9708),i=a(53124),s=a(98866),e=a(35792),h=a(98675),t=a(65223),n=a(27833),l=a(4173),c=a(72922),v=a(47673);function S(x){return!!(x.prefix||x.suffix||x.allowClear||x.showCount)}var p=function(x,k){var w={};for(var E in x)Object.prototype.hasOwnProperty.call(x,E)&&k.indexOf(E)<0&&(w[E]=x[E]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var T=0,E=Object.getOwnPropertySymbols(x);T<E.length;T++)k.indexOf(E[T])<0&&Object.prototype.propertyIsEnumerable.call(x,E[T])&&(w[E[T]]=x[E[T]]);return w},g=(0,f.forwardRef)((x,k)=>{const{prefixCls:w,bordered:E=!0,status:T,size:A,disabled:B,onBlur:j,onFocus:ye,suffix:re,allowClear:ce,addonAfter:P,addonBefore:N,className:H,style:Y,styles:W,rootClassName:ie,onChange:me,classNames:De,variant:ze}=x,je=p(x,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:_e,direction:ke,allowClear:Ie,autoComplete:Te,className:Ne,style:$e,classNames:He,styles:rt}=(0,i.dj)("input"),Me=_e("input",w),Ye=(0,f.useRef)(null),Oe=(0,e.Z)(Me),[Ue,We,Q]=(0,v.TI)(Me,ie),[te]=(0,v.ZP)(Me,Oe),{compactSize:ve,compactItemClassnames:de}=(0,l.ri)(Me,ke),ae=(0,h.Z)(D=>{var z;return(z=A!=null?A:ve)!==null&&z!==void 0?z:D}),oe=f.useContext(s.Z),ue=B!=null?B:oe,{status:q,hasFeedback:F,feedbackIcon:X}=(0,f.useContext)(t.aM),O=(0,r.F)(q,T),G=S(x)||!!F,ge=(0,f.useRef)(G),xe=(0,c.Z)(Ye,!0),Ee=D=>{xe(),j==null||j(D)},I=D=>{xe(),ye==null||ye(D)},le=D=>{xe(),me==null||me(D)},fe=(F||re)&&f.createElement(f.Fragment,null,re,F&&X),Se=(0,d.Z)(ce!=null?ce:Ie),[we,K]=(0,n.Z)("input",ze,E);return Ue(te(f.createElement(_.default,Object.assign({ref:(0,o.sQ)(k,Ye),prefixCls:Me,autoComplete:Te},je,{disabled:ue,onBlur:Ee,onFocus:I,style:Object.assign(Object.assign({},$e),Y),styles:Object.assign(Object.assign({},rt),W),suffix:fe,allowClear:Se,className:C()(H,ie,Q,Oe,de,Ne),onChange:le,addonBefore:N&&f.createElement(u.Z,{form:!0,space:!0},N),addonAfter:P&&f.createElement(u.Z,{form:!0,space:!0},P),classNames:Object.assign(Object.assign(Object.assign({},De),He),{input:C()({[`${Me}-sm`]:ae==="small",[`${Me}-lg`]:ae==="large",[`${Me}-rtl`]:ke==="rtl"},De==null?void 0:De.input,He.input,We),variant:C()({[`${Me}-${we}`]:K},(0,r.Z)(Me,O)),affixWrapper:C()({[`${Me}-affix-wrapper-sm`]:ae==="small",[`${Me}-affix-wrapper-lg`]:ae==="large",[`${Me}-affix-wrapper-rtl`]:ke==="rtl"},We),wrapper:C()({[`${Me}-group-rtl`]:ke==="rtl"},We),groupWrapper:C()({[`${Me}-group-wrapper-sm`]:ae==="small",[`${Me}-group-wrapper-lg`]:ae==="large",[`${Me}-group-wrapper-rtl`]:ke==="rtl",[`${Me}-group-wrapper-${we}`]:K},(0,r.Z)(`${Me}-group-wrapper`,O,F),We)})}))))})},35301:function(Le,L,a){"use strict";a.d(L,{Z:function(){return k}});var f=a(67294),y=a(13144),C=a.n(y),_=a(15927),o=a(78290),u=a(9708),d=a(53124),r=a(98866),i=a(35792),s=a(98675),e=a(65223),h=a(27833),t=a(4173),n=a(87887),l=a(47673),c=a(83559),v=a(43259),S=a(20353);const p=w=>{const{componentCls:E,paddingLG:T}=w,A=`${E}-textarea`;return{[`textarea${E}`]:{maxWidth:"100%",height:"auto",minHeight:w.controlHeight,lineHeight:w.lineHeight,verticalAlign:"bottom",transition:`all ${w.motionDurationSlow}`,resize:"vertical",[`&${E}-mouse-active`]:{transition:`all ${w.motionDurationSlow}, height 0s, width 0s`}},[`${E}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[A]:{position:"relative","&-show-count":{[`> ${E}`]:{height:"100%"},[`${E}-data-count`]:{position:"absolute",bottom:w.calc(w.fontSize).mul(w.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:w.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
&-allow-clear > ${E},
&-affix-wrapper${A}-has-feedback ${E}
`]:{paddingInlineEnd:T},[`&-affix-wrapper${E}-affix-wrapper`]:{padding:0,[`> textarea${E}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:w.calc(w.controlHeight).sub(w.calc(w.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${E}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${E}-clear-icon`]:{position:"absolute",insetInlineEnd:w.paddingInline,insetBlockStart:w.paddingXS},[`${A}-suffix`]:{position:"absolute",top:0,insetInlineEnd:w.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${E}-affix-wrapper-sm`]:{[`${E}-suffix`]:{[`${E}-clear-icon`]:{insetInlineEnd:w.paddingInlineSM}}}}}};var m=(0,c.I$)(["Input","TextArea"],w=>{const E=(0,v.mergeToken)(w,(0,S.e)(w));return[p(E)]},S.T,{resetFont:!1}),g=function(w,E){var T={};for(var A in w)Object.prototype.hasOwnProperty.call(w,A)&&E.indexOf(A)<0&&(T[A]=w[A]);if(w!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,A=Object.getOwnPropertySymbols(w);B<A.length;B++)E.indexOf(A[B])<0&&Object.prototype.propertyIsEnumerable.call(w,A[B])&&(T[A[B]]=w[A[B]]);return T},k=(0,f.forwardRef)((w,E)=>{var T;const{prefixCls:A,bordered:B=!0,size:j,disabled:ye,status:re,allowClear:ce,classNames:P,rootClassName:N,className:H,style:Y,styles:W,variant:ie,showCount:me,onMouseDown:De,onResize:ze}=w,je=g(w,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:_e,direction:ke,allowClear:Ie,autoComplete:Te,className:Ne,style:$e,classNames:He,styles:rt}=(0,d.dj)("textArea"),Me=f.useContext(r.Z),Ye=ye!=null?ye:Me,{status:Oe,hasFeedback:Ue,feedbackIcon:We}=f.useContext(e.aM),Q=(0,u.F)(Oe,re),te=f.useRef(null);f.useImperativeHandle(E,()=>{var K;return{resizableTextArea:(K=te.current)===null||K===void 0?void 0:K.resizableTextArea,focus:D=>{var z,R;(0,n.nH)((R=(z=te.current)===null||z===void 0?void 0:z.resizableTextArea)===null||R===void 0?void 0:R.textArea,D)},blur:()=>{var D;return(D=te.current)===null||D===void 0?void 0:D.blur()}}});const ve=_e("input",A),de=(0,i.Z)(ve),[ae,oe,ue]=(0,l.TI)(ve,N),[q]=m(ve,de),{compactSize:F,compactItemClassnames:X}=(0,t.ri)(ve,ke),O=(0,s.Z)(K=>{var D;return(D=j!=null?j:F)!==null&&D!==void 0?D:K}),[G,ge]=(0,h.Z)("textArea",ie,B),xe=(0,o.Z)(ce!=null?ce:Ie),[Ee,I]=f.useState(!1),[le,fe]=f.useState(!1),Se=K=>{I(!0),De==null||De(K);const D=()=>{I(!1),document.removeEventListener("mouseup",D)};document.addEventListener("mouseup",D)},we=K=>{var D,z;if(ze==null||ze(K),Ee&&typeof getComputedStyle=="function"){const R=(z=(D=te.current)===null||D===void 0?void 0:D.nativeElement)===null||z===void 0?void 0:z.querySelector("textarea");R&&getComputedStyle(R).resize==="both"&&fe(!0)}};return ae(q(f.createElement(_.default,Object.assign({autoComplete:Te},je,{style:Object.assign(Object.assign({},$e),Y),styles:Object.assign(Object.assign({},rt),W),disabled:Ye,allowClear:xe,className:C()(ue,de,H,N,X,Ne,le&&`${ve}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},P),He),{textarea:C()({[`${ve}-sm`]:O==="small",[`${ve}-lg`]:O==="large"},oe,P==null?void 0:P.textarea,He.textarea,Ee&&`${ve}-mouse-active`),variant:C()({[`${ve}-${G}`]:ge},(0,u.Z)(ve,Q)),affixWrapper:C()(`${ve}-textarea-affix-wrapper`,{[`${ve}-affix-wrapper-rtl`]:ke==="rtl",[`${ve}-affix-wrapper-sm`]:O==="small",[`${ve}-affix-wrapper-lg`]:O==="large",[`${ve}-textarea-show-count`]:me||((T=w.count)===null||T===void 0?void 0:T.show)},oe)}),prefixCls:ve,suffix:Ue&&f.createElement("span",{className:`${ve}-textarea-suffix`},We),showCount:me,ref:te,onResize:we,onMouseDown:Se}))))})},72922:function(Le,L,a){"use strict";a.d(L,{Z:function(){return y}});var f=a(67294);function y(C,_){const o=(0,f.useRef)([]),u=()=>{o.current.push(setTimeout(()=>{var d,r,i,s;!((d=C.current)===null||d===void 0)&&d.input&&((r=C.current)===null||r===void 0?void 0:r.input.getAttribute("type"))==="password"&&(!((i=C.current)===null||i===void 0)&&i.input.hasAttribute("value"))&&((s=C.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return(0,f.useEffect)(()=>(_&&u(),()=>o.current.forEach(d=>{d&&clearTimeout(d)})),[]),u}},28802:function(Le,L,a){"use strict";a.d(L,{default:function(){return We}});var f=a(67294),y=a(13144),C=a.n(y),_=a(53124),o=a(65223),u=a(47673),r=Q=>{const{getPrefixCls:te,direction:ve}=(0,f.useContext)(_.E_),{prefixCls:de,className:ae}=Q,oe=te("input-group",de),ue=te("input"),[q,F,X]=(0,u.ZP)(ue),O=C()(oe,X,{[`${oe}-lg`]:Q.size==="large",[`${oe}-sm`]:Q.size==="small",[`${oe}-compact`]:Q.compact,[`${oe}-rtl`]:ve==="rtl"},F,ae),G=(0,f.useContext)(o.aM),ge=(0,f.useMemo)(()=>Object.assign(Object.assign({},G),{isFormItemInput:!1}),[G]);return q(f.createElement("span",{className:O,style:Q.style,onMouseEnter:Q.onMouseEnter,onMouseLeave:Q.onMouseLeave,onFocus:Q.onFocus,onBlur:Q.onBlur},f.createElement(o.aM.Provider,{value:ge},Q.children)))},i=a(82586),s=a(96641),e=a(77527),h=a(1337),t=a(9708),n=a(98675),l=a(83559),c=a(43259),v=a(20353);const S=Q=>{const{componentCls:te,paddingXS:ve}=Q;return{[te]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:ve,"&-rtl":{direction:"rtl"},[`${te}-input`]:{textAlign:"center",paddingInline:Q.paddingXXS},[`&${te}-sm ${te}-input`]:{paddingInline:Q.calc(Q.paddingXXS).div(2).equal()},[`&${te}-lg ${te}-input`]:{paddingInline:Q.paddingXS}}}};var p=(0,l.I$)(["Input","OTP"],Q=>{const te=(0,c.mergeToken)(Q,(0,v.e)(Q));return[S(te)]},v.T),m=a(96523),g=function(Q,te){var ve={};for(var de in Q)Object.prototype.hasOwnProperty.call(Q,de)&&te.indexOf(de)<0&&(ve[de]=Q[de]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,de=Object.getOwnPropertySymbols(Q);ae<de.length;ae++)te.indexOf(de[ae])<0&&Object.prototype.propertyIsEnumerable.call(Q,de[ae])&&(ve[de[ae]]=Q[de[ae]]);return ve},k=f.forwardRef((Q,te)=>{const{value:ve,onChange:de,onActiveChange:ae,index:oe,mask:ue}=Q,q=g(Q,["value","onChange","onActiveChange","index","mask"]),F=ve&&typeof ue=="string"?ue:ve,X=Ee=>{de(oe,Ee.target.value)},O=f.useRef(null);f.useImperativeHandle(te,()=>O.current);const G=()=>{(0,m.Z)(()=>{var Ee;const I=(Ee=O.current)===null||Ee===void 0?void 0:Ee.input;document.activeElement===I&&I&&I.select()})},ge=Ee=>{const{key:I,ctrlKey:le,metaKey:fe}=Ee;I==="ArrowLeft"?ae(oe-1):I==="ArrowRight"?ae(oe+1):I==="z"&&(le||fe)&&Ee.preventDefault(),G()},xe=Ee=>{Ee.key==="Backspace"&&!ve&&ae(oe-1),G()};return f.createElement(i.Z,Object.assign({type:ue===!0?"password":"text"},q,{ref:O,value:F,onInput:X,onFocus:G,onKeyDown:ge,onKeyUp:xe,onMouseDown:G,onMouseUp:G}))}),w=function(Q,te){var ve={};for(var de in Q)Object.prototype.hasOwnProperty.call(Q,de)&&te.indexOf(de)<0&&(ve[de]=Q[de]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,de=Object.getOwnPropertySymbols(Q);ae<de.length;ae++)te.indexOf(de[ae])<0&&Object.prototype.propertyIsEnumerable.call(Q,de[ae])&&(ve[de[ae]]=Q[de[ae]]);return ve};function E(Q){return(Q||"").split("")}const T=Q=>{const{index:te,prefixCls:ve,separator:de}=Q,ae=typeof de=="function"?de(te):de;return ae?f.createElement("span",{className:`${ve}-separator`},ae):null};var B=f.forwardRef((Q,te)=>{const{prefixCls:ve,length:de=6,size:ae,defaultValue:oe,value:ue,onChange:q,formatter:F,separator:X,variant:O,disabled:G,status:ge,autoFocus:xe,mask:Ee,type:I,onInput:le,inputMode:fe}=Q,Se=w(Q,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:we,direction:K}=f.useContext(_.E_),D=we("otp",ve),z=(0,h.Z)(Se,{aria:!0,data:!0,attr:!0}),[R,ee,he]=p(D),b=(0,n.Z)(Ke=>ae!=null?ae:Ke),V=f.useContext(o.aM),$=(0,t.F)(V.status,ge),M=f.useMemo(()=>Object.assign(Object.assign({},V),{status:$,hasFeedback:!1,feedbackIcon:null}),[V,$]),U=f.useRef(null),J=f.useRef({});f.useImperativeHandle(te,()=>({focus:()=>{var Ke;(Ke=J.current[0])===null||Ke===void 0||Ke.focus()},blur:()=>{var Ke;for(let Be=0;Be<de;Be+=1)(Ke=J.current[Be])===null||Ke===void 0||Ke.blur()},nativeElement:U.current}));const Ae=Ke=>F?F(Ke):Ke,[Ce,be]=f.useState(()=>E(Ae(oe||"")));f.useEffect(()=>{ue!==void 0&&be(E(ue))},[ue]);const Xe=(0,e.Z)(Ke=>{be(Ke),le&&le(Ke),q&&Ke.length===de&&Ke.every(Be=>Be)&&Ke.some((Be,Ge)=>Ce[Ge]!==Be)&&q(Ke.join(""))}),Ve=(0,e.Z)((Ke,Be)=>{let Ge=(0,s.Z)(Ce);for(let Ze=0;Ze<Ke;Ze+=1)Ge[Ze]||(Ge[Ze]="");Be.length<=1?Ge[Ke]=Be:Ge=Ge.slice(0,Ke).concat(E(Be)),Ge=Ge.slice(0,de);for(let Ze=Ge.length-1;Ze>=0&&!Ge[Ze];Ze-=1)Ge.pop();const at=Ae(Ge.map(Ze=>Ze||" ").join(""));return Ge=E(at).map((Ze,st)=>Ze===" "&&!Ge[st]?Ge[st]:Ze),Ge}),Re=(Ke,Be)=>{var Ge;const at=Ve(Ke,Be),Ze=Math.min(Ke+Be.length,de-1);Ze!==Ke&&at[Ke]!==void 0&&((Ge=J.current[Ze])===null||Ge===void 0||Ge.focus()),Xe(at)},Fe=Ke=>{var Be;(Be=J.current[Ke])===null||Be===void 0||Be.focus()},qe={variant:O,disabled:G,status:$,mask:Ee,type:I,inputMode:fe};return R(f.createElement("div",Object.assign({},z,{ref:U,className:C()(D,{[`${D}-sm`]:b==="small",[`${D}-lg`]:b==="large",[`${D}-rtl`]:K==="rtl"},he,ee)}),f.createElement(o.aM.Provider,{value:M},Array.from({length:de}).map((Ke,Be)=>{const Ge=`otp-${Be}`,at=Ce[Be]||"";return f.createElement(f.Fragment,{key:Ge},f.createElement(k,Object.assign({ref:Ze=>{J.current[Be]=Ze},index:Be,size:b,htmlSize:1,className:`${D}-input`,onChange:Re,value:at,onActiveChange:Fe,autoFocus:Be===0&&xe},qe)),Be<de-1&&f.createElement(T,{separator:X,index:Be,prefixCls:D}))}))))}),j=a(83963),ye={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"},re=ye,ce=a(84180),P=function(te,ve){return f.createElement(ce.Z,(0,j.Z)({},te,{ref:ve,icon:re}))},N=f.forwardRef(P),H=N,Y=a(43481),W=a(10366),ie=a(17799),me=a(98866),De=a(72922),ze=function(Q,te){var ve={};for(var de in Q)Object.prototype.hasOwnProperty.call(Q,de)&&te.indexOf(de)<0&&(ve[de]=Q[de]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,de=Object.getOwnPropertySymbols(Q);ae<de.length;ae++)te.indexOf(de[ae])<0&&Object.prototype.propertyIsEnumerable.call(Q,de[ae])&&(ve[de[ae]]=Q[de[ae]]);return ve};const je=Q=>Q?f.createElement(Y.Z,null):f.createElement(H,null),_e={click:"onClick",hover:"onMouseOver"};var Ie=f.forwardRef((Q,te)=>{const{disabled:ve,action:de="click",visibilityToggle:ae=!0,iconRender:oe=je}=Q,ue=f.useContext(me.Z),q=ve!=null?ve:ue,F=typeof ae=="object"&&ae.visible!==void 0,[X,O]=(0,f.useState)(()=>F?ae.visible:!1),G=(0,f.useRef)(null);f.useEffect(()=>{F&&O(ae.visible)},[F,ae]);const ge=(0,De.Z)(G),xe=()=>{var b;if(q)return;X&&ge();const V=!X;O(V),typeof ae=="object"&&((b=ae.onVisibleChange)===null||b===void 0||b.call(ae,V))},Ee=b=>{const V=_e[de]||"",$=oe(X),M={[V]:xe,className:`${b}-icon`,key:"passwordIcon",onMouseDown:U=>{U.preventDefault()},onMouseUp:U=>{U.preventDefault()}};return f.cloneElement(f.isValidElement($)?$:f.createElement("span",null,$),M)},{className:I,prefixCls:le,inputPrefixCls:fe,size:Se}=Q,we=ze(Q,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:K}=f.useContext(_.E_),D=K("input",fe),z=K("input-password",le),R=ae&&Ee(z),ee=C()(z,I,{[`${z}-${Se}`]:!!Se}),he=Object.assign(Object.assign({},(0,W.Z)(we,["suffix","iconRender","visibilityToggle"])),{type:X?"text":"password",className:ee,prefixCls:D,suffix:R});return Se&&(he.size=Se),f.createElement(i.Z,Object.assign({ref:(0,ie.sQ)(te,G)},he))}),Te=a(47880),Ne=a(96159),$e=a(85804),He=a(4173),rt=function(Q,te){var ve={};for(var de in Q)Object.prototype.hasOwnProperty.call(Q,de)&&te.indexOf(de)<0&&(ve[de]=Q[de]);if(Q!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ae=0,de=Object.getOwnPropertySymbols(Q);ae<de.length;ae++)te.indexOf(de[ae])<0&&Object.prototype.propertyIsEnumerable.call(Q,de[ae])&&(ve[de[ae]]=Q[de[ae]]);return ve},Ye=f.forwardRef((Q,te)=>{const{prefixCls:ve,inputPrefixCls:de,className:ae,size:oe,suffix:ue,enterButton:q=!1,addonAfter:F,loading:X,disabled:O,onSearch:G,onChange:ge,onCompositionStart:xe,onCompositionEnd:Ee}=Q,I=rt(Q,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:le,direction:fe}=f.useContext(_.E_),Se=f.useRef(!1),we=le("input-search",ve),K=le("input",de),{compactSize:D}=(0,He.ri)(we,fe),z=(0,n.Z)(Re=>{var Fe;return(Fe=oe!=null?oe:D)!==null&&Fe!==void 0?Fe:Re}),R=f.useRef(null),ee=Re=>{Re!=null&&Re.target&&Re.type==="click"&&G&&G(Re.target.value,Re,{source:"clear"}),ge==null||ge(Re)},he=Re=>{var Fe;document.activeElement===((Fe=R.current)===null||Fe===void 0?void 0:Fe.input)&&Re.preventDefault()},b=Re=>{var Fe,qe;G&&G((qe=(Fe=R.current)===null||Fe===void 0?void 0:Fe.input)===null||qe===void 0?void 0:qe.value,Re,{source:"input"})},V=Re=>{Se.current||X||b(Re)},$=typeof q=="boolean"?f.createElement(Te.Z,null):null,M=`${we}-button`;let U;const J=q||{},Ae=J.type&&J.type.__ANT_BUTTON===!0;Ae||J.type==="button"?U=(0,Ne.Tm)(J,Object.assign({onMouseDown:he,onClick:Re=>{var Fe,qe;(qe=(Fe=J==null?void 0:J.props)===null||Fe===void 0?void 0:Fe.onClick)===null||qe===void 0||qe.call(Fe,Re),b(Re)},key:"enterButton"},Ae?{className:M,size:z}:{})):U=f.createElement($e.ZP,{className:M,type:q?"primary":void 0,size:z,disabled:O,key:"enterButton",onMouseDown:he,onClick:b,loading:X,icon:$},q),F&&(U=[U,(0,Ne.Tm)(F,{key:"addonAfter"})]);const Ce=C()(we,{[`${we}-rtl`]:fe==="rtl",[`${we}-${z}`]:!!z,[`${we}-with-button`]:!!q},ae),be=Object.assign(Object.assign({},I),{className:Ce,prefixCls:K,type:"search"}),Xe=Re=>{Se.current=!0,xe==null||xe(Re)},Ve=Re=>{Se.current=!1,Ee==null||Ee(Re)};return f.createElement(i.Z,Object.assign({ref:(0,ie.sQ)(R,te),onPressEnter:V},be,{size:z,onCompositionStart:Xe,onCompositionEnd:Ve,addonAfter:U,suffix:ue,onChange:ee,disabled:O}))}),Oe=a(35301);const Ue=i.Z;Ue.Group=r,Ue.Search=Ye,Ue.TextArea=Oe.Z,Ue.Password=Ie,Ue.OTP=B;var We=Ue},47673:function(Le,L,a){"use strict";a.d(L,{TI:function(){return m},ik:function(){return h},nz:function(){return r},s7:function(){return t},x0:function(){return e}});var f=a(16777),y=a(14747),C=a(80110),_=a(83559),o=a(43259),u=a(20353),d=a(93900);const r=g=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:g,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),i=g=>({borderColor:g.activeBorderColor,boxShadow:g.activeShadow,outline:0,backgroundColor:g.activeBg}),s=g=>{const{paddingBlockLG:x,lineHeightLG:k,borderRadiusLG:w,paddingInlineLG:E}=g;return{padding:`${(0,f.unit)(x)} ${(0,f.unit)(E)}`,fontSize:g.inputFontSizeLG,lineHeight:k,borderRadius:w}},e=g=>({padding:`${(0,f.unit)(g.paddingBlockSM)} ${(0,f.unit)(g.paddingInlineSM)}`,fontSize:g.inputFontSizeSM,borderRadius:g.borderRadiusSM}),h=g=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,f.unit)(g.paddingBlock)} ${(0,f.unit)(g.paddingInline)}`,color:g.colorText,fontSize:g.inputFontSize,lineHeight:g.lineHeight,borderRadius:g.borderRadius,transition:`all ${g.motionDurationMid}`},r(g.colorTextPlaceholder)),{"&-lg":Object.assign({},s(g)),"&-sm":Object.assign({},e(g)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),t=g=>{const{componentCls:x,antCls:k}=g;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:g.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${x}, &-lg > ${x}-group-addon`]:Object.assign({},s(g)),[`&-sm ${x}, &-sm > ${x}-group-addon`]:Object.assign({},e(g)),[`&-lg ${k}-select-single ${k}-select-selector`]:{height:g.controlHeightLG},[`&-sm ${k}-select-single ${k}-select-selector`]:{height:g.controlHeightSM},[`> ${x}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${x}-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 ${(0,f.unit)(g.paddingInline)}`,color:g.colorText,fontWeight:"normal",fontSize:g.inputFontSize,textAlign:"center",borderRadius:g.borderRadius,transition:`all ${g.motionDurationSlow}`,lineHeight:1,[`${k}-select`]:{margin:`${(0,f.unit)(g.calc(g.paddingBlock).add(1).mul(-1).equal())} ${(0,f.unit)(g.calc(g.paddingInline).mul(-1).equal())}`,[`&${k}-select-single:not(${k}-select-customize-input):not(${k}-pagination-size-changer)`]:{[`${k}-select-selector`]:{backgroundColor:"inherit",border:`${(0,f.unit)(g.lineWidth)} ${g.lineType} transparent`,boxShadow:"none"}}},[`${k}-cascader-picker`]:{margin:`-9px ${(0,f.unit)(g.calc(g.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${k}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[x]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${x}-search-with-button &`]:{zIndex:0}}},[`> ${x}:first-child, ${x}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${k}-select ${k}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${x}-affix-wrapper`]:{[`&:not(:first-child) ${x}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${x}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${x}:last-child, ${x}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${k}-select ${k}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${x}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${x}-search &`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius}},[`&:not(:first-child), ${x}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${x}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,y.dF)()),{[`${x}-group-addon, ${x}-group-wrap, > ${x}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:g.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${x}-affix-wrapper,
& > ${x}-number-affix-wrapper,
& > ${k}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:g.calc(g.lineWidth).mul(-1).equal(),borderInlineEndWidth:g.lineWidth},[x]:{float:"none"},[`& > ${k}-select > ${k}-select-selector,
& > ${k}-select-auto-complete ${x},
& > ${k}-cascader-picker ${x},
& > ${x}-group-wrapper ${x}`]:{borderInlineEndWidth:g.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${k}-select-focused`]:{zIndex:1},[`& > ${k}-select > ${k}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${k}-select:first-child > ${k}-select-selector,
& > ${k}-select-auto-complete:first-child ${x},
& > ${k}-cascader-picker:first-child ${x}`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius},[`& > *:last-child,
& > ${k}-select:last-child > ${k}-select-selector,
& > ${k}-cascader-picker:last-child ${x},
& > ${k}-cascader-picker-focused:last-child ${x}`]:{borderInlineEndWidth:g.lineWidth,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius},[`& > ${k}-select-auto-complete ${x}`]:{verticalAlign:"top"},[`${x}-group-wrapper + ${x}-group-wrapper`]:{marginInlineStart:g.calc(g.lineWidth).mul(-1).equal(),[`${x}-affix-wrapper`]:{borderRadius:0}},[`${x}-group-wrapper:not(:last-child)`]:{[`&${x}-search > ${x}-group`]:{[`& > ${x}-group-addon > ${x}-search-button`]:{borderRadius:0},[`& > ${x}`]:{borderStartStartRadius:g.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:g.borderRadius}}}})}},n=g=>{const{componentCls:x,controlHeightSM:k,lineWidth:w,calc:E}=g,A=E(k).sub(E(w).mul(2)).sub(16).div(2).equal();return{[x]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,y.Wf)(g)),h(g)),(0,d.qG)(g)),(0,d.H8)(g)),(0,d.Mu)(g)),(0,d.vc)(g)),{'&[type="color"]':{height:g.controlHeight,[`&${x}-lg`]:{height:g.controlHeightLG},[`&${x}-sm`]:{height:k,paddingTop:A,paddingBottom:A}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},l=g=>{const{componentCls:x}=g;return{[`${x}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:g.colorTextQuaternary,fontSize:g.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${g.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:g.colorTextTertiary},"&:active":{color:g.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,f.unit)(g.inputAffixPadding)}`}}}},c=g=>{const{componentCls:x,inputAffixPadding:k,colorTextDescription:w,motionDurationSlow:E,colorIcon:T,colorIconHover:A,iconCls:B}=g,j=`${x}-affix-wrapper`,ye=`${x}-affix-wrapper-disabled`;return{[j]:Object.assign(Object.assign(Object.assign(Object.assign({},h(g)),{display:"inline-flex",[`&:not(${x}-disabled):hover`]:{zIndex:1,[`${x}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${x}`]:{padding:0},[`> input${x}, > textarea${x}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[x]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:g.paddingXS}},"&-show-count-suffix":{color:w},"&-show-count-has-suffix":{marginInlineEnd:g.paddingXXS},"&-prefix":{marginInlineEnd:k},"&-suffix":{marginInlineStart:k}}}),l(g)),{[`${B}${x}-password-icon`]:{color:T,cursor:"pointer",transition:`all ${E}`,"&:hover":{color:A}}}),[`${x}-underlined`]:{borderRadius:0},[ye]:{[`${B}${x}-password-icon`]:{color:T,cursor:"not-allowed","&:hover":{color:T}}}}},v=g=>{const{componentCls:x,borderRadiusLG:k,borderRadiusSM:w}=g;return{[`${x}-group`]:Object.assign(Object.assign(Object.assign({},(0,y.Wf)(g)),t(g)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${x}-group-addon`]:{borderRadius:k,fontSize:g.inputFontSizeLG}},"&-sm":{[`${x}-group-addon`]:{borderRadius:w}}},(0,d.ir)(g)),(0,d.S5)(g)),{[`&:not(${x}-compact-first-item):not(${x}-compact-last-item)${x}-compact-item`]:{[`${x}, ${x}-group-addon`]:{borderRadius:0}},[`&:not(${x}-compact-last-item)${x}-compact-first-item`]:{[`${x}, ${x}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${x}-compact-first-item)${x}-compact-last-item`]:{[`${x}, ${x}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${x}-compact-last-item)${x}-compact-item`]:{[`${x}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${x}-compact-first-item)${x}-compact-item`]:{[`${x}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},S=g=>{const{componentCls:x,antCls:k}=g,w=`${x}-search`;return{[w]:{[x]:{"&:hover, &:focus":{[`+ ${x}-group-addon ${w}-button:not(${k}-btn-primary)`]:{borderInlineStartColor:g.colorPrimaryHover}}},[`${x}-affix-wrapper`]:{height:g.controlHeight,borderRadius:0},[`${x}-lg`]:{lineHeight:g.calc(g.lineHeightLG).sub(2e-4).equal()},[`> ${x}-group`]:{[`> ${x}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${w}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${w}-button:not(${k}-btn-primary)`]:{color:g.colorTextDescription,"&:hover":{color:g.colorPrimaryHover},"&:active":{color:g.colorPrimaryActive},[`&${k}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${w}-button`]:{height:g.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${x}-affix-wrapper, ${w}-button`]:{height:g.controlHeightLG}},"&-small":{[`${x}-affix-wrapper, ${w}-button`]:{height:g.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${x}-compact-item`]:{[`&:not(${x}-compact-last-item)`]:{[`${x}-group-addon`]:{[`${x}-search-button`]:{marginInlineEnd:g.calc(g.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${x}-compact-first-item)`]:{[`${x},${x}-affix-wrapper`]:{borderRadius:0}},[`> ${x}-group-addon ${x}-search-button,
> ${x},
${x}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${x}-affix-wrapper-focused`]:{zIndex:2}}}}},p=g=>{const{componentCls:x}=g;return{[`${x}-out-of-range`]:{[`&, & input, & textarea, ${x}-show-count-suffix, ${x}-data-count`]:{color:g.colorError}}}},m=(0,_.I$)(["Input","Shared"],g=>{const x=(0,o.mergeToken)(g,(0,u.e)(g));return[n(x),c(x)]},u.T,{resetFont:!1});L.ZP=(0,_.I$)(["Input","Component"],g=>{const x=(0,o.mergeToken)(g,(0,u.e)(g));return[v(x),S(x),p(x),(0,C.c)(x)]},u.T,{resetFont:!1})},20353:function(Le,L,a){"use strict";a.d(L,{T:function(){return C},e:function(){return y}});var f=a(43259);function y(_){return(0,f.mergeToken)(_,{inputAffixPadding:_.paddingXXS})}const C=_=>{const{controlHeight:o,fontSize:u,lineHeight:d,lineWidth:r,controlHeightSM:i,controlHeightLG:s,fontSizeLG:e,lineHeightLG:h,paddingSM:t,controlPaddingHorizontalSM:n,controlPaddingHorizontal:l,colorFillAlter:c,colorPrimaryHover:v,colorPrimary:S,controlOutlineWidth:p,controlOutline:m,colorErrorOutline:g,colorWarningOutline:x,colorBgContainer:k,inputFontSize:w,inputFontSizeLG:E,inputFontSizeSM:T}=_,A=w||u,B=T||A,j=E||e,ye=Math.round((o-A*d)/2*10)/10-r,re=Math.round((i-B*d)/2*10)/10-r,ce=Math.ceil((s-j*h)/2*10)/10-r;return{paddingBlock:Math.max(ye,0),paddingBlockSM:Math.max(re,0),paddingBlockLG:Math.max(ce,0),paddingInline:t-r,paddingInlineSM:n-r,paddingInlineLG:l-r,addonBg:c,activeBorderColor:S,hoverBorderColor:v,activeShadow:`0 0 0 ${p}px ${m}`,errorActiveShadow:`0 0 0 ${p}px ${g}`,warningActiveShadow:`0 0 0 ${p}px ${x}`,hoverBg:k,activeBg:k,inputFontSize:A,inputFontSizeLG:j,inputFontSizeSM:B}}},93900:function(Le,L,a){"use strict";a.d(L,{$U:function(){return o},H8:function(){return t},Mu:function(){return s},S5:function(){return l},Xy:function(){return _},ir:function(){return i},qG:function(){return d},vc:function(){return S}});var f=a(16777),y=a(43259);const C=p=>({borderColor:p.hoverBorderColor,backgroundColor:p.hoverBg}),_=p=>({color:p.colorTextDisabled,backgroundColor:p.colorBgContainerDisabled,borderColor:p.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},C((0,y.mergeToken)(p,{hoverBorderColor:p.colorBorder,hoverBg:p.colorBgContainerDisabled})))}),o=(p,m)=>({background:p.colorBgContainer,borderWidth:p.lineWidth,borderStyle:p.lineType,borderColor:m.borderColor,"&:hover":{borderColor:m.hoverBorderColor,backgroundColor:p.hoverBg},"&:focus, &:focus-within":{borderColor:m.activeBorderColor,boxShadow:m.activeShadow,outline:0,backgroundColor:p.activeBg}}),u=(p,m)=>({[`&${p.componentCls}-status-${m.status}:not(${p.componentCls}-disabled)`]:Object.assign(Object.assign({},o(p,m)),{[`${p.componentCls}-prefix, ${p.componentCls}-suffix`]:{color:m.affixColor}}),[`&${p.componentCls}-status-${m.status}${p.componentCls}-disabled`]:{borderColor:m.borderColor}}),d=(p,m)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o(p,{borderColor:p.colorBorder,hoverBorderColor:p.hoverBorderColor,activeBorderColor:p.activeBorderColor,activeShadow:p.activeShadow})),{[`&${p.componentCls}-disabled, &[disabled]`]:Object.assign({},_(p))}),u(p,{status:"error",borderColor:p.colorError,hoverBorderColor:p.colorErrorBorderHover,activeBorderColor:p.colorError,activeShadow:p.errorActiveShadow,affixColor:p.colorError})),u(p,{status:"warning",borderColor:p.colorWarning,hoverBorderColor:p.colorWarningBorderHover,activeBorderColor:p.colorWarning,activeShadow:p.warningActiveShadow,affixColor:p.colorWarning})),m)}),r=(p,m)=>({[`&${p.componentCls}-group-wrapper-status-${m.status}`]:{[`${p.componentCls}-group-addon`]:{borderColor:m.addonBorderColor,color:m.addonColor}}}),i=p=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${p.componentCls}-group`]:{"&-addon":{background:p.addonBg,border:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},r(p,{status:"error",addonBorderColor:p.colorError,addonColor:p.colorErrorText})),r(p,{status:"warning",addonBorderColor:p.colorWarning,addonColor:p.colorWarningText})),{[`&${p.componentCls}-group-wrapper-disabled`]:{[`${p.componentCls}-group-addon`]:Object.assign({},_(p))}})}),s=(p,m)=>{const{componentCls:g}=p;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${g}-disabled, &[disabled]`]:{color:p.colorTextDisabled,cursor:"not-allowed"},[`&${g}-status-error`]:{"&, & input, & textarea":{color:p.colorError}},[`&${g}-status-warning`]:{"&, & input, & textarea":{color:p.colorWarning}}},m)}},e=(p,m)=>{var g;return{background:m.bg,borderWidth:p.lineWidth,borderStyle:p.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(g=m==null?void 0:m.inputColor)!==null&&g!==void 0?g:"unset"},"&:hover":{background:m.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:m.activeBorderColor,backgroundColor:p.activeBg}}},h=(p,m)=>({[`&${p.componentCls}-status-${m.status}:not(${p.componentCls}-disabled)`]:Object.assign(Object.assign({},e(p,m)),{[`${p.componentCls}-prefix, ${p.componentCls}-suffix`]:{color:m.affixColor}})}),t=(p,m)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e(p,{bg:p.colorFillTertiary,hoverBg:p.colorFillSecondary,activeBorderColor:p.activeBorderColor})),{[`&${p.componentCls}-disabled, &[disabled]`]:Object.assign({},_(p))}),h(p,{status:"error",bg:p.colorErrorBg,hoverBg:p.colorErrorBgHover,activeBorderColor:p.colorError,inputColor:p.colorErrorText,affixColor:p.colorError})),h(p,{status:"warning",bg:p.colorWarningBg,hoverBg:p.colorWarningBgHover,activeBorderColor:p.colorWarning,inputColor:p.colorWarningText,affixColor:p.colorWarning})),m)}),n=(p,m)=>({[`&${p.componentCls}-group-wrapper-status-${m.status}`]:{[`${p.componentCls}-group-addon`]:{background:m.addonBg,color:m.addonColor}}}),l=p=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${p.componentCls}-group`]:{"&-addon":{background:p.colorFillTertiary},[`${p.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorSplit}`}}}},n(p,{status:"error",addonBg:p.colorErrorBg,addonColor:p.colorErrorText})),n(p,{status:"warning",addonBg:p.colorWarningBg,addonColor:p.colorWarningText})),{[`&${p.componentCls}-group-wrapper-disabled`]:{[`${p.componentCls}-group`]:{"&-addon":{background:p.colorFillTertiary,color:p.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorBorder}`,borderTop:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorBorder}`,borderBottom:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorBorder}`,borderTop:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorBorder}`,borderBottom:`${(0,f.unit)(p.lineWidth)} ${p.lineType} ${p.colorBorder}`}}}})}),c=(p,m)=>({background:p.colorBgContainer,borderWidth:`${(0,f.unit)(p.lineWidth)} 0`,borderStyle:`${p.lineType} none`,borderColor:`transparent transparent ${m.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${m.borderColor} transparent`,backgroundColor:p.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${m.borderColor} transparent`,outline:0,backgroundColor:p.activeBg}}),v=(p,m)=>({[`&${p.componentCls}-status-${m.status}:not(${p.componentCls}-disabled)`]:Object.assign(Object.assign({},c(p,m)),{[`${p.componentCls}-prefix, ${p.componentCls}-suffix`]:{color:m.affixColor}}),[`&${p.componentCls}-status-${m.status}${p.componentCls}-disabled`]:{borderColor:`transparent transparent ${m.borderColor} transparent`}}),S=(p,m)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(p,{borderColor:p.colorBorder,hoverBorderColor:p.hoverBorderColor,activeBorderColor:p.activeBorderColor,activeShadow:p.activeShadow})),{[`&${p.componentCls}-disabled, &[disabled]`]:{color:p.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${p.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),v(p,{status:"error",borderColor:p.colorError,hoverBorderColor:p.colorErrorBorderHover,activeBorderColor:p.colorError,activeShadow:p.errorActiveShadow,affixColor:p.colorError})),v(p,{status:"warning",borderColor:p.colorWarning,hoverBorderColor:p.colorWarningBorderHover,activeBorderColor:p.colorWarning,activeShadow:p.warningActiveShadow,affixColor:p.colorWarning})),m)})},38703:function(Le,L,a){"use strict";a.d(L,{Z:function(){return we}});var f=a(67294),y=a(24327),C=a(23526),_=a(60068),o=a(30186),u=a(85846),d=a(13144),r=a.n(d),i=a(10366),s=a(53124),e=a(87462),h=a(1413),t=a(45987),n=a(94184),l=a.n(n),c={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},v=function(){var D=(0,f.useRef)([]),z=(0,f.useRef)(null);return(0,f.useEffect)(function(){var R=Date.now(),ee=!1;D.current.forEach(function(he){if(he){ee=!0;var b=he.style;b.transitionDuration=".3s, .3s, .3s, .06s",z.current&&R-z.current<100&&(b.transitionDuration="0s, 0s")}}),ee&&(z.current=Date.now())}),D.current},S=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],p=function(D){var z=(0,h.Z)((0,h.Z)({},c),D),R=z.className,ee=z.percent,he=z.prefixCls,b=z.strokeColor,V=z.strokeLinecap,$=z.strokeWidth,M=z.style,U=z.trailColor,J=z.trailWidth,Ae=z.transition,Ce=(0,t.Z)(z,S);delete Ce.gapPosition;var be=Array.isArray(ee)?ee:[ee],Xe=Array.isArray(b)?b:[b],Ve=v(),Re=$/2,Fe=100-$/2,qe="M ".concat(V==="round"?Re:0,",").concat(Re,`
L `).concat(V==="round"?Fe:100,",").concat(Re),Ke="0 0 100 ".concat($),Be=0;return f.createElement("svg",(0,e.Z)({className:l()("".concat(he,"-line"),R),viewBox:Ke,preserveAspectRatio:"none",style:M},Ce),f.createElement("path",{className:"".concat(he,"-line-trail"),d:qe,strokeLinecap:V,stroke:U,strokeWidth:J||$,fillOpacity:"0"}),be.map(function(Ge,at){var Ze=1;switch(V){case"round":Ze=1-$/100;break;case"square":Ze=1-$/2/100;break;default:Ze=1;break}var st={strokeDasharray:"".concat(Ge*Ze,"px, 100px"),strokeDashoffset:"-".concat(Be,"px"),transition:Ae||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Je=Xe[at]||Xe[Xe.length-1];return Be+=Ge,f.createElement("path",{key:at,className:"".concat(he,"-line-path"),d:qe,strokeLinecap:V,stroke:Je,strokeWidth:$,fillOpacity:"0",ref:function(ne){Ve[at]=ne},style:st})}))},m=p,g=a(71002),x=a(97685),k=a(98924),w=0,E=(0,k.Z)();function T(){var K;return E?(K=w,w+=1):K="TEST_OR_SSR",K}var A=function(K){var D=f.useState(),z=(0,x.Z)(D,2),R=z[0],ee=z[1];return f.useEffect(function(){ee("rc_progress_".concat(T()))},[]),K||R},B=function(D){var z=D.bg,R=D.children;return f.createElement("div",{style:{width:"100%",height:"100%",background:z}},R)};function j(K,D){return Object.keys(K).map(function(z){var R=parseFloat(z),ee="".concat(Math.floor(R*D),"%");return"".concat(K[z]," ").concat(ee)})}var ye=f.forwardRef(function(K,D){var z=K.prefixCls,R=K.color,ee=K.gradientId,he=K.radius,b=K.style,V=K.ptg,$=K.strokeLinecap,M=K.strokeWidth,U=K.size,J=K.gapDegree,Ae=R&&(0,g.Z)(R)==="object",Ce=Ae?"#FFF":void 0,be=U/2,Xe=f.createElement("circle",{className:"".concat(z,"-circle-path"),r:he,cx:be,cy:be,stroke:Ce,strokeLinecap:$,strokeWidth:M,opacity:V===0?0:1,style:b,ref:D});if(!Ae)return Xe;var Ve="".concat(ee,"-conic"),Re=J?"".concat(180+J/2,"deg"):"0deg",Fe=j(R,(360-J)/360),qe=j(R,1),Ke="conic-gradient(from ".concat(Re,", ").concat(Fe.join(", "),")"),Be="linear-gradient(to ".concat(J?"bottom":"top",", ").concat(qe.join(", "),")");return f.createElement(f.Fragment,null,f.createElement("mask",{id:Ve},Xe),f.createElement("foreignObject",{x:0,y:0,width:U,height:U,mask:"url(#".concat(Ve,")")},f.createElement(B,{bg:Be},f.createElement(B,{bg:Ke}))))}),re=ye,ce=100,P=function(D,z,R,ee,he,b,V,$,M,U){var J=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Ae=R/100*360*((360-b)/360),Ce=b===0?0:{bottom:0,top:180,left:90,right:-90}[V],be=(100-ee)/100*z;M==="round"&&ee!==100&&(be+=U/2,be>=z&&(be=z-.01));var Xe=ce/2;return{stroke:typeof $=="string"?$:void 0,strokeDasharray:"".concat(z,"px ").concat(D),strokeDashoffset:be+J,transform:"rotate(".concat(he+Ae+Ce,"deg)"),transformOrigin:"".concat(Xe,"px ").concat(Xe,"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}},N=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function H(K){var D=K!=null?K:[];return Array.isArray(D)?D:[D]}var Y=function(D){var z=(0,h.Z)((0,h.Z)({},c),D),R=z.id,ee=z.prefixCls,he=z.steps,b=z.strokeWidth,V=z.trailWidth,$=z.gapDegree,M=$===void 0?0:$,U=z.gapPosition,J=z.trailColor,Ae=z.strokeLinecap,Ce=z.style,be=z.className,Xe=z.strokeColor,Ve=z.percent,Re=(0,t.Z)(z,N),Fe=ce/2,qe=A(R),Ke="".concat(qe,"-gradient"),Be=Fe-b/2,Ge=Math.PI*2*Be,at=M>0?90+M/2:-90,Ze=Ge*((360-M)/360),st=(0,g.Z)(he)==="object"?he:{count:he,gap:2},Je=st.count,Z=st.gap,ne=H(Ve),se=H(Xe),pe=se.find(function(nt){return nt&&(0,g.Z)(nt)==="object"}),Pe=pe&&(0,g.Z)(pe)==="object",Qe=Pe?"butt":Ae,et=P(Ge,Ze,0,100,at,M,U,J,Qe,b),ot=v(),it=function(){var ct=0;return ne.map(function(ut,_t){var ht=se[_t]||se[se.length-1],vt=P(Ge,Ze,ct,ut,at,M,U,ht,Qe,b);return ct+=ut,f.createElement(re,{key:_t,color:ht,ptg:ut,radius:Be,prefixCls:ee,gradientId:Ke,style:vt,strokeLinecap:Qe,strokeWidth:b,gapDegree:M,ref:function(xt){ot[_t]=xt},size:ce})}).reverse()},tt=function(){var ct=Math.round(Je*(ne[0]/100)),ut=100/Je,_t=0;return new Array(Je).fill(null).map(function(ht,vt){var ft=vt<=ct-1?se[0]:J,xt=ft&&(0,g.Z)(ft)==="object"?"url(#".concat(Ke,")"):void 0,mt=P(Ge,Ze,_t,ut,at,M,U,ft,"butt",b,Z);return _t+=(Ze-mt.strokeDashoffset+Z)*100/Ze,f.createElement("circle",{key:vt,className:"".concat(ee,"-circle-path"),r:Be,cx:Fe,cy:Fe,stroke:xt,strokeWidth:b,opacity:1,style:mt,ref:function(Ct){ot[vt]=Ct}})})};return f.createElement("svg",(0,e.Z)({className:l()("".concat(ee,"-circle"),be),viewBox:"0 0 ".concat(ce," ").concat(ce),style:Ce,id:R,role:"presentation"},Re),!Je&&f.createElement("circle",{className:"".concat(ee,"-circle-trail"),r:Be,cx:Fe,cy:Fe,stroke:J,strokeLinecap:Qe,strokeWidth:V||b,style:et}),Je?tt():it())},W=Y,ie={Line:m,Circle:W},me=a(83062),De=a(65409);function ze(K){return!K||K<0?0:K>100?100:K}function je(K){let{success:D,successPercent:z}=K,R=z;return D&&"progress"in D&&(R=D.progress),D&&"percent"in D&&(R=D.percent),R}const _e=K=>{let{percent:D,success:z,successPercent:R}=K;const ee=ze(je({success:z,successPercent:R}));return[ee,ze(ze(D)-ee)]},ke=K=>{let{success:D={},strokeColor:z}=K;const{strokeColor:R}=D;return[R||De.presetPrimaryColors.green,z||null]},Ie=(K,D,z)=>{var R,ee,he,b;let V=-1,$=-1;if(D==="step"){const M=z.steps,U=z.strokeWidth;typeof K=="string"||typeof K=="undefined"?(V=K==="small"?2:14,$=U!=null?U:8):typeof K=="number"?[V,$]=[K,K]:[V=14,$=8]=Array.isArray(K)?K:[K.width,K.height],V*=M}else if(D==="line"){const M=z==null?void 0:z.strokeWidth;typeof K=="string"||typeof K=="undefined"?$=M||(K==="small"?6:8):typeof K=="number"?[V,$]=[K,K]:[V=-1,$=8]=Array.isArray(K)?K:[K.width,K.height]}else(D==="circle"||D==="dashboard")&&(typeof K=="string"||typeof K=="undefined"?[V,$]=K==="small"?[60,60]:[120,120]:typeof K=="number"?[V,$]=[K,K]:Array.isArray(K)&&(V=(ee=(R=K[0])!==null&&R!==void 0?R:K[1])!==null&&ee!==void 0?ee:120,$=(b=(he=K[0])!==null&&he!==void 0?he:K[1])!==null&&b!==void 0?b:120));return[V,$]},Te=3,Ne=K=>Te/K*100;var He=K=>{const{prefixCls:D,trailColor:z=null,strokeLinecap:R="round",gapPosition:ee,gapDegree:he,width:b=120,type:V,children:$,success:M,size:U=b,steps:J}=K,[Ae,Ce]=Ie(U,"circle");let{strokeWidth:be}=K;be===void 0&&(be=Math.max(Ne(Ae),6));const Xe={width:Ae,height:Ce,fontSize:Ae*.15+6},Ve=f.useMemo(()=>{if(he||he===0)return he;if(V==="dashboard")return 75},[he,V]),Re=_e(K),Fe=ee||V==="dashboard"&&"bottom"||void 0,qe=Object.prototype.toString.call(K.strokeColor)==="[object Object]",Ke=ke({success:M,strokeColor:K.strokeColor}),Be=r()(`${D}-inner`,{[`${D}-circle-gradient`]:qe}),Ge=f.createElement(W,{steps:J,percent:J?Re[1]:Re,strokeWidth:be,trailWidth:be,strokeColor:J?Ke[1]:Ke,strokeLinecap:R,trailColor:z,prefixCls:D,gapDegree:Ve,gapPosition:Fe}),at=Ae<=20,Ze=f.createElement("div",{className:Be,style:Xe},Ge,!at&&$);return at?f.createElement(me.Z,{title:$},Ze):Ze},rt=a(16777),Me=a(14747),Ye=a(83559),Oe=a(43259);const Ue="--progress-line-stroke-color",We="--progress-percent",Q=K=>{const D=K?"100%":"-100%";return new rt.Keyframes(`antProgress${K?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${D}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${D}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},te=K=>{const{componentCls:D,iconCls:z}=K;return{[D]:Object.assign(Object.assign({},(0,Me.Wf)(K)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:K.fontSize},[`${D}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${D}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:K.remainingColor,borderRadius:K.lineBorderRadius},[`${D}-inner:not(${D}-circle-gradient)`]:{[`${D}-circle-path`]:{stroke:K.defaultColor}},[`${D}-success-bg, ${D}-bg`]:{position:"relative",background:K.defaultColor,borderRadius:K.lineBorderRadius,transition:`all ${K.motionDurationSlow} ${K.motionEaseInOutCirc}`},[`${D}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${D}-text`]:{width:"max-content",marginInlineStart:0,marginTop:K.marginXXS}},[`${D}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Ue})`]},height:"100%",width:`calc(1 / var(${We}) * 100%)`,display:"block"},[`&${D}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${D}-text-inner`]:{color:K.colorWhite,[`&${D}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${D}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:K.colorSuccess},[`${D}-text`]:{display:"inline-block",marginInlineStart:K.marginXS,color:K.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[z]:{fontSize:K.fontSize},[`&${D}-text-outer`]:{width:"max-content"},[`&${D}-text-outer${D}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:K.marginXS}},[`${D}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,rt.unit)(K.paddingXXS)}`,[`&${D}-text-start`]:{justifyContent:"start"},[`&${D}-text-end`]:{justifyContent:"end"}},[`&${D}-status-active`]:{[`${D}-bg::before`]:{position:"absolute",inset:0,backgroundColor:K.colorBgContainer,borderRadius:K.lineBorderRadius,opacity:0,animationName:Q(),animationDuration:K.progressActiveMotionDuration,animationTimingFunction:K.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${D}-rtl${D}-status-active`]:{[`${D}-bg::before`]:{animationName:Q(!0)}},[`&${D}-status-exception`]:{[`${D}-bg`]:{backgroundColor:K.colorError},[`${D}-text`]:{color:K.colorError}},[`&${D}-status-exception ${D}-inner:not(${D}-circle-gradient)`]:{[`${D}-circle-path`]:{stroke:K.colorError}},[`&${D}-status-success`]:{[`${D}-bg`]:{backgroundColor:K.colorSuccess},[`${D}-text`]:{color:K.colorSuccess}},[`&${D}-status-success ${D}-inner:not(${D}-circle-gradient)`]:{[`${D}-circle-path`]:{stroke:K.colorSuccess}}})}},ve=K=>{const{componentCls:D,iconCls:z}=K;return{[D]:{[`${D}-circle-trail`]:{stroke:K.remainingColor},[`&${D}-circle ${D}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${D}-circle ${D}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:K.circleTextColor,fontSize:K.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[z]:{fontSize:K.circleIconFontSize}},[`${D}-circle&-status-exception`]:{[`${D}-text`]:{color:K.colorError}},[`${D}-circle&-status-success`]:{[`${D}-text`]:{color:K.colorSuccess}}},[`${D}-inline-circle`]:{lineHeight:1,[`${D}-inner`]:{verticalAlign:"bottom"}}}},de=K=>{const{componentCls:D}=K;return{[D]:{[`${D}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:K.progressStepMinWidth,marginInlineEnd:K.progressStepMarginInlineEnd,backgroundColor:K.remainingColor,transition:`all ${K.motionDurationSlow}`,"&-active":{backgroundColor:K.defaultColor}}}}}},ae=K=>{const{componentCls:D,iconCls:z}=K;return{[D]:{[`${D}-small&-line, ${D}-small&-line ${D}-text ${z}`]:{fontSize:K.fontSizeSM}}}},oe=K=>({circleTextColor:K.colorText,defaultColor:K.colorInfo,remainingColor:K.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${K.fontSize/K.fontSizeSM}em`});var ue=(0,Ye.I$)("Progress",K=>{const D=K.calc(K.marginXXS).div(2).equal(),z=(0,Oe.mergeToken)(K,{progressStepMarginInlineEnd:D,progressStepMinWidth:D,progressActiveMotionDuration:"2.4s"});return[te(z),ve(z),de(z),ae(z)]},oe),q=function(K,D){var z={};for(var R in K)Object.prototype.hasOwnProperty.call(K,R)&&D.indexOf(R)<0&&(z[R]=K[R]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,R=Object.getOwnPropertySymbols(K);ee<R.length;ee++)D.indexOf(R[ee])<0&&Object.prototype.propertyIsEnumerable.call(K,R[ee])&&(z[R[ee]]=K[R[ee]]);return z};const F=K=>{let D=[];return Object.keys(K).forEach(z=>{const R=parseFloat(z.replace(/%/g,""));Number.isNaN(R)||D.push({key:R,value:K[z]})}),D=D.sort((z,R)=>z.key-R.key),D.map(z=>{let{key:R,value:ee}=z;return`${ee} ${R}%`}).join(", ")},X=(K,D)=>{const{from:z=De.presetPrimaryColors.blue,to:R=De.presetPrimaryColors.blue,direction:ee=D==="rtl"?"to left":"to right"}=K,he=q(K,["from","to","direction"]);if(Object.keys(he).length!==0){const V=F(he),$=`linear-gradient(${ee}, ${V})`;return{background:$,[Ue]:$}}const b=`linear-gradient(${ee}, ${z}, ${R})`;return{background:b,[Ue]:b}};var G=K=>{const{prefixCls:D,direction:z,percent:R,size:ee,strokeWidth:he,strokeColor:b,strokeLinecap:V="round",children:$,trailColor:M=null,percentPosition:U,success:J}=K,{align:Ae,type:Ce}=U,be=b&&typeof b!="string"?X(b,z):{[Ue]:b,background:b},Xe=V==="square"||V==="butt"?0:void 0,Ve=ee!=null?ee:[-1,he||(ee==="small"?6:8)],[Re,Fe]=Ie(Ve,"line",{strokeWidth:he}),qe={backgroundColor:M||void 0,borderRadius:Xe},Ke=Object.assign(Object.assign({width:`${ze(R)}%`,height:Fe,borderRadius:Xe},be),{[We]:ze(R)/100}),Be=je(K),Ge={width:`${ze(Be)}%`,height:Fe,borderRadius:Xe,backgroundColor:J==null?void 0:J.strokeColor},at={width:Re<0?"100%":Re},Ze=f.createElement("div",{className:`${D}-inner`,style:qe},f.createElement("div",{className:r()(`${D}-bg`,`${D}-bg-${Ce}`),style:Ke},Ce==="inner"&&$),Be!==void 0&&f.createElement("div",{className:`${D}-success-bg`,style:Ge})),st=Ce==="outer"&&Ae==="start",Je=Ce==="outer"&&Ae==="end";return Ce==="outer"&&Ae==="center"?f.createElement("div",{className:`${D}-layout-bottom`},Ze,$):f.createElement("div",{className:`${D}-outer`,style:at},st&&$,Ze,Je&&$)},xe=K=>{const{size:D,steps:z,rounding:R=Math.round,percent:ee=0,strokeWidth:he=8,strokeColor:b,trailColor:V=null,prefixCls:$,children:M}=K,U=R(z*(ee/100)),J=D==="small"?2:14,Ae=D!=null?D:[J,he],[Ce,be]=Ie(Ae,"step",{steps:z,strokeWidth:he}),Xe=Ce/z,Ve=Array.from({length:z});for(let Re=0;Re<z;Re++){const Fe=Array.isArray(b)?b[Re]:b;Ve[Re]=f.createElement("div",{key:Re,className:r()(`${$}-steps-item`,{[`${$}-steps-item-active`]:Re<=U-1}),style:{backgroundColor:Re<=U-1?Fe:V,width:Xe,height:be}})}return f.createElement("div",{className:`${$}-steps-outer`},Ve,M)},Ee=function(K,D){var z={};for(var R in K)Object.prototype.hasOwnProperty.call(K,R)&&D.indexOf(R)<0&&(z[R]=K[R]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,R=Object.getOwnPropertySymbols(K);ee<R.length;ee++)D.indexOf(R[ee])<0&&Object.prototype.propertyIsEnumerable.call(K,R[ee])&&(z[R[ee]]=K[R[ee]]);return z};const I=null,le=["normal","exception","active","success"];var Se=f.forwardRef((K,D)=>{const{prefixCls:z,className:R,rootClassName:ee,steps:he,strokeColor:b,percent:V=0,size:$="default",showInfo:M=!0,type:U="line",status:J,format:Ae,style:Ce,percentPosition:be={}}=K,Xe=Ee(K,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:Ve="end",type:Re="outer"}=be,Fe=Array.isArray(b)?b[0]:b,qe=typeof b=="string"||Array.isArray(b)?b:void 0,Ke=f.useMemo(()=>{if(Fe){const it=typeof Fe=="string"?Fe:Object.values(Fe)[0];return new y.FastColor(it).isLight()}return!1},[b]),Be=f.useMemo(()=>{var it,tt;const nt=je(K);return parseInt(nt!==void 0?(it=nt!=null?nt:0)===null||it===void 0?void 0:it.toString():(tt=V!=null?V:0)===null||tt===void 0?void 0:tt.toString(),10)},[V,K.success,K.successPercent]),Ge=f.useMemo(()=>!le.includes(J)&&Be>=100?"success":J||"normal",[J,Be]),{getPrefixCls:at,direction:Ze,progress:st}=f.useContext(s.E_),Je=at("progress",z),[Z,ne,se]=ue(Je),pe=U==="line",Pe=pe&&!he,Qe=f.useMemo(()=>{if(!M)return null;const it=je(K);let tt;const nt=Ae||(ut=>`${ut}%`),ct=pe&&Ke&&Re==="inner";return Re==="inner"||Ae||Ge!=="exception"&&Ge!=="success"?tt=nt(ze(V),ze(it)):Ge==="exception"?tt=pe?f.createElement(o.Z,null):f.createElement(u.Z,null):Ge==="success"&&(tt=pe?f.createElement(C.Z,null):f.createElement(_.Z,null)),f.createElement("span",{className:r()(`${Je}-text`,{[`${Je}-text-bright`]:ct,[`${Je}-text-${Ve}`]:Pe,[`${Je}-text-${Re}`]:Pe}),title:typeof tt=="string"?tt:void 0},tt)},[M,V,Be,Ge,U,Je,Ae]);let et;U==="line"?et=he?f.createElement(xe,Object.assign({},K,{strokeColor:qe,prefixCls:Je,steps:typeof he=="object"?he.count:he}),Qe):f.createElement(G,Object.assign({},K,{strokeColor:Fe,prefixCls:Je,direction:Ze,percentPosition:{align:Ve,type:Re}}),Qe):(U==="circle"||U==="dashboard")&&(et=f.createElement(He,Object.assign({},K,{strokeColor:Fe,prefixCls:Je,progressStatus:Ge}),Qe));const ot=r()(Je,`${Je}-status-${Ge}`,{[`${Je}-${U==="dashboard"&&"circle"||U}`]:U!=="line",[`${Je}-inline-circle`]:U==="circle"&&Ie($,"circle")[0]<=20,[`${Je}-line`]:Pe,[`${Je}-line-align-${Ve}`]:Pe,[`${Je}-line-position-${Re}`]:Pe,[`${Je}-steps`]:he,[`${Je}-show-info`]:M,[`${Je}-${$}`]:typeof $=="string",[`${Je}-rtl`]:Ze==="rtl"},st==null?void 0:st.className,R,ee,ne,se);return Z(f.createElement("div",Object.assign({ref:D,style:Object.assign(Object.assign({},st==null?void 0:st.style),Ce),className:ot,role:"progressbar","aria-valuenow":Be,"aria-valuemin":0,"aria-valuemax":100},(0,i.Z)(Xe,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),et))}),we=Se},60068:function(Le,L,a){"use strict";a.d(L,{Z:function(){return r}});var f=a(83963),y=a(67294),C={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"},_=C,o=a(84180),u=function(s,e){return y.createElement(o.Z,(0,f.Z)({},s,{ref:e,icon:_}))},d=y.forwardRef(u),r=d},43481:function(Le,L,a){"use strict";a.d(L,{Z:function(){return r}});var f=a(83963),y=a(67294),C={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"},_=C,o=a(84180),u=function(s,e){return y.createElement(o.Z,(0,f.Z)({},s,{ref:e,icon:_}))},d=y.forwardRef(u),r=d},47880:function(Le,L,a){"use strict";a.d(L,{Z:function(){return r}});var f=a(83963),y=a(67294),C={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"},_=C,o=a(84180),u=function(s,e){return y.createElement(o.Z,(0,f.Z)({},s,{ref:e,icon:_}))},d=y.forwardRef(u),r=d},15927:function(Le,L,a){"use strict";a.r(L),a.d(L,{ResizableTextArea:function(){return Ge},default:function(){return Je}});function f(){return f=Object.assign?Object.assign.bind():function(Z){for(var ne=1;ne<arguments.length;ne++){var se=arguments[ne];for(var pe in se)Object.prototype.hasOwnProperty.call(se,pe)&&(Z[pe]=se[pe])}return Z},f.apply(this,arguments)}function y(Z){"@babel/helpers - typeof";return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},y(Z)}function C(Z,ne){if(y(Z)!=="object"||Z===null)return Z;var se=Z[Symbol.toPrimitive];if(se!==void 0){var pe=se.call(Z,ne||"default");if(y(pe)!=="object")return pe;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ne==="string"?String:Number)(Z)}function _(Z){var ne=C(Z,"string");return y(ne)==="symbol"?ne:String(ne)}function o(Z,ne,se){return ne=_(ne),ne in Z?Object.defineProperty(Z,ne,{value:se,enumerable:!0,configurable:!0,writable:!0}):Z[ne]=se,Z}function u(Z,ne){var se=Object.keys(Z);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(Z);ne&&(pe=pe.filter(function(Pe){return Object.getOwnPropertyDescriptor(Z,Pe).enumerable})),se.push.apply(se,pe)}return se}function d(Z){for(var ne=1;ne<arguments.length;ne++){var se=arguments[ne]!=null?arguments[ne]:{};ne%2?u(Object(se),!0).forEach(function(pe){o(Z,pe,se[pe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(se)):u(Object(se)).forEach(function(pe){Object.defineProperty(Z,pe,Object.getOwnPropertyDescriptor(se,pe))})}return Z}function r(Z,ne){(ne==null||ne>Z.length)&&(ne=Z.length);for(var se=0,pe=new Array(ne);se<ne;se++)pe[se]=Z[se];return pe}function i(Z){if(Array.isArray(Z))return r(Z)}function s(Z){if(typeof Symbol!="undefined"&&Z[Symbol.iterator]!=null||Z["@@iterator"]!=null)return Array.from(Z)}function e(Z,ne){if(Z){if(typeof Z=="string")return r(Z,ne);var se=Object.prototype.toString.call(Z).slice(8,-1);if(se==="Object"&&Z.constructor&&(se=Z.constructor.name),se==="Map"||se==="Set")return Array.from(Z);if(se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(se))return r(Z,ne)}}function h(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t(Z){return i(Z)||s(Z)||e(Z)||h()}function n(Z){if(Array.isArray(Z))return Z}function l(Z,ne){var se=Z==null?null:typeof Symbol!="undefined"&&Z[Symbol.iterator]||Z["@@iterator"];if(se!=null){var pe,Pe,Qe,et,ot=[],it=!0,tt=!1;try{if(Qe=(se=se.call(Z)).next,ne===0){if(Object(se)!==se)return;it=!1}else for(;!(it=(pe=Qe.call(se)).done)&&(ot.push(pe.value),ot.length!==ne);it=!0);}catch(nt){tt=!0,Pe=nt}finally{try{if(!it&&se.return!=null&&(et=se.return(),Object(et)!==et))return}finally{if(tt)throw Pe}}return ot}}function c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(Z,ne){return n(Z)||l(Z,ne)||e(Z,ne)||c()}function S(Z,ne){if(Z==null)return{};var se={},pe=Object.keys(Z),Pe,Qe;for(Qe=0;Qe<pe.length;Qe++)Pe=pe[Qe],!(ne.indexOf(Pe)>=0)&&(se[Pe]=Z[Pe]);return se}function p(Z,ne){if(Z==null)return{};var se=S(Z,ne),pe,Pe;if(Object.getOwnPropertySymbols){var Qe=Object.getOwnPropertySymbols(Z);for(Pe=0;Pe<Qe.length;Pe++)pe=Qe[Pe],!(ne.indexOf(pe)>=0)&&Object.prototype.propertyIsEnumerable.call(Z,pe)&&(se[pe]=Z[pe])}return se}var m=a(41505),g=a.n(m),x=a(67656),k=a(82234),w=a(87887),E=a(67294);function T(Z){var ne=E.useRef();ne.current=Z;var se=E.useCallback(function(){for(var pe,Pe=arguments.length,Qe=new Array(Pe),et=0;et<Pe;et++)Qe[et]=arguments[et];return(pe=ne.current)===null||pe===void 0?void 0:pe.call.apply(pe,[ne].concat(Qe))},[]);return se}function A(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var B=A()?E.useLayoutEffect:E.useEffect,j=B,ye=function(ne,se){var pe=E.useRef(!0);B(function(){if(!pe.current)return ne()},se),B(function(){return pe.current=!1,function(){pe.current=!0}},[])};function re(Z){var ne=E.useRef(!1),se=E.useState(Z),pe=v(se,2),Pe=pe[0],Qe=pe[1];E.useEffect(function(){return ne.current=!1,function(){ne.current=!0}},[]);function et(ot,it){it&&ne.current||Qe(ot)}return[Pe,et]}function ce(Z){return Z!==void 0}function P(Z,ne){var se=ne||{},pe=se.defaultValue,Pe=se.value,Qe=se.onChange,et=se.postState,ot=re(function(){return ce(Pe)?Pe:ce(pe)?typeof pe=="function"?pe():pe:typeof Z=="function"?Z():Z}),it=v(ot,2),tt=it[0],nt=it[1],ct=Pe!==void 0?Pe:tt,ut=et?et(ct):ct,_t=T(Qe),ht=re([ct]),vt=v(ht,2),ft=vt[0],xt=vt[1];ye(function(){var dt=ft[0];tt!==dt&&_t(tt,dt)},[ft]),ye(function(){ce(Pe)||nt(Pe)},[Pe]);var mt=T(function(dt,Ct){nt(dt,Ct),xt([ct],Ct)});return[ut,mt]}var N=a(68345);function H(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=[];return E.Children.forEach(Z,function(pe){pe==null&&!ne.keepEmpty||(Array.isArray(pe)?se=se.concat(H(pe)):(0,N.isFragment)(pe)&&pe.props?se=se.concat(H(pe.props.children,ne)):se.push(pe))}),se}var Y={};function W(Z,ne){}function ie(Z,ne){}function me(){Y={}}function De(Z,ne,se){!ne&&!Y[se]&&(Z(!1,se),Y[se]=!0)}function ze(Z,ne){De(W,Z,ne)}function je(Z,ne){De(ie,Z,ne)}var _e=null;function ke(Z,ne,se){var pe=React.useRef({});return(!("value"in pe.current)||se(pe.current.condition,ne))&&(pe.current.value=Z(),pe.current.condition=ne),pe.current.value}function Ie(Z,ne){typeof Z=="function"?Z(ne):y(Z)==="object"&&Z&&"current"in Z&&(Z.current=ne)}function Te(){for(var Z=arguments.length,ne=new Array(Z),se=0;se<Z;se++)ne[se]=arguments[se];var pe=ne.filter(function(Pe){return Pe});return pe.length<=1?pe[0]:function(Pe){ne.forEach(function(Qe){Ie(Qe,Pe)})}}function Ne(){for(var Z=arguments.length,ne=new Array(Z),se=0;se<Z;se++)ne[se]=arguments[se];return useMemo(function(){return Te.apply(void 0,ne)},ne,function(pe,Pe){return pe.length===Pe.length&&pe.every(function(Qe,et){return Qe===Pe[et]})})}function $e(Z){var ne,se,pe=(0,N.isMemo)(Z)?Z.type.type:Z.type;return!(typeof pe=="function"&&!((ne=pe.prototype)!==null&&ne!==void 0&&ne.render)||typeof Z=="function"&&!((se=Z.prototype)!==null&&se!==void 0&&se.render))}var He=a(73935);function rt(Z){return Z instanceof HTMLElement||Z instanceof SVGElement}function Me(Z){return rt(Z)?Z:Z instanceof E.Component?He.findDOMNode(Z):null}var Ye=a(91033),Oe=new Map;function Ue(Z){Z.forEach(function(ne){var se,pe=ne.target;(se=Oe.get(pe))===null||se===void 0||se.forEach(function(Pe){return Pe(pe)})})}var We=new Ye.Z(Ue),Q=null,te=null;function ve(Z,ne){Oe.has(Z)||(Oe.set(Z,new Set),We.observe(Z)),Oe.get(Z).add(ne)}function de(Z,ne){Oe.has(Z)&&(Oe.get(Z).delete(ne),Oe.get(Z).size||(We.unobserve(Z),Oe.delete(Z)))}function ae(Z,ne){if(!(Z instanceof ne))throw new TypeError("Cannot call a class as a function")}function oe(Z,ne){for(var se=0;se<ne.length;se++){var pe=ne[se];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(Z,_(pe.key),pe)}}function ue(Z,ne,se){return ne&&oe(Z.prototype,ne),se&&oe(Z,se),Object.defineProperty(Z,"prototype",{writable:!1}),Z}function q(Z,ne){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(pe,Pe){return pe.__proto__=Pe,pe},q(Z,ne)}function F(Z,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(ne&&ne.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),Object.defineProperty(Z,"prototype",{writable:!1}),ne&&q(Z,ne)}function X(Z){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(se){return se.__proto__||Object.getPrototypeOf(se)},X(Z)}function O(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(Z){return!1}}function G(Z){if(Z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z}function ge(Z,ne){if(ne&&(y(ne)==="object"||typeof ne=="function"))return ne;if(ne!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return G(Z)}function xe(Z){var ne=O();return function(){var pe=X(Z),Pe;if(ne){var Qe=X(this).constructor;Pe=Reflect.construct(pe,arguments,Qe)}else Pe=pe.apply(this,arguments);return ge(this,Pe)}}var Ee=function(Z){F(se,Z);var ne=xe(se);function se(){return ae(this,se),ne.apply(this,arguments)}return ue(se,[{key:"render",value:function(){return this.props.children}}]),se}(E.Component),I=E.createContext(null);function le(Z){var ne=Z.children,se=Z.onBatchResize,pe=E.useRef(0),Pe=E.useRef([]),Qe=E.useContext(I),et=E.useCallback(function(ot,it,tt){pe.current+=1;var nt=pe.current;Pe.current.push({size:ot,element:it,data:tt}),Promise.resolve().then(function(){nt===pe.current&&(se==null||se(Pe.current),Pe.current=[])}),Qe==null||Qe(ot,it,tt)},[se,Qe]);return E.createElement(I.Provider,{value:et},ne)}function fe(Z,ne){var se=Z.children,pe=Z.disabled,Pe=E.useRef(null),Qe=E.useRef(null),et=E.useContext(I),ot=typeof se=="function",it=ot?se(Pe):se,tt=E.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),nt=!ot&&E.isValidElement(it)&&$e(it),ct=nt?it.ref:null,ut=E.useMemo(function(){return Te(ct,Pe)},[ct,Pe]),_t=function(){return Me(Pe.current)||Me(Qe.current)};E.useImperativeHandle(ne,function(){return _t()});var ht=E.useRef(Z);ht.current=Z;var vt=E.useCallback(function(ft){var xt=ht.current,mt=xt.onResize,dt=xt.data,Ct=ft.getBoundingClientRect(),gt=Ct.width,bt=Ct.height,wt=ft.offsetWidth,kt=ft.offsetHeight,Ot=Math.floor(gt),Dt=Math.floor(bt);if(tt.current.width!==Ot||tt.current.height!==Dt||tt.current.offsetWidth!==wt||tt.current.offsetHeight!==kt){var Rt={width:Ot,height:Dt,offsetWidth:wt,offsetHeight:kt};tt.current=Rt;var St=wt===Math.round(gt)?gt:wt,Tt=kt===Math.round(bt)?bt:kt,Mt=d(d({},Rt),{},{offsetWidth:St,offsetHeight:Tt});et==null||et(Mt,ft,dt),mt&&Promise.resolve().then(function(){mt(Mt,ft)})}},[]);return E.useEffect(function(){var ft=_t();return ft&&!pe&&ve(ft,vt),function(){return de(ft,vt)}},[Pe.current,pe]),E.createElement(Ee,{ref:Qe},nt?E.cloneElement(it,{ref:ut}):it)}var Se=E.forwardRef(fe),we=Se,K="rc-observer-key";function D(Z,ne){var se=Z.children,pe=typeof se=="function"?[se]:H(se);return pe.map(function(Pe,Qe){var et=(Pe==null?void 0:Pe.key)||"".concat(K,"-").concat(Qe);return E.createElement(we,f({},Z,{key:et,ref:Qe===0?ne:void 0}),Pe)})}var z=E.forwardRef(D);z.Collection=le;var R=z,ee=function(ne){return+setTimeout(ne,16)},he=function(ne){return clearTimeout(ne)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(ee=function(ne){return window.requestAnimationFrame(ne)},he=function(ne){return window.cancelAnimationFrame(ne)});var b=0,V=new Map;function $(Z){V.delete(Z)}var M=function(ne){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;b+=1;var pe=b;function Pe(Qe){if(Qe===0)$(pe),ne();else{var et=ee(function(){Pe(Qe-1)});V.set(pe,et)}}return Pe(se),pe};M.cancel=function(Z){var ne=V.get(Z);return $(ne),he(ne)};var U=M,J=`
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;
`,Ae=["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"],Ce={},be;function Xe(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=Z.getAttribute("id")||Z.getAttribute("data-reactid")||Z.getAttribute("name");if(ne&&Ce[se])return Ce[se];var pe=window.getComputedStyle(Z),Pe=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),Qe=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),et=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),ot=Ae.map(function(tt){return"".concat(tt,":").concat(pe.getPropertyValue(tt))}).join(";"),it={sizingStyle:ot,paddingSize:Qe,borderSize:et,boxSizing:Pe};return ne&&se&&(Ce[se]=it),it}function Ve(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;be||(be=document.createElement("textarea"),be.setAttribute("tab-index","-1"),be.setAttribute("aria-hidden","true"),be.setAttribute("name","hiddenTextarea"),document.body.appendChild(be)),Z.getAttribute("wrap")?be.setAttribute("wrap",Z.getAttribute("wrap")):be.removeAttribute("wrap");var Pe=Xe(Z,ne),Qe=Pe.paddingSize,et=Pe.borderSize,ot=Pe.boxSizing,it=Pe.sizingStyle;be.setAttribute("style","".concat(it,";").concat(J)),be.value=Z.value||Z.placeholder||"";var tt=void 0,nt=void 0,ct,ut=be.scrollHeight;if(ot==="border-box"?ut+=et:ot==="content-box"&&(ut-=Qe),se!==null||pe!==null){be.value=" ";var _t=be.scrollHeight-Qe;se!==null&&(tt=_t*se,ot==="border-box"&&(tt=tt+Qe+et),ut=Math.max(tt,ut)),pe!==null&&(nt=_t*pe,ot==="border-box"&&(nt=nt+Qe+et),ct=ut>nt?"":"hidden",ut=Math.min(nt,ut))}var ht={height:ut,overflowY:ct,resize:"none"};return tt&&(ht.minHeight=tt),nt&&(ht.maxHeight=nt),ht}var Re=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Fe=0,qe=1,Ke=2,Be=E.forwardRef(function(Z,ne){var se=Z,pe=se.prefixCls,Pe=se.defaultValue,Qe=se.value,et=se.autoSize,ot=se.onResize,it=se.className,tt=se.style,nt=se.disabled,ct=se.onChange,ut=se.onInternalAutoSize,_t=p(se,Re),ht=P(Pe,{value:Qe,postState:function(yt){return yt!=null?yt:""}}),vt=v(ht,2),ft=vt[0],xt=vt[1],mt=function(yt){xt(yt.target.value),ct==null||ct(yt)},dt=E.useRef();E.useImperativeHandle(ne,function(){return{textArea:dt.current}});var Ct=E.useMemo(function(){return et&&y(et)==="object"?[et.minRows,et.maxRows]:[]},[et]),gt=v(Ct,2),bt=gt[0],wt=gt[1],kt=!!et,Ot=function(){try{if(document.activeElement===dt.current){var yt=dt.current,Vt=yt.selectionStart,Gt=yt.selectionEnd,jt=yt.scrollTop;dt.current.setSelectionRange(Vt,Gt),dt.current.scrollTop=jt}}catch($t){}},Dt=E.useState(Ke),Rt=v(Dt,2),St=Rt[0],Tt=Rt[1],Mt=E.useState(),Kt=v(Mt,2),Xt=Kt[0],Wt=Kt[1],It=function(){Tt(Fe)};j(function(){kt&&It()},[Qe,bt,wt,kt]),j(function(){if(St===Fe)Tt(qe);else if(St===qe){var At=Ve(dt.current,!1,bt,wt);Tt(Ke),Wt(At)}else Ot()},[St]);var zt=E.useRef(),Bt=function(){U.cancel(zt.current)},Qt=function(yt){St===Ke&&(ot==null||ot(yt),et&&(Bt(),zt.current=U(function(){It()})))};E.useEffect(function(){return Bt},[]);var Ht=kt?Xt:null,Pt=d(d({},tt),Ht);return(St===Fe||St===qe)&&(Pt.overflowY="hidden",Pt.overflowX="hidden"),E.createElement(R,{onResize:Qt,disabled:!(et||ot)},E.createElement("textarea",f({},_t,{ref:dt,style:Pt,className:g()(pe,it,o({},"".concat(pe,"-disabled"),nt)),disabled:nt,value:ft,onChange:mt})))}),Ge=Be,at=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Ze=E.forwardRef(function(Z,ne){var se,pe=Z.defaultValue,Pe=Z.value,Qe=Z.onFocus,et=Z.onBlur,ot=Z.onChange,it=Z.allowClear,tt=Z.maxLength,nt=Z.onCompositionStart,ct=Z.onCompositionEnd,ut=Z.suffix,_t=Z.prefixCls,ht=_t===void 0?"rc-textarea":_t,vt=Z.showCount,ft=Z.count,xt=Z.className,mt=Z.style,dt=Z.disabled,Ct=Z.hidden,gt=Z.classNames,bt=Z.styles,wt=Z.onResize,kt=Z.onClear,Ot=Z.onPressEnter,Dt=Z.readOnly,Rt=Z.autoSize,St=Z.onKeyDown,Tt=p(Z,at),Mt=P(pe,{value:Pe,defaultValue:pe}),Kt=v(Mt,2),Xt=Kt[0],Wt=Kt[1],It=Xt==null?"":String(Xt),zt=E.useState(!1),Bt=v(zt,2),Qt=Bt[0],Ht=Bt[1],Pt=E.useRef(!1),At=E.useState(null),yt=v(At,2),Vt=yt[0],Gt=yt[1],jt=(0,E.useRef)(null),$t=(0,E.useRef)(null),Ft=function(){var lt;return(lt=$t.current)===null||lt===void 0?void 0:lt.textArea},er=function(){Ft().focus()};(0,E.useImperativeHandle)(ne,function(){var pt;return{resizableTextArea:$t.current,focus:er,blur:function(){Ft().blur()},nativeElement:((pt=jt.current)===null||pt===void 0?void 0:pt.nativeElement)||Ft()}}),(0,E.useEffect)(function(){Ht(function(pt){return!dt&&pt})},[dt]);var ir=E.useState(null),tr=v(ir,2),qt=tr[0],nr=tr[1];E.useEffect(function(){if(qt){var pt;(pt=Ft()).setSelectionRange.apply(pt,t(qt))}},[qt]);var Et=(0,k.Z)(ft,vt),Ut=(se=Et.max)!==null&&se!==void 0?se:tt,or=Number(Ut)>0,Yt=Et.strategy(It),sr=!!Ut&&Yt>Ut,rr=function(lt,Lt){var Zt=Lt;!Pt.current&&Et.exceedFormatter&&Et.max&&Et.strategy(Lt)>Et.max&&(Zt=Et.exceedFormatter(Lt,{max:Et.max}),Lt!==Zt&&nr([Ft().selectionStart||0,Ft().selectionEnd||0])),Wt(Zt),(0,w.rJ)(lt.currentTarget,lt,ot,Zt)},ar=function(lt){Pt.current=!0,nt==null||nt(lt)},lr=function(lt){Pt.current=!1,rr(lt,lt.currentTarget.value),ct==null||ct(lt)},cr=function(lt){rr(lt,lt.target.value)},ur=function(lt){lt.key==="Enter"&&Ot&&Ot(lt),St==null||St(lt)},fr=function(lt){Ht(!0),Qe==null||Qe(lt)},hr=function(lt){Ht(!1),et==null||et(lt)},dr=function(lt){Wt(""),er(),(0,w.rJ)(Ft(),lt,ot)},Jt=ut,Nt;Et.show&&(Et.showFormatter?Nt=Et.showFormatter({value:It,count:Yt,maxLength:Ut}):Nt="".concat(Yt).concat(or?" / ".concat(Ut):""),Jt=E.createElement(E.Fragment,null,Jt,E.createElement("span",{className:g()("".concat(ht,"-data-count"),gt==null?void 0:gt.count),style:bt==null?void 0:bt.count},Nt)));var _r=function(lt){var Lt;wt==null||wt(lt),(Lt=Ft())!==null&&Lt!==void 0&&Lt.style.height&&Gt(!0)},pr=!Rt&&!vt&&!it;return E.createElement(x.BaseInput,{ref:jt,value:It,allowClear:it,handleReset:dr,suffix:Jt,prefixCls:ht,classNames:d(d({},gt),{},{affixWrapper:g()(gt==null?void 0:gt.affixWrapper,o(o({},"".concat(ht,"-show-count"),vt),"".concat(ht,"-textarea-allow-clear"),it))}),disabled:dt,focused:Qt,className:g()(xt,sr&&"".concat(ht,"-out-of-range")),style:d(d({},mt),Vt&&!pr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Nt=="string"?Nt:void 0}},hidden:Ct,readOnly:Dt,onClear:kt},E.createElement(Ge,f({},Tt,{autoSize:Rt,maxLength:tt,onKeyDown:ur,onChange:cr,onFocus:fr,onBlur:hr,onCompositionStart:ar,onCompositionEnd:lr,className:g()(gt==null?void 0:gt.textarea),style:d(d({},bt==null?void 0:bt.textarea),{},{resize:mt==null?void 0:mt.resize}),disabled:dt,prefixCls:ht,onResize:_r,ref:$t,readOnly:Dt})))}),st=Ze,Je=st},41505:function(Le,L){var a,f;(function(){"use strict";var y={}.hasOwnProperty,C="[native code]";function _(){for(var o=[],u=0;u<arguments.length;u++){var d=arguments[u];if(d){var r=typeof d;if(r==="string"||r==="number")o.push(d);else if(Array.isArray(d)){if(d.length){var i=_.apply(null,d);i&&o.push(i)}}else if(r==="object"){if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]")){o.push(d.toString());continue}for(var s in d)y.call(d,s)&&d[s]&&o.push(s)}}}return o.join(" ")}Le.exports?(_.default=_,Le.exports=_):(a=[],f=function(){return _}.apply(L,a),f!==void 0&&(Le.exports=f))})()},73982:function(Le,L){"use strict";var a;var f=typeof Symbol=="function"&&Symbol.for,y=f?Symbol.for("react.element"):60103,C=f?Symbol.for("react.portal"):60106,_=f?Symbol.for("react.fragment"):60107,o=f?Symbol.for("react.strict_mode"):60108,u=f?Symbol.for("react.profiler"):60114,d=f?Symbol.for("react.provider"):60109,r=f?Symbol.for("react.context"):60110,i=f?Symbol.for("react.async_mode"):60111,s=f?Symbol.for("react.concurrent_mode"):60111,e=f?Symbol.for("react.forward_ref"):60112,h=f?Symbol.for("react.suspense"):60113,t=f?Symbol.for("react.suspense_list"):60120,n=f?Symbol.for("react.memo"):60115,l=f?Symbol.for("react.lazy"):60116,c=f?Symbol.for("react.block"):60121,v=f?Symbol.for("react.fundamental"):60117,S=f?Symbol.for("react.responder"):60118,p=f?Symbol.for("react.scope"):60119;function m(x){if(typeof x=="object"&&x!==null){var k=x.$$typeof;switch(k){case y:switch(x=x.type,x){case i:case s:case _:case u:case o:case h:return x;default:switch(x=x&&x.$$typeof,x){case r:case e:case l:case n:case d:return x;default:return k}}case C:return k}}}function g(x){return m(x)===s}a=i,a=s,a=r,a=d,a=y,a=e,a=_,a=l,a=n,a=C,a=u,a=o,a=h,a=function(x){return g(x)||m(x)===i},a=g,a=function(x){return m(x)===r},a=function(x){return m(x)===d},a=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===y},a=function(x){return m(x)===e},L.isFragment=function(x){return m(x)===_},a=function(x){return m(x)===l},L.isMemo=function(x){return m(x)===n},a=function(x){return m(x)===C},a=function(x){return m(x)===u},a=function(x){return m(x)===o},a=function(x){return m(x)===h},a=function(x){return typeof x=="string"||typeof x=="function"||x===_||x===s||x===u||x===o||x===h||x===t||typeof x=="object"&&x!==null&&(x.$$typeof===l||x.$$typeof===n||x.$$typeof===d||x.$$typeof===r||x.$$typeof===e||x.$$typeof===v||x.$$typeof===S||x.$$typeof===p||x.$$typeof===c)},a=m},68345:function(Le,L,a){"use strict";Le.exports=a(73982)},19575:function(Le,L,a){var f,y;(function(C,_){Le.exports=_(C)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof a.g!="undefined"?a.g:this,function(C){"use strict";C=C||{};var _=C.Base64,o="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(re){for(var ce={},P=0,N=re.length;P<N;P++)ce[re.charAt(P)]=P;return ce}(u),r=String.fromCharCode,i=function(re){if(re.length<2){var ce=re.charCodeAt(0);return ce<128?re:ce<2048?r(192|ce>>>6)+r(128|ce&63):r(224|ce>>>12&15)+r(128|ce>>>6&63)+r(128|ce&63)}else{var ce=65536+(re.charCodeAt(0)-55296)*1024+(re.charCodeAt(1)-56320);return r(240|ce>>>18&7)+r(128|ce>>>12&63)+r(128|ce>>>6&63)+r(128|ce&63)}},s=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,e=function(re){return re.replace(s,i)},h=function(re){var ce=[0,2,1][re.length%3],P=re.charCodeAt(0)<<16|(re.length>1?re.charCodeAt(1):0)<<8|(re.length>2?re.charCodeAt(2):0),N=[u.charAt(P>>>18),u.charAt(P>>>12&63),ce>=2?"=":u.charAt(P>>>6&63),ce>=1?"=":u.charAt(P&63)];return N.join("")},t=C.btoa&&typeof C.btoa=="function"?function(re){return C.btoa(re)}:function(re){if(re.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return re.replace(/[\s\S]{1,3}/g,h)},n=function(re){return t(e(String(re)))},l=function(re){return re.replace(/[+\/]/g,function(ce){return ce=="+"?"-":"_"}).replace(/=/g,"")},c=function(re,ce){return ce?l(n(re)):n(re)},v=function(re){return c(re,!0)},S;C.Uint8Array&&(S=function(re,ce){for(var P="",N=0,H=re.length;N<H;N+=3){var Y=re[N],W=re[N+1],ie=re[N+2],me=Y<<16|W<<8|ie;P+=u.charAt(me>>>18)+u.charAt(me>>>12&63)+(typeof W!="undefined"?u.charAt(me>>>6&63):"=")+(typeof ie!="undefined"?u.charAt(me&63):"=")}return ce?l(P):P});var p=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,m=function(re){switch(re.length){case 4:var ce=(7&re.charCodeAt(0))<<18|(63&re.charCodeAt(1))<<12|(63&re.charCodeAt(2))<<6|63&re.charCodeAt(3),P=ce-65536;return r((P>>>10)+55296)+r((P&1023)+56320);case 3:return r((15&re.charCodeAt(0))<<12|(63&re.charCodeAt(1))<<6|63&re.charCodeAt(2));default:return r((31&re.charCodeAt(0))<<6|63&re.charCodeAt(1))}},g=function(re){return re.replace(p,m)},x=function(re){var ce=re.length,P=ce%4,N=(ce>0?d[re.charAt(0)]<<18:0)|(ce>1?d[re.charAt(1)]<<12:0)|(ce>2?d[re.charAt(2)]<<6:0)|(ce>3?d[re.charAt(3)]:0),H=[r(N>>>16),r(N>>>8&255),r(N&255)];return H.length-=[0,0,2,1][P],H.join("")},k=C.atob&&typeof C.atob=="function"?function(re){return C.atob(re)}:function(re){return re.replace(/\S{1,4}/g,x)},w=function(re){return k(String(re).replace(/[^A-Za-z0-9\+\/]/g,""))},E=function(re){return g(k(re))},T=function(re){return String(re).replace(/[-_]/g,function(ce){return ce=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},A=function(re){return E(T(re))},B;C.Uint8Array&&(B=function(re){return Uint8Array.from(w(T(re)),function(ce){return ce.charCodeAt(0)})});var j=function(){var re=C.Base64;return C.Base64=_,re};if(C.Base64={VERSION:o,atob:w,btoa:t,fromBase64:A,toBase64:c,utob:e,encode:c,encodeURI:v,btou:g,decode:A,noConflict:j,fromUint8Array:S,toUint8Array:B},typeof Object.defineProperty=="function"){var ye=function(re){return{value:re,enumerable:!1,writable:!0,configurable:!0}};C.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",ye(function(){return A(this)})),Object.defineProperty(String.prototype,"toBase64",ye(function(re){return c(this,re)})),Object.defineProperty(String.prototype,"toBase64URI",ye(function(){return c(this,!0)}))}}return C.Meteor&&(Base64=C.Base64),Le.exports?Le.exports.Base64=C.Base64:(f=[],y=function(){return C.Base64}.apply(L,f),y!==void 0&&(Le.exports=y)),{Base64:C.Base64}})},10729:function(Le,L,a){"use strict";function f(u){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(r){return typeof r}:f=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},f(u)}Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var y=_(a(37095));function C(){if(typeof WeakMap!="function")return null;var u=new WeakMap;return C=function(){return u},u}function _(u){if(u&&u.__esModule)return u;if(u===null||f(u)!=="object"&&typeof u!="function")return{default:u};var d=C();if(d&&d.has(u))return d.get(u);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in u)if(Object.prototype.hasOwnProperty.call(u,s)){var e=i?Object.getOwnPropertyDescriptor(u,s):null;e&&(e.get||e.set)?Object.defineProperty(r,s,e):r[s]=u[s]}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,s=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 h=i-s;return s===2?(r+=this.toBase64Table[d[h]>>2],r+=this.toBase64Table[((d[h]&3)<<4)+(d[h+1]>>4)],r+=this.toBase64Table[(d[h+1]&15)<<2],r+=this.toBase64Table[64]):s===1&&(r+=this.toBase64Table[d[h]>>2],r+=this.toBase64Table[(d[h]&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 s=(i>>2)*3+Math.floor(i%4/1.5),e=new Array(s),h=0,t=0,n=0,l=r;l<d.length;l++){var c=this.toBinaryTable[d.charCodeAt(l)&127],v=d.charAt(l)===this.base64Pad;if(c===-1){y.Error("Illegal character code "+d.charCodeAt(l)+" at position "+l);continue}t=t<<6|c,h+=6,h>=8&&(h-=8,v||(e[n++]=t>>h&255),t&=(1<<h)-1)}if(h){var S=new Error("Corrupted base64 string");throw S.name="Base64-Error",S}return e}};L.default=o},62175:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function a(_,o){if(!(_ instanceof o))throw new TypeError("Cannot call a class as a function")}function f(_,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(_,d.key,d)}}function y(_,o,u){return o&&f(_.prototype,o),u&&f(_,u),_}var C=function(){function _(){a(this,_)}return y(_,[{key:"decodeRect",value:function(u,d,r,i,s,e,h){if(s.rQwait("COPYRECT",4))return!1;var t=s.rQshift16(),n=s.rQshift16();return e.copyImage(t,n,u,d,r,i),!0}}]),_}();L.default=C},55901:function(Le,L,a){"use strict";function f(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(e){return typeof e}:f=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(i)}Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var y=_(a(37095));function C(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return C=function(){return i},i}function _(i){if(i&&i.__esModule)return i;if(i===null||f(i)!=="object"&&typeof i!="function")return{default:i};var s=C();if(s&&s.has(i))return s.get(i);var e={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var t in i)if(Object.prototype.hasOwnProperty.call(i,t)){var n=h?Object.getOwnPropertyDescriptor(i,t):null;n&&(n.get||n.set)?Object.defineProperty(e,t,n):e[t]=i[t]}return e.default=i,s&&s.set(i,e),e}function o(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")}function u(i,s){for(var e=0;e<s.length;e++){var h=s[e];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(i,h.key,h)}}function d(i,s,e){return s&&u(i.prototype,s),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,h,t,n,l,c,v){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 S=1;if(l.rQwait("HEXTILE",S))return!1;var p=l.rQ,m=l.rQi,g=p[m];if(g>30)throw new Error("Illegal hextile subencoding (subencoding: "+g+")");var x=this._totalTiles-this._tiles,k=x%this._tilesX,w=Math.floor(x/this._tilesX),E=e+k*16,T=h+w*16,A=Math.min(16,e+t-E),B=Math.min(16,h+n-T);if(g&1)S+=A*B*4;else if(g&2&&(S+=4),g&4&&(S+=4),g&8){if(S++,l.rQwait("HEXTILE",S))return!1;var j=p[m+S-1];g&16?S+=j*6:S+=j*2}if(l.rQwait("HEXTILE",S))return!1;if(m++,g===0)this._lastsubencoding&1?y.Debug(" Ignoring blank after RAW"):c.fillRect(E,T,A,B,this._background);else if(g&1)c.blitImage(E,T,A,B,p,m),m+=S-1;else{if(g&2&&(this._background=[p[m],p[m+1],p[m+2],p[m+3]],m+=4),g&4&&(this._foreground=[p[m],p[m+1],p[m+2],p[m+3]],m+=4),c.startTile(E,T,A,B,this._background),g&8){var ye=p[m];m++;for(var re=0;re<ye;re++){var ce=void 0;g&16?(ce=[p[m],p[m+1],p[m+2],p[m+3]],m+=4):ce=this._foreground;var P=p[m];m++;var N=P>>4,H=P&15,Y=p[m];m++;var W=(Y>>4)+1,ie=(Y&15)+1;c.subTile(N,H,W,ie,ce)}}c.finishTile()}l.rQi=m,this._lastsubencoding=g,this._tiles--}return!0}}]),i}();L.default=r},12133:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function a(_,o){if(!(_ instanceof o))throw new TypeError("Cannot call a class as a function")}function f(_,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(_,d.key,d)}}function y(_,o,u){return o&&f(_.prototype,o),u&&f(_,u),_}var C=function(){function _(){a(this,_),this._lines=0}return y(_,[{key:"decodeRect",value:function(u,d,r,i,s,e,h){this._lines===0&&(this._lines=i);var t=h==8?1:4,n=r*t;if(s.rQwait("RAW",n))return!1;var l=d+(i-this._lines),c=Math.min(this._lines,Math.floor(s.rQlen/n)),v=s.rQ,S=s.rQi;if(h==8){for(var p=r*c,m=new Uint8Array(p*4),g=0;g<p;g++)m[g*4+0]=(v[S+g]>>0&3)*255/3,m[g*4+1]=(v[S+g]>>2&3)*255/3,m[g*4+2]=(v[S+g]>>4&3)*255/3,m[g*4+4]=0;v=m,S=0}return e.blitImage(u,l,r,c,v,S),s.rQskipBytes(c*n),this._lines-=c,!(this._lines>0)}}]),_}();L.default=C},18966:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function a(_,o){if(!(_ instanceof o))throw new TypeError("Cannot call a class as a function")}function f(_,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(_,d.key,d)}}function y(_,o,u){return o&&f(_.prototype,o),u&&f(_,u),_}var C=function(){function _(){a(this,_),this._subrects=0}return y(_,[{key:"decodeRect",value:function(u,d,r,i,s,e,h){if(this._subrects===0){if(s.rQwait("RRE",8))return!1;this._subrects=s.rQshift32();var t=s.rQshiftBytes(4);e.fillRect(u,d,r,i,t)}for(;this._subrects>0;){if(s.rQwait("RRE",12))return!1;var n=s.rQshiftBytes(4),l=s.rQshift16(),c=s.rQshift16(),v=s.rQshift16(),S=s.rQshift16();e.fillRect(u+l,d+c,v,S,n),this._subrects--}return!0}}]),_}();L.default=C},37856:function(Le,L,a){"use strict";function f(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(t){return typeof t}:f=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(e)}Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var y=u(a(37095)),C=_(a(77367));function _(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||f(e)!=="object"&&typeof e!="function")return{default:e};var h=o();if(h&&h.has(e))return h.get(e);var t={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var c=n?Object.getOwnPropertyDescriptor(e,l):null;c&&(c.get||c.set)?Object.defineProperty(t,l,c):t[l]=e[l]}return t.default=e,h&&h.set(e,t),t}function d(e,h){if(!(e instanceof h))throw new TypeError("Cannot call a class as a function")}function r(e,h){for(var t=0;t<h.length;t++){var n=h[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,h,t){return h&&r(e.prototype,h),t&&r(e,t),e}var s=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 h=0;h<4;h++)this._zlibs[h]=new C.default}return i(e,[{key:"decodeRect",value:function(t,n,l,c,v,S,p){if(this._ctl===null){if(v.rQwait("TIGHT compression-control",1))return!1;this._ctl=v.rQshift8();for(var m=0;m<4;m++)this._ctl>>m&1&&(this._zlibs[m].reset(),y.Info("Reset zlib stream "+m));this._ctl=this._ctl>>4}var g;if(this._ctl===8)g=this._fillRect(t,n,l,c,v,S,p);else if(this._ctl===9)g=this._jpegRect(t,n,l,c,v,S,p);else if(this._ctl===10)g=this._pngRect(t,n,l,c,v,S,p);else if(!(this._ctl&128))g=this._basicRect(this._ctl,t,n,l,c,v,S,p);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return g&&(this._ctl=null),g}},{key:"_fillRect",value:function(t,n,l,c,v,S,p){if(v.rQwait("TIGHT",3))return!1;var m=v.rQi,g=v.rQ;return S.fillRect(t,n,l,c,[g[m+2],g[m+1],g[m]],!1),v.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(t,n,l,c,v,S,p){var m=this._readData(v);return m===null?!1:(S.imageRect(t,n,l,c,"image/jpeg",m),!0)}},{key:"_pngRect",value:function(t,n,l,c,v,S,p){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(t,n,l,c,v,S,p,m){if(this._filter===null)if(t&4){if(S.rQwait("TIGHT",1))return!1;this._filter=S.rQshift8()}else this._filter=0;var g=t&3,x;switch(this._filter){case 0:x=this._copyFilter(g,n,l,c,v,S,p,m);break;case 1:x=this._paletteFilter(g,n,l,c,v,S,p,m);break;case 2:x=this._gradientFilter(g,n,l,c,v,S,p,m);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return x&&(this._filter=null),x}},{key:"_copyFilter",value:function(t,n,l,c,v,S,p,m){var g=c*v*3,x;if(g<12){if(S.rQwait("TIGHT",g))return!1;x=S.rQshiftBytes(g)}else{if(x=this._readData(S),x===null)return!1;this._zlibs[t].setInput(x),x=this._zlibs[t].inflate(g),this._zlibs[t].setInput(null)}return p.blitRgbImage(n,l,c,v,x,0,!1),!0}},{key:"_paletteFilter",value:function(t,n,l,c,v,S,p,m){if(this._numColors===0){if(S.rQwait("TIGHT palette",1))return!1;var g=S.rQpeek8()+1,x=g*3;if(S.rQwait("TIGHT palette",1+x))return!1;this._numColors=g,S.rQskipBytes(1),S.rQshiftTo(this._palette,x)}var k=this._numColors<=2?1:8,w=Math.floor((c*k+7)/8),E=w*v,T;if(E<12){if(S.rQwait("TIGHT",E))return!1;T=S.rQshiftBytes(E)}else{if(T=this._readData(S),T===null)return!1;this._zlibs[t].setInput(T),T=this._zlibs[t].inflate(E),this._zlibs[t].setInput(null)}return this._numColors==2?this._monoRect(n,l,c,v,T,this._palette,p):this._paletteRect(n,l,c,v,T,this._palette,p),this._numColors=0,!0}},{key:"_monoRect",value:function(t,n,l,c,v,S,p){for(var m=this._getScratchBuffer(l*c*4),g=Math.floor((l+7)/8),x=Math.floor(l/8),k=0;k<c;k++){var w=void 0,E=void 0,T=void 0;for(T=0;T<x;T++)for(var A=7;A>=0;A--)w=(k*l+T*8+7-A)*4,E=(v[k*g+T]>>A&1)*3,m[w]=S[E],m[w+1]=S[E+1],m[w+2]=S[E+2],m[w+3]=255;for(var B=7;B>=8-l%8;B--)w=(k*l+T*8+7-B)*4,E=(v[k*g+T]>>B&1)*3,m[w]=S[E],m[w+1]=S[E+1],m[w+2]=S[E+2],m[w+3]=255}p.blitRgbxImage(t,n,l,c,m,0,!1)}},{key:"_paletteRect",value:function(t,n,l,c,v,S,p){for(var m=this._getScratchBuffer(l*c*4),g=l*c*4,x=0,k=0;x<g;x+=4,k++){var w=v[k]*3;m[x]=S[w],m[x+1]=S[w+1],m[x+2]=S[w+2],m[x+3]=255}p.blitRgbxImage(t,n,l,c,m,0,!1)}},{key:"_gradientFilter",value:function(t,n,l,c,v,S,p,m){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 l=t.rQshiftBytes(this._len);return this._len=0,l}},{key:"_getScratchBuffer",value:function(t){return(!this._scratchBuffer||this._scratchBuffer.length<t)&&(this._scratchBuffer=new Uint8Array(t)),this._scratchBuffer}}]),e}();L.default=s},19442:function(Le,L,a){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var f=y(a(37856));function y(l){return l&&l.__esModule?l:{default:l}}function C(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C=function(v){return typeof v}:C=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},C(l)}function _(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}function o(l,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(l,S.key,S)}}function u(l,c,v){return c&&o(l.prototype,c),v&&o(l,v),l}function d(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),c&&r(l,c)}function r(l,c){return r=Object.setPrototypeOf||function(S,p){return S.__proto__=p,S},r(l,c)}function i(l){var c=h();return function(){var S=t(l),p;if(c){var m=t(this).constructor;p=Reflect.construct(S,arguments,m)}else p=S.apply(this,arguments);return s(this,p)}}function s(l,c){return c&&(C(c)==="object"||typeof c=="function")?c:e(l)}function e(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function h(){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(l){return!1}}function t(l){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},t(l)}var n=function(l){d(v,l);var c=i(v);function v(){return _(this,v),c.apply(this,arguments)}return u(v,[{key:"_pngRect",value:function(p,m,g,x,k,w,E){var T=this._readData(k);return T===null?!1:(w.imageRect(p,m,g,x,"image/png",T),!0)}},{key:"_basicRect",value:function(p,m,g,x,k,w,E,T){throw new Error("BasicCompression received in TightPNG rect")}}]),v}(f.default);L.default=n},77160:function(Le,L,a){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var f=a(8293),y=C(a(696));function C(r){return r&&r.__esModule?r:{default:r}}function _(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var s=0;s<i.length;s++){var e=i[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function u(r,i,s){return i&&o(r.prototype,i),s&&o(r,s),r}var d=function(){function r(){_(this,r),this.strm=new y.default,this.chunkSize=1024*10*10,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,(0,f.deflateInit)(this.strm,this.windowBits)}return u(r,[{key:"deflate",value:function(s){this.strm.input=s,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,f.deflate)(this.strm,f.Z_FULL_FLUSH),h=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=[h],n=h.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,e=(0,f.deflate)(this.strm,f.Z_FULL_FLUSH),e<0)throw new Error("zlib deflate failed");var l=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);n+=l.length,t.push(l)}while(this.strm.avail_in>0);for(var c=new Uint8Array(n),v=0,S=0;S<t.length;S++)c.set(t[S],v),v+=t[S].length;h=c}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,h}}]),r}();L.default=d},44693:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function a(g,x){if(!(g instanceof x))throw new TypeError("Cannot call a class as a function")}function f(g,x){for(var k=0;k<x.length;k++){var w=x[k];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}function y(g,x,k){return x&&f(g.prototype,x),k&&f(g,k),g}var C=[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],_=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=0,u,d,r,i,s,e;u=65536,d=1<<24,r=u|d,i=4,s=1024,e=i|s;var h=[r|s,o|o,u|o,r|e,r|i,u|e,o|i,u|o,o|s,r|s,r|e,o|s,d|e,r|i,d|o,o|i,o|e,d|s,d|s,u|s,u|s,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|s,d|o,d|o,o|s,r|i,u|o,u|s,d|i,o|s,o|i,d|e,u|e,r|e,u|i,r|o,d|e,d|i,o|e,u|e,r|s,o|e,d|s,d|s,o|o,u|i,u|s,o|o,r|i];u=1<<20,d=1<<31,r=u|d,i=32,s=32768,e=i|s;var t=[r|e,d|s,o|s,u|e,u|o,o|i,r|i,d|e,d|i,r|e,r|s,d|o,d|s,u|o,o|i,r|i,u|s,u|i,d|e,o|o,d|o,o|s,u|e,r|o,u|i,d|i,o|o,u|s,o|e,r|s,r|o,o|e,o|o,u|e,r|i,u|o,d|e,r|o,r|s,o|s,r|o,d|s,o|i,r|e,u|e,o|i,o|s,d|o,o|e,r|s,u|o,d|i,u|i,d|e,d|i,u|i,u|s,o|o,d|s,o|e,d|o,r|i,r|e,u|s];u=1<<17,d=1<<27,r=u|d,i=8,s=512,e=i|s;var n=[o|e,r|s,o|o,r|i,d|s,o|o,u|e,d|s,u|i,d|i,d|i,u|o,r|e,u|i,r|o,o|e,d|o,o|i,r|s,o|s,u|s,r|o,r|i,u|e,d|e,u|s,u|o,d|e,o|i,r|e,o|s,d|o,r|s,d|o,u|i,o|e,u|o,r|s,d|s,o|o,o|s,u|i,r|e,d|s,d|i,o|s,o|o,r|i,d|e,u|o,d|o,r|e,o|i,u|e,u|s,d|i,r|o,d|e,o|e,r|o,u|e,o|i,r|i,u|s];u=8192,d=1<<23,r=u|d,i=1,s=128,e=i|s;var l=[r|i,u|e,u|e,o|s,r|s,d|e,d|i,u|i,o|o,r|o,r|o,r|e,o|e,o|o,d|s,d|i,o|i,u|o,d|o,r|i,o|s,d|o,u|i,u|s,d|e,o|i,u|s,d|s,u|o,r|s,r|e,o|e,d|s,d|i,r|o,r|e,o|e,o|o,o|o,r|o,u|s,d|s,d|e,o|i,r|i,u|e,u|e,o|s,r|e,o|e,o|i,u|o,d|i,u|i,r|s,d|e,u|i,u|s,d|o,r|i,o|s,d|o,u|o,r|s];u=1<<25,d=1<<30,r=u|d,i=256,s=1<<19,e=i|s;var c=[o|i,u|e,u|s,r|i,o|s,o|i,d|o,u|s,d|e,o|s,u|i,d|e,r|i,r|s,o|e,d|o,u|o,d|s,d|s,o|o,d|i,r|e,r|e,u|i,r|s,d|i,o|o,r|o,u|e,u|o,r|o,o|e,o|s,r|i,o|i,u|o,d|o,u|s,r|i,d|e,u|i,d|o,r|s,u|e,d|e,o|i,u|o,r|s,r|e,o|e,r|o,r|e,u|s,o|o,d|s,r|o,o|e,u|i,d|i,o|s,o|o,d|s,u|e,d|i];u=1<<22,d=1<<29,r=u|d,i=16,s=16384,e=i|s;var v=[d|i,r|o,o|s,r|e,r|o,o|i,r|e,u|o,d|s,u|e,u|o,d|i,u|i,d|s,d|o,o|e,o|o,u|i,d|e,o|s,u|s,d|e,o|i,r|i,r|i,o|o,u|e,r|s,o|e,u|s,r|s,d|o,d|s,o|i,r|i,u|s,r|e,u|o,o|e,d|i,u|o,d|s,d|o,o|e,d|i,r|e,u|s,r|o,u|e,r|s,o|o,r|i,o|i,o|s,r|o,u|e,o|s,u|i,d|e,o|o,r|s,d|o,u|i,d|e];u=1<<21,d=1<<26,r=u|d,i=2,s=2048,e=i|s;var S=[u|o,r|i,d|e,o|o,o|s,d|e,u|e,r|s,r|e,u|o,o|o,d|i,o|i,d|o,r|i,o|e,d|s,u|e,u|i,d|s,d|i,r|o,r|s,u|i,r|o,o|s,o|e,r|e,u|s,o|i,d|o,u|s,d|o,u|s,u|o,d|e,d|e,r|i,r|i,o|i,u|i,d|o,d|s,u|o,r|s,o|e,u|e,r|s,o|e,d|i,r|e,r|o,u|s,o|o,o|i,r|e,o|o,u|e,r|o,o|s,d|i,d|s,o|s,u|i];u=1<<18,d=1<<28,r=u|d,i=64,s=4096,e=i|s;var p=[d|e,o|s,u|o,r|e,d|o,d|e,o|i,d|o,u|i,r|o,r|e,u|s,r|s,u|e,o|s,o|i,r|o,d|i,d|s,o|e,u|s,u|i,r|i,r|s,o|e,o|o,o|o,r|i,d|i,d|s,u|e,u|o,u|e,u|o,r|s,o|s,o|i,r|i,o|s,u|e,d|s,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|s,d|e,o|o,r|e,u|s,u|s,o|e,o|e,u|i,d|o,r|s],m=function(){function g(x){a(this,g),this.keys=[];for(var k=[],w=[],E=[],T=0,A=56;T<56;++T,A-=8){A+=A<-5?65:A<-3?31:A<-1?63:A===27?35:0;var B=A&7;k[T]=x[A>>>3]&1<<B?1:0}for(var j=0;j<16;++j){var ye=j<<1,re=ye+1;E[ye]=E[re]=0;for(var ce=28;ce<59;ce+=28)for(var P=ce-28;P<ce;++P){var N=P+_[j];w[P]=N<ce?k[N]:k[N-28]}for(var H=0;H<24;++H)w[C[H]]!==0&&(E[ye]|=1<<23-H),w[C[H+24]]!==0&&(E[re]|=1<<23-H)}for(var Y=0,W=0,ie=0;Y<16;++Y){var me=E[W++],De=E[W++];this.keys[ie]=(me&16515072)<<6,this.keys[ie]|=(me&4032)<<10,this.keys[ie]|=(De&16515072)>>>10,this.keys[ie]|=(De&4032)>>>6,++ie,this.keys[ie]=(me&258048)<<12,this.keys[ie]|=(me&63)<<16,this.keys[ie]|=(De&258048)>>>4,this.keys[ie]|=De&63,++ie}}return y(g,[{key:"enc8",value:function(k){var w=k.slice(),E=0,T,A,B;T=w[E++]<<24|w[E++]<<16|w[E++]<<8|w[E++],A=w[E++]<<24|w[E++]<<16|w[E++]<<8|w[E++],B=(T>>>4^A)&252645135,A^=B,T^=B<<4,B=(T>>>16^A)&65535,A^=B,T^=B<<16,B=(A>>>2^T)&858993459,T^=B,A^=B<<2,B=(A>>>8^T)&16711935,T^=B,A^=B<<8,A=A<<1|A>>>31&1,B=(T^A)&2863311530,T^=B,A^=B,T=T<<1|T>>>31&1;for(var j=0,ye=0;j<8;++j){B=A<<28|A>>>4,B^=this.keys[ye++];var re=S[B&63];re|=c[B>>>8&63],re|=n[B>>>16&63],re|=h[B>>>24&63],B=A^this.keys[ye++],re|=p[B&63],re|=v[B>>>8&63],re|=l[B>>>16&63],re|=t[B>>>24&63],T^=re,B=T<<28|T>>>4,B^=this.keys[ye++],re=S[B&63],re|=c[B>>>8&63],re|=n[B>>>16&63],re|=h[B>>>24&63],B=T^this.keys[ye++],re|=p[B&63],re|=v[B>>>8&63],re|=l[B>>>16&63],re|=t[B>>>24&63],A^=re}for(A=A<<31|A>>>1,B=(T^A)&2863311530,T^=B,A^=B,T=T<<31|T>>>1,B=(T>>>8^A)&16711935,A^=B,T^=B<<8,B=(T>>>2^A)&858993459,A^=B,T^=B<<2,B=(A>>>16^T)&65535,T^=B,A^=B<<16,B=(A>>>4^T)&252645135,T^=B,A^=B<<4,B=[A,T],E=0;E<8;E++)w[E]=(B[E>>>2]>>>8*(3-E%4))%256,w[E]<0&&(w[E]+=256);return w}},{key:"encrypt",value:function(k){return this.enc8(k.slice(0,8)).concat(this.enc8(k.slice(8,16)))}}]),g}();L.default=m},61307:function(Le,L,a){"use strict";function f(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(l){return typeof l}:f=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},f(t)}Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var y=r(a(37095)),C=u(a(10729)),_=a(58863),o=a(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||f(t)!=="object"&&typeof t!="function")return{default:t};var n=d();if(n&&n.has(t))return n.get(t);var l={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in t)if(Object.prototype.hasOwnProperty.call(t,v)){var S=c?Object.getOwnPropertyDescriptor(t,v):null;S&&(S.get||S.set)?Object.defineProperty(l,v,S):l[v]=t[v]}return l.default=t,n&&n.set(t,l),l}function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function s(t,n){for(var l=0;l<n.length;l++){var c=n[l];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,c.key,c)}}function e(t,n,l){return n&&s(t.prototype,n),l&&s(t,l),t}var h=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,y.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},y.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),y.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return e(t,[{key:"viewportChangePos",value:function(l,c){var v=this._viewportLoc;l=Math.floor(l),c=Math.floor(c),this._clipViewport||(l=-v.w,c=-v.h);var S=v.x+v.w-1,p=v.y+v.h-1;l<0&&v.x+l<0&&(l=-v.x),S+l>=this._fbWidth&&(l-=S+l-this._fbWidth+1),v.y+c<0&&(c=-v.y),p+c>=this._fbHeight&&(c-=p+c-this._fbHeight+1),!(l===0&&c===0)&&(y.Debug("viewportChange deltaX: "+l+", deltaY: "+c),v.x+=l,v.y+=c,this._damage(v.x,v.y,v.w,v.h),this.flip())}},{key:"viewportChangeSize",value:function(l,c){(!this._clipViewport||typeof l=="undefined"||typeof c=="undefined")&&(y.Debug("Setting viewport to full display region"),l=this._fbWidth,c=this._fbHeight),l=Math.floor(l),c=Math.floor(c),l>this._fbWidth&&(l=this._fbWidth),c>this._fbHeight&&(c=this._fbHeight);var v=this._viewportLoc;if(v.w!==l||v.h!==c){v.w=l,v.h=c;var S=this._target;S.width=l,S.height=c,this.viewportChangePos(0,0),this._damage(v.x,v.y,v.w,v.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(l){return this._scale===0?0:(0,o.toSigned32bit)(l/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(l){return this._scale===0?0:(0,o.toSigned32bit)(l/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(l,c){this._prevDrawStyle="",this._fbWidth=l,this._fbHeight=c;var v=this._backbuffer;if(v.width!==l||v.height!==c){var S=null;v.width>0&&v.height>0&&(S=this._drawCtx.getImageData(0,0,v.width,v.height)),v.width!==l&&(v.width=l),v.height!==c&&(v.height=c),S&&this._drawCtx.putImageData(S,0,0)}var p=this._viewportLoc;this.viewportChangeSize(p.w,p.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(l,c,v,S){l<this._damageBounds.left&&(this._damageBounds.left=l),c<this._damageBounds.top&&(this._damageBounds.top=c),l+v>this._damageBounds.right&&(this._damageBounds.right=l+v),c+S>this._damageBounds.bottom&&(this._damageBounds.bottom=c+S)}},{key:"flip",value:function(l){if(this._renderQ.length!==0&&!l)this._renderQPush({type:"flip"});else{var c=this._damageBounds.left,v=this._damageBounds.top,S=this._damageBounds.right-c,p=this._damageBounds.bottom-v,m=c-this._viewportLoc.x,g=v-this._viewportLoc.y;m<0&&(S+=m,c-=m,m=0),g<0&&(p+=g,v-=g,g=0),m+S>this._viewportLoc.w&&(S=this._viewportLoc.w-m),g+p>this._viewportLoc.h&&(p=this._viewportLoc.h-g),S>0&&p>0&&this._targetCtx.drawImage(this._backbuffer,c,v,S,p,m,g,S,p),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(l,c,v,S,p,m){this._renderQ.length!==0&&!m?this._renderQPush({type:"fill",x:l,y:c,width:v,height:S,color:p}):(this._setFillColor(p),this._drawCtx.fillRect(l,c,v,S),this._damage(l,c,v,S))}},{key:"copyImage",value:function(l,c,v,S,p,m,g){this._renderQ.length!==0&&!g?this._renderQPush({type:"copy",oldX:l,oldY:c,x:v,y:S,width:p,height:m}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,l,c,p,m,v,S,p,m),this._damage(v,S,p,m))}},{key:"imageRect",value:function(l,c,v,S,p,m){if(!(v===0||S===0)){var g=new Image;g.src="data: "+p+";base64,"+C.default.encode(m),this._renderQPush({type:"img",img:g,x:l,y:c,width:v,height:S})}}},{key:"startTile",value:function(l,c,v,S,p){this._tileX=l,this._tileY=c,v===16&&S===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(v,S);for(var m=p[2],g=p[1],x=p[0],k=this._tile.data,w=0;w<v*S*4;w+=4)k[w]=m,k[w+1]=g,k[w+2]=x,k[w+3]=255}},{key:"subTile",value:function(l,c,v,S,p){for(var m=p[2],g=p[1],x=p[0],k=l+v,w=c+S,E=this._tile.data,T=this._tile.width,A=c;A<w;A++)for(var B=l;B<k;B++){var j=(B+A*T)*4;E[j]=m,E[j+1]=g,E[j+2]=x,E[j+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(l,c,v,S,p,m,g){if(this._renderQ.length!==0&&!g){var x=new Uint8Array(v*S*4);x.set(new Uint8Array(p.buffer,0,x.length)),this._renderQPush({type:"blit",data:x,x:l,y:c,width:v,height:S})}else this._bgrxImageData(l,c,v,S,p,m)}},{key:"blitRgbImage",value:function(l,c,v,S,p,m,g){if(this._renderQ.length!==0&&!g){var x=new Uint8Array(v*S*3);x.set(new Uint8Array(p.buffer,0,x.length)),this._renderQPush({type:"blitRgb",data:x,x:l,y:c,width:v,height:S})}else this._rgbImageData(l,c,v,S,p,m)}},{key:"blitRgbxImage",value:function(l,c,v,S,p,m,g){if(this._renderQ.length!==0&&!g){var x=new Uint8Array(v*S*4);x.set(new Uint8Array(p.buffer,0,x.length)),this._renderQPush({type:"blitRgbx",data:x,x:l,y:c,width:v,height:S})}else this._rgbxImageData(l,c,v,S,p,m)}},{key:"drawImage",value:function(l,c,v){this._drawCtx.drawImage(l,c,v),this._damage(c,v,l.width,l.height)}},{key:"autoscale",value:function(l,c){var v;if(l===0||c===0)v=0;else{var S=this._viewportLoc,p=l/c,m=S.w/S.h;m>=p?v=l/S.w:v=c/S.h}this._rescale(v)}},{key:"_rescale",value:function(l){this._scale=l;var c=this._viewportLoc,v=l*c.w+"px",S=l*c.h+"px";(this._target.style.width!==v||this._target.style.height!==S)&&(this._target.style.width=v,this._target.style.height=S)}},{key:"_setFillColor",value:function(l){var c="rgb("+l[2]+","+l[1]+","+l[0]+")";c!==this._prevDrawStyle&&(this._drawCtx.fillStyle=c,this._prevDrawStyle=c)}},{key:"_rgbImageData",value:function(l,c,v,S,p,m){for(var g=this._drawCtx.createImageData(v,S),x=g.data,k=0,w=m;k<v*S*4;k+=4,w+=3)x[k]=p[w],x[k+1]=p[w+1],x[k+2]=p[w+2],x[k+3]=255;this._drawCtx.putImageData(g,l,c),this._damage(l,c,g.width,g.height)}},{key:"_bgrxImageData",value:function(l,c,v,S,p,m){for(var g=this._drawCtx.createImageData(v,S),x=g.data,k=0,w=m;k<v*S*4;k+=4,w+=4)x[k]=p[w+2],x[k+1]=p[w+1],x[k+2]=p[w],x[k+3]=255;this._drawCtx.putImageData(g,l,c),this._damage(l,c,g.width,g.height)}},{key:"_rgbxImageData",value:function(l,c,v,S,p,m){var g;_.supportsImageMetadata?g=new ImageData(new Uint8ClampedArray(p.buffer,p.byteOffset,v*S*4),v,S):(g=this._drawCtx.createImageData(v,S),g.data.set(new Uint8ClampedArray(p.buffer,p.byteOffset,v*S*4))),this._drawCtx.putImageData(g,l,c),this._damage(l,c,g.width,g.height)}},{key:"_renderQPush",value:function(l){this._renderQ.push(l),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 l=!0;l&&this._renderQ.length>0;){var c=this._renderQ[0];switch(c.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(c.oldX,c.oldY,c.x,c.y,c.width,c.height,!0);break;case"fill":this.fillRect(c.x,c.y,c.width,c.height,c.color,!0);break;case"blit":this.blitImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"blitRgb":this.blitRgbImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"img":if(c.img.complete&&c.img.width!==0&&c.img.height!==0){if(c.img.width!==c.width||c.img.height!==c.height){y.Error("Decoded image has incorrect dimensions. Got "+c.img.width+"x"+c.img.height+". Expected "+c.width+"x"+c.height+".");return}this.drawImage(c.img,c.x,c.y)}else c.img._noVNCDisplay=this,c.img.addEventListener("load",this._resumeRenderQ),l=!1;break}l&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(l){this._rescale(l)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(l){this._clipViewport=l;var c=this._viewportLoc;this.viewportChangeSize(c.w,c.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),t}();L.default=h},29274:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.encodingName=f,L.encodings=void 0;var a={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};L.encodings=a;function f(y){switch(y){case a.encodingRaw:return"Raw";case a.encodingCopyRect:return"CopyRect";case a.encodingRRE:return"RRE";case a.encodingHextile:return"Hextile";case a.encodingTight:return"Tight";case a.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+y+"]"}}},77367:function(Le,L,a){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var f=a(47169),y=C(a(696));function C(r){return r&&r.__esModule?r:{default:r}}function _(r,i){if(!(r instanceof i))throw new TypeError("Cannot call a class as a function")}function o(r,i){for(var s=0;s<i.length;s++){var e=i[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function u(r,i,s){return i&&o(r.prototype,i),s&&o(r,s),r}var d=function(){function r(){_(this,r),this.strm=new y.default,this.chunkSize=1024*10*10,this.strm.output=new Uint8Array(this.chunkSize),this.windowBits=5,(0,f.inflateInit)(this.strm,this.windowBits)}return u(r,[{key:"setInput",value:function(s){s?(this.strm.input=s,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(s){s>this.chunkSize&&(this.chunkSize=s,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=s;var e=(0,f.inflate)(this.strm,0);if(e<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=s)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,f.inflateReset)(this.strm)}}]),r}();L.default=d},14455:function(Le,L,a){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var f=y(a(93126));function y(r){return r&&r.__esModule?r:{default:r}}var C={};function _(r,i){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in C)throw new Error('Duplicate entry for key "'+r+'"');C[r]=[i,i,i,i]}function o(r,i,s){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(s===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in C)throw new Error('Duplicate entry for key "'+r+'"');C[r]=[i,i,s,i]}function u(r,i,s){if(i===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(s===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in C)throw new Error('Duplicate entry for key "'+r+'"');C[r]=[i,i,i,s]}o("Alt",f.default.XK_Alt_L,f.default.XK_Alt_R),_("AltGraph",f.default.XK_ISO_Level3_Shift),_("CapsLock",f.default.XK_Caps_Lock),o("Control",f.default.XK_Control_L,f.default.XK_Control_R),o("Meta",f.default.XK_Super_L,f.default.XK_Super_R),_("NumLock",f.default.XK_Num_Lock),_("ScrollLock",f.default.XK_Scroll_Lock),o("Shift",f.default.XK_Shift_L,f.default.XK_Shift_R),u("Enter",f.default.XK_Return,f.default.XK_KP_Enter),_("Tab",f.default.XK_Tab),u(" ",f.default.XK_space,f.default.XK_KP_Space),u("ArrowDown",f.default.XK_Down,f.default.XK_KP_Down),u("ArrowUp",f.default.XK_Up,f.default.XK_KP_Up),u("ArrowLeft",f.default.XK_Left,f.default.XK_KP_Left),u("ArrowRight",f.default.XK_Right,f.default.XK_KP_Right),u("End",f.default.XK_End,f.default.XK_KP_End),u("Home",f.default.XK_Home,f.default.XK_KP_Home),u("PageDown",f.default.XK_Next,f.default.XK_KP_Next),u("PageUp",f.default.XK_Prior,f.default.XK_KP_Prior),_("Backspace",f.default.XK_BackSpace),u("Clear",f.default.XK_Clear,f.default.XK_KP_Begin),_("Copy",f.default.XF86XK_Copy),_("Cut",f.default.XF86XK_Cut),u("Delete",f.default.XK_Delete,f.default.XK_KP_Delete),u("Insert",f.default.XK_Insert,f.default.XK_KP_Insert),_("Paste",f.default.XF86XK_Paste),_("Redo",f.default.XK_Redo),_("Undo",f.default.XK_Undo),_("Cancel",f.default.XK_Cancel),_("ContextMenu",f.default.XK_Menu),_("Escape",f.default.XK_Escape),_("Execute",f.default.XK_Execute),_("Find",f.default.XK_Find),_("Help",f.default.XK_Help),_("Pause",f.default.XK_Pause),_("Select",f.default.XK_Select),_("ZoomIn",f.default.XF86XK_ZoomIn),_("ZoomOut",f.default.XF86XK_ZoomOut),_("BrightnessDown",f.default.XF86XK_MonBrightnessDown),_("BrightnessUp",f.default.XF86XK_MonBrightnessUp),_("Eject",f.default.XF86XK_Eject),_("LogOff",f.default.XF86XK_LogOff),_("Power",f.default.XF86XK_PowerOff),_("PowerOff",f.default.XF86XK_PowerDown),_("PrintScreen",f.default.XK_Print),_("Hibernate",f.default.XF86XK_Hibernate),_("Standby",f.default.XF86XK_Standby),_("WakeUp",f.default.XF86XK_WakeUp),_("AllCandidates",f.default.XK_MultipleCandidate),_("Alphanumeric",f.default.XK_Eisu_Shift),_("CodeInput",f.default.XK_Codeinput),_("Compose",f.default.XK_Multi_key),_("Convert",f.default.XK_Henkan),_("GroupFirst",f.default.XK_ISO_First_Group),_("GroupLast",f.default.XK_ISO_Last_Group),_("GroupNext",f.default.XK_ISO_Next_Group),_("GroupPrevious",f.default.XK_ISO_Prev_Group),_("NonConvert",f.default.XK_Muhenkan),_("PreviousCandidate",f.default.XK_PreviousCandidate),_("SingleCandidate",f.default.XK_SingleCandidate),_("HangulMode",f.default.XK_Hangul),_("HanjaMode",f.default.XK_Hangul_Hanja),_("JunjuaMode",f.default.XK_Hangul_Jeonja),_("Eisu",f.default.XK_Eisu_toggle),_("Hankaku",f.default.XK_Hankaku),_("Hiragana",f.default.XK_Hiragana),_("HiraganaKatakana",f.default.XK_Hiragana_Katakana),_("KanaMode",f.default.XK_Kana_Shift),_("KanjiMode",f.default.XK_Kanji),_("Katakana",f.default.XK_Katakana),_("Romaji",f.default.XK_Romaji),_("Zenkaku",f.default.XK_Zenkaku),_("ZenkakuHanaku",f.default.XK_Zenkaku_Hankaku),_("F1",f.default.XK_F1),_("F2",f.default.XK_F2),_("F3",f.default.XK_F3),_("F4",f.default.XK_F4),_("F5",f.default.XK_F5),_("F6",f.default.XK_F6),_("F7",f.default.XK_F7),_("F8",f.default.XK_F8),_("F9",f.default.XK_F9),_("F10",f.default.XK_F10),_("F11",f.default.XK_F11),_("F12",f.default.XK_F12),_("F13",f.default.XK_F13),_("F14",f.default.XK_F14),_("F15",f.default.XK_F15),_("F16",f.default.XK_F16),_("F17",f.default.XK_F17),_("F18",f.default.XK_F18),_("F19",f.default.XK_F19),_("F20",f.default.XK_F20),_("F21",f.default.XK_F21),_("F22",f.default.XK_F22),_("F23",f.default.XK_F23),_("F24",f.default.XK_F24),_("F25",f.default.XK_F25),_("F26",f.default.XK_F26),_("F27",f.default.XK_F27),_("F28",f.default.XK_F28),_("F29",f.default.XK_F29),_("F30",f.default.XK_F30),_("F31",f.default.XK_F31),_("F32",f.default.XK_F32),_("F33",f.default.XK_F33),_("F34",f.default.XK_F34),_("F35",f.default.XK_F35),_("Close",f.default.XF86XK_Close),_("MailForward",f.default.XF86XK_MailForward),_("MailReply",f.default.XF86XK_Reply),_("MailSend",f.default.XF86XK_Send),_("MediaFastForward",f.default.XF86XK_AudioForward),_("MediaPause",f.default.XF86XK_AudioPause),_("MediaPlay",f.default.XF86XK_AudioPlay),_("MediaRecord",f.default.XF86XK_AudioRecord),_("MediaRewind",f.default.XF86XK_AudioRewind),_("MediaStop",f.default.XF86XK_AudioStop),_("MediaTrackNext",f.default.XF86XK_AudioNext),_("MediaTrackPrevious",f.default.XF86XK_AudioPrev),_("New",f.default.XF86XK_New),_("Open",f.default.XF86XK_Open),_("Print",f.default.XK_Print),_("Save",f.default.XF86XK_Save),_("SpellCheck",f.default.XF86XK_Spell),_("AudioVolumeDown",f.default.XF86XK_AudioLowerVolume),_("AudioVolumeUp",f.default.XF86XK_AudioRaiseVolume),_("AudioVolumeMute",f.default.XF86XK_AudioMute),_("MicrophoneVolumeMute",f.default.XF86XK_AudioMicMute),_("LaunchApplication1",f.default.XF86XK_MyComputer),_("LaunchApplication2",f.default.XF86XK_Calculator),_("LaunchCalendar",f.default.XF86XK_Calendar),_("LaunchMail",f.default.XF86XK_Mail),_("LaunchMediaPlayer",f.default.XF86XK_AudioMedia),_("LaunchMusicPlayer",f.default.XF86XK_Music),_("LaunchPhone",f.default.XF86XK_Phone),_("LaunchScreenSaver",f.default.XF86XK_ScreenSaver),_("LaunchSpreadsheet",f.default.XF86XK_Excel),_("LaunchWebBrowser",f.default.XF86XK_WWW),_("LaunchWebCam",f.default.XF86XK_WebCam),_("LaunchWordProcessor",f.default.XF86XK_Word),_("BrowserBack",f.default.XF86XK_Back),_("BrowserFavorites",f.default.XF86XK_Favorites),_("BrowserForward",f.default.XF86XK_Forward),_("BrowserHome",f.default.XF86XK_HomePage),_("BrowserRefresh",f.default.XF86XK_Refresh),_("BrowserSearch",f.default.XF86XK_Search),_("BrowserStop",f.default.XF86XK_Stop),_("Dimmer",f.default.XF86XK_BrightnessAdjust),_("MediaAudioTrack",f.default.XF86XK_AudioCycleTrack),_("RandomToggle",f.default.XF86XK_AudioRandomPlay),_("SplitScreenToggle",f.default.XF86XK_SplitScreen),_("Subtitle",f.default.XF86XK_Subtitle),_("VideoModeNext",f.default.XF86XK_Next_VMode),u("=",f.default.XK_equal,f.default.XK_KP_Equal),u("+",f.default.XK_plus,f.default.XK_KP_Add),u("-",f.default.XK_minus,f.default.XK_KP_Subtract),u("*",f.default.XK_asterisk,f.default.XK_KP_Multiply),u("/",f.default.XK_slash,f.default.XK_KP_Divide),u(".",f.default.XK_period,f.default.XK_KP_Decimal),u(",",f.default.XK_comma,f.default.XK_KP_Separator),u("0",f.default.XK_0,f.default.XK_KP_0),u("1",f.default.XK_1,f.default.XK_KP_1),u("2",f.default.XK_2,f.default.XK_KP_2),u("3",f.default.XK_3,f.default.XK_KP_3),u("4",f.default.XK_4,f.default.XK_KP_4),u("5",f.default.XK_5,f.default.XK_KP_5),u("6",f.default.XK_6,f.default.XK_KP_6),u("7",f.default.XK_7,f.default.XK_KP_7),u("8",f.default.XK_8,f.default.XK_KP_8),u("9",f.default.XK_9,f.default.XK_KP_9);var d=C;L.default=d},2090:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var a={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"};L.default=a},64526:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function a(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function f(p,m){for(var g=0;g<m.length;g++){var x=m[g];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(p,x.key,x)}}function y(p,m,g){return m&&f(p.prototype,m),g&&f(p,g),p}var C=0,_=1,o=2,u=4,d=8,r=16,i=32,s=64,e=127,h=50,t=90,n=250,l=1e3,c=1e3,v=50,S=function(){function p(){a(this,p),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 y(p,[{key:"attach",value:function(g){this.detach(),this._target=g,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(g){var x;switch(g.stopPropagation(),g.preventDefault(),g.type){case"touchstart":x=this._touchStart;break;case"touchmove":x=this._touchMove;break;case"touchend":case"touchcancel":x=this._touchEnd;break}for(var k=0;k<g.changedTouches.length;k++){var w=g.changedTouches[k];x.call(this,w.identifier,w.clientX,w.clientY)}}},{key:"_touchStart",value:function(g,x,k){if(this._hasDetectedGesture()||this._state===C){this._ignored.push(g);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>n){this._state=C,this._ignored.push(g);return}if(this._waitingRelease){this._state=C,this._ignored.push(g);return}switch(this._tracked.push({id:g,started:Date.now(),active:!0,firstX:x,firstY:k,lastX:x,lastY:k,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(_|d|r),this._stopLongpressTimeout();break;case 3:this._state&=~(o|i|s);break;default:this._state=C}}},{key:"_touchMove",value:function(g,x,k){var w=this._tracked.find(function(ye){return ye.id===g});if(w!==void 0){w.lastX=x,w.lastY=k;var E=x-w.firstX,T=k-w.firstY;if((w.firstX!==w.lastX||w.firstY!==w.lastY)&&(w.angle=Math.atan2(T,E)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(E,T)<h)return;if(this._state&=~(_|o|u|r),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~d),this._tracked.length!==2&&(this._state&=~(i|s)),this._tracked.length===2){var A=this._tracked.find(function(ye){return ye.id!==g}),B=Math.hypot(A.firstX-A.lastX,A.firstY-A.lastY);if(B>h){var j=Math.abs(w.angle-A.angle);j=Math.abs((j+180)%360-180),j>t?this._state&=~i:this._state&=~s,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}}},{key:"_touchEnd",value:function(g,x,k){if(this._ignored.indexOf(g)!==-1){this._ignored.splice(this._ignored.indexOf(g),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=C),!this._hasDetectedGesture()&&(this._state&=~(d|i|s),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&=~(_|u);break}if(this._waitingRelease){Date.now()-this._releaseStart>n&&(this._state=C),this._tracked.some(function(T){return Date.now()-T.started>l})&&(this._state=C);var w=this._tracked.find(function(T){return T.id===g});if(w.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==C)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var E=0;E<this._tracked.length;E++)this._tracked[E].active&&this._ignored.push(this._tracked[E].id);this._tracked=[],this._state=C,this._ignored.indexOf(g)!==-1&&this._ignored.splice(this._ignored.indexOf(g),1),this._ignored.length===0&&(this._state=e,this._waitingRelease=!1)}},{key:"_hasDetectedGesture",value:function(){return!(this._state===C||this._state&this._state-1||this._state&(_|o|u)&&this._tracked.some(function(g){return g.active}))}},{key:"_startLongpressTimeout",value:function(){var g=this;this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout(function(){return g._longpressTimeout()},c)}},{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 g=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return g._twoTouchTimeout()},v)}},{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 g=this._getAverageMovement(),x=Math.abs(g.x),k=Math.abs(g.y),w=this._getAverageDistance(),E=Math.abs(Math.hypot(w.first.x,w.first.y)-Math.hypot(w.last.x,w.last.y));k<E&&x<E?this._state=s:this._state=i,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(g){var x={type:this._stateToGesture(this._state)},k=this._getPosition(),w=k.last;switch(g==="gesturestart"&&(w=k.first),this._state){case i:case s:w=k.first;break}if(x.clientX=w.x,x.clientY=w.y,this._state===s){var E=this._getAverageDistance();g==="gesturestart"?(x.magnitudeX=E.first.x,x.magnitudeY=E.first.y):(x.magnitudeX=E.last.x,x.magnitudeY=E.last.y)}else if(this._state===i)if(g==="gesturestart")x.magnitudeX=0,x.magnitudeY=0;else{var T=this._getAverageMovement();x.magnitudeX=T.x,x.magnitudeY=T.y}var A=new CustomEvent(g,{detail:x});this._target.dispatchEvent(A)}},{key:"_stateToGesture",value:function(g){switch(g){case _:return"onetap";case o:return"twotap";case u:return"threetap";case d:return"drag";case r:return"longpress";case i:return"twodrag";case s:return"pinch"}throw new Error("Unknown gesture state: "+g)}},{key:"_getPosition",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture position, no tracked touches");for(var g=this._tracked.length,x=0,k=0,w=0,E=0,T=0;T<this._tracked.length;T++)x+=this._tracked[T].firstX,k+=this._tracked[T].firstY,w+=this._tracked[T].lastX,E+=this._tracked[T].lastY;return{first:{x:x/g,y:k/g},last:{x:w/g,y:E/g}}}},{key:"_getAverageMovement",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture movement, no tracked touches");var g,x;g=x=0;for(var k=this._tracked.length,w=0;w<this._tracked.length;w++)g+=this._tracked[w].lastX-this._tracked[w].firstX,x+=this._tracked[w].lastY-this._tracked[w].firstY;return{x:g/k,y:x/k}}},{key:"_getAverageDistance",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture distance, no tracked touches");var g=this._tracked[0],x=this._tracked[this._tracked.length-1],k=Math.abs(x.firstX-g.firstX),w=Math.abs(x.firstY-g.firstY),E=Math.abs(x.lastX-g.lastX),T=Math.abs(x.lastY-g.lastY);return{first:{x:k,y:w},last:{x:E,y:T}}}}]),p}();L.default=S},40195:function(Le,L,a){"use strict";function f(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(n)}Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var y=i(a(37095)),C=a(32466),_=i(a(58150)),o=d(a(93126)),u=i(a(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||f(n)!=="object"&&typeof n!="function")return{default:n};var l=r();if(l&&l.has(n))return l.get(n);var c={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in n)if(Object.prototype.hasOwnProperty.call(n,S)){var p=v?Object.getOwnPropertyDescriptor(n,S):null;p&&(p.get||p.set)?Object.defineProperty(c,S,p):c[S]=n[S]}return c.default=n,l&&l.set(n,c),c}function s(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function e(n,l){for(var c=0;c<l.length;c++){var v=l[c];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(n,v.key,v)}}function h(n,l,c){return l&&e(n.prototype,l),c&&e(n,c),n}var t=function(){function n(l){s(this,n),this._target=l||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 h(n,[{key:"_sendKeyEvent",value:function(c,v,S){if(S)this._keyDownList[v]=c;else{if(!(v in this._keyDownList))return;delete this._keyDownList[v]}y.Debug("onkeyevent "+(S?"down":"up")+", keysym: "+c,", code: "+v),this.onkeyevent(c,v,S)}},{key:"_getKeyCode",value:function(c){var v=_.getKeycode(c);if(v!=="Unidentified")return v;if(c.keyCode&&c.type!=="keypress"&&c.keyCode!==229)return"Platform"+c.keyCode;if(c.keyIdentifier){if(c.keyIdentifier.substr(0,2)!=="U+")return c.keyIdentifier;var S=parseInt(c.keyIdentifier.substr(2),16),p=String.fromCharCode(S).toUpperCase();return"Platform"+p.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(c){var v=this._getKeyCode(c),S=_.getKeysym(c);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),v==="AltRight"&&c.timeStamp-this._altGrCtrlTime<50?S=o.default.XK_ISO_Level3_Shift:this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),v==="Unidentified"){S&&(this._sendKeyEvent(S,v,!0),this._sendKeyEvent(S,v,!1)),(0,C.stopEvent)(c);return}if(u.isMac()||u.isIOS())switch(S){case o.default.XK_Super_L:S=o.default.XK_Alt_L;break;case o.default.XK_Super_R:S=o.default.XK_Super_L;break;case o.default.XK_Alt_L:S=o.default.XK_Mode_switch;break;case o.default.XK_Alt_R:S=o.default.XK_ISO_Level3_Shift;break}if(v in this._keyDownList&&(S=this._keyDownList[v]),(u.isMac()||u.isIOS())&&v==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1),(0,C.stopEvent)(c);return}if(!S&&(!c.key||u.isIE()||u.isEdge())){this._pendingKey=v,setTimeout(this._handleKeyPressTimeout.bind(this),10,c);return}if(this._pendingKey=null,(0,C.stopEvent)(c),v==="ControlLeft"&&u.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=c.timeStamp;return}this._sendKeyEvent(S,v,!0)}},{key:"_handleKeyPress",value:function(c){if((0,C.stopEvent)(c),this._pendingKey!==null){var v=this._getKeyCode(c),S=_.getKeysym(c);if(!(v!=="Unidentified"&&v!=this._pendingKey)){if(v=this._pendingKey,this._pendingKey=null,!S){y.Info("keypress with no keysym:",c);return}this._sendKeyEvent(S,v,!0)}}}},{key:"_handleKeyPressTimeout",value:function(c){if(this._pendingKey!==null){var v,S=this._pendingKey;if(this._pendingKey=null,c.keyCode>=48&&c.keyCode<=57)v=c.keyCode;else if(c.keyCode>=65&&c.keyCode<=90){var p=String.fromCharCode(c.keyCode);c.shiftKey?p=p.toUpperCase():p=p.toLowerCase(),v=p.charCodeAt()}else v=0;this._sendKeyEvent(v,S,!0)}}},{key:"_handleKeyUp",value:function(c){(0,C.stopEvent)(c);var v=this._getKeyCode(c);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),(u.isMac()||u.isIOS())&&v==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[v],v,!1),u.isWindows()&&(v==="ShiftLeft"||v==="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(){y.Debug(">> Keyboard.allKeysUp");for(var c in this._keyDownList)this._sendKeyEvent(this._keyDownList[c],c,!1);y.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(c){if(!c.skipCheckAlt&&!c.altKey){var v=this._target,S=this._keyDownList;["AltLeft","AltRight"].forEach(function(p){if(p in S){var m=new KeyboardEvent("keyup",{key:S[p],code:p});m.skipCheckAlt=!0,v.dispatchEvent(m)}})}}},{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 c=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(v){return document.addEventListener(v,c,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(u.isWindows()&&u.isFirefox()){var c=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(v){return document.removeEventListener(v,c)})}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}();L.default=t},93126:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var a={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};L.default=a},95644:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var a={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},f={lookup:function(C){if(C>=32&&C<=255)return C;var _=a[C];return _!==void 0?_:16777216|C}};L.default=f},58150:function(Le,L,a){"use strict";function f(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(c){return typeof c}:f=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},f(n)}Object.defineProperty(L,"__esModule",{value:!0}),L.getKeycode=e,L.getKey=h,L.getKeysym=t;var y=s(a(93126)),C=s(a(95644)),_=s(a(85586)),o=s(a(2090)),u=s(a(14455)),d=i(a(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||f(n)!=="object"&&typeof n!="function")return{default:n};var l=r();if(l&&l.has(n))return l.get(n);var c={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in n)if(Object.prototype.hasOwnProperty.call(n,S)){var p=v?Object.getOwnPropertyDescriptor(n,S):null;p&&(p.get||p.set)?Object.defineProperty(c,S,p):c[S]=n[S]}return c.default=n,l&&l.set(n,c),c}function s(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 _.default){var l=_.default[n.keyCode];if(d.isMac()&&l==="ContextMenu"&&(l="MetaRight"),n.location===2)switch(l){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(n.location===3)switch(l){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 l}return"Unidentified"}function h(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 l=e(n);return l in o.default?o.default[l]:n.charCode?String.fromCharCode(n.charCode):"Unidentified"}function t(n){var l=h(n);if(l==="Unidentified")return null;if(l in u.default){var c=n.location;if(l==="Meta"&&c===0&&(c=2),l==="Clear"&&c===3){var v=e(n);v==="NumLock"&&(c=0)}if((c===void 0||c>3)&&(c=0),l==="Meta"){var S=e(n);if(S==="AltLeft")return y.default.XK_Meta_L;if(S==="AltRight")return y.default.XK_Meta_R}if(l==="Clear"){var p=e(n);if(p==="NumLock")return y.default.XK_Num_Lock}return u.default[l][c]}if(l.length!==1)return null;var m=l.charCodeAt();return m?C.default.lookup(m):null}},85586:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var a={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"};L.default=a},73596:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var a={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};L.default=a},51256:function(Le,L,a){"use strict";var f;f={value:!0},L.Z=void 0;var y=a(77676),C=B(a(37095)),_=a(38955),o=a(58863),u=a(80957),d=a(32466),r=T(a(45458)),i=T(a(61307)),s=T(a(77367)),e=T(a(77160)),h=T(a(40195)),t=T(a(64526)),n=T(a(87975)),l=T(a(53707)),c=T(a(44693)),v=T(a(93126)),S=T(a(73596)),p=a(29274);a(21146);var m=T(a(12133)),g=T(a(62175)),x=T(a(18966)),k=T(a(55901)),w=T(a(37856)),E=T(a(19442));function T(ae){return ae&&ae.__esModule?ae:{default:ae}}function A(){if(typeof WeakMap!="function")return null;var ae=new WeakMap;return A=function(){return ae},ae}function B(ae){if(ae&&ae.__esModule)return ae;if(ae===null||j(ae)!=="object"&&typeof ae!="function")return{default:ae};var oe=A();if(oe&&oe.has(ae))return oe.get(ae);var ue={},q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in ae)if(Object.prototype.hasOwnProperty.call(ae,F)){var X=q?Object.getOwnPropertyDescriptor(ae,F):null;X&&(X.get||X.set)?Object.defineProperty(ue,F,X):ue[F]=ae[F]}return ue.default=ae,oe&&oe.set(ae,ue),ue}function j(ae){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j=function(ue){return typeof ue}:j=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},j(ae)}function ye(ae,oe){if(!(ae instanceof oe))throw new TypeError("Cannot call a class as a function")}function re(ae,oe){for(var ue=0;ue<oe.length;ue++){var q=oe[ue];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(ae,q.key,q)}}function ce(ae,oe,ue){return oe&&re(ae.prototype,oe),ue&&re(ae,ue),ae}function P(ae,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function");ae.prototype=Object.create(oe&&oe.prototype,{constructor:{value:ae,writable:!0,configurable:!0}}),oe&&N(ae,oe)}function N(ae,oe){return N=Object.setPrototypeOf||function(q,F){return q.__proto__=F,q},N(ae,oe)}function H(ae){var oe=ie();return function(){var q=me(ae),F;if(oe){var X=me(this).constructor;F=Reflect.construct(q,arguments,X)}else F=q.apply(this,arguments);return Y(this,F)}}function Y(ae,oe){return oe&&(j(oe)==="object"||typeof oe=="function")?oe:W(ae)}function W(ae){if(ae===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ae}function ie(){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(ae){return!1}}function me(ae){return me=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},me(ae)}var De=3,ze="rgb(40, 40, 40)",je=17,_e=50,ke=19,Ie=75,Te=50,Ne=1e3,$e=50,He=1,rt=null,Me=null,Ye=null,Oe=null,Ue=1<<24,We=1<<25,Q=1<<26,te=1<<27,ve=1<<28,de=function(ae){P(ue,ae);var oe=H(ue);function ue(q,F,X){var O;if(ye(this,ue),!q)throw new Error("Must specify target");if(!F)throw new Error("Must specify URL");O=oe.call(this),O._target=q,O._url=F,X=X||{},O._rfbCredentials=X.credentials||{},O._shared="shared"in X?!!X.shared:!0,O._repeaterID=X.repeaterID||"",O._wsProtocols=X.wsProtocols||[],O._rfbConnectionState="",O._rfbInitState="",O._rfbAuthScheme=-1,O._rfbCleanDisconnect=!0,O._rfbVersion=0,O._rfbMaxVersion=3.8,O._rfbTightVNC=!1,O._rfbVeNCryptState=0,O._rfbXvpVer=0,O._fbWidth=0,O._fbHeight=0,O._fbName="",O._capabilities={power:!1},O._supportsFence=!1,O._supportsContinuousUpdates=!1,O._enabledContinuousUpdates=!1,O._supportsSetDesktopSize=!1,O._screenID=0,O._screenFlags=0,O._qemuExtKeyEventSupported=!1,O._clipboardText=null,O._clipboardServerCapabilitiesActions={},O._clipboardServerCapabilitiesFormats={},O._sock=null,O._display=null,O._flushing=!1,O._keyboard=null,O._gestures=null,O._disconnTimer=null,O._resizeTimeout=null,O._mouseMoveTimer=null,O._decoders={},O._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},O._mousePos={},O._mouseButtonMask=0,O._mouseLastMoveTime=0,O._viewportDragging=!1,O._viewportDragPos={},O._viewportHasMoved=!1,O._accumulatedWheelDeltaX=0,O._accumulatedWheelDeltaY=0,O._gestureLastTapTime=null,O._gestureFirstDoubleTapEv=null,O._gestureLastMagnitudeX=0,O._gestureLastMagnitudeY=0,O._eventHandlers={focusCanvas:O._focusCanvas.bind(W(O)),windowResize:O._windowResize.bind(W(O)),handleMouse:O._handleMouse.bind(W(O)),handleWheel:O._handleWheel.bind(W(O)),handleGesture:O._handleGesture.bind(W(O))},C.Debug(">> RFB.constructor"),O._screen=document.createElement("div"),O._screen.style.display="flex",O._screen.style.width="100%",O._screen.style.height="100%",O._screen.style.overflow="auto",O._screen.style.background=ze,O._canvas=document.createElement("canvas"),O._canvas.style.margin="auto",O._canvas.style.outline="none",O._canvas.style.flexShrink="0",O._canvas.width=0,O._canvas.height=0,O._canvas.tabIndex=-1,O._screen.appendChild(O._canvas),O._cursor=new n.default,O._cursorImage=ue.cursors.none,O._decoders[p.encodings.encodingRaw]=new m.default,O._decoders[p.encodings.encodingCopyRect]=new g.default,O._decoders[p.encodings.encodingRRE]=new x.default,O._decoders[p.encodings.encodingHextile]=new k.default,O._decoders[p.encodings.encodingTight]=new w.default,O._decoders[p.encodings.encodingTightPNG]=new E.default;try{O._display=new i.default(O._canvas)}catch(G){throw C.Error("Display exception: "+G),G}return O._display.onflush=O._onFlush.bind(W(O)),O._keyboard=new h.default(O._canvas),O._keyboard.onkeyevent=O._handleKeyEvent.bind(W(O)),O._gestures=new t.default,O._sock=new l.default,O._sock.on("message",function(){O._handleMessage()}),O._sock.on("open",function(){O._rfbConnectionState==="connecting"&&O._rfbInitState===""?(O._rfbInitState="ProtocolVersion",C.Debug("Starting VNC handshake")):O._fail("Unexpected server connection while "+O._rfbConnectionState)}),O._sock.on("close",function(G){C.Debug("WebSocket on-close event");var ge="";switch(G.code&&(ge="(code: "+G.code,G.reason&&(ge+=", reason: "+G.reason),ge+=")"),O._rfbConnectionState){case"connecting":O._fail("Connection closed "+ge);break;case"connected":O._updateConnectionState("disconnecting"),O._updateConnectionState("disconnected");break;case"disconnecting":O._updateConnectionState("disconnected");break;case"disconnected":O._fail("Unexpected server disconnect when already disconnected "+ge);break;default:O._fail("Unexpected server disconnect before connecting "+ge);break}O._sock.off("close")}),O._sock.on("error",function(G){return C.Warn("WebSocket on-error event")}),setTimeout(O._updateConnectionState.bind(W(O),"connecting")),C.Debug("<< RFB.constructor"),O.dragViewport=!1,O.focusOnClick=!0,O._viewOnly=!1,O._clipViewport=!1,O._scaleViewport=!1,O._resizeSession=!1,O._showDotCursor=!1,X.showDotCursor!==void 0&&(C.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),O._showDotCursor=X.showDotCursor),O._qualityLevel=6,O._compressionLevel=2,O}return ce(ue,[{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||(C.Info("Sending Ctrl-Alt-Del"),this.sendKey(v.default.XK_Control_L,"ControlLeft",!0),this.sendKey(v.default.XK_Alt_L,"AltLeft",!0),this.sendKey(v.default.XK_Delete,"Delete",!0),this.sendKey(v.default.XK_Delete,"Delete",!1),this.sendKey(v.default.XK_Alt_L,"AltLeft",!1),this.sendKey(v.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,X,O){if(!(this._rfbConnectionState!=="connected"||this._viewOnly)){if(O===void 0){this.sendKey(F,X,!0),this.sendKey(F,X,!1);return}var G=S.default[X];if(this._qemuExtKeyEventSupported&&G)F=F||0,C.Info("Sending key ("+(O?"down":"up")+"): keysym "+F+", scancode "+G),ue.messages.QEMUExtendedKeyEvent(this._sock,F,O,G);else{if(!F)return;C.Info("Sending keysym ("+(O?"down":"up")+"): "+F),ue.messages.keyEvent(this._sock,F,O?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[He]&&this._clipboardServerCapabilitiesActions[te])this._clipboardText=F,ue.messages.extendedClipboardNotify(this._sock,[He]);else{for(var X=new Uint8Array(F.length),O=0;O<F.length;O++)X[O]=F.charCodeAt(O);ue.messages.clientCutText(this._sock,X)}}},{key:"_connect",value:function(){C.Debug(">> RFB.connect"),C.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),C.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){C.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),C.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 X=this;window.requestAnimationFrame(function(){X._updateClip(),X._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var F=this._display.clipViewport,X=this._clipViewport;if(this._scaleViewport&&(X=!1),F!==X&&(this._display.clipViewport=X),X){var O=this._screenSize();this._display.viewportChangeSize(O.w,O.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();ue.messages.setDesktopSize(this._sock,Math.floor(F.w),Math.floor(F.h),this._screenID,this._screenFlags),C.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 X=this,O=this._rfbConnectionState;if(F===O){C.Debug("Already in state '"+F+"', ignoring");return}if(O==="disconnected"){C.Error("Tried changing state of a disconnected RFB object");return}switch(F){case"connected":if(O!=="connecting"){C.Error("Bad transition to connected state, previous connection state: "+O);return}break;case"disconnected":if(O!=="disconnecting"){C.Error("Bad transition to disconnected state, previous connection state: "+O);return}break;case"connecting":if(O!==""){C.Error("Bad transition to connecting state, previous connection state: "+O);return}break;case"disconnecting":if(O!=="connected"&&O!=="connecting"){C.Error("Bad transition to disconnecting state, previous connection state: "+O);return}break;default:C.Error("Unknown connection state: "+F);return}switch(this._rfbConnectionState=F,C.Debug("New state '"+F+"', was '"+O+"'."),this._disconnTimer&&F!=="disconnecting"&&(C.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(){C.Error("Disconnection timed out."),X._updateConnectionState("disconnected")},De*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(F){switch(this._rfbConnectionState){case"disconnecting":C.Error("Failed when disconnecting: "+F);break;case"connected":C.Error("Failed while connected: "+F);break;case"connecting":C.Error("Failed when connecting: "+F);break;default:C.Error("RFB failure: "+F);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(F,X){this._capabilities[F]=X,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){C.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":C.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,X,O){this.sendKey(F,X,O)}},{key:"_handleMouse",value:function(F){if(!(F.type==="click"&&F.target!==this._canvas)&&(F.stopPropagation(),F.preventDefault(),!(F.type==="click"||F.type==="contextmenu"))){var X=(0,u.clientToElement)(F.clientX,F.clientY,this._canvas);switch(F.type){case"mousedown":(0,d.setCapture)(this._canvas),this._handleMouseButton(X.x,X.y,!0,1<<F.button);break;case"mouseup":this._handleMouseButton(X.x,X.y,!1,1<<F.button);break;case"mousemove":this._handleMouseMove(X.x,X.y);break}}}},{key:"_handleMouseButton",value:function(F,X,O,G){if(this.dragViewport)if(O&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:F,y:X},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(F,X,G)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(F,X,this._mouseButtonMask)),O?this._mouseButtonMask|=G:this._mouseButtonMask&=~G,this._sendMouse(F,X,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(F,X){var O=this;if(this._viewportDragging){var G=this._viewportDragPos.x-F,ge=this._viewportDragPos.y-X;(this._viewportHasMoved||Math.abs(G)>o.dragThreshold||Math.abs(ge)>o.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:F,y:X},this._display.viewportChangePos(G,ge));return}if(this._mousePos={x:F,y:X},this._mouseMoveTimer==null){var xe=Date.now()-this._mouseLastMoveTime;xe>je?(this._sendMouse(F,X,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){O._handleDelayedMouseMove()},je-xe)}}},{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,X,O){this._rfbConnectionState==="connected"&&(this._viewOnly||ue.messages.pointerEvent(this._sock,this._display.absX(F),this._display.absY(X),O))}},{key:"_handleWheel",value:function(F){if(this._rfbConnectionState==="connected"&&!this._viewOnly){F.stopPropagation(),F.preventDefault();var X=(0,u.clientToElement)(F.clientX,F.clientY,this._canvas),O=F.deltaX,G=F.deltaY;F.deltaMode!==0&&(O*=ke,G*=ke),this._accumulatedWheelDeltaX+=O,this._accumulatedWheelDeltaY+=G,Math.abs(this._accumulatedWheelDeltaX)>=_e&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(X.x,X.y,!0,32),this._handleMouseButton(X.x,X.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(X.x,X.y,!0,64),this._handleMouseButton(X.x,X.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=_e&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(X.x,X.y,!0,8),this._handleMouseButton(X.x,X.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(X.x,X.y,!0,16),this._handleMouseButton(X.x,X.y,!1,16)),this._accumulatedWheelDeltaY=0)}}},{key:"_fakeMouseMove",value:function(F,X,O){this._handleMouseMove(X,O),this._cursor.move(F.detail.clientX,F.detail.clientY)}},{key:"_handleTapEvent",value:function(F,X){var O=(0,u.clientToElement)(F.detail.clientX,F.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<Ne&&this._gestureFirstDoubleTapEv.detail.type===F.detail.type){var G=this._gestureFirstDoubleTapEv.detail.clientX-F.detail.clientX,ge=this._gestureFirstDoubleTapEv.detail.clientY-F.detail.clientY,xe=Math.hypot(G,ge);xe<$e?O=(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,O.x,O.y),this._handleMouseButton(O.x,O.y,!0,X),this._handleMouseButton(O.x,O.y,!1,X)}},{key:"_handleGesture",value:function(F){var X,O=(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,O.x,O.y),this._handleMouseButton(O.x,O.y,!0,1);break;case"longpress":this._fakeMouseMove(F,O.x,O.y),this._handleMouseButton(O.x,O.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=F.detail.magnitudeX,this._gestureLastMagnitudeY=F.detail.magnitudeY,this._fakeMouseMove(F,O.x,O.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(F.detail.magnitudeX,F.detail.magnitudeY),this._fakeMouseMove(F,O.x,O.y);break}break;case"gesturemove":switch(F.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(F,O.x,O.y);break;case"twodrag":for(this._fakeMouseMove(F,O.x,O.y);F.detail.magnitudeY-this._gestureLastMagnitudeY>Te;)this._handleMouseButton(O.x,O.y,!0,8),this._handleMouseButton(O.x,O.y,!1,8),this._gestureLastMagnitudeY+=Te;for(;F.detail.magnitudeY-this._gestureLastMagnitudeY<-Te;)this._handleMouseButton(O.x,O.y,!0,16),this._handleMouseButton(O.x,O.y,!1,16),this._gestureLastMagnitudeY-=Te;for(;F.detail.magnitudeX-this._gestureLastMagnitudeX>Te;)this._handleMouseButton(O.x,O.y,!0,32),this._handleMouseButton(O.x,O.y,!1,32),this._gestureLastMagnitudeX+=Te;for(;F.detail.magnitudeX-this._gestureLastMagnitudeX<-Te;)this._handleMouseButton(O.x,O.y,!0,64),this._handleMouseButton(O.x,O.y,!1,64),this._gestureLastMagnitudeX-=Te;break;case"pinch":if(this._fakeMouseMove(F,O.x,O.y),X=Math.hypot(F.detail.magnitudeX,F.detail.magnitudeY),Math.abs(X-this._gestureLastMagnitudeX)>Ie){for(this._handleKeyEvent(v.default.XK_Control_L,"ControlLeft",!0);X-this._gestureLastMagnitudeX>Ie;)this._handleMouseButton(O.x,O.y,!0,8),this._handleMouseButton(O.x,O.y,!1,8),this._gestureLastMagnitudeX+=Ie;for(;X-this._gestureLastMagnitudeX<-Ie;)this._handleMouseButton(O.x,O.y,!0,16),this._handleMouseButton(O.x,O.y,!1,16),this._gestureLastMagnitudeX-=Ie}this._handleKeyEvent(v.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,O.x,O.y),this._handleMouseButton(O.x,O.y,!1,1);break;case"longpress":this._fakeMouseMove(F,O.x,O.y),this._handleMouseButton(O.x,O.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);C.Info("Server ProtocolVersion: "+F);var X=0;switch(F){case"000.000":X=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(X){for(var O="ID:"+this._repeaterID;O.length<250;)O+="\0";return this._sock.sendString(O),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var G="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+G+`
`),C.Debug("Sent ProtocolVersion: "+G),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function F(G,ge){for(var xe=0;xe<ge.length;xe++)if(ge[xe]===G)return!0;return!1}if(this._rfbVersion>=3.7){var X=this._sock.rQshift8();if(this._sock.rQwait("security type",X,1))return!1;if(X===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var O=this._sock.rQshiftBytes(X);if(C.Debug("Server security types: "+O),F(1,O))this._rfbAuthScheme=1;else if(F(22,O))this._rfbAuthScheme=22;else if(F(16,O))this._rfbAuthScheme=16;else if(F(2,O))this._rfbAuthScheme=2;else if(F(19,O))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+O+")");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",C.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(),X="";if(F>0){if(this._sock.rQwait("reason",F,4))return!1;X=this._sock.rQshiftStr(F)}return X!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:X}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+X+")")):(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(),X=this._sock.rQshift8();if(!(F==0&&X==2))return this._fail("Unsupported VeNCrypt version "+F+"."+X);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var O=this._sock.rQshift8();if(O!=0)return this._fail("VeNCrypt failure "+O);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var G=this._sock.rQshift8();if(G<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=G,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var ge=[],xe=0;xe<this._rfbVeNCryptSubtypesLength;xe++)ge.push(this._sock.rQshift32());if(ge.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 Ee=(0,_.encodeUTF8)(this._rfbCredentials.username),I=(0,_.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,Ee.length]),this._sock.send([0,0,0,I.length]),this._sock.sendString(Ee),this._sock.sendString(I),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)),X=ue.genDES(this._rfbCredentials.password,F);return this._sock.send(X),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 X={0:{vendor:"TGHT",signature:"NOTUNNEL"}},O={},G=0;G<F;G++){var ge=this._sock.rQshift32(),xe=this._sock.rQshiftStr(4),Ee=this._sock.rQshiftStr(8);O[ge]={vendor:xe,signature:Ee}}return C.Debug("Server Tight tunnel types: "+O),O[1]&&O[1].vendor==="SICR"&&O[1].signature==="SCHANNEL"&&(C.Debug("Detected Siemens server. Assuming NOTUNNEL support."),O[0]={vendor:"TGHT",signature:"NOTUNNEL"}),O[0]?O[0].vendor!=X[0].vendor||O[0].signature!=X[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(C.Debug("Selected tunnel type: "+X[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 X=this._sock.rQshift32();if(X===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*X,4))return!1;for(var O={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},G=[],ge=0;ge<X;ge++){this._sock.rQshift32();var xe=this._sock.rQshiftStr(12);G.push(xe)}C.Debug("Server Tight authentication types: "+G);for(var Ee in O)if(G.indexOf(Ee)!=-1)switch(this._sock.send([0,0,0,O[Ee]]),C.Debug("Selected authentication type: "+Ee),Ee){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: "+Ee+")")}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",C.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(),X=this._sock.rQshift16(),O=this._sock.rQshift8(),G=this._sock.rQshift8(),ge=this._sock.rQshift8(),xe=this._sock.rQshift8(),Ee=this._sock.rQshift16(),I=this._sock.rQshift16(),le=this._sock.rQshift16(),fe=this._sock.rQshift8(),Se=this._sock.rQshift8(),we=this._sock.rQshift8();this._sock.rQskipBytes(3);var K=this._sock.rQshift32();if(this._sock.rQwait("server init name",K,24))return!1;var D=this._sock.rQshiftStr(K);if(D=(0,_.decodeUTF8)(D,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+K))return!1;var z=this._sock.rQshift16(),R=this._sock.rQshift16(),ee=this._sock.rQshift16();this._sock.rQskipBytes(2);var he=(z+R+ee)*16;if(this._sock.rQwait("TightVNC extended server init header",he,32+K))return!1;this._sock.rQskipBytes(16*z),this._sock.rQskipBytes(16*R),this._sock.rQskipBytes(16*ee)}return C.Info("Screen: "+F+"x"+X+", bpp: "+O+", depth: "+G+", bigEndian: "+ge+", trueColor: "+xe+", redMax: "+Ee+", greenMax: "+I+", blueMax: "+le+", redShift: "+fe+", greenShift: "+Se+", blueShift: "+we),this._setDesktopName(D),this._resize(F,X),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(C.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),ue.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),ue.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var F=[];F.push(p.encodings.encodingCopyRect),this._fbDepth==24&&(F.push(p.encodings.encodingTight),F.push(p.encodings.encodingTightPNG),F.push(p.encodings.encodingHextile),F.push(p.encodings.encodingRRE)),F.push(p.encodings.encodingRaw),F.push(p.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),F.push(p.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),F.push(p.encodings.pseudoEncodingDesktopSize),F.push(p.encodings.pseudoEncodingLastRect),F.push(p.encodings.pseudoEncodingQEMUExtendedKeyEvent),F.push(p.encodings.pseudoEncodingExtendedDesktopSize),F.push(p.encodings.pseudoEncodingXvp),F.push(p.encodings.pseudoEncodingFence),F.push(p.encodings.pseudoEncodingContinuousUpdates),F.push(p.encodings.pseudoEncodingDesktopName),F.push(p.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(F.push(p.encodings.pseudoEncodingVMwareCursor),F.push(p.encodings.pseudoEncodingCursor)),ue.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 C.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(C.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var F=this._sock.rQshift32();if(F=(0,y.toSigned32bit)(F),this._sock.rQwait("ServerCutText content",Math.abs(F),8))return!1;if(F>=0){var X=this._sock.rQshiftStr(F);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:X}}))}else{F=Math.abs(F);var O=this._sock.rQshift32(),G=O&65535,ge=O&4278190080,xe=!!(ge&Ue);if(xe){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var Ee=0;Ee<=15;Ee++){var I=1<<Ee;G&I&&(this._clipboardServerCapabilitiesFormats[I]=!0,this._sock.rQshift32())}for(var le=24;le<=31;le++){var fe=1<<le;this._clipboardServerCapabilitiesActions[fe]=!!(ge&fe)}var Se=[Ue,We,Q,te,ve];ue.messages.extendedClipboardCaps(this._sock,Se,{extendedClipboardFormatText:0})}else if(ge===We){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[ve]&&G&He&&ue.messages.extendedClipboardProvide(this._sock,[He],[this._clipboardText])}else if(ge===Q){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[te]&&(this._clipboardText!=null?ue.messages.extendedClipboardNotify(this._sock,[He]):ue.messages.extendedClipboardNotify(this._sock,[]))}else if(ge===te){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[We]&&G&He&&ue.messages.extendedClipboardRequest(this._sock,[He])}else if(ge===ve){if(this._viewOnly||!(G&He))return!0;this._clipboardText=null;var we=this._sock.rQshiftBytes(F-4),K=new s.default,D=null;K.setInput(we);for(var z=0;z<=15;z++){var R=1<<z;if(G&R){var ee=0,he=K.inflate(4);ee|=he[0]<<24,ee|=he[1]<<16,ee|=he[2]<<8,ee|=he[3];var b=K.inflate(ee);R===He&&(D=b)}}if(K.setInput(null),D!==null){for(var V="",$=0;$<D.length;$++)V+=String.fromCharCode(D[$]);D=V,D=(0,_.decodeUTF8)(D),D.length>0&&D.charAt(D.length-1)==="\0"&&(D=D.slice(0,-1)),D=D.replace(`\r
`,`
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:D}}))}}else return this._fail("Unexpected action in extended clipboard message: "+ge)}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(),X=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",X,9))return!1;X>64&&(C.Warn("Bad payload length ("+X+") in fence response"),X=64);var O=this._sock.rQshiftStr(X);return this._supportsFence=!0,F&1<<31?(F&=3,ue.messages.clientFence(this._sock,F,O),!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(),X=this._sock.rQshift8();switch(X){case 0:C.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=F,C.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+X+")");break}return!0}},{key:"_normalMsg",value:function(){var F;this._FBU.rects>0?F=0:F=this._sock.rQshift8();var X,O;switch(F){case 0:return O=this._framebufferUpdate(),O&&!this._enabledContinuousUpdates&&ue.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),O;case 1:return this._handleSetColourMapMsg();case 2:return C.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return X=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,X&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),C.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+F+")"),C.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 p.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case p.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case p.encodings.pseudoEncodingCursor:return this._handleCursor();case p.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var F=document.createEvent("keyboardEvent");F.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(X){}return!0;case p.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case p.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case p.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var F=this._FBU.x,X=this._FBU.y,O=this._FBU.width,G=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var ge=this._sock.rQshift8();this._sock.rQshift8();var xe,Ee=4;if(ge==0){var I=-256;if(xe=new Array(O*G*Ee),this._sock.rQwait("VMware cursor classic encoding",O*G*Ee*2,2))return!1;for(var le=new Array(O*G),fe=0;fe<O*G;fe++)le[fe]=this._sock.rQshift32();for(var Se=new Array(O*G),we=0;we<O*G;we++)Se[we]=this._sock.rQshift32();for(var K=0;K<O*G;K++)if(le[K]==0){var D=Se[K],z=D>>8&255,R=D>>16&255,ee=D>>24&255;xe[K*Ee]=z,xe[K*Ee+1]=R,xe[K*Ee+2]=ee,xe[K*Ee+3]=255}else(le[K]&I)==I?Se[K]==0?(xe[K*Ee]=0,xe[K*Ee+1]=0,xe[K*Ee+2]=0,xe[K*Ee+3]=0):((Se[K]&I)==I,xe[K*Ee]=0,xe[K*Ee+1]=0,xe[K*Ee+2]=0,xe[K*Ee+3]=255):(xe[K*Ee]=0,xe[K*Ee+1]=0,xe[K*Ee+2]=0,xe[K*Ee+3]=255)}else if(ge==1){if(this._sock.rQwait("VMware cursor alpha encoding",O*G*4,2))return!1;xe=new Array(O*G*Ee);for(var he=0;he<O*G;he++){var b=this._sock.rQshift32();xe[he*4]=b>>24&255,xe[he*4+1]=b>>16&255,xe[he*4+2]=b>>8&255,xe[he*4+3]=b&255}}else return C.Warn("The given cursor type is not supported: "+ge+" given."),!1;return this._updateCursor(xe,F,X,O,G),!0}},{key:"_handleCursor",value:function(){var F=this._FBU.x,X=this._FBU.y,O=this._FBU.width,G=this._FBU.height,ge=O*G*4,xe=Math.ceil(O/8)*G,Ee=ge+xe;if(this._sock.rQwait("cursor encoding",Ee))return!1;for(var I=this._sock.rQshiftBytes(ge),le=this._sock.rQshiftBytes(xe),fe=new Uint8Array(O*G*4),Se=0,we=0;we<G;we++)for(var K=0;K<O;K++){var D=we*Math.ceil(O/8)+Math.floor(K/8),z=le[D]<<K%8&128?255:0;fe[Se]=I[Se+2],fe[Se+1]=I[Se+1],fe[Se+2]=I[Se],fe[Se+3]=z,Se+=4}return this._updateCursor(fe,F,X,O,G),!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 X=this._sock.rQshiftStr(F);return X=(0,_.decodeUTF8)(X,!0),this._setDesktopName(X),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var F=this._sock.rQpeek8(),X=4+F*16;if(this._sock.rQwait("ExtendedDesktopSize",X))return!1;var O=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,O&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var G=0;G<F;G+=1)G===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 ge="";switch(this._FBU.y){case 1:ge="Resize is administratively prohibited";break;case 2:ge="Out of resources";break;case 3:ge="Invalid screen layout";break;default:ge="Unknown reason";break}C.Warn("Server did not accept the resize request: "+ge)}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(X){return this._fail("Error decoding rect: "+X),!1}}},{key:"_updateContinuousUpdates",value:function(){this._enabledContinuousUpdates&&ue.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(F,X){this._fbWidth=F,this._fbHeight=X,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(F,X){this._rfbXvpVer<F||(C.Info("Sending XVP operation "+X+" (version "+F+")"),ue.messages.xvpOp(this._sock,F,X))}},{key:"_updateCursor",value:function(F,X,O,G,ge){this._cursorImage={rgbaPixels:F,hotx:X,hoty:O,w:G,h:ge},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()?ue.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){C.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){C.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){C.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,X){var O=F.split("").map(function(G){return G.charCodeAt(0)});return new c.default(O).encrypt(X)}}]),ue}(r.default);L.Z=de,de.messages={keyEvent:function(oe,ue,q){var F=oe._sQ,X=oe._sQlen;F[X]=4,F[X+1]=q,F[X+2]=0,F[X+3]=0,F[X+4]=ue>>24,F[X+5]=ue>>16,F[X+6]=ue>>8,F[X+7]=ue,oe._sQlen+=8,oe.flush()},QEMUExtendedKeyEvent:function(oe,ue,q,F){function X(xe){var Ee=F>>8,I=F&255;return Ee===224&&I<127?I|128:xe}var O=oe._sQ,G=oe._sQlen;O[G]=255,O[G+1]=0,O[G+2]=q>>8,O[G+3]=q,O[G+4]=ue>>24,O[G+5]=ue>>16,O[G+6]=ue>>8,O[G+7]=ue;var ge=X(F);O[G+8]=ge>>24,O[G+9]=ge>>16,O[G+10]=ge>>8,O[G+11]=ge,oe._sQlen+=12,oe.flush()},pointerEvent:function(oe,ue,q,F){var X=oe._sQ,O=oe._sQlen;X[O]=5,X[O+1]=F,X[O+2]=ue>>8,X[O+3]=ue,X[O+4]=q>>8,X[O+5]=q,oe._sQlen+=6,oe.flush()},_buildExtendedClipboardFlags:function(oe,ue){for(var q=new Uint8Array(4),F=0,X=0,O=0;O<oe.length;O++)X|=oe[O];for(var G=0;G<ue.length;G++)F|=ue[G];return q[0]=X>>24,q[1]=0,q[2]=0,q[3]=F,q},extendedClipboardProvide:function(oe,ue,q){for(var F=new e.default,X=[],O=0;O<ue.length;O++){if(ue[O]!=He)throw new Error("Unsupported extended clipboard format for Provide message.");q[O]=q[O].replace(/\r\n|\r|\n/gm,`\r
`);var G=(0,_.encodeUTF8)(q[O]+"\0");X.push(G.length>>24&255,G.length>>16&255,G.length>>8&255,G.length&255);for(var ge=0;ge<G.length;ge++)X.push(G.charCodeAt(ge))}var xe=F.deflate(new Uint8Array(X)),Ee=new Uint8Array(4+xe.length);Ee.set(de.messages._buildExtendedClipboardFlags([ve],ue)),Ee.set(xe,4),de.messages.clientCutText(oe,Ee,!0)},extendedClipboardNotify:function(oe,ue){var q=de.messages._buildExtendedClipboardFlags([te],ue);de.messages.clientCutText(oe,q,!0)},extendedClipboardRequest:function(oe,ue){var q=de.messages._buildExtendedClipboardFlags([We],ue);de.messages.clientCutText(oe,q,!0)},extendedClipboardCaps:function(oe,ue,q){var F=Object.keys(q),X=new Uint8Array(4+4*F.length);F.map(function(ge){return parseInt(ge)}),F.sort(function(ge,xe){return ge-xe}),X.set(de.messages._buildExtendedClipboardFlags(ue,[]));for(var O=4,G=0;G<F.length;G++)X[O]=q[F[G]]>>24,X[O+1]=q[F[G]]>>16,X[O+2]=q[F[G]]>>8,X[O+3]=q[F[G]]>>0,O+=4,X[3]|=1<<F[G];de.messages.clientCutText(oe,X,!0)},clientCutText:function(oe,ue){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,F=oe._sQ,X=oe._sQlen;F[X]=6,F[X+1]=0,F[X+2]=0,F[X+3]=0;var O;q?O=(0,y.toUnsigned32bit)(-ue.length):O=ue.length,F[X+4]=O>>24,F[X+5]=O>>16,F[X+6]=O>>8,F[X+7]=O,oe._sQlen+=8;for(var G=0,ge=ue.length;ge>0;){for(var xe=Math.min(ge,oe._sQbufferSize-oe._sQlen),Ee=0;Ee<xe;Ee++)F[oe._sQlen+Ee]=ue[G+Ee];oe._sQlen+=xe,oe.flush(),ge-=xe,G+=xe}},setDesktopSize:function(oe,ue,q,F,X){var O=oe._sQ,G=oe._sQlen;O[G]=251,O[G+1]=0,O[G+2]=ue>>8,O[G+3]=ue,O[G+4]=q>>8,O[G+5]=q,O[G+6]=1,O[G+7]=0,O[G+8]=F>>24,O[G+9]=F>>16,O[G+10]=F>>8,O[G+11]=F,O[G+12]=0,O[G+13]=0,O[G+14]=0,O[G+15]=0,O[G+16]=ue>>8,O[G+17]=ue,O[G+18]=q>>8,O[G+19]=q,O[G+20]=X>>24,O[G+21]=X>>16,O[G+22]=X>>8,O[G+23]=X,oe._sQlen+=24,oe.flush()},clientFence:function(oe,ue,q){var F=oe._sQ,X=oe._sQlen;F[X]=248,F[X+1]=0,F[X+2]=0,F[X+3]=0,F[X+4]=ue>>24,F[X+5]=ue>>16,F[X+6]=ue>>8,F[X+7]=ue;var O=q.length;F[X+8]=O;for(var G=0;G<O;G++)F[X+9+G]=q.charCodeAt(G);oe._sQlen+=9+O,oe.flush()},enableContinuousUpdates:function(oe,ue,q,F,X,O){var G=oe._sQ,ge=oe._sQlen;G[ge]=150,G[ge+1]=ue,G[ge+2]=q>>8,G[ge+3]=q,G[ge+4]=F>>8,G[ge+5]=F,G[ge+6]=X>>8,G[ge+7]=X,G[ge+8]=O>>8,G[ge+9]=O,oe._sQlen+=10,oe.flush()},pixelFormat:function(oe,ue,q){var F=oe._sQ,X=oe._sQlen,O;ue>16?O=32:ue>8?O=16:O=8;var G=Math.floor(ue/3);F[X]=0,F[X+1]=0,F[X+2]=0,F[X+3]=0,F[X+4]=O,F[X+5]=ue,F[X+6]=0,F[X+7]=q?1:0,F[X+8]=0,F[X+9]=(1<<G)-1,F[X+10]=0,F[X+11]=(1<<G)-1,F[X+12]=0,F[X+13]=(1<<G)-1,F[X+14]=G*2,F[X+15]=G*1,F[X+16]=G*0,F[X+17]=0,F[X+18]=0,F[X+19]=0,oe._sQlen+=20,oe.flush()},clientEncodings:function(oe,ue){var q=oe._sQ,F=oe._sQlen;q[F]=2,q[F+1]=0,q[F+2]=ue.length>>8,q[F+3]=ue.length;for(var X=F+4,O=0;O<ue.length;O++){var G=ue[O];q[X]=G>>24,q[X+1]=G>>16,q[X+2]=G>>8,q[X+3]=G,X+=4}oe._sQlen+=X-F,oe.flush()},fbUpdateRequest:function(oe,ue,q,F,X,O){var G=oe._sQ,ge=oe._sQlen;typeof q=="undefined"&&(q=0),typeof F=="undefined"&&(F=0),G[ge]=3,G[ge+1]=ue?1:0,G[ge+2]=q>>8&255,G[ge+3]=q&255,G[ge+4]=F>>8&255,G[ge+5]=F&255,G[ge+6]=X>>8&255,G[ge+7]=X&255,G[ge+8]=O>>8&255,G[ge+9]=O&255,oe._sQlen+=10,oe.flush()},xvpOp:function(oe,ue,q){var F=oe._sQ,X=oe._sQlen;F[X]=250,F[X+1]=0,F[X+2]=ue,F[X+3]=q,oe._sQlen+=4,oe.flush()}},de.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(Le,L,a){"use strict";function f(w){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(T){return typeof T}:f=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},f(w)}Object.defineProperty(L,"__esModule",{value:!0}),L.isMac=v,L.isWindows=S,L.isIOS=p,L.isSafari=m,L.isIE=g,L.isEdge=x,L.isFirefox=k,L.hasScrollbarGutter=L.supportsImageMetadata=L.supportsCursorURIs=L.dragThreshold=L.isTouchDevice=void 0;var y=_(a(37095));function C(){if(typeof WeakMap!="function")return null;var w=new WeakMap;return C=function(){return w},w}function _(w){if(w&&w.__esModule)return w;if(w===null||f(w)!=="object"&&typeof w!="function")return{default:w};var E=C();if(E&&E.has(w))return E.get(w);var T={},A=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var B in w)if(Object.prototype.hasOwnProperty.call(w,B)){var j=A?Object.getOwnPropertyDescriptor(w,B):null;j&&(j.get||j.set)?Object.defineProperty(T,B,j):T[B]=w[B]}return T.default=w,E&&E.set(w,T),T}var o=!1;L.isTouchDevice=o,window.addEventListener("touchstart",function(){},!1);var u=10*(window.devicePixelRatio||1);L.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?(y.Info("Data URI scheme cursor supported"),d=!0):y.Warn("Data URI scheme cursor not supported")}catch(w){y.Error("Data URI scheme cursor test exception: "+w)}var i=d;L.supportsCursorURIs=i;var s=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),s=!0}catch(w){}var e=s;L.supportsImageMetadata=e;var h=!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 l=t.offsetWidth-n.offsetWidth;t.parentNode.removeChild(t),h=l!=0}catch(w){y.Error("Scrollbar test exception: "+w)}var c=h;L.hasScrollbarGutter=c;function v(){return navigator&&!!/mac/i.exec(navigator.platform)}function S(){return navigator&&!!/win/i.exec(navigator.platform)}function p(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function m(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function g(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function x(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function k(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},87975:function(Le,L,a){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var f=a(58863);function y(d,r){if(!(d instanceof r))throw new TypeError("Cannot call a class as a function")}function C(d,r){for(var i=0;i<r.length;i++){var s=r[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}function _(d,r,i){return r&&C(d.prototype,r),i&&C(d,i),d}var o=!f.supportsCursorURIs||f.isTouchDevice,u=function(){function d(){y(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 _(d,[{key:"attach",value:function(i){if(this._target&&this.detach(),this._target=i,o){document.body.appendChild(this._canvas);var s={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,s),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,s),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,s),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,s)}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,s,e,h,t){if(h===0||t===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-s,this._position.y=this._position.y+this._hotSpot.y-e,this._hotSpot.x=s,this._hotSpot.y=e;var n=this._canvas.getContext("2d");this._canvas.width=h,this._canvas.height=t;var l;try{l=new ImageData(new Uint8ClampedArray(i),h,t)}catch(v){l=n.createImageData(h,t),l.data.set(new Uint8ClampedArray(i))}if(n.clearRect(0,0,h,t),n.putImageData(l,0,0),o)this._updatePosition();else{var c=this._canvas.toDataURL();this._target.style.cursor="url("+c+")"+s+" "+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,s){if(o){window.visualViewport?(this._position.x=i+window.visualViewport.offsetLeft,this._position.y=s+window.visualViewport.offsetTop):(this._position.x=i,this._position.y=s),this._updatePosition();var e=document.elementFromPoint(i,s);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 s=this,e=document.elementFromPoint(i.clientX,i.clientY);this._updateVisibility(e),this._captureIsActive()&&window.setTimeout(function(){s._target&&(e=document.elementFromPoint(i.clientX,i.clientY),s._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}();L.default=u},80957:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.clientToElement=a;function a(f,y,C){var _=C.getBoundingClientRect(),o={x:0,y:0};return f<_.left?o.x=0:f>=_.right?o.x=_.width-1:o.x=f-_.left,y<_.top?o.y=0:y>=_.bottom?o.y=_.height-1:o.y=y-_.top,o}},32466:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.getPointerEvent=a,L.stopEvent=f,L.setCapture=d,L.releaseCapture=r;function a(i){return i.changedTouches?i.changedTouches[0]:i.touches?i.touches[0]:i}function f(i){i.stopPropagation(),i.preventDefault()}var y=!1,C=null;document.captureElement=null;function _(i){if(!y){var s=new i.constructor(i.type,i);y=!0,document.captureElement?document.captureElement.dispatchEvent(s):C.dispatchEvent(s),y=!1,i.stopPropagation(),s.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 s=document.getElementById("noVNC_mouse_capture_elem");s===null&&(s=document.createElement("div"),s.id="noVNC_mouse_capture_elem",s.style.position="fixed",s.style.top="0px",s.style.left="0px",s.style.width="100%",s.style.height="100%",s.style.zIndex=1e4,s.style.display="none",document.body.appendChild(s),s.addEventListener("contextmenu",_),s.addEventListener("mousemove",_),s.addEventListener("mouseup",_)),document.captureElement=i,u.observe(i,{attributes:!0}),o(),s.style.display="",window.addEventListener("mousemove",_),window.addEventListener("mouseup",_)}}function r(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;C=document.captureElement,document.captureElement=null,u.disconnect();var i=document.getElementById("noVNC_mouse_capture_elem");i.style.display="none",window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",_)}}},45458:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;function a(_,o){if(!(_ instanceof o))throw new TypeError("Cannot call a class as a function")}function f(_,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(_,d.key,d)}}function y(_,o,u){return o&&f(_.prototype,o),u&&f(_,u),_}var C=function(){function _(){a(this,_),this._listeners=new Map}return y(_,[{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}}]),_}();L.default=C},77676:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.toUnsigned32bit=a,L.toSigned32bit=f;function a(y){return y>>>0}function f(y){return y|0}},37095:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.initLogging=o,L.getLogging=u,L.Error=L.Warn=L.Info=L.Debug=void 0;var a="warn",f=function(){};L.Debug=f;var y=function(){};L.Info=y;var C=function(){};L.Warn=C;var _=function(){};L.Error=_;function o(d){if(typeof d=="undefined"?d=a:a=d,L.Debug=f=L.Info=y=L.Warn=C=L.Error=_=function(){},typeof window.console!="undefined")switch(d){case"debug":L.Debug=f=console.debug.bind(window.console);case"info":L.Info=y=console.info.bind(window.console);case"warn":L.Warn=C=console.warn.bind(window.console);case"error":L.Error=_=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+d+"'")}}function u(){return a}o()},21146:function(){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(L,a){"use strict";if(L==null)throw new TypeError("Cannot convert undefined or null to object");for(var f=Object(L),y=1;y<arguments.length;y++){var C=arguments[y];if(C!=null)for(var _ in C)Object.prototype.hasOwnProperty.call(C,_)&&(f[_]=C[_])}return f},writable:!0,configurable:!0}),function(){function Le(L,a){a=a||{bubbles:!1,cancelable:!1,detail:void 0};var f=document.createEvent("CustomEvent");return f.initCustomEvent(L,a.bubbles,a.cancelable,a.detail),f}Le.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=Le)}(),Number.isInteger=Number.isInteger||function(L){return typeof L=="number"&&isFinite(L)&&Math.floor(L)===L}},38955:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.decodeUTF8=a,L.encodeUTF8=f;function a(y){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(y))}catch(_){if(_ instanceof URIError&&C)return y;throw _}}function f(y){return unescape(encodeURIComponent(y))}},21437:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.shrinkBuf=a,L.arraySet=f,L.flattenChunks=y,L.Buf32=L.Buf16=L.Buf8=void 0;function a(u,d){return u.length===d?u:u.subarray?u.subarray(0,d):(u.length=d,u)}function f(u,d,r,i,s){if(d.subarray&&u.subarray){u.set(d.subarray(r,r+i),s);return}for(var e=0;e<i;e++)u[s+e]=d[r+e]}function y(u){var d,r,i,s,e,h;for(i=0,d=0,r=u.length;d<r;d++)i+=u[d].length;for(h=new Uint8Array(i),s=0,d=0,r=u.length;d<r;d++)e=u[d],h.set(e,s),s+=e.length;return h}var C=Uint8Array;L.Buf8=C;var _=Uint16Array;L.Buf16=_;var o=Int32Array;L.Buf32=o},324:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=a;function a(f,y,C,_){for(var o=f&65535|0,u=f>>>16&65535|0,d=0;C!==0;){d=C>2e3?2e3:C,C-=d;do o=o+y[_++]|0,u=u+o|0;while(--d);o%=65521,u%=65521}return o|u<<16|0}},2895:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=a;function a(){for(var C,_=[],o=0;o<256;o++){C=o;for(var u=0;u<8;u++)C=C&1?3988292384^C>>>1:C>>>1;_[o]=C}return _}var f=a();function y(C,_,o,u){var d=f,r=u+o;C^=-1;for(var i=u;i<r;i++)C=C>>>8^d[(C^_[i])&255];return C^-1}},8293:function(Le,L,a){"use strict";function f(b){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function($){return typeof $}:f=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},f(b)}Object.defineProperty(L,"__esModule",{value:!0}),L.deflateInit=D,L.deflateInit2=K,L.deflateReset=Se,L.deflateResetKeep=fe,L.deflateSetHeader=we,L.deflate=z,L.deflateEnd=R,L.deflateSetDictionary=ee,L.deflateInfo=L.Z_DEFLATED=L.Z_UNKNOWN=L.Z_DEFAULT_STRATEGY=L.Z_FIXED=L.Z_RLE=L.Z_HUFFMAN_ONLY=L.Z_FILTERED=L.Z_DEFAULT_COMPRESSION=L.Z_BUF_ERROR=L.Z_DATA_ERROR=L.Z_STREAM_ERROR=L.Z_STREAM_END=L.Z_OK=L.Z_BLOCK=L.Z_FINISH=L.Z_FULL_FLUSH=L.Z_PARTIAL_FLUSH=L.Z_NO_FLUSH=void 0;var y=i(a(21437)),C=i(a(4500)),_=d(a(324)),o=d(a(2895)),u=d(a(41020));function d(b){return b&&b.__esModule?b:{default:b}}function r(){if(typeof WeakMap!="function")return null;var b=new WeakMap;return r=function(){return b},b}function i(b){if(b&&b.__esModule)return b;if(b===null||f(b)!=="object"&&typeof b!="function")return{default:b};var V=r();if(V&&V.has(b))return V.get(b);var $={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in b)if(Object.prototype.hasOwnProperty.call(b,U)){var J=M?Object.getOwnPropertyDescriptor(b,U):null;J&&(J.get||J.set)?Object.defineProperty($,U,J):$[U]=b[U]}return $.default=b,V&&V.set(b,$),$}var s=0;L.Z_NO_FLUSH=s;var e=1;L.Z_PARTIAL_FLUSH=e;var h=3;L.Z_FULL_FLUSH=h;var t=4;L.Z_FINISH=t;var n=5;L.Z_BLOCK=n;var l=0;L.Z_OK=l;var c=1;L.Z_STREAM_END=c;var v=-2;L.Z_STREAM_ERROR=v;var S=-3;L.Z_DATA_ERROR=S;var p=-5;L.Z_BUF_ERROR=p;var m=-1;L.Z_DEFAULT_COMPRESSION=m;var g=1;L.Z_FILTERED=g;var x=2;L.Z_HUFFMAN_ONLY=x;var k=3;L.Z_RLE=k;var w=4;L.Z_FIXED=w;var E=0;L.Z_DEFAULT_STRATEGY=E;var T=2;L.Z_UNKNOWN=T;var A=8;L.Z_DEFLATED=A;var B=9,j=15,ye=8,re=29,ce=256,P=ce+1+re,N=30,H=19,Y=2*P+1,W=15,ie=3,me=258,De=me+ie+1,ze=32,je=42,_e=69,ke=73,Ie=91,Te=103,Ne=113,$e=666,He=1,rt=2,Me=3,Ye=4,Oe=3;function Ue(b,V){return b.msg=u.default[V],V}function We(b){return(b<<1)-(b>4?9:0)}function Q(b){for(var V=b.length;--V>=0;)b[V]=0}function te(b){var V=b.state,$=V.pending;$>b.avail_out&&($=b.avail_out),$!==0&&(y.arraySet(b.output,V.pending_buf,V.pending_out,$,b.next_out),b.next_out+=$,V.pending_out+=$,b.total_out+=$,b.avail_out-=$,V.pending-=$,V.pending===0&&(V.pending_out=0))}function ve(b,V){C._tr_flush_block(b,b.block_start>=0?b.block_start:-1,b.strstart-b.block_start,V),b.block_start=b.strstart,te(b.strm)}function de(b,V){b.pending_buf[b.pending++]=V}function ae(b,V){b.pending_buf[b.pending++]=V>>>8&255,b.pending_buf[b.pending++]=V&255}function oe(b,V,$,M){var U=b.avail_in;return U>M&&(U=M),U===0?0:(b.avail_in-=U,y.arraySet(V,b.input,b.next_in,U,$),b.state.wrap===1?b.adler=(0,_.default)(b.adler,V,U,$):b.state.wrap===2&&(b.adler=(0,o.default)(b.adler,V,U,$)),b.next_in+=U,b.total_in+=U,U)}function ue(b,V){var $=b.max_chain_length,M=b.strstart,U,J,Ae=b.prev_length,Ce=b.nice_match,be=b.strstart>b.w_size-De?b.strstart-(b.w_size-De):0,Xe=b.window,Ve=b.w_mask,Re=b.prev,Fe=b.strstart+me,qe=Xe[M+Ae-1],Ke=Xe[M+Ae];b.prev_length>=b.good_match&&($>>=2),Ce>b.lookahead&&(Ce=b.lookahead);do if(U=V,!(Xe[U+Ae]!==Ke||Xe[U+Ae-1]!==qe||Xe[U]!==Xe[M]||Xe[++U]!==Xe[M+1])){M+=2,U++;do;while(Xe[++M]===Xe[++U]&&Xe[++M]===Xe[++U]&&Xe[++M]===Xe[++U]&&Xe[++M]===Xe[++U]&&Xe[++M]===Xe[++U]&&Xe[++M]===Xe[++U]&&Xe[++M]===Xe[++U]&&Xe[++M]===Xe[++U]&&M<Fe);if(J=me-(Fe-M),M=Fe-me,J>Ae){if(b.match_start=V,Ae=J,J>=Ce)break;qe=Xe[M+Ae-1],Ke=Xe[M+Ae]}}while((V=Re[V&Ve])>be&&--$!==0);return Ae<=b.lookahead?Ae:b.lookahead}function q(b){var V=b.w_size,$,M,U,J,Ae;do{if(J=b.window_size-b.lookahead-b.strstart,b.strstart>=V+(V-De)){y.arraySet(b.window,b.window,V,V,0),b.match_start-=V,b.strstart-=V,b.block_start-=V,M=b.hash_size,$=M;do U=b.head[--$],b.head[$]=U>=V?U-V:0;while(--M);M=V,$=M;do U=b.prev[--$],b.prev[$]=U>=V?U-V:0;while(--M);J+=V}if(b.strm.avail_in===0)break;if(M=oe(b.strm,b.window,b.strstart+b.lookahead,J),b.lookahead+=M,b.lookahead+b.insert>=ie)for(Ae=b.strstart-b.insert,b.ins_h=b.window[Ae],b.ins_h=(b.ins_h<<b.hash_shift^b.window[Ae+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[Ae+ie-1])&b.hash_mask,b.prev[Ae&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=Ae,Ae++,b.insert--,!(b.lookahead+b.insert<ie)););}while(b.lookahead<De&&b.strm.avail_in!==0)}function F(b,V){var $=65535;for($>b.pending_buf_size-5&&($=b.pending_buf_size-5);;){if(b.lookahead<=1){if(q(b),b.lookahead===0&&V===s)return He;if(b.lookahead===0)break}b.strstart+=b.lookahead,b.lookahead=0;var M=b.block_start+$;if((b.strstart===0||b.strstart>=M)&&(b.lookahead=b.strstart-M,b.strstart=M,ve(b,!1),b.strm.avail_out===0)||b.strstart-b.block_start>=b.w_size-De&&(ve(b,!1),b.strm.avail_out===0))return He}return b.insert=0,V===t?(ve(b,!0),b.strm.avail_out===0?Me:Ye):(b.strstart>b.block_start&&(ve(b,!1),b.strm.avail_out===0),He)}function X(b,V){for(var $,M;;){if(b.lookahead<De){if(q(b),b.lookahead<De&&V===s)return He;if(b.lookahead===0)break}if($=0,b.lookahead>=ie&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+ie-1])&b.hash_mask,$=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),$!==0&&b.strstart-$<=b.w_size-De&&(b.match_length=ue(b,$)),b.match_length>=ie)if(M=C._tr_tally(b,b.strstart-b.match_start,b.match_length-ie),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=ie){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+ie-1])&b.hash_mask,$=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(--b.match_length!==0);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else M=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(M&&(ve(b,!1),b.strm.avail_out===0))return He}return b.insert=b.strstart<ie-1?b.strstart:ie-1,V===t?(ve(b,!0),b.strm.avail_out===0?Me:Ye):b.last_lit&&(ve(b,!1),b.strm.avail_out===0)?He:rt}function O(b,V){for(var $,M,U;;){if(b.lookahead<De){if(q(b),b.lookahead<De&&V===s)return He;if(b.lookahead===0)break}if($=0,b.lookahead>=ie&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+ie-1])&b.hash_mask,$=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=ie-1,$!==0&&b.prev_length<b.max_lazy_match&&b.strstart-$<=b.w_size-De&&(b.match_length=ue(b,$),b.match_length<=5&&(b.strategy===g||b.match_length===ie&&b.strstart-b.match_start>4096)&&(b.match_length=ie-1)),b.prev_length>=ie&&b.match_length<=b.prev_length){U=b.strstart+b.lookahead-ie,M=C._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-ie),b.lookahead-=b.prev_length-1,b.prev_length-=2;do++b.strstart<=U&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+ie-1])&b.hash_mask,$=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(--b.prev_length!==0);if(b.match_available=0,b.match_length=ie-1,b.strstart++,M&&(ve(b,!1),b.strm.avail_out===0))return He}else if(b.match_available){if(M=C._tr_tally(b,0,b.window[b.strstart-1]),M&&ve(b,!1),b.strstart++,b.lookahead--,b.strm.avail_out===0)return He}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(M=C._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<ie-1?b.strstart:ie-1,V===t?(ve(b,!0),b.strm.avail_out===0?Me:Ye):b.last_lit&&(ve(b,!1),b.strm.avail_out===0)?He:rt}function G(b,V){for(var $,M,U,J,Ae=b.window;;){if(b.lookahead<=me){if(q(b),b.lookahead<=me&&V===s)return He;if(b.lookahead===0)break}if(b.match_length=0,b.lookahead>=ie&&b.strstart>0&&(U=b.strstart-1,M=Ae[U],M===Ae[++U]&&M===Ae[++U]&&M===Ae[++U])){J=b.strstart+me;do;while(M===Ae[++U]&&M===Ae[++U]&&M===Ae[++U]&&M===Ae[++U]&&M===Ae[++U]&&M===Ae[++U]&&M===Ae[++U]&&M===Ae[++U]&&U<J);b.match_length=me-(J-U),b.match_length>b.lookahead&&(b.match_length=b.lookahead)}if(b.match_length>=ie?($=C._tr_tally(b,1,b.match_length-ie),b.lookahead-=b.match_length,b.strstart+=b.match_length,b.match_length=0):($=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++),$&&(ve(b,!1),b.strm.avail_out===0))return He}return b.insert=0,V===t?(ve(b,!0),b.strm.avail_out===0?Me:Ye):b.last_lit&&(ve(b,!1),b.strm.avail_out===0)?He:rt}function ge(b,V){for(var $;;){if(b.lookahead===0&&(q(b),b.lookahead===0)){if(V===s)return He;break}if(b.match_length=0,$=C._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++,$&&(ve(b,!1),b.strm.avail_out===0))return He}return b.insert=0,V===t?(ve(b,!0),b.strm.avail_out===0?Me:Ye):b.last_lit&&(ve(b,!1),b.strm.avail_out===0)?He:rt}function xe(b,V,$,M,U){this.good_length=b,this.max_lazy=V,this.nice_length=$,this.max_chain=M,this.func=U}var Ee;Ee=[new xe(0,0,0,0,F),new xe(4,4,8,4,X),new xe(4,5,16,8,X),new xe(4,6,32,32,X),new xe(4,4,16,16,O),new xe(8,16,32,32,O),new xe(8,16,128,128,O),new xe(8,32,128,256,O),new xe(32,128,258,1024,O),new xe(32,258,258,4096,O)];function I(b){b.window_size=2*b.w_size,Q(b.head),b.max_lazy_match=Ee[b.level].max_lazy,b.good_match=Ee[b.level].good_length,b.nice_match=Ee[b.level].nice_length,b.max_chain_length=Ee[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=ie-1,b.match_available=0,b.ins_h=0}function le(){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=A,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 y.Buf16(Y*2),this.dyn_dtree=new y.Buf16((2*N+1)*2),this.bl_tree=new y.Buf16((2*H+1)*2),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new y.Buf16(W+1),this.heap=new y.Buf16(2*P+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new y.Buf16(2*P+1),Q(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 fe(b){var V;return!b||!b.state?Ue(b,v):(b.total_in=b.total_out=0,b.data_type=T,V=b.state,V.pending=0,V.pending_out=0,V.wrap<0&&(V.wrap=-V.wrap),V.status=V.wrap?je:Ne,b.adler=V.wrap===2?0:1,V.last_flush=s,C._tr_init(V),l)}function Se(b){var V=fe(b);return V===l&&I(b.state),V}function we(b,V){return!b||!b.state||b.state.wrap!==2?v:(b.state.gzhead=V,l)}function K(b,V,$,M,U,J){if(!b)return v;var Ae=1;if(V===m&&(V=6),M<0?(Ae=0,M=-M):M>15&&(Ae=2,M-=16),U<1||U>B||$!==A||M<8||M>15||V<0||V>9||J<0||J>w)return Ue(b,v);M===8&&(M=9);var Ce=new le;return b.state=Ce,Ce.strm=b,Ce.wrap=Ae,Ce.gzhead=null,Ce.w_bits=M,Ce.w_size=1<<Ce.w_bits,Ce.w_mask=Ce.w_size-1,Ce.hash_bits=U+7,Ce.hash_size=1<<Ce.hash_bits,Ce.hash_mask=Ce.hash_size-1,Ce.hash_shift=~~((Ce.hash_bits+ie-1)/ie),Ce.window=new y.Buf8(Ce.w_size*2),Ce.head=new y.Buf16(Ce.hash_size),Ce.prev=new y.Buf16(Ce.w_size),Ce.lit_bufsize=1<<U+6,Ce.pending_buf_size=Ce.lit_bufsize*4,Ce.pending_buf=new y.Buf8(Ce.pending_buf_size),Ce.d_buf=1*Ce.lit_bufsize,Ce.l_buf=3*Ce.lit_bufsize,Ce.level=V,Ce.strategy=J,Ce.method=$,Se(b)}function D(b,V){return K(b,V,A,j,ye,E)}function z(b,V){var $,M,U,J;if(!b||!b.state||V>n||V<0)return b?Ue(b,v):v;if(M=b.state,!b.output||!b.input&&b.avail_in!==0||M.status===$e&&V!==t)return Ue(b,b.avail_out===0?p:v);if(M.strm=b,$=M.last_flush,M.last_flush=V,M.status===je)if(M.wrap===2)b.adler=0,de(M,31),de(M,139),de(M,8),M.gzhead?(de(M,(M.gzhead.text?1:0)+(M.gzhead.hcrc?2:0)+(M.gzhead.extra?4:0)+(M.gzhead.name?8:0)+(M.gzhead.comment?16:0)),de(M,M.gzhead.time&255),de(M,M.gzhead.time>>8&255),de(M,M.gzhead.time>>16&255),de(M,M.gzhead.time>>24&255),de(M,M.level===9?2:M.strategy>=x||M.level<2?4:0),de(M,M.gzhead.os&255),M.gzhead.extra&&M.gzhead.extra.length&&(de(M,M.gzhead.extra.length&255),de(M,M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(b.adler=(0,o.default)(b.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=_e):(de(M,0),de(M,0),de(M,0),de(M,0),de(M,0),de(M,M.level===9?2:M.strategy>=x||M.level<2?4:0),de(M,Oe),M.status=Ne);else{var Ae=A+(M.w_bits-8<<4)<<8,Ce=-1;M.strategy>=x||M.level<2?Ce=0:M.level<6?Ce=1:M.level===6?Ce=2:Ce=3,Ae|=Ce<<6,M.strstart!==0&&(Ae|=ze),Ae+=31-Ae%31,M.status=Ne,ae(M,Ae),M.strstart!==0&&(ae(M,b.adler>>>16),ae(M,b.adler&65535)),b.adler=1}if(M.status===_e)if(M.gzhead.extra){for(U=M.pending;M.gzindex<(M.gzhead.extra.length&65535)&&!(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>U&&(b.adler=(0,o.default)(b.adler,M.pending_buf,M.pending-U,U)),te(b),U=M.pending,M.pending===M.pending_buf_size));)de(M,M.gzhead.extra[M.gzindex]&255),M.gzindex++;M.gzhead.hcrc&&M.pending>U&&(b.adler=(0,o.default)(b.adler,M.pending_buf,M.pending-U,U)),M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=ke)}else M.status=ke;if(M.status===ke)if(M.gzhead.name){U=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>U&&(b.adler=(0,o.default)(b.adler,M.pending_buf,M.pending-U,U)),te(b),U=M.pending,M.pending===M.pending_buf_size)){J=1;break}M.gzindex<M.gzhead.name.length?J=M.gzhead.name.charCodeAt(M.gzindex++)&255:J=0,de(M,J)}while(J!==0);M.gzhead.hcrc&&M.pending>U&&(b.adler=(0,o.default)(b.adler,M.pending_buf,M.pending-U,U)),J===0&&(M.gzindex=0,M.status=Ie)}else M.status=Ie;if(M.status===Ie)if(M.gzhead.comment){U=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>U&&(b.adler=(0,o.default)(b.adler,M.pending_buf,M.pending-U,U)),te(b),U=M.pending,M.pending===M.pending_buf_size)){J=1;break}M.gzindex<M.gzhead.comment.length?J=M.gzhead.comment.charCodeAt(M.gzindex++)&255:J=0,de(M,J)}while(J!==0);M.gzhead.hcrc&&M.pending>U&&(b.adler=(0,o.default)(b.adler,M.pending_buf,M.pending-U,U)),J===0&&(M.status=Te)}else M.status=Te;if(M.status===Te&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&te(b),M.pending+2<=M.pending_buf_size&&(de(M,b.adler&255),de(M,b.adler>>8&255),b.adler=0,M.status=Ne)):M.status=Ne),M.pending!==0){if(te(b),b.avail_out===0)return M.last_flush=-1,l}else if(b.avail_in===0&&We(V)<=We($)&&V!==t)return Ue(b,p);if(M.status===$e&&b.avail_in!==0)return Ue(b,p);if(b.avail_in!==0||M.lookahead!==0||V!==s&&M.status!==$e){var be=M.strategy===x?ge(M,V):M.strategy===k?G(M,V):Ee[M.level].func(M,V);if((be===Me||be===Ye)&&(M.status=$e),be===He||be===Me)return b.avail_out===0&&(M.last_flush=-1),l;if(be===rt&&(V===e?C._tr_align(M):V!==n&&(C._tr_stored_block(M,0,0,!1),V===h&&(Q(M.head),M.lookahead===0&&(M.strstart=0,M.block_start=0,M.insert=0))),te(b),b.avail_out===0))return M.last_flush=-1,l}return V!==t?l:M.wrap<=0?c:(M.wrap===2?(de(M,b.adler&255),de(M,b.adler>>8&255),de(M,b.adler>>16&255),de(M,b.adler>>24&255),de(M,b.total_in&255),de(M,b.total_in>>8&255),de(M,b.total_in>>16&255),de(M,b.total_in>>24&255)):(ae(M,b.adler>>>16),ae(M,b.adler&65535)),te(b),M.wrap>0&&(M.wrap=-M.wrap),M.pending!==0?l:c)}function R(b){var V;return!b||!b.state?v:(V=b.state.status,V!==je&&V!==_e&&V!==ke&&V!==Ie&&V!==Te&&V!==Ne&&V!==$e?Ue(b,v):(b.state=null,V===Ne?Ue(b,S):l))}function ee(b,V){var $=V.length,M,U,J,Ae,Ce,be,Xe,Ve;if(!b||!b.state||(M=b.state,Ae=M.wrap,Ae===2||Ae===1&&M.status!==je||M.lookahead))return v;for(Ae===1&&(b.adler=(0,_.default)(b.adler,V,$,0)),M.wrap=0,$>=M.w_size&&(Ae===0&&(Q(M.head),M.strstart=0,M.block_start=0,M.insert=0),Ve=new y.Buf8(M.w_size),y.arraySet(Ve,V,$-M.w_size,M.w_size,0),V=Ve,$=M.w_size),Ce=b.avail_in,be=b.next_in,Xe=b.input,b.avail_in=$,b.next_in=0,b.input=V,q(M);M.lookahead>=ie;){U=M.strstart,J=M.lookahead-(ie-1);do M.ins_h=(M.ins_h<<M.hash_shift^M.window[U+ie-1])&M.hash_mask,M.prev[U&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=U,U++;while(--J);M.strstart=U,M.lookahead=ie-1,q(M)}return M.strstart+=M.lookahead,M.block_start=M.strstart,M.insert=M.lookahead,M.lookahead=0,M.match_length=M.prev_length=ie-1,M.match_available=0,b.next_in=be,b.input=Xe,b.avail_in=Ce,M.wrap=Ae,l}var he="pako deflate (from Nodeca project)";L.deflateInfo=he},61928:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=y;var a=30,f=12;function y(C,_){var o,u,d,r,i,s,e,h,t,n,l,c,v,S,p,m,g,x,k,w,E,T,A,B,j;o=C.state,u=C.next_in,B=C.input,d=u+(C.avail_in-5),r=C.next_out,j=C.output,i=r-(_-C.avail_out),s=r+(C.avail_out-257),e=o.dmax,h=o.wsize,t=o.whave,n=o.wnext,l=o.window,c=o.hold,v=o.bits,S=o.lencode,p=o.distcode,m=(1<<o.lenbits)-1,g=(1<<o.distbits)-1;e:do{v<15&&(c+=B[u++]<<v,v+=8,c+=B[u++]<<v,v+=8),x=S[c&m];t:for(;;){if(k=x>>>24,c>>>=k,v-=k,k=x>>>16&255,k===0)j[r++]=x&65535;else if(k&16){w=x&65535,k&=15,k&&(v<k&&(c+=B[u++]<<v,v+=8),w+=c&(1<<k)-1,c>>>=k,v-=k),v<15&&(c+=B[u++]<<v,v+=8,c+=B[u++]<<v,v+=8),x=p[c&g];r:for(;;){if(k=x>>>24,c>>>=k,v-=k,k=x>>>16&255,k&16){if(E=x&65535,k&=15,v<k&&(c+=B[u++]<<v,v+=8,v<k&&(c+=B[u++]<<v,v+=8)),E+=c&(1<<k)-1,E>e){C.msg="invalid distance too far back",o.mode=a;break e}if(c>>>=k,v-=k,k=r-i,E>k){if(k=E-k,k>t&&o.sane){C.msg="invalid distance too far back",o.mode=a;break e}if(T=0,A=l,n===0){if(T+=h-k,k<w){w-=k;do j[r++]=l[T++];while(--k);T=r-E,A=j}}else if(n<k){if(T+=h+n-k,k-=n,k<w){w-=k;do j[r++]=l[T++];while(--k);if(T=0,n<w){k=n,w-=k;do j[r++]=l[T++];while(--k);T=r-E,A=j}}}else if(T+=n-k,k<w){w-=k;do j[r++]=l[T++];while(--k);T=r-E,A=j}for(;w>2;)j[r++]=A[T++],j[r++]=A[T++],j[r++]=A[T++],w-=3;w&&(j[r++]=A[T++],w>1&&(j[r++]=A[T++]))}else{T=r-E;do j[r++]=j[T++],j[r++]=j[T++],j[r++]=j[T++],w-=3;while(w>2);w&&(j[r++]=j[T++],w>1&&(j[r++]=j[T++]))}}else if(k&64){C.msg="invalid distance code",o.mode=a;break e}else{x=p[(x&65535)+(c&(1<<k)-1)];continue r}break}}else if(k&64)if(k&32){o.mode=f;break e}else{C.msg="invalid literal/length code",o.mode=a;break e}else{x=S[(x&65535)+(c&(1<<k)-1)];continue t}break}}while(u<d&&r<s);w=v>>3,u-=w,v-=w<<3,c&=(1<<v)-1,C.next_in=u,C.next_out=r,C.avail_in=u<d?5+(d-u):5-(u-d),C.avail_out=r<s?257+(s-r):257-(r-s),o.hold=c,o.bits=v}},47169:function(Le,L,a){"use strict";function f(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(R){return typeof R}:f=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},f(D)}Object.defineProperty(L,"__esModule",{value:!0}),L.inflateReset=q,L.inflateReset2=F,L.inflateResetKeep=ue,L.inflateInit=O,L.inflateInit2=X,L.inflate=le,L.inflateEnd=fe,L.inflateGetHeader=Se,L.inflateSetDictionary=we,L.inflateInfo=L.Z_DEFLATED=L.Z_BUF_ERROR=L.Z_MEM_ERROR=L.Z_DATA_ERROR=L.Z_STREAM_ERROR=L.Z_NEED_DICT=L.Z_STREAM_END=L.Z_OK=L.Z_TREES=L.Z_BLOCK=L.Z_FINISH=void 0;var y=i(a(21437)),C=d(a(324)),_=d(a(2895)),o=d(a(61928)),u=d(a(27074));function d(D){return D&&D.__esModule?D:{default:D}}function r(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return r=function(){return D},D}function i(D){if(D&&D.__esModule)return D;if(D===null||f(D)!=="object"&&typeof D!="function")return{default:D};var z=r();if(z&&z.has(D))return z.get(D);var R={},ee=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var he in D)if(Object.prototype.hasOwnProperty.call(D,he)){var b=ee?Object.getOwnPropertyDescriptor(D,he):null;b&&(b.get||b.set)?Object.defineProperty(R,he,b):R[he]=D[he]}return R.default=D,z&&z.set(D,R),R}var s=0,e=1,h=2,t=4;L.Z_FINISH=t;var n=5;L.Z_BLOCK=n;var l=6;L.Z_TREES=l;var c=0;L.Z_OK=c;var v=1;L.Z_STREAM_END=v;var S=2;L.Z_NEED_DICT=S;var p=-2;L.Z_STREAM_ERROR=p;var m=-3;L.Z_DATA_ERROR=m;var g=-4;L.Z_MEM_ERROR=g;var x=-5;L.Z_BUF_ERROR=x;var k=8;L.Z_DEFLATED=k;var w=1,E=2,T=3,A=4,B=5,j=6,ye=7,re=8,ce=9,P=10,N=11,H=12,Y=13,W=14,ie=15,me=16,De=17,ze=18,je=19,_e=20,ke=21,Ie=22,Te=23,Ne=24,$e=25,He=26,rt=27,Me=28,Ye=29,Oe=30,Ue=31,We=32,Q=852,te=592,ve=15,de=ve;function ae(D){return(D>>>24&255)+(D>>>8&65280)+((D&65280)<<8)+((D&255)<<24)}function oe(){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 y.Buf16(320),this.work=new y.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ue(D){var z;return!D||!D.state?p:(z=D.state,D.total_in=D.total_out=z.total=0,D.msg="",z.wrap&&(D.adler=z.wrap&1),z.mode=w,z.last=0,z.havedict=0,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new y.Buf32(Q),z.distcode=z.distdyn=new y.Buf32(te),z.sane=1,z.back=-1,c)}function q(D){var z;return!D||!D.state?p:(z=D.state,z.wsize=0,z.whave=0,z.wnext=0,ue(D))}function F(D,z){var R,ee;return!D||!D.state||(ee=D.state,z<0?(R=0,z=-z):(R=(z>>4)+1,z<48&&(z&=15)),z&&(z<8||z>15))?p:(ee.window!==null&&ee.wbits!==z&&(ee.window=null),ee.wrap=R,ee.wbits=z,q(D))}function X(D,z){var R,ee;return D?(ee=new oe,D.state=ee,ee.window=null,R=F(D,z),R!==c&&(D.state=null),R):p}function O(D){return X(D,de)}var G=!0,ge,xe;function Ee(D){if(G){var z;for(ge=new y.Buf32(512),xe=new y.Buf32(32),z=0;z<144;)D.lens[z++]=8;for(;z<256;)D.lens[z++]=9;for(;z<280;)D.lens[z++]=7;for(;z<288;)D.lens[z++]=8;for((0,u.default)(e,D.lens,0,288,ge,0,D.work,{bits:9}),z=0;z<32;)D.lens[z++]=5;(0,u.default)(h,D.lens,0,32,xe,0,D.work,{bits:5}),G=!1}D.lencode=ge,D.lenbits=9,D.distcode=xe,D.distbits=5}function I(D,z,R,ee){var he,b=D.state;return b.window===null&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new y.Buf8(b.wsize)),ee>=b.wsize?(y.arraySet(b.window,z,R-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(he=b.wsize-b.wnext,he>ee&&(he=ee),y.arraySet(b.window,z,R-ee,he,b.wnext),ee-=he,ee?(y.arraySet(b.window,z,R-ee,ee,0),b.wnext=ee,b.whave=b.wsize):(b.wnext+=he,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=he))),0}function le(D,z){var R,ee,he,b,V,$,M,U,J,Ae,Ce,be,Xe,Ve,Re=0,Fe,qe,Ke,Be,Ge,at,Ze,st,Je=new y.Buf8(4),Z,ne,se=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!D||!D.state||!D.output||!D.input&&D.avail_in!==0)return p;R=D.state,R.mode===H&&(R.mode=Y),V=D.next_out,he=D.output,M=D.avail_out,b=D.next_in,ee=D.input,$=D.avail_in,U=R.hold,J=R.bits,Ae=$,Ce=M,st=c;e:for(;;)switch(R.mode){case w:if(R.wrap===0){R.mode=Y;break}for(;J<16;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(R.wrap&2&&U===35615){R.check=0,Je[0]=U&255,Je[1]=U>>>8&255,R.check=(0,_.default)(R.check,Je,2,0),U=0,J=0,R.mode=E;break}if(R.flags=0,R.head&&(R.head.done=!1),!(R.wrap&1)||(((U&255)<<8)+(U>>8))%31){D.msg="incorrect header check",R.mode=Oe;break}if((U&15)!==k){D.msg="unknown compression method",R.mode=Oe;break}if(U>>>=4,J-=4,Ze=(U&15)+8,R.wbits===0)R.wbits=Ze;else if(Ze>R.wbits){D.msg="invalid window size",R.mode=Oe;break}R.dmax=1<<Ze,D.adler=R.check=1,R.mode=U&512?P:H,U=0,J=0;break;case E:for(;J<16;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(R.flags=U,(R.flags&255)!==k){D.msg="unknown compression method",R.mode=Oe;break}if(R.flags&57344){D.msg="unknown header flags set",R.mode=Oe;break}R.head&&(R.head.text=U>>8&1),R.flags&512&&(Je[0]=U&255,Je[1]=U>>>8&255,R.check=(0,_.default)(R.check,Je,2,0)),U=0,J=0,R.mode=T;case T:for(;J<32;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}R.head&&(R.head.time=U),R.flags&512&&(Je[0]=U&255,Je[1]=U>>>8&255,Je[2]=U>>>16&255,Je[3]=U>>>24&255,R.check=(0,_.default)(R.check,Je,4,0)),U=0,J=0,R.mode=A;case A:for(;J<16;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}R.head&&(R.head.xflags=U&255,R.head.os=U>>8),R.flags&512&&(Je[0]=U&255,Je[1]=U>>>8&255,R.check=(0,_.default)(R.check,Je,2,0)),U=0,J=0,R.mode=B;case B:if(R.flags&1024){for(;J<16;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}R.length=U,R.head&&(R.head.extra_len=U),R.flags&512&&(Je[0]=U&255,Je[1]=U>>>8&255,R.check=(0,_.default)(R.check,Je,2,0)),U=0,J=0}else R.head&&(R.head.extra=null);R.mode=j;case j:if(R.flags&1024&&(be=R.length,be>$&&(be=$),be&&(R.head&&(Ze=R.head.extra_len-R.length,R.head.extra||(R.head.extra=new Array(R.head.extra_len)),y.arraySet(R.head.extra,ee,b,be,Ze)),R.flags&512&&(R.check=(0,_.default)(R.check,ee,be,b)),$-=be,b+=be,R.length-=be),R.length))break e;R.length=0,R.mode=ye;case ye:if(R.flags&2048){if($===0)break e;be=0;do Ze=ee[b+be++],R.head&&Ze&&R.length<65536&&(R.head.name+=String.fromCharCode(Ze));while(Ze&&be<$);if(R.flags&512&&(R.check=(0,_.default)(R.check,ee,be,b)),$-=be,b+=be,Ze)break e}else R.head&&(R.head.name=null);R.length=0,R.mode=re;case re:if(R.flags&4096){if($===0)break e;be=0;do Ze=ee[b+be++],R.head&&Ze&&R.length<65536&&(R.head.comment+=String.fromCharCode(Ze));while(Ze&&be<$);if(R.flags&512&&(R.check=(0,_.default)(R.check,ee,be,b)),$-=be,b+=be,Ze)break e}else R.head&&(R.head.comment=null);R.mode=ce;case ce:if(R.flags&512){for(;J<16;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(U!==(R.check&65535)){D.msg="header crc mismatch",R.mode=Oe;break}U=0,J=0}R.head&&(R.head.hcrc=R.flags>>9&1,R.head.done=!0),D.adler=R.check=0,R.mode=H;break;case P:for(;J<32;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}D.adler=R.check=ae(U),U=0,J=0,R.mode=N;case N:if(R.havedict===0)return D.next_out=V,D.avail_out=M,D.next_in=b,D.avail_in=$,R.hold=U,R.bits=J,S;D.adler=R.check=1,R.mode=H;case H:if(z===n||z===l)break e;case Y:if(R.last){U>>>=J&7,J-=J&7,R.mode=rt;break}for(;J<3;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}switch(R.last=U&1,U>>>=1,J-=1,U&3){case 0:R.mode=W;break;case 1:if(Ee(R),R.mode=_e,z===l){U>>>=2,J-=2;break e}break;case 2:R.mode=De;break;case 3:D.msg="invalid block type",R.mode=Oe}U>>>=2,J-=2;break;case W:for(U>>>=J&7,J-=J&7;J<32;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if((U&65535)!==(U>>>16^65535)){D.msg="invalid stored block lengths",R.mode=Oe;break}if(R.length=U&65535,U=0,J=0,R.mode=ie,z===l)break e;case ie:R.mode=me;case me:if(be=R.length,be){if(be>$&&(be=$),be>M&&(be=M),be===0)break e;y.arraySet(he,ee,b,be,V),$-=be,b+=be,M-=be,V+=be,R.length-=be;break}R.mode=H;break;case De:for(;J<14;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(R.nlen=(U&31)+257,U>>>=5,J-=5,R.ndist=(U&31)+1,U>>>=5,J-=5,R.ncode=(U&15)+4,U>>>=4,J-=4,R.nlen>286||R.ndist>30){D.msg="too many length or distance symbols",R.mode=Oe;break}R.have=0,R.mode=ze;case ze:for(;R.have<R.ncode;){for(;J<3;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}R.lens[se[R.have++]]=U&7,U>>>=3,J-=3}for(;R.have<19;)R.lens[se[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,Z={bits:R.lenbits},st=(0,u.default)(s,R.lens,0,19,R.lencode,0,R.work,Z),R.lenbits=Z.bits,st){D.msg="invalid code lengths set",R.mode=Oe;break}R.have=0,R.mode=je;case je:for(;R.have<R.nlen+R.ndist;){for(;Re=R.lencode[U&(1<<R.lenbits)-1],Fe=Re>>>24,qe=Re>>>16&255,Ke=Re&65535,!(Fe<=J);){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(Ke<16)U>>>=Fe,J-=Fe,R.lens[R.have++]=Ke;else{if(Ke===16){for(ne=Fe+2;J<ne;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(U>>>=Fe,J-=Fe,R.have===0){D.msg="invalid bit length repeat",R.mode=Oe;break}Ze=R.lens[R.have-1],be=3+(U&3),U>>>=2,J-=2}else if(Ke===17){for(ne=Fe+3;J<ne;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}U>>>=Fe,J-=Fe,Ze=0,be=3+(U&7),U>>>=3,J-=3}else{for(ne=Fe+7;J<ne;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}U>>>=Fe,J-=Fe,Ze=0,be=11+(U&127),U>>>=7,J-=7}if(R.have+be>R.nlen+R.ndist){D.msg="invalid bit length repeat",R.mode=Oe;break}for(;be--;)R.lens[R.have++]=Ze}}if(R.mode===Oe)break;if(R.lens[256]===0){D.msg="invalid code -- missing end-of-block",R.mode=Oe;break}if(R.lenbits=9,Z={bits:R.lenbits},st=(0,u.default)(e,R.lens,0,R.nlen,R.lencode,0,R.work,Z),R.lenbits=Z.bits,st){D.msg="invalid literal/lengths set",R.mode=Oe;break}if(R.distbits=6,R.distcode=R.distdyn,Z={bits:R.distbits},st=(0,u.default)(h,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,Z),R.distbits=Z.bits,st){D.msg="invalid distances set",R.mode=Oe;break}if(R.mode=_e,z===l)break e;case _e:R.mode=ke;case ke:if($>=6&&M>=258){D.next_out=V,D.avail_out=M,D.next_in=b,D.avail_in=$,R.hold=U,R.bits=J,(0,o.default)(D,Ce),V=D.next_out,he=D.output,M=D.avail_out,b=D.next_in,ee=D.input,$=D.avail_in,U=R.hold,J=R.bits,R.mode===H&&(R.back=-1);break}for(R.back=0;Re=R.lencode[U&(1<<R.lenbits)-1],Fe=Re>>>24,qe=Re>>>16&255,Ke=Re&65535,!(Fe<=J);){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(qe&&!(qe&240)){for(Be=Fe,Ge=qe,at=Ke;Re=R.lencode[at+((U&(1<<Be+Ge)-1)>>Be)],Fe=Re>>>24,qe=Re>>>16&255,Ke=Re&65535,!(Be+Fe<=J);){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}U>>>=Be,J-=Be,R.back+=Be}if(U>>>=Fe,J-=Fe,R.back+=Fe,R.length=Ke,qe===0){R.mode=He;break}if(qe&32){R.back=-1,R.mode=H;break}if(qe&64){D.msg="invalid literal/length code",R.mode=Oe;break}R.extra=qe&15,R.mode=Ie;case Ie:if(R.extra){for(ne=R.extra;J<ne;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}R.length+=U&(1<<R.extra)-1,U>>>=R.extra,J-=R.extra,R.back+=R.extra}R.was=R.length,R.mode=Te;case Te:for(;Re=R.distcode[U&(1<<R.distbits)-1],Fe=Re>>>24,qe=Re>>>16&255,Ke=Re&65535,!(Fe<=J);){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(!(qe&240)){for(Be=Fe,Ge=qe,at=Ke;Re=R.distcode[at+((U&(1<<Be+Ge)-1)>>Be)],Fe=Re>>>24,qe=Re>>>16&255,Ke=Re&65535,!(Be+Fe<=J);){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}U>>>=Be,J-=Be,R.back+=Be}if(U>>>=Fe,J-=Fe,R.back+=Fe,qe&64){D.msg="invalid distance code",R.mode=Oe;break}R.offset=Ke,R.extra=qe&15,R.mode=Ne;case Ne:if(R.extra){for(ne=R.extra;J<ne;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}R.offset+=U&(1<<R.extra)-1,U>>>=R.extra,J-=R.extra,R.back+=R.extra}if(R.offset>R.dmax){D.msg="invalid distance too far back",R.mode=Oe;break}R.mode=$e;case $e:if(M===0)break e;if(be=Ce-M,R.offset>be){if(be=R.offset-be,be>R.whave&&R.sane){D.msg="invalid distance too far back",R.mode=Oe;break}be>R.wnext?(be-=R.wnext,Xe=R.wsize-be):Xe=R.wnext-be,be>R.length&&(be=R.length),Ve=R.window}else Ve=he,Xe=V-R.offset,be=R.length;be>M&&(be=M),M-=be,R.length-=be;do he[V++]=Ve[Xe++];while(--be);R.length===0&&(R.mode=ke);break;case He:if(M===0)break e;he[V++]=R.length,M--,R.mode=ke;break;case rt:if(R.wrap){for(;J<32;){if($===0)break e;$--,U|=ee[b++]<<J,J+=8}if(Ce-=M,D.total_out+=Ce,R.total+=Ce,Ce&&(D.adler=R.check=R.flags?(0,_.default)(R.check,he,Ce,V-Ce):(0,C.default)(R.check,he,Ce,V-Ce)),Ce=M,(R.flags?U:ae(U))!==R.check){D.msg="incorrect data check",R.mode=Oe;break}U=0,J=0}R.mode=Me;case Me:if(R.wrap&&R.flags){for(;J<32;){if($===0)break e;$--,U+=ee[b++]<<J,J+=8}if(U!==(R.total&4294967295)){D.msg="incorrect length check",R.mode=Oe;break}U=0,J=0}R.mode=Ye;case Ye:st=v;break e;case Oe:st=m;break e;case Ue:return g;case We:default:return p}return D.next_out=V,D.avail_out=M,D.next_in=b,D.avail_in=$,R.hold=U,R.bits=J,(R.wsize||Ce!==D.avail_out&&R.mode<Oe&&(R.mode<rt||z!==t))&&I(D,D.output,D.next_out,Ce-D.avail_out)?(R.mode=Ue,g):(Ae-=D.avail_in,Ce-=D.avail_out,D.total_in+=Ae,D.total_out+=Ce,R.total+=Ce,R.wrap&&Ce&&(D.adler=R.check=R.flags?(0,_.default)(R.check,he,Ce,D.next_out-Ce):(0,C.default)(R.check,he,Ce,D.next_out-Ce)),D.data_type=R.bits+(R.last?64:0)+(R.mode===H?128:0)+(R.mode===_e||R.mode===ie?256:0),(Ae===0&&Ce===0||z===t)&&st===c&&(st=x),st)}function fe(D){if(!D||!D.state)return p;var z=D.state;return z.window&&(z.window=null),D.state=null,c}function Se(D,z){var R;return!D||!D.state||(R=D.state,!(R.wrap&2))?p:(R.head=z,z.done=!1,c)}function we(D,z){var R=z.length,ee,he,b;return!D||!D.state||(ee=D.state,ee.wrap!==0&&ee.mode!==N)?p:ee.mode===N&&(he=1,he=(0,C.default)(he,z,R,0),he!==ee.check)?m:(b=I(D,z,R,R),b?(ee.mode=Ue,g):(ee.havedict=1,c))}var K="pako inflate (from Nodeca project)";L.inflateInfo=K},27074:function(Le,L,a){"use strict";function f(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(S){return typeof S}:f=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},f(c)}Object.defineProperty(L,"__esModule",{value:!0}),L.default=l;var y=_(a(21437));function C(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return C=function(){return c},c}function _(c){if(c&&c.__esModule)return c;if(c===null||f(c)!=="object"&&typeof c!="function")return{default:c};var v=C();if(v&&v.has(c))return v.get(c);var S={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in c)if(Object.prototype.hasOwnProperty.call(c,m)){var g=p?Object.getOwnPropertyDescriptor(c,m):null;g&&(g.get||g.set)?Object.defineProperty(S,m,g):S[m]=c[m]}return S.default=c,v&&v.set(c,S),S}var o=15,u=852,d=592,r=0,i=1,s=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],h=[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 l(c,v,S,p,m,g,x,k){var w=k.bits,E=0,T=0,A=0,B=0,j=0,ye=0,re=0,ce=0,P=0,N=0,H,Y,W,ie,me,De=null,ze=0,je,_e=new y.Buf16(o+1),ke=new y.Buf16(o+1),Ie=null,Te=0,Ne,$e,He;for(E=0;E<=o;E++)_e[E]=0;for(T=0;T<p;T++)_e[v[S+T]]++;for(j=w,B=o;B>=1&&_e[B]===0;B--);if(j>B&&(j=B),B===0)return m[g++]=1<<24|64<<16|0,m[g++]=1<<24|64<<16|0,k.bits=1,0;for(A=1;A<B&&_e[A]===0;A++);for(j<A&&(j=A),ce=1,E=1;E<=o;E++)if(ce<<=1,ce-=_e[E],ce<0)return-1;if(ce>0&&(c===r||B!==1))return-1;for(ke[1]=0,E=1;E<o;E++)ke[E+1]=ke[E]+_e[E];for(T=0;T<p;T++)v[S+T]!==0&&(x[ke[v[S+T]]++]=T);if(c===r?(De=Ie=x,je=19):c===i?(De=e,ze-=257,Ie=h,Te-=257,je=256):(De=t,Ie=n,je=-1),N=0,T=0,E=A,me=g,ye=j,re=0,W=-1,P=1<<j,ie=P-1,c===i&&P>u||c===s&&P>d)return 1;for(;;){Ne=E-re,x[T]<je?($e=0,He=x[T]):x[T]>je?($e=Ie[Te+x[T]],He=De[ze+x[T]]):($e=96,He=0),H=1<<E-re,Y=1<<ye,A=Y;do Y-=H,m[me+(N>>re)+Y]=Ne<<24|$e<<16|He|0;while(Y!==0);for(H=1<<E-1;N&H;)H>>=1;if(H!==0?(N&=H-1,N+=H):N=0,T++,--_e[E]===0){if(E===B)break;E=v[S+x[T]]}if(E>j&&(N&ie)!==W){for(re===0&&(re=j),me+=A,ye=E-re,ce=1<<ye;ye+re<B&&(ce-=_e[ye+re],!(ce<=0));)ye++,ce<<=1;if(P+=1<<ye,c===i&&P>u||c===s&&P>d)return 1;W=N&ie,m[W]=j<<24|ye<<16|me-g|0}}return N!==0&&(m[me+N]=E-re<<24|64<<16|0),k.bits=j,0}},41020:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var a={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"};L.default=a},4500:function(Le,L,a){"use strict";function f(I){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(fe){return typeof fe}:f=function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},f(I)}Object.defineProperty(L,"__esModule",{value:!0}),L._tr_init=O,L._tr_stored_block=G,L._tr_flush_block=xe,L._tr_tally=Ee,L._tr_align=ge;var y=_(a(21437));function C(){if(typeof WeakMap!="function")return null;var I=new WeakMap;return C=function(){return I},I}function _(I){if(I&&I.__esModule)return I;if(I===null||f(I)!=="object"&&typeof I!="function")return{default:I};var le=C();if(le&&le.has(I))return le.get(I);var fe={},Se=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var we in I)if(Object.prototype.hasOwnProperty.call(I,we)){var K=Se?Object.getOwnPropertyDescriptor(I,we):null;K&&(K.get||K.set)?Object.defineProperty(fe,we,K):fe[we]=I[we]}return fe.default=I,le&&le.set(I,fe),fe}var o=4,u=0,d=1,r=2;function i(I){for(var le=I.length;--le>=0;)I[le]=0}var s=0,e=1,h=2,t=3,n=258,l=29,c=256,v=c+1+l,S=30,p=19,m=2*v+1,g=15,x=16,k=7,w=256,E=16,T=17,A=18,B=[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],j=[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],ye=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],re=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ce=512,P=new Array((v+2)*2);i(P);var N=new Array(S*2);i(N);var H=new Array(ce);i(H);var Y=new Array(n-t+1);i(Y);var W=new Array(l);i(W);var ie=new Array(S);i(ie);function me(I,le,fe,Se,we){this.static_tree=I,this.extra_bits=le,this.extra_base=fe,this.elems=Se,this.max_length=we,this.has_stree=I&&I.length}var De,ze,je;function _e(I,le){this.dyn_tree=I,this.max_code=0,this.stat_desc=le}function ke(I){return I<256?H[I]:H[256+(I>>>7)]}function Ie(I,le){I.pending_buf[I.pending++]=le&255,I.pending_buf[I.pending++]=le>>>8&255}function Te(I,le,fe){I.bi_valid>x-fe?(I.bi_buf|=le<<I.bi_valid&65535,Ie(I,I.bi_buf),I.bi_buf=le>>x-I.bi_valid,I.bi_valid+=fe-x):(I.bi_buf|=le<<I.bi_valid&65535,I.bi_valid+=fe)}function Ne(I,le,fe){Te(I,fe[le*2],fe[le*2+1])}function $e(I,le){var fe=0;do fe|=I&1,I>>>=1,fe<<=1;while(--le>0);return fe>>>1}function He(I){I.bi_valid===16?(Ie(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):I.bi_valid>=8&&(I.pending_buf[I.pending++]=I.bi_buf&255,I.bi_buf>>=8,I.bi_valid-=8)}function rt(I,le){var fe=le.dyn_tree,Se=le.max_code,we=le.stat_desc.static_tree,K=le.stat_desc.has_stree,D=le.stat_desc.extra_bits,z=le.stat_desc.extra_base,R=le.stat_desc.max_length,ee,he,b,V,$,M,U=0;for(V=0;V<=g;V++)I.bl_count[V]=0;for(fe[I.heap[I.heap_max]*2+1]=0,ee=I.heap_max+1;ee<m;ee++)he=I.heap[ee],V=fe[fe[he*2+1]*2+1]+1,V>R&&(V=R,U++),fe[he*2+1]=V,!(he>Se)&&(I.bl_count[V]++,$=0,he>=z&&($=D[he-z]),M=fe[he*2],I.opt_len+=M*(V+$),K&&(I.static_len+=M*(we[he*2+1]+$)));if(U!==0){do{for(V=R-1;I.bl_count[V]===0;)V--;I.bl_count[V]--,I.bl_count[V+1]+=2,I.bl_count[R]--,U-=2}while(U>0);for(V=R;V!==0;V--)for(he=I.bl_count[V];he!==0;)b=I.heap[--ee],!(b>Se)&&(fe[b*2+1]!==V&&(I.opt_len+=(V-fe[b*2+1])*fe[b*2],fe[b*2+1]=V),he--)}}function Me(I,le,fe){var Se=new Array(g+1),we=0,K,D;for(K=1;K<=g;K++)Se[K]=we=we+fe[K-1]<<1;for(D=0;D<=le;D++){var z=I[D*2+1];z!==0&&(I[D*2]=$e(Se[z]++,z))}}function Ye(){var I,le,fe,Se,we,K=new Array(g+1);for(fe=0,Se=0;Se<l-1;Se++)for(W[Se]=fe,I=0;I<1<<B[Se];I++)Y[fe++]=Se;for(Y[fe-1]=Se,we=0,Se=0;Se<16;Se++)for(ie[Se]=we,I=0;I<1<<j[Se];I++)H[we++]=Se;for(we>>=7;Se<S;Se++)for(ie[Se]=we<<7,I=0;I<1<<j[Se]-7;I++)H[256+we++]=Se;for(le=0;le<=g;le++)K[le]=0;for(I=0;I<=143;)P[I*2+1]=8,I++,K[8]++;for(;I<=255;)P[I*2+1]=9,I++,K[9]++;for(;I<=279;)P[I*2+1]=7,I++,K[7]++;for(;I<=287;)P[I*2+1]=8,I++,K[8]++;for(Me(P,v+1,K),I=0;I<S;I++)N[I*2+1]=5,N[I*2]=$e(I,5);De=new me(P,B,c+1,v,g),ze=new me(N,j,0,S,g),je=new me(new Array(0),ye,0,p,k)}function Oe(I){var le;for(le=0;le<v;le++)I.dyn_ltree[le*2]=0;for(le=0;le<S;le++)I.dyn_dtree[le*2]=0;for(le=0;le<p;le++)I.bl_tree[le*2]=0;I.dyn_ltree[w*2]=1,I.opt_len=I.static_len=0,I.last_lit=I.matches=0}function Ue(I){I.bi_valid>8?Ie(I,I.bi_buf):I.bi_valid>0&&(I.pending_buf[I.pending++]=I.bi_buf),I.bi_buf=0,I.bi_valid=0}function We(I,le,fe,Se){Ue(I),Se&&(Ie(I,fe),Ie(I,~fe)),y.arraySet(I.pending_buf,I.window,le,fe,I.pending),I.pending+=fe}function Q(I,le,fe,Se){var we=le*2,K=fe*2;return I[we]<I[K]||I[we]===I[K]&&Se[le]<=Se[fe]}function te(I,le,fe){for(var Se=I.heap[fe],we=fe<<1;we<=I.heap_len&&(we<I.heap_len&&Q(le,I.heap[we+1],I.heap[we],I.depth)&&we++,!Q(le,Se,I.heap[we],I.depth));)I.heap[fe]=I.heap[we],fe=we,we<<=1;I.heap[fe]=Se}function ve(I,le,fe){var Se,we,K=0,D,z;if(I.last_lit!==0)do Se=I.pending_buf[I.d_buf+K*2]<<8|I.pending_buf[I.d_buf+K*2+1],we=I.pending_buf[I.l_buf+K],K++,Se===0?Ne(I,we,le):(D=Y[we],Ne(I,D+c+1,le),z=B[D],z!==0&&(we-=W[D],Te(I,we,z)),Se--,D=ke(Se),Ne(I,D,fe),z=j[D],z!==0&&(Se-=ie[D],Te(I,Se,z)));while(K<I.last_lit);Ne(I,w,le)}function de(I,le){var fe=le.dyn_tree,Se=le.stat_desc.static_tree,we=le.stat_desc.has_stree,K=le.stat_desc.elems,D,z,R=-1,ee;for(I.heap_len=0,I.heap_max=m,D=0;D<K;D++)fe[D*2]!==0?(I.heap[++I.heap_len]=R=D,I.depth[D]=0):fe[D*2+1]=0;for(;I.heap_len<2;)ee=I.heap[++I.heap_len]=R<2?++R:0,fe[ee*2]=1,I.depth[ee]=0,I.opt_len--,we&&(I.static_len-=Se[ee*2+1]);for(le.max_code=R,D=I.heap_len>>1;D>=1;D--)te(I,fe,D);ee=K;do D=I.heap[1],I.heap[1]=I.heap[I.heap_len--],te(I,fe,1),z=I.heap[1],I.heap[--I.heap_max]=D,I.heap[--I.heap_max]=z,fe[ee*2]=fe[D*2]+fe[z*2],I.depth[ee]=(I.depth[D]>=I.depth[z]?I.depth[D]:I.depth[z])+1,fe[D*2+1]=fe[z*2+1]=ee,I.heap[1]=ee++,te(I,fe,1);while(I.heap_len>=2);I.heap[--I.heap_max]=I.heap[1],rt(I,le),Me(fe,R,I.bl_count)}function ae(I,le,fe){var Se,we=-1,K,D=le[0*2+1],z=0,R=7,ee=4;for(D===0&&(R=138,ee=3),le[(fe+1)*2+1]=65535,Se=0;Se<=fe;Se++)K=D,D=le[(Se+1)*2+1],!(++z<R&&K===D)&&(z<ee?I.bl_tree[K*2]+=z:K!==0?(K!==we&&I.bl_tree[K*2]++,I.bl_tree[E*2]++):z<=10?I.bl_tree[T*2]++:I.bl_tree[A*2]++,z=0,we=K,D===0?(R=138,ee=3):K===D?(R=6,ee=3):(R=7,ee=4))}function oe(I,le,fe){var Se,we=-1,K,D=le[0*2+1],z=0,R=7,ee=4;for(D===0&&(R=138,ee=3),Se=0;Se<=fe;Se++)if(K=D,D=le[(Se+1)*2+1],!(++z<R&&K===D)){if(z<ee)do Ne(I,K,I.bl_tree);while(--z!==0);else K!==0?(K!==we&&(Ne(I,K,I.bl_tree),z--),Ne(I,E,I.bl_tree),Te(I,z-3,2)):z<=10?(Ne(I,T,I.bl_tree),Te(I,z-3,3)):(Ne(I,A,I.bl_tree),Te(I,z-11,7));z=0,we=K,D===0?(R=138,ee=3):K===D?(R=6,ee=3):(R=7,ee=4)}}function ue(I){var le;for(ae(I,I.dyn_ltree,I.l_desc.max_code),ae(I,I.dyn_dtree,I.d_desc.max_code),de(I,I.bl_desc),le=p-1;le>=3&&I.bl_tree[re[le]*2+1]===0;le--);return I.opt_len+=3*(le+1)+5+5+4,le}function q(I,le,fe,Se){var we;for(Te(I,le-257,5),Te(I,fe-1,5),Te(I,Se-4,4),we=0;we<Se;we++)Te(I,I.bl_tree[re[we]*2+1],3);oe(I,I.dyn_ltree,le-1),oe(I,I.dyn_dtree,fe-1)}function F(I){var le=4093624447,fe;for(fe=0;fe<=31;fe++,le>>>=1)if(le&1&&I.dyn_ltree[fe*2]!==0)return u;if(I.dyn_ltree[9*2]!==0||I.dyn_ltree[10*2]!==0||I.dyn_ltree[13*2]!==0)return d;for(fe=32;fe<c;fe++)if(I.dyn_ltree[fe*2]!==0)return d;return u}var X=!1;function O(I){X||(Ye(),X=!0),I.l_desc=new _e(I.dyn_ltree,De),I.d_desc=new _e(I.dyn_dtree,ze),I.bl_desc=new _e(I.bl_tree,je),I.bi_buf=0,I.bi_valid=0,Oe(I)}function G(I,le,fe,Se){Te(I,(s<<1)+(Se?1:0),3),We(I,le,fe,!0)}function ge(I){Te(I,e<<1,3),Ne(I,w,P),He(I)}function xe(I,le,fe,Se){var we,K,D=0;I.level>0?(I.strm.data_type===r&&(I.strm.data_type=F(I)),de(I,I.l_desc),de(I,I.d_desc),D=ue(I),we=I.opt_len+3+7>>>3,K=I.static_len+3+7>>>3,K<=we&&(we=K)):we=K=fe+5,fe+4<=we&&le!==-1?G(I,le,fe,Se):I.strategy===o||K===we?(Te(I,(e<<1)+(Se?1:0),3),ve(I,P,N)):(Te(I,(h<<1)+(Se?1:0),3),q(I,I.l_desc.max_code+1,I.d_desc.max_code+1,D+1),ve(I,I.dyn_ltree,I.dyn_dtree)),Oe(I),Se&&Ue(I)}function Ee(I,le,fe){return I.pending_buf[I.d_buf+I.last_lit*2]=le>>>8&255,I.pending_buf[I.d_buf+I.last_lit*2+1]=le&255,I.pending_buf[I.l_buf+I.last_lit]=fe&255,I.last_lit++,le===0?I.dyn_ltree[fe*2]++:(I.matches++,le--,I.dyn_ltree[(Y[fe]+c+1)*2]++,I.dyn_dtree[ke(le)*2]++),I.last_lit===I.lit_bufsize-1}},696:function(Le,L){"use strict";Object.defineProperty(L,"__esModule",{value:!0}),L.default=a;function a(){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(Le,L,a){"use strict";function f(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(t){return typeof t}:f=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(e)}Object.defineProperty(L,"__esModule",{value:!0}),L.default=void 0;var y=_(a(37095));function C(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return C=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(e===null||f(e)!=="object"&&typeof e!="function")return{default:e};var h=C();if(h&&h.has(e))return h.get(e);var t={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var c=n?Object.getOwnPropertyDescriptor(e,l):null;c&&(c.get||c.set)?Object.defineProperty(t,l,c):t[l]=e[l]}return t.default=e,h&&h.set(e,t),t}function o(e,h){if(!(e instanceof h))throw new TypeError("Cannot call a class as a function")}function u(e,h){for(var t=0;t<h.length;t++){var n=h[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,h,t){return h&&u(e.prototype,h),t&&u(e,t),e}var r=!1,i=40*1024*1024,s=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,l=t-1;l>=0;l--)n+=this._rQ[this._rQi++]<<l*8;return n}},{key:"rQshiftStr",value:function(t){typeof t=="undefined"&&(t=this.rQlen);for(var n="",l=0;l<t;l+=4096){var c=this.rQshiftBytes(Math.min(4096,t-l));n+=String.fromCharCode.apply(null,c)}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,l){if(this.rQlen<n){if(l){if(this._rQi<l)throw new Error("rQwait cannot backup "+l+" bytes");this._rQi-=l}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 l=this;this.init(),this._websocket=new WebSocket(t,n),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){y.Debug(">> WebSock.onopen"),l._websocket.protocol&&y.Info("Server choose sub-protocol: "+l._websocket.protocol),l._eventHandlers.open(),y.Debug("<< WebSock.onopen")},this._websocket.onclose=function(c){y.Debug(">> WebSock.onclose"),l._eventHandlers.close(c),y.Debug("<< WebSock.onclose")},this._websocket.onerror=function(c){y.Debug(">> WebSock.onerror: "+c),l._eventHandlers.error(c),y.Debug("<< WebSock.onerror: "+c)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(y.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,l=this._rQbufferSize<n;if(l&&(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(l){var c=this._rQ.buffer;this._rQ=new Uint8Array(this._rQbufferSize),this._rQ.set(new Uint8Array(c,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)):y.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}();L.default=s},82234:function(Le,L,a){"use strict";a.d(L,{Z:function(){return d}});var f=a(45987),y=a(1413),C=a(71002),_=a(67294),o=["show"];function u(r,i){if(!i.max)return!0;var s=i.strategy(r);return s<=i.max}function d(r,i){return _.useMemo(function(){var s={};i&&(s.show=(0,C.Z)(i)==="object"&&i.formatter?i.formatter:!!i),s=(0,y.Z)((0,y.Z)({},s),r);var e=s,h=e.show,t=(0,f.Z)(e,o);return(0,y.Z)((0,y.Z)({},t),{},{show:!!h,showFormatter:typeof h=="function"?h:void 0,strategy:t.strategy||function(n){return n.length}})},[r,i])}},67656:function(Le,L,a){"use strict";a.r(L),a.d(L,{BaseInput:function(){return s},default:function(){return m}});var f=a(1413),y=a(87462),C=a(4942),_=a(71002),o=a(94184),u=a.n(o),d=a(67294),r=a(87887),i=d.forwardRef(function(g,x){var k,w,E,T=g.inputElement,A=g.children,B=g.prefixCls,j=g.prefix,ye=g.suffix,re=g.addonBefore,ce=g.addonAfter,P=g.className,N=g.style,H=g.disabled,Y=g.readOnly,W=g.focused,ie=g.triggerFocus,me=g.allowClear,De=g.value,ze=g.handleReset,je=g.hidden,_e=g.classes,ke=g.classNames,Ie=g.dataAttrs,Te=g.styles,Ne=g.components,$e=g.onClear,He=A!=null?A:T,rt=(Ne==null?void 0:Ne.affixWrapper)||"span",Me=(Ne==null?void 0:Ne.groupWrapper)||"span",Ye=(Ne==null?void 0:Ne.wrapper)||"span",Oe=(Ne==null?void 0:Ne.groupAddon)||"span",Ue=(0,d.useRef)(null),We=function(le){var fe;(fe=Ue.current)!==null&&fe!==void 0&&fe.contains(le.target)&&(ie==null||ie())},Q=(0,r.X3)(g),te=(0,d.cloneElement)(He,{value:De,className:u()((k=He.props)===null||k===void 0?void 0:k.className,!Q&&(ke==null?void 0:ke.variant))||null}),ve=(0,d.useRef)(null);if(d.useImperativeHandle(x,function(){return{nativeElement:ve.current||Ue.current}}),Q){var de=null;if(me){var ae=!H&&!Y&&De,oe="".concat(B,"-clear-icon"),ue=(0,_.Z)(me)==="object"&&me!==null&&me!==void 0&&me.clearIcon?me.clearIcon:"\u2716";de=d.createElement("button",{type:"button",tabIndex:-1,onClick:function(le){ze==null||ze(le),$e==null||$e()},onMouseDown:function(le){return le.preventDefault()},className:u()(oe,(0,C.Z)((0,C.Z)({},"".concat(oe,"-hidden"),!ae),"".concat(oe,"-has-suffix"),!!ye))},ue)}var q="".concat(B,"-affix-wrapper"),F=u()(q,(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)({},"".concat(B,"-disabled"),H),"".concat(q,"-disabled"),H),"".concat(q,"-focused"),W),"".concat(q,"-readonly"),Y),"".concat(q,"-input-with-clear-btn"),ye&&me&&De),_e==null?void 0:_e.affixWrapper,ke==null?void 0:ke.affixWrapper,ke==null?void 0:ke.variant),X=(ye||me)&&d.createElement("span",{className:u()("".concat(B,"-suffix"),ke==null?void 0:ke.suffix),style:Te==null?void 0:Te.suffix},de,ye);te=d.createElement(rt,(0,y.Z)({className:F,style:Te==null?void 0:Te.affixWrapper,onClick:We},Ie==null?void 0:Ie.affixWrapper,{ref:Ue}),j&&d.createElement("span",{className:u()("".concat(B,"-prefix"),ke==null?void 0:ke.prefix),style:Te==null?void 0:Te.prefix},j),te,X)}if((0,r.He)(g)){var O="".concat(B,"-group"),G="".concat(O,"-addon"),ge="".concat(O,"-wrapper"),xe=u()("".concat(B,"-wrapper"),O,_e==null?void 0:_e.wrapper,ke==null?void 0:ke.wrapper),Ee=u()(ge,(0,C.Z)({},"".concat(ge,"-disabled"),H),_e==null?void 0:_e.group,ke==null?void 0:ke.groupWrapper);te=d.createElement(Me,{className:Ee,ref:ve},d.createElement(Ye,{className:xe},re&&d.createElement(Oe,{className:G},re),te,ce&&d.createElement(Oe,{className:G},ce)))}return d.cloneElement(te,{className:u()((w=te.props)===null||w===void 0?void 0:w.className,P)||null,style:(0,f.Z)((0,f.Z)({},(E=te.props)===null||E===void 0?void 0:E.style),N),hidden:je})}),s=i,e=a(74902),h=a(97685),t=a(45987),n=a(21770),l=a(98423),c=a(82234),v=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],S=(0,d.forwardRef)(function(g,x){var k=g.autoComplete,w=g.onChange,E=g.onFocus,T=g.onBlur,A=g.onPressEnter,B=g.onKeyDown,j=g.onKeyUp,ye=g.prefixCls,re=ye===void 0?"rc-input":ye,ce=g.disabled,P=g.htmlSize,N=g.className,H=g.maxLength,Y=g.suffix,W=g.showCount,ie=g.count,me=g.type,De=me===void 0?"text":me,ze=g.classes,je=g.classNames,_e=g.styles,ke=g.onCompositionStart,Ie=g.onCompositionEnd,Te=(0,t.Z)(g,v),Ne=(0,d.useState)(!1),$e=(0,h.Z)(Ne,2),He=$e[0],rt=$e[1],Me=(0,d.useRef)(!1),Ye=(0,d.useRef)(!1),Oe=(0,d.useRef)(null),Ue=(0,d.useRef)(null),We=function(he){Oe.current&&(0,r.nH)(Oe.current,he)},Q=(0,n.Z)(g.defaultValue,{value:g.value}),te=(0,h.Z)(Q,2),ve=te[0],de=te[1],ae=ve==null?"":String(ve),oe=(0,d.useState)(null),ue=(0,h.Z)(oe,2),q=ue[0],F=ue[1],X=(0,c.Z)(ie,W),O=X.max||H,G=X.strategy(ae),ge=!!O&&G>O;(0,d.useImperativeHandle)(x,function(){var ee;return{focus:We,blur:function(){var b;(b=Oe.current)===null||b===void 0||b.blur()},setSelectionRange:function(b,V,$){var M;(M=Oe.current)===null||M===void 0||M.setSelectionRange(b,V,$)},select:function(){var b;(b=Oe.current)===null||b===void 0||b.select()},input:Oe.current,nativeElement:((ee=Ue.current)===null||ee===void 0?void 0:ee.nativeElement)||Oe.current}}),(0,d.useEffect)(function(){Ye.current&&(Ye.current=!1),rt(function(ee){return ee&&ce?!1:ee})},[ce]);var xe=function(he,b,V){var $=b;if(!Me.current&&X.exceedFormatter&&X.max&&X.strategy(b)>X.max){if($=X.exceedFormatter(b,{max:X.max}),b!==$){var M,U;F([((M=Oe.current)===null||M===void 0?void 0:M.selectionStart)||0,((U=Oe.current)===null||U===void 0?void 0:U.selectionEnd)||0])}}else if(V.source==="compositionEnd")return;de($),Oe.current&&(0,r.rJ)(Oe.current,he,w,$)};(0,d.useEffect)(function(){if(q){var ee;(ee=Oe.current)===null||ee===void 0||ee.setSelectionRange.apply(ee,(0,e.Z)(q))}},[q]);var Ee=function(he){xe(he,he.target.value,{source:"change"})},I=function(he){Me.current=!1,xe(he,he.currentTarget.value,{source:"compositionEnd"}),Ie==null||Ie(he)},le=function(he){A&&he.key==="Enter"&&!Ye.current&&(Ye.current=!0,A(he)),B==null||B(he)},fe=function(he){he.key==="Enter"&&(Ye.current=!1),j==null||j(he)},Se=function(he){rt(!0),E==null||E(he)},we=function(he){Ye.current&&(Ye.current=!1),rt(!1),T==null||T(he)},K=function(he){de(""),We(),Oe.current&&(0,r.rJ)(Oe.current,he,w)},D=ge&&"".concat(re,"-out-of-range"),z=function(){var he=(0,l.Z)(g,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return d.createElement("input",(0,y.Z)({autoComplete:k},he,{onChange:Ee,onFocus:Se,onBlur:we,onKeyDown:le,onKeyUp:fe,className:u()(re,(0,C.Z)({},"".concat(re,"-disabled"),ce),je==null?void 0:je.input),style:_e==null?void 0:_e.input,ref:Oe,size:P,type:De,onCompositionStart:function(V){Me.current=!0,ke==null||ke(V)},onCompositionEnd:I}))},R=function(){var he=Number(O)>0;if(Y||X.show){var b=X.showFormatter?X.showFormatter({value:ae,count:G,maxLength:O}):"".concat(G).concat(he?" / ".concat(O):"");return d.createElement(d.Fragment,null,X.show&&d.createElement("span",{className:u()("".concat(re,"-show-count-suffix"),(0,C.Z)({},"".concat(re,"-show-count-has-suffix"),!!Y),je==null?void 0:je.count),style:(0,f.Z)({},_e==null?void 0:_e.count)},b),Y)}return null};return d.createElement(s,(0,y.Z)({},Te,{prefixCls:re,className:u()(N,D),handleReset:K,value:ae,focused:He,triggerFocus:We,suffix:R(),disabled:ce,classes:ze,classNames:je,styles:_e}),z())}),p=S,m=p},87887:function(Le,L,a){"use strict";a.d(L,{He:function(){return f},X3:function(){return y},nH:function(){return o},rJ:function(){return _}});function f(u){return!!(u.addonBefore||u.addonAfter)}function y(u){return!!(u.prefix||u.suffix||u.allowClear)}function C(u,d,r){var i=d.cloneNode(!0),s=Object.create(u,{target:{value:i},currentTarget:{value:i}});return i.value=r,typeof d.selectionStart=="number"&&typeof d.selectionEnd=="number"&&(i.selectionStart=d.selectionStart,i.selectionEnd=d.selectionEnd),i.setSelectionRange=function(){d.setSelectionRange.apply(d,arguments)},s}function _(u,d,r,i){if(r){var s=d;if(d.type==="click"){s=C(d,u,""),r(s);return}if(u.type!=="file"&&i!==void 0){s=C(d,u,i),r(s);return}r(s)}}function o(u,d){if(u){u.focus(d);var r=d||{},i=r.cursor;if(i){var s=u.value.length;switch(i){case"start":u.setSelectionRange(0,0);break;case"end":u.setSelectionRange(s,s);break;default:u.setSelectionRange(0,s)}}}}},66680:function(Le,L,a){"use strict";a.d(L,{Z:function(){return y}});var f=a(67294);function y(C){var _=f.useRef();_.current=C;var o=f.useCallback(function(){for(var u,d=arguments.length,r=new Array(d),i=0;i<d;i++)r[i]=arguments[i];return(u=_.current)===null||u===void 0?void 0:u.call.apply(u,[_].concat(r))},[]);return o}},21770:function(Le,L,a){"use strict";a.d(L,{Z:function(){return u}});var f=a(97685),y=a(66680),C=a(8410),_=a(63896);function o(d){return d!==void 0}function u(d,r){var i=r||{},s=i.defaultValue,e=i.value,h=i.onChange,t=i.postState,n=(0,_.Z)(function(){return o(e)?e:o(s)?typeof s=="function"?s():s:typeof d=="function"?d():d}),l=(0,f.Z)(n,2),c=l[0],v=l[1],S=e!==void 0?e:c,p=t?t(S):S,m=(0,y.Z)(h),g=(0,_.Z)([S]),x=(0,f.Z)(g,2),k=x[0],w=x[1];(0,C.o)(function(){var T=k[0];c!==T&&m(c,T)},[k]),(0,C.o)(function(){o(e)||v(e)},[e]);var E=(0,y.Z)(function(T,A){v(T,A),w([S],A)});return[p,E]}},98423:function(Le,L,a){"use strict";a.d(L,{Z:function(){return y}});var f=a(1413);function y(C,_){var o=(0,f.Z)({},C);return Array.isArray(_)&&_.forEach(function(u){delete o[u]}),o}},12320:function(Le){(function(L,a){if(1)Le.exports=a();else var f,y})(window,function(){return function(L){var a={};function f(y){if(a[y])return a[y].exports;var C=a[y]={i:y,l:!1,exports:{}};return L[y].call(C.exports,C,C.exports,f),C.l=!0,C.exports}return f.m=L,f.c=a,f.d=function(y,C,_){f.o(y,C)||Object.defineProperty(y,C,{enumerable:!0,get:_})},f.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},f.t=function(y,C){if(1&C&&(y=f(y)),8&C||4&C&&typeof y=="object"&&y&&y.__esModule)return y;var _=Object.create(null);if(f.r(_),Object.defineProperty(_,"default",{enumerable:!0,value:y}),2&C&&typeof y!="string")for(var o in y)f.d(_,o,function(u){return y[u]}.bind(null,o));return _},f.n=function(y){var C=y&&y.__esModule?function(){return y.default}:function(){return y};return f.d(C,"a",C),C},f.o=function(y,C){return Object.prototype.hasOwnProperty.call(y,C)},f.p="",f(f.s=34)}([function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.forwardEvent=a.EventEmitter=void 0;var y=function(){function C(){this._listeners=[],this._disposed=!1}return Object.defineProperty(C.prototype,"event",{get:function(){var _=this;return this._event||(this._event=function(o){return _._listeners.push(o),{dispose:function(){if(!_._disposed){for(var u=0;u<_._listeners.length;u++)if(_._listeners[u]===o)return void _._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),C.prototype.fire=function(_,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,_,o)},C.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},C}();a.EventEmitter=y,a.forwardEvent=function(C,_){return C(function(o){return _.fire(o)})}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.IUnicodeService=a.IOptionsService=a.ILogService=a.IInstantiationService=a.IDirtyRowService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;var y=f(14);a.IBufferService=y.createDecorator("BufferService"),a.ICoreMouseService=y.createDecorator("CoreMouseService"),a.ICoreService=y.createDecorator("CoreService"),a.ICharsetService=y.createDecorator("CharsetService"),a.IDirtyRowService=y.createDecorator("DirtyRowService"),a.IInstantiationService=y.createDecorator("InstantiationService"),a.ILogService=y.createDecorator("LogService"),a.IOptionsService=y.createDecorator("OptionsService"),a.IUnicodeService=y.createDecorator("UnicodeService")},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.Disposable=void 0;var y=function(){function _(){this._disposables=[],this._isDisposed=!1}return _.prototype.dispose=function(){this._isDisposed=!0;for(var o=0,u=this._disposables;o<u.length;o++)u[o].dispose();this._disposables.length=0},_.prototype.register=function(o){return this._disposables.push(o),o},_.prototype.unregister=function(o){var u=this._disposables.indexOf(o);u!==-1&&this._disposables.splice(u,1)},_}();function C(_){for(var o=0,u=_;o<u.length;o++)u[o].dispose();_.length=0}a.Disposable=y,a.disposeArray=C,a.getDisposeArrayDisposable=function(_){return{dispose:function(){return C(_)}}}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=256,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,e){s.__proto__=e}||function(s,e){for(var h in e)e.hasOwnProperty(h)&&(s[h]=e[h])})(r,i)},function(r,i){function s(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;var _=f(8),o=f(3),u=f(6),d=function(r){function i(){var s=r!==null&&r.apply(this,arguments)||this;return s.content=0,s.fg=0,s.bg=0,s.extended=new u.ExtendedAttrs,s.combinedData="",s}return C(i,r),i.fromCharData=function(s){var e=new i;return e.setFromCharData(s),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?_.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(s){this.fg=s[o.CHAR_DATA_ATTR_INDEX],this.bg=0;var e=!1;if(s[o.CHAR_DATA_CHAR_INDEX].length>2)e=!0;else if(s[o.CHAR_DATA_CHAR_INDEX].length===2){var h=s[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){var t=s[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=t&&t<=57343?this.content=1024*(h-55296)+t-56320+65536|s[o.CHAR_DATA_WIDTH_INDEX]<<22:e=!0}else e=!0}else this.content=s[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[o.CHAR_DATA_WIDTH_INDEX]<<22;e&&(this.combinedData=s[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|s[o.CHAR_DATA_WIDTH_INDEX]<<22)},i.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},i}(u.AttributeData);a.CellData=d},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ISoundService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;var y=f(14);a.ICharSizeService=y.createDecorator("CharSizeService"),a.ICoreBrowserService=y.createDecorator("CoreBrowserService"),a.IMouseService=y.createDecorator("MouseService"),a.IRenderService=y.createDecorator("RenderService"),a.ISelectionService=y.createDecorator("SelectionService"),a.ISoundService=y.createDecorator("SoundService")},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;var y=function(){function _(){this.fg=0,this.bg=0,this.extended=new C}return _.toColorRGB=function(o){return[o>>>16&255,o>>>8&255,255&o]},_.fromColorRGB=function(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]},_.prototype.clone=function(){var o=new _;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o},_.prototype.isInverse=function(){return 67108864&this.fg},_.prototype.isBold=function(){return 134217728&this.fg},_.prototype.isUnderline=function(){return 268435456&this.fg},_.prototype.isBlink=function(){return 536870912&this.fg},_.prototype.isInvisible=function(){return 1073741824&this.fg},_.prototype.isItalic=function(){return 67108864&this.bg},_.prototype.isDim=function(){return 134217728&this.bg},_.prototype.getFgColorMode=function(){return 50331648&this.fg},_.prototype.getBgColorMode=function(){return 50331648&this.bg},_.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},_.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},_.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},_.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},_.prototype.isFgDefault=function(){return(50331648&this.fg)==0},_.prototype.isBgDefault=function(){return(50331648&this.bg)==0},_.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},_.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},_.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},_.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},_.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},_.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()},_.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},_.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},_.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},_.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},_.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},_}();a.AttributeData=y;var C=function(){function _(o,u){o===void 0&&(o=0),u===void 0&&(u=-1),this.underlineStyle=o,this.underlineColor=u}return _.prototype.clone=function(){return new _(this.underlineStyle,this.underlineColor)},_.prototype.isEmpty=function(){return this.underlineStyle===0},_}();a.ExtendedAttrs=C},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(y,C,_,o){y.addEventListener(C,_,o);var u=!1;return{dispose:function(){u||(u=!0,y.removeEventListener(C,_,o))}}}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(_){return _>65535?(_-=65536,String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):String.fromCharCode(_)},a.utf32ToString=function(_,o,u){o===void 0&&(o=0),u===void 0&&(u=_.length);for(var d="",r=o;r<u;++r){var i=_[r];i>65535?(i-=65536,d+=String.fromCharCode(55296+(i>>10))+String.fromCharCode(i%1024+56320)):d+=String.fromCharCode(i)}return d};var y=function(){function _(){this._interim=0}return _.prototype.clear=function(){this._interim=0},_.prototype.decode=function(o,u){var d=o.length;if(!d)return 0;var r=0,i=0;this._interim&&(56320<=(h=o.charCodeAt(i++))&&h<=57343?u[r++]=1024*(this._interim-55296)+h-56320+65536:(u[r++]=this._interim,u[r++]=h),this._interim=0);for(var s=i;s<d;++s){var e=o.charCodeAt(s);if(55296<=e&&e<=56319){if(++s>=d)return this._interim=e,r;var h;56320<=(h=o.charCodeAt(s))&&h<=57343?u[r++]=1024*(e-55296)+h-56320+65536:(u[r++]=e,u[r++]=h)}else u[r++]=e}return r},_}();a.StringToUtf32=y;var C=function(){function _(){this.interim=new Uint8Array(3)}return _.prototype.clear=function(){this.interim.fill(0)},_.prototype.decode=function(o,u){var d=o.length;if(!d)return 0;var r,i,s,e,h=0,t=0,n=0;if(this.interim[0]){var l=!1,c=this.interim[0];c&=(224&c)==192?31:(240&c)==224?15:7;for(var v=0,S=void 0;(S=63&this.interim[++v])&&v<4;)c<<=6,c|=S;for(var p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,m=p-v;n<m;){if(n>=d)return 0;if((192&(S=o[n++]))!=128){n--,l=!0;break}this.interim[v++]=S,c<<=6,c|=63&S}l||(p===2?c<128?n--:u[h++]=c:p===3?c<2048||c>=55296&&c<=57343||(u[h++]=c):c<65536||c>1114111||(u[h++]=c)),this.interim.fill(0)}for(var g=d-4,x=n;x<d;){for(;!(!(x<g)||128&(r=o[x])||128&(i=o[x+1])||128&(s=o[x+2])||128&(e=o[x+3]));)u[h++]=r,u[h++]=i,u[h++]=s,u[h++]=e,x+=4;if((r=o[x++])<128)u[h++]=r;else if((224&r)==192){if(x>=d)return this.interim[0]=r,h;if((192&(i=o[x++]))!=128){x--;continue}if((t=(31&r)<<6|63&i)<128){x--;continue}u[h++]=t}else if((240&r)==224){if(x>=d)return this.interim[0]=r,h;if((192&(i=o[x++]))!=128){x--;continue}if(x>=d)return this.interim[0]=r,this.interim[1]=i,h;if((192&(s=o[x++]))!=128){x--;continue}if((t=(15&r)<<12|(63&i)<<6|63&s)<2048||t>=55296&&t<=57343)continue;u[h++]=t}else if((248&r)==240){if(x>=d)return this.interim[0]=r,h;if((192&(i=o[x++]))!=128){x--;continue}if(x>=d)return this.interim[0]=r,this.interim[1]=i,h;if((192&(s=o[x++]))!=128){x--;continue}if(x>=d)return this.interim[0]=r,this.interim[1]=i,this.interim[2]=s,h;if((192&(e=o[x++]))!=128){x--;continue}if((t=(7&r)<<18|(63&i)<<12|(63&s)<<6|63&e)<65536||t>1114111)continue;u[h++]=t}}return h},_}();a.Utf8ToUtf32=C},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CHAR_ATLAS_CELL_SPACING=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0,a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.CHAR_ATLAS_CELL_SPACING=1},function(L,a,f){"use strict";var y,C,_,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(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=void 0,function(r){r.toCss=function(i,s,e,h){return h!==void 0?"#"+u(i)+u(s)+u(e)+u(h):"#"+u(i)+u(s)+u(e)},r.toRgba=function(i,s,e,h){return h===void 0&&(h=255),(i<<24|s<<16|e<<8|h)>>>0}}(y=a.channels||(a.channels={})),(C=a.color||(a.color={})).blend=function(r,i){var s=(255&i.rgba)/255;if(s===1)return{css:i.css,rgba:i.rgba};var e=i.rgba>>24&255,h=i.rgba>>16&255,t=i.rgba>>8&255,n=r.rgba>>24&255,l=r.rgba>>16&255,c=r.rgba>>8&255,v=n+Math.round((e-n)*s),S=l+Math.round((h-l)*s),p=c+Math.round((t-c)*s);return{css:y.toCss(v,S,p),rgba:y.toRgba(v,S,p)}},C.isOpaque=function(r){return(255&r.rgba)==255},C.ensureContrastRatio=function(r,i,s){var e=o.ensureContrastRatio(r.rgba,i.rgba,s);if(e)return o.toColor(e>>24&255,e>>16&255,e>>8&255)},C.opaque=function(r){var i=(255|r.rgba)>>>0,s=o.toChannels(i),e=s[0],h=s[1],t=s[2];return{css:y.toCss(e,h,t),rgba:i}},C.opacity=function(r,i){var s=Math.round(255*i),e=o.toChannels(r.rgba),h=e[0],t=e[1],n=e[2];return{css:y.toCss(h,t,n,s),rgba:y.toRgba(h,t,n,s)}},(a.css||(a.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(s,e,h){var t=s/255,n=e/255,l=h/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*(l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4))}r.relativeLuminance=function(s){return i(s>>16&255,s>>8&255,255&s)},r.relativeLuminance2=i}(_=a.rgb||(a.rgb={})),function(r){function i(e,h,t){for(var n=e>>24&255,l=e>>16&255,c=e>>8&255,v=h>>24&255,S=h>>16&255,p=h>>8&255,m=d(_.relativeLuminance2(v,p,S),_.relativeLuminance2(n,l,c));m<t&&(v>0||S>0||p>0);)v-=Math.max(0,Math.ceil(.1*v)),S-=Math.max(0,Math.ceil(.1*S)),p-=Math.max(0,Math.ceil(.1*p)),m=d(_.relativeLuminance2(v,p,S),_.relativeLuminance2(n,l,c));return(v<<24|S<<16|p<<8|255)>>>0}function s(e,h,t){for(var n=e>>24&255,l=e>>16&255,c=e>>8&255,v=h>>24&255,S=h>>16&255,p=h>>8&255,m=d(_.relativeLuminance2(v,p,S),_.relativeLuminance2(n,l,c));m<t&&(v<255||S<255||p<255);)v=Math.min(255,v+Math.ceil(.1*(255-v))),S=Math.min(255,S+Math.ceil(.1*(255-S))),p=Math.min(255,p+Math.ceil(.1*(255-p))),m=d(_.relativeLuminance2(v,p,S),_.relativeLuminance2(n,l,c));return(v<<24|S<<16|p<<8|255)>>>0}r.ensureContrastRatio=function(e,h,t){var n=_.relativeLuminance(e>>8),l=_.relativeLuminance(h>>8);if(d(n,l)<t)return l<n?i(e,h,t):s(e,h,t)},r.reduceLuminance=i,r.increaseLuminance=s,r.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},r.toColor=function(e,h,t){return{css:y.toCss(e,h,t),rgba:y.toRgba(e,h,t)}}}(o=a.rgba||(a.rgba={})),a.toPaddedHex=u,a.contrastRatio=d},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.isSafari=a.isFirefox=void 0;var y=typeof navigator=="undefined",C=y?"node":navigator.userAgent,_=y?"node":navigator.platform;function o(u,d){return u.indexOf(d)>=0}a.isFirefox=!!~C.indexOf("Firefox"),a.isSafari=/^((?!chrome|android).)*safari/i.test(C),a.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],_),a.isIpad=_==="iPad",a.isIphone=_==="iPhone",a.isWindows=o(["Windows","Win16","Win32","WinCE"],_),a.isLinux=_.indexOf("Linux")>=0},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.C1=a.C0=void 0,function(y){y.NUL="\0",y.SOH="",y.STX="",y.ETX="",y.EOT="",y.ENQ="",y.ACK="",y.BEL="\x07",y.BS="\b",y.HT=" ",y.LF=`
`,y.VT="\v",y.FF="\f",y.CR="\r",y.SO="",y.SI="",y.DLE="",y.DC1="",y.DC2="",y.DC3="",y.DC4="",y.NAK="",y.SYN="",y.ETB="",y.CAN="",y.EM="",y.SUB="",y.ESC="\x1B",y.FS="",y.GS="",y.RS="",y.US="",y.SP=" ",y.DEL="\x7F"}(a.C0||(a.C0={})),function(y){y.PAD="\x80",y.HOP="\x81",y.BPH="\x82",y.NBH="\x83",y.IND="\x84",y.NEL="\x85",y.SSA="\x86",y.ESA="\x87",y.HTS="\x88",y.HTJ="\x89",y.VTS="\x8A",y.PLD="\x8B",y.PLU="\x8C",y.RI="\x8D",y.SS2="\x8E",y.SS3="\x8F",y.DCS="\x90",y.PU1="\x91",y.PU2="\x92",y.STS="\x93",y.CCH="\x94",y.MW="\x95",y.SPA="\x96",y.EPA="\x97",y.SOS="\x98",y.SGCI="\x99",y.SCI="\x9A",y.CSI="\x9B",y.ST="\x9C",y.OSC="\x9D",y.PM="\x9E",y.APC="\x9F"}(a.C1||(a.C1={}))},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BaseRenderLayer=void 0;var y=f(3),C=f(9),_=f(25),o=f(6),u=f(28),d=f(10),r=f(17),i=function(){function s(e,h,t,n,l,c,v,S){this._container=e,this._alpha=n,this._colors=l,this._rendererId=c,this._bufferService=v,this._optionsService=S,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-"+h+"-layer"),this._canvas.style.zIndex=t.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return s.prototype.dispose=function(){var e;r.removeElementFromParent(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},s.prototype._initCanvas=function(){this._ctx=u.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},s.prototype.onOptionsChanged=function(){},s.prototype.onBlur=function(){},s.prototype.onFocus=function(){},s.prototype.onCursorMove=function(){},s.prototype.onGridChanged=function(e,h){},s.prototype.onSelectionChanged=function(e,h,t){t===void 0&&(t=!1)},s.prototype.setColors=function(e){this._refreshCharAtlas(e)},s.prototype._setTransparency=function(e){if(e!==this._alpha){var h=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},s.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=_.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},s.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)},s.prototype._fillCells=function(e,h,t,n){this._ctx.fillRect(e*this._scaledCellWidth,h*this._scaledCellHeight,t*this._scaledCellWidth,n*this._scaledCellHeight)},s.prototype._fillBottomLineAtCells=function(e,h,t){t===void 0&&(t=1),this._ctx.fillRect(e*this._scaledCellWidth,(h+1)*this._scaledCellHeight-window.devicePixelRatio-1,t*this._scaledCellWidth,window.devicePixelRatio)},s.prototype._fillLeftLineAtCell=function(e,h,t){this._ctx.fillRect(e*this._scaledCellWidth,h*this._scaledCellHeight,window.devicePixelRatio*t,this._scaledCellHeight)},s.prototype._strokeRectAtCell=function(e,h,t,n){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,h*this._scaledCellHeight+window.devicePixelRatio/2,t*this._scaledCellWidth-window.devicePixelRatio,n*this._scaledCellHeight-window.devicePixelRatio)},s.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))},s.prototype._clearCells=function(e,h,t,n){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,h*this._scaledCellHeight,t*this._scaledCellWidth,n*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,h*this._scaledCellHeight,t*this._scaledCellWidth,n*this._scaledCellHeight))},s.prototype._fillCharTrueColor=function(e,h,t){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(t),this._ctx.fillText(e.getChars(),h*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},s.prototype._drawChars=function(e,h,t){var n,l,c=this._getContrastColor(e);c||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,h,t,c):(e.isInverse()?(n=e.isBgDefault()?C.INVERTED_DEFAULT_COLOR:e.getBgColor(),l=e.isFgDefault()?C.INVERTED_DEFAULT_COLOR:e.getFgColor()):(l=e.isBgDefault()?y.DEFAULT_COLOR:e.getBgColor(),n=e.isFgDefault()?y.DEFAULT_COLOR:e.getFgColor()),n+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&n<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||y.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||y.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=l,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,h*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,h,t))},s.prototype._drawUncachedChars=function(e,h,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 l=e.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].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 c=e.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}this._clipRow(t),e.isDim()&&(this._ctx.globalAlpha=C.DIM_OPACITY),this._ctx.fillText(e.getChars(),h*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},s.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},s.prototype._getFont=function(e,h){return(h?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},s.prototype._getContrastColor=function(e){if(this._optionsService.options.minimumContrastRatio!==1){var h=this._colors.contrastCache.getColor(e.bg,e.fg);if(h!==void 0)return h||void 0;var t=e.getFgColor(),n=e.getFgColorMode(),l=e.getBgColor(),c=e.getBgColorMode(),v=!!e.isInverse(),S=!!e.isInverse();if(v){var p=t;t=l,l=p;var m=n;n=c,c=m}var g=this._resolveBackgroundRgba(c,l,v),x=this._resolveForegroundRgba(n,t,v,S),k=d.rgba.ensureContrastRatio(g,x,this._optionsService.options.minimumContrastRatio);if(k){var w={css:d.channels.toCss(k>>24&255,k>>16&255,k>>8&255),rgba:k};return this._colors.contrastCache.setColor(e.bg,e.fg,w),w}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},s.prototype._resolveBackgroundRgba=function(e,h,t){switch(e){case 16777216:case 33554432:return this._colors.ansi[h].rgba;case 50331648:return h<<8;case 0:default:return t?this._colors.foreground.rgba:this._colors.background.rgba}},s.prototype._resolveForegroundRgba=function(e,h,t,n){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&n&&h<8&&(h+=8),this._colors.ansi[h].rgba;case 50331648:return h<<8;case 0:default:return t?this._colors.background.rgba:this._colors.foreground.rgba}},s}();a.BaseRenderLayer=i},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;function y(C,_,o){_.di$target===_?_.di$dependencies.push({id:C,index:o}):(_.di$dependencies=[{id:C,index:o}],_.di$target=_)}a.serviceRegistry=new Map,a.getServiceDependencies=function(C){return C.di$dependencies||[]},a.createDecorator=function(C){if(a.serviceRegistry.has(C))return a.serviceRegistry.get(C);var _=function(o,u,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");y(_,o,d)};return _.toString=function(){return C},a.serviceRegistry.set(C,_),_}},function(L,a,f){"use strict";function y(C,_,o,u){if(o===void 0&&(o=0),u===void 0&&(u=C.length),o>=C.length)return C;o=(C.length+o)%C.length,u=u>=C.length?C.length:(C.length+u)%C.length;for(var d=o;d<u;++d)C[d]=_;return C}Object.defineProperty(a,"__esModule",{value:!0}),a.concat=a.fillFallback=a.fill=void 0,a.fill=function(C,_,o,u){return C.fill?C.fill(_,o,u):y(C,_,o,u)},a.fillFallback=y,a.concat=function(C,_){var o=new C.constructor(C.length+_.length);return o.set(C),o.set(_,C.length),o}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;var y=f(8),C=f(3),_=f(4),o=f(6);a.DEFAULT_ATTR_DATA=Object.freeze(new o.AttributeData);var u=function(){function d(r,i,s){s===void 0&&(s=!1),this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);for(var e=i||_.CellData.fromCharData([0,C.NULL_CELL_CHAR,C.NULL_CELL_WIDTH,C.NULL_CELL_CODE]),h=0;h<r;++h)this.setCell(h,e);this.length=r}return d.prototype.get=function(r){var i=this._data[3*r+0],s=2097151&i;return[this._data[3*r+1],2097152&i?this._combined[r]:s?y.stringFromCodePoint(s):"",i>>22,2097152&i?this._combined[r].charCodeAt(this._combined[r].length-1):s]},d.prototype.set=function(r,i){this._data[3*r+1]=i[C.CHAR_DATA_ATTR_INDEX],i[C.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=i[1],this._data[3*r+0]=2097152|r|i[C.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=i[C.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|i[C.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?y.stringFromCodePoint(2097151&i):""},d.prototype.loadCell=function(r,i){var s=3*r;return i.content=this._data[s+0],i.fg=this._data[s+1],i.bg=this._data[s+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,s,e,h,t){268435456&h&&(this._extendedAttrs[r]=t),this._data[3*r+0]=i|s<<22,this._data[3*r+1]=e,this._data[3*r+2]=h},d.prototype.addCodepointToCell=function(r,i){var s=this._data[3*r+0];2097152&s?this._combined[r]+=y.stringFromCodePoint(i):(2097151&s?(this._combined[r]=y.stringFromCodePoint(2097151&s)+y.stringFromCodePoint(i),s&=-2097152,s|=2097152):s=i|1<<22,this._data[3*r+0]=s)},d.prototype.insertCells=function(r,i,s,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 h=new _.CellData,t=this.length-r-i-1;t>=0;--t)this.setCell(r+i+t,this.loadCell(r+t,h));for(t=0;t<i;++t)this.setCell(r+t,s)}else for(t=r;t<this.length;++t)this.setCell(t,s);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,s,e){if(r%=this.length,i<this.length-r){for(var h=new _.CellData,t=0;t<this.length-r-i;++t)this.setCell(r+t,this.loadCell(r+i+t,h));for(t=this.length-i;t<this.length;++t)this.setCell(t,s)}else for(t=r;t<this.length;++t)this.setCell(t,s);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,s,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++,s)},d.prototype.resize=function(r,i){if(r!==this.length){if(r>this.length){var s=new Uint32Array(3*r);this.length&&(3*r<this._data.length?s.set(this._data.subarray(0,3*r)):s.set(this._data)),this._data=s;for(var e=this.length;e<r;++e)this.setCell(e,i)}else if(r){(s=new Uint32Array(3*r)).set(this._data.subarray(0,3*r)),this._data=s;var h=Object.keys(this._combined);for(e=0;e<h.length;e++){var t=parseInt(h[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,s,e,h){var t=r._data;if(h)for(var n=e-1;n>=0;n--)for(var l=0;l<3;l++)this._data[3*(s+n)+l]=t[3*(i+n)+l];else for(n=0;n<e;n++)for(l=0;l<3;l++)this._data[3*(s+n)+l]=t[3*(i+n)+l];var c=Object.keys(r._combined);for(l=0;l<c.length;l++){var v=parseInt(c[l],10);v>=i&&(this._combined[v-i+s]=r._combined[v])}},d.prototype.translateToString=function(r,i,s){r===void 0&&(r=!1),i===void 0&&(i=0),s===void 0&&(s=this.length),r&&(s=Math.min(s,this.getTrimmedLength()));for(var e="";i<s;){var h=this._data[3*i+0],t=2097151&h;e+=2097152&h?this._combined[i]:t?y.stringFromCodePoint(t):C.WHITESPACE_CELL_CHAR,i+=h>>22||1}return e},d}();a.BufferLine=u},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.removeElementFromParent=void 0,a.removeElementFromParent=function(){for(var y,C=[],_=0;_<arguments.length;_++)C[_]=arguments[_];for(var o=0,u=C;o<u.length;o++){var d=u[o];(y=d==null?void 0:d.parentElement)===null||y===void 0||y.removeChild(d)}}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(x,k){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,E){w.__proto__=E}||function(w,E){for(var T in E)E.hasOwnProperty(T)&&(w[T]=E[T])})(x,k)},function(x,k){function w(){this.constructor=x}y(x,k),x.prototype=k===null?Object.create(k):(w.prototype=k.prototype,new w)});Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;var _,o=f(12),u=f(20),d=f(39),r=f(2),i=f(15),s=f(8),e=f(16),h=f(0),t=f(3),n=f(4),l=f(6),c=f(22),v=f(24),S={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function p(x,k){if(x>24)return k.setWinLines||!1;switch(x){case 1:return!!k.restoreWin;case 2:return!!k.minimizeWin;case 3:return!!k.setWinPosition;case 4:return!!k.setWinSizePixels;case 5:return!!k.raiseWin;case 6:return!!k.lowerWin;case 7:return!!k.refreshWin;case 8:return!!k.setWinSizeChars;case 9:return!!k.maximizeWin;case 10:return!!k.fullscreenWin;case 11:return!!k.getWinState;case 13:return!!k.getWinPosition;case 14:return!!k.getWinSizePixels;case 15:return!!k.getScreenSizePixels;case 16:return!!k.getCellSizePixels;case 18:return!!k.getWinSizeChars;case 19:return!!k.getScreenSizeChars;case 20:return!!k.getIconTitle;case 21:return!!k.getWinTitle;case 22:return!!k.pushTitle;case 23:return!!k.popTitle;case 24:return!!k.setWinLines}return!1}(function(x){x[x.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",x[x.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(_=a.WindowsOptionsReportType||(a.WindowsOptionsReportType={}));var m=function(){function x(k,w,E,T){this._bufferService=k,this._coreService=w,this._logService=E,this._optionsService=T,this._data=new Uint32Array(0)}return x.prototype.hook=function(k){this._data=new Uint32Array(0)},x.prototype.put=function(k,w,E){this._data=i.concat(this._data,k.subarray(w,E))},x.prototype.unhook=function(k){if(k){var w=s.utf32ToString(this._data);switch(this._data=new Uint32Array(0),w){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 E=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r"+E+o.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r0m"+o.C0.ESC+"\\");case" q":var T={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return T-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(o.C0.ESC+"P1$r"+T+" q"+o.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",w),this._coreService.triggerDataEvent(o.C0.ESC+"P0$r"+o.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},x}(),g=function(x){function k(w,E,T,A,B,j,ye,re,ce){ce===void 0&&(ce=new d.EscapeSequenceParser);var P=x.call(this)||this;P._bufferService=w,P._charsetService=E,P._coreService=T,P._dirtyRowService=A,P._logService=B,P._optionsService=j,P._coreMouseService=ye,P._unicodeService=re,P._parser=ce,P._parseBuffer=new Uint32Array(4096),P._stringDecoder=new s.StringToUtf32,P._utf8Decoder=new s.Utf8ToUtf32,P._workCell=new n.CellData,P._windowTitle="",P._iconName="",P._windowTitleStack=[],P._iconNameStack=[],P._curAttrData=e.DEFAULT_ATTR_DATA.clone(),P._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone(),P._onRequestBell=new h.EventEmitter,P._onRequestRefreshRows=new h.EventEmitter,P._onRequestReset=new h.EventEmitter,P._onRequestScroll=new h.EventEmitter,P._onRequestSyncScrollBar=new h.EventEmitter,P._onRequestWindowsOptionsReport=new h.EventEmitter,P._onA11yChar=new h.EventEmitter,P._onA11yTab=new h.EventEmitter,P._onCursorMove=new h.EventEmitter,P._onLineFeed=new h.EventEmitter,P._onScroll=new h.EventEmitter,P._onTitleChange=new h.EventEmitter,P.register(P._parser),P._parser.setCsiHandlerFallback(function(W,ie){P._logService.debug("Unknown CSI code: ",{identifier:P._parser.identToString(W),params:ie.toArray()})}),P._parser.setEscHandlerFallback(function(W){P._logService.debug("Unknown ESC code: ",{identifier:P._parser.identToString(W)})}),P._parser.setExecuteHandlerFallback(function(W){P._logService.debug("Unknown EXECUTE code: ",{code:W})}),P._parser.setOscHandlerFallback(function(W,ie,me){P._logService.debug("Unknown OSC code: ",{identifier:W,action:ie,data:me})}),P._parser.setDcsHandlerFallback(function(W,ie,me){ie==="HOOK"&&(me=me.toArray()),P._logService.debug("Unknown DCS code: ",{identifier:P._parser.identToString(W),action:ie,payload:me})}),P._parser.setPrintHandler(function(W,ie,me){return P.print(W,ie,me)}),P._parser.setCsiHandler({final:"@"},function(W){return P.insertChars(W)}),P._parser.setCsiHandler({intermediates:" ",final:"@"},function(W){return P.scrollLeft(W)}),P._parser.setCsiHandler({final:"A"},function(W){return P.cursorUp(W)}),P._parser.setCsiHandler({intermediates:" ",final:"A"},function(W){return P.scrollRight(W)}),P._parser.setCsiHandler({final:"B"},function(W){return P.cursorDown(W)}),P._parser.setCsiHandler({final:"C"},function(W){return P.cursorForward(W)}),P._parser.setCsiHandler({final:"D"},function(W){return P.cursorBackward(W)}),P._parser.setCsiHandler({final:"E"},function(W){return P.cursorNextLine(W)}),P._parser.setCsiHandler({final:"F"},function(W){return P.cursorPrecedingLine(W)}),P._parser.setCsiHandler({final:"G"},function(W){return P.cursorCharAbsolute(W)}),P._parser.setCsiHandler({final:"H"},function(W){return P.cursorPosition(W)}),P._parser.setCsiHandler({final:"I"},function(W){return P.cursorForwardTab(W)}),P._parser.setCsiHandler({final:"J"},function(W){return P.eraseInDisplay(W)}),P._parser.setCsiHandler({prefix:"?",final:"J"},function(W){return P.eraseInDisplay(W)}),P._parser.setCsiHandler({final:"K"},function(W){return P.eraseInLine(W)}),P._parser.setCsiHandler({prefix:"?",final:"K"},function(W){return P.eraseInLine(W)}),P._parser.setCsiHandler({final:"L"},function(W){return P.insertLines(W)}),P._parser.setCsiHandler({final:"M"},function(W){return P.deleteLines(W)}),P._parser.setCsiHandler({final:"P"},function(W){return P.deleteChars(W)}),P._parser.setCsiHandler({final:"S"},function(W){return P.scrollUp(W)}),P._parser.setCsiHandler({final:"T"},function(W){return P.scrollDown(W)}),P._parser.setCsiHandler({final:"X"},function(W){return P.eraseChars(W)}),P._parser.setCsiHandler({final:"Z"},function(W){return P.cursorBackwardTab(W)}),P._parser.setCsiHandler({final:"`"},function(W){return P.charPosAbsolute(W)}),P._parser.setCsiHandler({final:"a"},function(W){return P.hPositionRelative(W)}),P._parser.setCsiHandler({final:"b"},function(W){return P.repeatPrecedingCharacter(W)}),P._parser.setCsiHandler({final:"c"},function(W){return P.sendDeviceAttributesPrimary(W)}),P._parser.setCsiHandler({prefix:">",final:"c"},function(W){return P.sendDeviceAttributesSecondary(W)}),P._parser.setCsiHandler({final:"d"},function(W){return P.linePosAbsolute(W)}),P._parser.setCsiHandler({final:"e"},function(W){return P.vPositionRelative(W)}),P._parser.setCsiHandler({final:"f"},function(W){return P.hVPosition(W)}),P._parser.setCsiHandler({final:"g"},function(W){return P.tabClear(W)}),P._parser.setCsiHandler({final:"h"},function(W){return P.setMode(W)}),P._parser.setCsiHandler({prefix:"?",final:"h"},function(W){return P.setModePrivate(W)}),P._parser.setCsiHandler({final:"l"},function(W){return P.resetMode(W)}),P._parser.setCsiHandler({prefix:"?",final:"l"},function(W){return P.resetModePrivate(W)}),P._parser.setCsiHandler({final:"m"},function(W){return P.charAttributes(W)}),P._parser.setCsiHandler({final:"n"},function(W){return P.deviceStatus(W)}),P._parser.setCsiHandler({prefix:"?",final:"n"},function(W){return P.deviceStatusPrivate(W)}),P._parser.setCsiHandler({intermediates:"!",final:"p"},function(W){return P.softReset(W)}),P._parser.setCsiHandler({intermediates:" ",final:"q"},function(W){return P.setCursorStyle(W)}),P._parser.setCsiHandler({final:"r"},function(W){return P.setScrollRegion(W)}),P._parser.setCsiHandler({final:"s"},function(W){return P.saveCursor(W)}),P._parser.setCsiHandler({final:"t"},function(W){return P.windowOptions(W)}),P._parser.setCsiHandler({final:"u"},function(W){return P.restoreCursor(W)}),P._parser.setCsiHandler({intermediates:"'",final:"}"},function(W){return P.insertColumns(W)}),P._parser.setCsiHandler({intermediates:"'",final:"~"},function(W){return P.deleteColumns(W)}),P._parser.setExecuteHandler(o.C0.BEL,function(){return P.bell()}),P._parser.setExecuteHandler(o.C0.LF,function(){return P.lineFeed()}),P._parser.setExecuteHandler(o.C0.VT,function(){return P.lineFeed()}),P._parser.setExecuteHandler(o.C0.FF,function(){return P.lineFeed()}),P._parser.setExecuteHandler(o.C0.CR,function(){return P.carriageReturn()}),P._parser.setExecuteHandler(o.C0.BS,function(){return P.backspace()}),P._parser.setExecuteHandler(o.C0.HT,function(){return P.tab()}),P._parser.setExecuteHandler(o.C0.SO,function(){return P.shiftOut()}),P._parser.setExecuteHandler(o.C0.SI,function(){return P.shiftIn()}),P._parser.setExecuteHandler(o.C1.IND,function(){return P.index()}),P._parser.setExecuteHandler(o.C1.NEL,function(){return P.nextLine()}),P._parser.setExecuteHandler(o.C1.HTS,function(){return P.tabSet()}),P._parser.setOscHandler(0,new c.OscHandler(function(W){P.setTitle(W),P.setIconName(W)})),P._parser.setOscHandler(1,new c.OscHandler(function(W){return P.setIconName(W)})),P._parser.setOscHandler(2,new c.OscHandler(function(W){return P.setTitle(W)})),P._parser.setEscHandler({final:"7"},function(){return P.saveCursor()}),P._parser.setEscHandler({final:"8"},function(){return P.restoreCursor()}),P._parser.setEscHandler({final:"D"},function(){return P.index()}),P._parser.setEscHandler({final:"E"},function(){return P.nextLine()}),P._parser.setEscHandler({final:"H"},function(){return P.tabSet()}),P._parser.setEscHandler({final:"M"},function(){return P.reverseIndex()}),P._parser.setEscHandler({final:"="},function(){return P.keypadApplicationMode()}),P._parser.setEscHandler({final:">"},function(){return P.keypadNumericMode()}),P._parser.setEscHandler({final:"c"},function(){return P.fullReset()}),P._parser.setEscHandler({final:"n"},function(){return P.setgLevel(2)}),P._parser.setEscHandler({final:"o"},function(){return P.setgLevel(3)}),P._parser.setEscHandler({final:"|"},function(){return P.setgLevel(3)}),P._parser.setEscHandler({final:"}"},function(){return P.setgLevel(2)}),P._parser.setEscHandler({final:"~"},function(){return P.setgLevel(1)}),P._parser.setEscHandler({intermediates:"%",final:"@"},function(){return P.selectDefaultCharset()}),P._parser.setEscHandler({intermediates:"%",final:"G"},function(){return P.selectDefaultCharset()});var N=function(W){H._parser.setEscHandler({intermediates:"(",final:W},function(){return P.selectCharset("("+W)}),H._parser.setEscHandler({intermediates:")",final:W},function(){return P.selectCharset(")"+W)}),H._parser.setEscHandler({intermediates:"*",final:W},function(){return P.selectCharset("*"+W)}),H._parser.setEscHandler({intermediates:"+",final:W},function(){return P.selectCharset("+"+W)}),H._parser.setEscHandler({intermediates:"-",final:W},function(){return P.selectCharset("-"+W)}),H._parser.setEscHandler({intermediates:".",final:W},function(){return P.selectCharset("."+W)}),H._parser.setEscHandler({intermediates:"/",final:W},function(){return P.selectCharset("/"+W)})},H=this;for(var Y in u.CHARSETS)N(Y);return P._parser.setEscHandler({intermediates:"#",final:"8"},function(){return P.screenAlignmentPattern()}),P._parser.setErrorHandler(function(W){return P._logService.error("Parsing error: ",W),W}),P._parser.setDcsHandler({intermediates:"$",final:"q"},new m(P._bufferService,P._coreService,P._logService,P._optionsService)),P}return C(k,x),Object.defineProperty(k.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),k.prototype.dispose=function(){x.prototype.dispose.call(this)},k.prototype.parse=function(w){var E=this._bufferService.buffer,T=E.x,A=E.y;if(this._logService.debug("parsing data",w),this._parseBuffer.length<w.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(w.length,131072))),this._dirtyRowService.clearRange(),w.length>131072)for(var B=0;B<w.length;B+=131072){var j=B+131072<w.length?B+131072:w.length,ye=typeof w=="string"?this._stringDecoder.decode(w.substring(B,j),this._parseBuffer):this._utf8Decoder.decode(w.subarray(B,j),this._parseBuffer);this._parser.parse(this._parseBuffer,ye)}else ye=typeof w=="string"?this._stringDecoder.decode(w,this._parseBuffer):this._utf8Decoder.decode(w,this._parseBuffer),this._parser.parse(this._parseBuffer,ye);(E=this._bufferService.buffer).x===T&&E.y===A||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},k.prototype.print=function(w,E,T){var A,B,j=this._bufferService.buffer,ye=this._charsetService.charset,re=this._optionsService.options.screenReaderMode,ce=this._bufferService.cols,P=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,H=this._curAttrData,Y=j.lines.get(j.ybase+j.y);this._dirtyRowService.markDirty(j.y),j.x&&T-E>0&&Y.getWidth(j.x-1)===2&&Y.setCellFromCodePoint(j.x-1,0,1,H.fg,H.bg,H.extended);for(var W=E;W<T;++W){if(A=w[W],B=this._unicodeService.wcwidth(A),A<127&&ye){var ie=ye[String.fromCharCode(A)];ie&&(A=ie.charCodeAt(0))}if(re&&this._onA11yChar.fire(s.stringFromCodePoint(A)),B||!j.x){if(j.x+B-1>=ce){if(P){for(;j.x<ce;)Y.setCellFromCodePoint(j.x++,0,1,H.fg,H.bg,H.extended);j.x=0,j.y++,j.y===j.scrollBottom+1?(j.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(j.y>=this._bufferService.rows&&(j.y=this._bufferService.rows-1),j.lines.get(j.ybase+j.y).isWrapped=!0),Y=j.lines.get(j.ybase+j.y)}else if(j.x=ce-1,B===2)continue}if(N&&(Y.insertCells(j.x,B,j.getNullCell(H),H),Y.getWidth(ce-1)===2&&Y.setCellFromCodePoint(ce-1,t.NULL_CELL_CODE,t.NULL_CELL_WIDTH,H.fg,H.bg,H.extended)),Y.setCellFromCodePoint(j.x++,A,B,H.fg,H.bg,H.extended),B>0)for(;--B;)Y.setCellFromCodePoint(j.x++,0,0,H.fg,H.bg,H.extended)}else Y.getWidth(j.x-1)?Y.addCodepointToCell(j.x-1,A):Y.addCodepointToCell(j.x-2,A)}T-E>0&&(Y.loadCell(j.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),j.x<ce&&T-E>0&&Y.getWidth(j.x)===0&&!Y.hasContent(j.x)&&Y.setCellFromCodePoint(j.x,0,1,H.fg,H.bg,H.extended),this._dirtyRowService.markDirty(j.y)},k.prototype.addCsiHandler=function(w,E){var T=this;return w.final!=="t"||w.prefix||w.intermediates?this._parser.addCsiHandler(w,E):this._parser.addCsiHandler(w,function(A){return!p(A.params[0],T._optionsService.options.windowOptions)||E(A)})},k.prototype.addDcsHandler=function(w,E){return this._parser.addDcsHandler(w,new v.DcsHandler(E))},k.prototype.addEscHandler=function(w,E){return this._parser.addEscHandler(w,E)},k.prototype.addOscHandler=function(w,E){return this._parser.addOscHandler(w,new c.OscHandler(E))},k.prototype.bell=function(){this._onRequestBell.fire()},k.prototype.lineFeed=function(){var w=this._bufferService.buffer;this._dirtyRowService.markDirty(w.y),this._optionsService.options.convertEol&&(w.x=0),w.y++,w.y===w.scrollBottom+1?(w.y--,this._onRequestScroll.fire(this._eraseAttrData())):w.y>=this._bufferService.rows&&(w.y=this._bufferService.rows-1),w.x>=this._bufferService.cols&&w.x--,this._dirtyRowService.markDirty(w.y),this._onLineFeed.fire()},k.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},k.prototype.backspace=function(){var w,E=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(E.x>0&&E.x--);if(this._restrictCursor(this._bufferService.cols),E.x>0)E.x--;else if(E.x===0&&E.y>E.scrollTop&&E.y<=E.scrollBottom&&(!((w=E.lines.get(E.ybase+E.y))===null||w===void 0)&&w.isWrapped)){E.lines.get(E.ybase+E.y).isWrapped=!1,E.y--,E.x=this._bufferService.cols-1;var T=E.lines.get(E.ybase+E.y);T.hasWidth(E.x)&&!T.hasContent(E.x)&&E.x--}this._restrictCursor()},k.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var w=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-w)}},k.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},k.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},k.prototype._restrictCursor=function(w){w===void 0&&(w=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(w,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)},k.prototype._setCursor=function(w,E){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=w,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+E):(this._bufferService.buffer.x=w,this._bufferService.buffer.y=E),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},k.prototype._moveCursor=function(w,E){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+w,this._bufferService.buffer.y+E)},k.prototype.cursorUp=function(w){var E=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;E>=0?this._moveCursor(0,-Math.min(E,w.params[0]||1)):this._moveCursor(0,-(w.params[0]||1))},k.prototype.cursorDown=function(w){var E=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;E>=0?this._moveCursor(0,Math.min(E,w.params[0]||1)):this._moveCursor(0,w.params[0]||1)},k.prototype.cursorForward=function(w){this._moveCursor(w.params[0]||1,0)},k.prototype.cursorBackward=function(w){this._moveCursor(-(w.params[0]||1),0)},k.prototype.cursorNextLine=function(w){this.cursorDown(w),this._bufferService.buffer.x=0},k.prototype.cursorPrecedingLine=function(w){this.cursorUp(w),this._bufferService.buffer.x=0},k.prototype.cursorCharAbsolute=function(w){this._setCursor((w.params[0]||1)-1,this._bufferService.buffer.y)},k.prototype.cursorPosition=function(w){this._setCursor(w.length>=2?(w.params[1]||1)-1:0,(w.params[0]||1)-1)},k.prototype.charPosAbsolute=function(w){this._setCursor((w.params[0]||1)-1,this._bufferService.buffer.y)},k.prototype.hPositionRelative=function(w){this._moveCursor(w.params[0]||1,0)},k.prototype.linePosAbsolute=function(w){this._setCursor(this._bufferService.buffer.x,(w.params[0]||1)-1)},k.prototype.vPositionRelative=function(w){this._moveCursor(0,w.params[0]||1)},k.prototype.hVPosition=function(w){this.cursorPosition(w)},k.prototype.tabClear=function(w){var E=w.params[0];E===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:E===3&&(this._bufferService.buffer.tabs={})},k.prototype.cursorForwardTab=function(w){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var E=w.params[0]||1;E--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},k.prototype.cursorBackwardTab=function(w){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var E=w.params[0]||1,T=this._bufferService.buffer;E--;)T.x=T.prevStop()},k.prototype._eraseInBufferLine=function(w,E,T,A){A===void 0&&(A=!1);var B=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+w);B.replaceCells(E,T,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),A&&(B.isWrapped=!1)},k.prototype._resetBufferLine=function(w){var E=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+w);E.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),E.isWrapped=!1},k.prototype.eraseInDisplay=function(w){var E;switch(this._restrictCursor(),w.params[0]){case 0:for(E=this._bufferService.buffer.y,this._dirtyRowService.markDirty(E),this._eraseInBufferLine(E++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);E<this._bufferService.rows;E++)this._resetBufferLine(E);this._dirtyRowService.markDirty(E);break;case 1:for(E=this._bufferService.buffer.y,this._dirtyRowService.markDirty(E),this._eraseInBufferLine(E,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(E+1).isWrapped=!1);E--;)this._resetBufferLine(E);this._dirtyRowService.markDirty(0);break;case 2:for(E=this._bufferService.rows,this._dirtyRowService.markDirty(E-1);E--;)this._resetBufferLine(E);this._dirtyRowService.markDirty(0);break;case 3:var T=this._bufferService.buffer.lines.length-this._bufferService.rows;T>0&&(this._bufferService.buffer.lines.trimStart(T),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-T,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-T,0),this._onScroll.fire(0))}},k.prototype.eraseInLine=function(w){switch(this._restrictCursor(),w.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)},k.prototype.insertLines=function(w){this._restrictCursor();var E=w.params[0]||1,T=this._bufferService.buffer;if(!(T.y>T.scrollBottom||T.y<T.scrollTop)){for(var A=T.ybase+T.y,B=this._bufferService.rows-1-T.scrollBottom,j=this._bufferService.rows-1+T.ybase-B+1;E--;)T.lines.splice(j-1,1),T.lines.splice(A,0,T.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(T.y,T.scrollBottom),T.x=0}},k.prototype.deleteLines=function(w){this._restrictCursor();var E=w.params[0]||1,T=this._bufferService.buffer;if(!(T.y>T.scrollBottom||T.y<T.scrollTop)){var A,B=T.ybase+T.y;for(A=this._bufferService.rows-1-T.scrollBottom,A=this._bufferService.rows-1+T.ybase-A;E--;)T.lines.splice(B,1),T.lines.splice(A,0,T.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(T.y,T.scrollBottom),T.x=0}},k.prototype.insertChars=function(w){this._restrictCursor();var E=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);E&&(E.insertCells(this._bufferService.buffer.x,w.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},k.prototype.deleteChars=function(w){this._restrictCursor();var E=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);E&&(E.deleteCells(this._bufferService.buffer.x,w.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},k.prototype.scrollUp=function(w){for(var E=w.params[0]||1,T=this._bufferService.buffer;E--;)T.lines.splice(T.ybase+T.scrollTop,1),T.lines.splice(T.ybase+T.scrollBottom,0,T.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(T.scrollTop,T.scrollBottom)},k.prototype.scrollDown=function(w){for(var E=w.params[0]||1,T=this._bufferService.buffer;E--;)T.lines.splice(T.ybase+T.scrollBottom,1),T.lines.splice(T.ybase+T.scrollTop,0,T.getBlankLine(e.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(T.scrollTop,T.scrollBottom)},k.prototype.scrollLeft=function(w){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=w.params[0]||1,A=E.scrollTop;A<=E.scrollBottom;++A){var B=E.lines.get(E.ybase+A);B.deleteCells(0,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),B.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},k.prototype.scrollRight=function(w){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=w.params[0]||1,A=E.scrollTop;A<=E.scrollBottom;++A){var B=E.lines.get(E.ybase+A);B.insertCells(0,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),B.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},k.prototype.insertColumns=function(w){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=w.params[0]||1,A=E.scrollTop;A<=E.scrollBottom;++A){var B=this._bufferService.buffer.lines.get(E.ybase+A);B.insertCells(E.x,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),B.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},k.prototype.deleteColumns=function(w){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=w.params[0]||1,A=E.scrollTop;A<=E.scrollBottom;++A){var B=E.lines.get(E.ybase+A);B.deleteCells(E.x,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),B.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},k.prototype.eraseChars=function(w){this._restrictCursor();var E=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);E&&(E.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(w.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},k.prototype.repeatPrecedingCharacter=function(w){if(this._parser.precedingCodepoint){for(var E=w.params[0]||1,T=new Uint32Array(E),A=0;A<E;++A)T[A]=this._parser.precedingCodepoint;this.print(T,0,T.length)}},k.prototype.sendDeviceAttributesPrimary=function(w){w.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"))},k.prototype.sendDeviceAttributesSecondary=function(w){w.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(w.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c"))},k.prototype._is=function(w){return(this._optionsService.options.termName+"").indexOf(w)===0},k.prototype.setMode=function(w){for(var E=0;E<w.length;E++)switch(w.params[E]){case 4:this._coreService.modes.insertMode=!0}},k.prototype.setModePrivate=function(w){for(var E=0;E<w.length;E++)switch(w.params[E]){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}},k.prototype.resetMode=function(w){for(var E=0;E<w.length;E++)switch(w.params[E]){case 4:this._coreService.modes.insertMode=!1}},k.prototype.resetModePrivate=function(w){for(var E=0;E<w.length;E++)switch(w.params[E]){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(),w.params[E]===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}},k.prototype._updateAttrColor=function(w,E,T,A,B){return E===2?(w|=50331648,w&=-16777216,w|=l.AttributeData.fromColorRGB([T,A,B])):E===5&&(w&=-50331904,w|=33554432|255&T),w},k.prototype._extractColor=function(w,E,T){var A=[0,0,-1,0,0,0],B=0,j=0;do{if(A[j+B]=w.params[E+j],w.hasSubParams(E+j)){var ye=w.getSubParams(E+j),re=0;do A[1]===5&&(B=1),A[j+re+1+B]=ye[re];while(++re<ye.length&&re+j+1+B<A.length);break}if(A[1]===5&&j+B>=2||A[1]===2&&j+B>=5)break;A[1]&&(B=1)}while(++j+E<w.length&&j+B<A.length);for(re=2;re<A.length;++re)A[re]===-1&&(A[re]=0);switch(A[0]){case 38:T.fg=this._updateAttrColor(T.fg,A[1],A[3],A[4],A[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,A[1],A[3],A[4],A[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,A[1],A[3],A[4],A[5])}return j},k.prototype._processUnderline=function(w,E){E.extended=E.extended.clone(),(!~w||w>5)&&(w=1),E.extended.underlineStyle=w,E.fg|=268435456,w===0&&(E.fg&=-268435457),E.updateExtended()},k.prototype.charAttributes=function(w){if(w.length===1&&w.params[0]===0)return this._curAttrData.fg=e.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=e.DEFAULT_ATTR_DATA.bg);for(var E,T=w.length,A=this._curAttrData,B=0;B<T;B++)(E=w.params[B])>=30&&E<=37?(A.fg&=-50331904,A.fg|=16777216|E-30):E>=40&&E<=47?(A.bg&=-50331904,A.bg|=16777216|E-40):E>=90&&E<=97?(A.fg&=-50331904,A.fg|=16777224|E-90):E>=100&&E<=107?(A.bg&=-50331904,A.bg|=16777224|E-100):E===0?(A.fg=e.DEFAULT_ATTR_DATA.fg,A.bg=e.DEFAULT_ATTR_DATA.bg):E===1?A.fg|=134217728:E===3?A.bg|=67108864:E===4?(A.fg|=268435456,this._processUnderline(w.hasSubParams(B)?w.getSubParams(B)[0]:1,A)):E===5?A.fg|=536870912:E===7?A.fg|=67108864:E===8?A.fg|=1073741824:E===2?A.bg|=134217728:E===21?this._processUnderline(2,A):E===22?(A.fg&=-134217729,A.bg&=-134217729):E===23?A.bg&=-67108865:E===24?A.fg&=-268435457:E===25?A.fg&=-536870913:E===27?A.fg&=-67108865:E===28?A.fg&=-1073741825:E===39?(A.fg&=-67108864,A.fg|=16777215&e.DEFAULT_ATTR_DATA.fg):E===49?(A.bg&=-67108864,A.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):E===38||E===48||E===58?B+=this._extractColor(w,B,A):E===59?(A.extended=A.extended.clone(),A.extended.underlineColor=-1,A.updateExtended()):E===100?(A.fg&=-67108864,A.fg|=16777215&e.DEFAULT_ATTR_DATA.fg,A.bg&=-67108864,A.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",E)},k.prototype.deviceStatus=function(w){switch(w.params[0]){case 5:this._coreService.triggerDataEvent(o.C0.ESC+"[0n");break;case 6:var E=this._bufferService.buffer.y+1,T=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"["+E+";"+T+"R")}},k.prototype.deviceStatusPrivate=function(w){switch(w.params[0]){case 6:var E=this._bufferService.buffer.y+1,T=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"[?"+E+";"+T+"R")}},k.prototype.softReset=function(w){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},k.prototype.setCursorStyle=function(w){var E=w.params[0]||1;switch(E){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 T=E%2==1;this._optionsService.options.cursorBlink=T},k.prototype.setScrollRegion=function(w){var E,T=w.params[0]||1;(w.length<2||(E=w.params[1])>this._bufferService.rows||E===0)&&(E=this._bufferService.rows),E>T&&(this._bufferService.buffer.scrollTop=T-1,this._bufferService.buffer.scrollBottom=E-1,this._setCursor(0,0))},k.prototype.windowOptions=function(w){if(p(w.params[0],this._optionsService.options.windowOptions)){var E=w.length>1?w.params[1]:0;switch(w.params[0]){case 14:E!==2&&this._onRequestWindowsOptionsReport.fire(_.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(_.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:E!==0&&E!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),E!==0&&E!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:E!==0&&E!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),E!==0&&E!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},k.prototype.saveCursor=function(w){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},k.prototype.restoreCursor=function(w){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()},k.prototype.setTitle=function(w){this._windowTitle=w,this._onTitleChange.fire(w)},k.prototype.setIconName=function(w){this._iconName=w},k.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},k.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},k.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},k.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,u.DEFAULT_CHARSET)},k.prototype.selectCharset=function(w){w.length===2?w[0]!=="/"&&this._charsetService.setgCharset(S[w[0]],u.CHARSETS[w[1]]||u.DEFAULT_CHARSET):this.selectDefaultCharset()},k.prototype.index=function(){this._restrictCursor();var w=this._bufferService.buffer;this._bufferService.buffer.y++,w.y===w.scrollBottom+1?(w.y--,this._onRequestScroll.fire(this._eraseAttrData())):w.y>=this._bufferService.rows&&(w.y=this._bufferService.rows-1),this._restrictCursor()},k.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},k.prototype.reverseIndex=function(){this._restrictCursor();var w=this._bufferService.buffer;if(w.y===w.scrollTop){var E=w.scrollBottom-w.scrollTop;w.lines.shiftElements(w.ybase+w.y,E,1),w.lines.set(w.ybase+w.y,w.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(w.scrollTop,w.scrollBottom)}else w.y--,this._restrictCursor()},k.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},k.prototype.reset=function(){this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone()},k.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},k.prototype.setgLevel=function(w){this._charsetService.setgLevel(w)},k.prototype.screenAlignmentPattern=function(){var w=new n.CellData;w.content=1<<22|69,w.fg=this._curAttrData.fg,w.bg=this._curAttrData.bg;var E=this._bufferService.buffer;this._setCursor(0,0);for(var T=0;T<this._bufferService.rows;++T){var A=E.ybase+E.y+T,B=E.lines.get(A);B&&(B.fill(w),B.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},k}(r.Disposable);a.InputHandler=g},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},a.CHARSETS.A={"#":"\xA3"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},a.CHARSETS.C=a.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},a.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},a.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},a.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},a.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},a.CHARSETS.E=a.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},a.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},a.CHARSETS.H=a.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},a.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;var y=function(){function C(_,o){if(_===void 0&&(_=32),o===void 0&&(o=32),this.maxLength=_,this.maxSubParamsLength=o,o>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(o),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return C.fromArray=function(_){var o=new C;if(!_.length)return o;for(var u=_[0]instanceof Array?1:0;u<_.length;++u){var d=_[u];if(d instanceof Array)for(var r=0;r<d.length;++r)o.addSubParam(d[r]);else o.addParam(d)}return o},C.prototype.clone=function(){var _=new C(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_},C.prototype.toArray=function(){for(var _=[],o=0;o<this.length;++o){_.push(this.params[o]);var u=this._subParamsIdx[o]>>8,d=255&this._subParamsIdx[o];d-u>0&&_.push(Array.prototype.slice.call(this._subParams,u,d))}return _},C.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},C.prototype.addParam=function(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>2147483647?2147483647:_}},C.prototype.addSubParam=function(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>2147483647?2147483647:_,this._subParamsIdx[this.length-1]++}},C.prototype.hasSubParams=function(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0},C.prototype.getSubParams=function(_){var o=this._subParamsIdx[_]>>8,u=255&this._subParamsIdx[_];return u-o>0?this._subParams.subarray(o,u):null},C.prototype.getSubParamsAll=function(){for(var _={},o=0;o<this.length;++o){var u=this._subParamsIdx[o]>>8,d=255&this._subParamsIdx[o];d-u>0&&(_[o]=this._subParams.slice(u,d))}return _},C.prototype.addDigit=function(_){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+_,2147483647):_}},C}();a.Params=y},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;var y=f(23),C=f(8),_=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 s=i.indexOf(r);s!==-1&&i.splice(s,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 s=this._handlers[this._id];if(s)for(var e=s.length-1;e>=0;e--)s[e].put(d,r,i);else this._handlerFb(this._id,"PUT",C.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 s=d[r++];if(s===59){this._state=2,this._start();break}if(s<48||57<s)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+s-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}();a.OscParser=_;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+=C.utf32ToString(d,r,i),this._data.length>y.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}();a.OscHandler=o},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;var y=f(8),C=f(21),_=f(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,s){this._handlers[i]===void 0&&(this._handlers[i]=[]);var e=this._handlers[i];return e.push(s),{dispose:function(){var h=e.indexOf(s);h!==-1&&e.splice(h,1)}}},r.prototype.setHandler=function(i,s){this._handlers[i]=[s]},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,s){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(s);else this._handlerFb(this._ident,"HOOK",s)},r.prototype.put=function(i,s,e){if(this._active.length)for(var h=this._active.length-1;h>=0;h--)this._active[h].put(i,s,e);else this._handlerFb(this._ident,"PUT",y.utf32ToString(i,s,e))},r.prototype.unhook=function(i){if(this._active.length){for(var s=this._active.length-1;s>=0&&this._active[s].unhook(i)===!1;s--);for(s--;s>=0;s--)this._active[s].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",i);this._active=o,this._ident=0},r}();a.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,s,e){this._hitLimit||(this._data+=y.utf32ToString(i,s,e),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},r.prototype.unhook=function(i){var s;return this._hitLimit?s=!1:i&&(s=this._handler(this._data,this._params||new C.Params)),this._params=void 0,this._data="",this._hitLimit=!1,s},r}();a.DcsHandler=d},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.removeTerminalFromCache=a.acquireCharAtlas=void 0;var y=f(26),C=f(43),_=[];a.acquireCharAtlas=function(o,u,d,r,i){for(var s=y.generateConfig(r,i,o,d),e=0;e<_.length;e++){var h=(t=_[e]).ownedBy.indexOf(u);if(h>=0){if(y.configEquals(t.config,s))return t.atlas;t.ownedBy.length===1?(t.atlas.dispose(),_.splice(e,1)):t.ownedBy.splice(h,1);break}}for(e=0;e<_.length;e++){var t=_[e];if(y.configEquals(t.config,s))return t.ownedBy.push(u),t.atlas}var n={atlas:new C.DynamicCharAtlas(document,s),config:s,ownedBy:[u]};return _.push(n),n.atlas},a.removeTerminalFromCache=function(o){for(var u=0;u<_.length;u++){var d=_[u].ownedBy.indexOf(o);if(d!==-1){_[u].ownedBy.length===1?(_[u].atlas.dispose(),_.splice(u,1)):_[u].ownedBy.splice(d,1);break}}}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.is256Color=a.configEquals=a.generateConfig=void 0;var y=f(3);a.generateConfig=function(C,_,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:C,scaledCharHeight:_,fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,fontWeightBold:o.fontWeightBold,allowTransparency:o.allowTransparency,colors:d}},a.configEquals=function(C,_){for(var o=0;o<C.colors.ansi.length;o++)if(C.colors.ansi[o].rgba!==_.colors.ansi[o].rgba)return!1;return C.devicePixelRatio===_.devicePixelRatio&&C.fontFamily===_.fontFamily&&C.fontSize===_.fontSize&&C.fontWeight===_.fontWeight&&C.fontWeightBold===_.fontWeightBold&&C.allowTransparency===_.allowTransparency&&C.scaledCharWidth===_.scaledCharWidth&&C.scaledCharHeight===_.scaledCharHeight&&C.colors.foreground===_.colors.foreground&&C.colors.background===_.colors.background},a.is256Color=function(C){return C<y.DEFAULT_COLOR}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ColorManager=a.DEFAULT_ANSI_COLORS=void 0;var y=f(10),C=f(45),_=y.css.toColor("#ffffff"),o=y.css.toColor("#000000"),u=y.css.toColor("#ffffff"),d=y.css.toColor("#000000"),r={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=function(){for(var s=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],e=[0,95,135,175,215,255],h=0;h<216;h++){var t=e[h/36%6|0],n=e[h/6%6|0],l=e[h%6];s.push({css:y.channels.toCss(t,n,l),rgba:y.channels.toRgba(t,n,l)})}for(h=0;h<24;h++){var c=8+10*h;s.push({css:y.channels.toCss(c,c,c),rgba:y.channels.toRgba(c,c,c)})}return s}();var i=function(){function s(e,h){this.allowTransparency=h;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 C.ColorContrastCache,this.colors={foreground:_,background:o,cursor:u,cursorAccent:d,selectionTransparent:r,selectionOpaque:y.color.blend(o,r),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return s.prototype.onOptionsChange=function(e){e==="minimumContrastRatio"&&this._contrastCache.clear()},s.prototype.setTheme=function(e){e===void 0&&(e={}),this.colors.foreground=this._parseColor(e.foreground,_),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=y.color.blend(this.colors.background,this.colors.selectionTransparent),y.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=y.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(e.black,a.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,a.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,a.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,a.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,a.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,a.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,a.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,a.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,a.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,a.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,a.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,a.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,a.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,a.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,a.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},s.prototype._parseColor=function(e,h,t){if(t===void 0&&(t=this.allowTransparency),e===void 0)return h;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+e+" is invalid using fallback "+h.css),h;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 "+h.css+"."),h;var l=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(g){return Number(g)}),c=l[0],v=l[1],S=l[2],p=l[3],m=Math.round(255*p);return{rgba:y.channels.toRgba(c,v,S,m),css:e}}return{css:this._ctx.fillStyle,rgba:y.channels.toRgba(n[0],n[1],n[2],n[3])}},s}();a.ColorManager=i},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.throwIfFalsy=void 0,a.throwIfFalsy=function(y){if(!y)throw new Error("value must not be falsy");return y}},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(i,s){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,h){e.__proto__=h}||function(e,h){for(var t in h)h.hasOwnProperty(t)&&(e[t]=h[t])})(i,s)},function(i,s){function e(){this.constructor=i}y(i,s),i.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)});Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerRegistry=a.JoinedCellData=void 0;var _=f(6),o=f(3),u=f(4),d=function(i){function s(e,h,t){var n=i.call(this)||this;return n.content=0,n.combinedData="",n.fg=e.fg,n.bg=e.bg,n.combinedData=h,n._width=t,n}return C(s,i),s.prototype.isCombined=function(){return 2097152},s.prototype.getWidth=function(){return this._width},s.prototype.getChars=function(){return this.combinedData},s.prototype.getCode=function(){return 2097151},s.prototype.setFromCharData=function(e){throw new Error("not implemented")},s.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},s}(_.AttributeData);a.JoinedCellData=d;var r=function(){function i(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new u.CellData}return i.prototype.registerCharacterJoiner=function(s){var e={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(e),e.id},i.prototype.deregisterCharacterJoiner=function(s){for(var e=0;e<this._characterJoiners.length;e++)if(this._characterJoiners[e].id===s)return this._characterJoiners.splice(e,1),!0;return!1},i.prototype.getJoinedCharacters=function(s){if(this._characterJoiners.length===0)return[];var e=this._bufferService.buffer.lines.get(s);if(!e||e.length===0)return[];for(var h=[],t=e.translateToString(!0),n=0,l=0,c=0,v=e.getFg(0),S=e.getBg(0),p=0;p<e.getTrimmedLength();p++)if(e.loadCell(p,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==v||this._workCell.bg!==S){if(p-n>1)for(var m=this._getJoinedRanges(t,c,l,e,n),g=0;g<m.length;g++)h.push(m[g]);n=p,c=l,v=this._workCell.fg,S=this._workCell.bg}l+=this._workCell.getChars().length||o.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-n>1)for(m=this._getJoinedRanges(t,c,l,e,n),g=0;g<m.length;g++)h.push(m[g]);return h},i.prototype._getJoinedRanges=function(s,e,h,t,n){for(var l=s.substring(e,h),c=this._characterJoiners[0].handler(l),v=1;v<this._characterJoiners.length;v++)for(var S=this._characterJoiners[v].handler(l),p=0;p<S.length;p++)i._mergeRanges(c,S[p]);return this._stringRangesToCellRanges(c,t,n),c},i.prototype._stringRangesToCellRanges=function(s,e,h){var t=0,n=!1,l=0,c=s[t];if(c){for(var v=h;v<this._bufferService.cols;v++){var S=e.getWidth(v),p=e.getString(v).length||o.WHITESPACE_CELL_CHAR.length;if(S!==0){if(!n&&c[0]<=l&&(c[0]=v,n=!0),c[1]<=l){if(c[1]=v,!(c=s[++t]))break;c[0]<=l?(c[0]=v,n=!0):n=!1}l+=p}}c&&(c[1]=this._bufferService.cols)}},i._mergeRanges=function(s,e){for(var h=!1,t=0;t<s.length;t++){var n=s[t];if(h){if(e[1]<=n[0])return s[t-1][1]=e[1],s;if(e[1]<=n[1])return s[t-1][1]=Math.max(e[1],n[1]),s.splice(t,1),s;s.splice(t,1),t--}else{if(e[1]<=n[0])return s.splice(t,0,e),s;if(e[1]<=n[1])return n[0]=Math.min(e[0],n[0]),s;e[0]<n[1]&&(n[0]=Math.min(e[0],n[0]),h=!0)}}return h?s[s.length-1][1]=e[1]:s.push(e),s},i}();a.CharacterJoinerRegistry=r},function(L,a,f){"use strict";function y(C,_){var o=_.getBoundingClientRect();return[C.clientX-o.left,C.clientY-o.top]}Object.defineProperty(a,"__esModule",{value:!0}),a.getRawByteCoords=a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=y,a.getCoords=function(C,_,o,u,d,r,i,s){if(d){var e=y(C,_);if(e)return e[0]=Math.ceil((e[0]+(s?r/2:0))/r),e[1]=Math.ceil(e[1]/i),e[0]=Math.min(Math.max(e[0],1),o+(s?1:0)),e[1]=Math.min(Math.max(e[1],1),u),e}},a.getRawByteCoords=function(C){if(C)return{x:C[0]+32,y:C[1]+32}}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0;var y=function(){function C(_){this._renderCallback=_}return C.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},C.prototype.refresh=function(_,o,u){var d=this;this._rowCount=u,_=_!==void 0?_:0,o=o!==void 0?o:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,_):_,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,o):o,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()}))},C.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var _=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(_,o)}},C}();a.RenderDebouncer=y},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(o,u){return(y=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}y(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(a,"__esModule",{value:!0}),a.ScreenDprMonitor=void 0;var _=function(o){function u(){var d=o!==null&&o.apply(this,arguments)||this;return d._currentDevicePixelRatio=window.devicePixelRatio,d}return C(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}(f(2).Disposable);a.ScreenDprMonitor=_},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function y(C,_){if(_===void 0&&(_=5),typeof C!="object")return C;var o=Array.isArray(C)?[]:{};for(var u in C)o[u]=_<=1?C[u]:C[u]?y(C[u],_-1):C[u];return o}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;var y=f(4),C=f(35),_=f(18),o=f(0),u=f(83),d=function(){function t(n){this._core=new C.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 h(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,l){this._verifyIntegers(n,l),this._core.resize(n,l)},t.prototype.open=function(n){this._core.open(n)},t.prototype.attachCustomKeyEventHandler=function(n){this._core.attachCustomKeyEventHandler(n)},t.prototype.registerLinkMatcher=function(n,l,c){return this._checkProposedApi(),this._core.registerLinkMatcher(n,l,c)},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,l,c){this._verifyIntegers(n,l,c),this._core.select(n,l,c)},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,l){this._verifyIntegers(n,l),this._core.selectLines(n,l)},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,l){this._core.write(n,l)},t.prototype.writeUtf8=function(n,l){this._core.write(n,l)},t.prototype.writeln=function(n,l){this._core.write(n),this._core.write(`\r
`,l)},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,l){this._core.optionsService.setOption(n,l)},t.prototype.refresh=function(n,l){this._verifyIntegers(n,l),this._core.refresh(n,l)},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 _},enumerable:!1,configurable:!0}),t.prototype._verifyIntegers=function(){for(var n=[],l=0;l<arguments.length;l++)n[l]=arguments[l];for(var c=0,v=n;c<v.length;c++){var S=v[c];if(S===1/0||isNaN(S)||S%1!=0)throw new Error("This API only accepts integers")}},t}();a.Terminal=d;var r=function(){function t(n,l){this._buffer=n,this.type=l}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 l=this._buffer.lines.get(n);if(l)return new s(l)},t.prototype.getNullCell=function(){return new y.CellData},t}(),i=function(){function t(n){var l=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 l._onBufferChange.fire(l.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}(),s=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,l){if(!(n<0||n>=this._line.length))return l?(this._line.loadCell(n,l),l):this._line.loadCell(n,new y.CellData)},t.prototype.translateToString=function(n,l,c){return this._line.translateToString(n,l,c)},t}(),e=function(){function t(n){this._core=n}return t.prototype.registerCsiHandler=function(n,l){return this._core.addCsiHandler(n,function(c){return l(c.toArray())})},t.prototype.addCsiHandler=function(n,l){return this.registerCsiHandler(n,l)},t.prototype.registerDcsHandler=function(n,l){return this._core.addDcsHandler(n,function(c,v){return l(c,v.toArray())})},t.prototype.addDcsHandler=function(n,l){return this.registerDcsHandler(n,l)},t.prototype.registerEscHandler=function(n,l){return this._core.addEscHandler(n,l)},t.prototype.addEscHandler=function(n,l){return this.registerEscHandler(n,l)},t.prototype.registerOscHandler=function(n,l){return this._core.addOscHandler(n,l)},t.prototype.addOscHandler=function(n,l){return this.registerOscHandler(n,l)},t}(),h=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(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(ce,P){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,H){N.__proto__=H}||function(N,H){for(var Y in H)H.hasOwnProperty(Y)&&(N[Y]=H[Y])})(ce,P)},function(ce,P){function N(){this.constructor=ce}y(ce,P),ce.prototype=P===null?Object.create(P):(N.prototype=P.prototype,new N)});Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;var _=f(36),o=f(37),u=f(38),d=f(12),r=f(19),i=f(40),s=f(50),e=f(51),h=f(11),t=f(7),n=f(18),l=f(54),c=f(55),v=f(56),S=f(57),p=f(59),m=f(0),g=f(16),x=f(27),k=f(60),w=f(5),E=f(61),T=f(62),A=f(63),B=f(64),j=f(65),ye=typeof window!="undefined"?window.document:null,re=function(ce){function P(N){N===void 0&&(N={});var H=ce.call(this,N)||this;return H.browser=h,H._keyDownHandled=!1,H._onCursorMove=new m.EventEmitter,H._onKey=new m.EventEmitter,H._onRender=new m.EventEmitter,H._onSelectionChange=new m.EventEmitter,H._onTitleChange=new m.EventEmitter,H._onFocus=new m.EventEmitter,H._onBlur=new m.EventEmitter,H._onA11yCharEmitter=new m.EventEmitter,H._onA11yTabEmitter=new m.EventEmitter,H._setup(),H.linkifier=H._instantiationService.createInstance(s.Linkifier),H.linkifier2=H.register(H._instantiationService.createInstance(A.Linkifier2)),H.register(H._inputHandler.onRequestBell(function(){return H.bell()})),H.register(H._inputHandler.onRequestRefreshRows(function(Y,W){return H.refresh(Y,W)})),H.register(H._inputHandler.onRequestReset(function(){return H.reset()})),H.register(H._inputHandler.onRequestScroll(function(Y,W){return H.scroll(Y,W||void 0)})),H.register(H._inputHandler.onRequestWindowsOptionsReport(function(Y){return H._reportWindowsOptions(Y)})),H.register(m.forwardEvent(H._inputHandler.onCursorMove,H._onCursorMove)),H.register(m.forwardEvent(H._inputHandler.onTitleChange,H._onTitleChange)),H.register(m.forwardEvent(H._inputHandler.onA11yChar,H._onA11yCharEmitter)),H.register(m.forwardEvent(H._inputHandler.onA11yTab,H._onA11yTabEmitter)),H.register(H._bufferService.onResize(function(Y){return H._afterResize(Y.cols,Y.rows)})),H}return C(P,ce),Object.defineProperty(P.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),P.prototype.dispose=function(){var N,H,Y;this._isDisposed||(ce.prototype.dispose.call(this),(N=this._renderService)===null||N===void 0||N.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(Y=(H=this.element)===null||H===void 0?void 0:H.parentNode)===null||Y===void 0||Y.removeChild(this.element))},P.prototype._setup=function(){ce.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(P.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),P.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},P.prototype._updateOptions=function(N){var H,Y,W,ie;switch(ce.prototype._updateOptions.call(this,N),N){case"fontFamily":case"fontSize":(H=this._renderService)===null||H===void 0||H.clear(),(Y=this._charSizeService)===null||Y===void 0||Y.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":(W=this.viewport)===null||W===void 0||W.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new v.AccessibilityManager(this,this._renderService)):((ie=this._accessibilityManager)===null||ie===void 0||ie.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},P.prototype._onTextAreaFocus=function(N){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[I"),this.updateCursorStyle(N),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},P.prototype.blur=function(){var N;return(N=this.textarea)===null||N===void 0?void 0:N.blur()},P.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()},P.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var N=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),H=this._bufferService.buffer.y*N,Y=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=Y+"px",this.textarea.style.top=H+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=N+"px",this.textarea.style.lineHeight=N+"px",this.textarea.style.zIndex="-5"}},P.prototype._initGlobal=function(){var N=this;this._bindKeys(),this.register(t.addDisposableDomListener(this.element,"copy",function(Y){N.hasSelection()&&u.copyHandler(Y,N._selectionService)}));var H=function(Y){return u.handlePasteEvent(Y,N.textarea,N._coreService)};this.register(t.addDisposableDomListener(this.textarea,"paste",H)),this.register(t.addDisposableDomListener(this.element,"paste",H)),h.isFirefox?this.register(t.addDisposableDomListener(this.element,"mousedown",function(Y){Y.button===2&&u.rightClickHandler(Y,N.textarea,N.screenElement,N._selectionService,N.options.rightClickSelectsWord)})):this.register(t.addDisposableDomListener(this.element,"contextmenu",function(Y){u.rightClickHandler(Y,N.textarea,N.screenElement,N._selectionService,N.options.rightClickSelectsWord)})),h.isLinux&&this.register(t.addDisposableDomListener(this.element,"auxclick",function(Y){Y.button===1&&u.moveTextAreaUnderMouseCursor(Y,N.textarea,N.screenElement)}))},P.prototype._bindKeys=function(){var N=this;this.register(t.addDisposableDomListener(this.textarea,"keyup",function(H){return N._keyUp(H)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keydown",function(H){return N._keyDown(H)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keypress",function(H){return N._keyPress(H)},!0)),this.register(t.addDisposableDomListener(this.textarea,"compositionstart",function(){return N._compositionHelper.compositionstart()})),this.register(t.addDisposableDomListener(this.textarea,"compositionupdate",function(H){return N._compositionHelper.compositionupdate(H)})),this.register(t.addDisposableDomListener(this.textarea,"compositionend",function(){return N._compositionHelper.compositionend()})),this.register(this.onRender(function(){return N._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(H){return N._queueLinkification(H.start,H.end)}))},P.prototype.open=function(N){var H=this;if(!N)throw new Error("Terminal requires a parent element.");ye.body.contains(N)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=N.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"),N.appendChild(this.element);var Y=ye.createDocumentFragment();this._viewportElement=ye.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),Y.appendChild(this._viewportElement),this._viewportScrollArea=ye.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=ye.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=ye.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),Y.appendChild(this.screenElement),this.textarea=ye.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(me){return H._onTextAreaFocus(me)})),this.register(t.addDisposableDomListener(this.textarea,"blur",function(){return H._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var W=this._instantiationService.createInstance(B.CoreBrowserService,this.textarea);this._instantiationService.setService(w.ICoreBrowserService,W),this._charSizeService=this._instantiationService.createInstance(E.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(w.ICharSizeService,this._charSizeService),this._compositionView=ye.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(Y),this._theme=this.options.theme||this._theme,this._colorManager=new x.ColorManager(ye,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(me){return H._colorManager.onOptionsChange(me)})),this._colorManager.setTheme(this._theme);var ie=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,ie,this.rows,this.screenElement)),this._instantiationService.setService(w.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(me){return H._onRender.fire(me)})),this.onResize(function(me){return H._renderService.resize(me.cols,me.rows)}),this._soundService=this._instantiationService.createInstance(l.SoundService),this._instantiationService.setService(w.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(T.MouseService),this._instantiationService.setService(w.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(o.Viewport,function(me,De){return H.scrollLines(me,De)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return H.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){H._renderService.onCursorMove(),H._syncTextArea()})),this.register(this.onResize(function(){return H._renderService.onResize(H.cols,H.rows)})),this.register(this.onBlur(function(){return H._renderService.onBlur()})),this.register(this.onFocus(function(){return H._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return H.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(e.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(w.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(me){return H.scrollLines(me.amount,me.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return H._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(me){return H._renderService.onSelectionChanged(me.start,me.end,me.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(me){H.textarea.value=me,H.textarea.focus(),H.textarea.select()})),this.register(this.onScroll(function(){H.viewport.syncScrollArea(),H._selectionService.refresh()})),this.register(t.addDisposableDomListener(this._viewportElement,"scroll",function(){return H._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(c.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return H._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(me){return H._selectionService.onMouseDown(me)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new v.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},P.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(S.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},P.prototype._setTheme=function(N){var H,Y,W;this._theme=N,(H=this._colorManager)===null||H===void 0||H.setTheme(N),(Y=this._renderService)===null||Y===void 0||Y.setColors(this._colorManager.colors),(W=this.viewport)===null||W===void 0||W.onThemeChange(this._colorManager.colors)},P.prototype.bindMouse=function(){var N=this,H=this,Y=this.element;function W(_e){var ke,Ie,Te=H._mouseService.getRawByteCoords(_e,H.screenElement,H.cols,H.rows);if(!Te)return!1;switch(_e.overrideType||_e.type){case"mousemove":Ie=32,_e.buttons===void 0?(ke=3,_e.button!==void 0&&(ke=_e.button<3?_e.button:3)):ke=1&_e.buttons?0:4&_e.buttons?1:2&_e.buttons?2:3;break;case"mouseup":Ie=0,ke=_e.button<3?_e.button:3;break;case"mousedown":Ie=1,ke=_e.button<3?_e.button:3;break;case"wheel":_e.deltaY!==0&&(Ie=_e.deltaY<0?0:1),ke=4;break;default:return!1}return!(Ie===void 0||ke===void 0||ke>4)&&H._coreMouseService.triggerMouseEvent({col:Te.x-33,row:Te.y-33,button:ke,action:Ie,ctrl:_e.ctrlKey,alt:_e.altKey,shift:_e.shiftKey})}var ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me=function(_e){return W(_e),_e.buttons||(N._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&N._document.removeEventListener("mousemove",ie.mousedrag)),N.cancel(_e)},De=function(_e){return W(_e),_e.preventDefault(),N.cancel(_e)},ze=function(_e){_e.buttons&&W(_e)},je=function(_e){_e.buttons||W(_e)};this.register(this._coreMouseService.onProtocolChange(function(_e){_e?(N.optionsService.options.logLevel==="debug"&&N._logService.debug("Binding to mouse events:",N._coreMouseService.explainEvents(_e)),N.element.classList.add("enable-mouse-events"),N._selectionService.disable()):(N._logService.debug("Unbinding from mouse events."),N.element.classList.remove("enable-mouse-events"),N._selectionService.enable()),8&_e?ie.mousemove||(Y.addEventListener("mousemove",je),ie.mousemove=je):(Y.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&_e?ie.wheel||(Y.addEventListener("wheel",De,{passive:!1}),ie.wheel=De):(Y.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&_e?ie.mouseup||(ie.mouseup=me):(N._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&_e?ie.mousedrag||(ie.mousedrag=ze):(N._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(t.addDisposableDomListener(Y,"mousedown",function(_e){if(_e.preventDefault(),N.focus(),N._coreMouseService.areMouseEventsActive&&!N._selectionService.shouldForceSelection(_e))return W(_e),ie.mouseup&&N._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&N._document.addEventListener("mousemove",ie.mousedrag),N.cancel(_e)})),this.register(t.addDisposableDomListener(Y,"wheel",function(_e){if(!ie.wheel){if(!N.buffer.hasScrollback){var ke=N.viewport.getLinesScrolled(_e);if(ke===0)return;for(var Ie=d.C0.ESC+(N._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(_e.deltaY<0?"A":"B"),Te="",Ne=0;Ne<Math.abs(ke);Ne++)Te+=Ie;N._coreService.triggerDataEvent(Te,!0)}}},{passive:!0})),this.register(t.addDisposableDomListener(Y,"wheel",function(_e){if(!ie.wheel)return N.viewport.onWheel(_e)?void 0:N.cancel(_e)},{passive:!1})),this.register(t.addDisposableDomListener(Y,"touchstart",function(_e){if(!N._coreMouseService.areMouseEventsActive)return N.viewport.onTouchStart(_e),N.cancel(_e)},{passive:!0})),this.register(t.addDisposableDomListener(Y,"touchmove",function(_e){if(!N._coreMouseService.areMouseEventsActive)return N.viewport.onTouchMove(_e)?void 0:N.cancel(_e)},{passive:!1}))},P.prototype.refresh=function(N,H){var Y;(Y=this._renderService)===null||Y===void 0||Y.refreshRows(N,H)},P.prototype._queueLinkification=function(N,H){var Y;(Y=this.linkifier)===null||Y===void 0||Y.linkifyRows(N,H)},P.prototype.updateCursorStyle=function(N){this._selectionService&&this._selectionService.shouldColumnSelect(N)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},P.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},P.prototype.scrollLines=function(N,H){ce.prototype.scrollLines.call(this,N,H),this.refresh(0,this.rows-1)},P.prototype.paste=function(N){u.paste(N,this.textarea,this._coreService)},P.prototype.attachCustomKeyEventHandler=function(N){this._customKeyEventHandler=N},P.prototype.registerLinkMatcher=function(N,H,Y){var W=this.linkifier.registerLinkMatcher(N,H,Y);return this.refresh(0,this.rows-1),W},P.prototype.deregisterLinkMatcher=function(N){this.linkifier.deregisterLinkMatcher(N)&&this.refresh(0,this.rows-1)},P.prototype.registerLinkProvider=function(N){return this.linkifier2.registerLinkProvider(N)},P.prototype.registerCharacterJoiner=function(N){var H=this._renderService.registerCharacterJoiner(N);return this.refresh(0,this.rows-1),H},P.prototype.deregisterCharacterJoiner=function(N){this._renderService.deregisterCharacterJoiner(N)&&this.refresh(0,this.rows-1)},Object.defineProperty(P.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),P.prototype.addMarker=function(N){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+N)},P.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},P.prototype.select=function(N,H,Y){this._selectionService.setSelection(N,H,Y)},P.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},P.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]}},P.prototype.clearSelection=function(){var N;(N=this._selectionService)===null||N===void 0||N.clearSelection()},P.prototype.selectAll=function(){var N;(N=this._selectionService)===null||N===void 0||N.selectAll()},P.prototype.selectLines=function(N,H){var Y;(Y=this._selectionService)===null||Y===void 0||Y.selectLines(N,H)},P.prototype._keyDown=function(N){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1)return!1;if(!this._compositionHelper.keydown(N))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var H=p.evaluateKeyboardEvent(N,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(N),H.type===3||H.type===2){var Y=this.rows-1;return this.scrollLines(H.type===2?-Y:Y),this.cancel(N,!0)}return H.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,N)||(H.cancel&&this.cancel(N,!0),!H.key||(H.key!==d.C0.ETX&&H.key!==d.C0.CR||(this.textarea.value=""),this._onKey.fire({key:H.key,domEvent:N}),this._showCursor(),this._coreService.triggerDataEvent(H.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(N,!0)))},P.prototype._isThirdLevelShift=function(N,H){var Y=N.isMac&&!this.options.macOptionIsMeta&&H.altKey&&!H.ctrlKey&&!H.metaKey||N.isWindows&&H.altKey&&H.ctrlKey&&!H.metaKey;return H.type==="keypress"?Y:Y&&(!H.keyCode||H.keyCode>47)},P.prototype._keyUp=function(N){this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1||(function(H){return H.keyCode===16||H.keyCode===17||H.keyCode===18}(N)||this.focus(),this.updateCursorStyle(N))},P.prototype._keyPress=function(N){var H;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(N)===!1)return!1;if(this.cancel(N),N.charCode)H=N.charCode;else if(N.which===null||N.which===void 0)H=N.keyCode;else{if(N.which===0||N.charCode===0)return!1;H=N.which}return!(!H||(N.altKey||N.ctrlKey||N.metaKey)&&!this._isThirdLevelShift(this.browser,N))&&(H=String.fromCharCode(H),this._onKey.fire({key:H,domEvent:N}),this._showCursor(),this._coreService.triggerDataEvent(H,!0),!0)},P.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},P.prototype.resize=function(N,H){N!==this.cols||H!==this.rows?ce.prototype.resize.call(this,N,H):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},P.prototype._afterResize=function(N,H){var Y,W;(Y=this._charSizeService)===null||Y===void 0||Y.measure(),(W=this.viewport)===null||W===void 0||W.syncScrollArea(!0)},P.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 N=1;N<this.rows;N++)this.buffer.lines.push(this.buffer.getBlankLine(g.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},P.prototype.reset=function(){var N,H;this.options.rows=this.rows,this.options.cols=this.cols;var Y=this._customKeyEventHandler;this._setup(),ce.prototype.reset.call(this),(N=this._selectionService)===null||N===void 0||N.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1),(H=this.viewport)===null||H===void 0||H.syncScrollArea()},P.prototype._reportWindowsOptions=function(N){if(this._renderService)switch(N){case r.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var H=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),Y=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[4;"+Y+";"+H+"t");break;case r.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var W=this._renderService.dimensions.scaledCellWidth.toFixed(0),ie=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[6;"+ie+";"+W+"t")}},P.prototype.cancel=function(N,H){if(this.options.cancelEvents||H)return N.preventDefault(),N.stopPropagation(),!1},P.prototype._visualBell=function(){return!1},P.prototype._soundBell=function(){return this.options.bellStyle==="sound"},P}(j.CoreTerminal);a.Terminal=re},function(L,a,f){"use strict";var y=this&&this.__decorate||function(d,r,i,s){var e,h=arguments.length,t=h<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(d,r,i,s);else for(var n=d.length-1;n>=0;n--)(e=d[n])&&(t=(h<3?e(t):h>3?e(r,i,t):e(r,i))||t);return h>3&&t&&Object.defineProperty(r,i,t),t},C=this&&this.__param||function(d,r){return function(i,s){r(i,s,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;var _=f(5),o=f(1),u=function(){function d(r,i,s,e,h,t){this._textarea=r,this._compositionView=i,this._bufferService=s,this._optionsService=e,this._charSizeService=h,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 s={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(i._isSendingComposition){i._isSendingComposition=!1;var h=void 0;h=i._isComposing?i._textarea.value.substring(s.start,s.end):i._textarea.value.substring(s.start),i._coreService.triggerDataEvent(h,!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 s=r._textarea.value.replace(i,"");s.length>0&&r._coreService.triggerDataEvent(s,!0)}},0)},d.prototype.updateCompositionElements=function(r){var i=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var s=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),e=this._bufferService.buffer.y*s,h=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=h+"px",this._compositionView.style.top=e+"px",this._compositionView.style.height=s+"px",this._compositionView.style.lineHeight=s+"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=h+"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=y([C(2,o.IBufferService),C(3,o.IOptionsService),C(4,_.ICharSizeService),C(5,o.ICoreService)],d)}();a.CompositionHelper=u},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(e,h){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var l in n)n.hasOwnProperty(l)&&(t[l]=n[l])})(e,h)},function(e,h){function t(){this.constructor=e}y(e,h),e.prototype=h===null?Object.create(h):(t.prototype=h.prototype,new t)}),_=this&&this.__decorate||function(e,h,t,n){var l,c=arguments.length,v=c<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,h,t,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(v=(c<3?l(v):c>3?l(h,t,v):l(h,t))||v);return c>3&&v&&Object.defineProperty(h,t,v),v},o=this&&this.__param||function(e,h){return function(t,n){h(t,n,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;var u=f(2),d=f(7),r=f(5),i=f(1),s=function(e){function h(t,n,l,c,v,S,p){var m=e.call(this)||this;return m._scrollLines=t,m._viewportElement=n,m._scrollArea=l,m._bufferService=c,m._optionsService=v,m._charSizeService=S,m._renderService=p,m.scrollBarWidth=0,m._currentRowHeight=0,m._lastRecordedBufferLength=0,m._lastRecordedViewportHeight=0,m._lastRecordedBufferHeight=0,m._lastTouchY=0,m._lastScrollTop=0,m._wheelPartialScroll=0,m._refreshAnimationFrame=null,m._ignoreNextScrollEvent=!1,m.scrollBarWidth=m._viewportElement.offsetWidth-m._scrollArea.offsetWidth||15,m.register(d.addDisposableDomListener(m._viewportElement,"scroll",m._onScroll.bind(m))),setTimeout(function(){return m.syncScrollArea()},0),m}return C(h,e),h.prototype.onThemeChange=function(t){this._viewportElement.style.backgroundColor=t.background.css},h.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()}))},h.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},h.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)},h.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)}},h.prototype._bubbleScroll=function(t,n){var l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(n<0&&this._viewportElement.scrollTop!==0||n>0&&l<this._lastRecordedBufferHeight)||(t.cancelable&&t.preventDefault(),!1)},h.prototype.onWheel=function(t){var n=this._getPixelsScrolled(t);return n!==0&&(this._viewportElement.scrollTop+=n,this._bubbleScroll(t,n))},h.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},h.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},h.prototype._applyScrollModifier=function(t,n){var l=this._optionsService.options.fastScrollModifier;return l==="alt"&&n.altKey||l==="ctrl"&&n.ctrlKey||l==="shift"&&n.shiftKey?t*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:t*this._optionsService.options.scrollSensitivity},h.prototype.onTouchStart=function(t){this._lastTouchY=t.touches[0].pageY},h.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))},h=_([o(3,i.IBufferService),o(4,i.IOptionsService),o(5,r.ICharSizeService),o(6,r.IRenderService)],h)}(u.Disposable);a.Viewport=s},function(L,a,f){"use strict";function y(u){return u.replace(/\r?\n/g,"\r")}function C(u,d){return d?"\x1B[200~"+u+"\x1B[201~":u}function _(u,d,r){u=C(u=y(u),r.decPrivateModes.bracketedPasteMode),r.triggerDataEvent(u,!0),d.value=""}function o(u,d,r){var i=r.getBoundingClientRect(),s=u.clientX-i.left-10,e=u.clientY-i.top-10;d.style.width="20px",d.style.height="20px",d.style.left=s+"px",d.style.top=e+"px",d.style.zIndex="1000",d.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=y,a.bracketTextForPaste=C,a.copyHandler=function(u,d){u.clipboardData&&u.clipboardData.setData("text/plain",d.selectionText),u.preventDefault()},a.handlePasteEvent=function(u,d,r){u.stopPropagation(),u.clipboardData&&_(u.clipboardData.getData("text/plain"),d,r)},a.paste=_,a.moveTextAreaUnderMouseCursor=o,a.rightClickHandler=function(u,d,r,i,s){o(u,d,r),s&&!i.isClickInSelection(u)&&i.selectWordAtCursor(u),d.value=i.selectionText,d.select()}},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(e,h){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var l in n)n.hasOwnProperty(l)&&(t[l]=n[l])})(e,h)},function(e,h){function t(){this.constructor=e}y(e,h),e.prototype=h===null?Object.create(h):(t.prototype=h.prototype,new t)});Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;var _=f(2),o=f(15),u=f(21),d=f(22),r=f(24),i=function(){function e(h){this.table=new Uint8Array(h)}return e.prototype.setDefault=function(h,t){o.fill(this.table,h<<4|t)},e.prototype.add=function(h,t,n,l){this.table[t<<8|h]=n<<4|l},e.prototype.addMany=function(h,t,n,l){for(var c=0;c<h.length;c++)this.table[t<<8|h[c]]=n<<4|l},e}();a.TransitionTable=i,a.VT500_TRANSITION_TABLE=function(){var e=new i(4095),h=Array.apply(null,Array(256)).map(function(S,p){return p}),t=function(S,p){return h.slice(S,p)},n=t(32,127),l=t(0,24);l.push(25),l.push.apply(l,t(28,32));var c,v=t(0,14);for(c in e.setDefault(1,0),e.addMany(n,0,2,0),v)e.addMany([24,26,153,154],c,3,0),e.addMany(t(128,144),c,3,0),e.addMany(t(144,152),c,3,0),e.add(156,c,0,0),e.add(27,c,11,1),e.add(157,c,4,8),e.addMany([152,158,159],c,0,7),e.add(155,c,11,3),e.add(144,c,11,9);return e.addMany(l,0,3,0),e.addMany(l,1,3,1),e.add(127,1,0,1),e.addMany(l,8,0,8),e.addMany(l,3,3,3),e.add(127,3,0,3),e.addMany(l,4,3,4),e.add(127,4,0,4),e.addMany(l,6,3,6),e.addMany(l,5,3,5),e.add(127,5,0,5),e.addMany(l,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(l,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(l,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(l,11,0,11),e.addMany(t(32,128),11,0,11),e.addMany(t(28,32),11,0,11),e.addMany(l,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(l,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(l,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 s=function(e){function h(t){t===void 0&&(t=a.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(l,c,v){},n._executeHandlerFb=function(l){},n._csiHandlerFb=function(l,c){},n._escHandlerFb=function(l){},n._errorHandlerFb=function(l){return l},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 C(h,e),h.prototype._identifier=function(t,n){n===void 0&&(n=[64,126]);var l=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((l=t.prefix.charCodeAt(0))&&60>l||l>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 c=0;c<t.intermediates.length;++c){var v=t.intermediates.charCodeAt(c);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=v}}if(t.final.length!==1)throw new Error("final must be a single byte");var S=t.final.charCodeAt(0);if(n[0]>S||S>n[1])throw new Error("final must be in range "+n[0]+" .. "+n[1]);return l<<=8,l|=S},h.prototype.identToString=function(t){for(var n=[];t;)n.push(String.fromCharCode(255&t)),t>>=8;return n.reverse().join("")},h.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},h.prototype.setPrintHandler=function(t){this._printHandler=t},h.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},h.prototype.addEscHandler=function(t,n){var l=this._identifier(t,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);var c=this._escHandlers[l];return c.push(n),{dispose:function(){var v=c.indexOf(n);v!==-1&&c.splice(v,1)}}},h.prototype.setEscHandler=function(t,n){this._escHandlers[this._identifier(t,[48,126])]=[n]},h.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},h.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},h.prototype.setExecuteHandler=function(t,n){this._executeHandlers[t.charCodeAt(0)]=n},h.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},h.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},h.prototype.addCsiHandler=function(t,n){var l=this._identifier(t);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);var c=this._csiHandlers[l];return c.push(n),{dispose:function(){var v=c.indexOf(n);v!==-1&&c.splice(v,1)}}},h.prototype.setCsiHandler=function(t,n){this._csiHandlers[this._identifier(t)]=[n]},h.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},h.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},h.prototype.addDcsHandler=function(t,n){return this._dcsParser.addHandler(this._identifier(t),n)},h.prototype.setDcsHandler=function(t,n){this._dcsParser.setHandler(this._identifier(t),n)},h.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},h.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},h.prototype.addOscHandler=function(t,n){return this._oscParser.addHandler(t,n)},h.prototype.setOscHandler=function(t,n){this._oscParser.setHandler(t,n)},h.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},h.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},h.prototype.setErrorHandler=function(t){this._errorHandler=t},h.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},h.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},h.prototype.parse=function(t,n){for(var l=0,c=0,v=this.currentState,S=this._oscParser,p=this._dcsParser,m=this._collect,g=this._params,x=this._transitions.table,k=0;k<n;++k){switch((c=x[v<<8|((l=t[k])<160?l:160)])>>4){case 2:for(var w=k+1;;++w){if(w>=n||(l=t[w])<32||l>126&&l<160){this._printHandler(t,k,w),k=w-1;break}if(++w>=n||(l=t[w])<32||l>126&&l<160){this._printHandler(t,k,w),k=w-1;break}if(++w>=n||(l=t[w])<32||l>126&&l<160){this._printHandler(t,k,w),k=w-1;break}if(++w>=n||(l=t[w])<32||l>126&&l<160){this._printHandler(t,k,w),k=w-1;break}}break;case 3:this._executeHandlers[l]?this._executeHandlers[l]():this._executeHandlerFb(l),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:k,code:l,currentState:v,collect:m,params:g,abort:!1}).abort)return;break;case 7:for(var E=this._csiHandlers[m<<8|l],T=E?E.length-1:-1;T>=0&&E[T](g)===!1;T--);T<0&&this._csiHandlerFb(m<<8|l,g),this.precedingCodepoint=0;break;case 8:do switch(l){case 59:g.addParam(0);break;case 58:g.addSubParam(-1);break;default:g.addDigit(l-48)}while(++k<n&&(l=t[k])>47&&l<60);k--;break;case 9:m<<=8,m|=l;break;case 10:for(var A=this._escHandlers[m<<8|l],B=A?A.length-1:-1;B>=0&&A[B]()===!1;B--);B<0&&this._escHandlerFb(m<<8|l),this.precedingCodepoint=0;break;case 11:g.reset(),g.addParam(0),m=0;break;case 12:p.hook(m<<8|l,g);break;case 13:for(var j=k+1;;++j)if(j>=n||(l=t[j])===24||l===26||l===27||l>127&&l<160){p.put(t,k,j),k=j-1;break}break;case 14:p.unhook(l!==24&&l!==26),l===27&&(c|=1),g.reset(),g.addParam(0),m=0,this.precedingCodepoint=0;break;case 4:S.start();break;case 5:for(var ye=k+1;;ye++)if(ye>=n||(l=t[ye])<32||l>127&&l<=159){S.put(t,k,ye),k=ye-1;break}break;case 6:S.end(l!==24&&l!==26),l===27&&(c|=1),g.reset(),g.addParam(0),m=0,this.precedingCodepoint=0}v=15&c}this._collect=m,this.currentState=v},h}(_.Disposable);a.EscapeSequenceParser=s},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(S,p){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var x in g)g.hasOwnProperty(x)&&(m[x]=g[x])})(S,p)},function(S,p){function m(){this.constructor=S}y(S,p),S.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}),_=this&&this.__decorate||function(S,p,m,g){var x,k=arguments.length,w=k<3?p:g===null?g=Object.getOwnPropertyDescriptor(p,m):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(S,p,m,g);else for(var E=S.length-1;E>=0;E--)(x=S[E])&&(w=(k<3?x(w):k>3?x(p,m,w):x(p,m))||w);return k>3&&w&&Object.defineProperty(p,m,w),w},o=this&&this.__param||function(S,p){return function(m,g){p(m,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Renderer=void 0;var u=f(41),d=f(47),r=f(48),i=f(49),s=f(29),e=f(2),h=f(5),t=f(1),n=f(25),l=f(0),c=1,v=function(S){function p(m,g,x,k,w,E,T,A,B){var j=S.call(this)||this;j._colors=m,j._screenElement=g,j._bufferService=w,j._charSizeService=E,j._optionsService=T,j._id=c++,j._onRequestRedraw=new l.EventEmitter;var ye=j._optionsService.options.allowTransparency;return j._characterJoinerRegistry=new s.CharacterJoinerRegistry(j._bufferService),j._renderLayers=[new u.TextRenderLayer(j._screenElement,0,j._colors,j._characterJoinerRegistry,ye,j._id,j._bufferService,T),new d.SelectionRenderLayer(j._screenElement,1,j._colors,j._id,j._bufferService,T),new i.LinkRenderLayer(j._screenElement,2,j._colors,j._id,x,k,j._bufferService,T),new r.CursorRenderLayer(j._screenElement,3,j._colors,j._id,j._onRequestRedraw,j._bufferService,T,A,B)],j.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},j._devicePixelRatio=window.devicePixelRatio,j._updateDimensions(),j.onOptionsChanged(),j}return C(p,S),Object.defineProperty(p.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){for(var m=0,g=this._renderLayers;m<g.length;m++)g[m].dispose();S.prototype.dispose.call(this),n.removeTerminalFromCache(this._id)},p.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},p.prototype.setColors=function(m){this._colors=m;for(var g=0,x=this._renderLayers;g<x.length;g++){var k=x[g];k.setColors(this._colors),k.reset()}},p.prototype.onResize=function(m,g){this._updateDimensions();for(var x=0,k=this._renderLayers;x<k.length;x++)k[x].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},p.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},p.prototype.onBlur=function(){this._runOperation(function(m){return m.onBlur()})},p.prototype.onFocus=function(){this._runOperation(function(m){return m.onFocus()})},p.prototype.onSelectionChanged=function(m,g,x){x===void 0&&(x=!1),this._runOperation(function(k){return k.onSelectionChanged(m,g,x)})},p.prototype.onCursorMove=function(){this._runOperation(function(m){return m.onCursorMove()})},p.prototype.onOptionsChanged=function(){this._runOperation(function(m){return m.onOptionsChanged()})},p.prototype.clear=function(){this._runOperation(function(m){return m.reset()})},p.prototype._runOperation=function(m){for(var g=0,x=this._renderLayers;g<x.length;g++)m(x[g])},p.prototype.renderRows=function(m,g){for(var x=0,k=this._renderLayers;x<k.length;x++)k[x].onGridChanged(m,g)},p.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)},p.prototype.registerCharacterJoiner=function(m){return this._characterJoinerRegistry.registerCharacterJoiner(m)},p.prototype.deregisterCharacterJoiner=function(m){return this._characterJoinerRegistry.deregisterCharacterJoiner(m)},p=_([o(4,t.IBufferService),o(5,h.ICharSizeService),o(6,t.IOptionsService),o(7,t.ICoreService),o(8,h.ICoreBrowserService)],p)}(e.Disposable);a.Renderer=v},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(e,h){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var l in n)n.hasOwnProperty(l)&&(t[l]=n[l])})(e,h)},function(e,h){function t(){this.constructor=e}y(e,h),e.prototype=h===null?Object.create(h):(t.prototype=h.prototype,new t)});Object.defineProperty(a,"__esModule",{value:!0}),a.TextRenderLayer=void 0;var _=f(42),o=f(13),u=f(6),d=f(3),r=f(29),i=f(4),s=function(e){function h(t,n,l,c,v,S,p,m){var g=e.call(this,t,"text",n,v,l,S,p,m)||this;return g._characterWidth=0,g._characterFont="",g._characterOverlapCache={},g._workCell=new i.CellData,g._state=new _.GridCache,g._characterJoinerRegistry=c,g}return C(h,e),h.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)},h.prototype.reset=function(){this._state.clear(),this._clearAll()},h.prototype._forEachCell=function(t,n,l,c){for(var v=t;v<=n;v++)for(var S=v+this._bufferService.buffer.ydisp,p=this._bufferService.buffer.lines.get(S),m=l?l.getJoinedCharacters(S):[],g=0;g<this._bufferService.cols;g++){p.loadCell(g,this._workCell);var x=this._workCell,k=!1,w=g;if(x.getWidth()!==0){if(m.length>0&&g===m[0][0]){k=!0;var E=m.shift();x=new r.JoinedCellData(this._workCell,p.translateToString(!0,E[0],E[1]),E[1]-E[0]),w=E[1]-1}!k&&this._isOverlapping(x)&&w<p.length-1&&p.getCodePoint(w+1)===d.NULL_CELL_CODE&&(x.content&=-12582913,x.content|=2<<22),c(x,g,v),g=w}}},h.prototype._drawBackground=function(t,n){var l=this,c=this._ctx,v=this._bufferService.cols,S=0,p=0,m=null;c.save(),this._forEachCell(t,n,null,function(g,x,k){var w=null;g.isInverse()?w=g.isFgDefault()?l._colors.foreground.css:g.isFgRGB()?"rgb("+u.AttributeData.toColorRGB(g.getFgColor()).join(",")+")":l._colors.ansi[g.getFgColor()].css:g.isBgRGB()?w="rgb("+u.AttributeData.toColorRGB(g.getBgColor()).join(",")+")":g.isBgPalette()&&(w=l._colors.ansi[g.getBgColor()].css),m===null&&(S=x,p=k),k!==p?(c.fillStyle=m||"",l._fillCells(S,p,v-S,1),S=x,p=k):m!==w&&(c.fillStyle=m||"",l._fillCells(S,p,x-S,1),S=x,p=k),m=w}),m!==null&&(c.fillStyle=m,this._fillCells(S,p,v-S,1)),c.restore()},h.prototype._drawForeground=function(t,n){var l=this;this._forEachCell(t,n,this._characterJoinerRegistry,function(c,v,S){if(!c.isInvisible()&&(l._drawChars(c,v,S),c.isUnderline())){if(l._ctx.save(),c.isInverse())if(c.isBgDefault())l._ctx.fillStyle=l._colors.background.css;else if(c.isBgRGB())l._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(c.getBgColor()).join(",")+")";else{var p=c.getBgColor();l._optionsService.options.drawBoldTextInBrightColors&&c.isBold()&&p<8&&(p+=8),l._ctx.fillStyle=l._colors.ansi[p].css}else if(c.isFgDefault())l._ctx.fillStyle=l._colors.foreground.css;else if(c.isFgRGB())l._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(c.getFgColor()).join(",")+")";else{var m=c.getFgColor();l._optionsService.options.drawBoldTextInBrightColors&&c.isBold()&&m<8&&(m+=8),l._ctx.fillStyle=l._colors.ansi[m].css}l._fillBottomLineAtCells(v,S,c.getWidth()),l._ctx.restore()}})},h.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))},h.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},h.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 l=Math.floor(this._ctx.measureText(n).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[n]=l,l},h}(o.BaseRenderLayer);a.TextRenderLayer=s},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.GridCache=void 0;var y=function(){function C(){this.cache=[]}return C.prototype.resize=function(_,o){for(var u=0;u<_;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=_},C.prototype.clear=function(){for(var _=0;_<this.cache.length;_++)for(var o=0;o<this.cache[_].length;o++)this.cache[_][o]=void 0},C}();a.GridCache=y},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(l,c){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,S){v.__proto__=S}||function(v,S){for(var p in S)S.hasOwnProperty(p)&&(v[p]=S[p])})(l,c)},function(l,c){function v(){this.constructor=l}y(l,c),l.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)});Object.defineProperty(a,"__esModule",{value:!0}),a.NoneCharAtlas=a.DynamicCharAtlas=a.getGlyphCacheKey=void 0;var _=f(9),o=f(44),u=f(27),d=f(46),r=f(11),i=f(28),s=f(10),e={css:"rgba(0, 0, 0, 0)",rgba:0};function h(l){return l.code<<21|l.bg<<12|l.fg<<3|(l.bold?0:4)+(l.dim?0:2)+(l.italic?0:1)}a.getGlyphCacheKey=h;var t=function(l){function c(v,S){var p=l.call(this)||this;p._config=S,p._drawToCacheCount=0,p._glyphsWaitingOnBitmap=[],p._bitmapCommitTimeout=null,p._bitmap=null,p._cacheCanvas=v.createElement("canvas"),p._cacheCanvas.width=1024,p._cacheCanvas.height=1024,p._cacheCtx=i.throwIfFalsy(p._cacheCanvas.getContext("2d",{alpha:!0}));var m=v.createElement("canvas");m.width=p._config.scaledCharWidth,m.height=p._config.scaledCharHeight,p._tmpCtx=i.throwIfFalsy(m.getContext("2d",{alpha:p._config.allowTransparency})),p._width=Math.floor(1024/p._config.scaledCharWidth),p._height=Math.floor(1024/p._config.scaledCharHeight);var g=p._width*p._height;return p._cacheMap=new d.LRUMap(g),p._cacheMap.prealloc(g),p}return C(c,l),c.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},c.prototype.beginFrame=function(){this._drawToCacheCount=0},c.prototype.draw=function(v,S,p,m){if(S.code===32)return!0;if(!this._canCache(S))return!1;var g=h(S),x=this._cacheMap.get(g);if(x!=null)return this._drawFromCache(v,x,p,m),!0;if(this._drawToCacheCount<100){var k=void 0;k=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var w=this._drawToCache(S,k);return this._cacheMap.set(g,w),this._drawFromCache(v,w,p,m),!0}return!1},c.prototype._canCache=function(v){return v.code<256},c.prototype._toCoordinateX=function(v){return v%this._width*this._config.scaledCharWidth},c.prototype._toCoordinateY=function(v){return Math.floor(v/this._width)*this._config.scaledCharHeight},c.prototype._drawFromCache=function(v,S,p,m){if(!S.isEmpty){var g=this._toCoordinateX(S.index),x=this._toCoordinateY(S.index);v.drawImage(S.inBitmap?this._bitmap:this._cacheCanvas,g,x,this._config.scaledCharWidth,this._config.scaledCharHeight,p,m,this._config.scaledCharWidth,this._config.scaledCharHeight)}},c.prototype._getColorFromAnsiIndex=function(v){return v<this._config.colors.ansi.length?this._config.colors.ansi[v]:u.DEFAULT_ANSI_COLORS[v]},c.prototype._getBackgroundColor=function(v){return this._config.allowTransparency?e:v.bg===_.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:v.bg<256?this._getColorFromAnsiIndex(v.bg):this._config.colors.background},c.prototype._getForegroundColor=function(v){return v.fg===_.INVERTED_DEFAULT_COLOR?s.color.opaque(this._config.colors.background):v.fg<256?this._getColorFromAnsiIndex(v.fg):this._config.colors.foreground},c.prototype._drawToCache=function(v,S){this._drawToCacheCount++,this._tmpCtx.save();var p=this._getBackgroundColor(v);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=p.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var m=v.bold?this._config.fontWeightBold:this._config.fontWeight,g=v.italic?"italic":"";this._tmpCtx.font=g+" "+m+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(v).css,v.dim&&(this._tmpCtx.globalAlpha=_.DIM_OPACITY),this._tmpCtx.fillText(v.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var x=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),k=!1;this._config.allowTransparency||(k=function(A,B){for(var j=!0,ye=B.rgba>>>24,re=B.rgba>>>16&255,ce=B.rgba>>>8&255,P=0;P<A.data.length;P+=4)A.data[P]===ye&&A.data[P+1]===re&&A.data[P+2]===ce?A.data[P+3]=0:j=!1;return j}(x,p));var w=this._toCoordinateX(S),E=this._toCoordinateY(S);this._cacheCtx.putImageData(x,w,E);var T={index:S,isEmpty:k,inBitmap:!1};return this._addGlyphToBitmap(T),T},c.prototype._addGlyphToBitmap=function(v){var S=this;!("createImageBitmap"in window)||r.isFirefox||r.isSafari||(this._glyphsWaitingOnBitmap.push(v),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return S._generateBitmap()},100)))},c.prototype._generateBitmap=function(){var v=this,S=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(p){v._bitmap=p;for(var m=0;m<S.length;m++)S[m].inBitmap=!0}),this._bitmapCommitTimeout=null},c}(o.BaseCharAtlas);a.DynamicCharAtlas=t;var n=function(l){function c(v,S){return l.call(this)||this}return C(c,l),c.prototype.draw=function(v,S,p,m){return!1},c}(o.BaseCharAtlas);a.NoneCharAtlas=n},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BaseCharAtlas=void 0;var y=function(){function C(){this._didWarmUp=!1}return C.prototype.dispose=function(){},C.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},C.prototype._doWarmUp=function(){},C.prototype.beginFrame=function(){},C}();a.BaseCharAtlas=y},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;var y=function(){function C(){this._color={},this._rgba={}}return C.prototype.clear=function(){this._color={},this._rgba={}},C.prototype.setCss=function(_,o,u){this._rgba[_]||(this._rgba[_]={}),this._rgba[_][o]=u},C.prototype.getCss=function(_,o){return this._rgba[_]?this._rgba[_][o]:void 0},C.prototype.setColor=function(_,o,u){this._color[_]||(this._color[_]={}),this._color[_][o]=u},C.prototype.getColor=function(_,o){return this._color[_]?this._color[_][o]:void 0},C}();a.ColorContrastCache=y},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.LRUMap=void 0;var y=function(){function C(_){this.capacity=_,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return C.prototype._unlinkNode=function(_){var o=_.prev,u=_.next;_===this._head&&(this._head=u),_===this._tail&&(this._tail=o),o!==null&&(o.next=u),u!==null&&(u.prev=o)},C.prototype._appendNode=function(_){var o=this._tail;o!==null&&(o.next=_),_.prev=o,_.next=null,this._tail=_,this._head===null&&(this._head=_)},C.prototype.prealloc=function(_){for(var o=this._nodePool,u=0;u<_;u++)o.push({prev:null,next:null,key:null,value:null})},C.prototype.get=function(_){var o=this._map[_];return o!==void 0?(this._unlinkNode(o),this._appendNode(o),o.value):null},C.prototype.peekValue=function(_){var o=this._map[_];return o!==void 0?o.value:null},C.prototype.peek=function(){var _=this._head;return _===null?null:_.value},C.prototype.set=function(_,o){var u=this._map[_];if(u!==void 0)u=this._map[_],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=_,u.value=o,this._map[_]=u;else{var d=this._nodePool;d.length>0?((u=d.pop()).key=_,u.value=o):u={prev:null,next:null,key:_,value:o},this._map[_]=u,this.size++}this._appendNode(u)},C}();a.LRUMap=y},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(o,u){return(y=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}y(o,u),o.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionRenderLayer=void 0;var _=function(o){function u(d,r,i,s,e,h){var t=o.call(this,d,"selection",r,!0,i,s,e,h)||this;return t._clearState(),t}return C(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 s=d[1]-this._bufferService.buffer.ydisp,e=r[1]-this._bufferService.buffer.ydisp,h=Math.max(s,0),t=Math.min(e,this._bufferService.rows-1);if(!(h>=this._bufferService.rows||t<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,i){var n=d[0],l=r[0]-n,c=t-h+1;this._fillCells(n,h,l,c)}else{n=s===h?d[0]:0;var v=h===t?r[0]:this._bufferService.cols;this._fillCells(n,h,v-n,1);var S=Math.max(t-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,S),h!==t){var p=e===t?r[0]:this._bufferService.cols;this._fillCells(0,t,p,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,s){return!this._areCoordinatesEqual(d,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||i!==this._state.columnSelectMode||s!==this._state.ydisp},u.prototype._areCoordinatesEqual=function(d,r){return!(!d||!r)&&d[0]===r[0]&&d[1]===r[1]},u}(f(13).BaseRenderLayer);a.SelectionRenderLayer=_},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,e){s.__proto__=e}||function(s,e){for(var h in e)e.hasOwnProperty(h)&&(s[h]=e[h])})(r,i)},function(r,i){function s(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(a,"__esModule",{value:!0}),a.CursorRenderLayer=void 0;var _=f(13),o=f(4),u=function(r){function i(s,e,h,t,n,l,c,v,S){var p=r.call(this,s,"cursor",e,!0,h,t,l,c)||this;return p._onRequestRedraw=n,p._coreService=v,p._coreBrowserService=S,p._cell=new o.CellData,p._state={x:0,y:0,isFocused:!1,style:"",width:0},p._cursorRenderers={bar:p._renderBarCursor.bind(p),block:p._renderBlockCursor.bind(p),underline:p._renderUnderlineCursor.bind(p)},p}return C(i,r),i.prototype.resize=function(s){r.prototype.resize.call(this,s),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 s,e=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new d(this._coreBrowserService.isFocused,function(){e._render(!0)})):((s=this._cursorBlinkStateManager)===null||s===void 0||s.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(s,e){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},i.prototype._render=function(s){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var e=this._bufferService.buffer.ybase+this._bufferService.buffer.y,h=e-this._bufferService.buffer.ydisp;if(h<0||h>=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,h,this._cell):this._renderBlurCursor(t,h,this._cell),this._ctx.restore(),this._state.x=t,this._state.y=h,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===h&&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,h,this._cell),this._ctx.restore(),this._state.x=t,this._state.y=h,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(s,e,h){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(s,e,this._optionsService.options.cursorWidth),this._ctx.restore()},i.prototype._renderBlockCursor=function(s,e,h){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(s,e,h.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(h,s,e),this._ctx.restore()},i.prototype._renderUnderlineCursor=function(s,e,h){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(s,e),this._ctx.restore()},i.prototype._renderBlurCursor=function(s,e,h){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(s,e,h.getWidth(),1),this._ctx.restore()},i}(_.BaseRenderLayer);a.CursorRenderLayer=u;var d=function(){function r(i,s){this._renderCallback=s,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 s=this;i===void 0&&(i=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(s._animationTimeRestarted){var e=600-(Date.now()-s._animationTimeRestarted);if(s._animationTimeRestarted=void 0,e>0)return void s._restartInterval(e)}s.isCursorVisible=!1,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0}),s._blinkInterval=window.setInterval(function(){if(s._animationTimeRestarted){var h=600-(Date.now()-s._animationTimeRestarted);return s._animationTimeRestarted=void 0,void s._restartInterval(h)}s.isCursorVisible=!s.isCursorVisible,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._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(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(r,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,e){s.__proto__=e}||function(s,e){for(var h in e)e.hasOwnProperty(h)&&(s[h]=e[h])})(r,i)},function(r,i){function s(){this.constructor=r}y(r,i),r.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(a,"__esModule",{value:!0}),a.LinkRenderLayer=void 0;var _=f(13),o=f(9),u=f(26),d=function(r){function i(s,e,h,t,n,l,c,v){var S=r.call(this,s,"link",e,!0,h,t,c,v)||this;return n.onShowLinkUnderline(function(p){return S._onShowLinkUnderline(p)}),n.onHideLinkUnderline(function(p){return S._onHideLinkUnderline(p)}),l.onShowLinkUnderline(function(p){return S._onShowLinkUnderline(p)}),l.onHideLinkUnderline(function(p){return S._onHideLinkUnderline(p)}),S}return C(i,r),i.prototype.resize=function(s){r.prototype.resize.call(this,s),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 s=this._state.y2-this._state.y1-1;s>0&&this._clearCells(0,this._state.y1+1,this._state.cols,s),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},i.prototype._onShowLinkUnderline=function(s){if(s.fg===o.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:s.fg&&u.is256Color(s.fg)?this._ctx.fillStyle=this._colors.ansi[s.fg].css:this._ctx.fillStyle=this._colors.foreground.css,s.y1===s.y2)this._fillBottomLineAtCells(s.x1,s.y1,s.x2-s.x1);else{this._fillBottomLineAtCells(s.x1,s.y1,s.cols-s.x1);for(var e=s.y1+1;e<s.y2;e++)this._fillBottomLineAtCells(0,e,s.cols);this._fillBottomLineAtCells(0,s.y2,s.x2)}this._state=s},i.prototype._onHideLinkUnderline=function(s){this._clearCurrentLink()},i}(_.BaseRenderLayer);a.LinkRenderLayer=d},function(L,a,f){"use strict";var y=this&&this.__decorate||function(r,i,s,e){var h,t=arguments.length,n=t<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,i,s,e);else for(var l=r.length-1;l>=0;l--)(h=r[l])&&(n=(t<3?h(n):t>3?h(i,s,n):h(i,s))||n);return t>3&&n&&Object.defineProperty(i,s,n),n},C=this&&this.__param||function(r,i){return function(s,e){i(s,e,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZone=a.Linkifier=void 0;var _=f(0),o=f(1),u=function(){function r(i,s,e){this._bufferService=i,this._logService=s,this._unicodeService=e,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new _.EventEmitter,this._onHideLinkUnderline=new _.EventEmitter,this._onLinkTooltip=new _.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,s){this._element=i,this._mouseZoneManager=s},r.prototype.linkifyRows=function(i,s){var e=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=i,this._rowsToLinkify.end=s):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,i),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,s)),this._mouseZoneManager.clearAll(i,s),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 s=i.ydisp+this._rowsToLinkify.start;if(!(s>=i.lines.length)){for(var e=i.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,h=Math.ceil(2e3/this._bufferService.cols),t=this._bufferService.buffer.iterator(!1,s,e,h,h);t.hasNext();)for(var n=t.next(),l=0;l<this._linkMatchers.length;l++)this._doLinkifyRow(n.range.first,n.content,this._linkMatchers[l]);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,s,e){if(e===void 0&&(e={}),!s)throw new Error("handler must be defined");var h={id:this._nextLinkMatcherId++,regex:i,handler:s,matchIndex:e.matchIndex,validationCallback:e.validationCallback,hoverTooltipCallback:e.tooltipCallback,hoverLeaveCallback:e.leaveCallback,willLinkActivate:e.willLinkActivate,priority:e.priority||0};return this._addLinkMatcherToList(h),h.id},r.prototype._addLinkMatcherToList=function(i){if(this._linkMatchers.length!==0){for(var s=this._linkMatchers.length-1;s>=0;s--)if(i.priority<=this._linkMatchers[s].priority)return void this._linkMatchers.splice(s+1,0,i);this._linkMatchers.splice(0,0,i)}else this._linkMatchers.push(i)},r.prototype.deregisterLinkMatcher=function(i){for(var s=0;s<this._linkMatchers.length;s++)if(this._linkMatchers[s].id===i)return this._linkMatchers.splice(s,1),!0;return!1},r.prototype._doLinkifyRow=function(i,s,e){for(var h,t=this,n=new RegExp(e.regex.source,(e.regex.flags||"")+"g"),l=-1,c=function(){var S=h[typeof e.matchIndex!="number"?0:e.matchIndex];if(!S)return v._logService.debug("match found without corresponding matchIndex",h,e),"break";if(l=s.indexOf(S,l+1),n.lastIndex=l+S.length,l<0)return"break";var p=v._bufferService.buffer.stringIndexToBufferIndex(i,l);if(p[0]<0)return"break";var m=v._bufferService.buffer.lines.get(p[0]);if(!m)return"break";var g=m.getFg(p[1]),x=g?g>>9&511:void 0;e.validationCallback?e.validationCallback(S,function(k){t._rowsTimeoutId||k&&t._addLink(p[1],p[0]-t._bufferService.buffer.ydisp,S,e,x)}):v._addLink(p[1],p[0]-v._bufferService.buffer.ydisp,S,e,x)},v=this;(h=n.exec(s))!==null&&c()!=="break";);},r.prototype._addLink=function(i,s,e,h,t){var n=this;if(this._mouseZoneManager&&this._element){var l=this._unicodeService.getStringCellWidth(e),c=i%this._bufferService.cols,v=s+Math.floor(i/this._bufferService.cols),S=(c+l)%this._bufferService.cols,p=v+Math.floor((c+l)/this._bufferService.cols);S===0&&(S=this._bufferService.cols,p--),this._mouseZoneManager.add(new d(c+1,v+1,S+1,p+1,function(m){if(h.handler)return h.handler(m,e);var g=window.open();g?(g.opener=null,g.location.href=e):console.warn("Opening link blocked as opener could not be cleared")},function(){n._onShowLinkUnderline.fire(n._createLinkHoverEvent(c,v,S,p,t)),n._element.classList.add("xterm-cursor-pointer")},function(m){n._onLinkTooltip.fire(n._createLinkHoverEvent(c,v,S,p,t)),h.hoverTooltipCallback&&h.hoverTooltipCallback(m,e,{start:{x:c,y:v},end:{x:S,y:p}})},function(){n._onHideLinkUnderline.fire(n._createLinkHoverEvent(c,v,S,p,t)),n._element.classList.remove("xterm-cursor-pointer"),h.hoverLeaveCallback&&h.hoverLeaveCallback()},function(m){return!h.willLinkActivate||h.willLinkActivate(m,e)}))}},r.prototype._createLinkHoverEvent=function(i,s,e,h,t){return{x1:i,y1:s,x2:e,y2:h,cols:this._bufferService.cols,fg:t}},r._timeBeforeLatency=200,r=y([C(0,o.IBufferService),C(1,o.ILogService),C(2,o.IUnicodeService)],r)}();a.Linkifier=u;var d=function(r,i,s,e,h,t,n,l,c){this.x1=r,this.y1=i,this.x2=s,this.y2=e,this.clickCallback=h,this.hoverCallback=t,this.tooltipCallback=n,this.leaveCallback=l,this.willLinkActivate=c};a.MouseZone=d},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(S,p){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,g){m.__proto__=g}||function(m,g){for(var x in g)g.hasOwnProperty(x)&&(m[x]=g[x])})(S,p)},function(S,p){function m(){this.constructor=S}y(S,p),S.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}),_=this&&this.__decorate||function(S,p,m,g){var x,k=arguments.length,w=k<3?p:g===null?g=Object.getOwnPropertyDescriptor(p,m):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(S,p,m,g);else for(var E=S.length-1;E>=0;E--)(x=S[E])&&(w=(k<3?x(w):k>3?x(p,m,w):x(p,m))||w);return k>3&&w&&Object.defineProperty(p,m,w),w},o=this&&this.__param||function(S,p){return function(m,g){p(m,g,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;var u=f(11),d=f(52),r=f(4),i=f(0),s=f(5),e=f(1),h=f(30),t=f(53),n=f(2),l="\xA0",c=new RegExp(l,"g"),v=function(S){function p(m,g,x,k,w,E,T){var A=S.call(this)||this;return A._element=m,A._screenElement=g,A._bufferService=x,A._coreService=k,A._mouseService=w,A._optionsService=E,A._renderService=T,A._dragScrollAmount=0,A._enabled=!0,A._workCell=new r.CellData,A._mouseDownTimeStamp=0,A._onLinuxMouseSelection=A.register(new i.EventEmitter),A._onRedrawRequest=A.register(new i.EventEmitter),A._onSelectionChange=A.register(new i.EventEmitter),A._onRequestScrollLines=A.register(new i.EventEmitter),A._mouseMoveListener=function(B){return A._onMouseMove(B)},A._mouseUpListener=function(B){return A._onMouseUp(B)},A._coreService.onUserInput(function(){A.hasSelection&&A.clearSelection()}),A._trimListener=A._bufferService.buffer.lines.onTrim(function(B){return A._onTrim(B)}),A.register(A._bufferService.buffers.onBufferActivate(function(B){return A._onBufferActivate(B)})),A.enable(),A._model=new d.SelectionModel(A._bufferService),A._activeSelectionMode=0,A}return C(p,S),Object.defineProperty(p.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){this._removeMouseDownListeners()},p.prototype.reset=function(){this.clearSelection()},p.prototype.disable=function(){this.clearSelection(),this._enabled=!1},p.prototype.enable=function(){this._enabled=!0},Object.defineProperty(p.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"hasSelection",{get:function(){var m=this._model.finalSelectionStart,g=this._model.finalSelectionEnd;return!(!m||!g)&&(m[0]!==g[0]||m[1]!==g[1])},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"selectionText",{get:function(){var m=this._model.finalSelectionStart,g=this._model.finalSelectionEnd;if(!m||!g)return"";var x=this._bufferService.buffer,k=[];if(this._activeSelectionMode===3){if(m[0]===g[0])return"";for(var w=m[1];w<=g[1];w++){var E=x.translateBufferLineToString(w,!0,m[0],g[0]);k.push(E)}}else{var T=m[1]===g[1]?g[0]:void 0;for(k.push(x.translateBufferLineToString(m[1],!0,m[0],T)),w=m[1]+1;w<=g[1]-1;w++){var A=x.lines.get(w);E=x.translateBufferLineToString(w,!0),A&&A.isWrapped?k[k.length-1]+=E:k.push(E)}m[1]!==g[1]&&(A=x.lines.get(g[1]),E=x.translateBufferLineToString(g[1],!0,0,g[0]),A&&A.isWrapped?k[k.length-1]+=E:k.push(E))}return k.map(function(B){return B.replace(c," ")}).join(u.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),p.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},p.prototype.refresh=function(m){var g=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return g._refresh()})),u.isLinux&&m&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},p.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},p.prototype.isClickInSelection=function(m){var g=this._getMouseBufferCoords(m),x=this._model.finalSelectionStart,k=this._model.finalSelectionEnd;return!!(x&&k&&g)&&this._areCoordsInSelection(g,x,k)},p.prototype._areCoordsInSelection=function(m,g,x){return m[1]>g[1]&&m[1]<x[1]||g[1]===x[1]&&m[1]===g[1]&&m[0]>=g[0]&&m[0]<x[0]||g[1]<x[1]&&m[1]===x[1]&&m[0]<x[0]||g[1]<x[1]&&m[1]===g[1]&&m[0]>=g[0]},p.prototype.selectWordAtCursor=function(m){var g=this._getMouseBufferCoords(m);g&&(this._selectWordAt(g,!1),this._model.selectionEnd=void 0,this.refresh(!0))},p.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},p.prototype.selectLines=function(m,g){this._model.clearSelection(),m=Math.max(m,0),g=Math.min(g,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,g],this.refresh(),this._onSelectionChange.fire()},p.prototype._onTrim=function(m){this._model.onTrim(m)&&this.refresh()},p.prototype._getMouseBufferCoords=function(m){var g=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(g)return g[0]--,g[1]--,g[1]+=this._bufferService.buffer.ydisp,g},p.prototype._getMouseEventScrollAmount=function(m){var g=h.getCoordsRelativeToElement(m,this._screenElement)[1],x=this._renderService.dimensions.canvasHeight;return g>=0&&g<=x?0:(g>x&&(g-=x),g=Math.min(Math.max(g,-50),50),(g/=50)/Math.abs(g)+Math.round(14*g))},p.prototype.shouldForceSelection=function(m){return u.isMac?m.altKey&&this._optionsService.options.macOptionClickForcesSelection:m.shiftKey},p.prototype.onMouseDown=function(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._onIncrementalClick(m):m.detail===1?this._onSingleClick(m):m.detail===2?this._onDoubleClick(m):m.detail===3&&this._onTripleClick(m),this._addMouseDownListeners(),this.refresh(!0)}},p.prototype._addMouseDownListeners=function(){var m=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return m._dragScroll()},50)},p.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},p.prototype._onIncrementalClick=function(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))},p.prototype._onSingleClick=function(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),this._model.selectionStart){this._model.selectionEnd=void 0;var g=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);g&&g.length!==this._model.selectionStart[0]&&g.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},p.prototype._onDoubleClick=function(m){var g=this._getMouseBufferCoords(m);g&&(this._activeSelectionMode=1,this._selectWordAt(g,!0))},p.prototype._onTripleClick=function(m){var g=this._getMouseBufferCoords(m);g&&(this._activeSelectionMode=2,this._selectLineAt(g[1]))},p.prototype.shouldColumnSelect=function(m){return m.altKey&&!(u.isMac&&this._optionsService.options.macOptionClickForcesSelection)},p.prototype._onMouseMove=function(m){if(m.stopImmediatePropagation(),this._model.selectionStart){var g=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),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(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var x=this._bufferService.buffer;if(this._model.selectionEnd[1]<x.lines.length){var k=x.lines.get(this._model.selectionEnd[1]);k&&k.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}g&&g[0]===this._model.selectionEnd[0]&&g[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},p.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}},p.prototype._onMouseUp=function(m){var g=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&g<500&&m.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var x=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(x&&x[0]!==void 0&&x[1]!==void 0){var k=t.moveToCellSequence(x[0]-1,x[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(k,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},p.prototype._onBufferActivate=function(m){var g=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim(function(x){return g._onTrim(x)})},p.prototype._convertViewportColToCharacterIndex=function(m,g){for(var x=g[0],k=0;g[0]>=k;k++){var w=m.loadCell(k,this._workCell).getChars().length;this._workCell.getWidth()===0?x--:w>1&&g[0]!==k&&(x+=w-1)}return x},p.prototype.setSelection=function(m,g,x){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,g],this._model.selectionStartLength=x,this.refresh()},p.prototype._getWordAt=function(m,g,x,k){if(x===void 0&&(x=!0),k===void 0&&(k=!0),!(m[0]>=this._bufferService.cols)){var w=this._bufferService.buffer,E=w.lines.get(m[1]);if(E){var T=w.translateBufferLineToString(m[1],!1),A=this._convertViewportColToCharacterIndex(E,m),B=A,j=m[0]-A,ye=0,re=0,ce=0,P=0;if(T.charAt(A)===" "){for(;A>0&&T.charAt(A-1)===" ";)A--;for(;B<T.length&&T.charAt(B+1)===" ";)B++}else{var N=m[0],H=m[0];E.getWidth(N)===0&&(ye++,N--),E.getWidth(H)===2&&(re++,H++);var Y=E.getString(H).length;for(Y>1&&(P+=Y-1,B+=Y-1);N>0&&A>0&&!this._isCharWordSeparator(E.loadCell(N-1,this._workCell));){E.loadCell(N-1,this._workCell);var W=this._workCell.getChars().length;this._workCell.getWidth()===0?(ye++,N--):W>1&&(ce+=W-1,A-=W-1),A--,N--}for(;H<E.length&&B+1<T.length&&!this._isCharWordSeparator(E.loadCell(H+1,this._workCell));){E.loadCell(H+1,this._workCell);var ie=this._workCell.getChars().length;this._workCell.getWidth()===2?(re++,H++):ie>1&&(P+=ie-1,B+=ie-1),B++,H++}}B++;var me=A+j-ye+ce,De=Math.min(this._bufferService.cols,B-A+ye+re-ce-P);if(g||T.slice(A,B).trim()!==""){if(x&&me===0&&E.getCodePoint(0)!==32){var ze=w.lines.get(m[1]-1);if(ze&&E.isWrapped&&ze.getCodePoint(this._bufferService.cols-1)!==32){var je=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(je){var _e=this._bufferService.cols-je.start;me-=_e,De+=_e}}}if(k&&me+De===this._bufferService.cols&&E.getCodePoint(this._bufferService.cols-1)!==32){var ke=w.lines.get(m[1]+1);if(ke&&ke.isWrapped&&ke.getCodePoint(0)!==32){var Ie=this._getWordAt([0,m[1]+1],!1,!1,!0);Ie&&(De+=Ie.length)}}return{start:me,length:De}}}}},p.prototype._selectWordAt=function(m,g){var x=this._getWordAt(m,g);if(x){for(;x.start<0;)x.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[x.start,m[1]],this._model.selectionStartLength=x.length}},p.prototype._selectToWordAt=function(m){var g=this._getWordAt(m,!0);if(g){for(var x=m[1];g.start<0;)g.start+=this._bufferService.cols,x--;if(!this._model.areSelectionValuesReversed())for(;g.start+g.length>this._bufferService.cols;)g.length-=this._bufferService.cols,x++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?g.start:g.start+g.length,x]}},p.prototype._isCharWordSeparator=function(m){return m.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(m.getChars())>=0},p.prototype._selectLineAt=function(m){var g=this._bufferService.buffer.getWrappedRangeForLine(m);this._model.selectionStart=[0,g.first],this._model.selectionEnd=[this._bufferService.cols,g.last],this._model.selectionStartLength=0},p=_([o(2,e.IBufferService),o(3,e.ICoreService),o(4,s.IMouseService),o(5,e.IOptionsService),o(6,s.IRenderService)],p)}(n.Disposable);a.SelectionService=v},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0;var y=function(){function C(_){this._bufferService=_,this.isSelectAllActive=!1,this.selectionStartLength=0}return C.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(C.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var _=this.selectionStart[0]+this.selectionStartLength;return _>this._bufferService.cols?[_%this._bufferService.cols,this.selectionStart[1]+Math.floor(_/this._bufferService.cols)]:[_,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),C.prototype.areSelectionValuesReversed=function(){var _=this.selectionStart,o=this.selectionEnd;return!(!_||!o)&&(_[1]>o[1]||_[1]===o[1]&&_[0]>o[0])},C.prototype.onTrim=function(_){return this.selectionStart&&(this.selectionStart[1]-=_),this.selectionEnd&&(this.selectionEnd[1]-=_),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},C}();a.SelectionModel=y},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;var y=f(12);function C(i,s,e,h){var t=i-_(e,i),n=s-_(e,s);return r(Math.abs(t-n)-function(l,c,v){for(var S=0,p=l-_(v,l),m=c-_(v,c),g=0;g<Math.abs(p-m);g++){var x=o(l,c)==="A"?-1:1,k=v.buffer.lines.get(p+x*g);k&&k.isWrapped&&S++}return S}(i,s,e),d(o(i,s),h))}function _(i,s){for(var e=0,h=i.buffer.lines.get(s),t=h&&h.isWrapped;t&&s>=0&&s<i.rows;)e++,t=(h=i.buffer.lines.get(--s))&&h.isWrapped;return e}function o(i,s){return i>s?"A":"B"}function u(i,s,e,h,t,n){for(var l=i,c=s,v="";l!==e||c!==h;)l+=t?1:-1,t&&l>n.cols-1?(v+=n.buffer.translateBufferLineToString(c,!1,i,l),l=0,i=0,c++):!t&&l<0&&(v+=n.buffer.translateBufferLineToString(c,!1,0,i+1),i=l=n.cols-1,c--);return v+n.buffer.translateBufferLineToString(c,!1,i,l)}function d(i,s){var e=s?"O":"[";return y.C0.ESC+e+i}function r(i,s){i=Math.floor(i);for(var e="",h=0;h<i;h++)e+=s;return e}a.moveToCellSequence=function(i,s,e,h){var t,n=e.buffer.x,l=e.buffer.y;if(!e.buffer.hasScrollback)return function(v,S,p,m,g,x){return C(S,m,g,x).length===0?"":r(u(v,S,v,S-_(g,S),!1,g).length,d("D",x))}(n,l,0,s,e,h)+C(l,s,e,h)+function(v,S,p,m,g,x){var k;k=C(S,m,g,x).length>0?m-_(g,m):S;var w=m,E=function(T,A,B,j,ye,re){var ce;return ce=C(B,j,ye,re).length>0?j-_(ye,j):A,T<B&&ce<=j||T>=B&&ce<j?"C":"D"}(v,S,p,m,g,x);return r(u(v,k,p,w,E==="C",g).length,d(E,x))}(n,l,i,s,e,h);if(l===s)return t=n>i?"D":"C",r(Math.abs(n-i),d(t,h));t=l>s?"D":"C";var c=Math.abs(l-s);return r(function(v,S){return S.cols-v}(l>s?i:n,e)+(c-1)*e.cols+1+((l>s?n:i)-1),d(t,h))}},function(L,a,f){"use strict";var y=this&&this.__decorate||function(u,d,r,i){var s,e=arguments.length,h=e<3?d:i===null?i=Object.getOwnPropertyDescriptor(d,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(u,d,r,i);else for(var t=u.length-1;t>=0;t--)(s=u[t])&&(h=(e<3?s(h):e>3?s(d,r,h):s(d,r))||h);return e>3&&h&&Object.defineProperty(d,r,h),h},C=this&&this.__param||function(u,d){return function(r,i){d(r,i,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SoundService=void 0;var _=f(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,s=new Uint8Array(i),e=0;e<i;e++)s[e]=r.charCodeAt(e);return s.buffer},u.prototype._removeMimeType=function(d){return d.split(",")[1]},u=y([C(0,_.IOptionsService)],u)}();a.SoundService=o},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(e,h){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var l in n)n.hasOwnProperty(l)&&(t[l]=n[l])})(e,h)},function(e,h){function t(){this.constructor=e}y(e,h),e.prototype=h===null?Object.create(h):(t.prototype=h.prototype,new t)}),_=this&&this.__decorate||function(e,h,t,n){var l,c=arguments.length,v=c<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,h,t,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(v=(c<3?l(v):c>3?l(h,t,v):l(h,t))||v);return c>3&&v&&Object.defineProperty(h,t,v),v},o=this&&this.__param||function(e,h){return function(t,n){h(t,n,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseZoneManager=void 0;var u=f(2),d=f(7),r=f(5),i=f(1),s=function(e){function h(t,n,l,c,v,S){var p=e.call(this)||this;return p._element=t,p._screenElement=n,p._bufferService=l,p._mouseService=c,p._selectionService=v,p._optionsService=S,p._zones=[],p._areZonesActive=!1,p._lastHoverCoords=[void 0,void 0],p._initialSelectionLength=0,p.register(d.addDisposableDomListener(p._element,"mousedown",function(m){return p._onMouseDown(m)})),p._mouseMoveListener=function(m){return p._onMouseMove(m)},p._mouseLeaveListener=function(m){return p._onMouseLeave(m)},p._clickListener=function(m){return p._onClick(m)},p}return C(h,e),h.prototype.dispose=function(){e.prototype.dispose.call(this),this._deactivate()},h.prototype.add=function(t){this._zones.push(t),this._zones.length===1&&this._activate()},h.prototype.clearAll=function(t,n){if(this._zones.length!==0){t&&n||(t=0,n=this._bufferService.rows-1);for(var l=0;l<this._zones.length;l++){var c=this._zones[l];(c.y1>t&&c.y1<=n+1||c.y2>t&&c.y2<=n+1||c.y1<t&&c.y2>n+1)&&(this._currentZone&&this._currentZone===c&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(l--,1))}this._zones.length===0&&this._deactivate()}},h.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))},h.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))},h.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},h.prototype._onHover=function(t){var n=this,l=this._findZoneEventAt(t);l!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),l&&(this._currentZone=l,l.hoverCallback&&l.hoverCallback(t),this._tooltipTimeout=window.setTimeout(function(){return n._onTooltip(t)},this._optionsService.options.linkTooltipHoverDuration)))},h.prototype._onTooltip=function(t){this._tooltipTimeout=void 0;var n=this._findZoneEventAt(t);n&&n.tooltipCallback&&n.tooltipCallback(t)},h.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())}},h.prototype._onMouseLeave=function(t){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},h.prototype._onClick=function(t){var n=this._findZoneEventAt(t),l=this._getSelectionLength();n&&l===this._initialSelectionLength&&(n.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},h.prototype._getSelectionLength=function(){var t=this._selectionService.selectionText;return t?t.length:0},h.prototype._findZoneEventAt=function(t){var n=this._mouseService.getCoords(t,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(n)for(var l=n[0],c=n[1],v=0;v<this._zones.length;v++){var S=this._zones[v];if(S.y1===S.y2){if(c===S.y1&&l>=S.x1&&l<S.x2)return S}else if(c===S.y1&&l>=S.x1||c===S.y2&&l<S.x2||c>S.y1&&c<S.y2)return S}},h=_([o(2,i.IBufferService),o(3,r.IMouseService),o(4,r.ISelectionService),o(5,i.IOptionsService)],h)}(u.Disposable);a.MouseZoneManager=s},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(h,t){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,l){n.__proto__=l}||function(n,l){for(var c in l)l.hasOwnProperty(c)&&(n[c]=l[c])})(h,t)},function(h,t){function n(){this.constructor=h}y(h,t),h.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;var _=f(18),o=f(11),u=f(31),d=f(7),r=f(2),i=f(32),s=f(17),e=function(h){function t(n,l){var c=h.call(this)||this;c._terminal=n,c._renderService=l,c._liveRegionLineCount=0,c._charsToConsume=[],c._charsToAnnounce="",c._accessibilityTreeRoot=document.createElement("div"),c._accessibilityTreeRoot.classList.add("xterm-accessibility"),c._rowContainer=document.createElement("div"),c._rowContainer.classList.add("xterm-accessibility-tree"),c._rowContainer.setAttribute("role","list"),c._rowElements=[];for(var v=0;v<c._terminal.rows;v++)c._rowElements[v]=c._createAccessibilityTreeNode(),c._rowContainer.appendChild(c._rowElements[v]);if(c._topBoundaryFocusListener=function(S){return c._onBoundaryFocus(S,0)},c._bottomBoundaryFocusListener=function(S){return c._onBoundaryFocus(S,1)},c._rowElements[0].addEventListener("focus",c._topBoundaryFocusListener),c._rowElements[c._rowElements.length-1].addEventListener("focus",c._bottomBoundaryFocusListener),c._refreshRowsDimensions(),c._accessibilityTreeRoot.appendChild(c._rowContainer),c._renderRowsDebouncer=new u.RenderDebouncer(c._renderRows.bind(c)),c._refreshRows(),c._liveRegion=document.createElement("div"),c._liveRegion.classList.add("live-region"),c._liveRegion.setAttribute("aria-live","assertive"),c._accessibilityTreeRoot.appendChild(c._liveRegion),!c._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return c._terminal.element.insertAdjacentElement("afterbegin",c._accessibilityTreeRoot),c.register(c._renderRowsDebouncer),c.register(c._terminal.onResize(function(S){return c._onResize(S.rows)})),c.register(c._terminal.onRender(function(S){return c._refreshRows(S.start,S.end)})),c.register(c._terminal.onScroll(function(){return c._refreshRows()})),c.register(c._terminal.onA11yChar(function(S){return c._onChar(S)})),c.register(c._terminal.onLineFeed(function(){return c._onChar(`
`)})),c.register(c._terminal.onA11yTab(function(S){return c._onTab(S)})),c.register(c._terminal.onKey(function(S){return c._onKey(S.key)})),c.register(c._terminal.onBlur(function(){return c._clearLiveRegion()})),c.register(c._renderService.onDimensionsChange(function(){return c._refreshRowsDimensions()})),c._screenDprMonitor=new i.ScreenDprMonitor,c.register(c._screenDprMonitor),c._screenDprMonitor.setListener(function(){return c._refreshRowsDimensions()}),c.register(d.addDisposableDomListener(window,"resize",function(){return c._refreshRowsDimensions()})),c}return C(t,h),t.prototype.dispose=function(){h.prototype.dispose.call(this),s.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(n,l){var c=n.target,v=this._rowElements[l===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")!==(l===0?"1":""+this._terminal.buffer.lines.length)&&n.relatedTarget===v){var S,p;if(l===0?(S=c,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(S=this._rowElements.shift(),p=c,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),p.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){var m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else m=this._createAccessibilityTreeNode(),this._rowElements.push(m),this._rowContainer.appendChild(m);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===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 l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);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 l=0;l<n;l++)this._onChar(" ")},t.prototype._onChar=function(n){var l=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+=_.tooMuchOutput)),o.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){l._accessibilityTreeRoot.appendChild(l._liveRegion)},0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,o.isMac&&s.removeElementFromParent(this._liveRegion)},t.prototype._onKey=function(n){this._clearLiveRegion(),this._charsToConsume.push(n)},t.prototype._refreshRows=function(n,l){this._renderRowsDebouncer.refresh(n,l,this._terminal.rows)},t.prototype._renderRows=function(n,l){for(var c=this._terminal.buffer,v=c.lines.length.toString(),S=n;S<=l;S++){var p=c.translateBufferLineToString(c.ydisp+S,!0),m=(c.ydisp+S+1).toString(),g=this._rowElements[S];g&&(p.length===0?g.innerHTML="&nbsp;":g.textContent=p,g.setAttribute("aria-posinset",m),g.setAttribute("aria-setsize",v))}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);a.AccessibilityManager=e},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(c,v){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,p){S.__proto__=p}||function(S,p){for(var m in p)p.hasOwnProperty(m)&&(S[m]=p[m])})(c,v)},function(c,v){function S(){this.constructor=c}y(c,v),c.prototype=v===null?Object.create(v):(S.prototype=v.prototype,new S)}),_=this&&this.__decorate||function(c,v,S,p){var m,g=arguments.length,x=g<3?v:p===null?p=Object.getOwnPropertyDescriptor(v,S):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,v,S,p);else for(var k=c.length-1;k>=0;k--)(m=c[k])&&(x=(g<3?m(x):g>3?m(v,S,x):m(v,S))||x);return g>3&&x&&Object.defineProperty(v,S,x),x},o=this&&this.__param||function(c,v){return function(S,p){v(S,p,c)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;var u=f(58),d=f(9),r=f(2),i=f(5),s=f(1),e=f(0),h=f(10),t=f(17),n=1,l=function(c){function v(S,p,m,g,x,k,w,E,T){var A=c.call(this)||this;return A._colors=S,A._element=p,A._screenElement=m,A._viewportElement=g,A._linkifier=x,A._linkifier2=k,A._charSizeService=w,A._optionsService=E,A._bufferService=T,A._terminalClass=n++,A._rowElements=[],A._rowContainer=document.createElement("div"),A._rowContainer.classList.add("xterm-rows"),A._rowContainer.style.lineHeight="normal",A._rowContainer.setAttribute("aria-hidden","true"),A._refreshRowElements(A._bufferService.cols,A._bufferService.rows),A._selectionContainer=document.createElement("div"),A._selectionContainer.classList.add("xterm-selection"),A._selectionContainer.setAttribute("aria-hidden","true"),A.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},A._updateDimensions(),A._injectCss(),A._rowFactory=new u.DomRendererRowFactory(document,A._optionsService,A._colors),A._element.classList.add("xterm-dom-renderer-owner-"+A._terminalClass),A._screenElement.appendChild(A._rowContainer),A._screenElement.appendChild(A._selectionContainer),A._linkifier.onShowLinkUnderline(function(B){return A._onLinkHover(B)}),A._linkifier.onHideLinkUnderline(function(B){return A._onLinkLeave(B)}),A._linkifier2.onShowLinkUnderline(function(B){return A._onLinkHover(B)}),A._linkifier2.onHideLinkUnderline(function(B){return A._onLinkLeave(B)}),A}return C(v,c),Object.defineProperty(v.prototype,"onRequestRedraw",{get:function(){return new e.EventEmitter().event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),t.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),c.prototype.dispose.call(this)},v.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 S=0,p=this._rowElements;S<p.length;S++){var m=p[S];m.style.width=this.dimensions.canvasWidth+"px",m.style.height=this.dimensions.actualCellHeight+"px",m.style.lineHeight=this.dimensions.actualCellHeight+"px",m.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var g=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=g,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},v.prototype.setColors=function(S){this._colors=S,this._injectCss()},v.prototype._injectCss=function(){var S=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var p=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";p+=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;}",p+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",p+="@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+"; }}",p+=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;}",p+=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(m,g){p+=S._terminalSelector+" .xterm-fg-"+g+" { color: "+m.css+"; }"+S._terminalSelector+" .xterm-bg-"+g+" { background-color: "+m.css+"; }"}),p+=this._terminalSelector+" .xterm-fg-"+d.INVERTED_DEFAULT_COLOR+" { color: "+h.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+d.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=p},v.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},v.prototype._refreshRowElements=function(S,p){for(var m=this._rowElements.length;m<=p;m++){var g=document.createElement("div");this._rowContainer.appendChild(g),this._rowElements.push(g)}for(;this._rowElements.length>p;)this._rowContainer.removeChild(this._rowElements.pop())},v.prototype.onResize=function(S,p){this._refreshRowElements(S,p),this._updateDimensions()},v.prototype.onCharSizeChanged=function(){this._updateDimensions()},v.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},v.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},v.prototype.onSelectionChanged=function(S,p,m){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(S&&p){var g=S[1]-this._bufferService.buffer.ydisp,x=p[1]-this._bufferService.buffer.ydisp,k=Math.max(g,0),w=Math.min(x,this._bufferService.rows-1);if(!(k>=this._bufferService.rows||w<0)){var E=document.createDocumentFragment();if(m)E.appendChild(this._createSelectionElement(k,S[0],p[0],w-k+1));else{var T=g===k?S[0]:0,A=k===w?p[0]:this._bufferService.cols;E.appendChild(this._createSelectionElement(k,T,A));var B=w-k-1;if(E.appendChild(this._createSelectionElement(k+1,0,this._bufferService.cols,B)),k!==w){var j=x===w?p[0]:this._bufferService.cols;E.appendChild(this._createSelectionElement(w,0,j))}}this._selectionContainer.appendChild(E)}}},v.prototype._createSelectionElement=function(S,p,m,g){g===void 0&&(g=1);var x=document.createElement("div");return x.style.height=g*this.dimensions.actualCellHeight+"px",x.style.top=S*this.dimensions.actualCellHeight+"px",x.style.left=p*this.dimensions.actualCellWidth+"px",x.style.width=this.dimensions.actualCellWidth*(m-p)+"px",x},v.prototype.onCursorMove=function(){},v.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},v.prototype.clear=function(){for(var S=0,p=this._rowElements;S<p.length;S++)p[S].innerHTML=""},v.prototype.renderRows=function(S,p){for(var m=this._bufferService.buffer.ybase+this._bufferService.buffer.y,g=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),x=this._optionsService.options.cursorBlink,k=S;k<=p;k++){var w=this._rowElements[k];w.innerHTML="";var E=k+this._bufferService.buffer.ydisp,T=this._bufferService.buffer.lines.get(E),A=this._optionsService.options.cursorStyle;w.appendChild(this._rowFactory.createRow(T,E===m,A,g,x,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(v.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),v.prototype.registerCharacterJoiner=function(S){return-1},v.prototype.deregisterCharacterJoiner=function(S){return!1},v.prototype._onLinkHover=function(S){this._setCellUnderline(S.x1,S.x2,S.y1,S.y2,S.cols,!0)},v.prototype._onLinkLeave=function(S){this._setCellUnderline(S.x1,S.x2,S.y1,S.y2,S.cols,!1)},v.prototype._setCellUnderline=function(S,p,m,g,x,k){for(;S!==p||m!==g;){var w=this._rowElements[m];if(!w)return;var E=w.children[S];E&&(E.style.textDecoration=k?"underline":"none"),++S>=x&&(S=0,m++)}},v=_([o(6,i.ICharSizeService),o(7,s.IOptionsService),o(8,s.IBufferService)],v)}(r.Disposable);a.DomRenderer=l},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=a.CURSOR_STYLE_UNDERLINE_CLASS=a.CURSOR_STYLE_BAR_CLASS=a.CURSOR_STYLE_BLOCK_CLASS=a.CURSOR_BLINK_CLASS=a.CURSOR_CLASS=a.UNDERLINE_CLASS=a.ITALIC_CLASS=a.DIM_CLASS=a.BOLD_CLASS=void 0;var y=f(9),C=f(3),_=f(4),o=f(10);a.BOLD_CLASS="xterm-bold",a.DIM_CLASS="xterm-dim",a.ITALIC_CLASS="xterm-italic",a.UNDERLINE_CLASS="xterm-underline",a.CURSOR_CLASS="xterm-cursor",a.CURSOR_BLINK_CLASS="xterm-cursor-blink",a.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",a.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",a.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var u=function(){function r(i,s,e){this._document=i,this._optionsService=s,this._colors=e,this._workCell=new _.CellData}return r.prototype.setColors=function(i){this._colors=i},r.prototype.createRow=function(i,s,e,h,t,n,l){for(var c=this._document.createDocumentFragment(),v=0,S=Math.min(i.length,l)-1;S>=0;S--)if(i.loadCell(S,this._workCell).getCode()!==C.NULL_CELL_CODE||s&&S===h){v=S+1;break}for(S=0;S<v;S++){i.loadCell(S,this._workCell);var p=this._workCell.getWidth();if(p!==0){var m=this._document.createElement("span");if(p>1&&(m.style.width=n*p+"px"),s&&S===h)switch(m.classList.add(a.CURSOR_CLASS),t&&m.classList.add(a.CURSOR_BLINK_CLASS),e){case"bar":m.classList.add(a.CURSOR_STYLE_BAR_CLASS);break;case"underline":m.classList.add(a.CURSOR_STYLE_UNDERLINE_CLASS);break;default:m.classList.add(a.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&m.classList.add(a.BOLD_CLASS),this._workCell.isItalic()&&m.classList.add(a.ITALIC_CLASS),this._workCell.isDim()&&m.classList.add(a.DIM_CLASS),this._workCell.isUnderline()&&m.classList.add(a.UNDERLINE_CLASS),this._workCell.isInvisible()?m.textContent=C.WHITESPACE_CELL_CHAR:m.textContent=this._workCell.getChars()||C.WHITESPACE_CELL_CHAR;var g=this._workCell.getFgColor(),x=this._workCell.getFgColorMode(),k=this._workCell.getBgColor(),w=this._workCell.getBgColorMode(),E=!!this._workCell.isInverse();if(E){var T=g;g=k,k=T;var A=x;x=w,w=A}switch(x){case 16777216:case 33554432:this._workCell.isBold()&&g<8&&this._optionsService.options.drawBoldTextInBrightColors&&(g+=8),this._applyMinimumContrast(m,this._colors.background,this._colors.ansi[g])||m.classList.add("xterm-fg-"+g);break;case 50331648:var B=o.rgba.toColor(g>>16&255,g>>8&255,255&g);this._applyMinimumContrast(m,this._colors.background,B)||this._addStyle(m,"color:#"+d(g.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(m,this._colors.background,this._colors.foreground)||E&&m.classList.add("xterm-fg-"+y.INVERTED_DEFAULT_COLOR)}switch(w){case 16777216:case 33554432:m.classList.add("xterm-bg-"+k);break;case 50331648:this._addStyle(m,"background-color:#"+d(k.toString(16),"0",6));break;case 0:default:E&&m.classList.add("xterm-bg-"+y.INVERTED_DEFAULT_COLOR)}c.appendChild(m)}}return c},r.prototype._applyMinimumContrast=function(i,s,e){if(this._optionsService.options.minimumContrastRatio===1)return!1;var h=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return h===void 0&&(h=o.color.ensureContrastRatio(s,e,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,h!=null?h:null)),!!h&&(this._addStyle(i,"color:"+h.css),!0)},r.prototype._addStyle=function(i,s){i.setAttribute("style",""+(i.getAttribute("style")||"")+s+";")},r}();function d(r,i,s){for(;r.length<s;)r=i+r;return r}a.DomRendererRowFactory=u},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;var y=f(12),C={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(_,o,u,d){var r={type:0,cancel:!1,key:void 0},i=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?r.key=o?y.C0.ESC+"OA":y.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?r.key=o?y.C0.ESC+"OD":y.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?r.key=o?y.C0.ESC+"OC":y.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(r.key=o?y.C0.ESC+"OB":y.C0.ESC+"[B");break;case 8:if(_.shiftKey){r.key=y.C0.BS;break}if(_.altKey){r.key=y.C0.ESC+y.C0.DEL;break}r.key=y.C0.DEL;break;case 9:if(_.shiftKey){r.key=y.C0.ESC+"[Z";break}r.key=y.C0.HT,r.cancel=!0;break;case 13:r.key=_.altKey?y.C0.ESC+y.C0.CR:y.C0.CR,r.cancel=!0;break;case 27:r.key=y.C0.ESC,_.altKey&&(r.key=y.C0.ESC+y.C0.ESC),r.cancel=!0;break;case 37:if(_.metaKey)break;i?(r.key=y.C0.ESC+"[1;"+(i+1)+"D",r.key===y.C0.ESC+"[1;3D"&&(r.key=y.C0.ESC+(u?"b":"[1;5D"))):r.key=o?y.C0.ESC+"OD":y.C0.ESC+"[D";break;case 39:if(_.metaKey)break;i?(r.key=y.C0.ESC+"[1;"+(i+1)+"C",r.key===y.C0.ESC+"[1;3C"&&(r.key=y.C0.ESC+(u?"f":"[1;5C"))):r.key=o?y.C0.ESC+"OC":y.C0.ESC+"[C";break;case 38:if(_.metaKey)break;i?(r.key=y.C0.ESC+"[1;"+(i+1)+"A",u||r.key!==y.C0.ESC+"[1;3A"||(r.key=y.C0.ESC+"[1;5A")):r.key=o?y.C0.ESC+"OA":y.C0.ESC+"[A";break;case 40:if(_.metaKey)break;i?(r.key=y.C0.ESC+"[1;"+(i+1)+"B",u||r.key!==y.C0.ESC+"[1;3B"||(r.key=y.C0.ESC+"[1;5B")):r.key=o?y.C0.ESC+"OB":y.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(r.key=y.C0.ESC+"[2~");break;case 46:r.key=i?y.C0.ESC+"[3;"+(i+1)+"~":y.C0.ESC+"[3~";break;case 36:r.key=i?y.C0.ESC+"[1;"+(i+1)+"H":o?y.C0.ESC+"OH":y.C0.ESC+"[H";break;case 35:r.key=i?y.C0.ESC+"[1;"+(i+1)+"F":o?y.C0.ESC+"OF":y.C0.ESC+"[F";break;case 33:_.shiftKey?r.type=2:r.key=y.C0.ESC+"[5~";break;case 34:_.shiftKey?r.type=3:r.key=y.C0.ESC+"[6~";break;case 112:r.key=i?y.C0.ESC+"[1;"+(i+1)+"P":y.C0.ESC+"OP";break;case 113:r.key=i?y.C0.ESC+"[1;"+(i+1)+"Q":y.C0.ESC+"OQ";break;case 114:r.key=i?y.C0.ESC+"[1;"+(i+1)+"R":y.C0.ESC+"OR";break;case 115:r.key=i?y.C0.ESC+"[1;"+(i+1)+"S":y.C0.ESC+"OS";break;case 116:r.key=i?y.C0.ESC+"[15;"+(i+1)+"~":y.C0.ESC+"[15~";break;case 117:r.key=i?y.C0.ESC+"[17;"+(i+1)+"~":y.C0.ESC+"[17~";break;case 118:r.key=i?y.C0.ESC+"[18;"+(i+1)+"~":y.C0.ESC+"[18~";break;case 119:r.key=i?y.C0.ESC+"[19;"+(i+1)+"~":y.C0.ESC+"[19~";break;case 120:r.key=i?y.C0.ESC+"[20;"+(i+1)+"~":y.C0.ESC+"[20~";break;case 121:r.key=i?y.C0.ESC+"[21;"+(i+1)+"~":y.C0.ESC+"[21~";break;case 122:r.key=i?y.C0.ESC+"[23;"+(i+1)+"~":y.C0.ESC+"[23~";break;case 123:r.key=i?y.C0.ESC+"[24;"+(i+1)+"~":y.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(u&&!d||!_.altKey||_.metaKey)u&&!_.altKey&&!_.ctrlKey&&_.metaKey?_.keyCode===65&&(r.type=1):_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?r.key=_.key:_.key&&_.ctrlKey&&_.key==="_"&&(r.key=y.C0.US);else{var s=C[_.keyCode],e=s&&s[_.shiftKey?1:0];if(e)r.key=y.C0.ESC+e;else if(_.keyCode>=65&&_.keyCode<=90){var h=_.ctrlKey?_.keyCode-64:_.keyCode+32;r.key=y.C0.ESC+String.fromCharCode(h)}}else _.keyCode>=65&&_.keyCode<=90?r.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?r.key=y.C0.NUL:_.keyCode>=51&&_.keyCode<=55?r.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?r.key=y.C0.DEL:_.keyCode===219?r.key=y.C0.ESC:_.keyCode===220?r.key=y.C0.FS:_.keyCode===221&&(r.key=y.C0.GS)}return r}},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(n,l){return(y=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])})(n,l)},function(n,l){function c(){this.constructor=n}y(n,l),n.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),_=this&&this.__decorate||function(n,l,c,v){var S,p=arguments.length,m=p<3?l:v===null?v=Object.getOwnPropertyDescriptor(l,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(n,l,c,v);else for(var g=n.length-1;g>=0;g--)(S=n[g])&&(m=(p<3?S(m):p>3?S(l,c,m):S(l,c))||m);return p>3&&m&&Object.defineProperty(l,c,m),m},o=this&&this.__param||function(n,l){return function(c,v){l(c,v,n)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;var u=f(31),d=f(0),r=f(2),i=f(32),s=f(7),e=f(1),h=f(5),t=function(n){function l(c,v,S,p,m,g){var x=n.call(this)||this;if(x._renderer=c,x._rowCount=v,x._isPaused=!1,x._needsFullRefresh=!1,x._isNextRenderRedrawOnly=!0,x._needsSelectionRefresh=!1,x._canvasWidth=0,x._canvasHeight=0,x._selectionState={start:void 0,end:void 0,columnSelectMode:!1},x._onDimensionsChange=new d.EventEmitter,x._onRender=new d.EventEmitter,x._onRefreshRequest=new d.EventEmitter,x.register({dispose:function(){return x._renderer.dispose()}}),x._renderDebouncer=new u.RenderDebouncer(function(w,E){return x._renderRows(w,E)}),x.register(x._renderDebouncer),x._screenDprMonitor=new i.ScreenDprMonitor,x._screenDprMonitor.setListener(function(){return x.onDevicePixelRatioChange()}),x.register(x._screenDprMonitor),x.register(g.onResize(function(w){return x._fullRefresh()})),x.register(p.onOptionChange(function(){return x._renderer.onOptionsChanged()})),x.register(m.onCharSizeChange(function(){return x.onCharSizeChanged()})),x._renderer.onRequestRedraw(function(w){return x.refreshRows(w.start,w.end,!0)}),x.register(s.addDisposableDomListener(window,"resize",function(){return x.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var k=new IntersectionObserver(function(w){return x._onIntersectionChange(w[w.length-1])},{threshold:0});k.observe(S),x.register({dispose:function(){return k.disconnect()}})}return x}return C(l,n),Object.defineProperty(l.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),l.prototype._onIntersectionChange=function(c){this._isPaused=c.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},l.prototype.refreshRows=function(c,v,S){S===void 0&&(S=!1),this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(c,v,this._rowCount))},l.prototype._renderRows=function(c,v){this._renderer.renderRows(c,v),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:c,end:v}),this._isNextRenderRedrawOnly=!0},l.prototype.resize=function(c,v){this._rowCount=v,this._fireOnCanvasResize()},l.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},l.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},l.prototype.dispose=function(){n.prototype.dispose.call(this)},l.prototype.setRenderer=function(c){var v=this;this._renderer.dispose(),this._renderer=c,this._renderer.onRequestRedraw(function(S){return v.refreshRows(S.start,S.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},l.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},l.prototype.setColors=function(c){this._renderer.setColors(c),this._fullRefresh()},l.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},l.prototype.onResize=function(c,v){this._renderer.onResize(c,v),this._fullRefresh()},l.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},l.prototype.onBlur=function(){this._renderer.onBlur()},l.prototype.onFocus=function(){this._renderer.onFocus()},l.prototype.onSelectionChanged=function(c,v,S){this._selectionState.start=c,this._selectionState.end=v,this._selectionState.columnSelectMode=S,this._renderer.onSelectionChanged(c,v,S)},l.prototype.onCursorMove=function(){this._renderer.onCursorMove()},l.prototype.clear=function(){this._renderer.clear()},l.prototype.registerCharacterJoiner=function(c){return this._renderer.registerCharacterJoiner(c)},l.prototype.deregisterCharacterJoiner=function(c){return this._renderer.deregisterCharacterJoiner(c)},l=_([o(3,e.IOptionsService),o(4,h.ICharSizeService),o(5,e.IBufferService)],l)}(r.Disposable);a.RenderService=t},function(L,a,f){"use strict";var y=this&&this.__decorate||function(r,i,s,e){var h,t=arguments.length,n=t<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,i,s,e);else for(var l=r.length-1;l>=0;l--)(h=r[l])&&(n=(t<3?h(n):t>3?h(i,s,n):h(i,s))||n);return t>3&&n&&Object.defineProperty(i,s,n),n},C=this&&this.__param||function(r,i){return function(s,e){i(s,e,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;var _=f(1),o=f(0),u=function(){function r(i,s,e){this._optionsService=e,this.width=0,this.height=0,this._onCharSizeChange=new o.EventEmitter,this._measureStrategy=new d(i,s,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=y([C(2,_.IOptionsService)],r)}();a.CharSizeService=u;var d=function(){function r(i,s,e){this._document=i,this._parentElement=s,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(L,a,f){"use strict";var y=this&&this.__decorate||function(d,r,i,s){var e,h=arguments.length,t=h<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,i):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(d,r,i,s);else for(var n=d.length-1;n>=0;n--)(e=d[n])&&(t=(h<3?e(t):h>3?e(r,i,t):e(r,i))||t);return h>3&&t&&Object.defineProperty(r,i,t),t},C=this&&this.__param||function(d,r){return function(i,s){r(i,s,d)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;var _=f(5),o=f(30),u=function(){function d(r,i){this._renderService=r,this._charSizeService=i}return d.prototype.getCoords=function(r,i,s,e,h){return o.getCoords(r,i,s,e,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,h)},d.prototype.getRawByteCoords=function(r,i,s,e){var h=this.getCoords(r,i,s,e);return o.getRawByteCoords(h)},d=y([C(0,_.IRenderService),C(1,_.ICharSizeService)],d)}();a.MouseService=u},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(e,h){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var l in n)n.hasOwnProperty(l)&&(t[l]=n[l])})(e,h)},function(e,h){function t(){this.constructor=e}y(e,h),e.prototype=h===null?Object.create(h):(t.prototype=h.prototype,new t)}),_=this&&this.__decorate||function(e,h,t,n){var l,c=arguments.length,v=c<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,h,t,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(v=(c<3?l(v):c>3?l(h,t,v):l(h,t))||v);return c>3&&v&&Object.defineProperty(h,t,v),v},o=this&&this.__param||function(e,h){return function(t,n){h(t,n,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier2=void 0;var u=f(1),d=f(0),r=f(2),i=f(7),s=function(e){function h(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 C(h,e),Object.defineProperty(h.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),h.prototype.registerLinkProvider=function(t){var n=this;return this._linkProviders.push(t),{dispose:function(){var l=n._linkProviders.indexOf(t);l!==-1&&n._linkProviders.splice(l,1)}}},h.prototype.attachToDom=function(t,n,l){var c=this;this._element=t,this._mouseService=n,this._renderService=l,this.register(i.addDisposableDomListener(this._element,"mouseleave",function(){c._isMouseOut=!0,c._clearCurrentLink()})),this.register(i.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(i.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},h.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 l=t.composedPath(),c=0;c<l.length;c++){var v=l[c];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&n.x===this._lastBufferCell.x&&n.y===this._lastBufferCell.y||(this._onHover(n),this._lastBufferCell=n)}}},h.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))},h.prototype._askForLink=function(t,n){var l=this;this._activeProviderReplies&&n||(this._activeProviderReplies=new Map,this._activeLine=t.y);var c=!1;this._linkProviders.forEach(function(v,S){var p;n?!((p=l._activeProviderReplies)===null||p===void 0)&&p.get(S)&&(c=l._checkLinkProviderResult(S,t,c)):v.provideLinks(t.y,function(m){var g,x;if(!l._isMouseOut){var k=m==null?void 0:m.map(function(w){return{link:w}});(g=l._activeProviderReplies)===null||g===void 0||g.set(S,k),c=l._checkLinkProviderResult(S,t,c),((x=l._activeProviderReplies)===null||x===void 0?void 0:x.size)===l._linkProviders.length&&l._removeIntersectingLinks(t.y,l._activeProviderReplies)}})})},h.prototype._removeIntersectingLinks=function(t,n){for(var l=new Set,c=0;c<n.size;c++){var v=n.get(c);if(v)for(var S=0;S<v.length;S++)for(var p=v[S],m=p.link.range.start.y<t?0:p.link.range.start.x,g=p.link.range.end.y>t?this._bufferService.cols:p.link.range.end.x,x=m;x<=g;x++){if(l.has(x)){v.splice(S--,1);break}l.add(x)}}},h.prototype._checkLinkProviderResult=function(t,n,l){var c,v=this;if(!this._activeProviderReplies)return l;for(var S=this._activeProviderReplies.get(t),p=!1,m=0;m<t;m++)this._activeProviderReplies.has(m)&&!this._activeProviderReplies.get(m)||(p=!0);if(!p&&S){var g=S.find(function(k){return v._linkAtPosition(k.link,n)});g&&(l=!0,this._handleNewLink(g))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(m=0;m<this._activeProviderReplies.size;m++){var x=(c=this._activeProviderReplies.get(m))===null||c===void 0?void 0:c.find(function(k){return v._linkAtPosition(k.link,n)});if(x){l=!0,this._handleNewLink(x);break}}return l},h.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)}},h.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))},h.prototype._handleNewLink=function(t){var n=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(t.link,l)&&(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 c,v;return(v=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||v===void 0?void 0:v.decorations.pointerCursor},set:function(c){var v,S;!((v=n._currentLink)===null||v===void 0)&&v.state&&n._currentLink.state.decorations.pointerCursor!==c&&(n._currentLink.state.decorations.pointerCursor=c,n._currentLink.state.isHovered&&((S=n._element)===null||S===void 0||S.classList.toggle("xterm-cursor-pointer",c)))}},underline:{get:function(){var c,v;return(v=(c=n._currentLink)===null||c===void 0?void 0:c.state)===null||v===void 0?void 0:v.decorations.underline},set:function(c){var v,S,p;!((v=n._currentLink)===null||v===void 0)&&v.state&&((p=(S=n._currentLink)===null||S===void 0?void 0:S.state)===null||p===void 0?void 0:p.decorations.underline)!==c&&(n._currentLink.state.decorations.underline=c,n._currentLink.state.isHovered&&n._fireUnderlineEvent(t.link,c))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(c){var v=c.start===0?0:c.start+1+n._bufferService.buffer.ydisp;n._clearCurrentLink(v,c.end+1+n._bufferService.buffer.ydisp)})))}},h.prototype._linkHover=function(t,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.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(l,n.text)},h.prototype._fireUnderlineEvent=function(t,n){var l=t.range,c=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-c-1,l.end.x,l.end.y-c-1,void 0);(n?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)},h.prototype._linkLeave=function(t,n,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.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(l,n.text)},h.prototype._linkAtPosition=function(t,n){var l=t.range.start.y===t.range.end.y,c=t.range.start.y<n.y,v=t.range.end.y>n.y;return(l&&t.range.start.x<=n.x&&t.range.end.x>=n.x||c&&t.range.end.x>=n.x||v&&t.range.start.x<=n.x||c&&v)&&t.range.start.y<=n.y&&t.range.end.y>=n.y},h.prototype._positionFromMouseEvent=function(t,n,l){var c=l.getCoords(t,n,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}},h.prototype._createLinkUnderlineEvent=function(t,n,l,c,v){return{x1:t,y1:n,x2:l,y2:c,cols:this._bufferService.cols,fg:v}},h=_([o(0,u.IBufferService)],h)}(r.Disposable);a.Linkifier2=s},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;var y=function(){function C(_){this._textarea=_}return Object.defineProperty(C.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),C}();a.CoreBrowserService=y},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(m,g){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,k){x.__proto__=k}||function(x,k){for(var w in k)k.hasOwnProperty(w)&&(x[w]=k[w])})(m,g)},function(m,g){function x(){this.constructor=m}y(m,g),m.prototype=g===null?Object.create(g):(x.prototype=g.prototype,new x)});Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;var _=f(2),o=f(1),u=f(66),d=f(67),r=f(68),i=f(74),s=f(75),e=f(0),h=f(76),t=f(77),n=f(78),l=f(80),c=f(81),v=f(19),S=f(82),p=function(m){function g(x){var k=m.call(this)||this;return k._onBinary=new e.EventEmitter,k._onData=new e.EventEmitter,k._onLineFeed=new e.EventEmitter,k._onResize=new e.EventEmitter,k._onScroll=new e.EventEmitter,k._instantiationService=new u.InstantiationService,k.optionsService=new i.OptionsService(x),k._instantiationService.setService(o.IOptionsService,k.optionsService),k._bufferService=k.register(k._instantiationService.createInstance(r.BufferService)),k._instantiationService.setService(o.IBufferService,k._bufferService),k._logService=k._instantiationService.createInstance(d.LogService),k._instantiationService.setService(o.ILogService,k._logService),k._coreService=k.register(k._instantiationService.createInstance(s.CoreService,function(){return k.scrollToBottom()})),k._instantiationService.setService(o.ICoreService,k._coreService),k._coreMouseService=k._instantiationService.createInstance(h.CoreMouseService),k._instantiationService.setService(o.ICoreMouseService,k._coreMouseService),k._dirtyRowService=k._instantiationService.createInstance(t.DirtyRowService),k._instantiationService.setService(o.IDirtyRowService,k._dirtyRowService),k.unicodeService=k._instantiationService.createInstance(n.UnicodeService),k._instantiationService.setService(o.IUnicodeService,k.unicodeService),k._charsetService=k._instantiationService.createInstance(l.CharsetService),k._instantiationService.setService(o.ICharsetService,k._charsetService),k._inputHandler=new v.InputHandler(k._bufferService,k._charsetService,k._coreService,k._dirtyRowService,k._logService,k.optionsService,k._coreMouseService,k.unicodeService),k.register(e.forwardEvent(k._inputHandler.onLineFeed,k._onLineFeed)),k.register(k._inputHandler),k.register(e.forwardEvent(k._bufferService.onResize,k._onResize)),k.register(e.forwardEvent(k._coreService.onData,k._onData)),k.register(e.forwardEvent(k._coreService.onBinary,k._onBinary)),k.register(k.optionsService.onOptionChange(function(w){return k._updateOptions(w)})),k._writeBuffer=new S.WriteBuffer(function(w){return k._inputHandler.parse(w)}),k}return C(g,m),Object.defineProperty(g.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),g.prototype.dispose=function(){var x;this._isDisposed||(m.prototype.dispose.call(this),(x=this._windowsMode)===null||x===void 0||x.dispose(),this._windowsMode=void 0)},g.prototype.write=function(x,k){this._writeBuffer.write(x,k)},g.prototype.writeSync=function(x){this._writeBuffer.writeSync(x)},g.prototype.resize=function(x,k){isNaN(x)||isNaN(k)||(x=Math.max(x,r.MINIMUM_COLS),k=Math.max(k,r.MINIMUM_ROWS),this._bufferService.resize(x,k))},g.prototype.scroll=function(x,k){k===void 0&&(k=!1);var w,E=this._bufferService.buffer;(w=this._cachedBlankLine)&&w.length===this.cols&&w.getFg(0)===x.fg&&w.getBg(0)===x.bg||(w=E.getBlankLine(x,k),this._cachedBlankLine=w),w.isWrapped=k;var T=E.ybase+E.scrollTop,A=E.ybase+E.scrollBottom;if(E.scrollTop===0){var B=E.lines.isFull;A===E.lines.length-1?B?E.lines.recycle().copyFrom(w):E.lines.push(w.clone()):E.lines.splice(A+1,0,w.clone()),B?this._bufferService.isUserScrolling&&(E.ydisp=Math.max(E.ydisp-1,0)):(E.ybase++,this._bufferService.isUserScrolling||E.ydisp++)}else{var j=A-T+1;E.lines.shiftElements(T+1,j-1,-1),E.lines.set(A,w.clone())}this._bufferService.isUserScrolling||(E.ydisp=E.ybase),this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom),this._onScroll.fire(E.ydisp)},g.prototype.scrollLines=function(x,k){var w=this._bufferService.buffer;if(x<0){if(w.ydisp===0)return;this._bufferService.isUserScrolling=!0}else x+w.ydisp>=w.ybase&&(this._bufferService.isUserScrolling=!1);var E=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+x,w.ybase),0),E!==w.ydisp&&(k||this._onScroll.fire(w.ydisp))},g.prototype.scrollPages=function(x){this.scrollLines(x*(this.rows-1))},g.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},g.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},g.prototype.scrollToLine=function(x){var k=x-this._bufferService.buffer.ydisp;k!==0&&this.scrollLines(k)},g.prototype.addEscHandler=function(x,k){return this._inputHandler.addEscHandler(x,k)},g.prototype.addDcsHandler=function(x,k){return this._inputHandler.addDcsHandler(x,k)},g.prototype.addCsiHandler=function(x,k){return this._inputHandler.addCsiHandler(x,k)},g.prototype.addOscHandler=function(x,k){return this._inputHandler.addOscHandler(x,k)},g.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},g.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},g.prototype._updateOptions=function(x){var k;switch(x){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((k=this._windowsMode)===null||k===void 0||k.dispose(),this._windowsMode=void 0)}},g.prototype._enableWindowsMode=function(){var x=this;if(!this._windowsMode){var k=[];k.push(this.onLineFeed(c.updateWindowsModeWrappedState.bind(null,this._bufferService))),k.push(this.addCsiHandler({final:"H"},function(){return c.updateWindowsModeWrappedState(x._bufferService),!1})),this._windowsMode={dispose:function(){for(var w=0,E=k;w<E.length;w++)E[w].dispose()}}}},g}(_.Disposable);a.CoreTerminal=p},function(L,a,f){"use strict";var y=this&&this.__spreadArrays||function(){for(var d=0,r=0,i=arguments.length;r<i;r++)d+=arguments[r].length;var s=Array(d),e=0;for(r=0;r<i;r++)for(var h=arguments[r],t=0,n=h.length;t<n;t++,e++)s[e]=h[t];return s};Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;var C=f(1),_=f(14),o=function(){function d(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];this._entries=new Map;for(var s=0,e=r;s<e.length;s++){var h=e[s],t=h[0],n=h[1];this.set(t,n)}}return d.prototype.set=function(r,i){var s=this._entries.get(r);return this._entries.set(r,i),s},d.prototype.forEach=function(r){this._entries.forEach(function(i,s){return r(s,i)})},d.prototype.has=function(r){return this._entries.has(r)},d.prototype.get=function(r){return this._entries.get(r)},d}();a.ServiceCollection=o;var u=function(){function d(){this._services=new o,this._services.set(C.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=[],s=1;s<arguments.length;s++)i[s-1]=arguments[s];for(var e=_.getServiceDependencies(r).sort(function(S,p){return S.index-p.index}),h=[],t=0,n=e;t<n.length;t++){var l=n[t],c=this._services.get(l.id);if(!c)throw new Error("[createInstance] "+r.name+" depends on UNKNOWN service "+l.id+".");h.push(c)}var v=e.length>0?e[0].index:i.length;if(i.length!==v)throw new Error("[createInstance] First service dependency of "+r.name+" at position "+(v+1)+" conflicts with "+i.length+" static arguments");return new(r.bind.apply(r,y([void 0],y(i,h))))},d}();a.InstantiationService=u},function(L,a,f){"use strict";var y=this&&this.__decorate||function(i,s,e,h){var t,n=arguments.length,l=n<3?s:h===null?h=Object.getOwnPropertyDescriptor(s,e):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(i,s,e,h);else for(var c=i.length-1;c>=0;c--)(t=i[c])&&(l=(n<3?t(l):n>3?t(s,e,l):t(s,e))||l);return n>3&&l&&Object.defineProperty(s,e,l),l},C=this&&this.__param||function(i,s){return function(e,h){s(e,h,i)}},_=this&&this.__spreadArrays||function(){for(var i=0,s=0,e=arguments.length;s<e;s++)i+=arguments[s].length;var h=Array(i),t=0;for(s=0;s<e;s++)for(var n=arguments[s],l=0,c=n.length;l<c;l++,t++)h[t]=n[l];return h};Object.defineProperty(a,"__esModule",{value:!0}),a.LogService=a.LogLevel=void 0;var o,u=f(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=a.LogLevel||(a.LogLevel={}));var d={debug:o.DEBUG,info:o.INFO,warn:o.WARN,error:o.ERROR,off:o.OFF},r=function(){function i(s){var e=this;this._optionsService=s,this._updateLogLevel(),this._optionsService.onOptionChange(function(h){h==="logLevel"&&e._updateLogLevel()})}return i.prototype._updateLogLevel=function(){this._logLevel=d[this._optionsService.options.logLevel]},i.prototype._evalLazyOptionalParams=function(s){for(var e=0;e<s.length;e++)typeof s[e]=="function"&&(s[e]=s[e]())},i.prototype._log=function(s,e,h){this._evalLazyOptionalParams(h),s.call.apply(s,_([console,"xterm.js: "+e],h))},i.prototype.debug=function(s){for(var e=[],h=1;h<arguments.length;h++)e[h-1]=arguments[h];this._logLevel<=o.DEBUG&&this._log(console.log,s,e)},i.prototype.info=function(s){for(var e=[],h=1;h<arguments.length;h++)e[h-1]=arguments[h];this._logLevel<=o.INFO&&this._log(console.info,s,e)},i.prototype.warn=function(s){for(var e=[],h=1;h<arguments.length;h++)e[h-1]=arguments[h];this._logLevel<=o.WARN&&this._log(console.warn,s,e)},i.prototype.error=function(s){for(var e=[],h=1;h<arguments.length;h++)e[h-1]=arguments[h];this._logLevel<=o.ERROR&&this._log(console.error,s,e)},i=y([C(0,u.IOptionsService)],i)}();a.LogService=r},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(e,h){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var l in n)n.hasOwnProperty(l)&&(t[l]=n[l])})(e,h)},function(e,h){function t(){this.constructor=e}y(e,h),e.prototype=h===null?Object.create(h):(t.prototype=h.prototype,new t)}),_=this&&this.__decorate||function(e,h,t,n){var l,c=arguments.length,v=c<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,h,t,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(v=(c<3?l(v):c>3?l(h,t,v):l(h,t))||v);return c>3&&v&&Object.defineProperty(h,t,v),v},o=this&&this.__param||function(e,h){return function(t,n){h(t,n,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;var u=f(1),d=f(69),r=f(0),i=f(2);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;var s=function(e){function h(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,a.MINIMUM_COLS),n.rows=Math.max(t.options.rows,a.MINIMUM_ROWS),n.buffers=new d.BufferSet(t,n),n}return C(h,e),Object.defineProperty(h.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),h.prototype.dispose=function(){e.prototype.dispose.call(this),this.buffers.dispose()},h.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})},h.prototype.reset=function(){this.buffers.dispose(),this.buffers=new d.BufferSet(this._optionsService,this),this.isUserScrolling=!1},h=_([o(0,u.IOptionsService)],h)}(i.Disposable);a.BufferService=s},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(d,r){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var e in s)s.hasOwnProperty(e)&&(i[e]=s[e])})(d,r)},function(d,r){function i(){this.constructor=d}y(d,r),d.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)});Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;var _=f(70),o=f(0),u=function(d){function r(i,s){var e=d.call(this)||this;return e._onBufferActivate=e.register(new o.EventEmitter),e._normal=new _.Buffer(!0,i,s),e._normal.fillViewportRows(),e._alt=new _.Buffer(!1,i,s),e._activeBuffer=e._normal,e.setupTabStops(),e}return C(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,s){this._normal.resize(i,s),this._alt.resize(i,s)},r.prototype.setupTabStops=function(i){this._normal.setupTabStops(i),this._alt.setupTabStops(i)},r}(f(2).Disposable);a.BufferSet=u},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.BufferStringIterator=a.Buffer=a.MAX_BUFFER_SIZE=void 0;var y=f(71),C=f(16),_=f(4),o=f(3),u=f(72),d=f(73),r=f(20),i=f(6);a.MAX_BUFFER_SIZE=4294967295;var s=function(){function h(t,n,l){this._hasScrollback=t,this._optionsService=n,this._bufferService=l,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=C.DEFAULT_ATTR_DATA.clone(),this.savedCharset=r.DEFAULT_CHARSET,this.markers=[],this._nullCell=_.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]),this._whitespaceCell=_.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 y.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return h.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},h.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},h.prototype.getBlankLine=function(t,n){return new C.BufferLine(this._bufferService.cols,this.getNullCell(t),n)},Object.defineProperty(h.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._rows},enumerable:!1,configurable:!0}),h.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var n=t+this._optionsService.options.scrollback;return n>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:n},h.prototype.fillViewportRows=function(t){if(this.lines.length===0){t===void 0&&(t=C.DEFAULT_ATTR_DATA);for(var n=this._rows;n--;)this.lines.push(this.getBlankLine(t))}},h.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new y.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},h.prototype.resize=function(t,n){var l=this.getNullCell(C.DEFAULT_ATTR_DATA),c=this._getCorrectBufferLength(n);if(c>this.lines.maxLength&&(this.lines.maxLength=c),this.lines.length>0){if(this._cols<t)for(var v=0;v<this.lines.length;v++)this.lines.get(v).resize(t,l);var S=0;if(this._rows<n)for(var p=this._rows;p<n;p++)this.lines.length<n+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new C.BufferLine(t,l)):this.ybase>0&&this.lines.length<=this.ybase+this.y+S+1?(this.ybase--,S++,this.ydisp>0&&this.ydisp--):this.lines.push(new C.BufferLine(t,l)));else for(p=this._rows;p>n;p--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(c<this.lines.maxLength){var m=this.lines.length-c;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=c}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,n-1),S&&(this.y+=S),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(v=0;v<this.lines.length;v++)this.lines.get(v).resize(t,l);this._cols=t,this._rows=n},Object.defineProperty(h.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),h.prototype._reflow=function(t,n){this._cols!==t&&(t>this._cols?this._reflowLarger(t,n):this._reflowSmaller(t,n))},h.prototype._reflowLarger=function(t,n){var l=u.reflowLargerGetLinesToRemove(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(C.DEFAULT_ATTR_DATA));if(l.length>0){var c=u.reflowLargerCreateNewLayout(this.lines,l);u.reflowLargerApplyNewLayout(this.lines,c.layout),this._reflowLargerAdjustViewport(t,n,c.countRemoved)}},h.prototype._reflowLargerAdjustViewport=function(t,n,l){for(var c=this.getNullCell(C.DEFAULT_ATTR_DATA),v=l;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new C.BufferLine(t,c))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-l,0)},h.prototype._reflowSmaller=function(t,n){for(var l=this.getNullCell(C.DEFAULT_ATTR_DATA),c=[],v=0,S=this.lines.length-1;S>=0;S--){var p=this.lines.get(S);if(!(!p||!p.isWrapped&&p.getTrimmedLength()<=t)){for(var m=[p];p.isWrapped&&S>0;)p=this.lines.get(--S),m.unshift(p);var g=this.ybase+this.y;if(!(g>=S&&g<S+m.length)){var x=m[m.length-1].getTrimmedLength(),k=u.reflowSmallerGetNewLineLengths(m,this._cols,t),w=k.length-m.length,E=void 0;E=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+w):Math.max(0,this.lines.length-this.lines.maxLength+w);for(var T=[],A=0;A<w;A++){var B=this.getBlankLine(C.DEFAULT_ATTR_DATA,!0);T.push(B)}T.length>0&&(c.push({start:S+m.length+v,newLines:T}),v+=T.length),m.push.apply(m,T);var j=k.length-1,ye=k[j];ye===0&&(ye=k[--j]);for(var re=m.length-w-1,ce=x;re>=0;){var P=Math.min(ce,ye);if(m[j].copyCellsFrom(m[re],ce-P,ye-P,P,!0),(ye-=P)===0&&(ye=k[--j]),(ce-=P)===0){re--;var N=Math.max(re,0);ce=u.getWrappedLineTrimmedLength(m,N,this._cols)}}for(A=0;A<m.length;A++)k[A]<t&&m[A].setCell(k[A],l);for(var H=w-E;H-- >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+v)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+w,this.ybase+n-1)}}}if(c.length>0){var Y=[],W=[];for(A=0;A<this.lines.length;A++)W.push(this.lines.get(A));var ie=this.lines.length,me=ie-1,De=0,ze=c[De];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);var je=0;for(A=Math.min(this.lines.maxLength-1,ie+v-1);A>=0;A--)if(ze&&ze.start>me+je){for(var _e=ze.newLines.length-1;_e>=0;_e--)this.lines.set(A--,ze.newLines[_e]);A++,Y.push({index:me+1,amount:ze.newLines.length}),je+=ze.newLines.length,ze=c[++De]}else this.lines.set(A,W[me--]);var ke=0;for(A=Y.length-1;A>=0;A--)Y[A].index+=ke,this.lines.onInsertEmitter.fire(Y[A]),ke+=Y[A].amount;var Ie=Math.max(0,ie+v-this.lines.maxLength);Ie>0&&this.lines.onTrimEmitter.fire(Ie)}},h.prototype.stringIndexToBufferIndex=function(t,n,l){for(l===void 0&&(l=!1);n;){var c=this.lines.get(t);if(!c)return[-1,-1];for(var v=l?c.getTrimmedLength():c.length,S=0;S<v;++S)if(c.get(S)[o.CHAR_DATA_WIDTH_INDEX]&&(n-=c.get(S)[o.CHAR_DATA_CHAR_INDEX].length||1),n<0)return[t,S];t++}return[t,0]},h.prototype.translateBufferLineToString=function(t,n,l,c){l===void 0&&(l=0);var v=this.lines.get(t);return v?v.translateToString(n,l,c):""},h.prototype.getWrappedRangeForLine=function(t){for(var n=t,l=t;n>0&&this.lines.get(n).isWrapped;)n--;for(;l+1<this.lines.length&&this.lines.get(l+1).isWrapped;)l++;return{first:n,last:l}},h.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},h.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},h.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},h.prototype.addMarker=function(t){var n=this,l=new d.Marker(t);return this.markers.push(l),l.register(this.lines.onTrim(function(c){l.line-=c,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(function(c){l.line>=c.index&&(l.line+=c.amount)})),l.register(this.lines.onDelete(function(c){l.line>=c.index&&l.line<c.index+c.amount&&l.dispose(),l.line>c.index&&(l.line-=c.amount)})),l.register(l.onDispose(function(){return n._removeMarker(l)})),l},h.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},h.prototype.iterator=function(t,n,l,c,v){return new e(this,t,n,l,c,v)},h}();a.Buffer=s;var e=function(){function h(t,n,l,c,v,S){l===void 0&&(l=0),c===void 0&&(c=t.lines.length),v===void 0&&(v=0),S===void 0&&(S=0),this._buffer=t,this._trimRight=n,this._startIndex=l,this._endIndex=c,this._startOverscan=v,this._endOverscan=S,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return h.prototype.hasNext=function(){return this._current<this._endIndex},h.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="",l=t.first;l<=t.last;++l)n+=this._buffer.translateBufferLineToString(l,this._trimRight);return this._current=t.last+1,{range:t,content:n}},h}();a.BufferStringIterator=e},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;var y=f(0),C=function(){function _(o){this._maxLength=o,this.onDeleteEmitter=new y.EventEmitter,this.onInsertEmitter=new y.EventEmitter,this.onTrimEmitter=new y.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(_.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.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(_.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}),_.prototype.get=function(o){return this._array[this._getCyclicIndex(o)]},_.prototype.set=function(o,u){this._array[this._getCyclicIndex(o)]=u},_.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++},_.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(_.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),_.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},_.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 s=this._length+d.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=d.length},_.prototype.trimStart=function(o){o>this._length&&(o=this._length),this._startIndex+=o,this._length-=o,this.onTrimEmitter.fire(o)},_.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))}},_.prototype._getCyclicIndex=function(o){return(this._startIndex+o)%this._maxLength},_}();a.CircularList=C},function(L,a,f){"use strict";function y(C,_,o){if(_===C.length-1)return C[_].getTrimmedLength();var u=!C[_].hasContent(o-1)&&C[_].getWidth(o-1)===1,d=C[_+1].getWidth(0)===2;return u&&d?o-1:o}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(C,_,o,u,d){for(var r=[],i=0;i<C.length-1;i++){var s=i,e=C.get(++s);if(e.isWrapped){for(var h=[C.get(i)];s<C.length&&e.isWrapped;)h.push(e),e=C.get(++s);if(u>=i&&u<s)i+=h.length-1;else{for(var t=0,n=y(h,t,_),l=1,c=0;l<h.length;){var v=y(h,l,_),S=v-c,p=o-n,m=Math.min(S,p);h[t].copyCellsFrom(h[l],c,n,m,!1),(n+=m)===o&&(t++,n=0),(c+=m)===v&&(l++,c=0),n===0&&t!==0&&h[t-1].getWidth(o-1)===2&&(h[t].copyCellsFrom(h[t-1],o-1,n++,1,!1),h[t-1].setCell(o-1,d))}h[t].replaceCells(n,o,d);for(var g=0,x=h.length-1;x>0&&(x>t||h[x].getTrimmedLength()===0);x--)g++;g>0&&(r.push(i+h.length-g),r.push(g)),i+=h.length-1}}}return r},a.reflowLargerCreateNewLayout=function(C,_){for(var o=[],u=0,d=_[u],r=0,i=0;i<C.length;i++)if(d===i){var s=_[++u];C.onDeleteEmitter.fire({index:i-r,amount:s}),i+=s-1,r+=s,d=_[++u]}else o.push(i);return{layout:o,countRemoved:r}},a.reflowLargerApplyNewLayout=function(C,_){for(var o=[],u=0;u<_.length;u++)o.push(C.get(_[u]));for(u=0;u<o.length;u++)C.set(u,o[u]);C.length=_.length},a.reflowSmallerGetNewLineLengths=function(C,_,o){for(var u=[],d=C.map(function(n,l){return y(C,l,_)}).reduce(function(n,l){return n+l}),r=0,i=0,s=0;s<d;){if(d-s<o){u.push(d-s);break}r+=o;var e=y(C,i,_);r>e&&(r-=e,i++);var h=C[i].getWidth(r-1)===2;h&&r--;var t=h?o-1:o;u.push(t),s+=t}return u},a.getWrappedLineTrimmedLength=y},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(u,d){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&&(r[s]=i[s])})(u,d)},function(u,d){function r(){this.constructor=u}y(u,d),u.prototype=d===null?Object.create(d):(r.prototype=d.prototype,new r)});Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;var _=f(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 _.EventEmitter,i}return C(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}(f(2).Disposable);a.Marker=o},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=a.DEFAULT_BELL_SOUND=void 0;var y=f(0),C=f(11),_=f(33);a.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",a.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:a.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:C.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 y.EventEmitter,this.options=_.clone(a.DEFAULT_OPTIONS);for(var i=0,s=Object.keys(r);i<s.length;i++){var e=s[i];if(e in this.options){var h=r[e];this.options[e]=h}}}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 a.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=a.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 a.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');return this.options[r]},d}();a.OptionsService=u},function(L,a,f){"use strict";var y,C=this&&this.__extends||(y=function(t,n){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var v in c)c.hasOwnProperty(v)&&(l[v]=c[v])})(t,n)},function(t,n){function l(){this.constructor=t}y(t,n),t.prototype=n===null?Object.create(n):(l.prototype=n.prototype,new l)}),_=this&&this.__decorate||function(t,n,l,c){var v,S=arguments.length,p=S<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(t,n,l,c);else for(var m=t.length-1;m>=0;m--)(v=t[m])&&(p=(S<3?v(p):S>3?v(n,l,p):v(n,l))||p);return S>3&&p&&Object.defineProperty(n,l,p),p},o=this&&this.__param||function(t,n){return function(l,c){n(l,c,t)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;var u=f(1),d=f(0),r=f(33),i=f(2),s=Object.freeze({insertMode:!1}),e=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),h=function(t){function n(l,c,v,S){var p=t.call(this)||this;return p._bufferService=c,p._logService=v,p._optionsService=S,p.isCursorInitialized=!1,p.isCursorHidden=!1,p._onData=p.register(new d.EventEmitter),p._onUserInput=p.register(new d.EventEmitter),p._onBinary=p.register(new d.EventEmitter),p._scrollToBottom=l,p.register({dispose:function(){return p._scrollToBottom=void 0}}),p.modes=r.clone(s),p.decPrivateModes=r.clone(e),p}return C(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(s),this.decPrivateModes=r.clone(e)},n.prototype.triggerDataEvent=function(l,c){if(c===void 0&&(c=!1),!this._optionsService.options.disableStdin){var v=this._bufferService.buffer;v.ybase!==v.ydisp&&this._scrollToBottom(),c&&this._onUserInput.fire(),this._logService.debug('sending data "'+l+'"',function(){return l.split("").map(function(S){return S.charCodeAt(0)})}),this._onData.fire(l)}},n.prototype.triggerBinaryEvent=function(l){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+l+'"',function(){return l.split("").map(function(c){return c.charCodeAt(0)})}),this._onBinary.fire(l))},n=_([o(1,u.IBufferService),o(2,u.ILogService),o(3,u.IOptionsService)],n)}(i.Disposable);a.CoreService=h},function(L,a,f){"use strict";var y=this&&this.__decorate||function(e,h,t,n){var l,c=arguments.length,v=c<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,t):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,h,t,n);else for(var S=e.length-1;S>=0;S--)(l=e[S])&&(v=(c<3?l(v):c>3?l(h,t,v):l(h,t))||v);return c>3&&v&&Object.defineProperty(h,t,v),v},C=this&&this.__param||function(e,h){return function(t,n){h(t,n,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;var _=f(1),o=f(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,h){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||h||(t|=3)),t}var r=String.fromCharCode,i={DEFAULT:function(e){var h=[d(e,!1)+32,e.col+32,e.row+32];return h[0]>255||h[1]>255||h[2]>255?"":"\x1B[M"+r(h[0])+r(h[1])+r(h[2])},SGR:function(e){var h=e.action===0&&e.button!==4?"m":"M";return"\x1B[<"+d(e,!0)+";"+e.col+";"+e.row+h}},s=function(){function e(h,t){this._bufferService=h,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new o.EventEmitter,this._lastEvent=null;for(var n=0,l=Object.keys(u);n<l.length;n++){var c=l[n];this.addProtocol(c,u[c])}for(var v=0,S=Object.keys(i);v<S.length;v++){var p=S[v];this.addEncoding(p,i[p])}this.reset()}return e.prototype.addProtocol=function(h,t){this._protocols[h]=t},e.prototype.addEncoding=function(h,t){this._encodings[h]=t},Object.defineProperty(e.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(h){if(!this._protocols[h])throw new Error('unknown protocol "'+h+'"');this._activeProtocol=h,this._onProtocolChange.fire(this._protocols[h].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(h){if(!this._encodings[h])throw new Error('unknown encoding "'+h+'"');this._activeEncoding=h},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(h){if(h.col<0||h.col>=this._bufferService.cols||h.row<0||h.row>=this._bufferService.rows||h.button===4&&h.action===32||h.button===3&&h.action!==32||h.button!==4&&(h.action===2||h.action===3)||(h.col++,h.row++,h.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,h))||!this._protocols[this._activeProtocol].restrict(h))return!1;var t=this._encodings[this._activeEncoding](h);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=h,!0},e.prototype.explainEvents=function(h){return{down:!!(1&h),up:!!(2&h),drag:!!(4&h),move:!!(8&h),wheel:!!(16&h)}},e.prototype._compareEvents=function(h,t){return h.col===t.col&&h.row===t.row&&h.button===t.button&&h.action===t.action&&h.ctrl===t.ctrl&&h.alt===t.alt&&h.shift===t.shift},e=y([C(0,_.IBufferService),C(1,_.ICoreService)],e)}();a.CoreMouseService=s},function(L,a,f){"use strict";var y=this&&this.__decorate||function(u,d,r,i){var s,e=arguments.length,h=e<3?d:i===null?i=Object.getOwnPropertyDescriptor(d,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(u,d,r,i);else for(var t=u.length-1;t>=0;t--)(s=u[t])&&(h=(e<3?s(h):e>3?s(d,r,h):s(d,r))||h);return e>3&&h&&Object.defineProperty(d,r,h),h},C=this&&this.__param||function(u,d){return function(r,i){d(r,i,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DirtyRowService=void 0;var _=f(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=y([C(0,_.IBufferService)],u)}();a.DirtyRowService=o},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;var y=f(0),C=f(79),_=function(){function o(){this._providers=Object.create(null),this._active="",this._onChange=new y.EventEmitter;var u=new C.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 s=u.charCodeAt(i);if(55296<=s&&s<=56319){if(++i>=r)return d+this.wcwidth(s);var e=u.charCodeAt(i);56320<=e&&e<=57343?s=1024*(s-55296)+e-56320+65536:d+=this.wcwidth(e)}d+=this.wcwidth(s)}return d},o}();a.UnicodeService=_},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;var y,C=f(15),_=[[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",!y){y=new Uint8Array(65536),C.fill(y,1),y[0]=0,C.fill(y,0,1,32),C.fill(y,0,127,160),C.fill(y,2,4352,4448),y[9001]=2,y[9002]=2,C.fill(y,2,11904,42192),y[12351]=1,C.fill(y,2,44032,55204),C.fill(y,2,63744,64256),C.fill(y,2,65040,65050),C.fill(y,2,65072,65136),C.fill(y,2,65280,65377),C.fill(y,2,65504,65511);for(var r=0;r<_.length;++r)C.fill(y,0,_[r][0],_[r][1]+1)}}return d.prototype.wcwidth=function(r){return r<32?0:r<127?1:r<65536?y[r]:function(i,s){var e,h=0,t=s.length-1;if(i<s[0][0]||i>s[t][1])return!1;for(;t>=h;)if(i>s[e=h+t>>1][1])h=e+1;else{if(!(i<s[e][0]))return!0;t=e-1}return!1}(r,o)?0:r>=131072&&r<=196605||r>=196608&&r<=262141?2:1},d}();a.UnicodeV6=u},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0;var y=function(){function C(){this.glevel=0,this._charsets=[]}return C.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},C.prototype.setgLevel=function(_){this.glevel=_,this.charset=this._charsets[_]},C.prototype.setgCharset=function(_,o){this._charsets[_]=o,this.glevel===_&&(this.charset=o)},C}();a.CharsetService=y},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;var y=f(3);a.updateWindowsModeWrappedState=function(C){var _=C.buffer.lines.get(C.buffer.ybase+C.buffer.y-1),o=_==null?void 0:_.get(C.cols-1),u=C.buffer.lines.get(C.buffer.ybase+C.buffer.y);u&&o&&(u.isWrapped=o[y.CHAR_DATA_CODE_INDEX]!==y.NULL_CELL_CODE&&o[y.CHAR_DATA_CODE_INDEX]!==y.WHITESPACE_CELL_CODE)}},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;var y=function(){function C(_){this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return C.prototype.writeSync=function(_){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(_)},C.prototype.write=function(_,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+=_.length,this._writeBuffer.push(_),this._callbacks.push(o)},C.prototype._innerWrite=function(){for(var _=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 _._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},C}();a.WriteBuffer=y},function(L,a,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0;var y=function(){function C(){this._addons=[]}return C.prototype.dispose=function(){for(var _=this._addons.length-1;_>=0;_--)this._addons[_].instance.dispose()},C.prototype.loadAddon=function(_,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(_)},C.prototype._wrappedAddonDispose=function(_){if(!_.isDisposed){for(var o=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===_){o=u;break}if(o===-1)throw new Error("Could not dispose an addon that has not been loaded");_.isDisposed=!0,_.dispose.apply(_.instance),this._addons.splice(o,1)}},C}();a.AddonManager=y}])})}}]);