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.ca6295ac...

25 lines
566 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],{65030:function(Xe,D,f){"use strict";f.d(D,{Z:function(){return Ie}});var _=f(27247),p=f(11913),b=f(43079),h=f(43403),a=f(92310),u=f.n(a),d=f(29301),i=f(76846),n=f(96452),o=f(6089),t=f(80402),c=f(34280),e=f(49658),r=f(59301),s=f(32855),l=f(77900),v=f(8654);function y(ie){var ce=ie.prefixCls,re=ie.align,ve=ie.arrow,V=ie.arrowPos,J=ve||{},xe=J.className,Se=J.content,pe=V.x,ne=pe===void 0?0:pe,le=V.y,Q=le===void 0?0:le,R=r.useRef();if(!re||!re.points)return null;var I={position:"absolute"};if(re.autoArrow!==!1){var F=re.points[0],G=re.points[1],_e=F[0],ye=F[1],ke=G[0],M=G[1];_e===ke||!["t","b"].includes(_e)?I.top=Q:_e==="t"?I.top=0:I.bottom=0,ye===M||!["l","r"].includes(ye)?I.left=ne:ye==="l"?I.left=0:I.right=0}return r.createElement("div",{ref:R,className:u()("".concat(ce,"-arrow"),xe),style:I},Se)}function g(ie){var ce=ie.prefixCls,re=ie.open,ve=ie.zIndex,V=ie.mask,J=ie.motion;return V?r.createElement(l.default,(0,s.Z)({},J,{motionAppear:!0,visible:re,removeOnLeave:!0}),function(xe){var Se=xe.className;return r.createElement("div",{style:{zIndex:ve},className:u()("".concat(ce,"-mask"),Se)})}):null}var m=r.memo(function(ie){var ce=ie.children;return ce},function(ie,ce){return ce.cache}),S=m,k=r.forwardRef(function(ie,ce){var re=ie.popup,ve=ie.className,V=ie.prefixCls,J=ie.style,xe=ie.target,Se=ie.onVisibleChanged,pe=ie.open,ne=ie.keepDom,le=ie.fresh,Q=ie.onClick,R=ie.mask,I=ie.arrow,F=ie.arrowPos,G=ie.align,_e=ie.motion,ye=ie.maskMotion,ke=ie.forceRender,M=ie.getPopupContainer,se=ie.autoDestroy,ae=ie.portal,de=ie.zIndex,we=ie.onMouseEnter,ge=ie.onMouseLeave,j=ie.onPointerEnter,fe=ie.onPointerDownCapture,P=ie.ready,he=ie.offsetX,Ee=ie.offsetY,x=ie.offsetR,te=ie.offsetB,$=ie.onAlign,K=ie.onPrepare,W=ie.stretch,ee=ie.targetWidth,Pe=ie.targetHeight,Ae=typeof re=="function"?re():re,Ce=pe||ne,Ue=(M==null?void 0:M.length)>0,tt=r.useState(!M||!Ue),Ke=(0,p.Z)(tt,2),He=Ke[0],qe=Ke[1];if((0,c.Z)(function(){!He&&Ue&&xe&&qe(!0)},[He,Ue,xe]),!He)return null;var Ve="auto",Ze={left:"-1000vw",top:"-1000vh",right:Ve,bottom:Ve};if(P||!pe){var ct,at=G.points,Qe=G.dynamicInset||((ct=G._experimental)===null||ct===void 0?void 0:ct.dynamicInset),$e=Qe&&at[0][1]==="r",Ge=Qe&&at[0][0]==="b";$e?(Ze.right=x,Ze.left=Ve):(Ze.left=he,Ze.right=Ve),Ge?(Ze.bottom=te,Ze.top=Ve):(Ze.top=Ee,Ze.bottom=Ve)}var je={};return W&&(W.includes("height")&&Pe?je.height=Pe:W.includes("minHeight")&&Pe&&(je.minHeight=Pe),W.includes("width")&&ee?je.width=ee:W.includes("minWidth")&&ee&&(je.minWidth=ee)),pe||(je.pointerEvents="none"),r.createElement(ae,{open:ke||Ce,getContainer:M&&function(){return M(xe)},autoDestroy:se},r.createElement(g,{prefixCls:V,open:pe,zIndex:de,mask:R,motion:ye}),r.createElement(d.Z,{onResize:$,disabled:!pe},function(We){return r.createElement(l.default,(0,s.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:ke,leavedClassName:"".concat(V,"-hidden")},_e,{onAppearPrepare:K,onEnterPrepare:K,visible:pe,onVisibleChanged:function(ht){var dt;_e==null||(dt=_e.onVisibleChanged)===null||dt===void 0||dt.call(_e,ht),Se(ht)}}),function(nt,ht){var dt=nt.className,Xt=nt.style,vt=u()(V,dt,ve);return r.createElement("div",{ref:(0,v.sQ)(We,ce,ht),className:vt,style:(0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)({"--arrow-x":"".concat(F.x||0,"px"),"--arrow-y":"".concat(F.y||0,"px")},Ze),je),Xt),{},{boxSizing:"border-box",zIndex:de},J),onMouseEnter:we,onMouseLeave:ge,onPointerEnter:j,onClick:Q,onPointerDownCapture:fe},I&&r.createElement(y,{prefixCls:V,arrow:I,arrowPos:F,align:G}),r.createElement(S,{cache:!pe&&!le},Ae))})}))}),w=k,C=r.forwardRef(function(ie,ce){var re=ie.children,ve=ie.getTriggerDOMNode,V=(0,v.Yr)(re),J=r.useCallback(function(Se){(0,v.mH)(ce,ve?ve(Se):Se)},[ve]),xe=(0,v.x1)(J,(0,v.C4)(re));return V?r.cloneElement(re,{ref:xe}):re}),E=C,T=r.createContext(null),L=T;function N(ie){return ie?Array.isArray(ie)?ie:[ie]:[]}function Z(ie,ce,re,ve){return r.useMemo(function(){var V=N(re!=null?re:ce),J=N(ve!=null?ve:ce),xe=new Set(V),Se=new Set(J);return ie&&(xe.has("hover")&&(xe.delete("hover"),xe.add("click")),Se.has("hover")&&(Se.delete("hover"),Se.add("click"))),[xe,Se]},[ie,ce,re,ve])}var q=f(29194);function H(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],re=arguments.length>2?arguments[2]:void 0;return re?ie[0]===ce[0]:ie[0]===ce[0]&&ie[1]===ce[1]}function z(ie,ce,re,ve){for(var V=re.points,J=Object.keys(ie),xe=0;xe<J.length;xe+=1){var Se,pe=J[xe];if(H((Se=ie[pe])===null||Se===void 0?void 0:Se.points,V,ve))return"".concat(ce,"-placement-").concat(pe)}return""}function A(ie,ce,re,ve){return ce||(re?{motionName:"".concat(ie,"-").concat(re)}:ve?{motionName:ve}:null)}function O(ie){return ie.ownerDocument.defaultView}function X(ie){for(var ce=[],re=ie==null?void 0:ie.parentElement,ve=["hidden","scroll","clip","auto"];re;){var V=O(re).getComputedStyle(re),J=V.overflowX,xe=V.overflowY,Se=V.overflow;[J,xe,Se].some(function(pe){return ve.includes(pe)})&&ce.push(re),re=re.parentElement}return ce}function U(ie){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(ie)?ce:ie}function B(ie){return U(parseFloat(ie),0)}function Y(ie,ce){var re=(0,_.Z)({},ie);return(ce||[]).forEach(function(ve){if(!(ve instanceof HTMLBodyElement||ve instanceof HTMLHtmlElement)){var V=O(ve).getComputedStyle(ve),J=V.overflow,xe=V.overflowClipMargin,Se=V.borderTopWidth,pe=V.borderBottomWidth,ne=V.borderLeftWidth,le=V.borderRightWidth,Q=ve.getBoundingClientRect(),R=ve.offsetHeight,I=ve.clientHeight,F=ve.offsetWidth,G=ve.clientWidth,_e=B(Se),ye=B(pe),ke=B(ne),M=B(le),se=U(Math.round(Q.width/F*1e3)/1e3),ae=U(Math.round(Q.height/R*1e3)/1e3),de=(F-G-ke-M)*se,we=(R-I-_e-ye)*ae,ge=_e*ae,j=ye*ae,fe=ke*se,P=M*se,he=0,Ee=0;if(J==="clip"){var x=B(xe);he=x*se,Ee=x*ae}var te=Q.x+fe-he,$=Q.y+ge-Ee,K=te+Q.width+2*he-fe-P-de,W=$+Q.height+2*Ee-ge-j-we;re.left=Math.max(re.left,te),re.top=Math.max(re.top,$),re.right=Math.min(re.right,K),re.bottom=Math.min(re.bottom,W)}}),re}function ue(ie){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re="".concat(ce),ve=re.match(/^(.*)\%$/);return ve?ie*(parseFloat(ve[1])/100):parseFloat(re)}function me(ie,ce){var re=ce||[],ve=(0,p.Z)(re,2),V=ve[0],J=ve[1];return[ue(ie.width,V),ue(ie.height,J)]}function De(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[ie[0],ie[1]]}function Te(ie,ce){var re=ce[0],ve=ce[1],V,J;return re==="t"?J=ie.y:re==="b"?J=ie.y+ie.height:J=ie.y+ie.height/2,ve==="l"?V=ie.x:ve==="r"?V=ie.x+ie.width:V=ie.x+ie.width/2,{x:V,y:J}}function oe(ie,ce){var re={t:"b",b:"t",l:"r",r:"l"};return ie.map(function(ve,V){return V===ce?re[ve]||"c":ve}).join("")}function be(ie,ce,re,ve,V,J,xe){var Se=r.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:V[ve]||{}}),pe=(0,p.Z)(Se,2),ne=pe[0],le=pe[1],Q=r.useRef(0),R=r.useMemo(function(){return ce?X(ce):[]},[ce]),I=r.useRef({}),F=function(){I.current={}};ie||F();var G=(0,o.Z)(function(){if(ce&&re&&ie){let mt=function(or,Rt){var Kt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yt,sr=Ce.x+or,kr=Ce.y+Rt,Zr=sr+Ge,Qr=kr+$e,Vr=Math.max(sr,Kt.left),Be=Math.max(kr,Kt.top),ze=Math.min(Zr,Kt.right),et=Math.min(Qr,Kt.bottom);return Math.max(0,(ze-Vr)*(et-Be))},$t=function(){Dt=Ce.y+rt,Tt=Dt+$e,Nt=Ce.x+Je,At=Nt+Ge};var ke,M,se,ae,de=ce,we=de.ownerDocument,ge=O(de),j=ge.getComputedStyle(de),fe=j.position,P=de.style.left,he=de.style.top,Ee=de.style.right,x=de.style.bottom,te=de.style.overflow,$=(0,_.Z)((0,_.Z)({},V[ve]),J),K=we.createElement("div");(ke=de.parentElement)===null||ke===void 0||ke.appendChild(K),K.style.left="".concat(de.offsetLeft,"px"),K.style.top="".concat(de.offsetTop,"px"),K.style.position=fe,K.style.height="".concat(de.offsetHeight,"px"),K.style.width="".concat(de.offsetWidth,"px"),de.style.left="0",de.style.top="0",de.style.right="auto",de.style.bottom="auto",de.style.overflow="hidden";var W;if(Array.isArray(re))W={x:re[0],y:re[1],width:0,height:0};else{var ee,Pe,Ae=re.getBoundingClientRect();Ae.x=(ee=Ae.x)!==null&&ee!==void 0?ee:Ae.left,Ae.y=(Pe=Ae.y)!==null&&Pe!==void 0?Pe:Ae.top,W={x:Ae.x,y:Ae.y,width:Ae.width,height:Ae.height}}var Ce=de.getBoundingClientRect(),Ue=ge.getComputedStyle(de),tt=Ue.height,Ke=Ue.width;Ce.x=(M=Ce.x)!==null&&M!==void 0?M:Ce.left,Ce.y=(se=Ce.y)!==null&&se!==void 0?se:Ce.top;var He=we.documentElement,qe=He.clientWidth,Ve=He.clientHeight,Ze=He.scrollWidth,ct=He.scrollHeight,at=He.scrollTop,Qe=He.scrollLeft,$e=Ce.height,Ge=Ce.width,je=W.height,We=W.width,nt={left:0,top:0,right:qe,bottom:Ve},ht={left:-Qe,top:-at,right:Ze-Qe,bottom:ct-at},dt=$.htmlRegion,Xt="visible",vt="visibleFirst";dt!=="scroll"&&dt!==vt&&(dt=Xt);var It=dt===vt,Fr=Y(ht,R),Ye=Y(nt,R),Yt=dt===Xt?Ye:Fr,st=It?Ye:Yt;de.style.left="auto",de.style.top="auto",de.style.right="0",de.style.bottom="0";var ar=de.getBoundingClientRect();de.style.left=P,de.style.top=he,de.style.right=Ee,de.style.bottom=x,de.style.overflow=te,(ae=de.parentElement)===null||ae===void 0||ae.removeChild(K);var Et=U(Math.round(Ge/parseFloat(Ke)*1e3)/1e3),Ft=U(Math.round($e/parseFloat(tt)*1e3)/1e3);if(Et===0||Ft===0||(0,i.Sh)(re)&&!(0,q.Z)(re))return;var Lr=$.offset,lr=$.targetOffset,Ct=me(Ce,Lr),cr=(0,p.Z)(Ct,2),pt=cr[0],bt=cr[1],Vt=me(W,lr),_t=(0,p.Z)(Vt,2),Lt=_t[0],Dr=_t[1];W.x-=Lt,W.y-=Dr;var Tr=$.points||[],ur=(0,p.Z)(Tr,2),Mr=ur[0],fr=ur[1],kt=De(fr),ut=De(Mr),lt=Te(W,kt),hr=Te(Ce,ut),gt=(0,_.Z)({},$),Je=lt.x-hr.x+pt,rt=lt.y-hr.y+bt,xt=mt(Je,rt),Bt=mt(Je,rt,Ye),yt=Te(W,["t","l"]),dr=Te(Ce,["t","l"]),Jt=Te(W,["b","r"]),Ht=Te(Ce,["b","r"]),Ut=$.overflow||{},Pr=Ut.adjustX,_r=Ut.adjustY,qt=Ut.shiftX,er=Ut.shiftY,vr=function(Rt){return typeof Rt=="boolean"?Rt:Rt>=0},Dt,Tt,Nt,At;$t();var pr=vr(_r),ft=ut[0]===kt[0];if(pr&&ut[0]==="t"&&(Tt>st.bottom||I.current.bt)){var Wt=rt;ft?Wt-=$e-je:Wt=yt.y-Ht.y-bt;var gr=mt(Je,Wt),Or=mt(Je,Wt,Ye);gr>xt||gr===xt&&(!It||Or>=Bt)?(I.current.bt=!0,rt=Wt,bt=-bt,gt.points=[oe(ut,0),oe(kt,0)]):I.current.bt=!1}if(pr&&ut[0]==="b"&&(Dt<st.top||I.current.tb)){var zt=rt;ft?zt+=$e-je:zt=Jt.y-dr.y-bt;var yr=mt(Je,zt),Kr=mt(Je,zt,Ye);yr>xt||yr===xt&&(!It||Kr>=Bt)?(I.current.tb=!0,rt=zt,bt=-bt,gt.points=[oe(ut,0),oe(kt,0)]):I.current.tb=!1}var mr=vr(Pr),br=ut[1]===kt[1];if(mr&&ut[1]==="l"&&(At>st.right||I.current.rl)){var jt=Je;br?jt-=Ge-We:jt=yt.x-Ht.x-pt;var Zt=mt(jt,rt),tr=mt(jt,rt,Ye);Zt>xt||Zt===xt&&(!It||tr>=Bt)?(I.current.rl=!0,Je=jt,pt=-pt,gt.points=[oe(ut,1),oe(kt,1)]):I.current.rl=!1}if(mr&&ut[1]==="r"&&(Nt<st.left||I.current.lr)){var Qt=Je;br?Qt+=Ge-We:Qt=Jt.x-dr.x-pt;var rr=mt(Qt,rt),Gt=mt(Qt,rt,Ye);rr>xt||rr===xt&&(!It||Gt>=Bt)?(I.current.lr=!0,Je=Qt,pt=-pt,gt.points=[oe(ut,1),oe(kt,1)]):I.current.lr=!1}$t();var St=qt===!0?0:qt;typeof St=="number"&&(Nt<Ye.left&&(Je-=Nt-Ye.left-pt,W.x+We<Ye.left+St&&(Je+=W.x-Ye.left+We-St)),At>Ye.right&&(Je-=At-Ye.right-pt,W.x>Ye.right-St&&(Je+=W.x-Ye.right+St)));var Mt=er===!0?0:er;typeof Mt=="number"&&(Dt<Ye.top&&(rt-=Dt-Ye.top-bt,W.y+je<Ye.top+Mt&&(rt+=W.y-Ye.top+je-Mt)),Tt>Ye.bottom&&(rt-=Tt-Ye.bottom-bt,W.y>Ye.bottom-Mt&&(rt+=W.y-Ye.bottom+Mt)));var Pt=Ce.x+Je,Ot=Pt+Ge,ir=Ce.y+rt,Xr=ir+$e,xr=W.x,Sr=xr+We,Cr=W.y,Ir=Cr+je,Br=Math.max(Pt,xr),wr=Math.min(Ot,Sr),Hr=(Br+wr)/2,Ur=Hr-Pt,Er=Math.max(ir,Cr),Nr=Math.min(Xr,Ir),Wr=(Er+Nr)/2,zr=Wr-ir;xe==null||xe(ce,gt);var wt=ar.right-Ce.x-(Je+Ce.width),nr=ar.bottom-Ce.y-(rt+Ce.height);Et===1&&(Je=Math.round(Je),wt=Math.round(wt)),Ft===1&&(rt=Math.round(rt),nr=Math.round(nr));var jr={ready:!0,offsetX:Je/Et,offsetY:rt/Ft,offsetR:wt/Et,offsetB:nr/Ft,arrowX:Ur/Et,arrowY:zr/Ft,scaleX:Et,scaleY:Ft,align:gt};le(jr)}}),_e=function(){Q.current+=1;var M=Q.current;Promise.resolve().then(function(){Q.current===M&&G()})},ye=function(){le(function(M){return(0,_.Z)((0,_.Z)({},M),{},{ready:!1})})};return(0,c.Z)(ye,[ve]),(0,c.Z)(function(){ie||ye()},[ie]),[ne.ready,ne.offsetX,ne.offsetY,ne.offsetR,ne.offsetB,ne.arrowX,ne.arrowY,ne.scaleX,ne.scaleY,ne.align,_e]}var Fe=f(3300);function Re(ie,ce,re,ve,V){(0,c.Z)(function(){if(ie&&ce&&re){let Q=function(){ve(),V()};var J=ce,xe=re,Se=X(J),pe=X(xe),ne=O(xe),le=new Set([ne].concat((0,Fe.Z)(Se),(0,Fe.Z)(pe)));return le.forEach(function(R){R.addEventListener("scroll",Q,{passive:!0})}),ne.addEventListener("resize",Q,{passive:!0}),ve(),function(){le.forEach(function(R){R.removeEventListener("scroll",Q),ne.removeEventListener("resize",Q)})}}},[ie,ce,re])}var Me=f(48736);function Le(ie,ce,re,ve,V,J,xe,Se){var pe=r.useRef(ie);pe.current=ie;var ne=r.useRef(!1);r.useEffect(function(){if(ce&&ve&&(!V||J)){var Q=function(){ne.current=!1},R=function(se){var ae;pe.current&&!xe(((ae=se.composedPath)===null||ae===void 0||(ae=ae.call(se))===null||ae===void 0?void 0:ae[0])||se.target)&&!ne.current&&Se(!1)},I=O(ve);I.addEventListener("pointerdown",Q,!0),I.addEventListener("mousedown",R,!0),I.addEventListener("contextmenu",R,!0);var F=(0,n.A)(re);if(F&&(F.addEventListener("mousedown",R,!0),F.addEventListener("contextmenu",R,!0)),0)var G,_e,ye,ke;return function(){I.removeEventListener("pointerdown",Q,!0),I.removeEventListener("mousedown",R,!0),I.removeEventListener("contextmenu",R,!0),F&&(F.removeEventListener("mousedown",R,!0),F.removeEventListener("contextmenu",R,!0))}}},[ce,re,ve,V,J]);function le(){ne.current=!0}return le}var Oe=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Ne(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.Z,ce=r.forwardRef(function(re,ve){var V=re.prefixCls,J=V===void 0?"rc-trigger-popup":V,xe=re.children,Se=re.action,pe=Se===void 0?"hover":Se,ne=re.showAction,le=re.hideAction,Q=re.popupVisible,R=re.defaultPopupVisible,I=re.onPopupVisibleChange,F=re.afterPopupVisibleChange,G=re.mouseEnterDelay,_e=re.mouseLeaveDelay,ye=_e===void 0?.1:_e,ke=re.focusDelay,M=re.blurDelay,se=re.mask,ae=re.maskClosable,de=ae===void 0?!0:ae,we=re.getPopupContainer,ge=re.forceRender,j=re.autoDestroy,fe=re.destroyPopupOnHide,P=re.popup,he=re.popupClassName,Ee=re.popupStyle,x=re.popupPlacement,te=re.builtinPlacements,$=te===void 0?{}:te,K=re.popupAlign,W=re.zIndex,ee=re.stretch,Pe=re.getPopupClassNameFromAlign,Ae=re.fresh,Ce=re.alignPoint,Ue=re.onPopupClick,tt=re.onPopupAlign,Ke=re.arrow,He=re.popupMotion,qe=re.maskMotion,Ve=re.popupTransitionName,Ze=re.popupAnimation,ct=re.maskTransitionName,at=re.maskAnimation,Qe=re.className,$e=re.getTriggerDOMNode,Ge=(0,b.Z)(re,Oe),je=j||fe||!1,We=r.useState(!1),nt=(0,p.Z)(We,2),ht=nt[0],dt=nt[1];(0,c.Z)(function(){dt((0,e.Z)())},[]);var Xt=r.useRef({}),vt=r.useContext(L),It=r.useMemo(function(){return{registerSubPopup:function(ze,et){Xt.current[ze]=et,vt==null||vt.registerSubPopup(ze,et)}}},[vt]),Fr=(0,t.Z)(),Ye=r.useState(null),Yt=(0,p.Z)(Ye,2),st=Yt[0],ar=Yt[1],Et=r.useRef(null),Ft=(0,o.Z)(function(Be){Et.current=Be,(0,i.Sh)(Be)&&st!==Be&&ar(Be),vt==null||vt.registerSubPopup(Fr,Be)}),Lr=r.useState(null),lr=(0,p.Z)(Lr,2),Ct=lr[0],cr=lr[1],pt=r.useRef(null),bt=(0,o.Z)(function(Be){(0,i.Sh)(Be)&&Ct!==Be&&(cr(Be),pt.current=Be)}),Vt=r.Children.only(xe),_t=(Vt==null?void 0:Vt.props)||{},Lt={},Dr=(0,o.Z)(function(Be){var ze,et,ot=Ct;return(ot==null?void 0:ot.contains(Be))||((ze=(0,n.A)(ot))===null||ze===void 0?void 0:ze.host)===Be||Be===ot||(st==null?void 0:st.contains(Be))||((et=(0,n.A)(st))===null||et===void 0?void 0:et.host)===Be||Be===st||Object.values(Xt.current).some(function(it){return(it==null?void 0:it.contains(Be))||Be===it})}),Tr=A(J,He,Ze,Ve),ur=A(J,qe,at,ct),Mr=r.useState(R||!1),fr=(0,p.Z)(Mr,2),kt=fr[0],ut=fr[1],lt=Q!=null?Q:kt,hr=(0,o.Z)(function(Be){Q===void 0&&ut(Be)});(0,c.Z)(function(){ut(Q||!1)},[Q]);var gt=r.useRef(lt);gt.current=lt;var Je=r.useRef([]);Je.current=[];var rt=(0,o.Z)(function(Be){var ze;hr(Be),((ze=Je.current[Je.current.length-1])!==null&&ze!==void 0?ze:lt)!==Be&&(Je.current.push(Be),I==null||I(Be))}),xt=r.useRef(),Bt=function(){clearTimeout(xt.current)},yt=function(ze){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Bt(),et===0?rt(ze):xt.current=setTimeout(function(){rt(ze)},et*1e3)};r.useEffect(function(){return Bt},[]);var dr=r.useState(!1),Jt=(0,p.Z)(dr,2),Ht=Jt[0],Ut=Jt[1];(0,c.Z)(function(Be){(!Be||lt)&&Ut(!0)},[lt]);var Pr=r.useState(null),_r=(0,p.Z)(Pr,2),qt=_r[0],er=_r[1],vr=r.useState(null),Dt=(0,p.Z)(vr,2),Tt=Dt[0],Nt=Dt[1],At=function(ze){Nt([ze.clientX,ze.clientY])},pr=be(lt,st,Ce&&Tt!==null?Tt:Ct,x,$,K,tt),ft=(0,p.Z)(pr,11),Wt=ft[0],gr=ft[1],Or=ft[2],zt=ft[3],yr=ft[4],Kr=ft[5],mr=ft[6],br=ft[7],jt=ft[8],Zt=ft[9],tr=ft[10],Qt=Z(ht,pe,ne,le),rr=(0,p.Z)(Qt,2),Gt=rr[0],St=rr[1],Mt=Gt.has("click"),Pt=St.has("click")||St.has("contextMenu"),Ot=(0,o.Z)(function(){Ht||tr()}),ir=function(){gt.current&&Ce&&Pt&&yt(!1)};Re(lt,Ct,st,Ot,ir),(0,c.Z)(function(){Ot()},[Tt,x]),(0,c.Z)(function(){lt&&!($!=null&&$[x])&&Ot()},[JSON.stringify(K)]);var Xr=r.useMemo(function(){var Be=z($,J,Zt,Ce);return u()(Be,Pe==null?void 0:Pe(Zt))},[Zt,Pe,$,J,Ce]);r.useImperativeHandle(ve,function(){return{nativeElement:pt.current,popupElement:Et.current,forceAlign:Ot}});var xr=r.useState(0),Sr=(0,p.Z)(xr,2),Cr=Sr[0],Ir=Sr[1],Br=r.useState(0),wr=(0,p.Z)(Br,2),Hr=wr[0],Ur=wr[1],Er=function(){if(ee&&Ct){var ze=Ct.getBoundingClientRect();Ir(ze.width),Ur(ze.height)}},Nr=function(){Er(),Ot()},Wr=function(ze){Ut(!1),tr(),F==null||F(ze)},zr=function(){return new Promise(function(ze){Er(),er(function(){return ze})})};(0,c.Z)(function(){qt&&(tr(),qt(),er(null))},[qt]);function wt(Be,ze,et,ot){Lt[Be]=function(it){var Ar;ot==null||ot(it),yt(ze,et);for(var qr=arguments.length,Gr=new Array(qr>1?qr-1:0),Rr=1;Rr<qr;Rr++)Gr[Rr-1]=arguments[Rr];(Ar=_t[Be])===null||Ar===void 0||Ar.call.apply(Ar,[_t,it].concat(Gr))}}(Mt||Pt)&&(Lt.onClick=function(Be){var ze;gt.current&&Pt?yt(!1):!gt.current&&Mt&&(At(Be),yt(!0));for(var et=arguments.length,ot=new Array(et>1?et-1:0),it=1;it<et;it++)ot[it-1]=arguments[it];(ze=_t.onClick)===null||ze===void 0||ze.call.apply(ze,[_t,Be].concat(ot))});var nr=Le(lt,Pt,Ct,st,se,de,Dr,yt),jr=Gt.has("hover"),mt=St.has("hover"),$t,or;jr&&(wt("onMouseEnter",!0,G,function(Be){At(Be)}),wt("onPointerEnter",!0,G,function(Be){At(Be)}),$t=function(ze){(lt||Ht)&&st!==null&&st!==void 0&&st.contains(ze.target)&&yt(!0,G)},Ce&&(Lt.onMouseMove=function(Be){var ze;(ze=_t.onMouseMove)===null||ze===void 0||ze.call(_t,Be)})),mt&&(wt("onMouseLeave",!1,ye),wt("onPointerLeave",!1,ye),or=function(){yt(!1,ye)}),Gt.has("focus")&&wt("onFocus",!0,ke),St.has("focus")&&wt("onBlur",!1,M),Gt.has("contextMenu")&&(Lt.onContextMenu=function(Be){var ze;gt.current&&St.has("contextMenu")?yt(!1):(At(Be),yt(!0)),Be.preventDefault();for(var et=arguments.length,ot=new Array(et>1?et-1:0),it=1;it<et;it++)ot[it-1]=arguments[it];(ze=_t.onContextMenu)===null||ze===void 0||ze.call.apply(ze,[_t,Be].concat(ot))}),Qe&&(Lt.className=u()(_t.className,Qe));var Rt=r.useRef(!1);Rt.current||(Rt.current=ge||lt||Ht);var Kt=(0,_.Z)((0,_.Z)({},_t),Lt),sr={},kr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];kr.forEach(function(Be){Ge[Be]&&(sr[Be]=function(){for(var ze,et=arguments.length,ot=new Array(et),it=0;it<et;it++)ot[it]=arguments[it];(ze=Kt[Be])===null||ze===void 0||ze.call.apply(ze,[Kt].concat(ot)),Ge[Be].apply(Ge,ot)})});var Zr=r.cloneElement(Vt,(0,_.Z)((0,_.Z)({},Kt),sr)),Qr={x:Kr,y:mr},Vr=Ke?(0,_.Z)({},Ke!==!0?Ke:{}):null;return r.createElement(r.Fragment,null,r.createElement(d.Z,{disabled:!lt,ref:bt,onResize:Nr},r.createElement(E,{getTriggerDOMNode:$e},Zr)),Rt.current&&r.createElement(L.Provider,{value:It},r.createElement(w,{portal:ie,ref:Ft,prefixCls:J,popup:P,className:u()(he,Xr),style:Ee,target:Ct,onMouseEnter:$t,onMouseLeave:or,onPointerEnter:$t,zIndex:W,open:lt,keepDom:Ht,fresh:Ae,onClick:Ue,onPointerDownCapture:nr,mask:se,motion:Tr,maskMotion:ur,onVisibleChanged:Wr,onPrepare:zr,forceRender:ge,autoDestroy:je,getPopupContainer:we,align:Zt,arrow:Vr,arrowPos:Qr,ready:Wt,offsetX:gr,offsetY:Or,offsetR:zt,offsetB:yr,onAlign:Ot,stretch:ee,targetWidth:Cr/br,targetHeight:Hr/jt})))});return ce}var Ie=Ne(h.Z)},40390:function(){"use strict"},73835:function(){"use strict"},6480:function(Xe,D,f){"use strict";f.d(D,{G0:function(){return ve},JW:function(){return De},Jd:function(){return X},Kl:function(){return Te},L5:function(){return s},MH:function(){return ue},MI:function(){return Oe},Qo:function(){return w},SO:function(){return r},Tf:function(){return g},VT:function(){return H},XO:function(){return c},Xy:function(){return S},Y0:function(){return N},Ye:function(){return ce},Yv:function(){return Le},ZH:function(){return Fe},am:function(){return O},bD:function(){return Ne},eA:function(){return k},fA:function(){return be},fY:function(){return E},g6:function(){return e},g7:function(){return Ie},gT:function(){return T},gn:function(){return Re},h$:function(){return Me},hG:function(){return m},i8:function(){return oe},j3:function(){return me},lH:function(){return B},li:function(){return l},n4:function(){return v},pU:function(){return Z},qK:function(){return y},sA:function(){return q},sP:function(){return Y},t$:function(){return U},wj:function(){return re},zl:function(){return C}});var _=f(82093),p=f(49661),b=Object.defineProperty,h=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,d=(V,J,xe)=>J in V?b(V,J,{enumerable:!0,configurable:!0,writable:!0,value:xe}):V[J]=xe,i=(V,J)=>{for(var xe in J||(J={}))a.call(J,xe)&&d(V,xe,J[xe]);if(h)for(var xe of h(J))u.call(J,xe)&&d(V,xe,J[xe]);return V},n=(V,J,xe)=>new Promise((Se,pe)=>{var ne=R=>{try{Q(xe.next(R))}catch(I){pe(I)}},le=R=>{try{Q(xe.throw(R))}catch(I){pe(I)}},Q=R=>R.done?Se(R.value):Promise.resolve(R.value).then(ne,le);Q((xe=xe.apply(V,J)).next())});const o=(0,p.oP)(),t={};o!=null&&o.homework_common_id&&(t.homework_common_id=o==null?void 0:o.homework_common_id),o!=null&&o.exercisesId&&(t.exercise_id=o==null?void 0:o.exercisesId),console.log(o,t,"urlParamsAll");function c(V,J){return(0,_.U2)(`tasks/${V}.json`,i(i({},J),t))}function e(V,J={}){return(0,_.U2)(`myshixuns/${V}/challenges.json`,i({},J))}function r(V,J){return(0,_.U2)(`myshixuns/${V}/subject_challenges.json`,J)}function s(V,J,xe){return(0,_.U2)(`tasks/${V}/star.json`,{shixun_id:J,star:xe})}function l(V,J){return J.path&&(J.path=encodeURIComponent(J.path)),(0,_.U2)(`tasks/${V}/rep_content.json`,i(i({},J),t))}function v(V,J){return(0,_.v_)(`myshixuns/${V}/update_file.json`,i(i({},J),t))}function y(V,J){return(0,_.U2)(`tasks/${V}/reset_original_code.json`,i(i({},J),t))}function g(V,J){return(0,_.v_)(`myshixuns/${V}/reset_repository.json`,J)}function m(V,J){return(0,_.U2)(`tasks/${V}/reset_passed_code.json`,i(i({},J),t))}function S(V,J){return(0,_.v_)(`tasks/${V}/game_build.json`,i(i({},J),t))}function k(V){return(0,_.ZP)("http://localhost:49352/api/game_build",{method:"post",body:V})}function w(V,J){return(0,_.U2)(`tasks/${V}/game_status.json`,i(i({},J),t))}function C(V,J){return(0,_.v_)(`tasks/${V}/choose_build.json`,i(i({},J),t))}function E(V){return(0,_.U2)(`myshixuns/${V}/get_remaining_time.json`)}function T(V){return(0,_.U2)(`tasks/${V}/picture_display.json`,t)}function L(V,J){return get(`courses/${V}/inform_detail.json`,J)}function N(V){return(0,_.v_)(`tasks/${V}/plus_or_cancel_praise.json`)}function Z(V,J={}){return(0,_.v_)(`myshixuns/${V}/repository.json`,J)}function q(V,J={}){return(0,_.U2)(`myshixuns/${V}/start.json`,J)}function H(V,J={}){return(0,_.v_)(`myshixuns/${V}/force_delete_pod.json`,J)}function z(V,J={}){return get(`myshixuns/${V}/set_tpisession.json`,J)}function A(V){return get(`myshixuns/${V}/reset_pod.json`)}function O(V,J){return(0,_.U2)(`myshixuns/${V}/reset_pod.json`,J)}function X(V,J){return(0,_.ZP)(`/api/tasks/${V}/reboot_esc.json`,{method:"post",body:J})}function U(V){return(0,_.U2)(`tasks/${V}/check_test_sets.json`)}function B(V){return(0,_.U2)(`tasks/${V}/get_answer_info.json`)}function Y(V){return(0,_.U2)(`tasks/${V}/get_choose_answer.json`)}function ue(V){return(0,_.U2)(`tasks/${V}/unlock_choose_answer.json`)}function me(V,J){return(0,_.U2)(`tasks/${V}/unlock_answer.json`,{answer_id:J})}function De(V,J,xe,Se){return(0,_.v_)(`tasks/${V}/set_games_status.json`,i({result:J,data:xe},Se||{}))}function Te(V,J){return(0,_.U2)(`myshixuns/${V}/active_pod.json`,J)}function oe(V,J){return(0,_.U2)(`tasks/${V}/rank_list.json`,J)}function be(V,J){return(0,_.v_)(`tasks/${V}/close_windows_vnc.json`,{tpi_id:J})}function Fe(V,J){return(0,_.U2)(`tasks/${V}/commit_files.json`,J)}function Re(V,J){return(0,_.U2)(`tasks/${V}/pull_files.json`,J)}function Me(V,J){return(0,_.v_)(`tasks/${V}/log_output`,J)}function Le(V,J){return(0,_.U2)(`tasks/${V}/stop_log_output.json`,J)}function Oe(V){return n(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${V.id}/add_file.json`,{method:"post",body:V})})}function Ne(V){return n(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${V.id}/delete_git_file.json`,{method:"Delete",body:V})})}function Ie(V){return n(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${V.id}/mv_file.json`,{method:"post",body:V})})}function ie(V){return n(this,null,function*(){return V.path&&(V.path=encodeURIComponent(V.path)),Fetch(`/api/tasks/${V.id}/rep_content.json`,{method:"get",params:V})})}function ce(V,J){return(0,_.ZP)(`/api/shixuns/${V}/set_start_permanent.json`,{method:"put",body:J})}function re(V){return n(this,null,function*(){return(0,_.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:V})})}function ve(V){return n(this,null,function*(){return(0,_.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:V})})}},766:function(Xe,D,f){"use strict";f.d(D,{Z:function(){return h}});var _=f(76560),p={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},b=f(59301),h=({message:a,className:u,children:d,style:i={}})=>b.createElement("div",{className:`custom-spinner ${p.idsRingWrapper} ${u}`},b.createElement("div",{className:p.ldsRing},b.createElement("div",null),b.createElement("div",null),b.createElement("div",null),b.createElement("div",null)),a?b.createElement("p",{style:i},a):null,d,b.createElement(_.Outlet,null))},75790:function(Xe,D,f){"use strict";f.d(D,{Z:function(){return b}});var _=f(59301),p=f(4676);class b extends _.Component{constructor(a){super(a);const u=window.document;this.node=u.createElement("div"),u.body.appendChild(this.node)}render(){const{children:a}=this.props;return(0,p.createPortal)(a,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},49254:function(Xe,D,f){"use strict";f.r(D);var _=f(59301),p=f(76560),b=f(21753),h=f(91938),a=f(73835),u=f(33796),d=f(82093),i=f(59301),n=Object.defineProperty,o=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,e=(v,y,g)=>y in v?n(v,y,{enumerable:!0,configurable:!0,writable:!0,value:g}):v[y]=g,r=(v,y)=>{for(var g in y||(y={}))t.call(y,g)&&e(v,g,y[g]);if(o)for(var g of o(y))c.call(y,g)&&e(v,g,y[g]);return v},s=(v,y,g)=>new Promise((m,S)=>{var k=E=>{try{C(g.next(E))}catch(T){S(T)}},w=E=>{try{C(g.throw(E))}catch(T){S(T)}},C=E=>E.done?m(E.value):Promise.resolve(E.value).then(k,w);C((g=g.apply(v,y)).next())});const l=({classroomList:v,globalSetting:y,loading:g,dispatch:m})=>{var S;const[k,w]=(0,_.useState)({}),[C,E]=(0,_.useState)({}),T=(0,p.useParams)(),[L]=(0,p.useSearchParams)();let N="68yrbx3ech4a";switch(L.get("type")){case"windows":N="hvp5tzfof4wl";break;case"vnc":N="m3ifqz82epo9";break}let Z;(0,_.useEffect)(()=>{q()},[]),(0,_.useEffect)(()=>{k.host&&setTimeout(()=>{u.Z.publish("create-socket",1)},500)},[k]);const q=()=>s(void 0,null,function*(){var H,z;const A=yield(0,d.ZP)(`/api/tasks/${L.get("taskId")||N||"68yrbx3ech4a"}.json`,{method:"get"});if(E(r({},A)),L.get("type")==="terminal"){const O=yield(0,d.ZP)(`/api/myshixuns/${(H=A==null?void 0:A.myshixun)==null?void 0:H.identifier}/start.json`,{method:"get",game_id:(z=A==null?void 0:A.game)==null?void 0:z.id});w(r({},(O==null?void 0:O.data)||{}))}L.get("type")});return i.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},L.get("type")==="terminal"&&i.createElement(b.Z,{sshConfigData:k,sid:1}),L.get("type")!=="terminal"&&(C==null?void 0:C.challenge)&&i.createElement(h.Z,{taskId:N,myshixunId:(S=C==null?void 0:C.myshixun)==null?void 0:S.identifier,vnc_url:L.get("type")==="vnc",window_vnc_url:L.get("type")==="windows",taskData:C}))};D.default=(0,p.connect)(({classroomList:v,loading:y,globalSetting:g})=>({classroomList:v,globalSetting:g,loading:y.models.classroomList}))(l)},91938:function(Xe,D,f){"use strict";f.d(D,{Z:function(){return X}});var _=f(59301),p=f(62957),b=f(6767),h=f(60242),a=f(766),u=f(76374),d=f(75790),i=f(76560),n=f(49661),o=f(37568),t=f(99571);const c=o.default.TextArea;var e=({onCancel:U,onSave:B,content:Y})=>{const[ue,me]=(0,_.useState)(Y);function De(oe){me(oe.target.value)}function Te(){B(ue)}return(0,_.useEffect)(()=>{me(Y)},[Y]),_.createElement("div",{className:"clipboard-box"},_.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),_.createElement(c,{value:ue,onChange:De,className:"clipboard"}),_.createElement("p",null," ",_.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," \u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002 "),_.createElement("p",null," ",_.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," \u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002 "),_.createElement("div",{className:"btn-action-container"},_.createElement(t.ZP,{type:"ghost",onClick:U,style:{marginRight:10}},"\u53D6\u6D88"),_.createElement(t.ZP,{type:"primary",onClick:Te},"\u4FDD\u5B58")))},r=f(2610),s=f(6480),l=f(62013),v=f(33796),y=f(82093),g=f(59301),m=Object.defineProperty,S=Object.defineProperties,k=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,T=(U,B,Y)=>B in U?m(U,B,{enumerable:!0,configurable:!0,writable:!0,value:Y}):U[B]=Y,L=(U,B)=>{for(var Y in B||(B={}))C.call(B,Y)&&T(U,Y,B[Y]);if(w)for(var Y of w(B))E.call(B,Y)&&T(U,Y,B[Y]);return U},N=(U,B)=>S(U,k(B)),Z=(U,B,Y)=>new Promise((ue,me)=>{var De=be=>{try{oe(Y.next(be))}catch(Fe){me(Fe)}},Te=be=>{try{oe(Y.throw(be))}catch(Fe){me(Fe)}},oe=be=>be.done?ue(be.value):Promise.resolve(be.value).then(De,Te);oe((Y=Y.apply(U,B)).next())});function q(U){return U.replace(/\\u([\dA-Za-z]{4})/g,function(B,Y){return String.fromCharCode(parseInt("0x"+Y))})}function H(U){U||(U=window.location.search);let B=U.substr(1),Y={};return B.split("&").forEach(function(ue){let me=ue.split("=");Y[me[0]]=decodeURIComponent(me[1])}),Y}const z={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var A=(U=>(U[U.SET_LOADING=0]="SET_LOADING",U[U.SET_IS_LARGE=1]="SET_IS_LARGE",U[U.SET_MES=2]="SET_MES",U[U.SET_STATE=3]="SET_STATE",U[U.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",U[U.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",U[U.UPDATE_ALL=6]="UPDATE_ALL",U))(A||{});function O(U,B){switch(B.type){case 0:return N(L({},U),{loading:B.payload});case 1:return L({},N(L({},U),{isLarge:B.payload}));case 2:return N(L({},U),{mes:B.payload});case 3:return L(L({},U),B.payload);case 5:return N(L({},U),{transferContent:B.payload});case 4:return N(L({},U),{showClipBoardBox:B.payload});case 6:return L({loading:U.loading},B.payload);default:throw new Error}}var X=({vnc_url:U,window_vnc_url:B,linux_vnc:Y,virtual_machine:ue,taskData:me,shixun_environment_id:De,tab_type:Te,instance_startup_type:oe,index_tab:be,tpi_type:Fe})=>{const Re=(0,_.useRef)(),Me=(0,_.useRef)(),Le=(0,_.useRef)(),Oe=(0,_.useRef)(),Ne=(0,_.useRef)(),Ie=(0,_.useRef)(),ie=(0,_.useRef)(),ce=(0,_.useRef)(),[re,ve]=(0,_.useReducer)(O,z),[V,J]=(0,_.useState)(0),{mes:xe,loading:Se,showClipBoardBox:pe,isLarge:ne,transferContent:le}=re,Q=(0,_.useRef)(),R=(0,_.useRef)(),[I]=(0,i.useSearchParams)();let[F,G]=(0,_.useState)(0),_e=(0,_.useRef)();const ye=(0,i.useParams)();(0,_.useEffect)(()=>()=>{var $,K;(K=($=Me.current)==null?void 0:$.disconnect)==null||K.call($),clearTimeout(ce.current),clearInterval(Q.current)},[]),(0,_.useEffect)(()=>{R.current=re.loading},[re.loading]);const ke=()=>{var $;oe===2?setTimeout(()=>{Ee()},1500):(($=Le==null?void 0:Le.current)==null?void 0:$.resizeSession)!==void 0&&((0,r.vp)()?Le.current.resizeSession=!0:setTimeout(()=>{},900))};(0,_.useEffect)(()=>(document.addEventListener((0,r.gH)(),ke),()=>{document.removeEventListener((0,r.gH)(),ke)}),[]);function M(){ve({type:4,payload:!1})}function se(){ve({type:1,payload:!ne})}function ae($){return Re.current&&(Oe.current=new u.Z(K=>{var W;for(let ee of K)oe===2&&Ee(),(ee.target.offsetHeight>0||ee.target.offsetWidth>0)&&$&&($.scaleViewport=!0,(W=$==null?void 0:$._eventHandlers)==null||W.windowResize())}),Oe.current.observe(Re.current)),Oe.current}const de=()=>Z(void 0,null,function*(){var $,K,W,ee,Pe,Ae,Ce,Ue;let tt={};I.get("type")==="exercises"?tt.exercise_id=I.get("exercisesId"):ye.courseId&&ye.homeworkId&&(tt.homework_common_id=ye.homeworkId);const Ke=yield(0,s.sA)(($=me.myshixun)==null?void 0:$.identifier,L(N(L({},ye),{taskId:ye.taskId,shixun_environment_id:De,game_id:(K=me==null?void 0:me.game)==null?void 0:K.id,tab_type:Te}),tt));if((ee=(W=Ke==null?void 0:Ke.data)==null?void 0:W.data_list)!=null&&ee.length)return v.Z.publish("pod-restrict-data",{identifier:(Pe=Ke==null?void 0:Ke.data)==null?void 0:Pe.identifier,data_list:(Ae=Ke==null?void 0:Ke.data)==null?void 0:Ae.data_list}),Promise.reject();if((Ke==null?void 0:Ke.status)===-3)return new Promise((He,qe)=>Z(void 0,null,function*(){p.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:()=>Z(void 0,null,function*(){clearTimeout(_e.current),G(0),yield(0,s.fA)(ye.taskId,Ke==null?void 0:Ke.message),J(V+1)})})}));if((Ke==null?void 0:Ke.status)===-1)throw new String(Ke==null?void 0:Ke.message);if((Ke==null?void 0:Ke.status)===0)return ue&&((0,n.d8)("PVEAuthCookie",(Ue=(Ce=Ke==null?void 0:Ke.data)==null?void 0:Ce.cookie_options)==null?void 0:Ue.cookies_value,1),(0,n.d8)("PVELangCookie","zh_CN",1)),v.Z.publish("update-windows-time",Ke==null?void 0:Ke.data),v.Z.publish("send-tabs-result-data",N(L({},Ke==null?void 0:Ke.data),{index_tab:be})),Ke});function we(){G(100),clearTimeout(_e.current),setTimeout(()=>{ve({type:0,payload:!1})},1300),clearTimeout(Q.current)}const ge=()=>{Le.current=new l.Z(Re.current,ie.current,{credentials:{password:Ie.current},wsProtocols:["binary"],show_dot:!0}),Le.current.removeEventListener("disconnect",fe),Le.current.removeEventListener("connect",we),Le.current.removeEventListener("clipboard",j),window.rfbs2=Le.current,Oe.current=ae(Le.current),Le.current.viewOnly=ye.view_only||!1,Le.current.scaleViewport=ye.scale||!0,Le.current.showDotCursor=!0,Le.current.resizeSession=!0,Le.current.addEventListener("disconnect",fe),Le.current.addEventListener("connect",we),Le.current.addEventListener("clipboard",j)};function j($){const K=q($.detail.text);ve({type:5,payload:K})}function fe(){if(B)ve({type:0,payload:!0}),J(V+1);else{if(clearTimeout(ce.current),R.current)return;ce.current=setTimeout(()=>{J(V+1)},6e3)}setTimeout(()=>{var $,K;(K=($=Le.current)==null?void 0:$.connect)==null||K.call($)},3e3)}(0,_.useEffect)(()=>{if(v.Z.subscribe(`reset-linux-windows-vnc-${be}`,()=>{J(V+1)}),(B||U||Y||ue)&&Re.current){clearTimeout(_e.current),oe===2&&Ee(),new Promise(()=>Z(void 0,null,function*(){var ee,Pe,Ae,Ce,Ue;const tt=H();let Ke=yield de();if(Y||ue){const He=(Pe=(ee=Ke==null?void 0:Ke.data)==null?void 0:ee.link_url)!=null&&Pe.includes("?")?"&":"?";Ne.current.src=((Ae=Ke==null?void 0:Ke.data)==null?void 0:Ae.link_url)+He+"time="+Date.now(),ve({type:0,payload:!1});return}else if(B)Ie.current="Edu123",ie.current=decodeURIComponent((Ce=Ke==null?void 0:Ke.data)==null?void 0:Ce.link_url);else{const He=new URL(decodeURIComponent((Ue=Ke==null?void 0:Ke.data)==null?void 0:Ue.link_url)),{protocol:qe,searchParams:Ve,host:Ze}=He;Ie.current=Ve.get("password"),ie.current=`${qe==="https:"?"wss":"ws"}://${Ze}/${tt.path||"websockify"}`}if(oe===2){setTimeout(()=>{var He,qe,Ve,Ze;ae(),Ne.current.style.cssText=Ne.current.style.cssText+"width:1920px;height:1080px;position:initial",Ne.current.src=`/rdp.html?${(He=Ke==null?void 0:Ke.data)!=null&&He.gpPort?"gpPort="+((qe=Ke==null?void 0:Ke.data)==null?void 0:qe.gpPort)+"&password="+((Ve=Ke==null?void 0:Ke.data)==null?void 0:Ve.password)+"&":""}tpiId=${(Ze=me==null?void 0:me.myshixun)==null?void 0:Ze.id}&envId=${De}&tpiType=${Fe}`,ve({type:0,payload:!1})},5e3);return}ge()}));const $=v.Z.subscribe(`vnc-reset-${be}`,ee=>{if(ee==="\u53D6\u6D88"){ve({type:0,payload:!1});return}G(0),ve({type:3,payload:{loading:!0,mes:ee||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),K=v.Z.subscribe(`send-ctrl-alt-delete-${be}`,()=>{var ee;(ee=Le.current)==null||ee.sendCtrlAltDel(),b.ZP.success("\u53D1\u9001\u6210\u529F")}),W=v.Z.subscribe(`show-clipboard-box-${be}`,()=>{ve({type:4,payload:!0})});return G(0),()=>{var ee,Pe,Ae,Ce;(ee=Le.current)==null||ee.removeEventListener("disconnect",fe),(Pe=Le.current)==null||Pe.removeEventListener("connect",we),(Ae=Le.current)==null||Ae.removeEventListener("clipboard",j),$(),K(),W(),Re.current&&((Ce=Oe.current)==null||Ce.unobserve(Re.current))}}},[U,B,Y,V,De,Te]);function P(){var $,K;(K=($=Le.current)==null?void 0:$.sendKey)==null||K.call($,135)}function he($){return Z(this,null,function*(){var K;if(U){const W=$,ee=yield(0,y.ZP)(`/api/tasks/${ye.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(W),shixun_environment_id:De}});(ee==null?void 0:ee.status)===0&&(ve({type:5,payload:$}),b.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),M())}else(K=Le.current)==null||K.clipboardPasteFrom($),ve({type:5,payload:$}),b.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),M()})}function Ee(){var $,K;$=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Ne.current.parentElement.className="wh1080p",Ne.current.parentElement.style.cssText=`transform:scale(${$});transform-origin:center center`,Re.current.style.cssText="translate(-50%, -50%) scale("+$+")"}(0,_.useEffect)(()=>{F==0&&(clearTimeout(_e.current),x())},[F]);const x=()=>{F>99?F=99:(F=F+1,_e.current=setTimeout(()=>{x()},1500)),F<100&&G(F)},te=(0,_.useMemo)(()=>Se?"none":Y||ue||B&&oe===2?"block":"none",[Y,Se,ue,B]);return g.createElement(_.Fragment,null,ne&&g.createElement("a",{className:"btn-vnc-resize",onClick:se},g.createElement("i",{className:"iconfont icon-tuichuquanping"})),g.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:te==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},g.createElement("div",null,g.createElement("iframe",{style:{position:ne?"fixed":"absolute",left:0,top:ne?40:0,width:"100%",height:`calc(100% - ${ne?"100px":"0px"})`},frameBorder:"0",ref:Ne,allowFullScreen:!0}))),g.createElement("div",{style:{position:ne?"fixed":"absolute",left:0,top:ne?40:0,zIndex:5,width:"100%",height:`calc(100% - ${ne?"100px":"0px"})`},className:`${B?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${ne?"full-screen":""}`},Se?g.createElement(a.Z,{message:xe,style:{color:"#0152d9"}},g.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},g.createElement(h.Z,{percent:F,format:$=>g.createElement("span",{className:"c-white"},$,"%")}))):null,g.createElement("div",{ref:Re,className:`vnc-panel ${Se?"hidden zIndexf1":"animated fadeIn"}`})),g.createElement(d.Z,null,g.createElement(p.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:pe,onCancel:M,footer:null},g.createElement(e,{onCancel:M,onSave:he,content:le}))))}},21753:function(Xe,D,f){"use strict";f.d(D,{Z:function(){return C}});var _=f(59301),p=f(24334),b=f(34376),h=f(40390),a={"xterm-panel":"xterm-panel___XA0p9"},u=f(33796),d=f(76374),i=f(6480),n=f(76560),o=f(49661),t=f(62957),c=f(59301),e=Object.defineProperty,r=Object.defineProperties,s=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,g=(E,T,L)=>T in E?e(E,T,{enumerable:!0,configurable:!0,writable:!0,value:L}):E[T]=L,m=(E,T)=>{for(var L in T||(T={}))v.call(T,L)&&g(E,L,T[L]);if(l)for(var L of l(T))y.call(T,L)&&g(E,L,T[L]);return E},S=(E,T)=>r(E,s(T)),k=(E,T,L)=>new Promise((N,Z)=>{var q=A=>{try{z(L.next(A))}catch(O){Z(O)}},H=A=>{try{z(L.throw(A))}catch(O){Z(O)}},z=A=>A.done?N(A.value):Promise.resolve(A.value).then(q,H);z((L=L.apply(E,T)).next())});const w=3e4;var C=({itemData:E={},game:T,myshixun:L})=>{const N=(0,n.useParams)(),[Z,q]=(0,_.useState)(null),[H,z]=(0,_.useState)({}),{link_url:A,password:O,port:X}=H,U=(0,_.useRef)(),B=(0,_.useRef)(),Y=(0,_.useRef)(!1),ue=(0,_.useRef)(!1),me=(0,_.useRef)(!0),De=(0,o.oP)(),[Te]=(0,n.useSearchParams)(),{shixun_environment_id:oe,position:be,tab_type:Fe,index_tab:Re,command_string:Me}=E;(0,_.useEffect)(()=>{Ne()},[]);function Le(Ie,ie,ce){let re=ce._core._renderService.dimensions.actualCellWidth||9.5,ve=ce._core._renderService.dimensions.actualCellHeight||18;const V=Math.floor(ie/ve);return[Math.floor(Ie/re),V]}function Oe(Ie,ie){const ce=new d.Z(re=>{for(let ve of re)if(ve.target.offsetHeight>0||ve.target.offsetWidth>0){const[V,J]=Le(ve.target.offsetWidth,ve.target.offsetHeight,Ie);console.log("cols, rows",V,J),u.Z.publish(`ssh-xterm-resize-${Re}`,{columns:V,rows:J,width:ve.target.offsetWidth,height:ve.target.offsetHeight}),Ie.resize(V,J);const xe=p.Base64.decode("IA=="),Se=p.Base64.decode("CBtbSw==");Ie.write(xe),Ie.write(Se)}});return ce.observe(ie),ce}function Ne(){return k(this,null,function*(){var Ie,ie,ce,re,ve;let V={};Te.get("type")==="exercises"?V.exercise_id=Te.get("exercisesId"):N.courseId&&N.homeworkId&&(V.homework_common_id=N.homeworkId);const J=yield(0,i.sA)(L==null?void 0:L.identifier,m(m({shixun_environment_id:oe,tab_type:Fe,game_id:T.id},De),V));if((ie=(Ie=J==null?void 0:J.data)==null?void 0:Ie.data_list)!=null&&ie.length){u.Z.publish("pod-restrict-data",{identifier:(ce=J==null?void 0:J.data)==null?void 0:ce.identifier,data_list:(re=J==null?void 0:J.data)==null?void 0:re.data_list});return}if((J==null?void 0:J.status)===-3)return new Promise((xe,Se)=>k(this,null,function*(){t.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:()=>k(this,null,function*(){yield closeWindowsVnc(N.taskId,J==null?void 0:J.message),init()})})}));if(((ve=J==null?void 0:J.data)==null?void 0:ve.code)===200036){t.default.confirm({centered:!0,icon:null,width:430,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:c.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,",c.createElement("br",null),c.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,i.VT)(L==null?void 0:L.identifier,{shixun_environment_id:oe,tab_type:Fe,game_id:T.id}).then(xe=>{(xe==null?void 0:xe.status)==0&&Ne()})}});return}(J==null?void 0:J.status)===0&&(u.Z.publish("update-windows-time",J==null?void 0:J.data),u.Z.publish("send-tabs-result-data",S(m({},J==null?void 0:J.data),{index_tab:Re})),z(J.data),setTimeout(()=>u.Z.publish(`create-socket-${Re}`),300))})}return(0,_.useEffect)(()=>{if(U.current&&A){const Ie=new b.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});Ie.open(U.current),Ie.onData(ce=>{B.current&&B.current.readyState===1&&B.current.send(JSON.stringify({tp:"client",data:ce}))}),Ie.write("Connecting..."),q(Ie);const ie=Oe(Ie,U.current);return()=>{Ie.dispose(),U.current&&(ie==null||ie.unobserve(U.current))}}},[A,U.current]),(0,_.useEffect)(()=>{if(Z&&A){let Ie=function(){const re=new WebSocket(A);B.current=re,re.onopen=()=>{let V=Z.element.parentElement;if(V){let J=V.offsetWidth,xe=V.offsetHeight;console.log("init",{tp:"init",data:S(m({},H),{secret:O,width:J,height:xe,rows:Z.rows,columns:Z.cols})}),re.send(JSON.stringify({tp:"init",data:S(m({},H),{secret:O,width:J,height:xe,rows:Z.rows,columns:Z.cols})}))}Z.focus()},re.onerror=V=>{console.log("------in socket error----",V,re,A)},re.onmessage=V=>{ue.current=!1,Y.current||(Z.write("\r"),setTimeout(()=>{},1e3)),Y.current=!0,console.log("event:",V);const J=p.Base64.decode(V.data.toString());let xe=Z._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",J,xe,Z),Z.write(J),Me!=null&&Me.length?me.current&&(me.current=!1,setTimeout(()=>{B.current.send(JSON.stringify({tp:"client",data:(Me==null?void 0:Me.join("\r"))+"\r"})),Z.setOption("disableStdin",!1)},1e3)):(me.current=!1,Z.setOption("disableStdin",!1))};const ve=setInterval(()=>{var V;B.current&&((V=B.current)==null||V.send(JSON.stringify({tp:"h"})))},w);re.onclose=V=>{ve&&clearInterval(ve),console.log(ve,"tid",Re),ue.current||Z.write(`\r
connection closed`),ue.current=!0,setTimeout(()=>{Ie()},1e4)}};const ie=u.Z.subscribe(`create-socket-${Re}`,()=>{Ie()}),ce=u.Z.subscribe(`ssh-xterm-resize-${Re}`,re=>{B.current&&B.current.readyState===1&&B.current.send(JSON.stringify({tp:"resize",data:m({},re)}))});return()=>{ie(),ce(),B.current&&(B.current.close(),Y.current=!1)}}},[Z,A,X]),c.createElement("div",{ref:U,className:a["xterm-panel"]},A?null:c.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},2610:function(Xe,D,f){"use strict";f.d(D,{BU:function(){return p},Dj:function(){return _},gH:function(){return b},vp:function(){return h}});function _(a){try{a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen&&a.webkitRequestFullScreen()}catch(u){console.log(u,":e")}}function p(){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 b=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function h(){var a=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,u=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",a),window.isFullScreen?window.isFullScreen:a!=null}},24334:function(Xe,D,f){var _,p;(function(b,h){Xe.exports=h(b)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof f.g!="undefined"?f.g:this,function(b){"use strict";b=b||{};var h=b.Base64,a="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=function(H){for(var z={},A=0,O=H.length;A<O;A++)z[H.charAt(A)]=A;return z}(u),i=String.fromCharCode,n=function(H){if(H.length<2){var z=H.charCodeAt(0);return z<128?H:z<2048?i(192|z>>>6)+i(128|z&63):i(224|z>>>12&15)+i(128|z>>>6&63)+i(128|z&63)}else{var z=65536+(H.charCodeAt(0)-55296)*1024+(H.charCodeAt(1)-56320);return i(240|z>>>18&7)+i(128|z>>>12&63)+i(128|z>>>6&63)+i(128|z&63)}},o=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t=function(H){return H.replace(o,n)},c=function(H){var z=[0,2,1][H.length%3],A=H.charCodeAt(0)<<16|(H.length>1?H.charCodeAt(1):0)<<8|(H.length>2?H.charCodeAt(2):0),O=[u.charAt(A>>>18),u.charAt(A>>>12&63),z>=2?"=":u.charAt(A>>>6&63),z>=1?"=":u.charAt(A&63)];return O.join("")},e=b.btoa&&typeof b.btoa=="function"?function(H){return b.btoa(H)}:function(H){if(H.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return H.replace(/[\s\S]{1,3}/g,c)},r=function(H){return e(t(String(H)))},s=function(H){return H.replace(/[+\/]/g,function(z){return z=="+"?"-":"_"}).replace(/=/g,"")},l=function(H,z){return z?s(r(H)):r(H)},v=function(H){return l(H,!0)},y;b.Uint8Array&&(y=function(H,z){for(var A="",O=0,X=H.length;O<X;O+=3){var U=H[O],B=H[O+1],Y=H[O+2],ue=U<<16|B<<8|Y;A+=u.charAt(ue>>>18)+u.charAt(ue>>>12&63)+(typeof B!="undefined"?u.charAt(ue>>>6&63):"=")+(typeof Y!="undefined"?u.charAt(ue&63):"=")}return z?s(A):A});var g=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,m=function(H){switch(H.length){case 4:var z=(7&H.charCodeAt(0))<<18|(63&H.charCodeAt(1))<<12|(63&H.charCodeAt(2))<<6|63&H.charCodeAt(3),A=z-65536;return i((A>>>10)+55296)+i((A&1023)+56320);case 3:return i((15&H.charCodeAt(0))<<12|(63&H.charCodeAt(1))<<6|63&H.charCodeAt(2));default:return i((31&H.charCodeAt(0))<<6|63&H.charCodeAt(1))}},S=function(H){return H.replace(g,m)},k=function(H){var z=H.length,A=z%4,O=(z>0?d[H.charAt(0)]<<18:0)|(z>1?d[H.charAt(1)]<<12:0)|(z>2?d[H.charAt(2)]<<6:0)|(z>3?d[H.charAt(3)]:0),X=[i(O>>>16),i(O>>>8&255),i(O&255)];return X.length-=[0,0,2,1][A],X.join("")},w=b.atob&&typeof b.atob=="function"?function(H){return b.atob(H)}:function(H){return H.replace(/\S{1,4}/g,k)},C=function(H){return w(String(H).replace(/[^A-Za-z0-9\+\/]/g,""))},E=function(H){return S(w(H))},T=function(H){return String(H).replace(/[-_]/g,function(z){return z=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(H){return E(T(H))},N;b.Uint8Array&&(N=function(H){return Uint8Array.from(C(T(H)),function(z){return z.charCodeAt(0)})});var Z=function(){var H=b.Base64;return b.Base64=h,H};if(b.Base64={VERSION:a,atob:C,btoa:e,fromBase64:L,toBase64:l,utob:t,encode:l,encodeURI:v,btou:S,decode:L,noConflict:Z,fromUint8Array:y,toUint8Array:N},typeof Object.defineProperty=="function"){var q=function(H){return{value:H,enumerable:!1,writable:!0,configurable:!0}};b.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",q(function(){return L(this)})),Object.defineProperty(String.prototype,"toBase64",q(function(H){return l(this,H)})),Object.defineProperty(String.prototype,"toBase64URI",q(function(){return l(this,!0)}))}}return b.Meteor&&(Base64=b.Base64),Xe.exports?Xe.exports.Base64=b.Base64:(_=[],p=function(){return b.Base64}.apply(D,_),p!==void 0&&(Xe.exports=p)),{Base64:b.Base64}})},57128:function(Xe,D,f){"use strict";function _(u){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(i){return typeof i}:_=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_(u)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=h(f(50500));function b(){if(typeof WeakMap!="function")return null;var u=new WeakMap;return b=function(){return u},u}function h(u){if(u&&u.__esModule)return u;if(u===null||_(u)!=="object"&&typeof u!="function")return{default:u};var d=b();if(d&&d.has(u))return d.get(u);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in u)if(Object.prototype.hasOwnProperty.call(u,o)){var t=n?Object.getOwnPropertyDescriptor(u,o):null;t&&(t.get||t.set)?Object.defineProperty(i,o,t):i[o]=u[o]}return i.default=u,d&&d.set(u,i),i}var a={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(d){"use strict";for(var i="",n=d.length,o=n%3,t=0;t<n-2;t+=3)i+=this.toBase64Table[d[t]>>2],i+=this.toBase64Table[((d[t]&3)<<4)+(d[t+1]>>4)],i+=this.toBase64Table[((d[t+1]&15)<<2)+(d[t+2]>>6)],i+=this.toBase64Table[d[t+2]&63];var c=n-o;return o===2?(i+=this.toBase64Table[d[c]>>2],i+=this.toBase64Table[((d[c]&3)<<4)+(d[c+1]>>4)],i+=this.toBase64Table[(d[c+1]&15)<<2],i+=this.toBase64Table[64]):o===1&&(i+=this.toBase64Table[d[c]>>2],i+=this.toBase64Table[(d[c]&3)<<4],i+=this.toBase64Table[64],i+=this.toBase64Table[64]),i},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 i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=d.indexOf("=")-i;n<0&&(n=d.length-i);for(var o=(n>>2)*3+Math.floor(n%4/1.5),t=new Array(o),c=0,e=0,r=0,s=i;s<d.length;s++){var l=this.toBinaryTable[d.charCodeAt(s)&127],v=d.charAt(s)===this.base64Pad;if(l===-1){p.Error("Illegal character code "+d.charCodeAt(s)+" at position "+s);continue}e=e<<6|l,c+=6,c>=8&&(c-=8,v||(t[r++]=e>>c&255),e&=(1<<c)-1)}if(c){var y=new Error("Corrupted base64 string");throw y.name="Base64-Error",y}return t}};D.default=a},17852:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function f(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}function _(h,a){for(var u=0;u<a.length;u++){var d=a[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function p(h,a,u){return a&&_(h.prototype,a),u&&_(h,u),h}var b=function(){function h(){f(this,h)}return p(h,[{key:"decodeRect",value:function(u,d,i,n,o,t,c){if(o.rQwait("COPYRECT",4))return!1;var e=o.rQshift16(),r=o.rQshift16();return t.copyImage(e,r,u,d,i,n),!0}}]),h}();D.default=b},18330:function(Xe,D,f){"use strict";function _(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(t){return typeof t}:_=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(n)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=h(f(50500));function b(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return b=function(){return n},n}function h(n){if(n&&n.__esModule)return n;if(n===null||_(n)!=="object"&&typeof n!="function")return{default:n};var o=b();if(o&&o.has(n))return o.get(n);var t={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var r=c?Object.getOwnPropertyDescriptor(n,e):null;r&&(r.get||r.set)?Object.defineProperty(t,e,r):t[e]=n[e]}return t.default=n,o&&o.set(n,t),t}function a(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function u(n,o){for(var t=0;t<o.length;t++){var c=o[t];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(n,c.key,c)}}function d(n,o,t){return o&&u(n.prototype,o),t&&u(n,t),n}var i=function(){function n(){a(this,n),this._tiles=0,this._lastsubencoding=0}return d(n,[{key:"decodeRect",value:function(t,c,e,r,s,l,v){for(this._tiles===0&&(this._tilesX=Math.ceil(e/16),this._tilesY=Math.ceil(r/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){var y=1;if(s.rQwait("HEXTILE",y))return!1;var g=s.rQ,m=s.rQi,S=g[m];if(S>30)throw new Error("Illegal hextile subencoding (subencoding: "+S+")");var k=this._totalTiles-this._tiles,w=k%this._tilesX,C=Math.floor(k/this._tilesX),E=t+w*16,T=c+C*16,L=Math.min(16,t+e-E),N=Math.min(16,c+r-T);if(S&1)y+=L*N*4;else if(S&2&&(y+=4),S&4&&(y+=4),S&8){if(y++,s.rQwait("HEXTILE",y))return!1;var Z=g[m+y-1];S&16?y+=Z*6:y+=Z*2}if(s.rQwait("HEXTILE",y))return!1;if(m++,S===0)this._lastsubencoding&1?p.Debug(" Ignoring blank after RAW"):l.fillRect(E,T,L,N,this._background);else if(S&1)l.blitImage(E,T,L,N,g,m),m+=y-1;else{if(S&2&&(this._background=[g[m],g[m+1],g[m+2],g[m+3]],m+=4),S&4&&(this._foreground=[g[m],g[m+1],g[m+2],g[m+3]],m+=4),l.startTile(E,T,L,N,this._background),S&8){var q=g[m];m++;for(var H=0;H<q;H++){var z=void 0;S&16?(z=[g[m],g[m+1],g[m+2],g[m+3]],m+=4):z=this._foreground;var A=g[m];m++;var O=A>>4,X=A&15,U=g[m];m++;var B=(U>>4)+1,Y=(U&15)+1;l.subTile(O,X,B,Y,z)}}l.finishTile()}s.rQi=m,this._lastsubencoding=S,this._tiles--}return!0}}]),n}();D.default=i},11231:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function f(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}function _(h,a){for(var u=0;u<a.length;u++){var d=a[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function p(h,a,u){return a&&_(h.prototype,a),u&&_(h,u),h}var b=function(){function h(){f(this,h),this._lines=0}return p(h,[{key:"decodeRect",value:function(u,d,i,n,o,t,c){this._lines===0&&(this._lines=n);var e=c==8?1:4,r=i*e;if(o.rQwait("RAW",r))return!1;var s=d+(n-this._lines),l=Math.min(this._lines,Math.floor(o.rQlen/r)),v=o.rQ,y=o.rQi;if(c==8){for(var g=i*l,m=new Uint8Array(g*4),S=0;S<g;S++)m[S*4+0]=(v[y+S]>>0&3)*255/3,m[S*4+1]=(v[y+S]>>2&3)*255/3,m[S*4+2]=(v[y+S]>>4&3)*255/3,m[S*4+4]=0;v=m,y=0}return t.blitImage(u,s,i,l,v,y),o.rQskipBytes(l*r),this._lines-=l,!(this._lines>0)}}]),h}();D.default=b},57507:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function f(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}function _(h,a){for(var u=0;u<a.length;u++){var d=a[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function p(h,a,u){return a&&_(h.prototype,a),u&&_(h,u),h}var b=function(){function h(){f(this,h),this._subrects=0}return p(h,[{key:"decodeRect",value:function(u,d,i,n,o,t,c){if(this._subrects===0){if(o.rQwait("RRE",8))return!1;this._subrects=o.rQshift32();var e=o.rQshiftBytes(4);t.fillRect(u,d,i,n,e)}for(;this._subrects>0;){if(o.rQwait("RRE",12))return!1;var r=o.rQshiftBytes(4),s=o.rQshift16(),l=o.rQshift16(),v=o.rQshift16(),y=o.rQshift16();t.fillRect(u+s,d+l,v,y,r),this._subrects--}return!0}}]),h}();D.default=b},21330:function(Xe,D,f){"use strict";function _(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(e){return typeof e}:_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(t)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=u(f(50500)),b=h(f(48831));function h(t){return t&&t.__esModule?t:{default:t}}function a(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return a=function(){return t},t}function u(t){if(t&&t.__esModule)return t;if(t===null||_(t)!=="object"&&typeof t!="function")return{default:t};var c=a();if(c&&c.has(t))return c.get(t);var e={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var l=r?Object.getOwnPropertyDescriptor(t,s):null;l&&(l.get||l.set)?Object.defineProperty(e,s,l):e[s]=t[s]}return e.default=t,c&&c.set(t,e),e}function d(t,c){if(!(t instanceof c))throw new TypeError("Cannot call a class as a function")}function i(t,c){for(var e=0;e<c.length;e++){var r=c[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,c,e){return c&&i(t.prototype,c),e&&i(t,e),t}var o=function(){function t(){d(this,t),this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(var c=0;c<4;c++)this._zlibs[c]=new b.default}return n(t,[{key:"decodeRect",value:function(e,r,s,l,v,y,g){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(),p.Info("Reset zlib stream "+m));this._ctl=this._ctl>>4}var S;if(this._ctl===8)S=this._fillRect(e,r,s,l,v,y,g);else if(this._ctl===9)S=this._jpegRect(e,r,s,l,v,y,g);else if(this._ctl===10)S=this._pngRect(e,r,s,l,v,y,g);else if(!(this._ctl&128))S=this._basicRect(this._ctl,e,r,s,l,v,y,g);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return S&&(this._ctl=null),S}},{key:"_fillRect",value:function(e,r,s,l,v,y,g){if(v.rQwait("TIGHT",3))return!1;var m=v.rQi,S=v.rQ;return y.fillRect(e,r,s,l,[S[m+2],S[m+1],S[m]],!1),v.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(e,r,s,l,v,y,g){var m=this._readData(v);return m===null?!1:(y.imageRect(e,r,s,l,"image/jpeg",m),!0)}},{key:"_pngRect",value:function(e,r,s,l,v,y,g){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(e,r,s,l,v,y,g,m){if(this._filter===null)if(e&4){if(y.rQwait("TIGHT",1))return!1;this._filter=y.rQshift8()}else this._filter=0;var S=e&3,k;switch(this._filter){case 0:k=this._copyFilter(S,r,s,l,v,y,g,m);break;case 1:k=this._paletteFilter(S,r,s,l,v,y,g,m);break;case 2:k=this._gradientFilter(S,r,s,l,v,y,g,m);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return k&&(this._filter=null),k}},{key:"_copyFilter",value:function(e,r,s,l,v,y,g,m){var S=l*v*3,k;if(S<12){if(y.rQwait("TIGHT",S))return!1;k=y.rQshiftBytes(S)}else{if(k=this._readData(y),k===null)return!1;this._zlibs[e].setInput(k),k=this._zlibs[e].inflate(S),this._zlibs[e].setInput(null)}return g.blitRgbImage(r,s,l,v,k,0,!1),!0}},{key:"_paletteFilter",value:function(e,r,s,l,v,y,g,m){if(this._numColors===0){if(y.rQwait("TIGHT palette",1))return!1;var S=y.rQpeek8()+1,k=S*3;if(y.rQwait("TIGHT palette",1+k))return!1;this._numColors=S,y.rQskipBytes(1),y.rQshiftTo(this._palette,k)}var w=this._numColors<=2?1:8,C=Math.floor((l*w+7)/8),E=C*v,T;if(E<12){if(y.rQwait("TIGHT",E))return!1;T=y.rQshiftBytes(E)}else{if(T=this._readData(y),T===null)return!1;this._zlibs[e].setInput(T),T=this._zlibs[e].inflate(E),this._zlibs[e].setInput(null)}return this._numColors==2?this._monoRect(r,s,l,v,T,this._palette,g):this._paletteRect(r,s,l,v,T,this._palette,g),this._numColors=0,!0}},{key:"_monoRect",value:function(e,r,s,l,v,y,g){for(var m=this._getScratchBuffer(s*l*4),S=Math.floor((s+7)/8),k=Math.floor(s/8),w=0;w<l;w++){var C=void 0,E=void 0,T=void 0;for(T=0;T<k;T++)for(var L=7;L>=0;L--)C=(w*s+T*8+7-L)*4,E=(v[w*S+T]>>L&1)*3,m[C]=y[E],m[C+1]=y[E+1],m[C+2]=y[E+2],m[C+3]=255;for(var N=7;N>=8-s%8;N--)C=(w*s+T*8+7-N)*4,E=(v[w*S+T]>>N&1)*3,m[C]=y[E],m[C+1]=y[E+1],m[C+2]=y[E+2],m[C+3]=255}g.blitRgbxImage(e,r,s,l,m,0,!1)}},{key:"_paletteRect",value:function(e,r,s,l,v,y,g){for(var m=this._getScratchBuffer(s*l*4),S=s*l*4,k=0,w=0;k<S;k+=4,w++){var C=v[w]*3;m[k]=y[C],m[k+1]=y[C+1],m[k+2]=y[C+2],m[k+3]=255}g.blitRgbxImage(e,r,s,l,m,0,!1)}},{key:"_gradientFilter",value:function(e,r,s,l,v,y,g,m){throw new Error("Gradient filter not implemented")}},{key:"_readData",value:function(e){if(this._len===0){if(e.rQwait("TIGHT",3))return null;var r;r=e.rQshift8(),this._len=r&127,r&128&&(r=e.rQshift8(),this._len|=(r&127)<<7,r&128&&(r=e.rQshift8(),this._len|=r<<14))}if(e.rQwait("TIGHT",this._len))return null;var s=e.rQshiftBytes(this._len);return this._len=0,s}},{key:"_getScratchBuffer",value:function(e){return(!this._scratchBuffer||this._scratchBuffer.length<e)&&(this._scratchBuffer=new Uint8Array(e)),this._scratchBuffer}}]),t}();D.default=o},91649:function(Xe,D,f){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=p(f(21330));function p(s){return s&&s.__esModule?s:{default:s}}function b(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(v){return typeof v}:b=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},b(s)}function h(s,l){if(!(s instanceof l))throw new TypeError("Cannot call a class as a function")}function a(s,l){for(var v=0;v<l.length;v++){var y=l[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(s,y.key,y)}}function u(s,l,v){return l&&a(s.prototype,l),v&&a(s,v),s}function d(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(l&&l.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),l&&i(s,l)}function i(s,l){return i=Object.setPrototypeOf||function(y,g){return y.__proto__=g,y},i(s,l)}function n(s){var l=c();return function(){var y=e(s),g;if(l){var m=e(this).constructor;g=Reflect.construct(y,arguments,m)}else g=y.apply(this,arguments);return o(this,g)}}function o(s,l){return l&&(b(l)==="object"||typeof l=="function")?l:t(s)}function t(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function c(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(s){return!1}}function e(s){return e=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},e(s)}var r=function(s){d(v,s);var l=n(v);function v(){return h(this,v),l.apply(this,arguments)}return u(v,[{key:"_pngRect",value:function(g,m,S,k,w,C,E){var T=this._readData(w);return T===null?!1:(C.imageRect(g,m,S,k,"image/png",T),!0)}},{key:"_basicRect",value:function(g,m,S,k,w,C,E,T){throw new Error("BasicCompression received in TightPNG rect")}}]),v}(_.default);D.default=r},17834:function(Xe,D,f){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=f(25805),p=b(f(27589));function b(i){return i&&i.__esModule?i:{default:i}}function h(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function a(i,n){for(var o=0;o<n.length;o++){var t=n[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}function u(i,n,o){return n&&a(i.prototype,n),o&&a(i,o),i}var d=function(){function i(){h(this,i),this.strm=new p.default,this.chunkSize=1024*10*10,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,(0,_.deflateInit)(this.strm,this.windowBits)}return u(i,[{key:"deflate",value:function(o){this.strm.input=o,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 t=(0,_.deflate)(this.strm,_.Z_FULL_FLUSH),c=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);if(t<0)throw new Error("zlib deflate failed");if(this.strm.avail_in>0){var e=[c],r=c.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,t=(0,_.deflate)(this.strm,_.Z_FULL_FLUSH),t<0)throw new Error("zlib deflate failed");var s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);r+=s.length,e.push(s)}while(this.strm.avail_in>0);for(var l=new Uint8Array(r),v=0,y=0;y<e.length;y++)l.set(e[y],v),v+=e[y].length;c=l}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,c}}]),i}();D.default=d},64966:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function f(S,k){if(!(S instanceof k))throw new TypeError("Cannot call a class as a function")}function _(S,k){for(var w=0;w<k.length;w++){var C=k[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(S,C.key,C)}}function p(S,k,w){return k&&_(S.prototype,k),w&&_(S,w),S}var b=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=0,u,d,i,n,o,t;u=65536,d=1<<24,i=u|d,n=4,o=1024,t=n|o;var c=[i|o,a|a,u|a,i|t,i|n,u|t,a|n,u|a,a|o,i|o,i|t,a|o,d|t,i|n,d|a,a|n,a|t,d|o,d|o,u|o,u|o,i|a,i|a,d|t,u|n,d|n,d|n,u|n,a|a,a|t,u|t,d|a,u|a,i|t,a|n,i|a,i|o,d|a,d|a,a|o,i|n,u|a,u|o,d|n,a|o,a|n,d|t,u|t,i|t,u|n,i|a,d|t,d|n,a|t,u|t,i|o,a|t,d|o,d|o,a|a,u|n,u|o,a|a,i|n];u=1<<20,d=1<<31,i=u|d,n=32,o=32768,t=n|o;var e=[i|t,d|o,a|o,u|t,u|a,a|n,i|n,d|t,d|n,i|t,i|o,d|a,d|o,u|a,a|n,i|n,u|o,u|n,d|t,a|a,d|a,a|o,u|t,i|a,u|n,d|n,a|a,u|o,a|t,i|o,i|a,a|t,a|a,u|t,i|n,u|a,d|t,i|a,i|o,a|o,i|a,d|o,a|n,i|t,u|t,a|n,a|o,d|a,a|t,i|o,u|a,d|n,u|n,d|t,d|n,u|n,u|o,a|a,d|o,a|t,d|a,i|n,i|t,u|o];u=1<<17,d=1<<27,i=u|d,n=8,o=512,t=n|o;var r=[a|t,i|o,a|a,i|n,d|o,a|a,u|t,d|o,u|n,d|n,d|n,u|a,i|t,u|n,i|a,a|t,d|a,a|n,i|o,a|o,u|o,i|a,i|n,u|t,d|t,u|o,u|a,d|t,a|n,i|t,a|o,d|a,i|o,d|a,u|n,a|t,u|a,i|o,d|o,a|a,a|o,u|n,i|t,d|o,d|n,a|o,a|a,i|n,d|t,u|a,d|a,i|t,a|n,u|t,u|o,d|n,i|a,d|t,a|t,i|a,u|t,a|n,i|n,u|o];u=8192,d=1<<23,i=u|d,n=1,o=128,t=n|o;var s=[i|n,u|t,u|t,a|o,i|o,d|t,d|n,u|n,a|a,i|a,i|a,i|t,a|t,a|a,d|o,d|n,a|n,u|a,d|a,i|n,a|o,d|a,u|n,u|o,d|t,a|n,u|o,d|o,u|a,i|o,i|t,a|t,d|o,d|n,i|a,i|t,a|t,a|a,a|a,i|a,u|o,d|o,d|t,a|n,i|n,u|t,u|t,a|o,i|t,a|t,a|n,u|a,d|n,u|n,i|o,d|t,u|n,u|o,d|a,i|n,a|o,d|a,u|a,i|o];u=1<<25,d=1<<30,i=u|d,n=256,o=1<<19,t=n|o;var l=[a|n,u|t,u|o,i|n,a|o,a|n,d|a,u|o,d|t,a|o,u|n,d|t,i|n,i|o,a|t,d|a,u|a,d|o,d|o,a|a,d|n,i|t,i|t,u|n,i|o,d|n,a|a,i|a,u|t,u|a,i|a,a|t,a|o,i|n,a|n,u|a,d|a,u|o,i|n,d|t,u|n,d|a,i|o,u|t,d|t,a|n,u|a,i|o,i|t,a|t,i|a,i|t,u|o,a|a,d|o,i|a,a|t,u|n,d|n,a|o,a|a,d|o,u|t,d|n];u=1<<22,d=1<<29,i=u|d,n=16,o=16384,t=n|o;var v=[d|n,i|a,a|o,i|t,i|a,a|n,i|t,u|a,d|o,u|t,u|a,d|n,u|n,d|o,d|a,a|t,a|a,u|n,d|t,a|o,u|o,d|t,a|n,i|n,i|n,a|a,u|t,i|o,a|t,u|o,i|o,d|a,d|o,a|n,i|n,u|o,i|t,u|a,a|t,d|n,u|a,d|o,d|a,a|t,d|n,i|t,u|o,i|a,u|t,i|o,a|a,i|n,a|n,a|o,i|a,u|t,a|o,u|n,d|t,a|a,i|o,d|a,u|n,d|t];u=1<<21,d=1<<26,i=u|d,n=2,o=2048,t=n|o;var y=[u|a,i|n,d|t,a|a,a|o,d|t,u|t,i|o,i|t,u|a,a|a,d|n,a|n,d|a,i|n,a|t,d|o,u|t,u|n,d|o,d|n,i|a,i|o,u|n,i|a,a|o,a|t,i|t,u|o,a|n,d|a,u|o,d|a,u|o,u|a,d|t,d|t,i|n,i|n,a|n,u|n,d|a,d|o,u|a,i|o,a|t,u|t,i|o,a|t,d|n,i|t,i|a,u|o,a|a,a|n,i|t,a|a,u|t,i|a,a|o,d|n,d|o,a|o,u|n];u=1<<18,d=1<<28,i=u|d,n=64,o=4096,t=n|o;var g=[d|t,a|o,u|a,i|t,d|a,d|t,a|n,d|a,u|n,i|a,i|t,u|o,i|o,u|t,a|o,a|n,i|a,d|n,d|o,a|t,u|o,u|n,i|n,i|o,a|t,a|a,a|a,i|n,d|n,d|o,u|t,u|a,u|t,u|a,i|o,a|o,a|n,i|n,a|o,u|t,d|o,a|n,d|n,i|a,i|n,d|a,u|a,d|t,a|a,i|t,u|n,d|n,i|a,d|o,d|t,a|a,i|t,u|o,u|o,a|t,a|t,u|n,d|a,i|o],m=function(){function S(k){f(this,S),this.keys=[];for(var w=[],C=[],E=[],T=0,L=56;T<56;++T,L-=8){L+=L<-5?65:L<-3?31:L<-1?63:L===27?35:0;var N=L&7;w[T]=k[L>>>3]&1<<N?1:0}for(var Z=0;Z<16;++Z){var q=Z<<1,H=q+1;E[q]=E[H]=0;for(var z=28;z<59;z+=28)for(var A=z-28;A<z;++A){var O=A+h[Z];C[A]=O<z?w[O]:w[O-28]}for(var X=0;X<24;++X)C[b[X]]!==0&&(E[q]|=1<<23-X),C[b[X+24]]!==0&&(E[H]|=1<<23-X)}for(var U=0,B=0,Y=0;U<16;++U){var ue=E[B++],me=E[B++];this.keys[Y]=(ue&16515072)<<6,this.keys[Y]|=(ue&4032)<<10,this.keys[Y]|=(me&16515072)>>>10,this.keys[Y]|=(me&4032)>>>6,++Y,this.keys[Y]=(ue&258048)<<12,this.keys[Y]|=(ue&63)<<16,this.keys[Y]|=(me&258048)>>>4,this.keys[Y]|=me&63,++Y}}return p(S,[{key:"enc8",value:function(w){var C=w.slice(),E=0,T,L,N;T=C[E++]<<24|C[E++]<<16|C[E++]<<8|C[E++],L=C[E++]<<24|C[E++]<<16|C[E++]<<8|C[E++],N=(T>>>4^L)&252645135,L^=N,T^=N<<4,N=(T>>>16^L)&65535,L^=N,T^=N<<16,N=(L>>>2^T)&858993459,T^=N,L^=N<<2,N=(L>>>8^T)&16711935,T^=N,L^=N<<8,L=L<<1|L>>>31&1,N=(T^L)&2863311530,T^=N,L^=N,T=T<<1|T>>>31&1;for(var Z=0,q=0;Z<8;++Z){N=L<<28|L>>>4,N^=this.keys[q++];var H=y[N&63];H|=l[N>>>8&63],H|=r[N>>>16&63],H|=c[N>>>24&63],N=L^this.keys[q++],H|=g[N&63],H|=v[N>>>8&63],H|=s[N>>>16&63],H|=e[N>>>24&63],T^=H,N=T<<28|T>>>4,N^=this.keys[q++],H=y[N&63],H|=l[N>>>8&63],H|=r[N>>>16&63],H|=c[N>>>24&63],N=T^this.keys[q++],H|=g[N&63],H|=v[N>>>8&63],H|=s[N>>>16&63],H|=e[N>>>24&63],L^=H}for(L=L<<31|L>>>1,N=(T^L)&2863311530,T^=N,L^=N,T=T<<31|T>>>1,N=(T>>>8^L)&16711935,L^=N,T^=N<<8,N=(T>>>2^L)&858993459,L^=N,T^=N<<2,N=(L>>>16^T)&65535,T^=N,L^=N<<16,N=(L>>>4^T)&252645135,T^=N,L^=N<<4,N=[L,T],E=0;E<8;E++)C[E]=(N[E>>>2]>>>8*(3-E%4))%256,C[E]<0&&(C[E]+=256);return C}},{key:"encrypt",value:function(w){return this.enc8(w.slice(0,8)).concat(this.enc8(w.slice(8,16)))}}]),S}();D.default=m},22814:function(Xe,D,f){"use strict";function _(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(s){return typeof s}:_=function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},_(e)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=i(f(50500)),b=u(f(57128)),h=f(41895),a=f(20860);function u(e){return e&&e.__esModule?e:{default:e}}function d(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return d=function(){return e},e}function i(e){if(e&&e.__esModule)return e;if(e===null||_(e)!=="object"&&typeof e!="function")return{default:e};var r=d();if(r&&r.has(e))return r.get(e);var s={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in e)if(Object.prototype.hasOwnProperty.call(e,v)){var y=l?Object.getOwnPropertyDescriptor(e,v):null;y&&(y.get||y.set)?Object.defineProperty(s,v,y):s[v]=e[v]}return s.default=e,r&&r.set(e,s),s}function n(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function o(e,r){for(var s=0;s<r.length;s++){var l=r[s];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function t(e,r,s){return r&&o(e.prototype,r),s&&o(e,s),e}var c=function(){function e(r){if(n(this,e),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,p.Debug(">> Display.constructor"),this._target=r,!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},p.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),p.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return t(e,[{key:"viewportChangePos",value:function(s,l){var v=this._viewportLoc;s=Math.floor(s),l=Math.floor(l),this._clipViewport||(s=-v.w,l=-v.h);var y=v.x+v.w-1,g=v.y+v.h-1;s<0&&v.x+s<0&&(s=-v.x),y+s>=this._fbWidth&&(s-=y+s-this._fbWidth+1),v.y+l<0&&(l=-v.y),g+l>=this._fbHeight&&(l-=g+l-this._fbHeight+1),!(s===0&&l===0)&&(p.Debug("viewportChange deltaX: "+s+", deltaY: "+l),v.x+=s,v.y+=l,this._damage(v.x,v.y,v.w,v.h),this.flip())}},{key:"viewportChangeSize",value:function(s,l){(!this._clipViewport||typeof s=="undefined"||typeof l=="undefined")&&(p.Debug("Setting viewport to full display region"),s=this._fbWidth,l=this._fbHeight),s=Math.floor(s),l=Math.floor(l),s>this._fbWidth&&(s=this._fbWidth),l>this._fbHeight&&(l=this._fbHeight);var v=this._viewportLoc;if(v.w!==s||v.h!==l){v.w=s,v.h=l;var y=this._target;y.width=s,y.height=l,this.viewportChangePos(0,0),this._damage(v.x,v.y,v.w,v.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(s){return this._scale===0?0:(0,a.toSigned32bit)(s/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(s){return this._scale===0?0:(0,a.toSigned32bit)(s/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(s,l){this._prevDrawStyle="",this._fbWidth=s,this._fbHeight=l;var v=this._backbuffer;if(v.width!==s||v.height!==l){var y=null;v.width>0&&v.height>0&&(y=this._drawCtx.getImageData(0,0,v.width,v.height)),v.width!==s&&(v.width=s),v.height!==l&&(v.height=l),y&&this._drawCtx.putImageData(y,0,0)}var g=this._viewportLoc;this.viewportChangeSize(g.w,g.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(s,l,v,y){s<this._damageBounds.left&&(this._damageBounds.left=s),l<this._damageBounds.top&&(this._damageBounds.top=l),s+v>this._damageBounds.right&&(this._damageBounds.right=s+v),l+y>this._damageBounds.bottom&&(this._damageBounds.bottom=l+y)}},{key:"flip",value:function(s){if(this._renderQ.length!==0&&!s)this._renderQPush({type:"flip"});else{var l=this._damageBounds.left,v=this._damageBounds.top,y=this._damageBounds.right-l,g=this._damageBounds.bottom-v,m=l-this._viewportLoc.x,S=v-this._viewportLoc.y;m<0&&(y+=m,l-=m,m=0),S<0&&(g+=S,v-=S,S=0),m+y>this._viewportLoc.w&&(y=this._viewportLoc.w-m),S+g>this._viewportLoc.h&&(g=this._viewportLoc.h-S),y>0&&g>0&&this._targetCtx.drawImage(this._backbuffer,l,v,y,g,m,S,y,g),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}}},{key:"pending",value:function(){return this._renderQ.length>0}},{key:"flush",value:function(){this._renderQ.length===0?this.onflush():this._flushing=!0}},{key:"fillRect",value:function(s,l,v,y,g,m){this._renderQ.length!==0&&!m?this._renderQPush({type:"fill",x:s,y:l,width:v,height:y,color:g}):(this._setFillColor(g),this._drawCtx.fillRect(s,l,v,y),this._damage(s,l,v,y))}},{key:"copyImage",value:function(s,l,v,y,g,m,S){this._renderQ.length!==0&&!S?this._renderQPush({type:"copy",oldX:s,oldY:l,x:v,y,width:g,height:m}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,s,l,g,m,v,y,g,m),this._damage(v,y,g,m))}},{key:"imageRect",value:function(s,l,v,y,g,m){if(!(v===0||y===0)){var S=new Image;S.src="data: "+g+";base64,"+b.default.encode(m),this._renderQPush({type:"img",img:S,x:s,y:l,width:v,height:y})}}},{key:"startTile",value:function(s,l,v,y,g){this._tileX=s,this._tileY=l,v===16&&y===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(v,y);for(var m=g[2],S=g[1],k=g[0],w=this._tile.data,C=0;C<v*y*4;C+=4)w[C]=m,w[C+1]=S,w[C+2]=k,w[C+3]=255}},{key:"subTile",value:function(s,l,v,y,g){for(var m=g[2],S=g[1],k=g[0],w=s+v,C=l+y,E=this._tile.data,T=this._tile.width,L=l;L<C;L++)for(var N=s;N<w;N++){var Z=(N+L*T)*4;E[Z]=m,E[Z+1]=S,E[Z+2]=k,E[Z+3]=255}}},{key:"finishTile",value:function(){this._drawCtx.putImageData(this._tile,this._tileX,this._tileY),this._damage(this._tileX,this._tileY,this._tile.width,this._tile.height)}},{key:"blitImage",value:function(s,l,v,y,g,m,S){if(this._renderQ.length!==0&&!S){var k=new Uint8Array(v*y*4);k.set(new Uint8Array(g.buffer,0,k.length)),this._renderQPush({type:"blit",data:k,x:s,y:l,width:v,height:y})}else this._bgrxImageData(s,l,v,y,g,m)}},{key:"blitRgbImage",value:function(s,l,v,y,g,m,S){if(this._renderQ.length!==0&&!S){var k=new Uint8Array(v*y*3);k.set(new Uint8Array(g.buffer,0,k.length)),this._renderQPush({type:"blitRgb",data:k,x:s,y:l,width:v,height:y})}else this._rgbImageData(s,l,v,y,g,m)}},{key:"blitRgbxImage",value:function(s,l,v,y,g,m,S){if(this._renderQ.length!==0&&!S){var k=new Uint8Array(v*y*4);k.set(new Uint8Array(g.buffer,0,k.length)),this._renderQPush({type:"blitRgbx",data:k,x:s,y:l,width:v,height:y})}else this._rgbxImageData(s,l,v,y,g,m)}},{key:"drawImage",value:function(s,l,v){this._drawCtx.drawImage(s,l,v),this._damage(l,v,s.width,s.height)}},{key:"autoscale",value:function(s,l){var v;if(s===0||l===0)v=0;else{var y=this._viewportLoc,g=s/l,m=y.w/y.h;m>=g?v=s/y.w:v=l/y.h}this._rescale(v)}},{key:"_rescale",value:function(s){this._scale=s;var l=this._viewportLoc,v=s*l.w+"px",y=s*l.h+"px";(this._target.style.width!==v||this._target.style.height!==y)&&(this._target.style.width=v,this._target.style.height=y)}},{key:"_setFillColor",value:function(s){var l="rgb("+s[2]+","+s[1]+","+s[0]+")";l!==this._prevDrawStyle&&(this._drawCtx.fillStyle=l,this._prevDrawStyle=l)}},{key:"_rgbImageData",value:function(s,l,v,y,g,m){for(var S=this._drawCtx.createImageData(v,y),k=S.data,w=0,C=m;w<v*y*4;w+=4,C+=3)k[w]=g[C],k[w+1]=g[C+1],k[w+2]=g[C+2],k[w+3]=255;this._drawCtx.putImageData(S,s,l),this._damage(s,l,S.width,S.height)}},{key:"_bgrxImageData",value:function(s,l,v,y,g,m){for(var S=this._drawCtx.createImageData(v,y),k=S.data,w=0,C=m;w<v*y*4;w+=4,C+=4)k[w]=g[C+2],k[w+1]=g[C+1],k[w+2]=g[C],k[w+3]=255;this._drawCtx.putImageData(S,s,l),this._damage(s,l,S.width,S.height)}},{key:"_rgbxImageData",value:function(s,l,v,y,g,m){var S;h.supportsImageMetadata?S=new ImageData(new Uint8ClampedArray(g.buffer,g.byteOffset,v*y*4),v,y):(S=this._drawCtx.createImageData(v,y),S.data.set(new Uint8ClampedArray(g.buffer,g.byteOffset,v*y*4))),this._drawCtx.putImageData(S,s,l),this._damage(s,l,S.width,S.height)}},{key:"_renderQPush",value:function(s){this._renderQ.push(s),this._renderQ.length===1&&this._scanRenderQ()}},{key:"_resumeRenderQ",value:function(){this.removeEventListener("load",this._noVNCDisplay._resumeRenderQ),this._noVNCDisplay._scanRenderQ()}},{key:"_scanRenderQ",value:function(){for(var s=!0;s&&this._renderQ.length>0;){var l=this._renderQ[0];switch(l.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(l.oldX,l.oldY,l.x,l.y,l.width,l.height,!0);break;case"fill":this.fillRect(l.x,l.y,l.width,l.height,l.color,!0);break;case"blit":this.blitImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"blitRgb":this.blitRgbImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(l.x,l.y,l.width,l.height,l.data,0,!0);break;case"img":if(l.img.complete&&l.img.width!==0&&l.img.height!==0){if(l.img.width!==l.width||l.img.height!==l.height){p.Error("Decoded image has incorrect dimensions. Got "+l.img.width+"x"+l.img.height+". Expected "+l.width+"x"+l.height+".");return}this.drawImage(l.img,l.x,l.y)}else l.img._noVNCDisplay=this,l.img.addEventListener("load",this._resumeRenderQ),s=!1;break}s&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(s){this._rescale(s)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(s){this._clipViewport=s;var l=this._viewportLoc;this.viewportChangeSize(l.w,l.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),e}();D.default=c},31729:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.encodingName=_,D.encodings=void 0;var f={encodingRaw:0,encodingCopyRect:1,encodingRRE:2,encodingHextile:5,encodingTight:7,encodingTightPNG:-260,pseudoEncodingQualityLevel9:-23,pseudoEncodingQualityLevel0:-32,pseudoEncodingDesktopSize:-223,pseudoEncodingLastRect:-224,pseudoEncodingCursor:-239,pseudoEncodingQEMUExtendedKeyEvent:-258,pseudoEncodingDesktopName:-307,pseudoEncodingExtendedDesktopSize:-308,pseudoEncodingXvp:-309,pseudoEncodingFence:-312,pseudoEncodingContinuousUpdates:-313,pseudoEncodingCompressLevel9:-247,pseudoEncodingCompressLevel0:-256,pseudoEncodingVMwareCursor:1464686180,pseudoEncodingExtendedClipboard:3231835598};D.encodings=f;function _(p){switch(p){case f.encodingRaw:return"Raw";case f.encodingCopyRect:return"CopyRect";case f.encodingRRE:return"RRE";case f.encodingHextile:return"Hextile";case f.encodingTight:return"Tight";case f.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+p+"]"}}},48831:function(Xe,D,f){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=f(95766),p=b(f(27589));function b(i){return i&&i.__esModule?i:{default:i}}function h(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}function a(i,n){for(var o=0;o<n.length;o++){var t=n[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(i,t.key,t)}}function u(i,n,o){return n&&a(i.prototype,n),o&&a(i,o),i}var d=function(){function i(){h(this,i),this.strm=new p.default,this.chunkSize=1024*10*10,this.strm.output=new Uint8Array(this.chunkSize),this.windowBits=5,(0,_.inflateInit)(this.strm,this.windowBits)}return u(i,[{key:"setInput",value:function(o){o?(this.strm.input=o,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(o){o>this.chunkSize&&(this.chunkSize=o,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=o;var t=(0,_.inflate)(this.strm,0);if(t<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=o)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,_.inflateReset)(this.strm)}}]),i}();D.default=d},18280:function(Xe,D,f){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=p(f(69314));function p(i){return i&&i.__esModule?i:{default:i}}var b={};function h(i,n){if(n===void 0)throw new Error('Undefined keysym for key "'+i+'"');if(i in b)throw new Error('Duplicate entry for key "'+i+'"');b[i]=[n,n,n,n]}function a(i,n,o){if(n===void 0)throw new Error('Undefined keysym for key "'+i+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+i+'"');if(i in b)throw new Error('Duplicate entry for key "'+i+'"');b[i]=[n,n,o,n]}function u(i,n,o){if(n===void 0)throw new Error('Undefined keysym for key "'+i+'"');if(o===void 0)throw new Error('Undefined keysym for key "'+i+'"');if(i in b)throw new Error('Duplicate entry for key "'+i+'"');b[i]=[n,n,n,o]}a("Alt",_.default.XK_Alt_L,_.default.XK_Alt_R),h("AltGraph",_.default.XK_ISO_Level3_Shift),h("CapsLock",_.default.XK_Caps_Lock),a("Control",_.default.XK_Control_L,_.default.XK_Control_R),a("Meta",_.default.XK_Super_L,_.default.XK_Super_R),h("NumLock",_.default.XK_Num_Lock),h("ScrollLock",_.default.XK_Scroll_Lock),a("Shift",_.default.XK_Shift_L,_.default.XK_Shift_R),u("Enter",_.default.XK_Return,_.default.XK_KP_Enter),h("Tab",_.default.XK_Tab),u(" ",_.default.XK_space,_.default.XK_KP_Space),u("ArrowDown",_.default.XK_Down,_.default.XK_KP_Down),u("ArrowUp",_.default.XK_Up,_.default.XK_KP_Up),u("ArrowLeft",_.default.XK_Left,_.default.XK_KP_Left),u("ArrowRight",_.default.XK_Right,_.default.XK_KP_Right),u("End",_.default.XK_End,_.default.XK_KP_End),u("Home",_.default.XK_Home,_.default.XK_KP_Home),u("PageDown",_.default.XK_Next,_.default.XK_KP_Next),u("PageUp",_.default.XK_Prior,_.default.XK_KP_Prior),h("Backspace",_.default.XK_BackSpace),u("Clear",_.default.XK_Clear,_.default.XK_KP_Begin),h("Copy",_.default.XF86XK_Copy),h("Cut",_.default.XF86XK_Cut),u("Delete",_.default.XK_Delete,_.default.XK_KP_Delete),u("Insert",_.default.XK_Insert,_.default.XK_KP_Insert),h("Paste",_.default.XF86XK_Paste),h("Redo",_.default.XK_Redo),h("Undo",_.default.XK_Undo),h("Cancel",_.default.XK_Cancel),h("ContextMenu",_.default.XK_Menu),h("Escape",_.default.XK_Escape),h("Execute",_.default.XK_Execute),h("Find",_.default.XK_Find),h("Help",_.default.XK_Help),h("Pause",_.default.XK_Pause),h("Select",_.default.XK_Select),h("ZoomIn",_.default.XF86XK_ZoomIn),h("ZoomOut",_.default.XF86XK_ZoomOut),h("BrightnessDown",_.default.XF86XK_MonBrightnessDown),h("BrightnessUp",_.default.XF86XK_MonBrightnessUp),h("Eject",_.default.XF86XK_Eject),h("LogOff",_.default.XF86XK_LogOff),h("Power",_.default.XF86XK_PowerOff),h("PowerOff",_.default.XF86XK_PowerDown),h("PrintScreen",_.default.XK_Print),h("Hibernate",_.default.XF86XK_Hibernate),h("Standby",_.default.XF86XK_Standby),h("WakeUp",_.default.XF86XK_WakeUp),h("AllCandidates",_.default.XK_MultipleCandidate),h("Alphanumeric",_.default.XK_Eisu_Shift),h("CodeInput",_.default.XK_Codeinput),h("Compose",_.default.XK_Multi_key),h("Convert",_.default.XK_Henkan),h("GroupFirst",_.default.XK_ISO_First_Group),h("GroupLast",_.default.XK_ISO_Last_Group),h("GroupNext",_.default.XK_ISO_Next_Group),h("GroupPrevious",_.default.XK_ISO_Prev_Group),h("NonConvert",_.default.XK_Muhenkan),h("PreviousCandidate",_.default.XK_PreviousCandidate),h("SingleCandidate",_.default.XK_SingleCandidate),h("HangulMode",_.default.XK_Hangul),h("HanjaMode",_.default.XK_Hangul_Hanja),h("JunjuaMode",_.default.XK_Hangul_Jeonja),h("Eisu",_.default.XK_Eisu_toggle),h("Hankaku",_.default.XK_Hankaku),h("Hiragana",_.default.XK_Hiragana),h("HiraganaKatakana",_.default.XK_Hiragana_Katakana),h("KanaMode",_.default.XK_Kana_Shift),h("KanjiMode",_.default.XK_Kanji),h("Katakana",_.default.XK_Katakana),h("Romaji",_.default.XK_Romaji),h("Zenkaku",_.default.XK_Zenkaku),h("ZenkakuHanaku",_.default.XK_Zenkaku_Hankaku),h("F1",_.default.XK_F1),h("F2",_.default.XK_F2),h("F3",_.default.XK_F3),h("F4",_.default.XK_F4),h("F5",_.default.XK_F5),h("F6",_.default.XK_F6),h("F7",_.default.XK_F7),h("F8",_.default.XK_F8),h("F9",_.default.XK_F9),h("F10",_.default.XK_F10),h("F11",_.default.XK_F11),h("F12",_.default.XK_F12),h("F13",_.default.XK_F13),h("F14",_.default.XK_F14),h("F15",_.default.XK_F15),h("F16",_.default.XK_F16),h("F17",_.default.XK_F17),h("F18",_.default.XK_F18),h("F19",_.default.XK_F19),h("F20",_.default.XK_F20),h("F21",_.default.XK_F21),h("F22",_.default.XK_F22),h("F23",_.default.XK_F23),h("F24",_.default.XK_F24),h("F25",_.default.XK_F25),h("F26",_.default.XK_F26),h("F27",_.default.XK_F27),h("F28",_.default.XK_F28),h("F29",_.default.XK_F29),h("F30",_.default.XK_F30),h("F31",_.default.XK_F31),h("F32",_.default.XK_F32),h("F33",_.default.XK_F33),h("F34",_.default.XK_F34),h("F35",_.default.XK_F35),h("Close",_.default.XF86XK_Close),h("MailForward",_.default.XF86XK_MailForward),h("MailReply",_.default.XF86XK_Reply),h("MailSend",_.default.XF86XK_Send),h("MediaFastForward",_.default.XF86XK_AudioForward),h("MediaPause",_.default.XF86XK_AudioPause),h("MediaPlay",_.default.XF86XK_AudioPlay),h("MediaRecord",_.default.XF86XK_AudioRecord),h("MediaRewind",_.default.XF86XK_AudioRewind),h("MediaStop",_.default.XF86XK_AudioStop),h("MediaTrackNext",_.default.XF86XK_AudioNext),h("MediaTrackPrevious",_.default.XF86XK_AudioPrev),h("New",_.default.XF86XK_New),h("Open",_.default.XF86XK_Open),h("Print",_.default.XK_Print),h("Save",_.default.XF86XK_Save),h("SpellCheck",_.default.XF86XK_Spell),h("AudioVolumeDown",_.default.XF86XK_AudioLowerVolume),h("AudioVolumeUp",_.default.XF86XK_AudioRaiseVolume),h("AudioVolumeMute",_.default.XF86XK_AudioMute),h("MicrophoneVolumeMute",_.default.XF86XK_AudioMicMute),h("LaunchApplication1",_.default.XF86XK_MyComputer),h("LaunchApplication2",_.default.XF86XK_Calculator),h("LaunchCalendar",_.default.XF86XK_Calendar),h("LaunchMail",_.default.XF86XK_Mail),h("LaunchMediaPlayer",_.default.XF86XK_AudioMedia),h("LaunchMusicPlayer",_.default.XF86XK_Music),h("LaunchPhone",_.default.XF86XK_Phone),h("LaunchScreenSaver",_.default.XF86XK_ScreenSaver),h("LaunchSpreadsheet",_.default.XF86XK_Excel),h("LaunchWebBrowser",_.default.XF86XK_WWW),h("LaunchWebCam",_.default.XF86XK_WebCam),h("LaunchWordProcessor",_.default.XF86XK_Word),h("BrowserBack",_.default.XF86XK_Back),h("BrowserFavorites",_.default.XF86XK_Favorites),h("BrowserForward",_.default.XF86XK_Forward),h("BrowserHome",_.default.XF86XK_HomePage),h("BrowserRefresh",_.default.XF86XK_Refresh),h("BrowserSearch",_.default.XF86XK_Search),h("BrowserStop",_.default.XF86XK_Stop),h("Dimmer",_.default.XF86XK_BrightnessAdjust),h("MediaAudioTrack",_.default.XF86XK_AudioCycleTrack),h("RandomToggle",_.default.XF86XK_AudioRandomPlay),h("SplitScreenToggle",_.default.XF86XK_SplitScreen),h("Subtitle",_.default.XF86XK_Subtitle),h("VideoModeNext",_.default.XF86XK_Next_VMode),u("=",_.default.XK_equal,_.default.XK_KP_Equal),u("+",_.default.XK_plus,_.default.XK_KP_Add),u("-",_.default.XK_minus,_.default.XK_KP_Subtract),u("*",_.default.XK_asterisk,_.default.XK_KP_Multiply),u("/",_.default.XK_slash,_.default.XK_KP_Divide),u(".",_.default.XK_period,_.default.XK_KP_Decimal),u(",",_.default.XK_comma,_.default.XK_KP_Separator),u("0",_.default.XK_0,_.default.XK_KP_0),u("1",_.default.XK_1,_.default.XK_KP_1),u("2",_.default.XK_2,_.default.XK_KP_2),u("3",_.default.XK_3,_.default.XK_KP_3),u("4",_.default.XK_4,_.default.XK_KP_4),u("5",_.default.XK_5,_.default.XK_KP_5),u("6",_.default.XK_6,_.default.XK_KP_6),u("7",_.default.XK_7,_.default.XK_KP_7),u("8",_.default.XK_8,_.default.XK_KP_8),u("9",_.default.XK_9,_.default.XK_KP_9);var d=b;D.default=d},15311:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var f={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};D.default=f},91584:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function f(g,m){if(!(g instanceof m))throw new TypeError("Cannot call a class as a function")}function _(g,m){for(var S=0;S<m.length;S++){var k=m[S];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(g,k.key,k)}}function p(g,m,S){return m&&_(g.prototype,m),S&&_(g,S),g}var b=0,h=1,a=2,u=4,d=8,i=16,n=32,o=64,t=127,c=50,e=90,r=250,s=1e3,l=1e3,v=50,y=function(){function g(){f(this,g),this._target=null,this._state=t,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}return p(g,[{key:"attach",value:function(S){this.detach(),this._target=S,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(S){var k;switch(S.stopPropagation(),S.preventDefault(),S.type){case"touchstart":k=this._touchStart;break;case"touchmove":k=this._touchMove;break;case"touchend":case"touchcancel":k=this._touchEnd;break}for(var w=0;w<S.changedTouches.length;w++){var C=S.changedTouches[w];k.call(this,C.identifier,C.clientX,C.clientY)}}},{key:"_touchStart",value:function(S,k,w){if(this._hasDetectedGesture()||this._state===b){this._ignored.push(S);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>r){this._state=b,this._ignored.push(S);return}if(this._waitingRelease){this._state=b,this._ignored.push(S);return}switch(this._tracked.push({id:S,started:Date.now(),active:!0,firstX:k,firstY:w,lastX:k,lastY:w,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(h|d|i),this._stopLongpressTimeout();break;case 3:this._state&=~(a|n|o);break;default:this._state=b}}},{key:"_touchMove",value:function(S,k,w){var C=this._tracked.find(function(q){return q.id===S});if(C!==void 0){C.lastX=k,C.lastY=w;var E=k-C.firstX,T=w-C.firstY;if((C.firstX!==C.lastX||C.firstY!==C.lastY)&&(C.angle=Math.atan2(T,E)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(E,T)<c)return;if(this._state&=~(h|a|u|i),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~d),this._tracked.length!==2&&(this._state&=~(n|o)),this._tracked.length===2){var L=this._tracked.find(function(q){return q.id!==S}),N=Math.hypot(L.firstX-L.lastX,L.firstY-L.lastY);if(N>c){var Z=Math.abs(C.angle-L.angle);Z=Math.abs((Z+180)%360-180),Z>e?this._state&=~n:this._state&=~o,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}}},{key:"_touchEnd",value:function(S,k,w){if(this._ignored.indexOf(S)!==-1){this._ignored.splice(this._ignored.indexOf(S),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=t,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=b),!this._hasDetectedGesture()&&(this._state&=~(d|n|o),this._state&=~i,this._stopLongpressTimeout(),!this._waitingRelease))switch(this._releaseStart=Date.now(),this._waitingRelease=!0,this._tracked.length){case 1:this._state&=~(a|u);break;case 2:this._state&=~(h|u);break}if(this._waitingRelease){Date.now()-this._releaseStart>r&&(this._state=b),this._tracked.some(function(T){return Date.now()-T.started>s})&&(this._state=b);var C=this._tracked.find(function(T){return T.id===S});if(C.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==b)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=b,this._ignored.indexOf(S)!==-1&&this._ignored.splice(this._ignored.indexOf(S),1),this._ignored.length===0&&(this._state=t,this._waitingRelease=!1)}},{key:"_hasDetectedGesture",value:function(){return!(this._state===b||this._state&this._state-1||this._state&(h|a|u)&&this._tracked.some(function(S){return S.active}))}},{key:"_startLongpressTimeout",value:function(){var S=this;this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout(function(){return S._longpressTimeout()},l)}},{key:"_stopLongpressTimeout",value:function(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}},{key:"_longpressTimeout",value:function(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=i,this._pushEvent("gesturestart")}},{key:"_startTwoTouchTimeout",value:function(){var S=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return S._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 S=this._getAverageMovement(),k=Math.abs(S.x),w=Math.abs(S.y),C=this._getAverageDistance(),E=Math.abs(Math.hypot(C.first.x,C.first.y)-Math.hypot(C.last.x,C.last.y));w<E&&k<E?this._state=o:this._state=n,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(S){var k={type:this._stateToGesture(this._state)},w=this._getPosition(),C=w.last;switch(S==="gesturestart"&&(C=w.first),this._state){case n:case o:C=w.first;break}if(k.clientX=C.x,k.clientY=C.y,this._state===o){var E=this._getAverageDistance();S==="gesturestart"?(k.magnitudeX=E.first.x,k.magnitudeY=E.first.y):(k.magnitudeX=E.last.x,k.magnitudeY=E.last.y)}else if(this._state===n)if(S==="gesturestart")k.magnitudeX=0,k.magnitudeY=0;else{var T=this._getAverageMovement();k.magnitudeX=T.x,k.magnitudeY=T.y}var L=new CustomEvent(S,{detail:k});this._target.dispatchEvent(L)}},{key:"_stateToGesture",value:function(S){switch(S){case h:return"onetap";case a:return"twotap";case u:return"threetap";case d:return"drag";case i:return"longpress";case n:return"twodrag";case o:return"pinch"}throw new Error("Unknown gesture state: "+S)}},{key:"_getPosition",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture position, no tracked touches");for(var S=this._tracked.length,k=0,w=0,C=0,E=0,T=0;T<this._tracked.length;T++)k+=this._tracked[T].firstX,w+=this._tracked[T].firstY,C+=this._tracked[T].lastX,E+=this._tracked[T].lastY;return{first:{x:k/S,y:w/S},last:{x:C/S,y:E/S}}}},{key:"_getAverageMovement",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture movement, no tracked touches");var S,k;S=k=0;for(var w=this._tracked.length,C=0;C<this._tracked.length;C++)S+=this._tracked[C].lastX-this._tracked[C].firstX,k+=this._tracked[C].lastY-this._tracked[C].firstY;return{x:S/w,y:k/w}}},{key:"_getAverageDistance",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture distance, no tracked touches");var S=this._tracked[0],k=this._tracked[this._tracked.length-1],w=Math.abs(k.firstX-S.firstX),C=Math.abs(k.firstY-S.firstY),E=Math.abs(k.lastX-S.lastX),T=Math.abs(k.lastY-S.lastY);return{first:{x:w,y:C},last:{x:E,y:T}}}}]),g}();D.default=y},1606:function(Xe,D,f){"use strict";function _(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(l){return typeof l}:_=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_(r)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=n(f(50500)),b=f(79420),h=n(f(50556)),a=d(f(69314)),u=n(f(41895));function d(r){return r&&r.__esModule?r:{default:r}}function i(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return i=function(){return r},r}function n(r){if(r&&r.__esModule)return r;if(r===null||_(r)!=="object"&&typeof r!="function")return{default:r};var s=i();if(s&&s.has(r))return s.get(r);var l={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in r)if(Object.prototype.hasOwnProperty.call(r,y)){var g=v?Object.getOwnPropertyDescriptor(r,y):null;g&&(g.get||g.set)?Object.defineProperty(l,y,g):l[y]=r[y]}return l.default=r,s&&s.set(r,l),l}function o(r,s){if(!(r instanceof s))throw new TypeError("Cannot call a class as a function")}function t(r,s){for(var l=0;l<s.length;l++){var v=s[l];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(r,v.key,v)}}function c(r,s,l){return s&&t(r.prototype,s),l&&t(r,l),r}var e=function(){function r(s){o(this,r),this._target=s||null,this._keyDownList={},this._pendingKey=null,this._altGrArmed=!1,this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),keypress:this._handleKeyPress.bind(this),blur:this._allKeysUp.bind(this),checkalt:this._checkAlt.bind(this)},this.onkeyevent=function(){}}return c(r,[{key:"_sendKeyEvent",value:function(l,v,y){if(y)this._keyDownList[v]=l;else{if(!(v in this._keyDownList))return;delete this._keyDownList[v]}p.Debug("onkeyevent "+(y?"down":"up")+", keysym: "+l,", code: "+v),this.onkeyevent(l,v,y)}},{key:"_getKeyCode",value:function(l){var v=h.getKeycode(l);if(v!=="Unidentified")return v;if(l.keyCode&&l.type!=="keypress"&&l.keyCode!==229)return"Platform"+l.keyCode;if(l.keyIdentifier){if(l.keyIdentifier.substr(0,2)!=="U+")return l.keyIdentifier;var y=parseInt(l.keyIdentifier.substr(2),16),g=String.fromCharCode(y).toUpperCase();return"Platform"+g.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(l){var v=this._getKeyCode(l),y=h.getKeysym(l);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),v==="AltRight"&&l.timeStamp-this._altGrCtrlTime<50?y=a.default.XK_ISO_Level3_Shift:this._sendKeyEvent(a.default.XK_Control_L,"ControlLeft",!0)),v==="Unidentified"){y&&(this._sendKeyEvent(y,v,!0),this._sendKeyEvent(y,v,!1)),(0,b.stopEvent)(l);return}if(u.isMac()||u.isIOS())switch(y){case a.default.XK_Super_L:y=a.default.XK_Alt_L;break;case a.default.XK_Super_R:y=a.default.XK_Super_L;break;case a.default.XK_Alt_L:y=a.default.XK_Mode_switch;break;case a.default.XK_Alt_R:y=a.default.XK_ISO_Level3_Shift;break}if(v in this._keyDownList&&(y=this._keyDownList[v]),(u.isMac()||u.isIOS())&&v==="CapsLock"){this._sendKeyEvent(a.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(a.default.XK_Caps_Lock,"CapsLock",!1),(0,b.stopEvent)(l);return}if(!y&&(!l.key||u.isIE()||u.isEdge())){this._pendingKey=v,setTimeout(this._handleKeyPressTimeout.bind(this),10,l);return}if(this._pendingKey=null,(0,b.stopEvent)(l),v==="ControlLeft"&&u.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=l.timeStamp;return}this._sendKeyEvent(y,v,!0)}},{key:"_handleKeyPress",value:function(l){if((0,b.stopEvent)(l),this._pendingKey!==null){var v=this._getKeyCode(l),y=h.getKeysym(l);if(!(v!=="Unidentified"&&v!=this._pendingKey)){if(v=this._pendingKey,this._pendingKey=null,!y){p.Info("keypress with no keysym:",l);return}this._sendKeyEvent(y,v,!0)}}}},{key:"_handleKeyPressTimeout",value:function(l){if(this._pendingKey!==null){var v,y=this._pendingKey;if(this._pendingKey=null,l.keyCode>=48&&l.keyCode<=57)v=l.keyCode;else if(l.keyCode>=65&&l.keyCode<=90){var g=String.fromCharCode(l.keyCode);l.shiftKey?g=g.toUpperCase():g=g.toLowerCase(),v=g.charCodeAt()}else v=0;this._sendKeyEvent(v,y,!0)}}},{key:"_handleKeyUp",value:function(l){(0,b.stopEvent)(l);var v=this._getKeyCode(l);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(a.default.XK_Control_L,"ControlLeft",!0)),(u.isMac()||u.isIOS())&&v==="CapsLock"){this._sendKeyEvent(a.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(a.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(a.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){p.Debug(">> Keyboard.allKeysUp");for(var l in this._keyDownList)this._sendKeyEvent(this._keyDownList[l],l,!1);p.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(l){if(!l.skipCheckAlt&&!l.altKey){var v=this._target,y=this._keyDownList;["AltLeft","AltRight"].forEach(function(g){if(g in y){var m=new KeyboardEvent("keyup",{key:y[g],code:g});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 l=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(v){return document.addEventListener(v,l,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(u.isWindows()&&u.isFirefox()){var l=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(v){return document.removeEventListener(v,l)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),r}();D.default=e},69314:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var f={XK_VoidSymbol:16777215,XK_BackSpace:65288,XK_Tab:65289,XK_Linefeed:65290,XK_Clear:65291,XK_Return:65293,XK_Pause:65299,XK_Scroll_Lock:65300,XK_Sys_Req:65301,XK_Escape:65307,XK_Delete:65535,XK_Multi_key:65312,XK_Codeinput:65335,XK_SingleCandidate:65340,XK_MultipleCandidate:65341,XK_PreviousCandidate:65342,XK_Kanji:65313,XK_Muhenkan:65314,XK_Henkan_Mode:65315,XK_Henkan:65315,XK_Romaji:65316,XK_Hiragana:65317,XK_Katakana:65318,XK_Hiragana_Katakana:65319,XK_Zenkaku:65320,XK_Hankaku:65321,XK_Zenkaku_Hankaku:65322,XK_Touroku:65323,XK_Massyo:65324,XK_Kana_Lock:65325,XK_Kana_Shift:65326,XK_Eisu_Shift:65327,XK_Eisu_toggle:65328,XK_Kanji_Bangou:65335,XK_Zen_Koho:65341,XK_Mae_Koho:65342,XK_Home:65360,XK_Left:65361,XK_Up:65362,XK_Right:65363,XK_Down:65364,XK_Prior:65365,XK_Page_Up:65365,XK_Next:65366,XK_Page_Down:65366,XK_End:65367,XK_Begin:65368,XK_Select:65376,XK_Print:65377,XK_Execute:65378,XK_Insert:65379,XK_Undo:65381,XK_Redo:65382,XK_Menu:65383,XK_Find:65384,XK_Cancel:65385,XK_Help:65386,XK_Break:65387,XK_Mode_switch:65406,XK_script_switch:65406,XK_Num_Lock:65407,XK_KP_Space:65408,XK_KP_Tab:65417,XK_KP_Enter:65421,XK_KP_F1:65425,XK_KP_F2:65426,XK_KP_F3:65427,XK_KP_F4:65428,XK_KP_Home:65429,XK_KP_Left:65430,XK_KP_Up:65431,XK_KP_Right:65432,XK_KP_Down:65433,XK_KP_Prior:65434,XK_KP_Page_Up:65434,XK_KP_Next:65435,XK_KP_Page_Down:65435,XK_KP_End:65436,XK_KP_Begin:65437,XK_KP_Insert:65438,XK_KP_Delete:65439,XK_KP_Equal:65469,XK_KP_Multiply:65450,XK_KP_Add:65451,XK_KP_Separator:65452,XK_KP_Subtract:65453,XK_KP_Decimal:65454,XK_KP_Divide:65455,XK_KP_0:65456,XK_KP_1:65457,XK_KP_2:65458,XK_KP_3:65459,XK_KP_4:65460,XK_KP_5:65461,XK_KP_6:65462,XK_KP_7:65463,XK_KP_8:65464,XK_KP_9:65465,XK_F1:65470,XK_F2:65471,XK_F3:65472,XK_F4:65473,XK_F5:65474,XK_F6:65475,XK_F7:65476,XK_F8:65477,XK_F9:65478,XK_F10:65479,XK_F11:65480,XK_L1:65480,XK_F12:65481,XK_L2:65481,XK_F13:65482,XK_L3:65482,XK_F14:65483,XK_L4:65483,XK_F15:65484,XK_L5:65484,XK_F16:65485,XK_L6:65485,XK_F17:65486,XK_L7:65486,XK_F18:65487,XK_L8:65487,XK_F19:65488,XK_L9:65488,XK_F20:65489,XK_L10:65489,XK_F21:65490,XK_R1:65490,XK_F22:65491,XK_R2:65491,XK_F23:65492,XK_R3:65492,XK_F24:65493,XK_R4:65493,XK_F25:65494,XK_R5:65494,XK_F26:65495,XK_R6:65495,XK_F27:65496,XK_R7:65496,XK_F28:65497,XK_R8:65497,XK_F29:65498,XK_R9:65498,XK_F30:65499,XK_R10:65499,XK_F31:65500,XK_R11:65500,XK_F32:65501,XK_R12:65501,XK_F33:65502,XK_R13:65502,XK_F34:65503,XK_R14:65503,XK_F35:65504,XK_R15:65504,XK_Shift_L:65505,XK_Shift_R:65506,XK_Control_L:65507,XK_Control_R:65508,XK_Caps_Lock:65509,XK_Shift_Lock:65510,XK_Meta_L:65511,XK_Meta_R:65512,XK_Alt_L:65513,XK_Alt_R:65514,XK_Super_L:65515,XK_Super_R:65516,XK_Hyper_L:65517,XK_Hyper_R:65518,XK_ISO_Level3_Shift:65027,XK_ISO_Next_Group:65032,XK_ISO_Prev_Group:65034,XK_ISO_First_Group:65036,XK_ISO_Last_Group:65038,XK_space:32,XK_exclam:33,XK_quotedbl:34,XK_numbersign:35,XK_dollar:36,XK_percent:37,XK_ampersand:38,XK_apostrophe:39,XK_quoteright:39,XK_parenleft:40,XK_parenright:41,XK_asterisk:42,XK_plus:43,XK_comma:44,XK_minus:45,XK_period:46,XK_slash:47,XK_0:48,XK_1:49,XK_2:50,XK_3:51,XK_4:52,XK_5:53,XK_6:54,XK_7:55,XK_8:56,XK_9:57,XK_colon:58,XK_semicolon:59,XK_less:60,XK_equal:61,XK_greater:62,XK_question:63,XK_at:64,XK_A:65,XK_B:66,XK_C:67,XK_D:68,XK_E:69,XK_F:70,XK_G:71,XK_H:72,XK_I:73,XK_J:74,XK_K:75,XK_L:76,XK_M:77,XK_N:78,XK_O:79,XK_P:80,XK_Q:81,XK_R:82,XK_S:83,XK_T:84,XK_U:85,XK_V:86,XK_W:87,XK_X:88,XK_Y:89,XK_Z:90,XK_bracketleft:91,XK_backslash:92,XK_bracketright:93,XK_asciicircum:94,XK_underscore:95,XK_grave:96,XK_quoteleft:96,XK_a:97,XK_b:98,XK_c:99,XK_d:100,XK_e:101,XK_f:102,XK_g:103,XK_h:104,XK_i:105,XK_j:106,XK_k:107,XK_l:108,XK_m:109,XK_n:110,XK_o:111,XK_p:112,XK_q:113,XK_r:114,XK_s:115,XK_t:116,XK_u:117,XK_v:118,XK_w:119,XK_x:120,XK_y:121,XK_z:122,XK_braceleft:123,XK_bar:124,XK_braceright:125,XK_asciitilde:126,XK_nobreakspace:160,XK_exclamdown:161,XK_cent:162,XK_sterling:163,XK_currency:164,XK_yen:165,XK_brokenbar:166,XK_section:167,XK_diaeresis:168,XK_copyright:169,XK_ordfeminine:170,XK_guillemotleft:171,XK_notsign:172,XK_hyphen:173,XK_registered:174,XK_macron:175,XK_degree:176,XK_plusminus:177,XK_twosuperior:178,XK_threesuperior:179,XK_acute:180,XK_mu:181,XK_paragraph:182,XK_periodcentered:183,XK_cedilla:184,XK_onesuperior:185,XK_masculine:186,XK_guillemotright:187,XK_onequarter:188,XK_onehalf:189,XK_threequarters:190,XK_questiondown:191,XK_Agrave:192,XK_Aacute:193,XK_Acircumflex:194,XK_Atilde:195,XK_Adiaeresis:196,XK_Aring:197,XK_AE:198,XK_Ccedilla:199,XK_Egrave:200,XK_Eacute:201,XK_Ecircumflex:202,XK_Ediaeresis:203,XK_Igrave:204,XK_Iacute:205,XK_Icircumflex:206,XK_Idiaeresis:207,XK_ETH:208,XK_Eth:208,XK_Ntilde:209,XK_Ograve:210,XK_Oacute:211,XK_Ocircumflex:212,XK_Otilde:213,XK_Odiaeresis:214,XK_multiply:215,XK_Oslash:216,XK_Ooblique:216,XK_Ugrave:217,XK_Uacute:218,XK_Ucircumflex:219,XK_Udiaeresis:220,XK_Yacute:221,XK_THORN:222,XK_Thorn:222,XK_ssharp:223,XK_agrave:224,XK_aacute:225,XK_acircumflex:226,XK_atilde:227,XK_adiaeresis:228,XK_aring:229,XK_ae:230,XK_ccedilla:231,XK_egrave:232,XK_eacute:233,XK_ecircumflex:234,XK_ediaeresis:235,XK_igrave:236,XK_iacute:237,XK_icircumflex:238,XK_idiaeresis:239,XK_eth:240,XK_ntilde:241,XK_ograve:242,XK_oacute:243,XK_ocircumflex:244,XK_otilde:245,XK_odiaeresis:246,XK_division:247,XK_oslash:248,XK_ooblique:248,XK_ugrave:249,XK_uacute:250,XK_ucircumflex:251,XK_udiaeresis:252,XK_yacute:253,XK_thorn:254,XK_ydiaeresis:255,XK_Hangul:65329,XK_Hangul_Hanja:65332,XK_Hangul_Jeonja:65336,XF86XK_ModeLock:269025025,XF86XK_MonBrightnessUp:269025026,XF86XK_MonBrightnessDown:269025027,XF86XK_KbdLightOnOff:269025028,XF86XK_KbdBrightnessUp:269025029,XF86XK_KbdBrightnessDown:269025030,XF86XK_Standby:269025040,XF86XK_AudioLowerVolume:269025041,XF86XK_AudioMute:269025042,XF86XK_AudioRaiseVolume:269025043,XF86XK_AudioPlay:269025044,XF86XK_AudioStop:269025045,XF86XK_AudioPrev:269025046,XF86XK_AudioNext:269025047,XF86XK_HomePage:269025048,XF86XK_Mail:269025049,XF86XK_Start:269025050,XF86XK_Search:269025051,XF86XK_AudioRecord:269025052,XF86XK_Calculator:269025053,XF86XK_Memo:269025054,XF86XK_ToDoList:269025055,XF86XK_Calendar:269025056,XF86XK_PowerDown:269025057,XF86XK_ContrastAdjust:269025058,XF86XK_RockerUp:269025059,XF86XK_RockerDown:269025060,XF86XK_RockerEnter:269025061,XF86XK_Back:269025062,XF86XK_Forward:269025063,XF86XK_Stop:269025064,XF86XK_Refresh:269025065,XF86XK_PowerOff:269025066,XF86XK_WakeUp:269025067,XF86XK_Eject:269025068,XF86XK_ScreenSaver:269025069,XF86XK_WWW:269025070,XF86XK_Sleep:269025071,XF86XK_Favorites:269025072,XF86XK_AudioPause:269025073,XF86XK_AudioMedia:269025074,XF86XK_MyComputer:269025075,XF86XK_VendorHome:269025076,XF86XK_LightBulb:269025077,XF86XK_Shop:269025078,XF86XK_History:269025079,XF86XK_OpenURL:269025080,XF86XK_AddFavorite:269025081,XF86XK_HotLinks:269025082,XF86XK_BrightnessAdjust:269025083,XF86XK_Finance:269025084,XF86XK_Community:269025085,XF86XK_AudioRewind:269025086,XF86XK_BackForward:269025087,XF86XK_Launch0:269025088,XF86XK_Launch1:269025089,XF86XK_Launch2:269025090,XF86XK_Launch3:269025091,XF86XK_Launch4:269025092,XF86XK_Launch5:269025093,XF86XK_Launch6:269025094,XF86XK_Launch7:269025095,XF86XK_Launch8:269025096,XF86XK_Launch9:269025097,XF86XK_LaunchA:269025098,XF86XK_LaunchB:269025099,XF86XK_LaunchC:269025100,XF86XK_LaunchD:269025101,XF86XK_LaunchE:269025102,XF86XK_LaunchF:269025103,XF86XK_ApplicationLeft:269025104,XF86XK_ApplicationRight:269025105,XF86XK_Book:269025106,XF86XK_CD:269025107,XF86XK_Calculater:269025108,XF86XK_Clear:269025109,XF86XK_Close:269025110,XF86XK_Copy:269025111,XF86XK_Cut:269025112,XF86XK_Display:269025113,XF86XK_DOS:269025114,XF86XK_Documents:269025115,XF86XK_Excel:269025116,XF86XK_Explorer:269025117,XF86XK_Game:269025118,XF86XK_Go:269025119,XF86XK_iTouch:269025120,XF86XK_LogOff:269025121,XF86XK_Market:269025122,XF86XK_Meeting:269025123,XF86XK_MenuKB:269025125,XF86XK_MenuPB:269025126,XF86XK_MySites:269025127,XF86XK_New:269025128,XF86XK_News:269025129,XF86XK_OfficeHome:269025130,XF86XK_Open:269025131,XF86XK_Option:269025132,XF86XK_Paste:269025133,XF86XK_Phone:269025134,XF86XK_Q:269025136,XF86XK_Reply:269025138,XF86XK_Reload:269025139,XF86XK_RotateWindows:269025140,XF86XK_RotationPB:269025141,XF86XK_RotationKB:269025142,XF86XK_Save:269025143,XF86XK_ScrollUp:269025144,XF86XK_ScrollDown:269025145,XF86XK_ScrollClick:269025146,XF86XK_Send:269025147,XF86XK_Spell:269025148,XF86XK_SplitScreen:269025149,XF86XK_Support:269025150,XF86XK_TaskPane:269025151,XF86XK_Terminal:269025152,XF86XK_Tools:269025153,XF86XK_Travel:269025154,XF86XK_UserPB:269025156,XF86XK_User1KB:269025157,XF86XK_User2KB:269025158,XF86XK_Video:269025159,XF86XK_WheelButton:269025160,XF86XK_Word:269025161,XF86XK_Xfer:269025162,XF86XK_ZoomIn:269025163,XF86XK_ZoomOut:269025164,XF86XK_Away:269025165,XF86XK_Messenger:269025166,XF86XK_WebCam:269025167,XF86XK_MailForward:269025168,XF86XK_Pictures:269025169,XF86XK_Music:269025170,XF86XK_Battery:269025171,XF86XK_Bluetooth:269025172,XF86XK_WLAN:269025173,XF86XK_UWB:269025174,XF86XK_AudioForward:269025175,XF86XK_AudioRepeat:269025176,XF86XK_AudioRandomPlay:269025177,XF86XK_Subtitle:269025178,XF86XK_AudioCycleTrack:269025179,XF86XK_CycleAngle:269025180,XF86XK_FrameBack:269025181,XF86XK_FrameForward:269025182,XF86XK_Time:269025183,XF86XK_Select:269025184,XF86XK_View:269025185,XF86XK_TopMenu:269025186,XF86XK_Red:269025187,XF86XK_Green:269025188,XF86XK_Yellow:269025189,XF86XK_Blue:269025190,XF86XK_Suspend:269025191,XF86XK_Hibernate:269025192,XF86XK_TouchpadToggle:269025193,XF86XK_TouchpadOn:269025200,XF86XK_TouchpadOff:269025201,XF86XK_AudioMicMute:269025202,XF86XK_Switch_VT_1:269024769,XF86XK_Switch_VT_2:269024770,XF86XK_Switch_VT_3:269024771,XF86XK_Switch_VT_4:269024772,XF86XK_Switch_VT_5:269024773,XF86XK_Switch_VT_6:269024774,XF86XK_Switch_VT_7:269024775,XF86XK_Switch_VT_8:269024776,XF86XK_Switch_VT_9:269024777,XF86XK_Switch_VT_10:269024778,XF86XK_Switch_VT_11:269024779,XF86XK_Switch_VT_12:269024780,XF86XK_Ungrab:269024800,XF86XK_ClearGrab:269024801,XF86XK_Next_VMode:269024802,XF86XK_Prev_VMode:269024803,XF86XK_LogWindowTree:269024804,XF86XK_LogGrabInfo:269024805};D.default=f},44836:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var f={256:960,257:992,258:451,259:483,260:417,261:433,262:454,263:486,264:710,265:742,266:709,267:741,268:456,269:488,270:463,271:495,272:464,273:496,274:938,275:954,278:972,279:1004,280:458,281:490,282:460,283:492,284:728,285:760,286:683,287:699,288:725,289:757,290:939,291:955,292:678,293:694,294:673,295:689,296:933,297:949,298:975,299:1007,302:967,303:999,304:681,305:697,308:684,309:700,310:979,311:1011,312:930,313:453,314:485,315:934,316:950,317:421,318:437,321:419,322:435,323:465,324:497,325:977,326:1009,327:466,328:498,330:957,331:959,332:978,333:1010,336:469,337:501,338:5052,339:5053,340:448,341:480,342:931,343:947,344:472,345:504,346:422,347:438,348:734,349:766,350:426,351:442,352:425,353:441,354:478,355:510,356:427,357:443,358:940,359:956,360:989,361:1021,362:990,363:1022,364:733,365:765,366:473,367:505,368:475,369:507,370:985,371:1017,376:5054,377:428,378:444,379:431,380:447,381:430,382:446,402:2294,466:16777681,711:439,728:418,729:511,731:434,733:445,901:1966,902:1953,904:1954,905:1955,906:1956,908:1959,910:1960,911:1963,912:1974,913:1985,914:1986,915:1987,916:1988,917:1989,918:1990,919:1991,920:1992,921:1993,922:1994,923:1995,924:1996,925:1997,926:1998,927:1999,928:2e3,929:2001,931:2002,932:2004,933:2005,934:2006,935:2007,936:2008,937:2009,938:1957,939:1961,940:1969,941:1970,942:1971,943:1972,944:1978,945:2017,946:2018,947:2019,948:2020,949:2021,950:2022,951:2023,952:2024,953:2025,954:2026,955:2027,956:2028,957:2029,958:2030,959:2031,960:2032,961:2033,962:2035,963:2034,964:2036,965:2037,966:2038,967:2039,968:2040,969:2041,970:1973,971:1977,972:1975,973:1976,974:1979,1025:1715,1026:1713,1027:1714,1028:1716,1029:1717,1030:1718,1031:1719,1032:1720,1033:1721,1034:1722,1035:1723,1036:1724,1038:1726,1039:1727,1040:1761,1041:1762,1042:1783,1043:1767,1044:1764,1045:1765,1046:1782,1047:1786,1048:1769,1049:1770,1050:1771,1051:1772,1052:1773,1053:1774,1054:1775,1055:1776,1056:1778,1057:1779,1058:1780,1059:1781,1060:1766,1061:1768,1062:1763,1063:1790,1064:1787,1065:1789,1066:1791,1067:1785,1068:1784,1069:1788,1070:1760,1071:1777,1072:1729,1073:1730,1074:1751,1075:1735,1076:1732,1077:1733,1078:1750,1079:1754,1080:1737,1081:1738,1082:1739,1083:1740,1084:1741,1085:1742,1086:1743,1087:1744,1088:1746,1089:1747,1090:1748,1091:1749,1092:1734,1093:1736,1094:1731,1095:1758,1096:1755,1097:1757,1098:1759,1099:1753,1100:1752,1101:1756,1102:1728,1103:1745,1105:1699,1106:1697,1107:1698,1108:1700,1109:1701,1110:1702,1111:1703,1112:1704,1113:1705,1114:1706,1115:1707,1116:1708,1118:1710,1119:1711,1168:1725,1169:1709,1488:3296,1489:3297,1490:3298,1491:3299,1492:3300,1493:3301,1494:3302,1495:3303,1496:3304,1497:3305,1498:3306,1499:3307,1500:3308,1501:3309,1502:3310,1503:3311,1504:3312,1505:3313,1506:3314,1507:3315,1508:3316,1509:3317,1510:3318,1511:3319,1512:3320,1513:3321,1514:3322,1548:1452,1563:1467,1567:1471,1569:1473,1570:1474,1571:1475,1572:1476,1573:1477,1574:1478,1575:1479,1576:1480,1577:1481,1578:1482,1579:1483,1580:1484,1581:1485,1582:1486,1583:1487,1584:1488,1585:1489,1586:1490,1587:1491,1588:1492,1589:1493,1590:1494,1591:1495,1592:1496,1593:1497,1594:1498,1600:1504,1601:1505,1602:1506,1603:1507,1604:1508,1605:1509,1606:1510,1607:1511,1608:1512,1609:1513,1610:1514,1611:1515,1612:1516,1613:1517,1614:1518,1615:1519,1616:1520,1617:1521,1618:1522,3585:3489,3586:3490,3587:3491,3588:3492,3589:3493,3590:3494,3591:3495,3592:3496,3593:3497,3594:3498,3595:3499,3596:3500,3597:3501,3598:3502,3599:3503,3600:3504,3601:3505,3602:3506,3603:3507,3604:3508,3605:3509,3606:3510,3607:3511,3608:3512,3609:3513,3610:3514,3611:3515,3612:3516,3613:3517,3614:3518,3615:3519,3616:3520,3617:3521,3618:3522,3619:3523,3620:3524,3621:3525,3622:3526,3623:3527,3624:3528,3625:3529,3626:3530,3627:3531,3628:3532,3629:3533,3630:3534,3631:3535,3632:3536,3633:3537,3634:3538,3635:3539,3636:3540,3637:3541,3638:3542,3639:3543,3640:3544,3641:3545,3642:3546,3647:3551,3648:3552,3649:3553,3650:3554,3651:3555,3652:3556,3653:3557,3654:3558,3655:3559,3656:3560,3657:3561,3658:3562,3659:3563,3660:3564,3661:3565,3664:3568,3665:3569,3666:3570,3667:3571,3668:3572,3669:3573,3670:3574,3671:3575,3672:3576,3673:3577,8194:2722,8195:2721,8196:2723,8197:2724,8199:2725,8200:2726,8201:2727,8202:2728,8210:2747,8211:2730,8212:2729,8213:1967,8215:3295,8216:2768,8217:2769,8218:2813,8220:2770,8221:2771,8222:2814,8224:2801,8225:2802,8226:2790,8229:2735,8230:2734,8240:2773,8242:2774,8243:2775,8248:2812,8254:1150,8361:3839,8364:8364,8453:2744,8470:1712,8471:2811,8478:2772,8482:2761,8531:2736,8532:2737,8533:2738,8534:2739,8535:2740,8536:2741,8537:2742,8538:2743,8539:2755,8540:2756,8541:2757,8542:2758,8592:2299,8593:2300,8594:2301,8595:2302,8658:2254,8660:2253,8706:2287,8711:2245,8728:3018,8730:2262,8733:2241,8734:2242,8743:2270,8744:2271,8745:2268,8746:2269,8747:2239,8756:2240,8764:2248,8771:2249,8773:16785992,8800:2237,8801:2255,8804:2236,8805:2238,8834:2266,8835:2267,8866:3068,8867:3036,8868:3010,8869:3022,8968:3027,8970:3012,8981:2810,8992:2212,8993:2213,9109:3020,9115:2219,9117:2220,9118:2221,9120:2222,9121:2215,9123:2216,9124:2217,9126:2218,9128:2223,9132:2224,9143:2209,9146:2543,9147:2544,9148:2546,9149:2547,9225:2530,9226:2533,9227:2537,9228:2531,9229:2532,9251:2732,9252:2536,9472:2211,9474:2214,9484:2210,9488:2539,9492:2541,9496:2538,9500:2548,9508:2549,9516:2551,9524:2550,9532:2542,9618:2529,9642:2791,9643:2785,9644:2779,9645:2786,9646:2783,9647:2767,9650:2792,9651:2787,9654:2781,9655:2765,9660:2793,9661:2788,9664:2780,9665:2764,9670:2528,9675:2766,9679:2782,9702:2784,9734:2789,9742:2809,9747:2762,9756:2794,9758:2795,9792:2808,9794:2807,9827:2796,9829:2798,9830:2797,9837:2806,9839:2805,10003:2803,10007:2804,10013:2777,10016:2800,10216:2748,10217:2750,12289:1188,12290:1185,12300:1186,12301:1187,12443:1246,12444:1247,12449:1191,12450:1201,12451:1192,12452:1202,12453:1193,12454:1203,12455:1194,12456:1204,12457:1195,12458:1205,12459:1206,12461:1207,12463:1208,12465:1209,12467:1210,12469:1211,12471:1212,12473:1213,12475:1214,12477:1215,12479:1216,12481:1217,12483:1199,12484:1218,12486:1219,12488:1220,12490:1221,12491:1222,12492:1223,12493:1224,12494:1225,12495:1226,12498:1227,12501:1228,12504:1229,12507:1230,12510:1231,12511:1232,12512:1233,12513:1234,12514:1235,12515:1196,12516:1236,12517:1197,12518:1237,12519:1198,12520:1238,12521:1239,12522:1240,12523:1241,12524:1242,12525:1243,12527:1244,12530:1190,12531:1245,12539:1189,12540:1200},_={lookup:function(b){if(b>=32&&b<=255)return b;var h=f[b];return h!==void 0?h:16777216|b}};D.default=_},50556:function(Xe,D,f){"use strict";function _(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(l){return typeof l}:_=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_(r)}Object.defineProperty(D,"__esModule",{value:!0}),D.getKeycode=t,D.getKey=c,D.getKeysym=e;var p=o(f(69314)),b=o(f(44836)),h=o(f(88193)),a=o(f(15311)),u=o(f(18280)),d=n(f(41895));function i(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return i=function(){return r},r}function n(r){if(r&&r.__esModule)return r;if(r===null||_(r)!=="object"&&typeof r!="function")return{default:r};var s=i();if(s&&s.has(r))return s.get(r);var l={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in r)if(Object.prototype.hasOwnProperty.call(r,y)){var g=v?Object.getOwnPropertyDescriptor(r,y):null;g&&(g.get||g.set)?Object.defineProperty(l,y,g):l[y]=r[y]}return l.default=r,s&&s.set(r,l),l}function o(r){return r&&r.__esModule?r:{default:r}}function t(r){if(r.code){switch(r.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return r.code}if(r.type!=="keypress"&&r.keyCode in h.default){var s=h.default[r.keyCode];if(d.isMac()&&s==="ContextMenu"&&(s="MetaRight"),r.location===2)switch(s){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(r.location===3)switch(s){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return s}return"Unidentified"}function c(r){if(r.key!==void 0){switch(r.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 r.char}switch(r.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(r.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(r.key==="\0"&&r.code==="NumpadDecimal")return"Delete";if(!d.isIE()&&!d.isEdge()||r.key.length!==1&&r.key!=="Unidentified")return r.key}var s=t(r);return s in a.default?a.default[s]:r.charCode?String.fromCharCode(r.charCode):"Unidentified"}function e(r){var s=c(r);if(s==="Unidentified")return null;if(s in u.default){var l=r.location;if(s==="Meta"&&l===0&&(l=2),s==="Clear"&&l===3){var v=t(r);v==="NumLock"&&(l=0)}if((l===void 0||l>3)&&(l=0),s==="Meta"){var y=t(r);if(y==="AltLeft")return p.default.XK_Meta_L;if(y==="AltRight")return p.default.XK_Meta_R}if(s==="Clear"){var g=t(r);if(g==="NumLock")return p.default.XK_Num_Lock}return u.default[s][l]}if(s.length!==1)return null;var m=s.charCodeAt();return m?b.default.lookup(m):null}},88193:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var f={8:"Backspace",9:"Tab",10:"NumpadClear",12:"Numpad5",13:"Enter",16:"ShiftLeft",17:"ControlLeft",18:"AltLeft",19:"Pause",20:"CapsLock",21:"Lang1",25:"Lang2",27:"Escape",28:"Convert",29:"NonConvert",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",44:"PrintScreen",45:"Insert",46:"Delete",47:"Help",48:"Digit0",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",91:"MetaLeft",92:"MetaRight",93:"ContextMenu",95:"Sleep",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",108:"NumpadDecimal",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",124:"F13",125:"F14",126:"F15",127:"F16",128:"F17",129:"F18",130:"F19",131:"F20",132:"F21",133:"F22",134:"F23",135:"F24",144:"NumLock",145:"ScrollLock",166:"BrowserBack",167:"BrowserForward",168:"BrowserRefresh",169:"BrowserStop",170:"BrowserSearch",171:"BrowserFavorites",172:"BrowserHome",173:"AudioVolumeMute",174:"AudioVolumeDown",175:"AudioVolumeUp",176:"MediaTrackNext",177:"MediaTrackPrevious",178:"MediaStop",179:"MediaPlayPause",180:"LaunchMail",181:"MediaSelect",182:"LaunchApp1",183:"LaunchApp2",225:"AltRight"};D.default=f},87619:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var f={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};D.default=f},62013:function(Xe,D,f){"use strict";var _;_={value:!0},D.Z=void 0;var p=f(20860),b=N(f(50500)),h=f(31516),a=f(41895),u=f(92742),d=f(79420),i=T(f(5004)),n=T(f(22814)),o=T(f(48831)),t=T(f(17834)),c=T(f(1606)),e=T(f(91584)),r=T(f(54641)),s=T(f(16327)),l=T(f(64966)),v=T(f(69314)),y=T(f(87619)),g=f(31729);f(21882);var m=T(f(11231)),S=T(f(17852)),k=T(f(57507)),w=T(f(18330)),C=T(f(21330)),E=T(f(91649));function T(pe){return pe&&pe.__esModule?pe:{default:pe}}function L(){if(typeof WeakMap!="function")return null;var pe=new WeakMap;return L=function(){return pe},pe}function N(pe){if(pe&&pe.__esModule)return pe;if(pe===null||Z(pe)!=="object"&&typeof pe!="function")return{default:pe};var ne=L();if(ne&&ne.has(pe))return ne.get(pe);var le={},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in pe)if(Object.prototype.hasOwnProperty.call(pe,R)){var I=Q?Object.getOwnPropertyDescriptor(pe,R):null;I&&(I.get||I.set)?Object.defineProperty(le,R,I):le[R]=pe[R]}return le.default=pe,ne&&ne.set(pe,le),le}function Z(pe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z=function(le){return typeof le}:Z=function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},Z(pe)}function q(pe,ne){if(!(pe instanceof ne))throw new TypeError("Cannot call a class as a function")}function H(pe,ne){for(var le=0;le<ne.length;le++){var Q=ne[le];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(pe,Q.key,Q)}}function z(pe,ne,le){return ne&&H(pe.prototype,ne),le&&H(pe,le),pe}function A(pe,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function");pe.prototype=Object.create(ne&&ne.prototype,{constructor:{value:pe,writable:!0,configurable:!0}}),ne&&O(pe,ne)}function O(pe,ne){return O=Object.setPrototypeOf||function(Q,R){return Q.__proto__=R,Q},O(pe,ne)}function X(pe){var ne=Y();return function(){var Q=ue(pe),R;if(ne){var I=ue(this).constructor;R=Reflect.construct(Q,arguments,I)}else R=Q.apply(this,arguments);return U(this,R)}}function U(pe,ne){return ne&&(Z(ne)==="object"||typeof ne=="function")?ne:B(pe)}function B(pe){if(pe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return pe}function Y(){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(pe){return!1}}function ue(pe){return ue=Object.setPrototypeOf?Object.getPrototypeOf:function(le){return le.__proto__||Object.getPrototypeOf(le)},ue(pe)}var me=3,De="rgb(40, 40, 40)",Te=17,oe=50,be=19,Fe=75,Re=50,Me=1e3,Le=50,Oe=1,Ne=null,Ie=null,ie=null,ce=null,re=1<<24,ve=1<<25,V=1<<26,J=1<<27,xe=1<<28,Se=function(pe){A(le,pe);var ne=X(le);function le(Q,R,I){var F;if(q(this,le),!Q)throw new Error("Must specify target");if(!R)throw new Error("Must specify URL");F=ne.call(this),F._target=Q,F._url=R,I=I||{},F._rfbCredentials=I.credentials||{},F._shared="shared"in I?!!I.shared:!0,F._repeaterID=I.repeaterID||"",F._wsProtocols=I.wsProtocols||[],F._rfbConnectionState="",F._rfbInitState="",F._rfbAuthScheme=-1,F._rfbCleanDisconnect=!0,F._rfbVersion=0,F._rfbMaxVersion=3.8,F._rfbTightVNC=!1,F._rfbVeNCryptState=0,F._rfbXvpVer=0,F._fbWidth=0,F._fbHeight=0,F._fbName="",F._capabilities={power:!1},F._supportsFence=!1,F._supportsContinuousUpdates=!1,F._enabledContinuousUpdates=!1,F._supportsSetDesktopSize=!1,F._screenID=0,F._screenFlags=0,F._qemuExtKeyEventSupported=!1,F._clipboardText=null,F._clipboardServerCapabilitiesActions={},F._clipboardServerCapabilitiesFormats={},F._sock=null,F._display=null,F._flushing=!1,F._keyboard=null,F._gestures=null,F._disconnTimer=null,F._resizeTimeout=null,F._mouseMoveTimer=null,F._decoders={},F._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},F._mousePos={},F._mouseButtonMask=0,F._mouseLastMoveTime=0,F._viewportDragging=!1,F._viewportDragPos={},F._viewportHasMoved=!1,F._accumulatedWheelDeltaX=0,F._accumulatedWheelDeltaY=0,F._gestureLastTapTime=null,F._gestureFirstDoubleTapEv=null,F._gestureLastMagnitudeX=0,F._gestureLastMagnitudeY=0,F._eventHandlers={focusCanvas:F._focusCanvas.bind(B(F)),windowResize:F._windowResize.bind(B(F)),handleMouse:F._handleMouse.bind(B(F)),handleWheel:F._handleWheel.bind(B(F)),handleGesture:F._handleGesture.bind(B(F))},b.Debug(">> RFB.constructor"),F._screen=document.createElement("div"),F._screen.style.display="flex",F._screen.style.width="100%",F._screen.style.height="100%",F._screen.style.overflow="auto",F._screen.style.background=De,F._canvas=document.createElement("canvas"),F._canvas.style.margin="auto",F._canvas.style.outline="none",F._canvas.style.flexShrink="0",F._canvas.width=0,F._canvas.height=0,F._canvas.tabIndex=-1,F._screen.appendChild(F._canvas),F._cursor=new r.default,F._cursorImage=le.cursors.none,F._decoders[g.encodings.encodingRaw]=new m.default,F._decoders[g.encodings.encodingCopyRect]=new S.default,F._decoders[g.encodings.encodingRRE]=new k.default,F._decoders[g.encodings.encodingHextile]=new w.default,F._decoders[g.encodings.encodingTight]=new C.default,F._decoders[g.encodings.encodingTightPNG]=new E.default;try{F._display=new n.default(F._canvas)}catch(G){throw b.Error("Display exception: "+G),G}return F._display.onflush=F._onFlush.bind(B(F)),F._keyboard=new c.default(F._canvas),F._keyboard.onkeyevent=F._handleKeyEvent.bind(B(F)),F._gestures=new e.default,F._sock=new s.default,F._sock.on("message",function(){F._handleMessage()}),F._sock.on("open",function(){F._rfbConnectionState==="connecting"&&F._rfbInitState===""?(F._rfbInitState="ProtocolVersion",b.Debug("Starting VNC handshake")):F._fail("Unexpected server connection while "+F._rfbConnectionState)}),F._sock.on("close",function(G){b.Debug("WebSocket on-close event");var _e="";switch(G.code&&(_e="(code: "+G.code,G.reason&&(_e+=", reason: "+G.reason),_e+=")"),F._rfbConnectionState){case"connecting":F._fail("Connection closed "+_e);break;case"connected":F._updateConnectionState("disconnecting"),F._updateConnectionState("disconnected");break;case"disconnecting":F._updateConnectionState("disconnected");break;case"disconnected":F._fail("Unexpected server disconnect when already disconnected "+_e);break;default:F._fail("Unexpected server disconnect before connecting "+_e);break}F._sock.off("close")}),F._sock.on("error",function(G){return b.Warn("WebSocket on-error event")}),setTimeout(F._updateConnectionState.bind(B(F),"connecting")),b.Debug("<< RFB.constructor"),F.dragViewport=!1,F.focusOnClick=!0,F._viewOnly=!1,F._clipViewport=!1,F._scaleViewport=!1,F._resizeSession=!1,F._showDotCursor=!1,I.showDotCursor!==void 0&&(b.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),F._showDotCursor=I.showDotCursor),F._qualityLevel=6,F._compressionLevel=2,F}return z(le,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(R){this._rfbCredentials=R,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){this._rfbConnectionState!=="connected"||this._viewOnly||(b.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(R,I,F){if(!(this._rfbConnectionState!=="connected"||this._viewOnly)){if(F===void 0){this.sendKey(R,I,!0),this.sendKey(R,I,!1);return}var G=y.default[I];if(this._qemuExtKeyEventSupported&&G)R=R||0,b.Info("Sending key ("+(F?"down":"up")+"): keysym "+R+", scancode "+G),le.messages.QEMUExtendedKeyEvent(this._sock,R,F,G);else{if(!R)return;b.Info("Sending keysym ("+(F?"down":"up")+"): "+R),le.messages.keyEvent(this._sock,R,F?1:0)}}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(R){if(!(this._rfbConnectionState!=="connected"||this._viewOnly))if(this._clipboardServerCapabilitiesFormats[Oe]&&this._clipboardServerCapabilitiesActions[J])this._clipboardText=R,le.messages.extendedClipboardNotify(this._sock,[Oe]);else{for(var I=new Uint8Array(R.length),F=0;F<R.length;F++)I[F]=R.charCodeAt(F);le.messages.clientCutText(this._sock,I)}}},{key:"_connect",value:function(){b.Debug(">> RFB.connect"),b.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(R){R.name==="SyntaxError"?this._fail("Invalid host or port ("+R+")"):this._fail("Error when opening socket ("+R+")")}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),b.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){b.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(R){if(R.name!=="NotFoundError")throw R}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),b.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(R){this.focusOnClick&&this.focus()}},{key:"_setDesktopName",value:function(R){this._fbName=R,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(R){var I=this;window.requestAnimationFrame(function(){I._updateClip(),I._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var R=this._display.clipViewport,I=this._clipViewport;if(this._scaleViewport&&(I=!1),R!==I&&(this._display.clipViewport=I),I){var F=this._screenSize();this._display.viewportChangeSize(F.w,F.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var R=this._screenSize();this._display.autoscale(R.w,R.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!(!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)){var R=this._screenSize();le.messages.setDesktopSize(this._sock,Math.floor(R.w),Math.floor(R.h),this._screenID,this._screenFlags),b.Debug("Requested new desktop size: "+R.w+"x"+R.h)}}},{key:"_screenSize",value:function(){var R=this._screen.getBoundingClientRect();return{w:R.width,h:R.height}}},{key:"_fixScrollbars",value:function(){var R=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=R}},{key:"_updateConnectionState",value:function(R){var I=this,F=this._rfbConnectionState;if(R===F){b.Debug("Already in state '"+R+"', ignoring");return}if(F==="disconnected"){b.Error("Tried changing state of a disconnected RFB object");return}switch(R){case"connected":if(F!=="connecting"){b.Error("Bad transition to connected state, previous connection state: "+F);return}break;case"disconnected":if(F!=="disconnecting"){b.Error("Bad transition to disconnected state, previous connection state: "+F);return}break;case"connecting":if(F!==""){b.Error("Bad transition to connecting state, previous connection state: "+F);return}break;case"disconnecting":if(F!=="connected"&&F!=="connecting"){b.Error("Bad transition to disconnecting state, previous connection state: "+F);return}break;default:b.Error("Unknown connection state: "+R);return}switch(this._rfbConnectionState=R,b.Debug("New state '"+R+"', was '"+F+"'."),this._disconnTimer&&R!=="disconnecting"&&(b.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close")),R){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){b.Error("Disconnection timed out."),I._updateConnectionState("disconnected")},me*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(R){switch(this._rfbConnectionState){case"disconnecting":b.Error("Failed when disconnecting: "+R);break;case"connected":b.Error("Failed while connected: "+R);break;case"connecting":b.Error("Failed when connecting: "+R);break;default:b.Error("RFB failure: "+R);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(R,I){this._capabilities[R]=I,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){b.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":b.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(R,I,F){this.sendKey(R,I,F)}},{key:"_handleMouse",value:function(R){if(!(R.type==="click"&&R.target!==this._canvas)&&(R.stopPropagation(),R.preventDefault(),!(R.type==="click"||R.type==="contextmenu"))){var I=(0,u.clientToElement)(R.clientX,R.clientY,this._canvas);switch(R.type){case"mousedown":(0,d.setCapture)(this._canvas),this._handleMouseButton(I.x,I.y,!0,1<<R.button);break;case"mouseup":this._handleMouseButton(I.x,I.y,!1,1<<R.button);break;case"mousemove":this._handleMouseMove(I.x,I.y);break}}}},{key:"_handleMouseButton",value:function(R,I,F,G){if(this.dragViewport)if(F&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:R,y:I},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(R,I,G)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(R,I,this._mouseButtonMask)),F?this._mouseButtonMask|=G:this._mouseButtonMask&=~G,this._sendMouse(R,I,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(R,I){var F=this;if(this._viewportDragging){var G=this._viewportDragPos.x-R,_e=this._viewportDragPos.y-I;(this._viewportHasMoved||Math.abs(G)>a.dragThreshold||Math.abs(_e)>a.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:R,y:I},this._display.viewportChangePos(G,_e));return}if(this._mousePos={x:R,y:I},this._mouseMoveTimer==null){var ye=Date.now()-this._mouseLastMoveTime;ye>Te?(this._sendMouse(R,I,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){F._handleDelayedMouseMove()},Te-ye)}}},{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(R,I,F){this._rfbConnectionState==="connected"&&(this._viewOnly||le.messages.pointerEvent(this._sock,this._display.absX(R),this._display.absY(I),F))}},{key:"_handleWheel",value:function(R){if(this._rfbConnectionState==="connected"&&!this._viewOnly){R.stopPropagation(),R.preventDefault();var I=(0,u.clientToElement)(R.clientX,R.clientY,this._canvas),F=R.deltaX,G=R.deltaY;R.deltaMode!==0&&(F*=be,G*=be),this._accumulatedWheelDeltaX+=F,this._accumulatedWheelDeltaY+=G,Math.abs(this._accumulatedWheelDeltaX)>=oe&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(I.x,I.y,!0,32),this._handleMouseButton(I.x,I.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(I.x,I.y,!0,64),this._handleMouseButton(I.x,I.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=oe&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(I.x,I.y,!0,8),this._handleMouseButton(I.x,I.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(I.x,I.y,!0,16),this._handleMouseButton(I.x,I.y,!1,16)),this._accumulatedWheelDeltaY=0)}}},{key:"_fakeMouseMove",value:function(R,I,F){this._handleMouseMove(I,F),this._cursor.move(R.detail.clientX,R.detail.clientY)}},{key:"_handleTapEvent",value:function(R,I){var F=(0,u.clientToElement)(R.detail.clientX,R.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<Me&&this._gestureFirstDoubleTapEv.detail.type===R.detail.type){var G=this._gestureFirstDoubleTapEv.detail.clientX-R.detail.clientX,_e=this._gestureFirstDoubleTapEv.detail.clientY-R.detail.clientY,ye=Math.hypot(G,_e);ye<Le?F=(0,u.clientToElement)(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=R}else this._gestureFirstDoubleTapEv=R;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,F.x,F.y),this._handleMouseButton(F.x,F.y,!0,I),this._handleMouseButton(F.x,F.y,!1,I)}},{key:"_handleGesture",value:function(R){var I,F=(0,u.clientToElement)(R.detail.clientX,R.detail.clientY,this._canvas);switch(R.type){case"gesturestart":switch(R.detail.type){case"onetap":this._handleTapEvent(R,1);break;case"twotap":this._handleTapEvent(R,4);break;case"threetap":this._handleTapEvent(R,2);break;case"drag":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!0,1);break;case"longpress":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=R.detail.magnitudeX,this._gestureLastMagnitudeY=R.detail.magnitudeY,this._fakeMouseMove(R,F.x,F.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(R.detail.magnitudeX,R.detail.magnitudeY),this._fakeMouseMove(R,F.x,F.y);break}break;case"gesturemove":switch(R.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(R,F.x,F.y);break;case"twodrag":for(this._fakeMouseMove(R,F.x,F.y);R.detail.magnitudeY-this._gestureLastMagnitudeY>Re;)this._handleMouseButton(F.x,F.y,!0,8),this._handleMouseButton(F.x,F.y,!1,8),this._gestureLastMagnitudeY+=Re;for(;R.detail.magnitudeY-this._gestureLastMagnitudeY<-Re;)this._handleMouseButton(F.x,F.y,!0,16),this._handleMouseButton(F.x,F.y,!1,16),this._gestureLastMagnitudeY-=Re;for(;R.detail.magnitudeX-this._gestureLastMagnitudeX>Re;)this._handleMouseButton(F.x,F.y,!0,32),this._handleMouseButton(F.x,F.y,!1,32),this._gestureLastMagnitudeX+=Re;for(;R.detail.magnitudeX-this._gestureLastMagnitudeX<-Re;)this._handleMouseButton(F.x,F.y,!0,64),this._handleMouseButton(F.x,F.y,!1,64),this._gestureLastMagnitudeX-=Re;break;case"pinch":if(this._fakeMouseMove(R,F.x,F.y),I=Math.hypot(R.detail.magnitudeX,R.detail.magnitudeY),Math.abs(I-this._gestureLastMagnitudeX)>Fe){for(this._handleKeyEvent(v.default.XK_Control_L,"ControlLeft",!0);I-this._gestureLastMagnitudeX>Fe;)this._handleMouseButton(F.x,F.y,!0,8),this._handleMouseButton(F.x,F.y,!1,8),this._gestureLastMagnitudeX+=Fe;for(;I-this._gestureLastMagnitudeX<-Fe;)this._handleMouseButton(F.x,F.y,!0,16),this._handleMouseButton(F.x,F.y,!1,16),this._gestureLastMagnitudeX-=Fe}this._handleKeyEvent(v.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(R.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!1,1);break;case"longpress":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var R=this._sock.rQshiftStr(12).substr(4,7);b.Info("Server ProtocolVersion: "+R);var I=0;switch(R){case"000.000":I=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 "+R)}if(I){for(var F="ID:"+this._repeaterID;F.length<250;)F+="\0";return this._sock.sendString(F),!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+`
`),b.Debug("Sent ProtocolVersion: "+G),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function R(G,_e){for(var ye=0;ye<_e.length;ye++)if(_e[ye]===G)return!0;return!1}if(this._rfbVersion>=3.7){var I=this._sock.rQshift8();if(this._sock.rQwait("security type",I,1))return!1;if(I===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var F=this._sock.rQshiftBytes(I);if(b.Debug("Server security types: "+F),R(1,F))this._rfbAuthScheme=1;else if(R(22,F))this._rfbAuthScheme=22;else if(R(16,F))this._rfbAuthScheme=16;else if(R(2,F))this._rfbAuthScheme=2;else if(R(19,F))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+F+")");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",b.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var R=this._sock.rQshift32(),I="";if(R>0){if(this._sock.rQwait("reason",R,4))return!1;I=this._sock.rQshiftStr(R)}return I!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:I}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+I+")")):(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 R=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(R),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var R=this._sock.rQshift8(),I=this._sock.rQshift8();if(!(R==0&&I==2))return this._fail("Unsupported VeNCrypt version "+R+"."+I);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var F=this._sock.rQshift8();if(F!=0)return this._fail("VeNCrypt failure "+F);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 _e=[],ye=0;ye<this._rfbVeNCryptSubtypesLength;ye++)_e.push(this._sock.rQshift32());if(_e.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 ke=(0,h.encodeUTF8)(this._rfbCredentials.username),M=(0,h.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,ke.length]),this._sock.send([0,0,0,M.length]),this._sock.sendString(ke),this._sock.sendString(M),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 R=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),I=le.genDES(this._rfbCredentials.password,R);return this._sock.send(I),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(R){for(var I={0:{vendor:"TGHT",signature:"NOTUNNEL"}},F={},G=0;G<R;G++){var _e=this._sock.rQshift32(),ye=this._sock.rQshiftStr(4),ke=this._sock.rQshiftStr(8);F[_e]={vendor:ye,signature:ke}}return b.Debug("Server Tight tunnel types: "+F),F[1]&&F[1].vendor==="SICR"&&F[1].signature==="SCHANNEL"&&(b.Debug("Detected Siemens server. Assuming NOTUNNEL support."),F[0]={vendor:"TGHT",signature:"NOTUNNEL"}),F[0]?F[0].vendor!=I[0].vendor||F[0].signature!=I[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(b.Debug("Selected tunnel type: "+I[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 R=this._sock.rQshift32();if(R>0&&this._sock.rQwait("tunnel capabilities",16*R,4))return!1;if(this._rfbTightVNC=!0,R>0)return this._negotiateTightTunnels(R),!1}if(this._sock.rQwait("sub auth count",4))return!1;var I=this._sock.rQshift32();if(I===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*I,4))return!1;for(var F={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},G=[],_e=0;_e<I;_e++){this._sock.rQshift32();var ye=this._sock.rQshiftStr(12);G.push(ye)}b.Debug("Server Tight authentication types: "+G);for(var ke in F)if(G.indexOf(ke)!=-1)switch(this._sock.send([0,0,0,F[ke]]),b.Debug("Selected authentication type: "+ke),ke){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: "+ke+")")}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 R=this._sock.rQshift32();return R===0?(this._rfbInitState="ClientInitialisation",b.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=R,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:R}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var R=this._sock.rQshift16(),I=this._sock.rQshift16(),F=this._sock.rQshift8(),G=this._sock.rQshift8(),_e=this._sock.rQshift8(),ye=this._sock.rQshift8(),ke=this._sock.rQshift16(),M=this._sock.rQshift16(),se=this._sock.rQshift16(),ae=this._sock.rQshift8(),de=this._sock.rQshift8(),we=this._sock.rQshift8();this._sock.rQskipBytes(3);var ge=this._sock.rQshift32();if(this._sock.rQwait("server init name",ge,24))return!1;var j=this._sock.rQshiftStr(ge);if(j=(0,h.decodeUTF8)(j,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+ge))return!1;var fe=this._sock.rQshift16(),P=this._sock.rQshift16(),he=this._sock.rQshift16();this._sock.rQskipBytes(2);var Ee=(fe+P+he)*16;if(this._sock.rQwait("TightVNC extended server init header",Ee,32+ge))return!1;this._sock.rQskipBytes(16*fe),this._sock.rQskipBytes(16*P),this._sock.rQskipBytes(16*he)}return b.Info("Screen: "+R+"x"+I+", bpp: "+F+", depth: "+G+", bigEndian: "+_e+", trueColor: "+ye+", redMax: "+ke+", greenMax: "+M+", blueMax: "+se+", redShift: "+ae+", greenShift: "+de+", blueShift: "+we),this._setDesktopName(j),this._resize(R,I),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(b.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),le.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),le.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var R=[];R.push(g.encodings.encodingCopyRect),this._fbDepth==24&&(R.push(g.encodings.encodingTight),R.push(g.encodings.encodingTightPNG),R.push(g.encodings.encodingHextile),R.push(g.encodings.encodingRRE)),R.push(g.encodings.encodingRaw),R.push(g.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),R.push(g.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),R.push(g.encodings.pseudoEncodingDesktopSize),R.push(g.encodings.pseudoEncodingLastRect),R.push(g.encodings.pseudoEncodingQEMUExtendedKeyEvent),R.push(g.encodings.pseudoEncodingExtendedDesktopSize),R.push(g.encodings.pseudoEncodingXvp),R.push(g.encodings.pseudoEncodingFence),R.push(g.encodings.pseudoEncodingContinuousUpdates),R.push(g.encodings.pseudoEncodingDesktopName),R.push(g.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(R.push(g.encodings.pseudoEncodingVMwareCursor),R.push(g.encodings.pseudoEncodingCursor)),le.messages.clientEncodings(this._sock,R)}},{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 b.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(b.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var R=this._sock.rQshift32();if(R=(0,p.toSigned32bit)(R),this._sock.rQwait("ServerCutText content",Math.abs(R),8))return!1;if(R>=0){var I=this._sock.rQshiftStr(R);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:I}}))}else{R=Math.abs(R);var F=this._sock.rQshift32(),G=F&65535,_e=F&4278190080,ye=!!(_e&re);if(ye){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var ke=0;ke<=15;ke++){var M=1<<ke;G&M&&(this._clipboardServerCapabilitiesFormats[M]=!0,this._sock.rQshift32())}for(var se=24;se<=31;se++){var ae=1<<se;this._clipboardServerCapabilitiesActions[ae]=!!(_e&ae)}var de=[re,ve,V,J,xe];le.messages.extendedClipboardCaps(this._sock,de,{extendedClipboardFormatText:0})}else if(_e===ve){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[xe]&&G&Oe&&le.messages.extendedClipboardProvide(this._sock,[Oe],[this._clipboardText])}else if(_e===V){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[J]&&(this._clipboardText!=null?le.messages.extendedClipboardNotify(this._sock,[Oe]):le.messages.extendedClipboardNotify(this._sock,[]))}else if(_e===J){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[ve]&&G&Oe&&le.messages.extendedClipboardRequest(this._sock,[Oe])}else if(_e===xe){if(this._viewOnly||!(G&Oe))return!0;this._clipboardText=null;var we=this._sock.rQshiftBytes(R-4),ge=new o.default,j=null;ge.setInput(we);for(var fe=0;fe<=15;fe++){var P=1<<fe;if(G&P){var he=0,Ee=ge.inflate(4);he|=Ee[0]<<24,he|=Ee[1]<<16,he|=Ee[2]<<8,he|=Ee[3];var x=ge.inflate(he);P===Oe&&(j=x)}}if(ge.setInput(null),j!==null){for(var te="",$=0;$<j.length;$++)te+=String.fromCharCode(j[$]);j=te,j=(0,h.decodeUTF8)(j),j.length>0&&j.charAt(j.length-1)==="\0"&&(j=j.slice(0,-1)),j=j.replace(`\r
`,`
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:j}}))}}else return this._fail("Unexpected action in extended clipboard message: "+_e)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var R=this._sock.rQshift32(),I=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",I,9))return!1;I>64&&(b.Warn("Bad payload length ("+I+") in fence response"),I=64);var F=this._sock.rQshiftStr(I);return this._supportsFence=!0,R&1<<31?(R&=3,le.messages.clientFence(this._sock,R,F),!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 R=this._sock.rQshift8(),I=this._sock.rQshift8();switch(I){case 0:b.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=R,b.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+I+")");break}return!0}},{key:"_normalMsg",value:function(){var R;this._FBU.rects>0?R=0:R=this._sock.rQshift8();var I,F;switch(R){case 0:return F=this._framebufferUpdate(),F&&!this._enabledContinuousUpdates&&le.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),F;case 1:return this._handleSetColourMapMsg();case 2:return b.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return I=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,I&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),b.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+R+")"),b.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 R=this._sock.rQshiftBytes(12);this._FBU.x=(R[0]<<8)+R[1],this._FBU.y=(R[2]<<8)+R[3],this._FBU.width=(R[4]<<8)+R[5],this._FBU.height=(R[6]<<8)+R[7],this._FBU.encoding=parseInt((R[8]<<24)+(R[9]<<16)+(R[10]<<8)+R[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 g.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case g.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case g.encodings.pseudoEncodingCursor:return this._handleCursor();case g.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var R=document.createEvent("keyboardEvent");R.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(I){}return!0;case g.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case g.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case g.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var R=this._FBU.x,I=this._FBU.y,F=this._FBU.width,G=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var _e=this._sock.rQshift8();this._sock.rQshift8();var ye,ke=4;if(_e==0){var M=-256;if(ye=new Array(F*G*ke),this._sock.rQwait("VMware cursor classic encoding",F*G*ke*2,2))return!1;for(var se=new Array(F*G),ae=0;ae<F*G;ae++)se[ae]=this._sock.rQshift32();for(var de=new Array(F*G),we=0;we<F*G;we++)de[we]=this._sock.rQshift32();for(var ge=0;ge<F*G;ge++)if(se[ge]==0){var j=de[ge],fe=j>>8&255,P=j>>16&255,he=j>>24&255;ye[ge*ke]=fe,ye[ge*ke+1]=P,ye[ge*ke+2]=he,ye[ge*ke+3]=255}else(se[ge]&M)==M?de[ge]==0?(ye[ge*ke]=0,ye[ge*ke+1]=0,ye[ge*ke+2]=0,ye[ge*ke+3]=0):((de[ge]&M)==M,ye[ge*ke]=0,ye[ge*ke+1]=0,ye[ge*ke+2]=0,ye[ge*ke+3]=255):(ye[ge*ke]=0,ye[ge*ke+1]=0,ye[ge*ke+2]=0,ye[ge*ke+3]=255)}else if(_e==1){if(this._sock.rQwait("VMware cursor alpha encoding",F*G*4,2))return!1;ye=new Array(F*G*ke);for(var Ee=0;Ee<F*G;Ee++){var x=this._sock.rQshift32();ye[Ee*4]=x>>24&255,ye[Ee*4+1]=x>>16&255,ye[Ee*4+2]=x>>8&255,ye[Ee*4+3]=x&255}}else return b.Warn("The given cursor type is not supported: "+_e+" given."),!1;return this._updateCursor(ye,R,I,F,G),!0}},{key:"_handleCursor",value:function(){var R=this._FBU.x,I=this._FBU.y,F=this._FBU.width,G=this._FBU.height,_e=F*G*4,ye=Math.ceil(F/8)*G,ke=_e+ye;if(this._sock.rQwait("cursor encoding",ke))return!1;for(var M=this._sock.rQshiftBytes(_e),se=this._sock.rQshiftBytes(ye),ae=new Uint8Array(F*G*4),de=0,we=0;we<G;we++)for(var ge=0;ge<F;ge++){var j=we*Math.ceil(F/8)+Math.floor(ge/8),fe=se[j]<<ge%8&128?255:0;ae[de]=M[de+2],ae[de+1]=M[de+1],ae[de+2]=M[de],ae[de+3]=fe,de+=4}return this._updateCursor(ae,R,I,F,G),!0}},{key:"_handleDesktopName",value:function(){if(this._sock.rQwait("DesktopName",4))return!1;var R=this._sock.rQshift32();if(this._sock.rQwait("DesktopName",R,4))return!1;var I=this._sock.rQshiftStr(R);return I=(0,h.decodeUTF8)(I,!0),this._setDesktopName(I),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var R=this._sock.rQpeek8(),I=4+R*16;if(this._sock.rQwait("ExtendedDesktopSize",I))return!1;var F=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,F&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var G=0;G<R;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 _e="";switch(this._FBU.y){case 1:_e="Resize is administratively prohibited";break;case 2:_e="Out of resources";break;case 3:_e="Invalid screen layout";break;default:_e="Unknown reason";break}b.Warn("Server did not accept the resize request: "+_e)}else this._resize(this._FBU.width,this._FBU.height);return!0}},{key:"_handleDataRect",value:function(){var R=this._decoders[this._FBU.encoding];if(!R)return this._fail("Unsupported encoding (encoding: "+this._FBU.encoding+")"),!1;try{return R.decodeRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,this._sock,this._display,this._fbDepth)}catch(I){return this._fail("Error decoding rect: "+I),!1}}},{key:"_updateContinuousUpdates",value:function(){this._enabledContinuousUpdates&&le.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(R,I){this._fbWidth=R,this._fbHeight=I,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(R,I){this._rfbXvpVer<R||(b.Info("Sending XVP operation "+I+" (version "+R+")"),le.messages.xvpOp(this._sock,R,I))}},{key:"_updateCursor",value:function(R,I,F,G,_e){this._cursorImage={rgbaPixels:R,hotx:I,hoty:F,w:G,h:_e},this._refreshCursor()}},{key:"_shouldShowDotCursor",value:function(){if(!this._showDotCursor)return!1;for(var R=3;R<this._cursorImage.rgbaPixels.length;R+=4)if(this._cursorImage.rgbaPixels[R])return!1;return!0}},{key:"_refreshCursor",value:function(){if(!(this._rfbConnectionState!=="connecting"&&this._rfbConnectionState!=="connected")){var R=this._shouldShowDotCursor()?le.cursors.dot:this._cursorImage;this._cursor.change(R.rgbaPixels,R.hotx,R.hoty,R.w,R.h)}}},{key:"viewOnly",get:function(){return this._viewOnly},set:function(R){this._viewOnly=R,(this._rfbConnectionState==="connecting"||this._rfbConnectionState==="connected")&&(R?this._keyboard.ungrab():this._keyboard.grab())}},{key:"capabilities",get:function(){return this._capabilities}},{key:"touchButton",get:function(){return 0},set:function(R){b.Warn("Using old API!")}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(R){this._clipViewport=R,this._updateClip()}},{key:"scaleViewport",get:function(){return this._scaleViewport},set:function(R){this._scaleViewport=R,R&&this._clipViewport&&this._updateClip(),this._updateScale(),!R&&this._clipViewport&&this._updateClip()}},{key:"resizeSession",get:function(){return this._resizeSession},set:function(R){this._resizeSession=R,R&&this._requestRemoteResize()}},{key:"showDotCursor",get:function(){return this._showDotCursor},set:function(R){this._showDotCursor=R,this._refreshCursor()}},{key:"background",get:function(){return this._screen.style.background},set:function(R){this._screen.style.background=R}},{key:"qualityLevel",get:function(){return this._qualityLevel},set:function(R){if(!Number.isInteger(R)||R<0||R>9){b.Error("qualityLevel must be an integer between 0 and 9");return}this._qualityLevel!==R&&(this._qualityLevel=R,this._rfbConnectionState==="connected"&&this._sendEncodings())}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(R){if(!Number.isInteger(R)||R<0||R>9){b.Error("compressionLevel must be an integer between 0 and 9");return}this._compressionLevel!==R&&(this._compressionLevel=R,this._rfbConnectionState==="connected"&&this._sendEncodings())}}],[{key:"genDES",value:function(R,I){var F=R.split("").map(function(G){return G.charCodeAt(0)});return new l.default(F).encrypt(I)}}]),le}(i.default);D.Z=Se,Se.messages={keyEvent:function(ne,le,Q){var R=ne._sQ,I=ne._sQlen;R[I]=4,R[I+1]=Q,R[I+2]=0,R[I+3]=0,R[I+4]=le>>24,R[I+5]=le>>16,R[I+6]=le>>8,R[I+7]=le,ne._sQlen+=8,ne.flush()},QEMUExtendedKeyEvent:function(ne,le,Q,R){function I(ye){var ke=R>>8,M=R&255;return ke===224&&M<127?M|128:ye}var F=ne._sQ,G=ne._sQlen;F[G]=255,F[G+1]=0,F[G+2]=Q>>8,F[G+3]=Q,F[G+4]=le>>24,F[G+5]=le>>16,F[G+6]=le>>8,F[G+7]=le;var _e=I(R);F[G+8]=_e>>24,F[G+9]=_e>>16,F[G+10]=_e>>8,F[G+11]=_e,ne._sQlen+=12,ne.flush()},pointerEvent:function(ne,le,Q,R){var I=ne._sQ,F=ne._sQlen;I[F]=5,I[F+1]=R,I[F+2]=le>>8,I[F+3]=le,I[F+4]=Q>>8,I[F+5]=Q,ne._sQlen+=6,ne.flush()},_buildExtendedClipboardFlags:function(ne,le){for(var Q=new Uint8Array(4),R=0,I=0,F=0;F<ne.length;F++)I|=ne[F];for(var G=0;G<le.length;G++)R|=le[G];return Q[0]=I>>24,Q[1]=0,Q[2]=0,Q[3]=R,Q},extendedClipboardProvide:function(ne,le,Q){for(var R=new t.default,I=[],F=0;F<le.length;F++){if(le[F]!=Oe)throw new Error("Unsupported extended clipboard format for Provide message.");Q[F]=Q[F].replace(/\r\n|\r|\n/gm,`\r
`);var G=(0,h.encodeUTF8)(Q[F]+"\0");I.push(G.length>>24&255,G.length>>16&255,G.length>>8&255,G.length&255);for(var _e=0;_e<G.length;_e++)I.push(G.charCodeAt(_e))}var ye=R.deflate(new Uint8Array(I)),ke=new Uint8Array(4+ye.length);ke.set(Se.messages._buildExtendedClipboardFlags([xe],le)),ke.set(ye,4),Se.messages.clientCutText(ne,ke,!0)},extendedClipboardNotify:function(ne,le){var Q=Se.messages._buildExtendedClipboardFlags([J],le);Se.messages.clientCutText(ne,Q,!0)},extendedClipboardRequest:function(ne,le){var Q=Se.messages._buildExtendedClipboardFlags([ve],le);Se.messages.clientCutText(ne,Q,!0)},extendedClipboardCaps:function(ne,le,Q){var R=Object.keys(Q),I=new Uint8Array(4+4*R.length);R.map(function(_e){return parseInt(_e)}),R.sort(function(_e,ye){return _e-ye}),I.set(Se.messages._buildExtendedClipboardFlags(le,[]));for(var F=4,G=0;G<R.length;G++)I[F]=Q[R[G]]>>24,I[F+1]=Q[R[G]]>>16,I[F+2]=Q[R[G]]>>8,I[F+3]=Q[R[G]]>>0,F+=4,I[3]|=1<<R[G];Se.messages.clientCutText(ne,I,!0)},clientCutText:function(ne,le){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,R=ne._sQ,I=ne._sQlen;R[I]=6,R[I+1]=0,R[I+2]=0,R[I+3]=0;var F;Q?F=(0,p.toUnsigned32bit)(-le.length):F=le.length,R[I+4]=F>>24,R[I+5]=F>>16,R[I+6]=F>>8,R[I+7]=F,ne._sQlen+=8;for(var G=0,_e=le.length;_e>0;){for(var ye=Math.min(_e,ne._sQbufferSize-ne._sQlen),ke=0;ke<ye;ke++)R[ne._sQlen+ke]=le[G+ke];ne._sQlen+=ye,ne.flush(),_e-=ye,G+=ye}},setDesktopSize:function(ne,le,Q,R,I){var F=ne._sQ,G=ne._sQlen;F[G]=251,F[G+1]=0,F[G+2]=le>>8,F[G+3]=le,F[G+4]=Q>>8,F[G+5]=Q,F[G+6]=1,F[G+7]=0,F[G+8]=R>>24,F[G+9]=R>>16,F[G+10]=R>>8,F[G+11]=R,F[G+12]=0,F[G+13]=0,F[G+14]=0,F[G+15]=0,F[G+16]=le>>8,F[G+17]=le,F[G+18]=Q>>8,F[G+19]=Q,F[G+20]=I>>24,F[G+21]=I>>16,F[G+22]=I>>8,F[G+23]=I,ne._sQlen+=24,ne.flush()},clientFence:function(ne,le,Q){var R=ne._sQ,I=ne._sQlen;R[I]=248,R[I+1]=0,R[I+2]=0,R[I+3]=0,R[I+4]=le>>24,R[I+5]=le>>16,R[I+6]=le>>8,R[I+7]=le;var F=Q.length;R[I+8]=F;for(var G=0;G<F;G++)R[I+9+G]=Q.charCodeAt(G);ne._sQlen+=9+F,ne.flush()},enableContinuousUpdates:function(ne,le,Q,R,I,F){var G=ne._sQ,_e=ne._sQlen;G[_e]=150,G[_e+1]=le,G[_e+2]=Q>>8,G[_e+3]=Q,G[_e+4]=R>>8,G[_e+5]=R,G[_e+6]=I>>8,G[_e+7]=I,G[_e+8]=F>>8,G[_e+9]=F,ne._sQlen+=10,ne.flush()},pixelFormat:function(ne,le,Q){var R=ne._sQ,I=ne._sQlen,F;le>16?F=32:le>8?F=16:F=8;var G=Math.floor(le/3);R[I]=0,R[I+1]=0,R[I+2]=0,R[I+3]=0,R[I+4]=F,R[I+5]=le,R[I+6]=0,R[I+7]=Q?1:0,R[I+8]=0,R[I+9]=(1<<G)-1,R[I+10]=0,R[I+11]=(1<<G)-1,R[I+12]=0,R[I+13]=(1<<G)-1,R[I+14]=G*2,R[I+15]=G*1,R[I+16]=G*0,R[I+17]=0,R[I+18]=0,R[I+19]=0,ne._sQlen+=20,ne.flush()},clientEncodings:function(ne,le){var Q=ne._sQ,R=ne._sQlen;Q[R]=2,Q[R+1]=0,Q[R+2]=le.length>>8,Q[R+3]=le.length;for(var I=R+4,F=0;F<le.length;F++){var G=le[F];Q[I]=G>>24,Q[I+1]=G>>16,Q[I+2]=G>>8,Q[I+3]=G,I+=4}ne._sQlen+=I-R,ne.flush()},fbUpdateRequest:function(ne,le,Q,R,I,F){var G=ne._sQ,_e=ne._sQlen;typeof Q=="undefined"&&(Q=0),typeof R=="undefined"&&(R=0),G[_e]=3,G[_e+1]=le?1:0,G[_e+2]=Q>>8&255,G[_e+3]=Q&255,G[_e+4]=R>>8&255,G[_e+5]=R&255,G[_e+6]=I>>8&255,G[_e+7]=I&255,G[_e+8]=F>>8&255,G[_e+9]=F&255,ne._sQlen+=10,ne.flush()},xvpOp:function(ne,le,Q){var R=ne._sQ,I=ne._sQlen;R[I]=250,R[I+1]=0,R[I+2]=le,R[I+3]=Q,ne._sQlen+=4,ne.flush()}},Se.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},41895:function(Xe,D,f){"use strict";function _(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(T){return typeof T}:_=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},_(C)}Object.defineProperty(D,"__esModule",{value:!0}),D.isMac=v,D.isWindows=y,D.isIOS=g,D.isSafari=m,D.isIE=S,D.isEdge=k,D.isFirefox=w,D.hasScrollbarGutter=D.supportsImageMetadata=D.supportsCursorURIs=D.dragThreshold=D.isTouchDevice=void 0;var p=h(f(50500));function b(){if(typeof WeakMap!="function")return null;var C=new WeakMap;return b=function(){return C},C}function h(C){if(C&&C.__esModule)return C;if(C===null||_(C)!=="object"&&typeof C!="function")return{default:C};var E=b();if(E&&E.has(C))return E.get(C);var T={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in C)if(Object.prototype.hasOwnProperty.call(C,N)){var Z=L?Object.getOwnPropertyDescriptor(C,N):null;Z&&(Z.get||Z.set)?Object.defineProperty(T,N,Z):T[N]=C[N]}return T.default=C,E&&E.set(C,T),T}var a=!1;D.isTouchDevice=a,window.addEventListener("touchstart",function(){},!1);var u=10*(window.devicePixelRatio||1);D.dragThreshold=u;var d=!1;try{var i=document.createElement("canvas");i.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',i.style.cursor.indexOf("url")===0?(p.Info("Data URI scheme cursor supported"),d=!0):p.Warn("Data URI scheme cursor not supported")}catch(C){p.Error("Data URI scheme cursor test exception: "+C)}var n=d;D.supportsCursorURIs=n;var o=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),o=!0}catch(C){}var t=o;D.supportsImageMetadata=t;var c=!0;try{var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",document.body.appendChild(e);var r=document.createElement("div");e.appendChild(r);var s=e.offsetWidth-r.offsetWidth;e.parentNode.removeChild(e),c=s!=0}catch(C){p.Error("Scrollbar test exception: "+C)}var l=c;D.hasScrollbarGutter=l;function v(){return navigator&&!!/mac/i.exec(navigator.platform)}function y(){return navigator&&!!/win/i.exec(navigator.platform)}function g(){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 S(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function k(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function w(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},54641:function(Xe,D,f){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=f(41895);function p(d,i){if(!(d instanceof i))throw new TypeError("Cannot call a class as a function")}function b(d,i){for(var n=0;n<i.length;n++){var o=i[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(d,o.key,o)}}function h(d,i,n){return i&&b(d.prototype,i),n&&b(d,n),d}var a=!_.supportsCursorURIs||_.isTouchDevice,u=function(){function d(){p(this,d),this._target=null,this._canvas=document.createElement("canvas"),a&&(this._canvas.style.position="fixed",this._canvas.style.zIndex="65535",this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden"),this._position={x:0,y:0},this._hotSpot={x:0,y:0},this._eventHandlers={mouseover:this._handleMouseOver.bind(this),mouseleave:this._handleMouseLeave.bind(this),mousemove:this._handleMouseMove.bind(this),mouseup:this._handleMouseUp.bind(this)}}return h(d,[{key:"attach",value:function(n){if(this._target&&this.detach(),this._target=n,a){document.body.appendChild(this._canvas);var o={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,o),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,o),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,o),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,o)}this.clear()}},{key:"detach",value:function(){if(this._target){if(a){var n={capture:!0,passive:!0};this._target.removeEventListener("mouseover",this._eventHandlers.mouseover,n),this._target.removeEventListener("mouseleave",this._eventHandlers.mouseleave,n),this._target.removeEventListener("mousemove",this._eventHandlers.mousemove,n),this._target.removeEventListener("mouseup",this._eventHandlers.mouseup,n),document.body.removeChild(this._canvas)}this._target=null}}},{key:"change",value:function(n,o,t,c,e){if(c===0||e===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-o,this._position.y=this._position.y+this._hotSpot.y-t,this._hotSpot.x=o,this._hotSpot.y=t;var r=this._canvas.getContext("2d");this._canvas.width=c,this._canvas.height=e;var s;try{s=new ImageData(new Uint8ClampedArray(n),c,e)}catch(v){s=r.createImageData(c,e),s.data.set(new Uint8ClampedArray(n))}if(r.clearRect(0,0,c,e),r.putImageData(s,0,0),a)this._updatePosition();else{var l=this._canvas.toDataURL();this._target.style.cursor="url("+l+")"+o+" "+t+", 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(n,o){if(a){window.visualViewport?(this._position.x=n+window.visualViewport.offsetLeft,this._position.y=o+window.visualViewport.offsetTop):(this._position.x=n,this._position.y=o),this._updatePosition();var t=document.elementFromPoint(n,o);this._updateVisibility(t)}}},{key:"_handleMouseOver",value:function(n){this._handleMouseMove(n)}},{key:"_handleMouseLeave",value:function(n){this._updateVisibility(n.relatedTarget)}},{key:"_handleMouseMove",value:function(n){this._updateVisibility(n.target),this._position.x=n.clientX-this._hotSpot.x,this._position.y=n.clientY-this._hotSpot.y,this._updatePosition()}},{key:"_handleMouseUp",value:function(n){var o=this,t=document.elementFromPoint(n.clientX,n.clientY);this._updateVisibility(t),this._captureIsActive()&&window.setTimeout(function(){o._target&&(t=document.elementFromPoint(n.clientX,n.clientY),o._updateVisibility(t))},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(n){return n?n===this._target?!0:!(!this._target.contains(n)||window.getComputedStyle(n).cursor!=="none"):!1}},{key:"_updateVisibility",value:function(n){this._captureIsActive()&&(n=document.captureElement),this._shouldShowCursor(n)?this._showCursor():this._hideCursor()}},{key:"_updatePosition",value:function(){this._canvas.style.left=this._position.x+"px",this._canvas.style.top=this._position.y+"px"}},{key:"_captureIsActive",value:function(){return document.captureElement&&document.documentElement.contains(document.captureElement)}}]),d}();D.default=u},92742:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.clientToElement=f;function f(_,p,b){var h=b.getBoundingClientRect(),a={x:0,y:0};return _<h.left?a.x=0:_>=h.right?a.x=h.width-1:a.x=_-h.left,p<h.top?a.y=0:p>=h.bottom?a.y=h.height-1:a.y=p-h.top,a}},79420:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getPointerEvent=f,D.stopEvent=_,D.setCapture=d,D.releaseCapture=i;function f(n){return n.changedTouches?n.changedTouches[0]:n.touches?n.touches[0]:n}function _(n){n.stopPropagation(),n.preventDefault()}var p=!1,b=null;document.captureElement=null;function h(n){if(!p){var o=new n.constructor(n.type,n);p=!0,document.captureElement?document.captureElement.dispatchEvent(o):b.dispatchEvent(o),p=!1,n.stopPropagation(),o.defaultPrevented&&n.preventDefault(),n.type==="mouseup"&&i()}}function a(){var n=document.getElementById("noVNC_mouse_capture_elem");n.style.cursor=window.getComputedStyle(document.captureElement).cursor}var u=new MutationObserver(a);function d(n){if(n.setCapture)n.setCapture(),document.captureElement=n,n.addEventListener("mouseup",i);else{i();var o=document.getElementById("noVNC_mouse_capture_elem");o===null&&(o=document.createElement("div"),o.id="noVNC_mouse_capture_elem",o.style.position="fixed",o.style.top="0px",o.style.left="0px",o.style.width="100%",o.style.height="100%",o.style.zIndex=1e4,o.style.display="none",document.body.appendChild(o),o.addEventListener("contextmenu",h),o.addEventListener("mousemove",h),o.addEventListener("mouseup",h)),document.captureElement=n,u.observe(n,{attributes:!0}),a(),o.style.display="",window.addEventListener("mousemove",h),window.addEventListener("mouseup",h)}}function i(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;b=document.captureElement,document.captureElement=null,u.disconnect();var n=document.getElementById("noVNC_mouse_capture_elem");n.style.display="none",window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",h)}}},5004:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function f(h,a){if(!(h instanceof a))throw new TypeError("Cannot call a class as a function")}function _(h,a){for(var u=0;u<a.length;u++){var d=a[u];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}function p(h,a,u){return a&&_(h.prototype,a),u&&_(h,u),h}var b=function(){function h(){f(this,h),this._listeners=new Map}return p(h,[{key:"addEventListener",value:function(u,d){this._listeners.has(u)||this._listeners.set(u,new Set),this._listeners.get(u).add(d)}},{key:"removeEventListener",value:function(u,d){this._listeners.has(u)&&this._listeners.get(u).delete(d)}},{key:"dispatchEvent",value:function(u){var d=this;return this._listeners.has(u.type)?(this._listeners.get(u.type).forEach(function(i){return i.call(d,u)}),!u.defaultPrevented):!0}}]),h}();D.default=b},20860:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.toUnsigned32bit=f,D.toSigned32bit=_;function f(p){return p>>>0}function _(p){return p|0}},50500:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.initLogging=a,D.getLogging=u,D.Error=D.Warn=D.Info=D.Debug=void 0;var f="warn",_=function(){};D.Debug=_;var p=function(){};D.Info=p;var b=function(){};D.Warn=b;var h=function(){};D.Error=h;function a(d){if(typeof d=="undefined"?d=f:f=d,D.Debug=_=D.Info=p=D.Warn=b=D.Error=h=function(){},typeof window.console!="undefined")switch(d){case"debug":D.Debug=_=console.debug.bind(window.console);case"info":D.Info=p=console.info.bind(window.console);case"warn":D.Warn=b=console.warn.bind(window.console);case"error":D.Error=h=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+d+"'")}}function u(){return f}a()},21882:function(){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(D,f){"use strict";if(D==null)throw new TypeError("Cannot convert undefined or null to object");for(var _=Object(D),p=1;p<arguments.length;p++){var b=arguments[p];if(b!=null)for(var h in b)Object.prototype.hasOwnProperty.call(b,h)&&(_[h]=b[h])}return _},writable:!0,configurable:!0}),function(){function Xe(D,f){f=f||{bubbles:!1,cancelable:!1,detail:void 0};var _=document.createEvent("CustomEvent");return _.initCustomEvent(D,f.bubbles,f.cancelable,f.detail),_}Xe.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=Xe)}(),Number.isInteger=Number.isInteger||function(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}},31516:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.decodeUTF8=f,D.encodeUTF8=_;function f(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(p))}catch(h){if(h instanceof URIError&&b)return p;throw h}}function _(p){return unescape(encodeURIComponent(p))}},35986:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.shrinkBuf=f,D.arraySet=_,D.flattenChunks=p,D.Buf32=D.Buf16=D.Buf8=void 0;function f(u,d){return u.length===d?u:u.subarray?u.subarray(0,d):(u.length=d,u)}function _(u,d,i,n,o){if(d.subarray&&u.subarray){u.set(d.subarray(i,i+n),o);return}for(var t=0;t<n;t++)u[o+t]=d[i+t]}function p(u){var d,i,n,o,t,c;for(n=0,d=0,i=u.length;d<i;d++)n+=u[d].length;for(c=new Uint8Array(n),o=0,d=0,i=u.length;d<i;d++)t=u[d],c.set(t,o),o+=t.length;return c}var b=Uint8Array;D.Buf8=b;var h=Uint16Array;D.Buf16=h;var a=Int32Array;D.Buf32=a},97580:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=f;function f(_,p,b,h){for(var a=_&65535|0,u=_>>>16&65535|0,d=0;b!==0;){d=b>2e3?2e3:b,b-=d;do a=a+p[h++]|0,u=u+a|0;while(--d);a%=65521,u%=65521}return a|u<<16|0}},1217:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=f;function f(){for(var b,h=[],a=0;a<256;a++){b=a;for(var u=0;u<8;u++)b=b&1?3988292384^b>>>1:b>>>1;h[a]=b}return h}var _=f();function p(b,h,a,u){var d=_,i=u+a;b^=-1;for(var n=u;n<i;n++)b=b>>>8^d[(b^h[n])&255];return b^-1}},25805:function(Xe,D,f){"use strict";function _(x){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function($){return typeof $}:_=function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},_(x)}Object.defineProperty(D,"__esModule",{value:!0}),D.deflateInit=j,D.deflateInit2=ge,D.deflateReset=de,D.deflateResetKeep=ae,D.deflateSetHeader=we,D.deflate=fe,D.deflateEnd=P,D.deflateSetDictionary=he,D.deflateInfo=D.Z_DEFLATED=D.Z_UNKNOWN=D.Z_DEFAULT_STRATEGY=D.Z_FIXED=D.Z_RLE=D.Z_HUFFMAN_ONLY=D.Z_FILTERED=D.Z_DEFAULT_COMPRESSION=D.Z_BUF_ERROR=D.Z_DATA_ERROR=D.Z_STREAM_ERROR=D.Z_STREAM_END=D.Z_OK=D.Z_BLOCK=D.Z_FINISH=D.Z_FULL_FLUSH=D.Z_PARTIAL_FLUSH=D.Z_NO_FLUSH=void 0;var p=n(f(35986)),b=n(f(55796)),h=d(f(97580)),a=d(f(1217)),u=d(f(70892));function d(x){return x&&x.__esModule?x:{default:x}}function i(){if(typeof WeakMap!="function")return null;var x=new WeakMap;return i=function(){return x},x}function n(x){if(x&&x.__esModule)return x;if(x===null||_(x)!=="object"&&typeof x!="function")return{default:x};var te=i();if(te&&te.has(x))return te.get(x);var $={},K=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in x)if(Object.prototype.hasOwnProperty.call(x,W)){var ee=K?Object.getOwnPropertyDescriptor(x,W):null;ee&&(ee.get||ee.set)?Object.defineProperty($,W,ee):$[W]=x[W]}return $.default=x,te&&te.set(x,$),$}var o=0;D.Z_NO_FLUSH=o;var t=1;D.Z_PARTIAL_FLUSH=t;var c=3;D.Z_FULL_FLUSH=c;var e=4;D.Z_FINISH=e;var r=5;D.Z_BLOCK=r;var s=0;D.Z_OK=s;var l=1;D.Z_STREAM_END=l;var v=-2;D.Z_STREAM_ERROR=v;var y=-3;D.Z_DATA_ERROR=y;var g=-5;D.Z_BUF_ERROR=g;var m=-1;D.Z_DEFAULT_COMPRESSION=m;var S=1;D.Z_FILTERED=S;var k=2;D.Z_HUFFMAN_ONLY=k;var w=3;D.Z_RLE=w;var C=4;D.Z_FIXED=C;var E=0;D.Z_DEFAULT_STRATEGY=E;var T=2;D.Z_UNKNOWN=T;var L=8;D.Z_DEFLATED=L;var N=9,Z=15,q=8,H=29,z=256,A=z+1+H,O=30,X=19,U=2*A+1,B=15,Y=3,ue=258,me=ue+Y+1,De=32,Te=42,oe=69,be=73,Fe=91,Re=103,Me=113,Le=666,Oe=1,Ne=2,Ie=3,ie=4,ce=3;function re(x,te){return x.msg=u.default[te],te}function ve(x){return(x<<1)-(x>4?9:0)}function V(x){for(var te=x.length;--te>=0;)x[te]=0}function J(x){var te=x.state,$=te.pending;$>x.avail_out&&($=x.avail_out),$!==0&&(p.arraySet(x.output,te.pending_buf,te.pending_out,$,x.next_out),x.next_out+=$,te.pending_out+=$,x.total_out+=$,x.avail_out-=$,te.pending-=$,te.pending===0&&(te.pending_out=0))}function xe(x,te){b._tr_flush_block(x,x.block_start>=0?x.block_start:-1,x.strstart-x.block_start,te),x.block_start=x.strstart,J(x.strm)}function Se(x,te){x.pending_buf[x.pending++]=te}function pe(x,te){x.pending_buf[x.pending++]=te>>>8&255,x.pending_buf[x.pending++]=te&255}function ne(x,te,$,K){var W=x.avail_in;return W>K&&(W=K),W===0?0:(x.avail_in-=W,p.arraySet(te,x.input,x.next_in,W,$),x.state.wrap===1?x.adler=(0,h.default)(x.adler,te,W,$):x.state.wrap===2&&(x.adler=(0,a.default)(x.adler,te,W,$)),x.next_in+=W,x.total_in+=W,W)}function le(x,te){var $=x.max_chain_length,K=x.strstart,W,ee,Pe=x.prev_length,Ae=x.nice_match,Ce=x.strstart>x.w_size-me?x.strstart-(x.w_size-me):0,Ue=x.window,tt=x.w_mask,Ke=x.prev,He=x.strstart+ue,qe=Ue[K+Pe-1],Ve=Ue[K+Pe];x.prev_length>=x.good_match&&($>>=2),Ae>x.lookahead&&(Ae=x.lookahead);do if(W=te,!(Ue[W+Pe]!==Ve||Ue[W+Pe-1]!==qe||Ue[W]!==Ue[K]||Ue[++W]!==Ue[K+1])){K+=2,W++;do;while(Ue[++K]===Ue[++W]&&Ue[++K]===Ue[++W]&&Ue[++K]===Ue[++W]&&Ue[++K]===Ue[++W]&&Ue[++K]===Ue[++W]&&Ue[++K]===Ue[++W]&&Ue[++K]===Ue[++W]&&Ue[++K]===Ue[++W]&&K<He);if(ee=ue-(He-K),K=He-ue,ee>Pe){if(x.match_start=te,Pe=ee,ee>=Ae)break;qe=Ue[K+Pe-1],Ve=Ue[K+Pe]}}while((te=Ke[te&tt])>Ce&&--$!==0);return Pe<=x.lookahead?Pe:x.lookahead}function Q(x){var te=x.w_size,$,K,W,ee,Pe;do{if(ee=x.window_size-x.lookahead-x.strstart,x.strstart>=te+(te-me)){p.arraySet(x.window,x.window,te,te,0),x.match_start-=te,x.strstart-=te,x.block_start-=te,K=x.hash_size,$=K;do W=x.head[--$],x.head[$]=W>=te?W-te:0;while(--K);K=te,$=K;do W=x.prev[--$],x.prev[$]=W>=te?W-te:0;while(--K);ee+=te}if(x.strm.avail_in===0)break;if(K=ne(x.strm,x.window,x.strstart+x.lookahead,ee),x.lookahead+=K,x.lookahead+x.insert>=Y)for(Pe=x.strstart-x.insert,x.ins_h=x.window[Pe],x.ins_h=(x.ins_h<<x.hash_shift^x.window[Pe+1])&x.hash_mask;x.insert&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[Pe+Y-1])&x.hash_mask,x.prev[Pe&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=Pe,Pe++,x.insert--,!(x.lookahead+x.insert<Y)););}while(x.lookahead<me&&x.strm.avail_in!==0)}function R(x,te){var $=65535;for($>x.pending_buf_size-5&&($=x.pending_buf_size-5);;){if(x.lookahead<=1){if(Q(x),x.lookahead===0&&te===o)return Oe;if(x.lookahead===0)break}x.strstart+=x.lookahead,x.lookahead=0;var K=x.block_start+$;if((x.strstart===0||x.strstart>=K)&&(x.lookahead=x.strstart-K,x.strstart=K,xe(x,!1),x.strm.avail_out===0)||x.strstart-x.block_start>=x.w_size-me&&(xe(x,!1),x.strm.avail_out===0))return Oe}return x.insert=0,te===e?(xe(x,!0),x.strm.avail_out===0?Ie:ie):(x.strstart>x.block_start&&(xe(x,!1),x.strm.avail_out===0),Oe)}function I(x,te){for(var $,K;;){if(x.lookahead<me){if(Q(x),x.lookahead<me&&te===o)return Oe;if(x.lookahead===0)break}if($=0,x.lookahead>=Y&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+Y-1])&x.hash_mask,$=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),$!==0&&x.strstart-$<=x.w_size-me&&(x.match_length=le(x,$)),x.match_length>=Y)if(K=b._tr_tally(x,x.strstart-x.match_start,x.match_length-Y),x.lookahead-=x.match_length,x.match_length<=x.max_lazy_match&&x.lookahead>=Y){x.match_length--;do x.strstart++,x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+Y-1])&x.hash_mask,$=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart;while(--x.match_length!==0);x.strstart++}else x.strstart+=x.match_length,x.match_length=0,x.ins_h=x.window[x.strstart],x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+1])&x.hash_mask;else K=b._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++;if(K&&(xe(x,!1),x.strm.avail_out===0))return Oe}return x.insert=x.strstart<Y-1?x.strstart:Y-1,te===e?(xe(x,!0),x.strm.avail_out===0?Ie:ie):x.last_lit&&(xe(x,!1),x.strm.avail_out===0)?Oe:Ne}function F(x,te){for(var $,K,W;;){if(x.lookahead<me){if(Q(x),x.lookahead<me&&te===o)return Oe;if(x.lookahead===0)break}if($=0,x.lookahead>=Y&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+Y-1])&x.hash_mask,$=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart),x.prev_length=x.match_length,x.prev_match=x.match_start,x.match_length=Y-1,$!==0&&x.prev_length<x.max_lazy_match&&x.strstart-$<=x.w_size-me&&(x.match_length=le(x,$),x.match_length<=5&&(x.strategy===S||x.match_length===Y&&x.strstart-x.match_start>4096)&&(x.match_length=Y-1)),x.prev_length>=Y&&x.match_length<=x.prev_length){W=x.strstart+x.lookahead-Y,K=b._tr_tally(x,x.strstart-1-x.prev_match,x.prev_length-Y),x.lookahead-=x.prev_length-1,x.prev_length-=2;do++x.strstart<=W&&(x.ins_h=(x.ins_h<<x.hash_shift^x.window[x.strstart+Y-1])&x.hash_mask,$=x.prev[x.strstart&x.w_mask]=x.head[x.ins_h],x.head[x.ins_h]=x.strstart);while(--x.prev_length!==0);if(x.match_available=0,x.match_length=Y-1,x.strstart++,K&&(xe(x,!1),x.strm.avail_out===0))return Oe}else if(x.match_available){if(K=b._tr_tally(x,0,x.window[x.strstart-1]),K&&xe(x,!1),x.strstart++,x.lookahead--,x.strm.avail_out===0)return Oe}else x.match_available=1,x.strstart++,x.lookahead--}return x.match_available&&(K=b._tr_tally(x,0,x.window[x.strstart-1]),x.match_available=0),x.insert=x.strstart<Y-1?x.strstart:Y-1,te===e?(xe(x,!0),x.strm.avail_out===0?Ie:ie):x.last_lit&&(xe(x,!1),x.strm.avail_out===0)?Oe:Ne}function G(x,te){for(var $,K,W,ee,Pe=x.window;;){if(x.lookahead<=ue){if(Q(x),x.lookahead<=ue&&te===o)return Oe;if(x.lookahead===0)break}if(x.match_length=0,x.lookahead>=Y&&x.strstart>0&&(W=x.strstart-1,K=Pe[W],K===Pe[++W]&&K===Pe[++W]&&K===Pe[++W])){ee=x.strstart+ue;do;while(K===Pe[++W]&&K===Pe[++W]&&K===Pe[++W]&&K===Pe[++W]&&K===Pe[++W]&&K===Pe[++W]&&K===Pe[++W]&&K===Pe[++W]&&W<ee);x.match_length=ue-(ee-W),x.match_length>x.lookahead&&(x.match_length=x.lookahead)}if(x.match_length>=Y?($=b._tr_tally(x,1,x.match_length-Y),x.lookahead-=x.match_length,x.strstart+=x.match_length,x.match_length=0):($=b._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++),$&&(xe(x,!1),x.strm.avail_out===0))return Oe}return x.insert=0,te===e?(xe(x,!0),x.strm.avail_out===0?Ie:ie):x.last_lit&&(xe(x,!1),x.strm.avail_out===0)?Oe:Ne}function _e(x,te){for(var $;;){if(x.lookahead===0&&(Q(x),x.lookahead===0)){if(te===o)return Oe;break}if(x.match_length=0,$=b._tr_tally(x,0,x.window[x.strstart]),x.lookahead--,x.strstart++,$&&(xe(x,!1),x.strm.avail_out===0))return Oe}return x.insert=0,te===e?(xe(x,!0),x.strm.avail_out===0?Ie:ie):x.last_lit&&(xe(x,!1),x.strm.avail_out===0)?Oe:Ne}function ye(x,te,$,K,W){this.good_length=x,this.max_lazy=te,this.nice_length=$,this.max_chain=K,this.func=W}var ke;ke=[new ye(0,0,0,0,R),new ye(4,4,8,4,I),new ye(4,5,16,8,I),new ye(4,6,32,32,I),new ye(4,4,16,16,F),new ye(8,16,32,32,F),new ye(8,16,128,128,F),new ye(8,32,128,256,F),new ye(32,128,258,1024,F),new ye(32,258,258,4096,F)];function M(x){x.window_size=2*x.w_size,V(x.head),x.max_lazy_match=ke[x.level].max_lazy,x.good_match=ke[x.level].good_length,x.nice_match=ke[x.level].nice_length,x.max_chain_length=ke[x.level].max_chain,x.strstart=0,x.block_start=0,x.lookahead=0,x.insert=0,x.match_length=x.prev_length=Y-1,x.match_available=0,x.ins_h=0}function se(){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=L,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 p.Buf16(U*2),this.dyn_dtree=new p.Buf16((2*O+1)*2),this.bl_tree=new p.Buf16((2*X+1)*2),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new p.Buf16(B+1),this.heap=new p.Buf16(2*A+1),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new p.Buf16(2*A+1),V(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 ae(x){var te;return!x||!x.state?re(x,v):(x.total_in=x.total_out=0,x.data_type=T,te=x.state,te.pending=0,te.pending_out=0,te.wrap<0&&(te.wrap=-te.wrap),te.status=te.wrap?Te:Me,x.adler=te.wrap===2?0:1,te.last_flush=o,b._tr_init(te),s)}function de(x){var te=ae(x);return te===s&&M(x.state),te}function we(x,te){return!x||!x.state||x.state.wrap!==2?v:(x.state.gzhead=te,s)}function ge(x,te,$,K,W,ee){if(!x)return v;var Pe=1;if(te===m&&(te=6),K<0?(Pe=0,K=-K):K>15&&(Pe=2,K-=16),W<1||W>N||$!==L||K<8||K>15||te<0||te>9||ee<0||ee>C)return re(x,v);K===8&&(K=9);var Ae=new se;return x.state=Ae,Ae.strm=x,Ae.wrap=Pe,Ae.gzhead=null,Ae.w_bits=K,Ae.w_size=1<<Ae.w_bits,Ae.w_mask=Ae.w_size-1,Ae.hash_bits=W+7,Ae.hash_size=1<<Ae.hash_bits,Ae.hash_mask=Ae.hash_size-1,Ae.hash_shift=~~((Ae.hash_bits+Y-1)/Y),Ae.window=new p.Buf8(Ae.w_size*2),Ae.head=new p.Buf16(Ae.hash_size),Ae.prev=new p.Buf16(Ae.w_size),Ae.lit_bufsize=1<<W+6,Ae.pending_buf_size=Ae.lit_bufsize*4,Ae.pending_buf=new p.Buf8(Ae.pending_buf_size),Ae.d_buf=1*Ae.lit_bufsize,Ae.l_buf=3*Ae.lit_bufsize,Ae.level=te,Ae.strategy=ee,Ae.method=$,de(x)}function j(x,te){return ge(x,te,L,Z,q,E)}function fe(x,te){var $,K,W,ee;if(!x||!x.state||te>r||te<0)return x?re(x,v):v;if(K=x.state,!x.output||!x.input&&x.avail_in!==0||K.status===Le&&te!==e)return re(x,x.avail_out===0?g:v);if(K.strm=x,$=K.last_flush,K.last_flush=te,K.status===Te)if(K.wrap===2)x.adler=0,Se(K,31),Se(K,139),Se(K,8),K.gzhead?(Se(K,(K.gzhead.text?1:0)+(K.gzhead.hcrc?2:0)+(K.gzhead.extra?4:0)+(K.gzhead.name?8:0)+(K.gzhead.comment?16:0)),Se(K,K.gzhead.time&255),Se(K,K.gzhead.time>>8&255),Se(K,K.gzhead.time>>16&255),Se(K,K.gzhead.time>>24&255),Se(K,K.level===9?2:K.strategy>=k||K.level<2?4:0),Se(K,K.gzhead.os&255),K.gzhead.extra&&K.gzhead.extra.length&&(Se(K,K.gzhead.extra.length&255),Se(K,K.gzhead.extra.length>>8&255)),K.gzhead.hcrc&&(x.adler=(0,a.default)(x.adler,K.pending_buf,K.pending,0)),K.gzindex=0,K.status=oe):(Se(K,0),Se(K,0),Se(K,0),Se(K,0),Se(K,0),Se(K,K.level===9?2:K.strategy>=k||K.level<2?4:0),Se(K,ce),K.status=Me);else{var Pe=L+(K.w_bits-8<<4)<<8,Ae=-1;K.strategy>=k||K.level<2?Ae=0:K.level<6?Ae=1:K.level===6?Ae=2:Ae=3,Pe|=Ae<<6,K.strstart!==0&&(Pe|=De),Pe+=31-Pe%31,K.status=Me,pe(K,Pe),K.strstart!==0&&(pe(K,x.adler>>>16),pe(K,x.adler&65535)),x.adler=1}if(K.status===oe)if(K.gzhead.extra){for(W=K.pending;K.gzindex<(K.gzhead.extra.length&65535)&&!(K.pending===K.pending_buf_size&&(K.gzhead.hcrc&&K.pending>W&&(x.adler=(0,a.default)(x.adler,K.pending_buf,K.pending-W,W)),J(x),W=K.pending,K.pending===K.pending_buf_size));)Se(K,K.gzhead.extra[K.gzindex]&255),K.gzindex++;K.gzhead.hcrc&&K.pending>W&&(x.adler=(0,a.default)(x.adler,K.pending_buf,K.pending-W,W)),K.gzindex===K.gzhead.extra.length&&(K.gzindex=0,K.status=be)}else K.status=be;if(K.status===be)if(K.gzhead.name){W=K.pending;do{if(K.pending===K.pending_buf_size&&(K.gzhead.hcrc&&K.pending>W&&(x.adler=(0,a.default)(x.adler,K.pending_buf,K.pending-W,W)),J(x),W=K.pending,K.pending===K.pending_buf_size)){ee=1;break}K.gzindex<K.gzhead.name.length?ee=K.gzhead.name.charCodeAt(K.gzindex++)&255:ee=0,Se(K,ee)}while(ee!==0);K.gzhead.hcrc&&K.pending>W&&(x.adler=(0,a.default)(x.adler,K.pending_buf,K.pending-W,W)),ee===0&&(K.gzindex=0,K.status=Fe)}else K.status=Fe;if(K.status===Fe)if(K.gzhead.comment){W=K.pending;do{if(K.pending===K.pending_buf_size&&(K.gzhead.hcrc&&K.pending>W&&(x.adler=(0,a.default)(x.adler,K.pending_buf,K.pending-W,W)),J(x),W=K.pending,K.pending===K.pending_buf_size)){ee=1;break}K.gzindex<K.gzhead.comment.length?ee=K.gzhead.comment.charCodeAt(K.gzindex++)&255:ee=0,Se(K,ee)}while(ee!==0);K.gzhead.hcrc&&K.pending>W&&(x.adler=(0,a.default)(x.adler,K.pending_buf,K.pending-W,W)),ee===0&&(K.status=Re)}else K.status=Re;if(K.status===Re&&(K.gzhead.hcrc?(K.pending+2>K.pending_buf_size&&J(x),K.pending+2<=K.pending_buf_size&&(Se(K,x.adler&255),Se(K,x.adler>>8&255),x.adler=0,K.status=Me)):K.status=Me),K.pending!==0){if(J(x),x.avail_out===0)return K.last_flush=-1,s}else if(x.avail_in===0&&ve(te)<=ve($)&&te!==e)return re(x,g);if(K.status===Le&&x.avail_in!==0)return re(x,g);if(x.avail_in!==0||K.lookahead!==0||te!==o&&K.status!==Le){var Ce=K.strategy===k?_e(K,te):K.strategy===w?G(K,te):ke[K.level].func(K,te);if((Ce===Ie||Ce===ie)&&(K.status=Le),Ce===Oe||Ce===Ie)return x.avail_out===0&&(K.last_flush=-1),s;if(Ce===Ne&&(te===t?b._tr_align(K):te!==r&&(b._tr_stored_block(K,0,0,!1),te===c&&(V(K.head),K.lookahead===0&&(K.strstart=0,K.block_start=0,K.insert=0))),J(x),x.avail_out===0))return K.last_flush=-1,s}return te!==e?s:K.wrap<=0?l:(K.wrap===2?(Se(K,x.adler&255),Se(K,x.adler>>8&255),Se(K,x.adler>>16&255),Se(K,x.adler>>24&255),Se(K,x.total_in&255),Se(K,x.total_in>>8&255),Se(K,x.total_in>>16&255),Se(K,x.total_in>>24&255)):(pe(K,x.adler>>>16),pe(K,x.adler&65535)),J(x),K.wrap>0&&(K.wrap=-K.wrap),K.pending!==0?s:l)}function P(x){var te;return!x||!x.state?v:(te=x.state.status,te!==Te&&te!==oe&&te!==be&&te!==Fe&&te!==Re&&te!==Me&&te!==Le?re(x,v):(x.state=null,te===Me?re(x,y):s))}function he(x,te){var $=te.length,K,W,ee,Pe,Ae,Ce,Ue,tt;if(!x||!x.state||(K=x.state,Pe=K.wrap,Pe===2||Pe===1&&K.status!==Te||K.lookahead))return v;for(Pe===1&&(x.adler=(0,h.default)(x.adler,te,$,0)),K.wrap=0,$>=K.w_size&&(Pe===0&&(V(K.head),K.strstart=0,K.block_start=0,K.insert=0),tt=new p.Buf8(K.w_size),p.arraySet(tt,te,$-K.w_size,K.w_size,0),te=tt,$=K.w_size),Ae=x.avail_in,Ce=x.next_in,Ue=x.input,x.avail_in=$,x.next_in=0,x.input=te,Q(K);K.lookahead>=Y;){W=K.strstart,ee=K.lookahead-(Y-1);do K.ins_h=(K.ins_h<<K.hash_shift^K.window[W+Y-1])&K.hash_mask,K.prev[W&K.w_mask]=K.head[K.ins_h],K.head[K.ins_h]=W,W++;while(--ee);K.strstart=W,K.lookahead=Y-1,Q(K)}return K.strstart+=K.lookahead,K.block_start=K.strstart,K.insert=K.lookahead,K.lookahead=0,K.match_length=K.prev_length=Y-1,K.match_available=0,x.next_in=Ce,x.input=Ue,x.avail_in=Ae,K.wrap=Pe,s}var Ee="pako deflate (from Nodeca project)";D.deflateInfo=Ee},16071:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=p;var f=30,_=12;function p(b,h){var a,u,d,i,n,o,t,c,e,r,s,l,v,y,g,m,S,k,w,C,E,T,L,N,Z;a=b.state,u=b.next_in,N=b.input,d=u+(b.avail_in-5),i=b.next_out,Z=b.output,n=i-(h-b.avail_out),o=i+(b.avail_out-257),t=a.dmax,c=a.wsize,e=a.whave,r=a.wnext,s=a.window,l=a.hold,v=a.bits,y=a.lencode,g=a.distcode,m=(1<<a.lenbits)-1,S=(1<<a.distbits)-1;e:do{v<15&&(l+=N[u++]<<v,v+=8,l+=N[u++]<<v,v+=8),k=y[l&m];t:for(;;){if(w=k>>>24,l>>>=w,v-=w,w=k>>>16&255,w===0)Z[i++]=k&65535;else if(w&16){C=k&65535,w&=15,w&&(v<w&&(l+=N[u++]<<v,v+=8),C+=l&(1<<w)-1,l>>>=w,v-=w),v<15&&(l+=N[u++]<<v,v+=8,l+=N[u++]<<v,v+=8),k=g[l&S];r:for(;;){if(w=k>>>24,l>>>=w,v-=w,w=k>>>16&255,w&16){if(E=k&65535,w&=15,v<w&&(l+=N[u++]<<v,v+=8,v<w&&(l+=N[u++]<<v,v+=8)),E+=l&(1<<w)-1,E>t){b.msg="invalid distance too far back",a.mode=f;break e}if(l>>>=w,v-=w,w=i-n,E>w){if(w=E-w,w>e&&a.sane){b.msg="invalid distance too far back",a.mode=f;break e}if(T=0,L=s,r===0){if(T+=c-w,w<C){C-=w;do Z[i++]=s[T++];while(--w);T=i-E,L=Z}}else if(r<w){if(T+=c+r-w,w-=r,w<C){C-=w;do Z[i++]=s[T++];while(--w);if(T=0,r<C){w=r,C-=w;do Z[i++]=s[T++];while(--w);T=i-E,L=Z}}}else if(T+=r-w,w<C){C-=w;do Z[i++]=s[T++];while(--w);T=i-E,L=Z}for(;C>2;)Z[i++]=L[T++],Z[i++]=L[T++],Z[i++]=L[T++],C-=3;C&&(Z[i++]=L[T++],C>1&&(Z[i++]=L[T++]))}else{T=i-E;do Z[i++]=Z[T++],Z[i++]=Z[T++],Z[i++]=Z[T++],C-=3;while(C>2);C&&(Z[i++]=Z[T++],C>1&&(Z[i++]=Z[T++]))}}else if(w&64){b.msg="invalid distance code",a.mode=f;break e}else{k=g[(k&65535)+(l&(1<<w)-1)];continue r}break}}else if(w&64)if(w&32){a.mode=_;break e}else{b.msg="invalid literal/length code",a.mode=f;break e}else{k=y[(k&65535)+(l&(1<<w)-1)];continue t}break}}while(u<d&&i<o);C=v>>3,u-=C,v-=C<<3,l&=(1<<v)-1,b.next_in=u,b.next_out=i,b.avail_in=u<d?5+(d-u):5-(u-d),b.avail_out=i<o?257+(o-i):257-(i-o),a.hold=l,a.bits=v}},95766:function(Xe,D,f){"use strict";function _(j){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(P){return typeof P}:_=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},_(j)}Object.defineProperty(D,"__esModule",{value:!0}),D.inflateReset=Q,D.inflateReset2=R,D.inflateResetKeep=le,D.inflateInit=F,D.inflateInit2=I,D.inflate=se,D.inflateEnd=ae,D.inflateGetHeader=de,D.inflateSetDictionary=we,D.inflateInfo=D.Z_DEFLATED=D.Z_BUF_ERROR=D.Z_MEM_ERROR=D.Z_DATA_ERROR=D.Z_STREAM_ERROR=D.Z_NEED_DICT=D.Z_STREAM_END=D.Z_OK=D.Z_TREES=D.Z_BLOCK=D.Z_FINISH=void 0;var p=n(f(35986)),b=d(f(97580)),h=d(f(1217)),a=d(f(16071)),u=d(f(63093));function d(j){return j&&j.__esModule?j:{default:j}}function i(){if(typeof WeakMap!="function")return null;var j=new WeakMap;return i=function(){return j},j}function n(j){if(j&&j.__esModule)return j;if(j===null||_(j)!=="object"&&typeof j!="function")return{default:j};var fe=i();if(fe&&fe.has(j))return fe.get(j);var P={},he=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ee in j)if(Object.prototype.hasOwnProperty.call(j,Ee)){var x=he?Object.getOwnPropertyDescriptor(j,Ee):null;x&&(x.get||x.set)?Object.defineProperty(P,Ee,x):P[Ee]=j[Ee]}return P.default=j,fe&&fe.set(j,P),P}var o=0,t=1,c=2,e=4;D.Z_FINISH=e;var r=5;D.Z_BLOCK=r;var s=6;D.Z_TREES=s;var l=0;D.Z_OK=l;var v=1;D.Z_STREAM_END=v;var y=2;D.Z_NEED_DICT=y;var g=-2;D.Z_STREAM_ERROR=g;var m=-3;D.Z_DATA_ERROR=m;var S=-4;D.Z_MEM_ERROR=S;var k=-5;D.Z_BUF_ERROR=k;var w=8;D.Z_DEFLATED=w;var C=1,E=2,T=3,L=4,N=5,Z=6,q=7,H=8,z=9,A=10,O=11,X=12,U=13,B=14,Y=15,ue=16,me=17,De=18,Te=19,oe=20,be=21,Fe=22,Re=23,Me=24,Le=25,Oe=26,Ne=27,Ie=28,ie=29,ce=30,re=31,ve=32,V=852,J=592,xe=15,Se=xe;function pe(j){return(j>>>24&255)+(j>>>8&65280)+((j&65280)<<8)+((j&255)<<24)}function ne(){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 p.Buf16(320),this.work=new p.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function le(j){var fe;return!j||!j.state?g:(fe=j.state,j.total_in=j.total_out=fe.total=0,j.msg="",fe.wrap&&(j.adler=fe.wrap&1),fe.mode=C,fe.last=0,fe.havedict=0,fe.dmax=32768,fe.head=null,fe.hold=0,fe.bits=0,fe.lencode=fe.lendyn=new p.Buf32(V),fe.distcode=fe.distdyn=new p.Buf32(J),fe.sane=1,fe.back=-1,l)}function Q(j){var fe;return!j||!j.state?g:(fe=j.state,fe.wsize=0,fe.whave=0,fe.wnext=0,le(j))}function R(j,fe){var P,he;return!j||!j.state||(he=j.state,fe<0?(P=0,fe=-fe):(P=(fe>>4)+1,fe<48&&(fe&=15)),fe&&(fe<8||fe>15))?g:(he.window!==null&&he.wbits!==fe&&(he.window=null),he.wrap=P,he.wbits=fe,Q(j))}function I(j,fe){var P,he;return j?(he=new ne,j.state=he,he.window=null,P=R(j,fe),P!==l&&(j.state=null),P):g}function F(j){return I(j,Se)}var G=!0,_e,ye;function ke(j){if(G){var fe;for(_e=new p.Buf32(512),ye=new p.Buf32(32),fe=0;fe<144;)j.lens[fe++]=8;for(;fe<256;)j.lens[fe++]=9;for(;fe<280;)j.lens[fe++]=7;for(;fe<288;)j.lens[fe++]=8;for((0,u.default)(t,j.lens,0,288,_e,0,j.work,{bits:9}),fe=0;fe<32;)j.lens[fe++]=5;(0,u.default)(c,j.lens,0,32,ye,0,j.work,{bits:5}),G=!1}j.lencode=_e,j.lenbits=9,j.distcode=ye,j.distbits=5}function M(j,fe,P,he){var Ee,x=j.state;return x.window===null&&(x.wsize=1<<x.wbits,x.wnext=0,x.whave=0,x.window=new p.Buf8(x.wsize)),he>=x.wsize?(p.arraySet(x.window,fe,P-x.wsize,x.wsize,0),x.wnext=0,x.whave=x.wsize):(Ee=x.wsize-x.wnext,Ee>he&&(Ee=he),p.arraySet(x.window,fe,P-he,Ee,x.wnext),he-=Ee,he?(p.arraySet(x.window,fe,P-he,he,0),x.wnext=he,x.whave=x.wsize):(x.wnext+=Ee,x.wnext===x.wsize&&(x.wnext=0),x.whave<x.wsize&&(x.whave+=Ee))),0}function se(j,fe){var P,he,Ee,x,te,$,K,W,ee,Pe,Ae,Ce,Ue,tt,Ke=0,He,qe,Ve,Ze,ct,at,Qe,$e,Ge=new p.Buf8(4),je,We,nt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!j||!j.state||!j.output||!j.input&&j.avail_in!==0)return g;P=j.state,P.mode===X&&(P.mode=U),te=j.next_out,Ee=j.output,K=j.avail_out,x=j.next_in,he=j.input,$=j.avail_in,W=P.hold,ee=P.bits,Pe=$,Ae=K,$e=l;e:for(;;)switch(P.mode){case C:if(P.wrap===0){P.mode=U;break}for(;ee<16;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(P.wrap&2&&W===35615){P.check=0,Ge[0]=W&255,Ge[1]=W>>>8&255,P.check=(0,h.default)(P.check,Ge,2,0),W=0,ee=0,P.mode=E;break}if(P.flags=0,P.head&&(P.head.done=!1),!(P.wrap&1)||(((W&255)<<8)+(W>>8))%31){j.msg="incorrect header check",P.mode=ce;break}if((W&15)!==w){j.msg="unknown compression method",P.mode=ce;break}if(W>>>=4,ee-=4,Qe=(W&15)+8,P.wbits===0)P.wbits=Qe;else if(Qe>P.wbits){j.msg="invalid window size",P.mode=ce;break}P.dmax=1<<Qe,j.adler=P.check=1,P.mode=W&512?A:X,W=0,ee=0;break;case E:for(;ee<16;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(P.flags=W,(P.flags&255)!==w){j.msg="unknown compression method",P.mode=ce;break}if(P.flags&57344){j.msg="unknown header flags set",P.mode=ce;break}P.head&&(P.head.text=W>>8&1),P.flags&512&&(Ge[0]=W&255,Ge[1]=W>>>8&255,P.check=(0,h.default)(P.check,Ge,2,0)),W=0,ee=0,P.mode=T;case T:for(;ee<32;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}P.head&&(P.head.time=W),P.flags&512&&(Ge[0]=W&255,Ge[1]=W>>>8&255,Ge[2]=W>>>16&255,Ge[3]=W>>>24&255,P.check=(0,h.default)(P.check,Ge,4,0)),W=0,ee=0,P.mode=L;case L:for(;ee<16;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}P.head&&(P.head.xflags=W&255,P.head.os=W>>8),P.flags&512&&(Ge[0]=W&255,Ge[1]=W>>>8&255,P.check=(0,h.default)(P.check,Ge,2,0)),W=0,ee=0,P.mode=N;case N:if(P.flags&1024){for(;ee<16;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}P.length=W,P.head&&(P.head.extra_len=W),P.flags&512&&(Ge[0]=W&255,Ge[1]=W>>>8&255,P.check=(0,h.default)(P.check,Ge,2,0)),W=0,ee=0}else P.head&&(P.head.extra=null);P.mode=Z;case Z:if(P.flags&1024&&(Ce=P.length,Ce>$&&(Ce=$),Ce&&(P.head&&(Qe=P.head.extra_len-P.length,P.head.extra||(P.head.extra=new Array(P.head.extra_len)),p.arraySet(P.head.extra,he,x,Ce,Qe)),P.flags&512&&(P.check=(0,h.default)(P.check,he,Ce,x)),$-=Ce,x+=Ce,P.length-=Ce),P.length))break e;P.length=0,P.mode=q;case q:if(P.flags&2048){if($===0)break e;Ce=0;do Qe=he[x+Ce++],P.head&&Qe&&P.length<65536&&(P.head.name+=String.fromCharCode(Qe));while(Qe&&Ce<$);if(P.flags&512&&(P.check=(0,h.default)(P.check,he,Ce,x)),$-=Ce,x+=Ce,Qe)break e}else P.head&&(P.head.name=null);P.length=0,P.mode=H;case H:if(P.flags&4096){if($===0)break e;Ce=0;do Qe=he[x+Ce++],P.head&&Qe&&P.length<65536&&(P.head.comment+=String.fromCharCode(Qe));while(Qe&&Ce<$);if(P.flags&512&&(P.check=(0,h.default)(P.check,he,Ce,x)),$-=Ce,x+=Ce,Qe)break e}else P.head&&(P.head.comment=null);P.mode=z;case z:if(P.flags&512){for(;ee<16;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(W!==(P.check&65535)){j.msg="header crc mismatch",P.mode=ce;break}W=0,ee=0}P.head&&(P.head.hcrc=P.flags>>9&1,P.head.done=!0),j.adler=P.check=0,P.mode=X;break;case A:for(;ee<32;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}j.adler=P.check=pe(W),W=0,ee=0,P.mode=O;case O:if(P.havedict===0)return j.next_out=te,j.avail_out=K,j.next_in=x,j.avail_in=$,P.hold=W,P.bits=ee,y;j.adler=P.check=1,P.mode=X;case X:if(fe===r||fe===s)break e;case U:if(P.last){W>>>=ee&7,ee-=ee&7,P.mode=Ne;break}for(;ee<3;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}switch(P.last=W&1,W>>>=1,ee-=1,W&3){case 0:P.mode=B;break;case 1:if(ke(P),P.mode=oe,fe===s){W>>>=2,ee-=2;break e}break;case 2:P.mode=me;break;case 3:j.msg="invalid block type",P.mode=ce}W>>>=2,ee-=2;break;case B:for(W>>>=ee&7,ee-=ee&7;ee<32;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if((W&65535)!==(W>>>16^65535)){j.msg="invalid stored block lengths",P.mode=ce;break}if(P.length=W&65535,W=0,ee=0,P.mode=Y,fe===s)break e;case Y:P.mode=ue;case ue:if(Ce=P.length,Ce){if(Ce>$&&(Ce=$),Ce>K&&(Ce=K),Ce===0)break e;p.arraySet(Ee,he,x,Ce,te),$-=Ce,x+=Ce,K-=Ce,te+=Ce,P.length-=Ce;break}P.mode=X;break;case me:for(;ee<14;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(P.nlen=(W&31)+257,W>>>=5,ee-=5,P.ndist=(W&31)+1,W>>>=5,ee-=5,P.ncode=(W&15)+4,W>>>=4,ee-=4,P.nlen>286||P.ndist>30){j.msg="too many length or distance symbols",P.mode=ce;break}P.have=0,P.mode=De;case De:for(;P.have<P.ncode;){for(;ee<3;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}P.lens[nt[P.have++]]=W&7,W>>>=3,ee-=3}for(;P.have<19;)P.lens[nt[P.have++]]=0;if(P.lencode=P.lendyn,P.lenbits=7,je={bits:P.lenbits},$e=(0,u.default)(o,P.lens,0,19,P.lencode,0,P.work,je),P.lenbits=je.bits,$e){j.msg="invalid code lengths set",P.mode=ce;break}P.have=0,P.mode=Te;case Te:for(;P.have<P.nlen+P.ndist;){for(;Ke=P.lencode[W&(1<<P.lenbits)-1],He=Ke>>>24,qe=Ke>>>16&255,Ve=Ke&65535,!(He<=ee);){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(Ve<16)W>>>=He,ee-=He,P.lens[P.have++]=Ve;else{if(Ve===16){for(We=He+2;ee<We;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(W>>>=He,ee-=He,P.have===0){j.msg="invalid bit length repeat",P.mode=ce;break}Qe=P.lens[P.have-1],Ce=3+(W&3),W>>>=2,ee-=2}else if(Ve===17){for(We=He+3;ee<We;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}W>>>=He,ee-=He,Qe=0,Ce=3+(W&7),W>>>=3,ee-=3}else{for(We=He+7;ee<We;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}W>>>=He,ee-=He,Qe=0,Ce=11+(W&127),W>>>=7,ee-=7}if(P.have+Ce>P.nlen+P.ndist){j.msg="invalid bit length repeat",P.mode=ce;break}for(;Ce--;)P.lens[P.have++]=Qe}}if(P.mode===ce)break;if(P.lens[256]===0){j.msg="invalid code -- missing end-of-block",P.mode=ce;break}if(P.lenbits=9,je={bits:P.lenbits},$e=(0,u.default)(t,P.lens,0,P.nlen,P.lencode,0,P.work,je),P.lenbits=je.bits,$e){j.msg="invalid literal/lengths set",P.mode=ce;break}if(P.distbits=6,P.distcode=P.distdyn,je={bits:P.distbits},$e=(0,u.default)(c,P.lens,P.nlen,P.ndist,P.distcode,0,P.work,je),P.distbits=je.bits,$e){j.msg="invalid distances set",P.mode=ce;break}if(P.mode=oe,fe===s)break e;case oe:P.mode=be;case be:if($>=6&&K>=258){j.next_out=te,j.avail_out=K,j.next_in=x,j.avail_in=$,P.hold=W,P.bits=ee,(0,a.default)(j,Ae),te=j.next_out,Ee=j.output,K=j.avail_out,x=j.next_in,he=j.input,$=j.avail_in,W=P.hold,ee=P.bits,P.mode===X&&(P.back=-1);break}for(P.back=0;Ke=P.lencode[W&(1<<P.lenbits)-1],He=Ke>>>24,qe=Ke>>>16&255,Ve=Ke&65535,!(He<=ee);){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(qe&&!(qe&240)){for(Ze=He,ct=qe,at=Ve;Ke=P.lencode[at+((W&(1<<Ze+ct)-1)>>Ze)],He=Ke>>>24,qe=Ke>>>16&255,Ve=Ke&65535,!(Ze+He<=ee);){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}W>>>=Ze,ee-=Ze,P.back+=Ze}if(W>>>=He,ee-=He,P.back+=He,P.length=Ve,qe===0){P.mode=Oe;break}if(qe&32){P.back=-1,P.mode=X;break}if(qe&64){j.msg="invalid literal/length code",P.mode=ce;break}P.extra=qe&15,P.mode=Fe;case Fe:if(P.extra){for(We=P.extra;ee<We;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}P.length+=W&(1<<P.extra)-1,W>>>=P.extra,ee-=P.extra,P.back+=P.extra}P.was=P.length,P.mode=Re;case Re:for(;Ke=P.distcode[W&(1<<P.distbits)-1],He=Ke>>>24,qe=Ke>>>16&255,Ve=Ke&65535,!(He<=ee);){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(!(qe&240)){for(Ze=He,ct=qe,at=Ve;Ke=P.distcode[at+((W&(1<<Ze+ct)-1)>>Ze)],He=Ke>>>24,qe=Ke>>>16&255,Ve=Ke&65535,!(Ze+He<=ee);){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}W>>>=Ze,ee-=Ze,P.back+=Ze}if(W>>>=He,ee-=He,P.back+=He,qe&64){j.msg="invalid distance code",P.mode=ce;break}P.offset=Ve,P.extra=qe&15,P.mode=Me;case Me:if(P.extra){for(We=P.extra;ee<We;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}P.offset+=W&(1<<P.extra)-1,W>>>=P.extra,ee-=P.extra,P.back+=P.extra}if(P.offset>P.dmax){j.msg="invalid distance too far back",P.mode=ce;break}P.mode=Le;case Le:if(K===0)break e;if(Ce=Ae-K,P.offset>Ce){if(Ce=P.offset-Ce,Ce>P.whave&&P.sane){j.msg="invalid distance too far back",P.mode=ce;break}Ce>P.wnext?(Ce-=P.wnext,Ue=P.wsize-Ce):Ue=P.wnext-Ce,Ce>P.length&&(Ce=P.length),tt=P.window}else tt=Ee,Ue=te-P.offset,Ce=P.length;Ce>K&&(Ce=K),K-=Ce,P.length-=Ce;do Ee[te++]=tt[Ue++];while(--Ce);P.length===0&&(P.mode=be);break;case Oe:if(K===0)break e;Ee[te++]=P.length,K--,P.mode=be;break;case Ne:if(P.wrap){for(;ee<32;){if($===0)break e;$--,W|=he[x++]<<ee,ee+=8}if(Ae-=K,j.total_out+=Ae,P.total+=Ae,Ae&&(j.adler=P.check=P.flags?(0,h.default)(P.check,Ee,Ae,te-Ae):(0,b.default)(P.check,Ee,Ae,te-Ae)),Ae=K,(P.flags?W:pe(W))!==P.check){j.msg="incorrect data check",P.mode=ce;break}W=0,ee=0}P.mode=Ie;case Ie:if(P.wrap&&P.flags){for(;ee<32;){if($===0)break e;$--,W+=he[x++]<<ee,ee+=8}if(W!==(P.total&4294967295)){j.msg="incorrect length check",P.mode=ce;break}W=0,ee=0}P.mode=ie;case ie:$e=v;break e;case ce:$e=m;break e;case re:return S;case ve:default:return g}return j.next_out=te,j.avail_out=K,j.next_in=x,j.avail_in=$,P.hold=W,P.bits=ee,(P.wsize||Ae!==j.avail_out&&P.mode<ce&&(P.mode<Ne||fe!==e))&&M(j,j.output,j.next_out,Ae-j.avail_out)?(P.mode=re,S):(Pe-=j.avail_in,Ae-=j.avail_out,j.total_in+=Pe,j.total_out+=Ae,P.total+=Ae,P.wrap&&Ae&&(j.adler=P.check=P.flags?(0,h.default)(P.check,Ee,Ae,j.next_out-Ae):(0,b.default)(P.check,Ee,Ae,j.next_out-Ae)),j.data_type=P.bits+(P.last?64:0)+(P.mode===X?128:0)+(P.mode===oe||P.mode===Y?256:0),(Pe===0&&Ae===0||fe===e)&&$e===l&&($e=k),$e)}function ae(j){if(!j||!j.state)return g;var fe=j.state;return fe.window&&(fe.window=null),j.state=null,l}function de(j,fe){var P;return!j||!j.state||(P=j.state,!(P.wrap&2))?g:(P.head=fe,fe.done=!1,l)}function we(j,fe){var P=fe.length,he,Ee,x;return!j||!j.state||(he=j.state,he.wrap!==0&&he.mode!==O)?g:he.mode===O&&(Ee=1,Ee=(0,b.default)(Ee,fe,P,0),Ee!==he.check)?m:(x=M(j,fe,P,P),x?(he.mode=re,S):(he.havedict=1,l))}var ge="pako inflate (from Nodeca project)";D.inflateInfo=ge},63093:function(Xe,D,f){"use strict";function _(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(y){return typeof y}:_=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},_(l)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=s;var p=h(f(35986));function b(){if(typeof WeakMap!="function")return null;var l=new WeakMap;return b=function(){return l},l}function h(l){if(l&&l.__esModule)return l;if(l===null||_(l)!=="object"&&typeof l!="function")return{default:l};var v=b();if(v&&v.has(l))return v.get(l);var y={},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in l)if(Object.prototype.hasOwnProperty.call(l,m)){var S=g?Object.getOwnPropertyDescriptor(l,m):null;S&&(S.get||S.set)?Object.defineProperty(y,m,S):y[m]=l[m]}return y.default=l,v&&v.set(l,y),y}var a=15,u=852,d=592,i=0,n=1,o=2,t=[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],c=[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],e=[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],r=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function s(l,v,y,g,m,S,k,w){var C=w.bits,E=0,T=0,L=0,N=0,Z=0,q=0,H=0,z=0,A=0,O=0,X,U,B,Y,ue,me=null,De=0,Te,oe=new p.Buf16(a+1),be=new p.Buf16(a+1),Fe=null,Re=0,Me,Le,Oe;for(E=0;E<=a;E++)oe[E]=0;for(T=0;T<g;T++)oe[v[y+T]]++;for(Z=C,N=a;N>=1&&oe[N]===0;N--);if(Z>N&&(Z=N),N===0)return m[S++]=1<<24|64<<16|0,m[S++]=1<<24|64<<16|0,w.bits=1,0;for(L=1;L<N&&oe[L]===0;L++);for(Z<L&&(Z=L),z=1,E=1;E<=a;E++)if(z<<=1,z-=oe[E],z<0)return-1;if(z>0&&(l===i||N!==1))return-1;for(be[1]=0,E=1;E<a;E++)be[E+1]=be[E]+oe[E];for(T=0;T<g;T++)v[y+T]!==0&&(k[be[v[y+T]]++]=T);if(l===i?(me=Fe=k,Te=19):l===n?(me=t,De-=257,Fe=c,Re-=257,Te=256):(me=e,Fe=r,Te=-1),O=0,T=0,E=L,ue=S,q=Z,H=0,B=-1,A=1<<Z,Y=A-1,l===n&&A>u||l===o&&A>d)return 1;for(;;){Me=E-H,k[T]<Te?(Le=0,Oe=k[T]):k[T]>Te?(Le=Fe[Re+k[T]],Oe=me[De+k[T]]):(Le=96,Oe=0),X=1<<E-H,U=1<<q,L=U;do U-=X,m[ue+(O>>H)+U]=Me<<24|Le<<16|Oe|0;while(U!==0);for(X=1<<E-1;O&X;)X>>=1;if(X!==0?(O&=X-1,O+=X):O=0,T++,--oe[E]===0){if(E===N)break;E=v[y+k[T]]}if(E>Z&&(O&Y)!==B){for(H===0&&(H=Z),ue+=L,q=E-H,z=1<<q;q+H<N&&(z-=oe[q+H],!(z<=0));)q++,z<<=1;if(A+=1<<q,l===n&&A>u||l===o&&A>d)return 1;B=O&Y,m[B]=Z<<24|q<<16|ue-S|0}}return O!==0&&(m[ue+O]=E-H<<24|64<<16|0),w.bits=Z,0}},70892:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var f={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};D.default=f},55796:function(Xe,D,f){"use strict";function _(M){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(ae){return typeof ae}:_=function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},_(M)}Object.defineProperty(D,"__esModule",{value:!0}),D._tr_init=F,D._tr_stored_block=G,D._tr_flush_block=ye,D._tr_tally=ke,D._tr_align=_e;var p=h(f(35986));function b(){if(typeof WeakMap!="function")return null;var M=new WeakMap;return b=function(){return M},M}function h(M){if(M&&M.__esModule)return M;if(M===null||_(M)!=="object"&&typeof M!="function")return{default:M};var se=b();if(se&&se.has(M))return se.get(M);var ae={},de=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var we in M)if(Object.prototype.hasOwnProperty.call(M,we)){var ge=de?Object.getOwnPropertyDescriptor(M,we):null;ge&&(ge.get||ge.set)?Object.defineProperty(ae,we,ge):ae[we]=M[we]}return ae.default=M,se&&se.set(M,ae),ae}var a=4,u=0,d=1,i=2;function n(M){for(var se=M.length;--se>=0;)M[se]=0}var o=0,t=1,c=2,e=3,r=258,s=29,l=256,v=l+1+s,y=30,g=19,m=2*v+1,S=15,k=16,w=7,C=256,E=16,T=17,L=18,N=[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],Z=[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],q=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=512,A=new Array((v+2)*2);n(A);var O=new Array(y*2);n(O);var X=new Array(z);n(X);var U=new Array(r-e+1);n(U);var B=new Array(s);n(B);var Y=new Array(y);n(Y);function ue(M,se,ae,de,we){this.static_tree=M,this.extra_bits=se,this.extra_base=ae,this.elems=de,this.max_length=we,this.has_stree=M&&M.length}var me,De,Te;function oe(M,se){this.dyn_tree=M,this.max_code=0,this.stat_desc=se}function be(M){return M<256?X[M]:X[256+(M>>>7)]}function Fe(M,se){M.pending_buf[M.pending++]=se&255,M.pending_buf[M.pending++]=se>>>8&255}function Re(M,se,ae){M.bi_valid>k-ae?(M.bi_buf|=se<<M.bi_valid&65535,Fe(M,M.bi_buf),M.bi_buf=se>>k-M.bi_valid,M.bi_valid+=ae-k):(M.bi_buf|=se<<M.bi_valid&65535,M.bi_valid+=ae)}function Me(M,se,ae){Re(M,ae[se*2],ae[se*2+1])}function Le(M,se){var ae=0;do ae|=M&1,M>>>=1,ae<<=1;while(--se>0);return ae>>>1}function Oe(M){M.bi_valid===16?(Fe(M,M.bi_buf),M.bi_buf=0,M.bi_valid=0):M.bi_valid>=8&&(M.pending_buf[M.pending++]=M.bi_buf&255,M.bi_buf>>=8,M.bi_valid-=8)}function Ne(M,se){var ae=se.dyn_tree,de=se.max_code,we=se.stat_desc.static_tree,ge=se.stat_desc.has_stree,j=se.stat_desc.extra_bits,fe=se.stat_desc.extra_base,P=se.stat_desc.max_length,he,Ee,x,te,$,K,W=0;for(te=0;te<=S;te++)M.bl_count[te]=0;for(ae[M.heap[M.heap_max]*2+1]=0,he=M.heap_max+1;he<m;he++)Ee=M.heap[he],te=ae[ae[Ee*2+1]*2+1]+1,te>P&&(te=P,W++),ae[Ee*2+1]=te,!(Ee>de)&&(M.bl_count[te]++,$=0,Ee>=fe&&($=j[Ee-fe]),K=ae[Ee*2],M.opt_len+=K*(te+$),ge&&(M.static_len+=K*(we[Ee*2+1]+$)));if(W!==0){do{for(te=P-1;M.bl_count[te]===0;)te--;M.bl_count[te]--,M.bl_count[te+1]+=2,M.bl_count[P]--,W-=2}while(W>0);for(te=P;te!==0;te--)for(Ee=M.bl_count[te];Ee!==0;)x=M.heap[--he],!(x>de)&&(ae[x*2+1]!==te&&(M.opt_len+=(te-ae[x*2+1])*ae[x*2],ae[x*2+1]=te),Ee--)}}function Ie(M,se,ae){var de=new Array(S+1),we=0,ge,j;for(ge=1;ge<=S;ge++)de[ge]=we=we+ae[ge-1]<<1;for(j=0;j<=se;j++){var fe=M[j*2+1];fe!==0&&(M[j*2]=Le(de[fe]++,fe))}}function ie(){var M,se,ae,de,we,ge=new Array(S+1);for(ae=0,de=0;de<s-1;de++)for(B[de]=ae,M=0;M<1<<N[de];M++)U[ae++]=de;for(U[ae-1]=de,we=0,de=0;de<16;de++)for(Y[de]=we,M=0;M<1<<Z[de];M++)X[we++]=de;for(we>>=7;de<y;de++)for(Y[de]=we<<7,M=0;M<1<<Z[de]-7;M++)X[256+we++]=de;for(se=0;se<=S;se++)ge[se]=0;for(M=0;M<=143;)A[M*2+1]=8,M++,ge[8]++;for(;M<=255;)A[M*2+1]=9,M++,ge[9]++;for(;M<=279;)A[M*2+1]=7,M++,ge[7]++;for(;M<=287;)A[M*2+1]=8,M++,ge[8]++;for(Ie(A,v+1,ge),M=0;M<y;M++)O[M*2+1]=5,O[M*2]=Le(M,5);me=new ue(A,N,l+1,v,S),De=new ue(O,Z,0,y,S),Te=new ue(new Array(0),q,0,g,w)}function ce(M){var se;for(se=0;se<v;se++)M.dyn_ltree[se*2]=0;for(se=0;se<y;se++)M.dyn_dtree[se*2]=0;for(se=0;se<g;se++)M.bl_tree[se*2]=0;M.dyn_ltree[C*2]=1,M.opt_len=M.static_len=0,M.last_lit=M.matches=0}function re(M){M.bi_valid>8?Fe(M,M.bi_buf):M.bi_valid>0&&(M.pending_buf[M.pending++]=M.bi_buf),M.bi_buf=0,M.bi_valid=0}function ve(M,se,ae,de){re(M),de&&(Fe(M,ae),Fe(M,~ae)),p.arraySet(M.pending_buf,M.window,se,ae,M.pending),M.pending+=ae}function V(M,se,ae,de){var we=se*2,ge=ae*2;return M[we]<M[ge]||M[we]===M[ge]&&de[se]<=de[ae]}function J(M,se,ae){for(var de=M.heap[ae],we=ae<<1;we<=M.heap_len&&(we<M.heap_len&&V(se,M.heap[we+1],M.heap[we],M.depth)&&we++,!V(se,de,M.heap[we],M.depth));)M.heap[ae]=M.heap[we],ae=we,we<<=1;M.heap[ae]=de}function xe(M,se,ae){var de,we,ge=0,j,fe;if(M.last_lit!==0)do de=M.pending_buf[M.d_buf+ge*2]<<8|M.pending_buf[M.d_buf+ge*2+1],we=M.pending_buf[M.l_buf+ge],ge++,de===0?Me(M,we,se):(j=U[we],Me(M,j+l+1,se),fe=N[j],fe!==0&&(we-=B[j],Re(M,we,fe)),de--,j=be(de),Me(M,j,ae),fe=Z[j],fe!==0&&(de-=Y[j],Re(M,de,fe)));while(ge<M.last_lit);Me(M,C,se)}function Se(M,se){var ae=se.dyn_tree,de=se.stat_desc.static_tree,we=se.stat_desc.has_stree,ge=se.stat_desc.elems,j,fe,P=-1,he;for(M.heap_len=0,M.heap_max=m,j=0;j<ge;j++)ae[j*2]!==0?(M.heap[++M.heap_len]=P=j,M.depth[j]=0):ae[j*2+1]=0;for(;M.heap_len<2;)he=M.heap[++M.heap_len]=P<2?++P:0,ae[he*2]=1,M.depth[he]=0,M.opt_len--,we&&(M.static_len-=de[he*2+1]);for(se.max_code=P,j=M.heap_len>>1;j>=1;j--)J(M,ae,j);he=ge;do j=M.heap[1],M.heap[1]=M.heap[M.heap_len--],J(M,ae,1),fe=M.heap[1],M.heap[--M.heap_max]=j,M.heap[--M.heap_max]=fe,ae[he*2]=ae[j*2]+ae[fe*2],M.depth[he]=(M.depth[j]>=M.depth[fe]?M.depth[j]:M.depth[fe])+1,ae[j*2+1]=ae[fe*2+1]=he,M.heap[1]=he++,J(M,ae,1);while(M.heap_len>=2);M.heap[--M.heap_max]=M.heap[1],Ne(M,se),Ie(ae,P,M.bl_count)}function pe(M,se,ae){var de,we=-1,ge,j=se[0*2+1],fe=0,P=7,he=4;for(j===0&&(P=138,he=3),se[(ae+1)*2+1]=65535,de=0;de<=ae;de++)ge=j,j=se[(de+1)*2+1],!(++fe<P&&ge===j)&&(fe<he?M.bl_tree[ge*2]+=fe:ge!==0?(ge!==we&&M.bl_tree[ge*2]++,M.bl_tree[E*2]++):fe<=10?M.bl_tree[T*2]++:M.bl_tree[L*2]++,fe=0,we=ge,j===0?(P=138,he=3):ge===j?(P=6,he=3):(P=7,he=4))}function ne(M,se,ae){var de,we=-1,ge,j=se[0*2+1],fe=0,P=7,he=4;for(j===0&&(P=138,he=3),de=0;de<=ae;de++)if(ge=j,j=se[(de+1)*2+1],!(++fe<P&&ge===j)){if(fe<he)do Me(M,ge,M.bl_tree);while(--fe!==0);else ge!==0?(ge!==we&&(Me(M,ge,M.bl_tree),fe--),Me(M,E,M.bl_tree),Re(M,fe-3,2)):fe<=10?(Me(M,T,M.bl_tree),Re(M,fe-3,3)):(Me(M,L,M.bl_tree),Re(M,fe-11,7));fe=0,we=ge,j===0?(P=138,he=3):ge===j?(P=6,he=3):(P=7,he=4)}}function le(M){var se;for(pe(M,M.dyn_ltree,M.l_desc.max_code),pe(M,M.dyn_dtree,M.d_desc.max_code),Se(M,M.bl_desc),se=g-1;se>=3&&M.bl_tree[H[se]*2+1]===0;se--);return M.opt_len+=3*(se+1)+5+5+4,se}function Q(M,se,ae,de){var we;for(Re(M,se-257,5),Re(M,ae-1,5),Re(M,de-4,4),we=0;we<de;we++)Re(M,M.bl_tree[H[we]*2+1],3);ne(M,M.dyn_ltree,se-1),ne(M,M.dyn_dtree,ae-1)}function R(M){var se=4093624447,ae;for(ae=0;ae<=31;ae++,se>>>=1)if(se&1&&M.dyn_ltree[ae*2]!==0)return u;if(M.dyn_ltree[9*2]!==0||M.dyn_ltree[10*2]!==0||M.dyn_ltree[13*2]!==0)return d;for(ae=32;ae<l;ae++)if(M.dyn_ltree[ae*2]!==0)return d;return u}var I=!1;function F(M){I||(ie(),I=!0),M.l_desc=new oe(M.dyn_ltree,me),M.d_desc=new oe(M.dyn_dtree,De),M.bl_desc=new oe(M.bl_tree,Te),M.bi_buf=0,M.bi_valid=0,ce(M)}function G(M,se,ae,de){Re(M,(o<<1)+(de?1:0),3),ve(M,se,ae,!0)}function _e(M){Re(M,t<<1,3),Me(M,C,A),Oe(M)}function ye(M,se,ae,de){var we,ge,j=0;M.level>0?(M.strm.data_type===i&&(M.strm.data_type=R(M)),Se(M,M.l_desc),Se(M,M.d_desc),j=le(M),we=M.opt_len+3+7>>>3,ge=M.static_len+3+7>>>3,ge<=we&&(we=ge)):we=ge=ae+5,ae+4<=we&&se!==-1?G(M,se,ae,de):M.strategy===a||ge===we?(Re(M,(t<<1)+(de?1:0),3),xe(M,A,O)):(Re(M,(c<<1)+(de?1:0),3),Q(M,M.l_desc.max_code+1,M.d_desc.max_code+1,j+1),xe(M,M.dyn_ltree,M.dyn_dtree)),ce(M),de&&re(M)}function ke(M,se,ae){return M.pending_buf[M.d_buf+M.last_lit*2]=se>>>8&255,M.pending_buf[M.d_buf+M.last_lit*2+1]=se&255,M.pending_buf[M.l_buf+M.last_lit]=ae&255,M.last_lit++,se===0?M.dyn_ltree[ae*2]++:(M.matches++,se--,M.dyn_ltree[(U[ae]+l+1)*2]++,M.dyn_dtree[be(se)*2]++),M.last_lit===M.lit_bufsize-1}},27589:function(Xe,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=f;function f(){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}},16327:function(Xe,D,f){"use strict";function _(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(e){return typeof e}:_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(t)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=h(f(50500));function b(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return b=function(){return t},t}function h(t){if(t&&t.__esModule)return t;if(t===null||_(t)!=="object"&&typeof t!="function")return{default:t};var c=b();if(c&&c.has(t))return c.get(t);var e={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var l=r?Object.getOwnPropertyDescriptor(t,s):null;l&&(l.get||l.set)?Object.defineProperty(e,s,l):e[s]=t[s]}return e.default=t,c&&c.set(t,e),e}function a(t,c){if(!(t instanceof c))throw new TypeError("Cannot call a class as a function")}function u(t,c){for(var e=0;e<c.length;e++){var r=c[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,c,e){return c&&u(t.prototype,c),e&&u(t,e),t}var i=!1,n=40*1024*1024,o=function(){function t(){a(this,t),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(t,[{key:"rQpeek8",value:function(){return this._rQ[this._rQi]}},{key:"rQskipBytes",value:function(e){this._rQi+=e}},{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(e){for(var r=0,s=e-1;s>=0;s--)r+=this._rQ[this._rQi++]<<s*8;return r}},{key:"rQshiftStr",value:function(e){typeof e=="undefined"&&(e=this.rQlen);for(var r="",s=0;s<e;s+=4096){var l=this.rQshiftBytes(Math.min(4096,e-s));r+=String.fromCharCode.apply(null,l)}return r}},{key:"rQshiftBytes",value:function(e){return typeof e=="undefined"&&(e=this.rQlen),this._rQi+=e,new Uint8Array(this._rQ.buffer,this._rQi-e,e)}},{key:"rQshiftTo",value:function(e,r){r===void 0&&(r=this.rQlen),e.set(new Uint8Array(this._rQ.buffer,this._rQi,r)),this._rQi+=r}},{key:"rQslice",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+e,r-e)}},{key:"rQwait",value:function(e,r,s){if(this.rQlen<r){if(s){if(this._rQi<s)throw new Error("rQwait cannot backup "+s+" bytes");this._rQi-=s}return!0}return!1}},{key:"flush",value:function(){this._sQlen>0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(e){this._sQ.set(e,this._sQlen),this._sQlen+=e.length,this.flush()}},{key:"sendString",value:function(e){this.send(e.split("").map(function(r){return r.charCodeAt(0)}))}},{key:"off",value:function(e){this._eventHandlers[e]=function(){}}},{key:"on",value:function(e,r){this._eventHandlers[e]=r}},{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(e,r){var s=this;this.init(),this._websocket=new WebSocket(e,r),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){p.Debug(">> WebSock.onopen"),s._websocket.protocol&&p.Info("Server choose sub-protocol: "+s._websocket.protocol),s._eventHandlers.open(),p.Debug("<< WebSock.onopen")},this._websocket.onclose=function(l){p.Debug(">> WebSock.onclose"),s._eventHandlers.close(l),p.Debug("<< WebSock.onclose")},this._websocket.onerror=function(l){p.Debug(">> WebSock.onerror: "+l),s._eventHandlers.error(l),p.Debug("<< WebSock.onerror: "+l)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(p.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(e){var r=(this._rQlen-this._rQi+e)*8,s=this._rQbufferSize<r;if(s&&(this._rQbufferSize=Math.max(this._rQbufferSize*2,r)),this._rQbufferSize>n&&(this._rQbufferSize=n,this._rQbufferSize-this.rQlen<e))throw new Error("Receive Queue buffer exceeded "+n+" bytes, and the new message could not fit");if(s){var l=this._rQ.buffer;this._rQ=new Uint8Array(this._rQbufferSize),this._rQ.set(new Uint8Array(l,this._rQi,this._rQlen-this._rQi))}else i?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(e){var r=new Uint8Array(e);r.length>this._rQbufferSize-this._rQlen&&this._expandCompactRQ(r.length),this._rQ.set(r,this._rQlen),this._rQlen+=r.length}},{key:"_recvMessage",value:function(e){this._DecodeMessage(e.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):p.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(e){this._rQi=e}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),t}();D.default=o},66003:function(Xe,D,f){"use strict";f.d(D,{Z:function(){return d}});var _=f(43079),p=f(27247),b=f(34666),h=f(59301),a=["show"];function u(i,n){if(!n.max)return!0;var o=n.strategy(i);return o<=n.max}function d(i,n){return h.useMemo(function(){var o={};n&&(o.show=(0,b.Z)(n)==="object"&&n.formatter?n.formatter:!!n),o=(0,p.Z)((0,p.Z)({},o),i);var t=o,c=t.show,e=(0,_.Z)(t,a);return(0,p.Z)((0,p.Z)({},e),{},{show:!!c,showFormatter:typeof c=="function"?c:void 0,strategy:e.strategy||function(r){return r.length}})},[i,n])}},36901:function(Xe,D,f){"use strict";f.r(D),f.d(D,{BaseInput:function(){return o},default:function(){return m}});var _=f(27247),p=f(32855),b=f(74430),h=f(34666),a=f(92310),u=f.n(a),d=f(59301),i=f(30292),n=d.forwardRef(function(S,k){var w,C,E,T=S.inputElement,L=S.children,N=S.prefixCls,Z=S.prefix,q=S.suffix,H=S.addonBefore,z=S.addonAfter,A=S.className,O=S.style,X=S.disabled,U=S.readOnly,B=S.focused,Y=S.triggerFocus,ue=S.allowClear,me=S.value,De=S.handleReset,Te=S.hidden,oe=S.classes,be=S.classNames,Fe=S.dataAttrs,Re=S.styles,Me=S.components,Le=S.onClear,Oe=L!=null?L:T,Ne=(Me==null?void 0:Me.affixWrapper)||"span",Ie=(Me==null?void 0:Me.groupWrapper)||"span",ie=(Me==null?void 0:Me.wrapper)||"span",ce=(Me==null?void 0:Me.groupAddon)||"span",re=(0,d.useRef)(null),ve=function(se){var ae;(ae=re.current)!==null&&ae!==void 0&&ae.contains(se.target)&&(Y==null||Y())},V=(0,i.X3)(S),J=(0,d.cloneElement)(Oe,{value:me,className:u()((w=Oe.props)===null||w===void 0?void 0:w.className,!V&&(be==null?void 0:be.variant))||null}),xe=(0,d.useRef)(null);if(d.useImperativeHandle(k,function(){return{nativeElement:xe.current||re.current}}),V){var Se=null;if(ue){var pe=!X&&!U&&me,ne="".concat(N,"-clear-icon"),le=(0,h.Z)(ue)==="object"&&ue!==null&&ue!==void 0&&ue.clearIcon?ue.clearIcon:"\u2716";Se=d.createElement("button",{type:"button",tabIndex:-1,onClick:function(se){De==null||De(se),Le==null||Le()},onMouseDown:function(se){return se.preventDefault()},className:u()(ne,(0,b.Z)((0,b.Z)({},"".concat(ne,"-hidden"),!pe),"".concat(ne,"-has-suffix"),!!q))},le)}var Q="".concat(N,"-affix-wrapper"),R=u()(Q,(0,b.Z)((0,b.Z)((0,b.Z)((0,b.Z)((0,b.Z)({},"".concat(N,"-disabled"),X),"".concat(Q,"-disabled"),X),"".concat(Q,"-focused"),B),"".concat(Q,"-readonly"),U),"".concat(Q,"-input-with-clear-btn"),q&&ue&&me),oe==null?void 0:oe.affixWrapper,be==null?void 0:be.affixWrapper,be==null?void 0:be.variant),I=(q||ue)&&d.createElement("span",{className:u()("".concat(N,"-suffix"),be==null?void 0:be.suffix),style:Re==null?void 0:Re.suffix},Se,q);J=d.createElement(Ne,(0,p.Z)({className:R,style:Re==null?void 0:Re.affixWrapper,onClick:ve},Fe==null?void 0:Fe.affixWrapper,{ref:re}),Z&&d.createElement("span",{className:u()("".concat(N,"-prefix"),be==null?void 0:be.prefix),style:Re==null?void 0:Re.prefix},Z),J,I)}if((0,i.He)(S)){var F="".concat(N,"-group"),G="".concat(F,"-addon"),_e="".concat(F,"-wrapper"),ye=u()("".concat(N,"-wrapper"),F,oe==null?void 0:oe.wrapper,be==null?void 0:be.wrapper),ke=u()(_e,(0,b.Z)({},"".concat(_e,"-disabled"),X),oe==null?void 0:oe.group,be==null?void 0:be.groupWrapper);J=d.createElement(Ie,{className:ke,ref:xe},d.createElement(ie,{className:ye},H&&d.createElement(ce,{className:G},H),J,z&&d.createElement(ce,{className:G},z)))}return d.cloneElement(J,{className:u()((C=J.props)===null||C===void 0?void 0:C.className,A)||null,style:(0,_.Z)((0,_.Z)({},(E=J.props)===null||E===void 0?void 0:E.style),O),hidden:Te})}),o=n,t=f(3300),c=f(11913),e=f(43079),r=f(18929),s=f(2738),l=f(66003),v=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],y=(0,d.forwardRef)(function(S,k){var w=S.autoComplete,C=S.onChange,E=S.onFocus,T=S.onBlur,L=S.onPressEnter,N=S.onKeyDown,Z=S.onKeyUp,q=S.prefixCls,H=q===void 0?"rc-input":q,z=S.disabled,A=S.htmlSize,O=S.className,X=S.maxLength,U=S.suffix,B=S.showCount,Y=S.count,ue=S.type,me=ue===void 0?"text":ue,De=S.classes,Te=S.classNames,oe=S.styles,be=S.onCompositionStart,Fe=S.onCompositionEnd,Re=(0,e.Z)(S,v),Me=(0,d.useState)(!1),Le=(0,c.Z)(Me,2),Oe=Le[0],Ne=Le[1],Ie=(0,d.useRef)(!1),ie=(0,d.useRef)(!1),ce=(0,d.useRef)(null),re=(0,d.useRef)(null),ve=function(Ee){ce.current&&(0,i.nH)(ce.current,Ee)},V=(0,r.Z)(S.defaultValue,{value:S.value}),J=(0,c.Z)(V,2),xe=J[0],Se=J[1],pe=xe==null?"":String(xe),ne=(0,d.useState)(null),le=(0,c.Z)(ne,2),Q=le[0],R=le[1],I=(0,l.Z)(Y,B),F=I.max||X,G=I.strategy(pe),_e=!!F&&G>F;(0,d.useImperativeHandle)(k,function(){var he;return{focus:ve,blur:function(){var x;(x=ce.current)===null||x===void 0||x.blur()},setSelectionRange:function(x,te,$){var K;(K=ce.current)===null||K===void 0||K.setSelectionRange(x,te,$)},select:function(){var x;(x=ce.current)===null||x===void 0||x.select()},input:ce.current,nativeElement:((he=re.current)===null||he===void 0?void 0:he.nativeElement)||ce.current}}),(0,d.useEffect)(function(){ie.current&&(ie.current=!1),Ne(function(he){return he&&z?!1:he})},[z]);var ye=function(Ee,x,te){var $=x;if(!Ie.current&&I.exceedFormatter&&I.max&&I.strategy(x)>I.max){if($=I.exceedFormatter(x,{max:I.max}),x!==$){var K,W;R([((K=ce.current)===null||K===void 0?void 0:K.selectionStart)||0,((W=ce.current)===null||W===void 0?void 0:W.selectionEnd)||0])}}else if(te.source==="compositionEnd")return;Se($),ce.current&&(0,i.rJ)(ce.current,Ee,C,$)};(0,d.useEffect)(function(){if(Q){var he;(he=ce.current)===null||he===void 0||he.setSelectionRange.apply(he,(0,t.Z)(Q))}},[Q]);var ke=function(Ee){ye(Ee,Ee.target.value,{source:"change"})},M=function(Ee){Ie.current=!1,ye(Ee,Ee.currentTarget.value,{source:"compositionEnd"}),Fe==null||Fe(Ee)},se=function(Ee){L&&Ee.key==="Enter"&&!ie.current&&(ie.current=!0,L(Ee)),N==null||N(Ee)},ae=function(Ee){Ee.key==="Enter"&&(ie.current=!1),Z==null||Z(Ee)},de=function(Ee){Ne(!0),E==null||E(Ee)},we=function(Ee){ie.current&&(ie.current=!1),Ne(!1),T==null||T(Ee)},ge=function(Ee){Se(""),ve(),ce.current&&(0,i.rJ)(ce.current,Ee,C)},j=_e&&"".concat(H,"-out-of-range"),fe=function(){var Ee=(0,s.Z)(S,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return d.createElement("input",(0,p.Z)({autoComplete:w},Ee,{onChange:ke,onFocus:de,onBlur:we,onKeyDown:se,onKeyUp:ae,className:u()(H,(0,b.Z)({},"".concat(H,"-disabled"),z),Te==null?void 0:Te.input),style:oe==null?void 0:oe.input,ref:ce,size:A,type:me,onCompositionStart:function(te){Ie.current=!0,be==null||be(te)},onCompositionEnd:M}))},P=function(){var Ee=Number(F)>0;if(U||I.show){var x=I.showFormatter?I.showFormatter({value:pe,count:G,maxLength:F}):"".concat(G).concat(Ee?" / ".concat(F):"");return d.createElement(d.Fragment,null,I.show&&d.createElement("span",{className:u()("".concat(H,"-show-count-suffix"),(0,b.Z)({},"".concat(H,"-show-count-has-suffix"),!!U),Te==null?void 0:Te.count),style:(0,_.Z)({},oe==null?void 0:oe.count)},x),U)}return null};return d.createElement(o,(0,p.Z)({},Re,{prefixCls:H,className:u()(O,j),handleReset:ge,value:pe,focused:Oe,triggerFocus:ve,suffix:P(),disabled:z,classes:De,classNames:Te,styles:oe}),fe())}),g=y,m=g},30292:function(Xe,D,f){"use strict";f.d(D,{He:function(){return _},X3:function(){return p},nH:function(){return a},rJ:function(){return h}});function _(u){return!!(u.addonBefore||u.addonAfter)}function p(u){return!!(u.prefix||u.suffix||u.allowClear)}function b(u,d,i){var n=d.cloneNode(!0),o=Object.create(u,{target:{value:n},currentTarget:{value:n}});return n.value=i,typeof d.selectionStart=="number"&&typeof d.selectionEnd=="number"&&(n.selectionStart=d.selectionStart,n.selectionEnd=d.selectionEnd),n.setSelectionRange=function(){d.setSelectionRange.apply(d,arguments)},o}function h(u,d,i,n){if(i){var o=d;if(d.type==="click"){o=b(d,u,""),i(o);return}if(u.type!=="file"&&n!==void 0){o=b(d,u,n),i(o);return}i(o)}}function a(u,d){if(u){u.focus(d);var i=d||{},n=i.cursor;if(n){var o=u.value.length;switch(n){case"start":u.setSelectionRange(0,0);break;case"end":u.setSelectionRange(o,o);break;default:u.setSelectionRange(0,o)}}}}},25930:function(Xe,D,f){"use strict";f.d(D,{Cd:function(){return N}});var _=f(32855),p=f(27247),b=f(43079),h=f(59301),a=f(92310),u=f.n(a),d={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},i=function(){var H=(0,h.useRef)([]),z=(0,h.useRef)(null);return(0,h.useEffect)(function(){var A=Date.now(),O=!1;H.current.forEach(function(X){if(X){O=!0;var U=X.style;U.transitionDuration=".3s, .3s, .3s, .06s",z.current&&A-z.current<100&&(U.transitionDuration="0s, 0s")}}),O&&(z.current=Date.now())}),H.current},n=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],o=function(H){var z=(0,p.Z)((0,p.Z)({},d),H),A=z.className,O=z.percent,X=z.prefixCls,U=z.strokeColor,B=z.strokeLinecap,Y=z.strokeWidth,ue=z.style,me=z.trailColor,De=z.trailWidth,Te=z.transition,oe=(0,b.Z)(z,n);delete oe.gapPosition;var be=Array.isArray(O)?O:[O],Fe=Array.isArray(U)?U:[U],Re=i(),Me=Y/2,Le=100-Y/2,Oe="M ".concat(B==="round"?Me:0,",").concat(Me,`
L `).concat(B==="round"?Le:100,",").concat(Me),Ne="0 0 100 ".concat(Y),Ie=0;return h.createElement("svg",(0,_.Z)({className:u()("".concat(X,"-line"),A),viewBox:Ne,preserveAspectRatio:"none",style:ue},oe),h.createElement("path",{className:"".concat(X,"-line-trail"),d:Oe,strokeLinecap:B,stroke:me,strokeWidth:De||Y,fillOpacity:"0"}),be.map(function(ie,ce){var re=1;switch(B){case"round":re=1-Y/100;break;case"square":re=1-Y/2/100;break;default:re=1;break}var ve={strokeDasharray:"".concat(ie*re,"px, 100px"),strokeDashoffset:"-".concat(Ie,"px"),transition:Te||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},V=Fe[ce]||Fe[Fe.length-1];return Ie+=ie,h.createElement("path",{key:ce,className:"".concat(X,"-line-path"),d:Oe,strokeLinecap:B,stroke:V,strokeWidth:Y,fillOpacity:"0",ref:function(xe){Re[ce]=xe},style:ve})}))},t=o,c=f(34666),e=f(11913),r=f(47273),s=0,l=(0,r.Z)();function v(){var q;return l?(q=s,s+=1):q="TEST_OR_SSR",q}var y=function(q){var H=h.useState(),z=(0,e.Z)(H,2),A=z[0],O=z[1];return h.useEffect(function(){O("rc_progress_".concat(v()))},[]),q||A},g=function(H){var z=H.bg,A=H.children;return h.createElement("div",{style:{width:"100%",height:"100%",background:z}},A)};function m(q,H){return Object.keys(q).map(function(z){var A=parseFloat(z),O="".concat(Math.floor(A*H),"%");return"".concat(q[z]," ").concat(O)})}var S=h.forwardRef(function(q,H){var z=q.prefixCls,A=q.color,O=q.gradientId,X=q.radius,U=q.style,B=q.ptg,Y=q.strokeLinecap,ue=q.strokeWidth,me=q.size,De=q.gapDegree,Te=A&&(0,c.Z)(A)==="object",oe=Te?"#FFF":void 0,be=me/2,Fe=h.createElement("circle",{className:"".concat(z,"-circle-path"),r:X,cx:be,cy:be,stroke:oe,strokeLinecap:Y,strokeWidth:ue,opacity:B===0?0:1,style:U,ref:H});if(!Te)return Fe;var Re="".concat(O,"-conic"),Me=De?"".concat(180+De/2,"deg"):"0deg",Le=m(A,(360-De)/360),Oe=m(A,1),Ne="conic-gradient(from ".concat(Me,", ").concat(Le.join(", "),")"),Ie="linear-gradient(to ".concat(De?"bottom":"top",", ").concat(Oe.join(", "),")");return h.createElement(h.Fragment,null,h.createElement("mask",{id:Re},Fe),h.createElement("foreignObject",{x:0,y:0,width:me,height:me,mask:"url(#".concat(Re,")")},h.createElement(g,{bg:Ie},h.createElement(g,{bg:Ne}))))}),k=S,w=100,C=function(H,z,A,O,X,U,B,Y,ue,me){var De=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,Te=A/100*360*((360-U)/360),oe=U===0?0:{bottom:0,top:180,left:90,right:-90}[B],be=(100-O)/100*z;ue==="round"&&O!==100&&(be+=me/2,be>=z&&(be=z-.01));var Fe=w/2;return{stroke:typeof Y=="string"?Y:void 0,strokeDasharray:"".concat(z,"px ").concat(H),strokeDashoffset:be+De,transform:"rotate(".concat(X+Te+oe,"deg)"),transformOrigin:"".concat(Fe,"px ").concat(Fe,"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}},E=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function T(q){var H=q!=null?q:[];return Array.isArray(H)?H:[H]}var L=function(H){var z=(0,p.Z)((0,p.Z)({},d),H),A=z.id,O=z.prefixCls,X=z.steps,U=z.strokeWidth,B=z.trailWidth,Y=z.gapDegree,ue=Y===void 0?0:Y,me=z.gapPosition,De=z.trailColor,Te=z.strokeLinecap,oe=z.style,be=z.className,Fe=z.strokeColor,Re=z.percent,Me=(0,b.Z)(z,E),Le=w/2,Oe=y(A),Ne="".concat(Oe,"-gradient"),Ie=Le-U/2,ie=Math.PI*2*Ie,ce=ue>0?90+ue/2:-90,re=ie*((360-ue)/360),ve=(0,c.Z)(X)==="object"?X:{count:X,gap:2},V=ve.count,J=ve.gap,xe=T(Re),Se=T(Fe),pe=Se.find(function(G){return G&&(0,c.Z)(G)==="object"}),ne=pe&&(0,c.Z)(pe)==="object",le=ne?"butt":Te,Q=C(ie,re,0,100,ce,ue,me,De,le,U),R=i(),I=function(){var _e=0;return xe.map(function(ye,ke){var M=Se[ke]||Se[Se.length-1],se=C(ie,re,_e,ye,ce,ue,me,M,le,U);return _e+=ye,h.createElement(k,{key:ke,color:M,ptg:ye,radius:Ie,prefixCls:O,gradientId:Ne,style:se,strokeLinecap:le,strokeWidth:U,gapDegree:ue,ref:function(de){R[ke]=de},size:w})}).reverse()},F=function(){var _e=Math.round(V*(xe[0]/100)),ye=100/V,ke=0;return new Array(V).fill(null).map(function(M,se){var ae=se<=_e-1?Se[0]:De,de=ae&&(0,c.Z)(ae)==="object"?"url(#".concat(Ne,")"):void 0,we=C(ie,re,ke,ye,ce,ue,me,ae,"butt",U,J);return ke+=(re-we.strokeDashoffset+J)*100/re,h.createElement("circle",{key:se,className:"".concat(O,"-circle-path"),r:Ie,cx:Le,cy:Le,stroke:de,strokeWidth:U,opacity:1,style:we,ref:function(j){R[se]=j}})})};return h.createElement("svg",(0,_.Z)({className:u()("".concat(O,"-circle"),be),viewBox:"0 0 ".concat(w," ").concat(w),style:oe,id:A,role:"presentation"},Me),!V&&h.createElement("circle",{className:"".concat(O,"-circle-trail"),r:Ie,cx:Le,cy:Le,stroke:De,strokeLinecap:le,strokeWidth:B||U,style:Q}),V?F():I())},N=L,Z={Line:t,Circle:N}},29301:function(Xe,D,f){"use strict";f.d(D,{Z:function(){return q}});var _=f(32855),p=f(59301),b=f(11592),h=f(48736),a=f(27247),u=f(34666),d=f(76846),i=f(8654),n=p.createContext(null);function o(H){var z=H.children,A=H.onBatchResize,O=p.useRef(0),X=p.useRef([]),U=p.useContext(n),B=p.useCallback(function(Y,ue,me){O.current+=1;var De=O.current;X.current.push({size:Y,element:ue,data:me}),Promise.resolve().then(function(){De===O.current&&(A==null||A(X.current),X.current=[])}),U==null||U(Y,ue,me)},[A,U]);return p.createElement(n.Provider,{value:B},z)}var t=f(76374),c=new Map;function e(H){H.forEach(function(z){var A,O=z.target;(A=c.get(O))===null||A===void 0||A.forEach(function(X){return X(O)})})}var r=new t.Z(e),s=null,l=null;function v(H,z){c.has(H)||(c.set(H,new Set),r.observe(H)),c.get(H).add(z)}function y(H,z){c.has(H)&&(c.get(H).delete(z),c.get(H).size||(r.unobserve(H),c.delete(H)))}var g=f(33377),m=f(93912),S=f(18881),k=f(85461),w=function(H){(0,S.Z)(A,H);var z=(0,k.Z)(A);function A(){return(0,g.Z)(this,A),z.apply(this,arguments)}return(0,m.Z)(A,[{key:"render",value:function(){return this.props.children}}]),A}(p.Component);function C(H,z){var A=H.children,O=H.disabled,X=p.useRef(null),U=p.useRef(null),B=p.useContext(n),Y=typeof A=="function",ue=Y?A(X):A,me=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),De=!Y&&p.isValidElement(ue)&&(0,i.Yr)(ue),Te=De?(0,i.C4)(ue):null,oe=(0,i.x1)(Te,X),be=function(){var Le;return(0,d.ZP)(X.current)||(X.current&&(0,u.Z)(X.current)==="object"?(0,d.ZP)((Le=X.current)===null||Le===void 0?void 0:Le.nativeElement):null)||(0,d.ZP)(U.current)};p.useImperativeHandle(z,function(){return be()});var Fe=p.useRef(H);Fe.current=H;var Re=p.useCallback(function(Me){var Le=Fe.current,Oe=Le.onResize,Ne=Le.data,Ie=Me.getBoundingClientRect(),ie=Ie.width,ce=Ie.height,re=Me.offsetWidth,ve=Me.offsetHeight,V=Math.floor(ie),J=Math.floor(ce);if(me.current.width!==V||me.current.height!==J||me.current.offsetWidth!==re||me.current.offsetHeight!==ve){var xe={width:V,height:J,offsetWidth:re,offsetHeight:ve};me.current=xe;var Se=re===Math.round(ie)?ie:re,pe=ve===Math.round(ce)?ce:ve,ne=(0,a.Z)((0,a.Z)({},xe),{},{offsetWidth:Se,offsetHeight:pe});B==null||B(ne,Me,Ne),Oe&&Promise.resolve().then(function(){Oe(ne,Me)})}},[]);return p.useEffect(function(){var Me=be();return Me&&!O&&v(Me,Re),function(){return y(Me,Re)}},[X.current,O]),p.createElement(w,{ref:U},De?p.cloneElement(ue,{ref:oe}):ue)}var E=p.forwardRef(C),T=E,L="rc-observer-key";function N(H,z){var A=H.children,O=typeof A=="function"?[A]:(0,b.Z)(A);return O.map(function(X,U){var B=(X==null?void 0:X.key)||"".concat(L,"-").concat(U);return p.createElement(T,(0,_.Z)({},H,{key:B,ref:U===0?z:void 0}),X)})}var Z=p.forwardRef(N);Z.Collection=o;var q=Z},22711:function(Xe,D,f){"use strict";f.r(D),f.d(D,{ResizableTextArea:function(){return Z},default:function(){return A}});var _=f(32855),p=f(74430),b=f(27247),h=f(3300),a=f(11913),u=f(43079),d=f(92310),i=f.n(d),n=f(36901),o=f(66003),t=f(30292),c=f(18929),e=f(59301),r=f(34666),s=f(29301),l=f(34280),v=f(16089),y=`
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;
`,g=["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"],m={},S;function k(O){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,U=O.getAttribute("id")||O.getAttribute("data-reactid")||O.getAttribute("name");if(X&&m[U])return m[U];var B=window.getComputedStyle(O),Y=B.getPropertyValue("box-sizing")||B.getPropertyValue("-moz-box-sizing")||B.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(B.getPropertyValue("padding-bottom"))+parseFloat(B.getPropertyValue("padding-top")),me=parseFloat(B.getPropertyValue("border-bottom-width"))+parseFloat(B.getPropertyValue("border-top-width")),De=g.map(function(oe){return"".concat(oe,":").concat(B.getPropertyValue(oe))}).join(";"),Te={sizingStyle:De,paddingSize:ue,borderSize:me,boxSizing:Y};return X&&U&&(m[U]=Te),Te}function w(O){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;S||(S=document.createElement("textarea"),S.setAttribute("tab-index","-1"),S.setAttribute("aria-hidden","true"),S.setAttribute("name","hiddenTextarea"),document.body.appendChild(S)),O.getAttribute("wrap")?S.setAttribute("wrap",O.getAttribute("wrap")):S.removeAttribute("wrap");var Y=k(O,X),ue=Y.paddingSize,me=Y.borderSize,De=Y.boxSizing,Te=Y.sizingStyle;S.setAttribute("style","".concat(Te,";").concat(y)),S.value=O.value||O.placeholder||"";var oe=void 0,be=void 0,Fe,Re=S.scrollHeight;if(De==="border-box"?Re+=me:De==="content-box"&&(Re-=ue),U!==null||B!==null){S.value=" ";var Me=S.scrollHeight-ue;U!==null&&(oe=Me*U,De==="border-box"&&(oe=oe+ue+me),Re=Math.max(oe,Re)),B!==null&&(be=Me*B,De==="border-box"&&(be=be+ue+me),Fe=Re>be?"":"hidden",Re=Math.min(be,Re))}var Le={height:Re,overflowY:Fe,resize:"none"};return oe&&(Le.minHeight=oe),be&&(Le.maxHeight=be),Le}var C=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],E=0,T=1,L=2,N=e.forwardRef(function(O,X){var U=O,B=U.prefixCls,Y=U.defaultValue,ue=U.value,me=U.autoSize,De=U.onResize,Te=U.className,oe=U.style,be=U.disabled,Fe=U.onChange,Re=U.onInternalAutoSize,Me=(0,u.Z)(U,C),Le=(0,c.Z)(Y,{value:ue,postState:function(we){return we!=null?we:""}}),Oe=(0,a.Z)(Le,2),Ne=Oe[0],Ie=Oe[1],ie=function(we){Ie(we.target.value),Fe==null||Fe(we)},ce=e.useRef();e.useImperativeHandle(X,function(){return{textArea:ce.current}});var re=e.useMemo(function(){return me&&(0,r.Z)(me)==="object"?[me.minRows,me.maxRows]:[]},[me]),ve=(0,a.Z)(re,2),V=ve[0],J=ve[1],xe=!!me,Se=function(){try{if(document.activeElement===ce.current){var we=ce.current,ge=we.selectionStart,j=we.selectionEnd,fe=we.scrollTop;ce.current.setSelectionRange(ge,j),ce.current.scrollTop=fe}}catch(P){}},pe=e.useState(L),ne=(0,a.Z)(pe,2),le=ne[0],Q=ne[1],R=e.useState(),I=(0,a.Z)(R,2),F=I[0],G=I[1],_e=function(){Q(E)};(0,l.Z)(function(){xe&&_e()},[ue,V,J,xe]),(0,l.Z)(function(){if(le===E)Q(T);else if(le===T){var de=w(ce.current,!1,V,J);Q(L),G(de)}else Se()},[le]);var ye=e.useRef(),ke=function(){v.Z.cancel(ye.current)},M=function(we){le===L&&(De==null||De(we),me&&(ke(),ye.current=(0,v.Z)(function(){_e()})))};e.useEffect(function(){return ke},[]);var se=xe?F:null,ae=(0,b.Z)((0,b.Z)({},oe),se);return(le===E||le===T)&&(ae.overflowY="hidden",ae.overflowX="hidden"),e.createElement(s.Z,{onResize:M,disabled:!(me||De)},e.createElement("textarea",(0,_.Z)({},Me,{ref:ce,style:ae,className:i()(B,Te,(0,p.Z)({},"".concat(B,"-disabled"),be)),disabled:be,value:Ne,onChange:ie})))}),Z=N,q=["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"],H=e.forwardRef(function(O,X){var U,B=O.defaultValue,Y=O.value,ue=O.onFocus,me=O.onBlur,De=O.onChange,Te=O.allowClear,oe=O.maxLength,be=O.onCompositionStart,Fe=O.onCompositionEnd,Re=O.suffix,Me=O.prefixCls,Le=Me===void 0?"rc-textarea":Me,Oe=O.showCount,Ne=O.count,Ie=O.className,ie=O.style,ce=O.disabled,re=O.hidden,ve=O.classNames,V=O.styles,J=O.onResize,xe=O.onClear,Se=O.onPressEnter,pe=O.readOnly,ne=O.autoSize,le=O.onKeyDown,Q=(0,u.Z)(O,q),R=(0,c.Z)(B,{value:Y,defaultValue:B}),I=(0,a.Z)(R,2),F=I[0],G=I[1],_e=F==null?"":String(F),ye=e.useState(!1),ke=(0,a.Z)(ye,2),M=ke[0],se=ke[1],ae=e.useRef(!1),de=e.useState(null),we=(0,a.Z)(de,2),ge=we[0],j=we[1],fe=(0,e.useRef)(null),P=(0,e.useRef)(null),he=function(){var We;return(We=P.current)===null||We===void 0?void 0:We.textArea},Ee=function(){he().focus()};(0,e.useImperativeHandle)(X,function(){var je;return{resizableTextArea:P.current,focus:Ee,blur:function(){he().blur()},nativeElement:((je=fe.current)===null||je===void 0?void 0:je.nativeElement)||he()}}),(0,e.useEffect)(function(){se(function(je){return!ce&&je})},[ce]);var x=e.useState(null),te=(0,a.Z)(x,2),$=te[0],K=te[1];e.useEffect(function(){if($){var je;(je=he()).setSelectionRange.apply(je,(0,h.Z)($))}},[$]);var W=(0,o.Z)(Ne,Oe),ee=(U=W.max)!==null&&U!==void 0?U:oe,Pe=Number(ee)>0,Ae=W.strategy(_e),Ce=!!ee&&Ae>ee,Ue=function(We,nt){var ht=nt;!ae.current&&W.exceedFormatter&&W.max&&W.strategy(nt)>W.max&&(ht=W.exceedFormatter(nt,{max:W.max}),nt!==ht&&K([he().selectionStart||0,he().selectionEnd||0])),G(ht),(0,t.rJ)(We.currentTarget,We,De,ht)},tt=function(We){ae.current=!0,be==null||be(We)},Ke=function(We){ae.current=!1,Ue(We,We.currentTarget.value),Fe==null||Fe(We)},He=function(We){Ue(We,We.target.value)},qe=function(We){We.key==="Enter"&&Se&&Se(We),le==null||le(We)},Ve=function(We){se(!0),ue==null||ue(We)},Ze=function(We){se(!1),me==null||me(We)},ct=function(We){G(""),Ee(),(0,t.rJ)(he(),We,De)},at=Re,Qe;W.show&&(W.showFormatter?Qe=W.showFormatter({value:_e,count:Ae,maxLength:ee}):Qe="".concat(Ae).concat(Pe?" / ".concat(ee):""),at=e.createElement(e.Fragment,null,at,e.createElement("span",{className:i()("".concat(Le,"-data-count"),ve==null?void 0:ve.count),style:V==null?void 0:V.count},Qe)));var $e=function(We){var nt;J==null||J(We),(nt=he())!==null&&nt!==void 0&&nt.style.height&&j(!0)},Ge=!ne&&!Oe&&!Te;return e.createElement(n.BaseInput,{ref:fe,value:_e,allowClear:Te,handleReset:ct,suffix:at,prefixCls:Le,classNames:(0,b.Z)((0,b.Z)({},ve),{},{affixWrapper:i()(ve==null?void 0:ve.affixWrapper,(0,p.Z)((0,p.Z)({},"".concat(Le,"-show-count"),Oe),"".concat(Le,"-textarea-allow-clear"),Te))}),disabled:ce,focused:M,className:i()(Ie,Ce&&"".concat(Le,"-out-of-range")),style:(0,b.Z)((0,b.Z)({},ie),ge&&!Ge?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Qe=="string"?Qe:void 0}},hidden:re,readOnly:pe,onClear:xe},e.createElement(Z,(0,_.Z)({},Q,{autoSize:ne,maxLength:oe,onKeyDown:qe,onChange:He,onFocus:Ve,onBlur:Ze,onCompositionStart:tt,onCompositionEnd:Ke,className:i()(ve==null?void 0:ve.textarea),style:(0,b.Z)((0,b.Z)({},V==null?void 0:V.textarea),{},{resize:ie==null?void 0:ie.resize}),disabled:ce,prefixCls:Le,onResize:$e,ref:P,readOnly:pe})))}),z=H,A=z},29125:function(Xe,D,f){"use strict";f.d(D,{G:function(){return h},Z:function(){return y}});var _=f(92310),p=f.n(_),b=f(59301);function h(g){var m=g.children,S=g.prefixCls,k=g.id,w=g.overlayInnerStyle,C=g.bodyClassName,E=g.className,T=g.style;return b.createElement("div",{className:p()("".concat(S,"-content"),E),style:T},b.createElement("div",{className:p()("".concat(S,"-inner"),C),id:k,role:"tooltip",style:w},typeof m=="function"?m():m))}var a=f(32855),u=f(27247),d=f(43079),i=f(65030),n={shiftX:64,adjustY:1},o={adjustX:1,shiftY:!0},t=[0,0],c={left:{points:["cr","cl"],overflow:o,offset:[-4,0],targetOffset:t},right:{points:["cl","cr"],overflow:o,offset:[4,0],targetOffset:t},top:{points:["bc","tc"],overflow:n,offset:[0,-4],targetOffset:t},bottom:{points:["tc","bc"],overflow:n,offset:[0,4],targetOffset:t},topLeft:{points:["bl","tl"],overflow:n,offset:[0,-4],targetOffset:t},leftTop:{points:["tr","tl"],overflow:o,offset:[-4,0],targetOffset:t},topRight:{points:["br","tr"],overflow:n,offset:[0,-4],targetOffset:t},rightTop:{points:["tl","tr"],overflow:o,offset:[4,0],targetOffset:t},bottomRight:{points:["tr","br"],overflow:n,offset:[0,4],targetOffset:t},rightBottom:{points:["bl","br"],overflow:o,offset:[4,0],targetOffset:t},bottomLeft:{points:["tl","bl"],overflow:n,offset:[0,4],targetOffset:t},leftBottom:{points:["br","bl"],overflow:o,offset:[-4,0],targetOffset:t}},e=null,r=f(80402),s=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],l=function(m,S){var k=m.overlayClassName,w=m.trigger,C=w===void 0?["hover"]:w,E=m.mouseEnterDelay,T=E===void 0?0:E,L=m.mouseLeaveDelay,N=L===void 0?.1:L,Z=m.overlayStyle,q=m.prefixCls,H=q===void 0?"rc-tooltip":q,z=m.children,A=m.onVisibleChange,O=m.afterVisibleChange,X=m.transitionName,U=m.animation,B=m.motion,Y=m.placement,ue=Y===void 0?"right":Y,me=m.align,De=me===void 0?{}:me,Te=m.destroyTooltipOnHide,oe=Te===void 0?!1:Te,be=m.defaultVisible,Fe=m.getTooltipContainer,Re=m.overlayInnerStyle,Me=m.arrowContent,Le=m.overlay,Oe=m.id,Ne=m.showArrow,Ie=Ne===void 0?!0:Ne,ie=m.classNames,ce=m.styles,re=(0,d.Z)(m,s),ve=(0,r.Z)(Oe),V=(0,b.useRef)(null);(0,b.useImperativeHandle)(S,function(){return V.current});var J=(0,u.Z)({},re);"visible"in m&&(J.popupVisible=m.visible);var xe=function(){return b.createElement(h,{key:"content",prefixCls:H,id:ve,bodyClassName:ie==null?void 0:ie.body,overlayInnerStyle:(0,u.Z)((0,u.Z)({},Re),ce==null?void 0:ce.body)},Le)},Se=function(){var ne=b.Children.only(z),le=(ne==null?void 0:ne.props)||{},Q=(0,u.Z)((0,u.Z)({},le),{},{"aria-describedby":Le?ve:null});return b.cloneElement(z,Q)};return b.createElement(i.Z,(0,a.Z)({popupClassName:p()(k,ie==null?void 0:ie.root),prefixCls:H,popup:xe,action:C,builtinPlacements:c,popupPlacement:ue,ref:V,popupAlign:De,getPopupContainer:Fe,onPopupVisibleChange:A,afterPopupVisibleChange:O,popupTransitionName:X,popupAnimation:U,popupMotion:B,defaultPopupVisible:be,autoDestroy:oe,mouseLeaveDelay:N,popupStyle:(0,u.Z)((0,u.Z)({},Z),ce==null?void 0:ce.root),mouseEnterDelay:T,arrow:Ie},J),Se())},v=(0,b.forwardRef)(l),y=v},49658:function(Xe,D){"use strict";D.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var f=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(f)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(f==null?void 0:f.substr(0,4))}},76374:function(Xe,D,f){"use strict";var _=function(){if(typeof Map!="undefined")return Map;function q(H,z){var A=-1;return H.some(function(O,X){return O[0]===z?(A=X,!0):!1}),A}return function(){function H(){this.__entries__=[]}return Object.defineProperty(H.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),H.prototype.get=function(z){var A=q(this.__entries__,z),O=this.__entries__[A];return O&&O[1]},H.prototype.set=function(z,A){var O=q(this.__entries__,z);~O?this.__entries__[O][1]=A:this.__entries__.push([z,A])},H.prototype.delete=function(z){var A=this.__entries__,O=q(A,z);~O&&A.splice(O,1)},H.prototype.has=function(z){return!!~q(this.__entries__,z)},H.prototype.clear=function(){this.__entries__.splice(0)},H.prototype.forEach=function(z,A){A===void 0&&(A=null);for(var O=0,X=this.__entries__;O<X.length;O++){var U=X[O];z.call(A,U[1],U[0])}},H}()}(),p=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,b=function(){return typeof f.g!="undefined"&&f.g.Math===Math?f.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),h=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(b):function(q){return setTimeout(function(){return q(Date.now())},1e3/60)}}(),a=2;function u(q,H){var z=!1,A=!1,O=0;function X(){z&&(z=!1,q()),A&&B()}function U(){h(X)}function B(){var Y=Date.now();if(z){if(Y-O<a)return;A=!0}else z=!0,A=!1,setTimeout(U,H);O=Y}return B}var d=20,i=["top","right","bottom","left","width","height","size","weight"],n=typeof MutationObserver!="undefined",o=function(){function q(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=u(this.refresh.bind(this),d)}return q.prototype.addObserver=function(H){~this.observers_.indexOf(H)||this.observers_.push(H),this.connected_||this.connect_()},q.prototype.removeObserver=function(H){var z=this.observers_,A=z.indexOf(H);~A&&z.splice(A,1),!z.length&&this.connected_&&this.disconnect_()},q.prototype.refresh=function(){var H=this.updateObservers_();H&&this.refresh()},q.prototype.updateObservers_=function(){var H=this.observers_.filter(function(z){return z.gatherActive(),z.hasActive()});return H.forEach(function(z){return z.broadcastActive()}),H.length>0},q.prototype.connect_=function(){!p||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),n?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},q.prototype.disconnect_=function(){!p||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},q.prototype.onTransitionEnd_=function(H){var z=H.propertyName,A=z===void 0?"":z,O=i.some(function(X){return!!~A.indexOf(X)});O&&this.refresh()},q.getInstance=function(){return this.instance_||(this.instance_=new q),this.instance_},q.instance_=null,q}(),t=function(q,H){for(var z=0,A=Object.keys(H);z<A.length;z++){var O=A[z];Object.defineProperty(q,O,{value:H[O],enumerable:!1,writable:!1,configurable:!0})}return q},c=function(q){var H=q&&q.ownerDocument&&q.ownerDocument.defaultView;return H||b},e=w(0,0,0,0);function r(q){return parseFloat(q)||0}function s(q){for(var H=[],z=1;z<arguments.length;z++)H[z-1]=arguments[z];return H.reduce(function(A,O){var X=q["border-"+O+"-width"];return A+r(X)},0)}function l(q){for(var H=["top","right","bottom","left"],z={},A=0,O=H;A<O.length;A++){var X=O[A],U=q["padding-"+X];z[X]=r(U)}return z}function v(q){var H=q.getBBox();return w(0,0,H.width,H.height)}function y(q){var H=q.clientWidth,z=q.clientHeight;if(!H&&!z)return e;var A=c(q).getComputedStyle(q),O=l(A),X=O.left+O.right,U=O.top+O.bottom,B=r(A.width),Y=r(A.height);if(A.boxSizing==="border-box"&&(Math.round(B+X)!==H&&(B-=s(A,"left","right")+X),Math.round(Y+U)!==z&&(Y-=s(A,"top","bottom")+U)),!m(q)){var ue=Math.round(B+X)-H,me=Math.round(Y+U)-z;Math.abs(ue)!==1&&(B-=ue),Math.abs(me)!==1&&(Y-=me)}return w(O.left,O.top,B,Y)}var g=function(){return typeof SVGGraphicsElement!="undefined"?function(q){return q instanceof c(q).SVGGraphicsElement}:function(q){return q instanceof c(q).SVGElement&&typeof q.getBBox=="function"}}();function m(q){return q===c(q).document.documentElement}function S(q){return p?g(q)?v(q):y(q):e}function k(q){var H=q.x,z=q.y,A=q.width,O=q.height,X=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,U=Object.create(X.prototype);return t(U,{x:H,y:z,width:A,height:O,top:z,right:H+A,bottom:O+z,left:H}),U}function w(q,H,z,A){return{x:q,y:H,width:z,height:A}}var C=function(){function q(H){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=w(0,0,0,0),this.target=H}return q.prototype.isActive=function(){var H=S(this.target);return this.contentRect_=H,H.width!==this.broadcastWidth||H.height!==this.broadcastHeight},q.prototype.broadcastRect=function(){var H=this.contentRect_;return this.broadcastWidth=H.width,this.broadcastHeight=H.height,H},q}(),E=function(){function q(H,z){var A=k(z);t(this,{target:H,contentRect:A})}return q}(),T=function(){function q(H,z,A){if(this.activeObservations_=[],this.observations_=new _,typeof H!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=H,this.controller_=z,this.callbackCtx_=A}return q.prototype.observe=function(H){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(H instanceof c(H).Element))throw new TypeError('parameter 1 is not of type "Element".');var z=this.observations_;z.has(H)||(z.set(H,new C(H)),this.controller_.addObserver(this),this.controller_.refresh())}},q.prototype.unobserve=function(H){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(H instanceof c(H).Element))throw new TypeError('parameter 1 is not of type "Element".');var z=this.observations_;z.has(H)&&(z.delete(H),z.size||this.controller_.removeObserver(this))}},q.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},q.prototype.gatherActive=function(){var H=this;this.clearActive(),this.observations_.forEach(function(z){z.isActive()&&H.activeObservations_.push(z)})},q.prototype.broadcastActive=function(){if(this.hasActive()){var H=this.callbackCtx_,z=this.activeObservations_.map(function(A){return new E(A.target,A.broadcastRect())});this.callback_.call(H,z,H),this.clearActive()}},q.prototype.clearActive=function(){this.activeObservations_.splice(0)},q.prototype.hasActive=function(){return this.activeObservations_.length>0},q}(),L=typeof WeakMap!="undefined"?new WeakMap:new _,N=function(){function q(H){if(!(this instanceof q))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var z=o.getInstance(),A=new T(H,z,this);L.set(this,A)}return q}();["observe","unobserve","disconnect"].forEach(function(q){N.prototype[q]=function(){var H;return(H=L.get(this))[q].apply(H,arguments)}});var Z=function(){return typeof b.ResizeObserver!="undefined"?b.ResizeObserver:N}();D.Z=Z},34376:function(Xe){(function(D,f){if(1)Xe.exports=f();else var _,p})(window,function(){return function(D){var f={};function _(p){if(f[p])return f[p].exports;var b=f[p]={i:p,l:!1,exports:{}};return D[p].call(b.exports,b,b.exports,_),b.l=!0,b.exports}return _.m=D,_.c=f,_.d=function(p,b,h){_.o(p,b)||Object.defineProperty(p,b,{enumerable:!0,get:h})},_.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},_.t=function(p,b){if(1&b&&(p=_(p)),8&b||4&b&&typeof p=="object"&&p&&p.__esModule)return p;var h=Object.create(null);if(_.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:p}),2&b&&typeof p!="string")for(var a in p)_.d(h,a,function(u){return p[u]}.bind(null,a));return h},_.n=function(p){var b=p&&p.__esModule?function(){return p.default}:function(){return p};return _.d(b,"a",b),b},_.o=function(p,b){return Object.prototype.hasOwnProperty.call(p,b)},_.p="",_(_.s=34)}([function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.forwardEvent=f.EventEmitter=void 0;var p=function(){function b(){this._listeners=[],this._disposed=!1}return Object.defineProperty(b.prototype,"event",{get:function(){var h=this;return this._event||(this._event=function(a){return h._listeners.push(a),{dispose:function(){if(!h._disposed){for(var u=0;u<h._listeners.length;u++)if(h._listeners[u]===a)return void h._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),b.prototype.fire=function(h,a){for(var u=[],d=0;d<this._listeners.length;d++)u.push(this._listeners[d]);for(d=0;d<u.length;d++)u[d].call(void 0,h,a)},b.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},b}();f.EventEmitter=p,f.forwardEvent=function(b,h){return b(function(a){return h.fire(a)})}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.IUnicodeService=f.IOptionsService=f.ILogService=f.IInstantiationService=f.IDirtyRowService=f.ICharsetService=f.ICoreService=f.ICoreMouseService=f.IBufferService=void 0;var p=_(14);f.IBufferService=p.createDecorator("BufferService"),f.ICoreMouseService=p.createDecorator("CoreMouseService"),f.ICoreService=p.createDecorator("CoreService"),f.ICharsetService=p.createDecorator("CharsetService"),f.IDirtyRowService=p.createDecorator("DirtyRowService"),f.IInstantiationService=p.createDecorator("InstantiationService"),f.ILogService=p.createDecorator("LogService"),f.IOptionsService=p.createDecorator("OptionsService"),f.IUnicodeService=p.createDecorator("UnicodeService")},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.getDisposeArrayDisposable=f.disposeArray=f.Disposable=void 0;var p=function(){function h(){this._disposables=[],this._isDisposed=!1}return h.prototype.dispose=function(){this._isDisposed=!0;for(var a=0,u=this._disposables;a<u.length;a++)u[a].dispose();this._disposables.length=0},h.prototype.register=function(a){return this._disposables.push(a),a},h.prototype.unregister=function(a){var u=this._disposables.indexOf(a);u!==-1&&this._disposables.splice(u,1)},h}();function b(h){for(var a=0,u=h;a<u.length;a++)u[a].dispose();h.length=0}f.Disposable=p,f.disposeArray=b,f.getDisposeArrayDisposable=function(h){return{dispose:function(){return b(h)}}}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.WHITESPACE_CELL_CODE=f.WHITESPACE_CELL_WIDTH=f.WHITESPACE_CELL_CHAR=f.NULL_CELL_CODE=f.NULL_CELL_WIDTH=f.NULL_CELL_CHAR=f.CHAR_DATA_CODE_INDEX=f.CHAR_DATA_WIDTH_INDEX=f.CHAR_DATA_CHAR_INDEX=f.CHAR_DATA_ATTR_INDEX=f.DEFAULT_ATTR=f.DEFAULT_COLOR=void 0,f.DEFAULT_COLOR=256,f.DEFAULT_ATTR=256|f.DEFAULT_COLOR<<9,f.CHAR_DATA_ATTR_INDEX=0,f.CHAR_DATA_CHAR_INDEX=1,f.CHAR_DATA_WIDTH_INDEX=2,f.CHAR_DATA_CODE_INDEX=3,f.NULL_CELL_CHAR="",f.NULL_CELL_WIDTH=1,f.NULL_CELL_CODE=0,f.WHITESPACE_CELL_CHAR=" ",f.WHITESPACE_CELL_WIDTH=1,f.WHITESPACE_CELL_CODE=32},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(i,n){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,t){o.__proto__=t}||function(o,t){for(var c in t)t.hasOwnProperty(c)&&(o[c]=t[c])})(i,n)},function(i,n){function o(){this.constructor=i}p(i,n),i.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)});Object.defineProperty(f,"__esModule",{value:!0}),f.CellData=void 0;var h=_(8),a=_(3),u=_(6),d=function(i){function n(){var o=i!==null&&i.apply(this,arguments)||this;return o.content=0,o.fg=0,o.bg=0,o.extended=new u.ExtendedAttrs,o.combinedData="",o}return b(n,i),n.fromCharData=function(o){var t=new n;return t.setFromCharData(o),t},n.prototype.isCombined=function(){return 2097152&this.content},n.prototype.getWidth=function(){return this.content>>22},n.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?h.stringFromCodePoint(2097151&this.content):""},n.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},n.prototype.setFromCharData=function(o){this.fg=o[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(o[a.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(o[a.CHAR_DATA_CHAR_INDEX].length===2){var c=o[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=c&&c<=56319){var e=o[a.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(c-55296)+e-56320+65536|o[a.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=o[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[a.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=o[a.CHAR_DATA_CHAR_INDEX],this.content=2097152|o[a.CHAR_DATA_WIDTH_INDEX]<<22)},n.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},n}(u.AttributeData);f.CellData=d},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.ISoundService=f.ISelectionService=f.IRenderService=f.IMouseService=f.ICoreBrowserService=f.ICharSizeService=void 0;var p=_(14);f.ICharSizeService=p.createDecorator("CharSizeService"),f.ICoreBrowserService=p.createDecorator("CoreBrowserService"),f.IMouseService=p.createDecorator("MouseService"),f.IRenderService=p.createDecorator("RenderService"),f.ISelectionService=p.createDecorator("SelectionService"),f.ISoundService=p.createDecorator("SoundService")},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.ExtendedAttrs=f.AttributeData=void 0;var p=function(){function h(){this.fg=0,this.bg=0,this.extended=new b}return h.toColorRGB=function(a){return[a>>>16&255,a>>>8&255,255&a]},h.fromColorRGB=function(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]},h.prototype.clone=function(){var a=new h;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a},h.prototype.isInverse=function(){return 67108864&this.fg},h.prototype.isBold=function(){return 134217728&this.fg},h.prototype.isUnderline=function(){return 268435456&this.fg},h.prototype.isBlink=function(){return 536870912&this.fg},h.prototype.isInvisible=function(){return 1073741824&this.fg},h.prototype.isItalic=function(){return 67108864&this.bg},h.prototype.isDim=function(){return 134217728&this.bg},h.prototype.getFgColorMode=function(){return 50331648&this.fg},h.prototype.getBgColorMode=function(){return 50331648&this.bg},h.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},h.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},h.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},h.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},h.prototype.isFgDefault=function(){return(50331648&this.fg)==0},h.prototype.isBgDefault=function(){return(50331648&this.bg)==0},h.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},h.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},h.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},h.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},h.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},h.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},h.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},h.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},h.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},h.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},h.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},h}();f.AttributeData=p;var b=function(){function h(a,u){a===void 0&&(a=0),u===void 0&&(u=-1),this.underlineStyle=a,this.underlineColor=u}return h.prototype.clone=function(){return new h(this.underlineStyle,this.underlineColor)},h.prototype.isEmpty=function(){return this.underlineStyle===0},h}();f.ExtendedAttrs=b},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.addDisposableDomListener=void 0,f.addDisposableDomListener=function(p,b,h,a){p.addEventListener(b,h,a);var u=!1;return{dispose:function(){u||(u=!0,p.removeEventListener(b,h,a))}}}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.Utf8ToUtf32=f.StringToUtf32=f.utf32ToString=f.stringFromCodePoint=void 0,f.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},f.utf32ToString=function(h,a,u){a===void 0&&(a=0),u===void 0&&(u=h.length);for(var d="",i=a;i<u;++i){var n=h[i];n>65535?(n-=65536,d+=String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):d+=String.fromCharCode(n)}return d};var p=function(){function h(){this._interim=0}return h.prototype.clear=function(){this._interim=0},h.prototype.decode=function(a,u){var d=a.length;if(!d)return 0;var i=0,n=0;this._interim&&(56320<=(c=a.charCodeAt(n++))&&c<=57343?u[i++]=1024*(this._interim-55296)+c-56320+65536:(u[i++]=this._interim,u[i++]=c),this._interim=0);for(var o=n;o<d;++o){var t=a.charCodeAt(o);if(55296<=t&&t<=56319){if(++o>=d)return this._interim=t,i;var c;56320<=(c=a.charCodeAt(o))&&c<=57343?u[i++]=1024*(t-55296)+c-56320+65536:(u[i++]=t,u[i++]=c)}else u[i++]=t}return i},h}();f.StringToUtf32=p;var b=function(){function h(){this.interim=new Uint8Array(3)}return h.prototype.clear=function(){this.interim.fill(0)},h.prototype.decode=function(a,u){var d=a.length;if(!d)return 0;var i,n,o,t,c=0,e=0,r=0;if(this.interim[0]){var s=!1,l=this.interim[0];l&=(224&l)==192?31:(240&l)==224?15:7;for(var v=0,y=void 0;(y=63&this.interim[++v])&&v<4;)l<<=6,l|=y;for(var g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,m=g-v;r<m;){if(r>=d)return 0;if((192&(y=a[r++]))!=128){r--,s=!0;break}this.interim[v++]=y,l<<=6,l|=63&y}s||(g===2?l<128?r--:u[c++]=l:g===3?l<2048||l>=55296&&l<=57343||(u[c++]=l):l<65536||l>1114111||(u[c++]=l)),this.interim.fill(0)}for(var S=d-4,k=r;k<d;){for(;!(!(k<S)||128&(i=a[k])||128&(n=a[k+1])||128&(o=a[k+2])||128&(t=a[k+3]));)u[c++]=i,u[c++]=n,u[c++]=o,u[c++]=t,k+=4;if((i=a[k++])<128)u[c++]=i;else if((224&i)==192){if(k>=d)return this.interim[0]=i,c;if((192&(n=a[k++]))!=128){k--;continue}if((e=(31&i)<<6|63&n)<128){k--;continue}u[c++]=e}else if((240&i)==224){if(k>=d)return this.interim[0]=i,c;if((192&(n=a[k++]))!=128){k--;continue}if(k>=d)return this.interim[0]=i,this.interim[1]=n,c;if((192&(o=a[k++]))!=128){k--;continue}if((e=(15&i)<<12|(63&n)<<6|63&o)<2048||e>=55296&&e<=57343)continue;u[c++]=e}else if((248&i)==240){if(k>=d)return this.interim[0]=i,c;if((192&(n=a[k++]))!=128){k--;continue}if(k>=d)return this.interim[0]=i,this.interim[1]=n,c;if((192&(o=a[k++]))!=128){k--;continue}if(k>=d)return this.interim[0]=i,this.interim[1]=n,this.interim[2]=o,c;if((192&(t=a[k++]))!=128){k--;continue}if((e=(7&i)<<18|(63&n)<<12|(63&o)<<6|63&t)<65536||e>1114111)continue;u[c++]=e}}return c},h}();f.Utf8ToUtf32=b},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.CHAR_ATLAS_CELL_SPACING=f.DIM_OPACITY=f.INVERTED_DEFAULT_COLOR=void 0,f.INVERTED_DEFAULT_COLOR=257,f.DIM_OPACITY=.5,f.CHAR_ATLAS_CELL_SPACING=1},function(D,f,_){"use strict";var p,b,h,a;function u(i){var n=i.toString(16);return n.length<2?"0"+n:n}function d(i,n){return i<n?(n+.05)/(i+.05):(i+.05)/(n+.05)}Object.defineProperty(f,"__esModule",{value:!0}),f.contrastRatio=f.toPaddedHex=f.rgba=f.rgb=f.css=f.color=f.channels=void 0,function(i){i.toCss=function(n,o,t,c){return c!==void 0?"#"+u(n)+u(o)+u(t)+u(c):"#"+u(n)+u(o)+u(t)},i.toRgba=function(n,o,t,c){return c===void 0&&(c=255),(n<<24|o<<16|t<<8|c)>>>0}}(p=f.channels||(f.channels={})),(b=f.color||(f.color={})).blend=function(i,n){var o=(255&n.rgba)/255;if(o===1)return{css:n.css,rgba:n.rgba};var t=n.rgba>>24&255,c=n.rgba>>16&255,e=n.rgba>>8&255,r=i.rgba>>24&255,s=i.rgba>>16&255,l=i.rgba>>8&255,v=r+Math.round((t-r)*o),y=s+Math.round((c-s)*o),g=l+Math.round((e-l)*o);return{css:p.toCss(v,y,g),rgba:p.toRgba(v,y,g)}},b.isOpaque=function(i){return(255&i.rgba)==255},b.ensureContrastRatio=function(i,n,o){var t=a.ensureContrastRatio(i.rgba,n.rgba,o);if(t)return a.toColor(t>>24&255,t>>16&255,t>>8&255)},b.opaque=function(i){var n=(255|i.rgba)>>>0,o=a.toChannels(n),t=o[0],c=o[1],e=o[2];return{css:p.toCss(t,c,e),rgba:n}},b.opacity=function(i,n){var o=Math.round(255*n),t=a.toChannels(i.rgba),c=t[0],e=t[1],r=t[2];return{css:p.toCss(c,e,r,o),rgba:p.toRgba(c,e,r,o)}},(f.css||(f.css={})).toColor=function(i){switch(i.length){case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(i){function n(o,t,c){var e=o/255,r=t/255,s=c/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))}i.relativeLuminance=function(o){return n(o>>16&255,o>>8&255,255&o)},i.relativeLuminance2=n}(h=f.rgb||(f.rgb={})),function(i){function n(t,c,e){for(var r=t>>24&255,s=t>>16&255,l=t>>8&255,v=c>>24&255,y=c>>16&255,g=c>>8&255,m=d(h.relativeLuminance2(v,g,y),h.relativeLuminance2(r,s,l));m<e&&(v>0||y>0||g>0);)v-=Math.max(0,Math.ceil(.1*v)),y-=Math.max(0,Math.ceil(.1*y)),g-=Math.max(0,Math.ceil(.1*g)),m=d(h.relativeLuminance2(v,g,y),h.relativeLuminance2(r,s,l));return(v<<24|y<<16|g<<8|255)>>>0}function o(t,c,e){for(var r=t>>24&255,s=t>>16&255,l=t>>8&255,v=c>>24&255,y=c>>16&255,g=c>>8&255,m=d(h.relativeLuminance2(v,g,y),h.relativeLuminance2(r,s,l));m<e&&(v<255||y<255||g<255);)v=Math.min(255,v+Math.ceil(.1*(255-v))),y=Math.min(255,y+Math.ceil(.1*(255-y))),g=Math.min(255,g+Math.ceil(.1*(255-g))),m=d(h.relativeLuminance2(v,g,y),h.relativeLuminance2(r,s,l));return(v<<24|y<<16|g<<8|255)>>>0}i.ensureContrastRatio=function(t,c,e){var r=h.relativeLuminance(t>>8),s=h.relativeLuminance(c>>8);if(d(r,s)<e)return s<r?n(t,c,e):o(t,c,e)},i.reduceLuminance=n,i.increaseLuminance=o,i.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},i.toColor=function(t,c,e){return{css:p.toCss(t,c,e),rgba:p.toRgba(t,c,e)}}}(a=f.rgba||(f.rgba={})),f.toPaddedHex=u,f.contrastRatio=d},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.isLinux=f.isWindows=f.isIphone=f.isIpad=f.isMac=f.isSafari=f.isFirefox=void 0;var p=typeof navigator=="undefined",b=p?"node":navigator.userAgent,h=p?"node":navigator.platform;function a(u,d){return u.indexOf(d)>=0}f.isFirefox=!!~b.indexOf("Firefox"),f.isSafari=/^((?!chrome|android).)*safari/i.test(b),f.isMac=a(["Macintosh","MacIntel","MacPPC","Mac68K"],h),f.isIpad=h==="iPad",f.isIphone=h==="iPhone",f.isWindows=a(["Windows","Win16","Win32","WinCE"],h),f.isLinux=h.indexOf("Linux")>=0},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.C1=f.C0=void 0,function(p){p.NUL="\0",p.SOH="",p.STX="",p.ETX="",p.EOT="",p.ENQ="",p.ACK="",p.BEL="\x07",p.BS="\b",p.HT=" ",p.LF=`
`,p.VT="\v",p.FF="\f",p.CR="\r",p.SO="",p.SI="",p.DLE="",p.DC1="",p.DC2="",p.DC3="",p.DC4="",p.NAK="",p.SYN="",p.ETB="",p.CAN="",p.EM="",p.SUB="",p.ESC="\x1B",p.FS="",p.GS="",p.RS="",p.US="",p.SP=" ",p.DEL="\x7F"}(f.C0||(f.C0={})),function(p){p.PAD="\x80",p.HOP="\x81",p.BPH="\x82",p.NBH="\x83",p.IND="\x84",p.NEL="\x85",p.SSA="\x86",p.ESA="\x87",p.HTS="\x88",p.HTJ="\x89",p.VTS="\x8A",p.PLD="\x8B",p.PLU="\x8C",p.RI="\x8D",p.SS2="\x8E",p.SS3="\x8F",p.DCS="\x90",p.PU1="\x91",p.PU2="\x92",p.STS="\x93",p.CCH="\x94",p.MW="\x95",p.SPA="\x96",p.EPA="\x97",p.SOS="\x98",p.SGCI="\x99",p.SCI="\x9A",p.CSI="\x9B",p.ST="\x9C",p.OSC="\x9D",p.PM="\x9E",p.APC="\x9F"}(f.C1||(f.C1={}))},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.BaseRenderLayer=void 0;var p=_(3),b=_(9),h=_(25),a=_(6),u=_(28),d=_(10),i=_(17),n=function(){function o(t,c,e,r,s,l,v,y){this._container=t,this._alpha=r,this._colors=s,this._rendererId=l,this._bufferService=v,this._optionsService=y,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-"+c+"-layer"),this._canvas.style.zIndex=e.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return o.prototype.dispose=function(){var t;i.removeElementFromParent(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},o.prototype._initCanvas=function(){this._ctx=u.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},o.prototype.onOptionsChanged=function(){},o.prototype.onBlur=function(){},o.prototype.onFocus=function(){},o.prototype.onCursorMove=function(){},o.prototype.onGridChanged=function(t,c){},o.prototype.onSelectionChanged=function(t,c,e){e===void 0&&(e=!1)},o.prototype.setColors=function(t){this._refreshCharAtlas(t)},o.prototype._setTransparency=function(t){if(t!==this._alpha){var c=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,c),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},o.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=h.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},o.prototype.resize=function(t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},o.prototype._fillCells=function(t,c,e,r){this._ctx.fillRect(t*this._scaledCellWidth,c*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight)},o.prototype._fillBottomLineAtCells=function(t,c,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(c+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},o.prototype._fillLeftLineAtCell=function(t,c,e){this._ctx.fillRect(t*this._scaledCellWidth,c*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},o.prototype._strokeRectAtCell=function(t,c,e,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,c*this._scaledCellHeight+window.devicePixelRatio/2,e*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},o.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))},o.prototype._clearCells=function(t,c,e,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,c*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,c*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight))},o.prototype._fillCharTrueColor=function(t,c,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),c*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},o.prototype._drawChars=function(t,c,e){var r,s,l=this._getContrastColor(t);l||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,c,e,l):(t.isInverse()?(r=t.isBgDefault()?b.INVERTED_DEFAULT_COLOR:t.getBgColor(),s=t.isFgDefault()?b.INVERTED_DEFAULT_COLOR:t.getFgColor()):(s=t.isBgDefault()?p.DEFAULT_COLOR:t.getBgColor(),r=t.isFgDefault()?p.DEFAULT_COLOR:t.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||p.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||p.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=s,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,c*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,c,e))},o.prototype._drawUncachedChars=function(t,c,e,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(r)this._ctx.fillStyle=r.css;else if(t.isBgDefault())this._ctx.fillStyle=d.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var s=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&s<8&&(s+=8),this._ctx.fillStyle=this._colors.ansi[s].css}else if(r)this._ctx.fillStyle=r.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var l=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}this._clipRow(e),t.isDim()&&(this._ctx.globalAlpha=b.DIM_OPACITY),this._ctx.fillText(t.getChars(),c*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},o.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},o.prototype._getFont=function(t,c){return(c?"italic":"")+" "+(t?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},o.prototype._getContrastColor=function(t){if(this._optionsService.options.minimumContrastRatio!==1){var c=this._colors.contrastCache.getColor(t.bg,t.fg);if(c!==void 0)return c||void 0;var e=t.getFgColor(),r=t.getFgColorMode(),s=t.getBgColor(),l=t.getBgColorMode(),v=!!t.isInverse(),y=!!t.isInverse();if(v){var g=e;e=s,s=g;var m=r;r=l,l=m}var S=this._resolveBackgroundRgba(l,s,v),k=this._resolveForegroundRgba(r,e,v,y),w=d.rgba.ensureContrastRatio(S,k,this._optionsService.options.minimumContrastRatio);if(w){var C={css:d.channels.toCss(w>>24&255,w>>16&255,w>>8&255),rgba:w};return this._colors.contrastCache.setColor(t.bg,t.fg,C),C}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},o.prototype._resolveBackgroundRgba=function(t,c,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[c].rgba;case 50331648:return c<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},o.prototype._resolveForegroundRgba=function(t,c,e,r){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&c<8&&(c+=8),this._colors.ansi[c].rgba;case 50331648:return c<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},o}();f.BaseRenderLayer=n},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.createDecorator=f.getServiceDependencies=f.serviceRegistry=void 0;function p(b,h,a){h.di$target===h?h.di$dependencies.push({id:b,index:a}):(h.di$dependencies=[{id:b,index:a}],h.di$target=h)}f.serviceRegistry=new Map,f.getServiceDependencies=function(b){return b.di$dependencies||[]},f.createDecorator=function(b){if(f.serviceRegistry.has(b))return f.serviceRegistry.get(b);var h=function(a,u,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");p(h,a,d)};return h.toString=function(){return b},f.serviceRegistry.set(b,h),h}},function(D,f,_){"use strict";function p(b,h,a,u){if(a===void 0&&(a=0),u===void 0&&(u=b.length),a>=b.length)return b;a=(b.length+a)%b.length,u=u>=b.length?b.length:(b.length+u)%b.length;for(var d=a;d<u;++d)b[d]=h;return b}Object.defineProperty(f,"__esModule",{value:!0}),f.concat=f.fillFallback=f.fill=void 0,f.fill=function(b,h,a,u){return b.fill?b.fill(h,a,u):p(b,h,a,u)},f.fillFallback=p,f.concat=function(b,h){var a=new b.constructor(b.length+h.length);return a.set(b),a.set(h,b.length),a}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.BufferLine=f.DEFAULT_ATTR_DATA=void 0;var p=_(8),b=_(3),h=_(4),a=_(6);f.DEFAULT_ATTR_DATA=Object.freeze(new a.AttributeData);var u=function(){function d(i,n,o){o===void 0&&(o=!1),this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*i);for(var t=n||h.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),c=0;c<i;++c)this.setCell(c,t);this.length=i}return d.prototype.get=function(i){var n=this._data[3*i+0],o=2097151&n;return[this._data[3*i+1],2097152&n?this._combined[i]:o?p.stringFromCodePoint(o):"",n>>22,2097152&n?this._combined[i].charCodeAt(this._combined[i].length-1):o]},d.prototype.set=function(i,n){this._data[3*i+1]=n[b.CHAR_DATA_ATTR_INDEX],n[b.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[i]=n[1],this._data[3*i+0]=2097152|i|n[b.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*i+0]=n[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|n[b.CHAR_DATA_WIDTH_INDEX]<<22},d.prototype.getWidth=function(i){return this._data[3*i+0]>>22},d.prototype.hasWidth=function(i){return 12582912&this._data[3*i+0]},d.prototype.getFg=function(i){return this._data[3*i+1]},d.prototype.getBg=function(i){return this._data[3*i+2]},d.prototype.hasContent=function(i){return 4194303&this._data[3*i+0]},d.prototype.getCodePoint=function(i){var n=this._data[3*i+0];return 2097152&n?this._combined[i].charCodeAt(this._combined[i].length-1):2097151&n},d.prototype.isCombined=function(i){return 2097152&this._data[3*i+0]},d.prototype.getString=function(i){var n=this._data[3*i+0];return 2097152&n?this._combined[i]:2097151&n?p.stringFromCodePoint(2097151&n):""},d.prototype.loadCell=function(i,n){var o=3*i;return n.content=this._data[o+0],n.fg=this._data[o+1],n.bg=this._data[o+2],2097152&n.content&&(n.combinedData=this._combined[i]),268435456&n.bg&&(n.extended=this._extendedAttrs[i]),n},d.prototype.setCell=function(i,n){2097152&n.content&&(this._combined[i]=n.combinedData),268435456&n.bg&&(this._extendedAttrs[i]=n.extended),this._data[3*i+0]=n.content,this._data[3*i+1]=n.fg,this._data[3*i+2]=n.bg},d.prototype.setCellFromCodePoint=function(i,n,o,t,c,e){268435456&c&&(this._extendedAttrs[i]=e),this._data[3*i+0]=n|o<<22,this._data[3*i+1]=t,this._data[3*i+2]=c},d.prototype.addCodepointToCell=function(i,n){var o=this._data[3*i+0];2097152&o?this._combined[i]+=p.stringFromCodePoint(n):(2097151&o?(this._combined[i]=p.stringFromCodePoint(2097151&o)+p.stringFromCodePoint(n),o&=-2097152,o|=2097152):o=n|1<<22,this._data[3*i+0]=o)},d.prototype.insertCells=function(i,n,o,t){if((i%=this.length)&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new a.ExtendedAttrs),n<this.length-i){for(var c=new h.CellData,e=this.length-i-n-1;e>=0;--e)this.setCell(i+n+e,this.loadCell(i+e,c));for(e=0;e<n;++e)this.setCell(i+e,o)}else for(e=i;e<this.length;++e)this.setCell(e,o);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new a.ExtendedAttrs)},d.prototype.deleteCells=function(i,n,o,t){if(i%=this.length,n<this.length-i){for(var c=new h.CellData,e=0;e<this.length-i-n;++e)this.setCell(i+e,this.loadCell(i+n+e,c));for(e=this.length-n;e<this.length;++e)this.setCell(e,o)}else for(e=i;e<this.length;++e)this.setCell(e,o);i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new a.ExtendedAttrs),this.getWidth(i)!==0||this.hasContent(i)||this.setCellFromCodePoint(i,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new a.ExtendedAttrs)},d.prototype.replaceCells=function(i,n,o,t){for(i&&this.getWidth(i-1)===2&&this.setCellFromCodePoint(i-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new a.ExtendedAttrs),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new a.ExtendedAttrs);i<n&&i<this.length;)this.setCell(i++,o)},d.prototype.resize=function(i,n){if(i!==this.length){if(i>this.length){var o=new Uint32Array(3*i);this.length&&(3*i<this._data.length?o.set(this._data.subarray(0,3*i)):o.set(this._data)),this._data=o;for(var t=this.length;t<i;++t)this.setCell(t,n)}else if(i){(o=new Uint32Array(3*i)).set(this._data.subarray(0,3*i)),this._data=o;var c=Object.keys(this._combined);for(t=0;t<c.length;t++){var e=parseInt(c[t],10);e>=i&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=i}},d.prototype.fill=function(i){this._combined={},this._extendedAttrs={};for(var n=0;n<this.length;++n)this.setCell(n,i)},d.prototype.copyFrom=function(i){for(var n in this.length!==i.length?this._data=new Uint32Array(i._data):this._data.set(i._data),this.length=i.length,this._combined={},i._combined)this._combined[n]=i._combined[n];for(var n in this._extendedAttrs={},i._extendedAttrs)this._extendedAttrs[n]=i._extendedAttrs[n];this.isWrapped=i.isWrapped},d.prototype.clone=function(){var i=new d(0);for(var n in i._data=new Uint32Array(this._data),i.length=this.length,this._combined)i._combined[n]=this._combined[n];for(var n in this._extendedAttrs)i._extendedAttrs[n]=this._extendedAttrs[n];return i.isWrapped=this.isWrapped,i},d.prototype.getTrimmedLength=function(){for(var i=this.length-1;i>=0;--i)if(4194303&this._data[3*i+0])return i+(this._data[3*i+0]>>22);return 0},d.prototype.copyCellsFrom=function(i,n,o,t,c){var e=i._data;if(c)for(var r=t-1;r>=0;r--)for(var s=0;s<3;s++)this._data[3*(o+r)+s]=e[3*(n+r)+s];else for(r=0;r<t;r++)for(s=0;s<3;s++)this._data[3*(o+r)+s]=e[3*(n+r)+s];var l=Object.keys(i._combined);for(s=0;s<l.length;s++){var v=parseInt(l[s],10);v>=n&&(this._combined[v-n+o]=i._combined[v])}},d.prototype.translateToString=function(i,n,o){i===void 0&&(i=!1),n===void 0&&(n=0),o===void 0&&(o=this.length),i&&(o=Math.min(o,this.getTrimmedLength()));for(var t="";n<o;){var c=this._data[3*n+0],e=2097151&c;t+=2097152&c?this._combined[n]:e?p.stringFromCodePoint(e):b.WHITESPACE_CELL_CHAR,n+=c>>22||1}return t},d}();f.BufferLine=u},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.removeElementFromParent=void 0,f.removeElementFromParent=function(){for(var p,b=[],h=0;h<arguments.length;h++)b[h]=arguments[h];for(var a=0,u=b;a<u.length;a++){var d=u[a];(p=d==null?void 0:d.parentElement)===null||p===void 0||p.removeChild(d)}}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.tooMuchOutput=f.promptLabel=void 0,f.promptLabel="Terminal input",f.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(k,w){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var T in E)E.hasOwnProperty(T)&&(C[T]=E[T])})(k,w)},function(k,w){function C(){this.constructor=k}p(k,w),k.prototype=w===null?Object.create(w):(C.prototype=w.prototype,new C)});Object.defineProperty(f,"__esModule",{value:!0}),f.InputHandler=f.WindowsOptionsReportType=void 0;var h,a=_(12),u=_(20),d=_(39),i=_(2),n=_(15),o=_(8),t=_(16),c=_(0),e=_(3),r=_(4),s=_(6),l=_(22),v=_(24),y={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function g(k,w){if(k>24)return w.setWinLines||!1;switch(k){case 1:return!!w.restoreWin;case 2:return!!w.minimizeWin;case 3:return!!w.setWinPosition;case 4:return!!w.setWinSizePixels;case 5:return!!w.raiseWin;case 6:return!!w.lowerWin;case 7:return!!w.refreshWin;case 8:return!!w.setWinSizeChars;case 9:return!!w.maximizeWin;case 10:return!!w.fullscreenWin;case 11:return!!w.getWinState;case 13:return!!w.getWinPosition;case 14:return!!w.getWinSizePixels;case 15:return!!w.getScreenSizePixels;case 16:return!!w.getCellSizePixels;case 18:return!!w.getWinSizeChars;case 19:return!!w.getScreenSizeChars;case 20:return!!w.getIconTitle;case 21:return!!w.getWinTitle;case 22:return!!w.pushTitle;case 23:return!!w.popTitle;case 24:return!!w.setWinLines}return!1}(function(k){k[k.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",k[k.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(h=f.WindowsOptionsReportType||(f.WindowsOptionsReportType={}));var m=function(){function k(w,C,E,T){this._bufferService=w,this._coreService=C,this._logService=E,this._optionsService=T,this._data=new Uint32Array(0)}return k.prototype.hook=function(w){this._data=new Uint32Array(0)},k.prototype.put=function(w,C,E){this._data=n.concat(this._data,w.subarray(C,E))},k.prototype.unhook=function(w){if(w){var C=o.utf32ToString(this._data);switch(this._data=new Uint32Array(0),C){case'"q':return this._coreService.triggerDataEvent(a.C0.ESC+'P1$r0"q'+a.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(a.C0.ESC+'P1$r61;1"p'+a.C0.ESC+"\\");case"r":var E=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(a.C0.ESC+"P1$r"+E+a.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(a.C0.ESC+"P1$r0m"+a.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(a.C0.ESC+"P1$r"+T+" q"+a.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",C),this._coreService.triggerDataEvent(a.C0.ESC+"P0$r"+a.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},k}(),S=function(k){function w(C,E,T,L,N,Z,q,H,z){z===void 0&&(z=new d.EscapeSequenceParser);var A=k.call(this)||this;A._bufferService=C,A._charsetService=E,A._coreService=T,A._dirtyRowService=L,A._logService=N,A._optionsService=Z,A._coreMouseService=q,A._unicodeService=H,A._parser=z,A._parseBuffer=new Uint32Array(4096),A._stringDecoder=new o.StringToUtf32,A._utf8Decoder=new o.Utf8ToUtf32,A._workCell=new r.CellData,A._windowTitle="",A._iconName="",A._windowTitleStack=[],A._iconNameStack=[],A._curAttrData=t.DEFAULT_ATTR_DATA.clone(),A._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),A._onRequestBell=new c.EventEmitter,A._onRequestRefreshRows=new c.EventEmitter,A._onRequestReset=new c.EventEmitter,A._onRequestScroll=new c.EventEmitter,A._onRequestSyncScrollBar=new c.EventEmitter,A._onRequestWindowsOptionsReport=new c.EventEmitter,A._onA11yChar=new c.EventEmitter,A._onA11yTab=new c.EventEmitter,A._onCursorMove=new c.EventEmitter,A._onLineFeed=new c.EventEmitter,A._onScroll=new c.EventEmitter,A._onTitleChange=new c.EventEmitter,A.register(A._parser),A._parser.setCsiHandlerFallback(function(B,Y){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(B),params:Y.toArray()})}),A._parser.setEscHandlerFallback(function(B){A._logService.debug("Unknown ESC code: ",{identifier:A._parser.identToString(B)})}),A._parser.setExecuteHandlerFallback(function(B){A._logService.debug("Unknown EXECUTE code: ",{code:B})}),A._parser.setOscHandlerFallback(function(B,Y,ue){A._logService.debug("Unknown OSC code: ",{identifier:B,action:Y,data:ue})}),A._parser.setDcsHandlerFallback(function(B,Y,ue){Y==="HOOK"&&(ue=ue.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(B),action:Y,payload:ue})}),A._parser.setPrintHandler(function(B,Y,ue){return A.print(B,Y,ue)}),A._parser.setCsiHandler({final:"@"},function(B){return A.insertChars(B)}),A._parser.setCsiHandler({intermediates:" ",final:"@"},function(B){return A.scrollLeft(B)}),A._parser.setCsiHandler({final:"A"},function(B){return A.cursorUp(B)}),A._parser.setCsiHandler({intermediates:" ",final:"A"},function(B){return A.scrollRight(B)}),A._parser.setCsiHandler({final:"B"},function(B){return A.cursorDown(B)}),A._parser.setCsiHandler({final:"C"},function(B){return A.cursorForward(B)}),A._parser.setCsiHandler({final:"D"},function(B){return A.cursorBackward(B)}),A._parser.setCsiHandler({final:"E"},function(B){return A.cursorNextLine(B)}),A._parser.setCsiHandler({final:"F"},function(B){return A.cursorPrecedingLine(B)}),A._parser.setCsiHandler({final:"G"},function(B){return A.cursorCharAbsolute(B)}),A._parser.setCsiHandler({final:"H"},function(B){return A.cursorPosition(B)}),A._parser.setCsiHandler({final:"I"},function(B){return A.cursorForwardTab(B)}),A._parser.setCsiHandler({final:"J"},function(B){return A.eraseInDisplay(B)}),A._parser.setCsiHandler({prefix:"?",final:"J"},function(B){return A.eraseInDisplay(B)}),A._parser.setCsiHandler({final:"K"},function(B){return A.eraseInLine(B)}),A._parser.setCsiHandler({prefix:"?",final:"K"},function(B){return A.eraseInLine(B)}),A._parser.setCsiHandler({final:"L"},function(B){return A.insertLines(B)}),A._parser.setCsiHandler({final:"M"},function(B){return A.deleteLines(B)}),A._parser.setCsiHandler({final:"P"},function(B){return A.deleteChars(B)}),A._parser.setCsiHandler({final:"S"},function(B){return A.scrollUp(B)}),A._parser.setCsiHandler({final:"T"},function(B){return A.scrollDown(B)}),A._parser.setCsiHandler({final:"X"},function(B){return A.eraseChars(B)}),A._parser.setCsiHandler({final:"Z"},function(B){return A.cursorBackwardTab(B)}),A._parser.setCsiHandler({final:"`"},function(B){return A.charPosAbsolute(B)}),A._parser.setCsiHandler({final:"a"},function(B){return A.hPositionRelative(B)}),A._parser.setCsiHandler({final:"b"},function(B){return A.repeatPrecedingCharacter(B)}),A._parser.setCsiHandler({final:"c"},function(B){return A.sendDeviceAttributesPrimary(B)}),A._parser.setCsiHandler({prefix:">",final:"c"},function(B){return A.sendDeviceAttributesSecondary(B)}),A._parser.setCsiHandler({final:"d"},function(B){return A.linePosAbsolute(B)}),A._parser.setCsiHandler({final:"e"},function(B){return A.vPositionRelative(B)}),A._parser.setCsiHandler({final:"f"},function(B){return A.hVPosition(B)}),A._parser.setCsiHandler({final:"g"},function(B){return A.tabClear(B)}),A._parser.setCsiHandler({final:"h"},function(B){return A.setMode(B)}),A._parser.setCsiHandler({prefix:"?",final:"h"},function(B){return A.setModePrivate(B)}),A._parser.setCsiHandler({final:"l"},function(B){return A.resetMode(B)}),A._parser.setCsiHandler({prefix:"?",final:"l"},function(B){return A.resetModePrivate(B)}),A._parser.setCsiHandler({final:"m"},function(B){return A.charAttributes(B)}),A._parser.setCsiHandler({final:"n"},function(B){return A.deviceStatus(B)}),A._parser.setCsiHandler({prefix:"?",final:"n"},function(B){return A.deviceStatusPrivate(B)}),A._parser.setCsiHandler({intermediates:"!",final:"p"},function(B){return A.softReset(B)}),A._parser.setCsiHandler({intermediates:" ",final:"q"},function(B){return A.setCursorStyle(B)}),A._parser.setCsiHandler({final:"r"},function(B){return A.setScrollRegion(B)}),A._parser.setCsiHandler({final:"s"},function(B){return A.saveCursor(B)}),A._parser.setCsiHandler({final:"t"},function(B){return A.windowOptions(B)}),A._parser.setCsiHandler({final:"u"},function(B){return A.restoreCursor(B)}),A._parser.setCsiHandler({intermediates:"'",final:"}"},function(B){return A.insertColumns(B)}),A._parser.setCsiHandler({intermediates:"'",final:"~"},function(B){return A.deleteColumns(B)}),A._parser.setExecuteHandler(a.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(a.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(a.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(a.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(a.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(a.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(a.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(a.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(a.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(a.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(a.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(a.C1.HTS,function(){return A.tabSet()}),A._parser.setOscHandler(0,new l.OscHandler(function(B){A.setTitle(B),A.setIconName(B)})),A._parser.setOscHandler(1,new l.OscHandler(function(B){return A.setIconName(B)})),A._parser.setOscHandler(2,new l.OscHandler(function(B){return A.setTitle(B)})),A._parser.setEscHandler({final:"7"},function(){return A.saveCursor()}),A._parser.setEscHandler({final:"8"},function(){return A.restoreCursor()}),A._parser.setEscHandler({final:"D"},function(){return A.index()}),A._parser.setEscHandler({final:"E"},function(){return A.nextLine()}),A._parser.setEscHandler({final:"H"},function(){return A.tabSet()}),A._parser.setEscHandler({final:"M"},function(){return A.reverseIndex()}),A._parser.setEscHandler({final:"="},function(){return A.keypadApplicationMode()}),A._parser.setEscHandler({final:">"},function(){return A.keypadNumericMode()}),A._parser.setEscHandler({final:"c"},function(){return A.fullReset()}),A._parser.setEscHandler({final:"n"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"o"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"|"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"}"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"~"},function(){return A.setgLevel(1)}),A._parser.setEscHandler({intermediates:"%",final:"@"},function(){return A.selectDefaultCharset()}),A._parser.setEscHandler({intermediates:"%",final:"G"},function(){return A.selectDefaultCharset()});var O=function(B){X._parser.setEscHandler({intermediates:"(",final:B},function(){return A.selectCharset("("+B)}),X._parser.setEscHandler({intermediates:")",final:B},function(){return A.selectCharset(")"+B)}),X._parser.setEscHandler({intermediates:"*",final:B},function(){return A.selectCharset("*"+B)}),X._parser.setEscHandler({intermediates:"+",final:B},function(){return A.selectCharset("+"+B)}),X._parser.setEscHandler({intermediates:"-",final:B},function(){return A.selectCharset("-"+B)}),X._parser.setEscHandler({intermediates:".",final:B},function(){return A.selectCharset("."+B)}),X._parser.setEscHandler({intermediates:"/",final:B},function(){return A.selectCharset("/"+B)})},X=this;for(var U in u.CHARSETS)O(U);return A._parser.setEscHandler({intermediates:"#",final:"8"},function(){return A.screenAlignmentPattern()}),A._parser.setErrorHandler(function(B){return A._logService.error("Parsing error: ",B),B}),A._parser.setDcsHandler({intermediates:"$",final:"q"},new m(A._bufferService,A._coreService,A._logService,A._optionsService)),A}return b(w,k),Object.defineProperty(w.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),w.prototype.dispose=function(){k.prototype.dispose.call(this)},w.prototype.parse=function(C){var E=this._bufferService.buffer,T=E.x,L=E.y;if(this._logService.debug("parsing data",C),this._parseBuffer.length<C.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(C.length,131072))),this._dirtyRowService.clearRange(),C.length>131072)for(var N=0;N<C.length;N+=131072){var Z=N+131072<C.length?N+131072:C.length,q=typeof C=="string"?this._stringDecoder.decode(C.substring(N,Z),this._parseBuffer):this._utf8Decoder.decode(C.subarray(N,Z),this._parseBuffer);this._parser.parse(this._parseBuffer,q)}else q=typeof C=="string"?this._stringDecoder.decode(C,this._parseBuffer):this._utf8Decoder.decode(C,this._parseBuffer),this._parser.parse(this._parseBuffer,q);(E=this._bufferService.buffer).x===T&&E.y===L||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},w.prototype.print=function(C,E,T){var L,N,Z=this._bufferService.buffer,q=this._charsetService.charset,H=this._optionsService.options.screenReaderMode,z=this._bufferService.cols,A=this._coreService.decPrivateModes.wraparound,O=this._coreService.modes.insertMode,X=this._curAttrData,U=Z.lines.get(Z.ybase+Z.y);this._dirtyRowService.markDirty(Z.y),Z.x&&T-E>0&&U.getWidth(Z.x-1)===2&&U.setCellFromCodePoint(Z.x-1,0,1,X.fg,X.bg,X.extended);for(var B=E;B<T;++B){if(L=C[B],N=this._unicodeService.wcwidth(L),L<127&&q){var Y=q[String.fromCharCode(L)];Y&&(L=Y.charCodeAt(0))}if(H&&this._onA11yChar.fire(o.stringFromCodePoint(L)),N||!Z.x){if(Z.x+N-1>=z){if(A){for(;Z.x<z;)U.setCellFromCodePoint(Z.x++,0,1,X.fg,X.bg,X.extended);Z.x=0,Z.y++,Z.y===Z.scrollBottom+1?(Z.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Z.y>=this._bufferService.rows&&(Z.y=this._bufferService.rows-1),Z.lines.get(Z.ybase+Z.y).isWrapped=!0),U=Z.lines.get(Z.ybase+Z.y)}else if(Z.x=z-1,N===2)continue}if(O&&(U.insertCells(Z.x,N,Z.getNullCell(X),X),U.getWidth(z-1)===2&&U.setCellFromCodePoint(z-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,X.fg,X.bg,X.extended)),U.setCellFromCodePoint(Z.x++,L,N,X.fg,X.bg,X.extended),N>0)for(;--N;)U.setCellFromCodePoint(Z.x++,0,0,X.fg,X.bg,X.extended)}else U.getWidth(Z.x-1)?U.addCodepointToCell(Z.x-1,L):U.addCodepointToCell(Z.x-2,L)}T-E>0&&(U.loadCell(Z.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),Z.x<z&&T-E>0&&U.getWidth(Z.x)===0&&!U.hasContent(Z.x)&&U.setCellFromCodePoint(Z.x,0,1,X.fg,X.bg,X.extended),this._dirtyRowService.markDirty(Z.y)},w.prototype.addCsiHandler=function(C,E){var T=this;return C.final!=="t"||C.prefix||C.intermediates?this._parser.addCsiHandler(C,E):this._parser.addCsiHandler(C,function(L){return!g(L.params[0],T._optionsService.options.windowOptions)||E(L)})},w.prototype.addDcsHandler=function(C,E){return this._parser.addDcsHandler(C,new v.DcsHandler(E))},w.prototype.addEscHandler=function(C,E){return this._parser.addEscHandler(C,E)},w.prototype.addOscHandler=function(C,E){return this._parser.addOscHandler(C,new l.OscHandler(E))},w.prototype.bell=function(){this._onRequestBell.fire()},w.prototype.lineFeed=function(){var C=this._bufferService.buffer;this._dirtyRowService.markDirty(C.y),this._optionsService.options.convertEol&&(C.x=0),C.y++,C.y===C.scrollBottom+1?(C.y--,this._onRequestScroll.fire(this._eraseAttrData())):C.y>=this._bufferService.rows&&(C.y=this._bufferService.rows-1),C.x>=this._bufferService.cols&&C.x--,this._dirtyRowService.markDirty(C.y),this._onLineFeed.fire()},w.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},w.prototype.backspace=function(){var C,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&&(!((C=E.lines.get(E.ybase+E.y))===null||C===void 0)&&C.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()},w.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var C=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-C)}},w.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},w.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},w.prototype._restrictCursor=function(C){C===void 0&&(C=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(C,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)},w.prototype._setCursor=function(C,E){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=C,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+E):(this._bufferService.buffer.x=C,this._bufferService.buffer.y=E),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},w.prototype._moveCursor=function(C,E){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+C,this._bufferService.buffer.y+E)},w.prototype.cursorUp=function(C){var E=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;E>=0?this._moveCursor(0,-Math.min(E,C.params[0]||1)):this._moveCursor(0,-(C.params[0]||1))},w.prototype.cursorDown=function(C){var E=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;E>=0?this._moveCursor(0,Math.min(E,C.params[0]||1)):this._moveCursor(0,C.params[0]||1)},w.prototype.cursorForward=function(C){this._moveCursor(C.params[0]||1,0)},w.prototype.cursorBackward=function(C){this._moveCursor(-(C.params[0]||1),0)},w.prototype.cursorNextLine=function(C){this.cursorDown(C),this._bufferService.buffer.x=0},w.prototype.cursorPrecedingLine=function(C){this.cursorUp(C),this._bufferService.buffer.x=0},w.prototype.cursorCharAbsolute=function(C){this._setCursor((C.params[0]||1)-1,this._bufferService.buffer.y)},w.prototype.cursorPosition=function(C){this._setCursor(C.length>=2?(C.params[1]||1)-1:0,(C.params[0]||1)-1)},w.prototype.charPosAbsolute=function(C){this._setCursor((C.params[0]||1)-1,this._bufferService.buffer.y)},w.prototype.hPositionRelative=function(C){this._moveCursor(C.params[0]||1,0)},w.prototype.linePosAbsolute=function(C){this._setCursor(this._bufferService.buffer.x,(C.params[0]||1)-1)},w.prototype.vPositionRelative=function(C){this._moveCursor(0,C.params[0]||1)},w.prototype.hVPosition=function(C){this.cursorPosition(C)},w.prototype.tabClear=function(C){var E=C.params[0];E===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:E===3&&(this._bufferService.buffer.tabs={})},w.prototype.cursorForwardTab=function(C){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var E=C.params[0]||1;E--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},w.prototype.cursorBackwardTab=function(C){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var E=C.params[0]||1,T=this._bufferService.buffer;E--;)T.x=T.prevStop()},w.prototype._eraseInBufferLine=function(C,E,T,L){L===void 0&&(L=!1);var N=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+C);N.replaceCells(E,T,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),L&&(N.isWrapped=!1)},w.prototype._resetBufferLine=function(C){var E=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+C);E.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),E.isWrapped=!1},w.prototype.eraseInDisplay=function(C){var E;switch(this._restrictCursor(),C.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))}},w.prototype.eraseInLine=function(C){switch(this._restrictCursor(),C.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)},w.prototype.insertLines=function(C){this._restrictCursor();var E=C.params[0]||1,T=this._bufferService.buffer;if(!(T.y>T.scrollBottom||T.y<T.scrollTop)){for(var L=T.ybase+T.y,N=this._bufferService.rows-1-T.scrollBottom,Z=this._bufferService.rows-1+T.ybase-N+1;E--;)T.lines.splice(Z-1,1),T.lines.splice(L,0,T.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(T.y,T.scrollBottom),T.x=0}},w.prototype.deleteLines=function(C){this._restrictCursor();var E=C.params[0]||1,T=this._bufferService.buffer;if(!(T.y>T.scrollBottom||T.y<T.scrollTop)){var L,N=T.ybase+T.y;for(L=this._bufferService.rows-1-T.scrollBottom,L=this._bufferService.rows-1+T.ybase-L;E--;)T.lines.splice(N,1),T.lines.splice(L,0,T.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(T.y,T.scrollBottom),T.x=0}},w.prototype.insertChars=function(C){this._restrictCursor();var E=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);E&&(E.insertCells(this._bufferService.buffer.x,C.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},w.prototype.deleteChars=function(C){this._restrictCursor();var E=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);E&&(E.deleteCells(this._bufferService.buffer.x,C.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},w.prototype.scrollUp=function(C){for(var E=C.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)},w.prototype.scrollDown=function(C){for(var E=C.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(t.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(T.scrollTop,T.scrollBottom)},w.prototype.scrollLeft=function(C){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=C.params[0]||1,L=E.scrollTop;L<=E.scrollBottom;++L){var N=E.lines.get(E.ybase+L);N.deleteCells(0,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),N.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},w.prototype.scrollRight=function(C){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=C.params[0]||1,L=E.scrollTop;L<=E.scrollBottom;++L){var N=E.lines.get(E.ybase+L);N.insertCells(0,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),N.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},w.prototype.insertColumns=function(C){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=C.params[0]||1,L=E.scrollTop;L<=E.scrollBottom;++L){var N=this._bufferService.buffer.lines.get(E.ybase+L);N.insertCells(E.x,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),N.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},w.prototype.deleteColumns=function(C){var E=this._bufferService.buffer;if(!(E.y>E.scrollBottom||E.y<E.scrollTop)){for(var T=C.params[0]||1,L=E.scrollTop;L<=E.scrollBottom;++L){var N=E.lines.get(E.ybase+L);N.deleteCells(E.x,T,E.getNullCell(this._eraseAttrData()),this._eraseAttrData()),N.isWrapped=!1}this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom)}},w.prototype.eraseChars=function(C){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+(C.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},w.prototype.repeatPrecedingCharacter=function(C){if(this._parser.precedingCodepoint){for(var E=C.params[0]||1,T=new Uint32Array(E),L=0;L<E;++L)T[L]=this._parser.precedingCodepoint;this.print(T,0,T.length)}},w.prototype.sendDeviceAttributesPrimary=function(C){C.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c"))},w.prototype.sendDeviceAttributesSecondary=function(C){C.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(C.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c"))},w.prototype._is=function(C){return(this._optionsService.options.termName+"").indexOf(C)===0},w.prototype.setMode=function(C){for(var E=0;E<C.length;E++)switch(C.params[E]){case 4:this._coreService.modes.insertMode=!0}},w.prototype.setModePrivate=function(C){for(var E=0;E<C.length;E++)switch(C.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}},w.prototype.resetMode=function(C){for(var E=0;E<C.length;E++)switch(C.params[E]){case 4:this._coreService.modes.insertMode=!1}},w.prototype.resetModePrivate=function(C){for(var E=0;E<C.length;E++)switch(C.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(),C.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}},w.prototype._updateAttrColor=function(C,E,T,L,N){return E===2?(C|=50331648,C&=-16777216,C|=s.AttributeData.fromColorRGB([T,L,N])):E===5&&(C&=-50331904,C|=33554432|255&T),C},w.prototype._extractColor=function(C,E,T){var L=[0,0,-1,0,0,0],N=0,Z=0;do{if(L[Z+N]=C.params[E+Z],C.hasSubParams(E+Z)){var q=C.getSubParams(E+Z),H=0;do L[1]===5&&(N=1),L[Z+H+1+N]=q[H];while(++H<q.length&&H+Z+1+N<L.length);break}if(L[1]===5&&Z+N>=2||L[1]===2&&Z+N>=5)break;L[1]&&(N=1)}while(++Z+E<C.length&&Z+N<L.length);for(H=2;H<L.length;++H)L[H]===-1&&(L[H]=0);switch(L[0]){case 38:T.fg=this._updateAttrColor(T.fg,L[1],L[3],L[4],L[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,L[1],L[3],L[4],L[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,L[1],L[3],L[4],L[5])}return Z},w.prototype._processUnderline=function(C,E){E.extended=E.extended.clone(),(!~C||C>5)&&(C=1),E.extended.underlineStyle=C,E.fg|=268435456,C===0&&(E.fg&=-268435457),E.updateExtended()},w.prototype.charAttributes=function(C){if(C.length===1&&C.params[0]===0)return this._curAttrData.fg=t.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=t.DEFAULT_ATTR_DATA.bg);for(var E,T=C.length,L=this._curAttrData,N=0;N<T;N++)(E=C.params[N])>=30&&E<=37?(L.fg&=-50331904,L.fg|=16777216|E-30):E>=40&&E<=47?(L.bg&=-50331904,L.bg|=16777216|E-40):E>=90&&E<=97?(L.fg&=-50331904,L.fg|=16777224|E-90):E>=100&&E<=107?(L.bg&=-50331904,L.bg|=16777224|E-100):E===0?(L.fg=t.DEFAULT_ATTR_DATA.fg,L.bg=t.DEFAULT_ATTR_DATA.bg):E===1?L.fg|=134217728:E===3?L.bg|=67108864:E===4?(L.fg|=268435456,this._processUnderline(C.hasSubParams(N)?C.getSubParams(N)[0]:1,L)):E===5?L.fg|=536870912:E===7?L.fg|=67108864:E===8?L.fg|=1073741824:E===2?L.bg|=134217728:E===21?this._processUnderline(2,L):E===22?(L.fg&=-134217729,L.bg&=-134217729):E===23?L.bg&=-67108865:E===24?L.fg&=-268435457:E===25?L.fg&=-536870913:E===27?L.fg&=-67108865:E===28?L.fg&=-1073741825:E===39?(L.fg&=-67108864,L.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):E===49?(L.bg&=-67108864,L.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):E===38||E===48||E===58?N+=this._extractColor(C,N,L):E===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):E===100?(L.fg&=-67108864,L.fg|=16777215&t.DEFAULT_ATTR_DATA.fg,L.bg&=-67108864,L.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",E)},w.prototype.deviceStatus=function(C){switch(C.params[0]){case 5:this._coreService.triggerDataEvent(a.C0.ESC+"[0n");break;case 6:var E=this._bufferService.buffer.y+1,T=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(a.C0.ESC+"["+E+";"+T+"R")}},w.prototype.deviceStatusPrivate=function(C){switch(C.params[0]){case 6:var E=this._bufferService.buffer.y+1,T=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(a.C0.ESC+"[?"+E+";"+T+"R")}},w.prototype.softReset=function(C){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},w.prototype.setCursorStyle=function(C){var E=C.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},w.prototype.setScrollRegion=function(C){var E,T=C.params[0]||1;(C.length<2||(E=C.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))},w.prototype.windowOptions=function(C){if(g(C.params[0],this._optionsService.options.windowOptions)){var E=C.length>1?C.params[1]:0;switch(C.params[0]){case 14:E!==2&&this._onRequestWindowsOptionsReport.fire(h.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(h.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(a.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())}}},w.prototype.saveCursor=function(C){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},w.prototype.restoreCursor=function(C){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()},w.prototype.setTitle=function(C){this._windowTitle=C,this._onTitleChange.fire(C)},w.prototype.setIconName=function(C){this._iconName=C},w.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},w.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},w.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},w.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,u.DEFAULT_CHARSET)},w.prototype.selectCharset=function(C){C.length===2?C[0]!=="/"&&this._charsetService.setgCharset(y[C[0]],u.CHARSETS[C[1]]||u.DEFAULT_CHARSET):this.selectDefaultCharset()},w.prototype.index=function(){this._restrictCursor();var C=this._bufferService.buffer;this._bufferService.buffer.y++,C.y===C.scrollBottom+1?(C.y--,this._onRequestScroll.fire(this._eraseAttrData())):C.y>=this._bufferService.rows&&(C.y=this._bufferService.rows-1),this._restrictCursor()},w.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},w.prototype.reverseIndex=function(){this._restrictCursor();var C=this._bufferService.buffer;if(C.y===C.scrollTop){var E=C.scrollBottom-C.scrollTop;C.lines.shiftElements(C.ybase+C.y,E,1),C.lines.set(C.ybase+C.y,C.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(C.scrollTop,C.scrollBottom)}else C.y--,this._restrictCursor()},w.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},w.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},w.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},w.prototype.setgLevel=function(C){this._charsetService.setgLevel(C)},w.prototype.screenAlignmentPattern=function(){var C=new r.CellData;C.content=1<<22|69,C.fg=this._curAttrData.fg,C.bg=this._curAttrData.bg;var E=this._bufferService.buffer;this._setCursor(0,0);for(var T=0;T<this._bufferService.rows;++T){var L=E.ybase+E.y+T,N=E.lines.get(L);N&&(N.fill(C),N.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},w}(i.Disposable);f.InputHandler=S},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.DEFAULT_CHARSET=f.CHARSETS=void 0,f.CHARSETS={},f.DEFAULT_CHARSET=f.CHARSETS.B,f.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"},f.CHARSETS.A={"#":"\xA3"},f.CHARSETS.B=void 0,f.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},f.CHARSETS.C=f.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},f.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},f.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},f.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},f.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},f.CHARSETS.E=f.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},f.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},f.CHARSETS.H=f.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},f.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.Params=void 0;var p=function(){function b(h,a){if(h===void 0&&(h=32),a===void 0&&(a=32),this.maxLength=h,this.maxSubParamsLength=a,a>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(a),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return b.fromArray=function(h){var a=new b;if(!h.length)return a;for(var u=h[0]instanceof Array?1:0;u<h.length;++u){var d=h[u];if(d instanceof Array)for(var i=0;i<d.length;++i)a.addSubParam(d[i]);else a.addParam(d)}return a},b.prototype.clone=function(){var h=new b(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h},b.prototype.toArray=function(){for(var h=[],a=0;a<this.length;++a){h.push(this.params[a]);var u=this._subParamsIdx[a]>>8,d=255&this._subParamsIdx[a];d-u>0&&h.push(Array.prototype.slice.call(this._subParams,u,d))}return h},b.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},b.prototype.addParam=function(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>2147483647?2147483647:h}},b.prototype.addSubParam=function(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>2147483647?2147483647:h,this._subParamsIdx[this.length-1]++}},b.prototype.hasSubParams=function(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0},b.prototype.getSubParams=function(h){var a=this._subParamsIdx[h]>>8,u=255&this._subParamsIdx[h];return u-a>0?this._subParams.subarray(a,u):null},b.prototype.getSubParamsAll=function(){for(var h={},a=0;a<this.length;++a){var u=this._subParamsIdx[a]>>8,d=255&this._subParamsIdx[a];d-u>0&&(h[a]=this._subParams.slice(u,d))}return h},b.prototype.addDigit=function(h){var a;if(!(this._rejectDigits||!(a=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var u=this._digitIsSub?this._subParams:this.params,d=u[a-1];u[a-1]=~d?Math.min(10*d+h,2147483647):h}},b}();f.Params=p},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.OscHandler=f.OscParser=void 0;var p=_(23),b=_(8),h=function(){function u(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return u.prototype.addHandler=function(d,i){this._handlers[d]===void 0&&(this._handlers[d]=[]);var n=this._handlers[d];return n.push(i),{dispose:function(){var o=n.indexOf(i);o!==-1&&n.splice(o,1)}}},u.prototype.setHandler=function(d,i){this._handlers[d]=[i]},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 i=d.length-1;i>=0;i--)d[i].start();else this._handlerFb(this._id,"START")},u.prototype._put=function(d,i,n){var o=this._handlers[this._id];if(o)for(var t=o.length-1;t>=0;t--)o[t].put(d,i,n);else this._handlerFb(this._id,"PUT",b.utf32ToString(d,i,n))},u.prototype._end=function(d){var i=this._handlers[this._id];if(i){for(var n=i.length-1;n>=0&&i[n].end(d)===!1;n--);for(n--;n>=0;n--)i[n].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,i,n){if(this._state!==3){if(this._state===1)for(;i<n;){var o=d[i++];if(o===59){this._state=2,this._start();break}if(o<48||57<o)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+o-48}this._state===2&&n-i>0&&this._put(d,i,n)}},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}();f.OscParser=h;var a=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,i,n){this._hitLimit||(this._data+=b.utf32ToString(d,i,n),this._data.length>p.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},u.prototype.end=function(d){var i;return this._hitLimit?i=!1:d&&(i=this._handler(this._data)),this._data="",this._hitLimit=!1,i},u}();f.OscHandler=a},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.PAYLOAD_LIMIT=void 0,f.PAYLOAD_LIMIT=1e7},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.DcsHandler=f.DcsParser=void 0;var p=_(8),b=_(21),h=_(23),a=[],u=function(){function i(){this._handlers=Object.create(null),this._active=a,this._ident=0,this._handlerFb=function(){}}return i.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},i.prototype.addHandler=function(n,o){this._handlers[n]===void 0&&(this._handlers[n]=[]);var t=this._handlers[n];return t.push(o),{dispose:function(){var c=t.indexOf(o);c!==-1&&t.splice(c,1)}}},i.prototype.setHandler=function(n,o){this._handlers[n]=[o]},i.prototype.clearHandler=function(n){this._handlers[n]&&delete this._handlers[n]},i.prototype.setHandlerFallback=function(n){this._handlerFb=n},i.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=a,this._ident=0},i.prototype.hook=function(n,o){if(this.reset(),this._ident=n,this._active=this._handlers[n]||a,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(o);else this._handlerFb(this._ident,"HOOK",o)},i.prototype.put=function(n,o,t){if(this._active.length)for(var c=this._active.length-1;c>=0;c--)this._active[c].put(n,o,t);else this._handlerFb(this._ident,"PUT",p.utf32ToString(n,o,t))},i.prototype.unhook=function(n){if(this._active.length){for(var o=this._active.length-1;o>=0&&this._active[o].unhook(n)===!1;o--);for(o--;o>=0;o--)this._active[o].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",n);this._active=a,this._ident=0},i}();f.DcsParser=u;var d=function(){function i(n){this._handler=n,this._data="",this._hitLimit=!1}return i.prototype.hook=function(n){this._params=n.clone(),this._data="",this._hitLimit=!1},i.prototype.put=function(n,o,t){this._hitLimit||(this._data+=p.utf32ToString(n,o,t),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},i.prototype.unhook=function(n){var o;return this._hitLimit?o=!1:n&&(o=this._handler(this._data,this._params||new b.Params)),this._params=void 0,this._data="",this._hitLimit=!1,o},i}();f.DcsHandler=d},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.removeTerminalFromCache=f.acquireCharAtlas=void 0;var p=_(26),b=_(43),h=[];f.acquireCharAtlas=function(a,u,d,i,n){for(var o=p.generateConfig(i,n,a,d),t=0;t<h.length;t++){var c=(e=h[t]).ownedBy.indexOf(u);if(c>=0){if(p.configEquals(e.config,o))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),h.splice(t,1)):e.ownedBy.splice(c,1);break}}for(t=0;t<h.length;t++){var e=h[t];if(p.configEquals(e.config,o))return e.ownedBy.push(u),e.atlas}var r={atlas:new b.DynamicCharAtlas(document,o),config:o,ownedBy:[u]};return h.push(r),r.atlas},f.removeTerminalFromCache=function(a){for(var u=0;u<h.length;u++){var d=h[u].ownedBy.indexOf(a);if(d!==-1){h[u].ownedBy.length===1?(h[u].atlas.dispose(),h.splice(u,1)):h[u].ownedBy.splice(d,1);break}}}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.is256Color=f.configEquals=f.generateConfig=void 0;var p=_(3);f.generateConfig=function(b,h,a,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:b,scaledCharHeight:h,fontFamily:a.fontFamily,fontSize:a.fontSize,fontWeight:a.fontWeight,fontWeightBold:a.fontWeightBold,allowTransparency:a.allowTransparency,colors:d}},f.configEquals=function(b,h){for(var a=0;a<b.colors.ansi.length;a++)if(b.colors.ansi[a].rgba!==h.colors.ansi[a].rgba)return!1;return b.devicePixelRatio===h.devicePixelRatio&&b.fontFamily===h.fontFamily&&b.fontSize===h.fontSize&&b.fontWeight===h.fontWeight&&b.fontWeightBold===h.fontWeightBold&&b.allowTransparency===h.allowTransparency&&b.scaledCharWidth===h.scaledCharWidth&&b.scaledCharHeight===h.scaledCharHeight&&b.colors.foreground===h.colors.foreground&&b.colors.background===h.colors.background},f.is256Color=function(b){return b<p.DEFAULT_COLOR}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.ColorManager=f.DEFAULT_ANSI_COLORS=void 0;var p=_(10),b=_(45),h=p.css.toColor("#ffffff"),a=p.css.toColor("#000000"),u=p.css.toColor("#ffffff"),d=p.css.toColor("#000000"),i={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};f.DEFAULT_ANSI_COLORS=function(){for(var o=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],c=0;c<216;c++){var e=t[c/36%6|0],r=t[c/6%6|0],s=t[c%6];o.push({css:p.channels.toCss(e,r,s),rgba:p.channels.toRgba(e,r,s)})}for(c=0;c<24;c++){var l=8+10*c;o.push({css:p.channels.toCss(l,l,l),rgba:p.channels.toRgba(l,l,l)})}return o}();var n=function(){function o(t,c){this.allowTransparency=c;var e=t.createElement("canvas");e.width=1,e.height=1;var r=e.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new b.ColorContrastCache,this.colors={foreground:h,background:a,cursor:u,cursorAccent:d,selectionTransparent:i,selectionOpaque:p.color.blend(a,i),ansi:f.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return o.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},o.prototype.setTheme=function(t){t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,h),this.colors.background=this._parseColor(t.background,a),this.colors.cursor=this._parseColor(t.cursor,u,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,d,!0),this.colors.selectionTransparent=this._parseColor(t.selection,i,!0),this.colors.selectionOpaque=p.color.blend(this.colors.background,this.colors.selectionTransparent),p.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=p.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,f.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,f.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,f.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,f.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,f.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,f.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,f.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,f.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,f.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,f.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,f.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,f.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,f.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,f.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,f.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,f.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},o.prototype._parseColor=function(t,c,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return c;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+c.css),c;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(r[3]!==255){if(!e)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+c.css+"."),c;var s=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(S){return Number(S)}),l=s[0],v=s[1],y=s[2],g=s[3],m=Math.round(255*g);return{rgba:p.channels.toRgba(l,v,y,m),css:t}}return{css:this._ctx.fillStyle,rgba:p.channels.toRgba(r[0],r[1],r[2],r[3])}},o}();f.ColorManager=n},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.throwIfFalsy=void 0,f.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p}},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(n,o){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,c){t.__proto__=c}||function(t,c){for(var e in c)c.hasOwnProperty(e)&&(t[e]=c[e])})(n,o)},function(n,o){function t(){this.constructor=n}p(n,o),n.prototype=o===null?Object.create(o):(t.prototype=o.prototype,new t)});Object.defineProperty(f,"__esModule",{value:!0}),f.CharacterJoinerRegistry=f.JoinedCellData=void 0;var h=_(6),a=_(3),u=_(4),d=function(n){function o(t,c,e){var r=n.call(this)||this;return r.content=0,r.combinedData="",r.fg=t.fg,r.bg=t.bg,r.combinedData=c,r._width=e,r}return b(o,n),o.prototype.isCombined=function(){return 2097152},o.prototype.getWidth=function(){return this._width},o.prototype.getChars=function(){return this.combinedData},o.prototype.getCode=function(){return 2097151},o.prototype.setFromCharData=function(t){throw new Error("not implemented")},o.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},o}(h.AttributeData);f.JoinedCellData=d;var i=function(){function n(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new u.CellData}return n.prototype.registerCharacterJoiner=function(o){var t={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(t),t.id},n.prototype.deregisterCharacterJoiner=function(o){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===o)return this._characterJoiners.splice(t,1),!0;return!1},n.prototype.getJoinedCharacters=function(o){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(o);if(!t||t.length===0)return[];for(var c=[],e=t.translateToString(!0),r=0,s=0,l=0,v=t.getFg(0),y=t.getBg(0),g=0;g<t.getTrimmedLength();g++)if(t.loadCell(g,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==v||this._workCell.bg!==y){if(g-r>1)for(var m=this._getJoinedRanges(e,l,s,t,r),S=0;S<m.length;S++)c.push(m[S]);r=g,l=s,v=this._workCell.fg,y=this._workCell.bg}s+=this._workCell.getChars().length||a.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-r>1)for(m=this._getJoinedRanges(e,l,s,t,r),S=0;S<m.length;S++)c.push(m[S]);return c},n.prototype._getJoinedRanges=function(o,t,c,e,r){for(var s=o.substring(t,c),l=this._characterJoiners[0].handler(s),v=1;v<this._characterJoiners.length;v++)for(var y=this._characterJoiners[v].handler(s),g=0;g<y.length;g++)n._mergeRanges(l,y[g]);return this._stringRangesToCellRanges(l,e,r),l},n.prototype._stringRangesToCellRanges=function(o,t,c){var e=0,r=!1,s=0,l=o[e];if(l){for(var v=c;v<this._bufferService.cols;v++){var y=t.getWidth(v),g=t.getString(v).length||a.WHITESPACE_CELL_CHAR.length;if(y!==0){if(!r&&l[0]<=s&&(l[0]=v,r=!0),l[1]<=s){if(l[1]=v,!(l=o[++e]))break;l[0]<=s?(l[0]=v,r=!0):r=!1}s+=g}}l&&(l[1]=this._bufferService.cols)}},n._mergeRanges=function(o,t){for(var c=!1,e=0;e<o.length;e++){var r=o[e];if(c){if(t[1]<=r[0])return o[e-1][1]=t[1],o;if(t[1]<=r[1])return o[e-1][1]=Math.max(t[1],r[1]),o.splice(e,1),o;o.splice(e,1),e--}else{if(t[1]<=r[0])return o.splice(e,0,t),o;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),o;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),c=!0)}}return c?o[o.length-1][1]=t[1]:o.push(t),o},n}();f.CharacterJoinerRegistry=i},function(D,f,_){"use strict";function p(b,h){var a=h.getBoundingClientRect();return[b.clientX-a.left,b.clientY-a.top]}Object.defineProperty(f,"__esModule",{value:!0}),f.getRawByteCoords=f.getCoords=f.getCoordsRelativeToElement=void 0,f.getCoordsRelativeToElement=p,f.getCoords=function(b,h,a,u,d,i,n,o){if(d){var t=p(b,h);if(t)return t[0]=Math.ceil((t[0]+(o?i/2:0))/i),t[1]=Math.ceil(t[1]/n),t[0]=Math.min(Math.max(t[0],1),a+(o?1:0)),t[1]=Math.min(Math.max(t[1],1),u),t}},f.getRawByteCoords=function(b){if(b)return{x:b[0]+32,y:b[1]+32}}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.RenderDebouncer=void 0;var p=function(){function b(h){this._renderCallback=h}return b.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},b.prototype.refresh=function(h,a,u){var d=this;this._rowCount=u,h=h!==void 0?h:0,a=a!==void 0?a:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,a):a,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()}))},b.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var h=Math.max(this._rowStart,0),a=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(h,a)}},b}();f.RenderDebouncer=p},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(a,u){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,i){d.__proto__=i}||function(d,i){for(var n in i)i.hasOwnProperty(n)&&(d[n]=i[n])})(a,u)},function(a,u){function d(){this.constructor=a}p(a,u),a.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(f,"__esModule",{value:!0}),f.ScreenDprMonitor=void 0;var h=function(a){function u(){var d=a!==null&&a.apply(this,arguments)||this;return d._currentDevicePixelRatio=window.devicePixelRatio,d}return b(u,a),u.prototype.setListener=function(d){var i=this;this._listener&&this.clearListener(),this._listener=d,this._outerListener=function(){i._listener&&(i._listener(window.devicePixelRatio,i._currentDevicePixelRatio),i._updateDpr())},this._updateDpr()},u.prototype.dispose=function(){a.prototype.dispose.call(this),this.clearListener()},u.prototype._updateDpr=function(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)===null||d===void 0||d.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},u.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},u}(_(2).Disposable);f.ScreenDprMonitor=h},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.clone=void 0,f.clone=function p(b,h){if(h===void 0&&(h=5),typeof b!="object")return b;var a=Array.isArray(b)?[]:{};for(var u in b)a[u]=h<=1?b[u]:b[u]?p(b[u],h-1):b[u];return a}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;var p=_(4),b=_(35),h=_(18),a=_(0),u=_(83),d=function(){function e(r){this._core=new b.Terminal(r),this._addonManager=new u.AddonManager}return e.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(e.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new t(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new c(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._checkProposedApi(),new n(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._core.blur()},e.prototype.focus=function(){this._core.focus()},e.prototype.resize=function(r,s){this._verifyIntegers(r,s),this._core.resize(r,s)},e.prototype.open=function(r){this._core.open(r)},e.prototype.attachCustomKeyEventHandler=function(r){this._core.attachCustomKeyEventHandler(r)},e.prototype.registerLinkMatcher=function(r,s,l){return this._checkProposedApi(),this._core.registerLinkMatcher(r,s,l)},e.prototype.deregisterLinkMatcher=function(r){this._checkProposedApi(),this._core.deregisterLinkMatcher(r)},e.prototype.registerLinkProvider=function(r){return this._checkProposedApi(),this._core.registerLinkProvider(r)},e.prototype.registerCharacterJoiner=function(r){return this._checkProposedApi(),this._core.registerCharacterJoiner(r)},e.prototype.deregisterCharacterJoiner=function(r){this._checkProposedApi(),this._core.deregisterCharacterJoiner(r)},e.prototype.registerMarker=function(r){return this._checkProposedApi(),this._verifyIntegers(r),this._core.addMarker(r)},e.prototype.addMarker=function(r){return this.registerMarker(r)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(r,s,l){this._verifyIntegers(r,s,l),this._core.select(r,s,l)},e.prototype.getSelection=function(){return this._core.getSelection()},e.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},e.prototype.clearSelection=function(){this._core.clearSelection()},e.prototype.selectAll=function(){this._core.selectAll()},e.prototype.selectLines=function(r,s){this._verifyIntegers(r,s),this._core.selectLines(r,s)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(r){this._verifyIntegers(r),this._core.scrollLines(r)},e.prototype.scrollPages=function(r){this._verifyIntegers(r),this._core.scrollPages(r)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(r){this._verifyIntegers(r),this._core.scrollToLine(r)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(r,s){this._core.write(r,s)},e.prototype.writeUtf8=function(r,s){this._core.write(r,s)},e.prototype.writeln=function(r,s){this._core.write(r),this._core.write(`\r
`,s)},e.prototype.paste=function(r){this._core.paste(r)},e.prototype.getOption=function(r){return this._core.optionsService.getOption(r)},e.prototype.setOption=function(r,s){this._core.optionsService.setOption(r,s)},e.prototype.refresh=function(r,s){this._verifyIntegers(r,s),this._core.refresh(r,s)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(r){return this._addonManager.loadAddon(this,r)},Object.defineProperty(e,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];for(var l=0,v=r;l<v.length;l++){var y=v[l];if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}},e}();f.Terminal=d;var i=function(){function e(r,s){this._buffer=r,this.type=s}return e.prototype.init=function(r){return this._buffer=r,this},Object.defineProperty(e.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),e.prototype.getLine=function(r){var s=this._buffer.lines.get(r);if(s)return new o(s)},e.prototype.getNullCell=function(){return new p.CellData},e}(),n=function(){function e(r){var s=this;this._buffers=r,this._onBufferChange=new a.EventEmitter,this._normal=new i(this._buffers.normal,"normal"),this._alternate=new i(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return s._onBufferChange.fire(s.active)})}return Object.defineProperty(e.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),e}(),o=function(){function e(r){this._line=r}return Object.defineProperty(e.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),e.prototype.getCell=function(r,s){if(!(r<0||r>=this._line.length))return s?(this._line.loadCell(r,s),s):this._line.loadCell(r,new p.CellData)},e.prototype.translateToString=function(r,s,l){return this._line.translateToString(r,s,l)},e}(),t=function(){function e(r){this._core=r}return e.prototype.registerCsiHandler=function(r,s){return this._core.addCsiHandler(r,function(l){return s(l.toArray())})},e.prototype.addCsiHandler=function(r,s){return this.registerCsiHandler(r,s)},e.prototype.registerDcsHandler=function(r,s){return this._core.addDcsHandler(r,function(l,v){return s(l,v.toArray())})},e.prototype.addDcsHandler=function(r,s){return this.registerDcsHandler(r,s)},e.prototype.registerEscHandler=function(r,s){return this._core.addEscHandler(r,s)},e.prototype.addEscHandler=function(r,s){return this.registerEscHandler(r,s)},e.prototype.registerOscHandler=function(r,s){return this._core.addOscHandler(r,s)},e.prototype.addOscHandler=function(r,s){return this.registerOscHandler(r,s)},e}(),c=function(){function e(r){this._core=r}return e.prototype.register=function(r){this._core.unicodeService.register(r)},Object.defineProperty(e.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(r){this._core.unicodeService.activeVersion=r},enumerable:!1,configurable:!0}),e}()},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(z,A){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,X){O.__proto__=X}||function(O,X){for(var U in X)X.hasOwnProperty(U)&&(O[U]=X[U])})(z,A)},function(z,A){function O(){this.constructor=z}p(z,A),z.prototype=A===null?Object.create(A):(O.prototype=A.prototype,new O)});Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;var h=_(36),a=_(37),u=_(38),d=_(12),i=_(19),n=_(40),o=_(50),t=_(51),c=_(11),e=_(7),r=_(18),s=_(54),l=_(55),v=_(56),y=_(57),g=_(59),m=_(0),S=_(16),k=_(27),w=_(60),C=_(5),E=_(61),T=_(62),L=_(63),N=_(64),Z=_(65),q=typeof window!="undefined"?window.document:null,H=function(z){function A(O){O===void 0&&(O={});var X=z.call(this,O)||this;return X.browser=c,X._keyDownHandled=!1,X._onCursorMove=new m.EventEmitter,X._onKey=new m.EventEmitter,X._onRender=new m.EventEmitter,X._onSelectionChange=new m.EventEmitter,X._onTitleChange=new m.EventEmitter,X._onFocus=new m.EventEmitter,X._onBlur=new m.EventEmitter,X._onA11yCharEmitter=new m.EventEmitter,X._onA11yTabEmitter=new m.EventEmitter,X._setup(),X.linkifier=X._instantiationService.createInstance(o.Linkifier),X.linkifier2=X.register(X._instantiationService.createInstance(L.Linkifier2)),X.register(X._inputHandler.onRequestBell(function(){return X.bell()})),X.register(X._inputHandler.onRequestRefreshRows(function(U,B){return X.refresh(U,B)})),X.register(X._inputHandler.onRequestReset(function(){return X.reset()})),X.register(X._inputHandler.onRequestScroll(function(U,B){return X.scroll(U,B||void 0)})),X.register(X._inputHandler.onRequestWindowsOptionsReport(function(U){return X._reportWindowsOptions(U)})),X.register(m.forwardEvent(X._inputHandler.onCursorMove,X._onCursorMove)),X.register(m.forwardEvent(X._inputHandler.onTitleChange,X._onTitleChange)),X.register(m.forwardEvent(X._inputHandler.onA11yChar,X._onA11yCharEmitter)),X.register(m.forwardEvent(X._inputHandler.onA11yTab,X._onA11yTabEmitter)),X.register(X._bufferService.onResize(function(U){return X._afterResize(U.cols,U.rows)})),X}return b(A,z),Object.defineProperty(A.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),A.prototype.dispose=function(){var O,X,U;this._isDisposed||(z.prototype.dispose.call(this),(O=this._renderService)===null||O===void 0||O.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(U=(X=this.element)===null||X===void 0?void 0:X.parentNode)===null||U===void 0||U.removeChild(this.element))},A.prototype._setup=function(){z.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(A.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),A.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},A.prototype._updateOptions=function(O){var X,U,B,Y;switch(z.prototype._updateOptions.call(this,O),O){case"fontFamily":case"fontSize":(X=this._renderService)===null||X===void 0||X.clear(),(U=this._charSizeService)===null||U===void 0||U.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(B=this.viewport)===null||B===void 0||B.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new v.AccessibilityManager(this,this._renderService)):((Y=this._accessibilityManager)===null||Y===void 0||Y.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},A.prototype._onTextAreaFocus=function(O){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[I"),this.updateCursorStyle(O),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},A.prototype.blur=function(){var O;return(O=this.textarea)===null||O===void 0?void 0:O.blur()},A.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},A.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var O=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),X=this._bufferService.buffer.y*O,U=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=U+"px",this.textarea.style.top=X+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=O+"px",this.textarea.style.lineHeight=O+"px",this.textarea.style.zIndex="-5"}},A.prototype._initGlobal=function(){var O=this;this._bindKeys(),this.register(e.addDisposableDomListener(this.element,"copy",function(U){O.hasSelection()&&u.copyHandler(U,O._selectionService)}));var X=function(U){return u.handlePasteEvent(U,O.textarea,O._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",X)),this.register(e.addDisposableDomListener(this.element,"paste",X)),c.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(U){U.button===2&&u.rightClickHandler(U,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(U){u.rightClickHandler(U,O.textarea,O.screenElement,O._selectionService,O.options.rightClickSelectsWord)})),c.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(U){U.button===1&&u.moveTextAreaUnderMouseCursor(U,O.textarea,O.screenElement)}))},A.prototype._bindKeys=function(){var O=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(X){return O._keyUp(X)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(X){return O._keyDown(X)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(X){return O._keyPress(X)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return O._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(X){return O._compositionHelper.compositionupdate(X)})),this.register(e.addDisposableDomListener(this.textarea,"compositionend",function(){return O._compositionHelper.compositionend()})),this.register(this.onRender(function(){return O._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(X){return O._queueLinkification(X.start,X.end)}))},A.prototype.open=function(O){var X=this;if(!O)throw new Error("Terminal requires a parent element.");q.body.contains(O)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=O.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),O.appendChild(this.element);var U=q.createDocumentFragment();this._viewportElement=q.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),U.appendChild(this._viewportElement),this._viewportScrollArea=q.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=q.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=q.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),U.appendChild(this.screenElement),this.textarea=q.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",r.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(e.addDisposableDomListener(this.textarea,"focus",function(ue){return X._onTextAreaFocus(ue)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return X._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var B=this._instantiationService.createInstance(N.CoreBrowserService,this.textarea);this._instantiationService.setService(C.ICoreBrowserService,B),this._charSizeService=this._instantiationService.createInstance(E.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(C.ICharSizeService,this._charSizeService),this._compositionView=q.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(U),this._theme=this.options.theme||this._theme,this._colorManager=new k.ColorManager(q,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ue){return X._colorManager.onOptionsChange(ue)})),this._colorManager.setTheme(this._theme);var Y=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,Y,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ue){return X._onRender.fire(ue)})),this.onResize(function(ue){return X._renderService.resize(ue.cols,ue.rows)}),this._soundService=this._instantiationService.createInstance(s.SoundService),this._instantiationService.setService(C.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(T.MouseService),this._instantiationService.setService(C.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,function(ue,me){return X.scrollLines(ue,me)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return X.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){X._renderService.onCursorMove(),X._syncTextArea()})),this.register(this.onResize(function(){return X._renderService.onResize(X.cols,X.rows)})),this.register(this.onBlur(function(){return X._renderService.onBlur()})),this.register(this.onFocus(function(){return X._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return X.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ue){return X.scrollLines(ue.amount,ue.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return X._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ue){return X._renderService.onSelectionChanged(ue.start,ue.end,ue.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ue){X.textarea.value=ue,X.textarea.focus(),X.textarea.select()})),this.register(this.onScroll(function(){X.viewport.syncScrollArea(),X._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return X._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(l.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return X._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(e.addDisposableDomListener(this.element,"mousedown",function(ue){return X._selectionService.onMouseDown(ue)})),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()},A.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(n.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(y.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},A.prototype._setTheme=function(O){var X,U,B;this._theme=O,(X=this._colorManager)===null||X===void 0||X.setTheme(O),(U=this._renderService)===null||U===void 0||U.setColors(this._colorManager.colors),(B=this.viewport)===null||B===void 0||B.onThemeChange(this._colorManager.colors)},A.prototype.bindMouse=function(){var O=this,X=this,U=this.element;function B(oe){var be,Fe,Re=X._mouseService.getRawByteCoords(oe,X.screenElement,X.cols,X.rows);if(!Re)return!1;switch(oe.overrideType||oe.type){case"mousemove":Fe=32,oe.buttons===void 0?(be=3,oe.button!==void 0&&(be=oe.button<3?oe.button:3)):be=1&oe.buttons?0:4&oe.buttons?1:2&oe.buttons?2:3;break;case"mouseup":Fe=0,be=oe.button<3?oe.button:3;break;case"mousedown":Fe=1,be=oe.button<3?oe.button:3;break;case"wheel":oe.deltaY!==0&&(Fe=oe.deltaY<0?0:1),be=4;break;default:return!1}return!(Fe===void 0||be===void 0||be>4)&&X._coreMouseService.triggerMouseEvent({col:Re.x-33,row:Re.y-33,button:be,action:Fe,ctrl:oe.ctrlKey,alt:oe.altKey,shift:oe.shiftKey})}var Y={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ue=function(oe){return B(oe),oe.buttons||(O._document.removeEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.removeEventListener("mousemove",Y.mousedrag)),O.cancel(oe)},me=function(oe){return B(oe),oe.preventDefault(),O.cancel(oe)},De=function(oe){oe.buttons&&B(oe)},Te=function(oe){oe.buttons||B(oe)};this.register(this._coreMouseService.onProtocolChange(function(oe){oe?(O.optionsService.options.logLevel==="debug"&&O._logService.debug("Binding to mouse events:",O._coreMouseService.explainEvents(oe)),O.element.classList.add("enable-mouse-events"),O._selectionService.disable()):(O._logService.debug("Unbinding from mouse events."),O.element.classList.remove("enable-mouse-events"),O._selectionService.enable()),8&oe?Y.mousemove||(U.addEventListener("mousemove",Te),Y.mousemove=Te):(U.removeEventListener("mousemove",Y.mousemove),Y.mousemove=null),16&oe?Y.wheel||(U.addEventListener("wheel",me,{passive:!1}),Y.wheel=me):(U.removeEventListener("wheel",Y.wheel),Y.wheel=null),2&oe?Y.mouseup||(Y.mouseup=ue):(O._document.removeEventListener("mouseup",Y.mouseup),Y.mouseup=null),4&oe?Y.mousedrag||(Y.mousedrag=De):(O._document.removeEventListener("mousemove",Y.mousedrag),Y.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(U,"mousedown",function(oe){if(oe.preventDefault(),O.focus(),O._coreMouseService.areMouseEventsActive&&!O._selectionService.shouldForceSelection(oe))return B(oe),Y.mouseup&&O._document.addEventListener("mouseup",Y.mouseup),Y.mousedrag&&O._document.addEventListener("mousemove",Y.mousedrag),O.cancel(oe)})),this.register(e.addDisposableDomListener(U,"wheel",function(oe){if(!Y.wheel){if(!O.buffer.hasScrollback){var be=O.viewport.getLinesScrolled(oe);if(be===0)return;for(var Fe=d.C0.ESC+(O._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(oe.deltaY<0?"A":"B"),Re="",Me=0;Me<Math.abs(be);Me++)Re+=Fe;O._coreService.triggerDataEvent(Re,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(U,"wheel",function(oe){if(!Y.wheel)return O.viewport.onWheel(oe)?void 0:O.cancel(oe)},{passive:!1})),this.register(e.addDisposableDomListener(U,"touchstart",function(oe){if(!O._coreMouseService.areMouseEventsActive)return O.viewport.onTouchStart(oe),O.cancel(oe)},{passive:!0})),this.register(e.addDisposableDomListener(U,"touchmove",function(oe){if(!O._coreMouseService.areMouseEventsActive)return O.viewport.onTouchMove(oe)?void 0:O.cancel(oe)},{passive:!1}))},A.prototype.refresh=function(O,X){var U;(U=this._renderService)===null||U===void 0||U.refreshRows(O,X)},A.prototype._queueLinkification=function(O,X){var U;(U=this.linkifier)===null||U===void 0||U.linkifyRows(O,X)},A.prototype.updateCursorStyle=function(O){this._selectionService&&this._selectionService.shouldColumnSelect(O)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},A.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},A.prototype.scrollLines=function(O,X){z.prototype.scrollLines.call(this,O,X),this.refresh(0,this.rows-1)},A.prototype.paste=function(O){u.paste(O,this.textarea,this._coreService)},A.prototype.attachCustomKeyEventHandler=function(O){this._customKeyEventHandler=O},A.prototype.registerLinkMatcher=function(O,X,U){var B=this.linkifier.registerLinkMatcher(O,X,U);return this.refresh(0,this.rows-1),B},A.prototype.deregisterLinkMatcher=function(O){this.linkifier.deregisterLinkMatcher(O)&&this.refresh(0,this.rows-1)},A.prototype.registerLinkProvider=function(O){return this.linkifier2.registerLinkProvider(O)},A.prototype.registerCharacterJoiner=function(O){var X=this._renderService.registerCharacterJoiner(O);return this.refresh(0,this.rows-1),X},A.prototype.deregisterCharacterJoiner=function(O){this._renderService.deregisterCharacterJoiner(O)&&this.refresh(0,this.rows-1)},Object.defineProperty(A.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),A.prototype.addMarker=function(O){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)},A.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},A.prototype.select=function(O,X,U){this._selectionService.setSelection(O,X,U)},A.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},A.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},A.prototype.clearSelection=function(){var O;(O=this._selectionService)===null||O===void 0||O.clearSelection()},A.prototype.selectAll=function(){var O;(O=this._selectionService)===null||O===void 0||O.selectAll()},A.prototype.selectLines=function(O,X){var U;(U=this._selectionService)===null||U===void 0||U.selectLines(O,X)},A.prototype._keyDown=function(O){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(!this._compositionHelper.keydown(O))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var X=g.evaluateKeyboardEvent(O,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),X.type===3||X.type===2){var U=this.rows-1;return this.scrollLines(X.type===2?-U:U),this.cancel(O,!0)}return X.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(X.cancel&&this.cancel(O,!0),!X.key||(X.key!==d.C0.ETX&&X.key!==d.C0.CR||(this.textarea.value=""),this._onKey.fire({key:X.key,domEvent:O}),this._showCursor(),this._coreService.triggerDataEvent(X.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(O,!0)))},A.prototype._isThirdLevelShift=function(O,X){var U=O.isMac&&!this.options.macOptionIsMeta&&X.altKey&&!X.ctrlKey&&!X.metaKey||O.isWindows&&X.altKey&&X.ctrlKey&&!X.metaKey;return X.type==="keypress"?U:U&&(!X.keyCode||X.keyCode>47)},A.prototype._keyUp=function(O){this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(X){return X.keyCode===16||X.keyCode===17||X.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O))},A.prototype._keyPress=function(O){var X;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)X=O.charCode;else if(O.which===null||O.which===void 0)X=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;X=O.which}return!(!X||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O))&&(X=String.fromCharCode(X),this._onKey.fire({key:X,domEvent:O}),this._showCursor(),this._coreService.triggerDataEvent(X,!0),!0)},A.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},A.prototype.resize=function(O,X){O!==this.cols||X!==this.rows?z.prototype.resize.call(this,O,X):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},A.prototype._afterResize=function(O,X){var U,B;(U=this._charSizeService)===null||U===void 0||U.measure(),(B=this.viewport)===null||B===void 0||B.syncScrollArea(!0)},A.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var O=1;O<this.rows;O++)this.buffer.lines.push(this.buffer.getBlankLine(S.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},A.prototype.reset=function(){var O,X;this.options.rows=this.rows,this.options.cols=this.cols;var U=this._customKeyEventHandler;this._setup(),z.prototype.reset.call(this),(O=this._selectionService)===null||O===void 0||O.reset(),this._customKeyEventHandler=U,this.refresh(0,this.rows-1),(X=this.viewport)===null||X===void 0||X.syncScrollArea()},A.prototype._reportWindowsOptions=function(O){if(this._renderService)switch(O){case i.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var X=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),U=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[4;"+U+";"+X+"t");break;case i.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var B=this._renderService.dimensions.scaledCellWidth.toFixed(0),Y=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[6;"+Y+";"+B+"t")}},A.prototype.cancel=function(O,X){if(this.options.cancelEvents||X)return O.preventDefault(),O.stopPropagation(),!1},A.prototype._visualBell=function(){return!1},A.prototype._soundBell=function(){return this.options.bellStyle==="sound"},A}(Z.CoreTerminal);f.Terminal=H},function(D,f,_){"use strict";var p=this&&this.__decorate||function(d,i,n,o){var t,c=arguments.length,e=c<3?i:o===null?o=Object.getOwnPropertyDescriptor(i,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(d,i,n,o);else for(var r=d.length-1;r>=0;r--)(t=d[r])&&(e=(c<3?t(e):c>3?t(i,n,e):t(i,n))||e);return c>3&&e&&Object.defineProperty(i,n,e),e},b=this&&this.__param||function(d,i){return function(n,o){i(n,o,d)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CompositionHelper=void 0;var h=_(5),a=_(1),u=function(){function d(i,n,o,t,c,e){this._textarea=i,this._compositionView=n,this._bufferService=o,this._optionsService=t,this._charSizeService=c,this._coreService=e,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(i){var n=this;this._compositionView.textContent=i.data,this.updateCompositionElements(),setTimeout(function(){n._compositionPosition.end=n._textarea.value.length},0)},d.prototype.compositionend=function(){this._finalizeComposition(!0)},d.prototype.keydown=function(i){if(this._isComposing||this._isSendingComposition){if(i.keyCode===229||i.keyCode===16||i.keyCode===17||i.keyCode===18)return!1;this._finalizeComposition(!1)}return i.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},d.prototype._finalizeComposition=function(i){var n=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,i){var o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(n._isSendingComposition){n._isSendingComposition=!1;var c=void 0;c=n._isComposing?n._textarea.value.substring(o.start,o.end):n._textarea.value.substring(o.start),n._coreService.triggerDataEvent(c,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},d.prototype._handleAnyTextareaChanges=function(){var i=this,n=this._textarea.value;setTimeout(function(){if(!i._isComposing){var o=i._textarea.value.replace(n,"");o.length>0&&i._coreService.triggerDataEvent(o,!0)}},0)},d.prototype.updateCompositionElements=function(i){var n=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var o=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),t=this._bufferService.buffer.y*o,c=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=t+"px",this._compositionView.style.height=o+"px",this._compositionView.style.lineHeight=o+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var e=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=t+"px",this._textarea.style.width=e.width+"px",this._textarea.style.height=e.height+"px",this._textarea.style.lineHeight=e.height+"px"}i||setTimeout(function(){return n.updateCompositionElements(!0)},0)}},d=p([b(2,a.IBufferService),b(3,a.IOptionsService),b(4,h.ICharSizeService),b(5,a.ICoreService)],d)}();f.CompositionHelper=u},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(t,c){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(t,c)},function(t,c){function e(){this.constructor=t}p(t,c),t.prototype=c===null?Object.create(c):(e.prototype=c.prototype,new e)}),h=this&&this.__decorate||function(t,c,e,r){var s,l=arguments.length,v=l<3?c:r===null?r=Object.getOwnPropertyDescriptor(c,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,c,e,r);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(v=(l<3?s(v):l>3?s(c,e,v):s(c,e))||v);return l>3&&v&&Object.defineProperty(c,e,v),v},a=this&&this.__param||function(t,c){return function(e,r){c(e,r,t)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Viewport=void 0;var u=_(2),d=_(7),i=_(5),n=_(1),o=function(t){function c(e,r,s,l,v,y,g){var m=t.call(this)||this;return m._scrollLines=e,m._viewportElement=r,m._scrollArea=s,m._bufferService=l,m._optionsService=v,m._charSizeService=y,m._renderService=g,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 b(c,t),c.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},c.prototype._refresh=function(e){var r=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return r._innerRefresh()}))},c.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==r&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=r),this._refreshAnimationFrame=null},c.prototype.syncScrollArea=function(e){if(e===void 0&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===r&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},c.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var r=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(r,!0)}},c.prototype._bubbleScroll=function(e,r){var s=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(r<0&&this._viewportElement.scrollTop!==0||r>0&&s<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},c.prototype.onWheel=function(e){var r=this._getPixelsScrolled(e);return r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},c.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?r*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._currentRowHeight*this._bufferService.rows),r},c.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=this._currentRowHeight+0,this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r},c.prototype._applyScrollModifier=function(e,r){var s=this._optionsService.options.fastScrollModifier;return s==="alt"&&r.altKey||s==="ctrl"&&r.ctrlKey||s==="shift"&&r.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},c.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},c.prototype.onTouchMove=function(e){var r=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},c=h([a(3,n.IBufferService),a(4,n.IOptionsService),a(5,i.ICharSizeService),a(6,i.IRenderService)],c)}(u.Disposable);f.Viewport=o},function(D,f,_){"use strict";function p(u){return u.replace(/\r?\n/g,"\r")}function b(u,d){return d?"\x1B[200~"+u+"\x1B[201~":u}function h(u,d,i){u=b(u=p(u),i.decPrivateModes.bracketedPasteMode),i.triggerDataEvent(u,!0),d.value=""}function a(u,d,i){var n=i.getBoundingClientRect(),o=u.clientX-n.left-10,t=u.clientY-n.top-10;d.style.width="20px",d.style.height="20px",d.style.left=o+"px",d.style.top=t+"px",d.style.zIndex="1000",d.focus()}Object.defineProperty(f,"__esModule",{value:!0}),f.rightClickHandler=f.moveTextAreaUnderMouseCursor=f.paste=f.handlePasteEvent=f.copyHandler=f.bracketTextForPaste=f.prepareTextForTerminal=void 0,f.prepareTextForTerminal=p,f.bracketTextForPaste=b,f.copyHandler=function(u,d){u.clipboardData&&u.clipboardData.setData("text/plain",d.selectionText),u.preventDefault()},f.handlePasteEvent=function(u,d,i){u.stopPropagation(),u.clipboardData&&h(u.clipboardData.getData("text/plain"),d,i)},f.paste=h,f.moveTextAreaUnderMouseCursor=a,f.rightClickHandler=function(u,d,i,n,o){a(u,d,i),o&&!n.isClickInSelection(u)&&n.selectWordAtCursor(u),d.value=n.selectionText,d.select()}},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(t,c){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(t,c)},function(t,c){function e(){this.constructor=t}p(t,c),t.prototype=c===null?Object.create(c):(e.prototype=c.prototype,new e)});Object.defineProperty(f,"__esModule",{value:!0}),f.EscapeSequenceParser=f.VT500_TRANSITION_TABLE=f.TransitionTable=void 0;var h=_(2),a=_(15),u=_(21),d=_(22),i=_(24),n=function(){function t(c){this.table=new Uint8Array(c)}return t.prototype.setDefault=function(c,e){a.fill(this.table,c<<4|e)},t.prototype.add=function(c,e,r,s){this.table[e<<8|c]=r<<4|s},t.prototype.addMany=function(c,e,r,s){for(var l=0;l<c.length;l++)this.table[e<<8|c[l]]=r<<4|s},t}();f.TransitionTable=n,f.VT500_TRANSITION_TABLE=function(){var t=new n(4095),c=Array.apply(null,Array(256)).map(function(y,g){return g}),e=function(y,g){return c.slice(y,g)},r=e(32,127),s=e(0,24);s.push(25),s.push.apply(s,e(28,32));var l,v=e(0,14);for(l in t.setDefault(1,0),t.addMany(r,0,2,0),v)t.addMany([24,26,153,154],l,3,0),t.addMany(e(128,144),l,3,0),t.addMany(e(144,152),l,3,0),t.add(156,l,0,0),t.add(27,l,11,1),t.add(157,l,4,8),t.addMany([152,158,159],l,0,7),t.add(155,l,11,3),t.add(144,l,11,9);return t.addMany(s,0,3,0),t.addMany(s,1,3,1),t.add(127,1,0,1),t.addMany(s,8,0,8),t.addMany(s,3,3,3),t.add(127,3,0,3),t.addMany(s,4,3,4),t.add(127,4,0,4),t.addMany(s,6,3,6),t.addMany(s,5,3,5),t.add(127,5,0,5),t.addMany(s,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(r,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(e(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(r,7,0,7),t.addMany(s,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(e(64,127),3,7,0),t.addMany(e(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(e(48,60),4,8,4),t.addMany(e(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(e(32,64),6,0,6),t.add(127,6,0,6),t.addMany(e(64,127),6,0,0),t.addMany(e(32,48),3,9,5),t.addMany(e(32,48),5,9,5),t.addMany(e(48,64),5,0,6),t.addMany(e(64,127),5,7,0),t.addMany(e(32,48),4,9,5),t.addMany(e(32,48),1,9,2),t.addMany(e(32,48),2,9,2),t.addMany(e(48,127),2,10,0),t.addMany(e(48,80),1,10,0),t.addMany(e(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(e(96,127),1,10,0),t.add(80,1,11,9),t.addMany(s,9,0,9),t.add(127,9,0,9),t.addMany(e(28,32),9,0,9),t.addMany(e(32,48),9,9,12),t.addMany(e(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(s,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(s,10,0,10),t.add(127,10,0,10),t.addMany(e(28,32),10,0,10),t.addMany(e(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(e(32,48),10,9,12),t.addMany(s,12,0,12),t.add(127,12,0,12),t.addMany(e(28,32),12,0,12),t.addMany(e(32,48),12,9,12),t.addMany(e(48,64),12,0,11),t.addMany(e(64,127),12,12,13),t.addMany(e(64,127),10,12,13),t.addMany(e(64,127),9,12,13),t.addMany(s,13,13,13),t.addMany(r,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(160,0,2,0),t.add(160,8,5,8),t.add(160,6,0,6),t.add(160,11,0,11),t.add(160,13,13,13),t}();var o=function(t){function c(e){e===void 0&&(e=f.VT500_TRANSITION_TABLE);var r=t.call(this)||this;return r._transitions=e,r.initialState=0,r.currentState=r.initialState,r._params=new u.Params,r._params.addParam(0),r._collect=0,r.precedingCodepoint=0,r._printHandlerFb=function(s,l,v){},r._executeHandlerFb=function(s){},r._csiHandlerFb=function(s,l){},r._escHandlerFb=function(s){},r._errorHandlerFb=function(s){return s},r._printHandler=r._printHandlerFb,r._executeHandlers=Object.create(null),r._csiHandlers=Object.create(null),r._escHandlers=Object.create(null),r._oscParser=new d.OscParser,r._dcsParser=new i.DcsParser,r._errorHandler=r._errorHandlerFb,r.setEscHandler({final:"\\"},function(){}),r}return b(c,t),c.prototype._identifier=function(e,r){r===void 0&&(r=[64,126]);var s=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((s=e.prefix.charCodeAt(0))&&60>s||s>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var l=0;l<e.intermediates.length;++l){var v=e.intermediates.charCodeAt(l);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");s<<=8,s|=v}}if(e.final.length!==1)throw new Error("final must be a single byte");var y=e.final.charCodeAt(0);if(r[0]>y||y>r[1])throw new Error("final must be in range "+r[0]+" .. "+r[1]);return s<<=8,s|=y},c.prototype.identToString=function(e){for(var r=[];e;)r.push(String.fromCharCode(255&e)),e>>=8;return r.reverse().join("")},c.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},c.prototype.setPrintHandler=function(e){this._printHandler=e},c.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},c.prototype.addEscHandler=function(e,r){var s=this._identifier(e,[48,126]);this._escHandlers[s]===void 0&&(this._escHandlers[s]=[]);var l=this._escHandlers[s];return l.push(r),{dispose:function(){var v=l.indexOf(r);v!==-1&&l.splice(v,1)}}},c.prototype.setEscHandler=function(e,r){this._escHandlers[this._identifier(e,[48,126])]=[r]},c.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},c.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},c.prototype.setExecuteHandler=function(e,r){this._executeHandlers[e.charCodeAt(0)]=r},c.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},c.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},c.prototype.addCsiHandler=function(e,r){var s=this._identifier(e);this._csiHandlers[s]===void 0&&(this._csiHandlers[s]=[]);var l=this._csiHandlers[s];return l.push(r),{dispose:function(){var v=l.indexOf(r);v!==-1&&l.splice(v,1)}}},c.prototype.setCsiHandler=function(e,r){this._csiHandlers[this._identifier(e)]=[r]},c.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},c.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},c.prototype.addDcsHandler=function(e,r){return this._dcsParser.addHandler(this._identifier(e),r)},c.prototype.setDcsHandler=function(e,r){this._dcsParser.setHandler(this._identifier(e),r)},c.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},c.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},c.prototype.addOscHandler=function(e,r){return this._oscParser.addHandler(e,r)},c.prototype.setOscHandler=function(e,r){this._oscParser.setHandler(e,r)},c.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},c.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},c.prototype.setErrorHandler=function(e){this._errorHandler=e},c.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},c.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},c.prototype.parse=function(e,r){for(var s=0,l=0,v=this.currentState,y=this._oscParser,g=this._dcsParser,m=this._collect,S=this._params,k=this._transitions.table,w=0;w<r;++w){switch((l=k[v<<8|((s=e[w])<160?s:160)])>>4){case 2:for(var C=w+1;;++C){if(C>=r||(s=e[C])<32||s>126&&s<160){this._printHandler(e,w,C),w=C-1;break}if(++C>=r||(s=e[C])<32||s>126&&s<160){this._printHandler(e,w,C),w=C-1;break}if(++C>=r||(s=e[C])<32||s>126&&s<160){this._printHandler(e,w,C),w=C-1;break}if(++C>=r||(s=e[C])<32||s>126&&s<160){this._printHandler(e,w,C),w=C-1;break}}break;case 3:this._executeHandlers[s]?this._executeHandlers[s]():this._executeHandlerFb(s),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:w,code:s,currentState:v,collect:m,params:S,abort:!1}).abort)return;break;case 7:for(var E=this._csiHandlers[m<<8|s],T=E?E.length-1:-1;T>=0&&E[T](S)===!1;T--);T<0&&this._csiHandlerFb(m<<8|s,S),this.precedingCodepoint=0;break;case 8:do switch(s){case 59:S.addParam(0);break;case 58:S.addSubParam(-1);break;default:S.addDigit(s-48)}while(++w<r&&(s=e[w])>47&&s<60);w--;break;case 9:m<<=8,m|=s;break;case 10:for(var L=this._escHandlers[m<<8|s],N=L?L.length-1:-1;N>=0&&L[N]()===!1;N--);N<0&&this._escHandlerFb(m<<8|s),this.precedingCodepoint=0;break;case 11:S.reset(),S.addParam(0),m=0;break;case 12:g.hook(m<<8|s,S);break;case 13:for(var Z=w+1;;++Z)if(Z>=r||(s=e[Z])===24||s===26||s===27||s>127&&s<160){g.put(e,w,Z),w=Z-1;break}break;case 14:g.unhook(s!==24&&s!==26),s===27&&(l|=1),S.reset(),S.addParam(0),m=0,this.precedingCodepoint=0;break;case 4:y.start();break;case 5:for(var q=w+1;;q++)if(q>=r||(s=e[q])<32||s>127&&s<=159){y.put(e,w,q),w=q-1;break}break;case 6:y.end(s!==24&&s!==26),s===27&&(l|=1),S.reset(),S.addParam(0),m=0,this.precedingCodepoint=0}v=15&l}this._collect=m,this.currentState=v},c}(h.Disposable);f.EscapeSequenceParser=o},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(y,g){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,S){m.__proto__=S}||function(m,S){for(var k in S)S.hasOwnProperty(k)&&(m[k]=S[k])})(y,g)},function(y,g){function m(){this.constructor=y}p(y,g),y.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}),h=this&&this.__decorate||function(y,g,m,S){var k,w=arguments.length,C=w<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,m):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(y,g,m,S);else for(var E=y.length-1;E>=0;E--)(k=y[E])&&(C=(w<3?k(C):w>3?k(g,m,C):k(g,m))||C);return w>3&&C&&Object.defineProperty(g,m,C),C},a=this&&this.__param||function(y,g){return function(m,S){g(m,S,y)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Renderer=void 0;var u=_(41),d=_(47),i=_(48),n=_(49),o=_(29),t=_(2),c=_(5),e=_(1),r=_(25),s=_(0),l=1,v=function(y){function g(m,S,k,w,C,E,T,L,N){var Z=y.call(this)||this;Z._colors=m,Z._screenElement=S,Z._bufferService=C,Z._charSizeService=E,Z._optionsService=T,Z._id=l++,Z._onRequestRedraw=new s.EventEmitter;var q=Z._optionsService.options.allowTransparency;return Z._characterJoinerRegistry=new o.CharacterJoinerRegistry(Z._bufferService),Z._renderLayers=[new u.TextRenderLayer(Z._screenElement,0,Z._colors,Z._characterJoinerRegistry,q,Z._id,Z._bufferService,T),new d.SelectionRenderLayer(Z._screenElement,1,Z._colors,Z._id,Z._bufferService,T),new n.LinkRenderLayer(Z._screenElement,2,Z._colors,Z._id,k,w,Z._bufferService,T),new i.CursorRenderLayer(Z._screenElement,3,Z._colors,Z._id,Z._onRequestRedraw,Z._bufferService,T,L,N)],Z.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},Z._devicePixelRatio=window.devicePixelRatio,Z._updateDimensions(),Z.onOptionsChanged(),Z}return b(g,y),Object.defineProperty(g.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),g.prototype.dispose=function(){for(var m=0,S=this._renderLayers;m<S.length;m++)S[m].dispose();y.prototype.dispose.call(this),r.removeTerminalFromCache(this._id)},g.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},g.prototype.setColors=function(m){this._colors=m;for(var S=0,k=this._renderLayers;S<k.length;S++){var w=k[S];w.setColors(this._colors),w.reset()}},g.prototype.onResize=function(m,S){this._updateDimensions();for(var k=0,w=this._renderLayers;k<w.length;k++)w[k].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},g.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},g.prototype.onBlur=function(){this._runOperation(function(m){return m.onBlur()})},g.prototype.onFocus=function(){this._runOperation(function(m){return m.onFocus()})},g.prototype.onSelectionChanged=function(m,S,k){k===void 0&&(k=!1),this._runOperation(function(w){return w.onSelectionChanged(m,S,k)})},g.prototype.onCursorMove=function(){this._runOperation(function(m){return m.onCursorMove()})},g.prototype.onOptionsChanged=function(){this._runOperation(function(m){return m.onOptionsChanged()})},g.prototype.clear=function(){this._runOperation(function(m){return m.reset()})},g.prototype._runOperation=function(m){for(var S=0,k=this._renderLayers;S<k.length;S++)m(k[S])},g.prototype.renderRows=function(m,S){for(var k=0,w=this._renderLayers;k<w.length;k++)w[k].onGridChanged(m,S)},g.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)},g.prototype.registerCharacterJoiner=function(m){return this._characterJoinerRegistry.registerCharacterJoiner(m)},g.prototype.deregisterCharacterJoiner=function(m){return this._characterJoinerRegistry.deregisterCharacterJoiner(m)},g=h([a(4,e.IBufferService),a(5,c.ICharSizeService),a(6,e.IOptionsService),a(7,e.ICoreService),a(8,c.ICoreBrowserService)],g)}(t.Disposable);f.Renderer=v},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(t,c){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(t,c)},function(t,c){function e(){this.constructor=t}p(t,c),t.prototype=c===null?Object.create(c):(e.prototype=c.prototype,new e)});Object.defineProperty(f,"__esModule",{value:!0}),f.TextRenderLayer=void 0;var h=_(42),a=_(13),u=_(6),d=_(3),i=_(29),n=_(4),o=function(t){function c(e,r,s,l,v,y,g,m){var S=t.call(this,e,"text",r,v,s,y,g,m)||this;return S._characterWidth=0,S._characterFont="",S._characterOverlapCache={},S._workCell=new n.CellData,S._state=new h.GridCache,S._characterJoinerRegistry=l,S}return b(c,t),c.prototype.resize=function(e){t.prototype.resize.call(this,e);var r=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===r||(this._characterWidth=e.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},c.prototype.reset=function(){this._state.clear(),this._clearAll()},c.prototype._forEachCell=function(e,r,s,l){for(var v=e;v<=r;v++)for(var y=v+this._bufferService.buffer.ydisp,g=this._bufferService.buffer.lines.get(y),m=s?s.getJoinedCharacters(y):[],S=0;S<this._bufferService.cols;S++){g.loadCell(S,this._workCell);var k=this._workCell,w=!1,C=S;if(k.getWidth()!==0){if(m.length>0&&S===m[0][0]){w=!0;var E=m.shift();k=new i.JoinedCellData(this._workCell,g.translateToString(!0,E[0],E[1]),E[1]-E[0]),C=E[1]-1}!w&&this._isOverlapping(k)&&C<g.length-1&&g.getCodePoint(C+1)===d.NULL_CELL_CODE&&(k.content&=-12582913,k.content|=2<<22),l(k,S,v),S=C}}},c.prototype._drawBackground=function(e,r){var s=this,l=this._ctx,v=this._bufferService.cols,y=0,g=0,m=null;l.save(),this._forEachCell(e,r,null,function(S,k,w){var C=null;S.isInverse()?C=S.isFgDefault()?s._colors.foreground.css:S.isFgRGB()?"rgb("+u.AttributeData.toColorRGB(S.getFgColor()).join(",")+")":s._colors.ansi[S.getFgColor()].css:S.isBgRGB()?C="rgb("+u.AttributeData.toColorRGB(S.getBgColor()).join(",")+")":S.isBgPalette()&&(C=s._colors.ansi[S.getBgColor()].css),m===null&&(y=k,g=w),w!==g?(l.fillStyle=m||"",s._fillCells(y,g,v-y,1),y=k,g=w):m!==C&&(l.fillStyle=m||"",s._fillCells(y,g,k-y,1),y=k,g=w),m=C}),m!==null&&(l.fillStyle=m,this._fillCells(y,g,v-y,1)),l.restore()},c.prototype._drawForeground=function(e,r){var s=this;this._forEachCell(e,r,this._characterJoinerRegistry,function(l,v,y){if(!l.isInvisible()&&(s._drawChars(l,v,y),l.isUnderline())){if(s._ctx.save(),l.isInverse())if(l.isBgDefault())s._ctx.fillStyle=s._colors.background.css;else if(l.isBgRGB())s._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getBgColor()).join(",")+")";else{var g=l.getBgColor();s._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&g<8&&(g+=8),s._ctx.fillStyle=s._colors.ansi[g].css}else if(l.isFgDefault())s._ctx.fillStyle=s._colors.foreground.css;else if(l.isFgRGB())s._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(l.getFgColor()).join(",")+")";else{var m=l.getFgColor();s._optionsService.options.drawBoldTextInBrightColors&&l.isBold()&&m<8&&(m+=8),s._ctx.fillStyle=s._colors.ansi[m].css}s._fillBottomLineAtCells(v,y,l.getWidth()),s._ctx.restore()}})},c.prototype.onGridChanged=function(e,r){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,r-e+1),this._drawBackground(e,r),this._drawForeground(e,r))},c.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},c.prototype._isOverlapping=function(e){if(e.getWidth()!==1||e.getCode()<256)return!1;var r=e.getChars();if(this._characterOverlapCache.hasOwnProperty(r))return this._characterOverlapCache[r];this._ctx.save(),this._ctx.font=this._characterFont;var s=Math.floor(this._ctx.measureText(r).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[r]=s,s},c}(a.BaseRenderLayer);f.TextRenderLayer=o},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.GridCache=void 0;var p=function(){function b(){this.cache=[]}return b.prototype.resize=function(h,a){for(var u=0;u<h;u++){this.cache.length<=u&&this.cache.push([]);for(var d=this.cache[u].length;d<a;d++)this.cache[u].push(void 0);this.cache[u].length=a}this.cache.length=h},b.prototype.clear=function(){for(var h=0;h<this.cache.length;h++)for(var a=0;a<this.cache[h].length;a++)this.cache[h][a]=void 0},b}();f.GridCache=p},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(s,l){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var g in y)y.hasOwnProperty(g)&&(v[g]=y[g])})(s,l)},function(s,l){function v(){this.constructor=s}p(s,l),s.prototype=l===null?Object.create(l):(v.prototype=l.prototype,new v)});Object.defineProperty(f,"__esModule",{value:!0}),f.NoneCharAtlas=f.DynamicCharAtlas=f.getGlyphCacheKey=void 0;var h=_(9),a=_(44),u=_(27),d=_(46),i=_(11),n=_(28),o=_(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function c(s){return s.code<<21|s.bg<<12|s.fg<<3|(s.bold?0:4)+(s.dim?0:2)+(s.italic?0:1)}f.getGlyphCacheKey=c;var e=function(s){function l(v,y){var g=s.call(this)||this;g._config=y,g._drawToCacheCount=0,g._glyphsWaitingOnBitmap=[],g._bitmapCommitTimeout=null,g._bitmap=null,g._cacheCanvas=v.createElement("canvas"),g._cacheCanvas.width=1024,g._cacheCanvas.height=1024,g._cacheCtx=n.throwIfFalsy(g._cacheCanvas.getContext("2d",{alpha:!0}));var m=v.createElement("canvas");m.width=g._config.scaledCharWidth,m.height=g._config.scaledCharHeight,g._tmpCtx=n.throwIfFalsy(m.getContext("2d",{alpha:g._config.allowTransparency})),g._width=Math.floor(1024/g._config.scaledCharWidth),g._height=Math.floor(1024/g._config.scaledCharHeight);var S=g._width*g._height;return g._cacheMap=new d.LRUMap(S),g._cacheMap.prealloc(S),g}return b(l,s),l.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},l.prototype.beginFrame=function(){this._drawToCacheCount=0},l.prototype.draw=function(v,y,g,m){if(y.code===32)return!0;if(!this._canCache(y))return!1;var S=c(y),k=this._cacheMap.get(S);if(k!=null)return this._drawFromCache(v,k,g,m),!0;if(this._drawToCacheCount<100){var w=void 0;w=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var C=this._drawToCache(y,w);return this._cacheMap.set(S,C),this._drawFromCache(v,C,g,m),!0}return!1},l.prototype._canCache=function(v){return v.code<256},l.prototype._toCoordinateX=function(v){return v%this._width*this._config.scaledCharWidth},l.prototype._toCoordinateY=function(v){return Math.floor(v/this._width)*this._config.scaledCharHeight},l.prototype._drawFromCache=function(v,y,g,m){if(!y.isEmpty){var S=this._toCoordinateX(y.index),k=this._toCoordinateY(y.index);v.drawImage(y.inBitmap?this._bitmap:this._cacheCanvas,S,k,this._config.scaledCharWidth,this._config.scaledCharHeight,g,m,this._config.scaledCharWidth,this._config.scaledCharHeight)}},l.prototype._getColorFromAnsiIndex=function(v){return v<this._config.colors.ansi.length?this._config.colors.ansi[v]:u.DEFAULT_ANSI_COLORS[v]},l.prototype._getBackgroundColor=function(v){return this._config.allowTransparency?t:v.bg===h.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:v.bg<256?this._getColorFromAnsiIndex(v.bg):this._config.colors.background},l.prototype._getForegroundColor=function(v){return v.fg===h.INVERTED_DEFAULT_COLOR?o.color.opaque(this._config.colors.background):v.fg<256?this._getColorFromAnsiIndex(v.fg):this._config.colors.foreground},l.prototype._drawToCache=function(v,y){this._drawToCacheCount++,this._tmpCtx.save();var g=this._getBackgroundColor(v);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=g.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,S=v.italic?"italic":"";this._tmpCtx.font=S+" "+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=h.DIM_OPACITY),this._tmpCtx.fillText(v.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var k=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),w=!1;this._config.allowTransparency||(w=function(L,N){for(var Z=!0,q=N.rgba>>>24,H=N.rgba>>>16&255,z=N.rgba>>>8&255,A=0;A<L.data.length;A+=4)L.data[A]===q&&L.data[A+1]===H&&L.data[A+2]===z?L.data[A+3]=0:Z=!1;return Z}(k,g));var C=this._toCoordinateX(y),E=this._toCoordinateY(y);this._cacheCtx.putImageData(k,C,E);var T={index:y,isEmpty:w,inBitmap:!1};return this._addGlyphToBitmap(T),T},l.prototype._addGlyphToBitmap=function(v){var y=this;!("createImageBitmap"in window)||i.isFirefox||i.isSafari||(this._glyphsWaitingOnBitmap.push(v),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return y._generateBitmap()},100)))},l.prototype._generateBitmap=function(){var v=this,y=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(g){v._bitmap=g;for(var m=0;m<y.length;m++)y[m].inBitmap=!0}),this._bitmapCommitTimeout=null},l}(a.BaseCharAtlas);f.DynamicCharAtlas=e;var r=function(s){function l(v,y){return s.call(this)||this}return b(l,s),l.prototype.draw=function(v,y,g,m){return!1},l}(a.BaseCharAtlas);f.NoneCharAtlas=r},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.BaseCharAtlas=void 0;var p=function(){function b(){this._didWarmUp=!1}return b.prototype.dispose=function(){},b.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},b.prototype._doWarmUp=function(){},b.prototype.beginFrame=function(){},b}();f.BaseCharAtlas=p},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.ColorContrastCache=void 0;var p=function(){function b(){this._color={},this._rgba={}}return b.prototype.clear=function(){this._color={},this._rgba={}},b.prototype.setCss=function(h,a,u){this._rgba[h]||(this._rgba[h]={}),this._rgba[h][a]=u},b.prototype.getCss=function(h,a){return this._rgba[h]?this._rgba[h][a]:void 0},b.prototype.setColor=function(h,a,u){this._color[h]||(this._color[h]={}),this._color[h][a]=u},b.prototype.getColor=function(h,a){return this._color[h]?this._color[h][a]:void 0},b}();f.ColorContrastCache=p},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.LRUMap=void 0;var p=function(){function b(h){this.capacity=h,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return b.prototype._unlinkNode=function(h){var a=h.prev,u=h.next;h===this._head&&(this._head=u),h===this._tail&&(this._tail=a),a!==null&&(a.next=u),u!==null&&(u.prev=a)},b.prototype._appendNode=function(h){var a=this._tail;a!==null&&(a.next=h),h.prev=a,h.next=null,this._tail=h,this._head===null&&(this._head=h)},b.prototype.prealloc=function(h){for(var a=this._nodePool,u=0;u<h;u++)a.push({prev:null,next:null,key:null,value:null})},b.prototype.get=function(h){var a=this._map[h];return a!==void 0?(this._unlinkNode(a),this._appendNode(a),a.value):null},b.prototype.peekValue=function(h){var a=this._map[h];return a!==void 0?a.value:null},b.prototype.peek=function(){var h=this._head;return h===null?null:h.value},b.prototype.set=function(h,a){var u=this._map[h];if(u!==void 0)u=this._map[h],this._unlinkNode(u),u.value=a;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=h,u.value=a,this._map[h]=u;else{var d=this._nodePool;d.length>0?((u=d.pop()).key=h,u.value=a):u={prev:null,next:null,key:h,value:a},this._map[h]=u,this.size++}this._appendNode(u)},b}();f.LRUMap=p},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(a,u){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,i){d.__proto__=i}||function(d,i){for(var n in i)i.hasOwnProperty(n)&&(d[n]=i[n])})(a,u)},function(a,u){function d(){this.constructor=a}p(a,u),a.prototype=u===null?Object.create(u):(d.prototype=u.prototype,new d)});Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionRenderLayer=void 0;var h=function(a){function u(d,i,n,o,t,c){var e=a.call(this,d,"selection",i,!0,n,o,t,c)||this;return e._clearState(),e}return b(u,a),u.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},u.prototype.resize=function(d){a.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,i,n){if(this._didStateChange(d,i,n,this._bufferService.buffer.ydisp))if(this._clearAll(),d&&i){var o=d[1]-this._bufferService.buffer.ydisp,t=i[1]-this._bufferService.buffer.ydisp,c=Math.max(o,0),e=Math.min(t,this._bufferService.rows-1);if(!(c>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,n){var r=d[0],s=i[0]-r,l=e-c+1;this._fillCells(r,c,s,l)}else{r=o===c?d[0]:0;var v=c===e?i[0]:this._bufferService.cols;this._fillCells(r,c,v-r,1);var y=Math.max(e-c-1,0);if(this._fillCells(0,c+1,this._bufferService.cols,y),c!==e){var g=t===e?i[0]:this._bufferService.cols;this._fillCells(0,e,g,1)}}this._state.start=[d[0],d[1]],this._state.end=[i[0],i[1]],this._state.columnSelectMode=n,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},u.prototype._didStateChange=function(d,i,n,o){return!this._areCoordinatesEqual(d,this._state.start)||!this._areCoordinatesEqual(i,this._state.end)||n!==this._state.columnSelectMode||o!==this._state.ydisp},u.prototype._areCoordinatesEqual=function(d,i){return!(!d||!i)&&d[0]===i[0]&&d[1]===i[1]},u}(_(13).BaseRenderLayer);f.SelectionRenderLayer=h},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(i,n){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,t){o.__proto__=t}||function(o,t){for(var c in t)t.hasOwnProperty(c)&&(o[c]=t[c])})(i,n)},function(i,n){function o(){this.constructor=i}p(i,n),i.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)});Object.defineProperty(f,"__esModule",{value:!0}),f.CursorRenderLayer=void 0;var h=_(13),a=_(4),u=function(i){function n(o,t,c,e,r,s,l,v,y){var g=i.call(this,o,"cursor",t,!0,c,e,s,l)||this;return g._onRequestRedraw=r,g._coreService=v,g._coreBrowserService=y,g._cell=new a.CellData,g._state={x:0,y:0,isFocused:!1,style:"",width:0},g._cursorRenderers={bar:g._renderBarCursor.bind(g),block:g._renderBlockCursor.bind(g),underline:g._renderUnderlineCursor.bind(g)},g}return b(n,i),n.prototype.resize=function(o){i.prototype.resize.call(this,o),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},n.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},n.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onOptionsChanged=function(){var o,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new d(this._coreBrowserService.isFocused,function(){t._render(!0)})):((o=this._cursorBlinkStateManager)===null||o===void 0||o.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype.onGridChanged=function(o,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype._render=function(o){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,c=t-this._bufferService.buffer.ydisp;if(c<0||c>=this._bufferService.rows)this._clearCursor();else{var e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(e,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var r=this._optionsService.options.cursorStyle;return r&&r!=="block"?this._cursorRenderers[r](e,c,this._cell):this._renderBlurCursor(e,c,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=c,this._state.isFocused=!1,this._state.style=r,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===c&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](e,c,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=c,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},n.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})},n.prototype._renderBarCursor=function(o,t,c){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(o,t,this._optionsService.options.cursorWidth),this._ctx.restore()},n.prototype._renderBlockCursor=function(o,t,c){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(o,t,c.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(c,o,t),this._ctx.restore()},n.prototype._renderUnderlineCursor=function(o,t,c){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(o,t),this._ctx.restore()},n.prototype._renderBlurCursor=function(o,t,c){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(o,t,c.getWidth(),1),this._ctx.restore()},n}(h.BaseRenderLayer);f.CursorRenderLayer=u;var d=function(){function i(n,o){this._renderCallback=o,this.isCursorVisible=!0,n&&this._restartInterval()}return Object.defineProperty(i.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),i.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},i.prototype.restartBlinkAnimation=function(){var n=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){n._renderCallback(),n._animationFrame=void 0})))},i.prototype._restartInterval=function(n){var o=this;n===void 0&&(n=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(o._animationTimeRestarted){var t=600-(Date.now()-o._animationTimeRestarted);if(o._animationTimeRestarted=void 0,t>0)return void o._restartInterval(t)}o.isCursorVisible=!1,o._animationFrame=window.requestAnimationFrame(function(){o._renderCallback(),o._animationFrame=void 0}),o._blinkInterval=window.setInterval(function(){if(o._animationTimeRestarted){var c=600-(Date.now()-o._animationTimeRestarted);return o._animationTimeRestarted=void 0,void o._restartInterval(c)}o.isCursorVisible=!o.isCursorVisible,o._animationFrame=window.requestAnimationFrame(function(){o._renderCallback(),o._animationFrame=void 0})},600)},n)},i.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},i.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},i}()},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(i,n){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,t){o.__proto__=t}||function(o,t){for(var c in t)t.hasOwnProperty(c)&&(o[c]=t[c])})(i,n)},function(i,n){function o(){this.constructor=i}p(i,n),i.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)});Object.defineProperty(f,"__esModule",{value:!0}),f.LinkRenderLayer=void 0;var h=_(13),a=_(9),u=_(26),d=function(i){function n(o,t,c,e,r,s,l,v){var y=i.call(this,o,"link",t,!0,c,e,l,v)||this;return r.onShowLinkUnderline(function(g){return y._onShowLinkUnderline(g)}),r.onHideLinkUnderline(function(g){return y._onHideLinkUnderline(g)}),s.onShowLinkUnderline(function(g){return y._onShowLinkUnderline(g)}),s.onHideLinkUnderline(function(g){return y._onHideLinkUnderline(g)}),y}return b(n,i),n.prototype.resize=function(o){i.prototype.resize.call(this,o),this._state=void 0},n.prototype.reset=function(){this._clearCurrentLink()},n.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var o=this._state.y2-this._state.y1-1;o>0&&this._clearCells(0,this._state.y1+1,this._state.cols,o),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},n.prototype._onShowLinkUnderline=function(o){if(o.fg===a.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:o.fg&&u.is256Color(o.fg)?this._ctx.fillStyle=this._colors.ansi[o.fg].css:this._ctx.fillStyle=this._colors.foreground.css,o.y1===o.y2)this._fillBottomLineAtCells(o.x1,o.y1,o.x2-o.x1);else{this._fillBottomLineAtCells(o.x1,o.y1,o.cols-o.x1);for(var t=o.y1+1;t<o.y2;t++)this._fillBottomLineAtCells(0,t,o.cols);this._fillBottomLineAtCells(0,o.y2,o.x2)}this._state=o},n.prototype._onHideLinkUnderline=function(o){this._clearCurrentLink()},n}(h.BaseRenderLayer);f.LinkRenderLayer=d},function(D,f,_){"use strict";var p=this&&this.__decorate||function(i,n,o,t){var c,e=arguments.length,r=e<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,o):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,n,o,t);else for(var s=i.length-1;s>=0;s--)(c=i[s])&&(r=(e<3?c(r):e>3?c(n,o,r):c(n,o))||r);return e>3&&r&&Object.defineProperty(n,o,r),r},b=this&&this.__param||function(i,n){return function(o,t){n(o,t,i)}};Object.defineProperty(f,"__esModule",{value:!0}),f.MouseZone=f.Linkifier=void 0;var h=_(0),a=_(1),u=function(){function i(n,o,t){this._bufferService=n,this._logService=o,this._unicodeService=t,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new h.EventEmitter,this._onHideLinkUnderline=new h.EventEmitter,this._onLinkTooltip=new h.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(i.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),i.prototype.attachToDom=function(n,o){this._element=n,this._mouseZoneManager=o},i.prototype.linkifyRows=function(n,o){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=n,this._rowsToLinkify.end=o):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,n),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,o)),this._mouseZoneManager.clearAll(n,o),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},i._timeBeforeLatency))},i.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var n=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var o=n.ydisp+this._rowsToLinkify.start;if(!(o>=n.lines.length)){for(var t=n.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,c=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,o,t,c,c);e.hasNext();)for(var r=e.next(),s=0;s<this._linkMatchers.length;s++)this._doLinkifyRow(r.range.first,r.content,this._linkMatchers[s]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},i.prototype.registerLinkMatcher=function(n,o,t){if(t===void 0&&(t={}),!o)throw new Error("handler must be defined");var c={id:this._nextLinkMatcherId++,regex:n,handler:o,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(c),c.id},i.prototype._addLinkMatcherToList=function(n){if(this._linkMatchers.length!==0){for(var o=this._linkMatchers.length-1;o>=0;o--)if(n.priority<=this._linkMatchers[o].priority)return void this._linkMatchers.splice(o+1,0,n);this._linkMatchers.splice(0,0,n)}else this._linkMatchers.push(n)},i.prototype.deregisterLinkMatcher=function(n){for(var o=0;o<this._linkMatchers.length;o++)if(this._linkMatchers[o].id===n)return this._linkMatchers.splice(o,1),!0;return!1},i.prototype._doLinkifyRow=function(n,o,t){for(var c,e=this,r=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),s=-1,l=function(){var y=c[typeof t.matchIndex!="number"?0:t.matchIndex];if(!y)return v._logService.debug("match found without corresponding matchIndex",c,t),"break";if(s=o.indexOf(y,s+1),r.lastIndex=s+y.length,s<0)return"break";var g=v._bufferService.buffer.stringIndexToBufferIndex(n,s);if(g[0]<0)return"break";var m=v._bufferService.buffer.lines.get(g[0]);if(!m)return"break";var S=m.getFg(g[1]),k=S?S>>9&511:void 0;t.validationCallback?t.validationCallback(y,function(w){e._rowsTimeoutId||w&&e._addLink(g[1],g[0]-e._bufferService.buffer.ydisp,y,t,k)}):v._addLink(g[1],g[0]-v._bufferService.buffer.ydisp,y,t,k)},v=this;(c=r.exec(o))!==null&&l()!=="break";);},i.prototype._addLink=function(n,o,t,c,e){var r=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(t),l=n%this._bufferService.cols,v=o+Math.floor(n/this._bufferService.cols),y=(l+s)%this._bufferService.cols,g=v+Math.floor((l+s)/this._bufferService.cols);y===0&&(y=this._bufferService.cols,g--),this._mouseZoneManager.add(new d(l+1,v+1,y+1,g+1,function(m){if(c.handler)return c.handler(m,t);var S=window.open();S?(S.opener=null,S.location.href=t):console.warn("Opening link blocked as opener could not be cleared")},function(){r._onShowLinkUnderline.fire(r._createLinkHoverEvent(l,v,y,g,e)),r._element.classList.add("xterm-cursor-pointer")},function(m){r._onLinkTooltip.fire(r._createLinkHoverEvent(l,v,y,g,e)),c.hoverTooltipCallback&&c.hoverTooltipCallback(m,t,{start:{x:l,y:v},end:{x:y,y:g}})},function(){r._onHideLinkUnderline.fire(r._createLinkHoverEvent(l,v,y,g,e)),r._element.classList.remove("xterm-cursor-pointer"),c.hoverLeaveCallback&&c.hoverLeaveCallback()},function(m){return!c.willLinkActivate||c.willLinkActivate(m,t)}))}},i.prototype._createLinkHoverEvent=function(n,o,t,c,e){return{x1:n,y1:o,x2:t,y2:c,cols:this._bufferService.cols,fg:e}},i._timeBeforeLatency=200,i=p([b(0,a.IBufferService),b(1,a.ILogService),b(2,a.IUnicodeService)],i)}();f.Linkifier=u;var d=function(i,n,o,t,c,e,r,s,l){this.x1=i,this.y1=n,this.x2=o,this.y2=t,this.clickCallback=c,this.hoverCallback=e,this.tooltipCallback=r,this.leaveCallback=s,this.willLinkActivate=l};f.MouseZone=d},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(y,g){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,S){m.__proto__=S}||function(m,S){for(var k in S)S.hasOwnProperty(k)&&(m[k]=S[k])})(y,g)},function(y,g){function m(){this.constructor=y}p(y,g),y.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}),h=this&&this.__decorate||function(y,g,m,S){var k,w=arguments.length,C=w<3?g:S===null?S=Object.getOwnPropertyDescriptor(g,m):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(y,g,m,S);else for(var E=y.length-1;E>=0;E--)(k=y[E])&&(C=(w<3?k(C):w>3?k(g,m,C):k(g,m))||C);return w>3&&C&&Object.defineProperty(g,m,C),C},a=this&&this.__param||function(y,g){return function(m,S){g(m,S,y)}};Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionService=void 0;var u=_(11),d=_(52),i=_(4),n=_(0),o=_(5),t=_(1),c=_(30),e=_(53),r=_(2),s="\xA0",l=new RegExp(s,"g"),v=function(y){function g(m,S,k,w,C,E,T){var L=y.call(this)||this;return L._element=m,L._screenElement=S,L._bufferService=k,L._coreService=w,L._mouseService=C,L._optionsService=E,L._renderService=T,L._dragScrollAmount=0,L._enabled=!0,L._workCell=new i.CellData,L._mouseDownTimeStamp=0,L._onLinuxMouseSelection=L.register(new n.EventEmitter),L._onRedrawRequest=L.register(new n.EventEmitter),L._onSelectionChange=L.register(new n.EventEmitter),L._onRequestScrollLines=L.register(new n.EventEmitter),L._mouseMoveListener=function(N){return L._onMouseMove(N)},L._mouseUpListener=function(N){return L._onMouseUp(N)},L._coreService.onUserInput(function(){L.hasSelection&&L.clearSelection()}),L._trimListener=L._bufferService.buffer.lines.onTrim(function(N){return L._onTrim(N)}),L.register(L._bufferService.buffers.onBufferActivate(function(N){return L._onBufferActivate(N)})),L.enable(),L._model=new d.SelectionModel(L._bufferService),L._activeSelectionMode=0,L}return b(g,y),Object.defineProperty(g.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),g.prototype.dispose=function(){this._removeMouseDownListeners()},g.prototype.reset=function(){this.clearSelection()},g.prototype.disable=function(){this.clearSelection(),this._enabled=!1},g.prototype.enable=function(){this._enabled=!0},Object.defineProperty(g.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"hasSelection",{get:function(){var m=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;return!(!m||!S)&&(m[0]!==S[0]||m[1]!==S[1])},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"selectionText",{get:function(){var m=this._model.finalSelectionStart,S=this._model.finalSelectionEnd;if(!m||!S)return"";var k=this._bufferService.buffer,w=[];if(this._activeSelectionMode===3){if(m[0]===S[0])return"";for(var C=m[1];C<=S[1];C++){var E=k.translateBufferLineToString(C,!0,m[0],S[0]);w.push(E)}}else{var T=m[1]===S[1]?S[0]:void 0;for(w.push(k.translateBufferLineToString(m[1],!0,m[0],T)),C=m[1]+1;C<=S[1]-1;C++){var L=k.lines.get(C);E=k.translateBufferLineToString(C,!0),L&&L.isWrapped?w[w.length-1]+=E:w.push(E)}m[1]!==S[1]&&(L=k.lines.get(S[1]),E=k.translateBufferLineToString(S[1],!0,0,S[0]),L&&L.isWrapped?w[w.length-1]+=E:w.push(E))}return w.map(function(N){return N.replace(l," ")}).join(u.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),g.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},g.prototype.refresh=function(m){var S=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return S._refresh()})),u.isLinux&&m&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},g.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},g.prototype.isClickInSelection=function(m){var S=this._getMouseBufferCoords(m),k=this._model.finalSelectionStart,w=this._model.finalSelectionEnd;return!!(k&&w&&S)&&this._areCoordsInSelection(S,k,w)},g.prototype._areCoordsInSelection=function(m,S,k){return m[1]>S[1]&&m[1]<k[1]||S[1]===k[1]&&m[1]===S[1]&&m[0]>=S[0]&&m[0]<k[0]||S[1]<k[1]&&m[1]===k[1]&&m[0]<k[0]||S[1]<k[1]&&m[1]===S[1]&&m[0]>=S[0]},g.prototype.selectWordAtCursor=function(m){var S=this._getMouseBufferCoords(m);S&&(this._selectWordAt(S,!1),this._model.selectionEnd=void 0,this.refresh(!0))},g.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},g.prototype.selectLines=function(m,S){this._model.clearSelection(),m=Math.max(m,0),S=Math.min(S,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,S],this.refresh(),this._onSelectionChange.fire()},g.prototype._onTrim=function(m){this._model.onTrim(m)&&this.refresh()},g.prototype._getMouseBufferCoords=function(m){var S=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(S)return S[0]--,S[1]--,S[1]+=this._bufferService.buffer.ydisp,S},g.prototype._getMouseEventScrollAmount=function(m){var S=c.getCoordsRelativeToElement(m,this._screenElement)[1],k=this._renderService.dimensions.canvasHeight;return S>=0&&S<=k?0:(S>k&&(S-=k),S=Math.min(Math.max(S,-50),50),(S/=50)/Math.abs(S)+Math.round(14*S))},g.prototype.shouldForceSelection=function(m){return u.isMac?m.altKey&&this._optionsService.options.macOptionClickForcesSelection:m.shiftKey},g.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)}},g.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)},g.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},g.prototype._onIncrementalClick=function(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))},g.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 S=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);S&&S.length!==this._model.selectionStart[0]&&S.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},g.prototype._onDoubleClick=function(m){var S=this._getMouseBufferCoords(m);S&&(this._activeSelectionMode=1,this._selectWordAt(S,!0))},g.prototype._onTripleClick=function(m){var S=this._getMouseBufferCoords(m);S&&(this._activeSelectionMode=2,this._selectLineAt(S[1]))},g.prototype.shouldColumnSelect=function(m){return m.altKey&&!(u.isMac&&this._optionsService.options.macOptionClickForcesSelection)},g.prototype._onMouseMove=function(m){if(m.stopImmediatePropagation(),this._model.selectionStart){var S=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 k=this._bufferService.buffer;if(this._model.selectionEnd[1]<k.lines.length){var w=k.lines.get(this._model.selectionEnd[1]);w&&w.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}S&&S[0]===this._model.selectionEnd[0]&&S[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},g.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()}},g.prototype._onMouseUp=function(m){var S=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&S<500&&m.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var k=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(k&&k[0]!==void 0&&k[1]!==void 0){var w=e.moveToCellSequence(k[0]-1,k[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(w,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},g.prototype._onBufferActivate=function(m){var S=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim(function(k){return S._onTrim(k)})},g.prototype._convertViewportColToCharacterIndex=function(m,S){for(var k=S[0],w=0;S[0]>=w;w++){var C=m.loadCell(w,this._workCell).getChars().length;this._workCell.getWidth()===0?k--:C>1&&S[0]!==w&&(k+=C-1)}return k},g.prototype.setSelection=function(m,S,k){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,S],this._model.selectionStartLength=k,this.refresh()},g.prototype._getWordAt=function(m,S,k,w){if(k===void 0&&(k=!0),w===void 0&&(w=!0),!(m[0]>=this._bufferService.cols)){var C=this._bufferService.buffer,E=C.lines.get(m[1]);if(E){var T=C.translateBufferLineToString(m[1],!1),L=this._convertViewportColToCharacterIndex(E,m),N=L,Z=m[0]-L,q=0,H=0,z=0,A=0;if(T.charAt(L)===" "){for(;L>0&&T.charAt(L-1)===" ";)L--;for(;N<T.length&&T.charAt(N+1)===" ";)N++}else{var O=m[0],X=m[0];E.getWidth(O)===0&&(q++,O--),E.getWidth(X)===2&&(H++,X++);var U=E.getString(X).length;for(U>1&&(A+=U-1,N+=U-1);O>0&&L>0&&!this._isCharWordSeparator(E.loadCell(O-1,this._workCell));){E.loadCell(O-1,this._workCell);var B=this._workCell.getChars().length;this._workCell.getWidth()===0?(q++,O--):B>1&&(z+=B-1,L-=B-1),L--,O--}for(;X<E.length&&N+1<T.length&&!this._isCharWordSeparator(E.loadCell(X+1,this._workCell));){E.loadCell(X+1,this._workCell);var Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,X++):Y>1&&(A+=Y-1,N+=Y-1),N++,X++}}N++;var ue=L+Z-q+z,me=Math.min(this._bufferService.cols,N-L+q+H-z-A);if(S||T.slice(L,N).trim()!==""){if(k&&ue===0&&E.getCodePoint(0)!==32){var De=C.lines.get(m[1]-1);if(De&&E.isWrapped&&De.getCodePoint(this._bufferService.cols-1)!==32){var Te=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(Te){var oe=this._bufferService.cols-Te.start;ue-=oe,me+=oe}}}if(w&&ue+me===this._bufferService.cols&&E.getCodePoint(this._bufferService.cols-1)!==32){var be=C.lines.get(m[1]+1);if(be&&be.isWrapped&&be.getCodePoint(0)!==32){var Fe=this._getWordAt([0,m[1]+1],!1,!1,!0);Fe&&(me+=Fe.length)}}return{start:ue,length:me}}}}},g.prototype._selectWordAt=function(m,S){var k=this._getWordAt(m,S);if(k){for(;k.start<0;)k.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[k.start,m[1]],this._model.selectionStartLength=k.length}},g.prototype._selectToWordAt=function(m){var S=this._getWordAt(m,!0);if(S){for(var k=m[1];S.start<0;)S.start+=this._bufferService.cols,k--;if(!this._model.areSelectionValuesReversed())for(;S.start+S.length>this._bufferService.cols;)S.length-=this._bufferService.cols,k++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?S.start:S.start+S.length,k]}},g.prototype._isCharWordSeparator=function(m){return m.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(m.getChars())>=0},g.prototype._selectLineAt=function(m){var S=this._bufferService.buffer.getWrappedRangeForLine(m);this._model.selectionStart=[0,S.first],this._model.selectionEnd=[this._bufferService.cols,S.last],this._model.selectionStartLength=0},g=h([a(2,t.IBufferService),a(3,t.ICoreService),a(4,o.IMouseService),a(5,t.IOptionsService),a(6,o.IRenderService)],g)}(r.Disposable);f.SelectionService=v},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionModel=void 0;var p=function(){function b(h){this._bufferService=h,this.isSelectAllActive=!1,this.selectionStartLength=0}return b.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(b.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(b.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),b.prototype.areSelectionValuesReversed=function(){var h=this.selectionStart,a=this.selectionEnd;return!(!h||!a)&&(h[1]>a[1]||h[1]===a[1]&&h[0]>a[0])},b.prototype.onTrim=function(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},b}();f.SelectionModel=p},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.moveToCellSequence=void 0;var p=_(12);function b(n,o,t,c){var e=n-h(t,n),r=o-h(t,o);return i(Math.abs(e-r)-function(s,l,v){for(var y=0,g=s-h(v,s),m=l-h(v,l),S=0;S<Math.abs(g-m);S++){var k=a(s,l)==="A"?-1:1,w=v.buffer.lines.get(g+k*S);w&&w.isWrapped&&y++}return y}(n,o,t),d(a(n,o),c))}function h(n,o){for(var t=0,c=n.buffer.lines.get(o),e=c&&c.isWrapped;e&&o>=0&&o<n.rows;)t++,e=(c=n.buffer.lines.get(--o))&&c.isWrapped;return t}function a(n,o){return n>o?"A":"B"}function u(n,o,t,c,e,r){for(var s=n,l=o,v="";s!==t||l!==c;)s+=e?1:-1,e&&s>r.cols-1?(v+=r.buffer.translateBufferLineToString(l,!1,n,s),s=0,n=0,l++):!e&&s<0&&(v+=r.buffer.translateBufferLineToString(l,!1,0,n+1),n=s=r.cols-1,l--);return v+r.buffer.translateBufferLineToString(l,!1,n,s)}function d(n,o){var t=o?"O":"[";return p.C0.ESC+t+n}function i(n,o){n=Math.floor(n);for(var t="",c=0;c<n;c++)t+=o;return t}f.moveToCellSequence=function(n,o,t,c){var e,r=t.buffer.x,s=t.buffer.y;if(!t.buffer.hasScrollback)return function(v,y,g,m,S,k){return b(y,m,S,k).length===0?"":i(u(v,y,v,y-h(S,y),!1,S).length,d("D",k))}(r,s,0,o,t,c)+b(s,o,t,c)+function(v,y,g,m,S,k){var w;w=b(y,m,S,k).length>0?m-h(S,m):y;var C=m,E=function(T,L,N,Z,q,H){var z;return z=b(N,Z,q,H).length>0?Z-h(q,Z):L,T<N&&z<=Z||T>=N&&z<Z?"C":"D"}(v,y,g,m,S,k);return i(u(v,w,g,C,E==="C",S).length,d(E,k))}(r,s,n,o,t,c);if(s===o)return e=r>n?"D":"C",i(Math.abs(r-n),d(e,c));e=s>o?"D":"C";var l=Math.abs(s-o);return i(function(v,y){return y.cols-v}(s>o?n:r,t)+(l-1)*t.cols+1+((s>o?r:n)-1),d(e,c))}},function(D,f,_){"use strict";var p=this&&this.__decorate||function(u,d,i,n){var o,t=arguments.length,c=t<3?d:n===null?n=Object.getOwnPropertyDescriptor(d,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(u,d,i,n);else for(var e=u.length-1;e>=0;e--)(o=u[e])&&(c=(t<3?o(c):t>3?o(d,i,c):o(d,i))||c);return t>3&&c&&Object.defineProperty(d,i,c),c},b=this&&this.__param||function(u,d){return function(i,n){d(i,n,u)}};Object.defineProperty(f,"__esModule",{value:!0}),f.SoundService=void 0;var h=_(1),a=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 i=d.createBufferSource();d.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(n){i.buffer=n,i.connect(d.destination),i.start(0)})}},u.prototype._base64ToArrayBuffer=function(d){for(var i=window.atob(d),n=i.length,o=new Uint8Array(n),t=0;t<n;t++)o[t]=i.charCodeAt(t);return o.buffer},u.prototype._removeMimeType=function(d){return d.split(",")[1]},u=p([b(0,h.IOptionsService)],u)}();f.SoundService=a},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(t,c){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(t,c)},function(t,c){function e(){this.constructor=t}p(t,c),t.prototype=c===null?Object.create(c):(e.prototype=c.prototype,new e)}),h=this&&this.__decorate||function(t,c,e,r){var s,l=arguments.length,v=l<3?c:r===null?r=Object.getOwnPropertyDescriptor(c,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,c,e,r);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(v=(l<3?s(v):l>3?s(c,e,v):s(c,e))||v);return l>3&&v&&Object.defineProperty(c,e,v),v},a=this&&this.__param||function(t,c){return function(e,r){c(e,r,t)}};Object.defineProperty(f,"__esModule",{value:!0}),f.MouseZoneManager=void 0;var u=_(2),d=_(7),i=_(5),n=_(1),o=function(t){function c(e,r,s,l,v,y){var g=t.call(this)||this;return g._element=e,g._screenElement=r,g._bufferService=s,g._mouseService=l,g._selectionService=v,g._optionsService=y,g._zones=[],g._areZonesActive=!1,g._lastHoverCoords=[void 0,void 0],g._initialSelectionLength=0,g.register(d.addDisposableDomListener(g._element,"mousedown",function(m){return g._onMouseDown(m)})),g._mouseMoveListener=function(m){return g._onMouseMove(m)},g._mouseLeaveListener=function(m){return g._onMouseLeave(m)},g._clickListener=function(m){return g._onClick(m)},g}return b(c,t),c.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},c.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},c.prototype.clearAll=function(e,r){if(this._zones.length!==0){e&&r||(e=0,r=this._bufferService.rows-1);for(var s=0;s<this._zones.length;s++){var l=this._zones[s];(l.y1>e&&l.y1<=r+1||l.y2>e&&l.y2<=r+1||l.y1<e&&l.y2>r+1)&&(this._currentZone&&this._currentZone===l&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(s--,1))}this._zones.length===0&&this._deactivate()}},c.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))},c.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))},c.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},c.prototype._onHover=function(e){var r=this,s=this._findZoneEventAt(e);s!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),s&&(this._currentZone=s,s.hoverCallback&&s.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return r._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},c.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var r=this._findZoneEventAt(e);r&&r.tooltipCallback&&r.tooltipCallback(e)},c.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var r=this._findZoneEventAt(e);r!=null&&r.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},c.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},c.prototype._onClick=function(e){var r=this._findZoneEventAt(e),s=this._getSelectionLength();r&&s===this._initialSelectionLength&&(r.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},c.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},c.prototype._findZoneEventAt=function(e){var r=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(r)for(var s=r[0],l=r[1],v=0;v<this._zones.length;v++){var y=this._zones[v];if(y.y1===y.y2){if(l===y.y1&&s>=y.x1&&s<y.x2)return y}else if(l===y.y1&&s>=y.x1||l===y.y2&&s<y.x2||l>y.y1&&l<y.y2)return y}},c=h([a(2,n.IBufferService),a(3,i.IMouseService),a(4,i.ISelectionService),a(5,n.IOptionsService)],c)}(u.Disposable);f.MouseZoneManager=o},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(c,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var l in s)s.hasOwnProperty(l)&&(r[l]=s[l])})(c,e)},function(c,e){function r(){this.constructor=c}p(c,e),c.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(f,"__esModule",{value:!0}),f.AccessibilityManager=void 0;var h=_(18),a=_(11),u=_(31),d=_(7),i=_(2),n=_(32),o=_(17),t=function(c){function e(r,s){var l=c.call(this)||this;l._terminal=r,l._renderService=s,l._liveRegionLineCount=0,l._charsToConsume=[],l._charsToAnnounce="",l._accessibilityTreeRoot=document.createElement("div"),l._accessibilityTreeRoot.classList.add("xterm-accessibility"),l._rowContainer=document.createElement("div"),l._rowContainer.classList.add("xterm-accessibility-tree"),l._rowContainer.setAttribute("role","list"),l._rowElements=[];for(var v=0;v<l._terminal.rows;v++)l._rowElements[v]=l._createAccessibilityTreeNode(),l._rowContainer.appendChild(l._rowElements[v]);if(l._topBoundaryFocusListener=function(y){return l._onBoundaryFocus(y,0)},l._bottomBoundaryFocusListener=function(y){return l._onBoundaryFocus(y,1)},l._rowElements[0].addEventListener("focus",l._topBoundaryFocusListener),l._rowElements[l._rowElements.length-1].addEventListener("focus",l._bottomBoundaryFocusListener),l._refreshRowsDimensions(),l._accessibilityTreeRoot.appendChild(l._rowContainer),l._renderRowsDebouncer=new u.RenderDebouncer(l._renderRows.bind(l)),l._refreshRows(),l._liveRegion=document.createElement("div"),l._liveRegion.classList.add("live-region"),l._liveRegion.setAttribute("aria-live","assertive"),l._accessibilityTreeRoot.appendChild(l._liveRegion),!l._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return l._terminal.element.insertAdjacentElement("afterbegin",l._accessibilityTreeRoot),l.register(l._renderRowsDebouncer),l.register(l._terminal.onResize(function(y){return l._onResize(y.rows)})),l.register(l._terminal.onRender(function(y){return l._refreshRows(y.start,y.end)})),l.register(l._terminal.onScroll(function(){return l._refreshRows()})),l.register(l._terminal.onA11yChar(function(y){return l._onChar(y)})),l.register(l._terminal.onLineFeed(function(){return l._onChar(`
`)})),l.register(l._terminal.onA11yTab(function(y){return l._onTab(y)})),l.register(l._terminal.onKey(function(y){return l._onKey(y.key)})),l.register(l._terminal.onBlur(function(){return l._clearLiveRegion()})),l.register(l._renderService.onDimensionsChange(function(){return l._refreshRowsDimensions()})),l._screenDprMonitor=new n.ScreenDprMonitor,l.register(l._screenDprMonitor),l._screenDprMonitor.setListener(function(){return l._refreshRowsDimensions()}),l.register(d.addDisposableDomListener(window,"resize",function(){return l._refreshRowsDimensions()})),l}return b(e,c),e.prototype.dispose=function(){c.prototype.dispose.call(this),o.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(r,s){var l=r.target,v=this._rowElements[s===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")!==(s===0?"1":""+this._terminal.buffer.lines.length)&&r.relatedTarget===v){var y,g;if(s===0?(y=l,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(y=this._rowElements.shift(),g=l,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),s===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(s===0?-1:1),this._rowElements[s===0?1:this._rowElements.length-2].focus(),r.preventDefault(),r.stopImmediatePropagation()}},e.prototype._onResize=function(r){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var s=this._rowContainer.children.length;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);for(;this._rowElements.length>r;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var r=document.createElement("div");return r.setAttribute("role","listitem"),r.tabIndex=-1,this._refreshRowDimensions(r),r},e.prototype._onTab=function(r){for(var s=0;s<r;s++)this._onChar(" ")},e.prototype._onChar=function(r){var s=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==r&&(this._charsToAnnounce+=r):this._charsToAnnounce+=r,r===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),a.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){s._accessibilityTreeRoot.appendChild(s._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,a.isMac&&o.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(r){this._clearLiveRegion(),this._charsToConsume.push(r)},e.prototype._refreshRows=function(r,s){this._renderRowsDebouncer.refresh(r,s,this._terminal.rows)},e.prototype._renderRows=function(r,s){for(var l=this._terminal.buffer,v=l.lines.length.toString(),y=r;y<=s;y++){var g=l.translateBufferLineToString(l.ydisp+y,!0),m=(l.ydisp+y+1).toString(),S=this._rowElements[y];S&&(g.length===0?S.innerHTML="&nbsp;":S.textContent=g,S.setAttribute("aria-posinset",m),S.setAttribute("aria-setsize",v))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var r=0;r<this._terminal.rows;r++)this._refreshRowDimensions(this._rowElements[r])}},e.prototype._refreshRowDimensions=function(r){r.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(i.Disposable);f.AccessibilityManager=t},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(l,v){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,g){y.__proto__=g}||function(y,g){for(var m in g)g.hasOwnProperty(m)&&(y[m]=g[m])})(l,v)},function(l,v){function y(){this.constructor=l}p(l,v),l.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}),h=this&&this.__decorate||function(l,v,y,g){var m,S=arguments.length,k=S<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,y):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,v,y,g);else for(var w=l.length-1;w>=0;w--)(m=l[w])&&(k=(S<3?m(k):S>3?m(v,y,k):m(v,y))||k);return S>3&&k&&Object.defineProperty(v,y,k),k},a=this&&this.__param||function(l,v){return function(y,g){v(y,g,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRenderer=void 0;var u=_(58),d=_(9),i=_(2),n=_(5),o=_(1),t=_(0),c=_(10),e=_(17),r=1,s=function(l){function v(y,g,m,S,k,w,C,E,T){var L=l.call(this)||this;return L._colors=y,L._element=g,L._screenElement=m,L._viewportElement=S,L._linkifier=k,L._linkifier2=w,L._charSizeService=C,L._optionsService=E,L._bufferService=T,L._terminalClass=r++,L._rowElements=[],L._rowContainer=document.createElement("div"),L._rowContainer.classList.add("xterm-rows"),L._rowContainer.style.lineHeight="normal",L._rowContainer.setAttribute("aria-hidden","true"),L._refreshRowElements(L._bufferService.cols,L._bufferService.rows),L._selectionContainer=document.createElement("div"),L._selectionContainer.classList.add("xterm-selection"),L._selectionContainer.setAttribute("aria-hidden","true"),L.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},L._updateDimensions(),L._injectCss(),L._rowFactory=new u.DomRendererRowFactory(document,L._optionsService,L._colors),L._element.classList.add("xterm-dom-renderer-owner-"+L._terminalClass),L._screenElement.appendChild(L._rowContainer),L._screenElement.appendChild(L._selectionContainer),L._linkifier.onShowLinkUnderline(function(N){return L._onLinkHover(N)}),L._linkifier.onHideLinkUnderline(function(N){return L._onLinkLeave(N)}),L._linkifier2.onShowLinkUnderline(function(N){return L._onLinkHover(N)}),L._linkifier2.onHideLinkUnderline(function(N){return L._onLinkLeave(N)}),L}return b(v,l),Object.defineProperty(v.prototype,"onRequestRedraw",{get:function(){return new t.EventEmitter().event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),e.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),l.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 y=0,g=this._rowElements;y<g.length;y++){var m=g[y];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 S=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=S,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(y){this._colors=y,this._injectCss()},v.prototype._injectCss=function(){var y=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var g=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";g+=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;}",g+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",g+="@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+"; }}",g+=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;}",g+=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,S){g+=y._terminalSelector+" .xterm-fg-"+S+" { color: "+m.css+"; }"+y._terminalSelector+" .xterm-bg-"+S+" { background-color: "+m.css+"; }"}),g+=this._terminalSelector+" .xterm-fg-"+d.INVERTED_DEFAULT_COLOR+" { color: "+c.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+d.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=g},v.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},v.prototype._refreshRowElements=function(y,g){for(var m=this._rowElements.length;m<=g;m++){var S=document.createElement("div");this._rowContainer.appendChild(S),this._rowElements.push(S)}for(;this._rowElements.length>g;)this._rowContainer.removeChild(this._rowElements.pop())},v.prototype.onResize=function(y,g){this._refreshRowElements(y,g),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(y,g,m){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(y&&g){var S=y[1]-this._bufferService.buffer.ydisp,k=g[1]-this._bufferService.buffer.ydisp,w=Math.max(S,0),C=Math.min(k,this._bufferService.rows-1);if(!(w>=this._bufferService.rows||C<0)){var E=document.createDocumentFragment();if(m)E.appendChild(this._createSelectionElement(w,y[0],g[0],C-w+1));else{var T=S===w?y[0]:0,L=w===C?g[0]:this._bufferService.cols;E.appendChild(this._createSelectionElement(w,T,L));var N=C-w-1;if(E.appendChild(this._createSelectionElement(w+1,0,this._bufferService.cols,N)),w!==C){var Z=k===C?g[0]:this._bufferService.cols;E.appendChild(this._createSelectionElement(C,0,Z))}}this._selectionContainer.appendChild(E)}}},v.prototype._createSelectionElement=function(y,g,m,S){S===void 0&&(S=1);var k=document.createElement("div");return k.style.height=S*this.dimensions.actualCellHeight+"px",k.style.top=y*this.dimensions.actualCellHeight+"px",k.style.left=g*this.dimensions.actualCellWidth+"px",k.style.width=this.dimensions.actualCellWidth*(m-g)+"px",k},v.prototype.onCursorMove=function(){},v.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},v.prototype.clear=function(){for(var y=0,g=this._rowElements;y<g.length;y++)g[y].innerHTML=""},v.prototype.renderRows=function(y,g){for(var m=this._bufferService.buffer.ybase+this._bufferService.buffer.y,S=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),k=this._optionsService.options.cursorBlink,w=y;w<=g;w++){var C=this._rowElements[w];C.innerHTML="";var E=w+this._bufferService.buffer.ydisp,T=this._bufferService.buffer.lines.get(E),L=this._optionsService.options.cursorStyle;C.appendChild(this._rowFactory.createRow(T,E===m,L,S,k,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(y){return-1},v.prototype.deregisterCharacterJoiner=function(y){return!1},v.prototype._onLinkHover=function(y){this._setCellUnderline(y.x1,y.x2,y.y1,y.y2,y.cols,!0)},v.prototype._onLinkLeave=function(y){this._setCellUnderline(y.x1,y.x2,y.y1,y.y2,y.cols,!1)},v.prototype._setCellUnderline=function(y,g,m,S,k,w){for(;y!==g||m!==S;){var C=this._rowElements[m];if(!C)return;var E=C.children[y];E&&(E.style.textDecoration=w?"underline":"none"),++y>=k&&(y=0,m++)}},v=h([a(6,n.ICharSizeService),a(7,o.IOptionsService),a(8,o.IBufferService)],v)}(i.Disposable);f.DomRenderer=s},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.DomRendererRowFactory=f.CURSOR_STYLE_UNDERLINE_CLASS=f.CURSOR_STYLE_BAR_CLASS=f.CURSOR_STYLE_BLOCK_CLASS=f.CURSOR_BLINK_CLASS=f.CURSOR_CLASS=f.UNDERLINE_CLASS=f.ITALIC_CLASS=f.DIM_CLASS=f.BOLD_CLASS=void 0;var p=_(9),b=_(3),h=_(4),a=_(10);f.BOLD_CLASS="xterm-bold",f.DIM_CLASS="xterm-dim",f.ITALIC_CLASS="xterm-italic",f.UNDERLINE_CLASS="xterm-underline",f.CURSOR_CLASS="xterm-cursor",f.CURSOR_BLINK_CLASS="xterm-cursor-blink",f.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",f.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",f.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var u=function(){function i(n,o,t){this._document=n,this._optionsService=o,this._colors=t,this._workCell=new h.CellData}return i.prototype.setColors=function(n){this._colors=n},i.prototype.createRow=function(n,o,t,c,e,r,s){for(var l=this._document.createDocumentFragment(),v=0,y=Math.min(n.length,s)-1;y>=0;y--)if(n.loadCell(y,this._workCell).getCode()!==b.NULL_CELL_CODE||o&&y===c){v=y+1;break}for(y=0;y<v;y++){n.loadCell(y,this._workCell);var g=this._workCell.getWidth();if(g!==0){var m=this._document.createElement("span");if(g>1&&(m.style.width=r*g+"px"),o&&y===c)switch(m.classList.add(f.CURSOR_CLASS),e&&m.classList.add(f.CURSOR_BLINK_CLASS),t){case"bar":m.classList.add(f.CURSOR_STYLE_BAR_CLASS);break;case"underline":m.classList.add(f.CURSOR_STYLE_UNDERLINE_CLASS);break;default:m.classList.add(f.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&m.classList.add(f.BOLD_CLASS),this._workCell.isItalic()&&m.classList.add(f.ITALIC_CLASS),this._workCell.isDim()&&m.classList.add(f.DIM_CLASS),this._workCell.isUnderline()&&m.classList.add(f.UNDERLINE_CLASS),this._workCell.isInvisible()?m.textContent=b.WHITESPACE_CELL_CHAR:m.textContent=this._workCell.getChars()||b.WHITESPACE_CELL_CHAR;var S=this._workCell.getFgColor(),k=this._workCell.getFgColorMode(),w=this._workCell.getBgColor(),C=this._workCell.getBgColorMode(),E=!!this._workCell.isInverse();if(E){var T=S;S=w,w=T;var L=k;k=C,C=L}switch(k){case 16777216:case 33554432:this._workCell.isBold()&&S<8&&this._optionsService.options.drawBoldTextInBrightColors&&(S+=8),this._applyMinimumContrast(m,this._colors.background,this._colors.ansi[S])||m.classList.add("xterm-fg-"+S);break;case 50331648:var N=a.rgba.toColor(S>>16&255,S>>8&255,255&S);this._applyMinimumContrast(m,this._colors.background,N)||this._addStyle(m,"color:#"+d(S.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(m,this._colors.background,this._colors.foreground)||E&&m.classList.add("xterm-fg-"+p.INVERTED_DEFAULT_COLOR)}switch(C){case 16777216:case 33554432:m.classList.add("xterm-bg-"+w);break;case 50331648:this._addStyle(m,"background-color:#"+d(w.toString(16),"0",6));break;case 0:default:E&&m.classList.add("xterm-bg-"+p.INVERTED_DEFAULT_COLOR)}l.appendChild(m)}}return l},i.prototype._applyMinimumContrast=function(n,o,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var c=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return c===void 0&&(c=a.color.ensureContrastRatio(o,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,c!=null?c:null)),!!c&&(this._addStyle(n,"color:"+c.css),!0)},i.prototype._addStyle=function(n,o){n.setAttribute("style",""+(n.getAttribute("style")||"")+o+";")},i}();function d(i,n,o){for(;i.length<o;)i=n+i;return i}f.DomRendererRowFactory=u},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.evaluateKeyboardEvent=void 0;var p=_(12),b={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:["'",'"']};f.evaluateKeyboardEvent=function(h,a,u,d){var i={type:0,cancel:!1,key:void 0},n=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?i.key=a?p.C0.ESC+"OA":p.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?i.key=a?p.C0.ESC+"OD":p.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?i.key=a?p.C0.ESC+"OC":p.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(i.key=a?p.C0.ESC+"OB":p.C0.ESC+"[B");break;case 8:if(h.shiftKey){i.key=p.C0.BS;break}if(h.altKey){i.key=p.C0.ESC+p.C0.DEL;break}i.key=p.C0.DEL;break;case 9:if(h.shiftKey){i.key=p.C0.ESC+"[Z";break}i.key=p.C0.HT,i.cancel=!0;break;case 13:i.key=h.altKey?p.C0.ESC+p.C0.CR:p.C0.CR,i.cancel=!0;break;case 27:i.key=p.C0.ESC,h.altKey&&(i.key=p.C0.ESC+p.C0.ESC),i.cancel=!0;break;case 37:if(h.metaKey)break;n?(i.key=p.C0.ESC+"[1;"+(n+1)+"D",i.key===p.C0.ESC+"[1;3D"&&(i.key=p.C0.ESC+(u?"b":"[1;5D"))):i.key=a?p.C0.ESC+"OD":p.C0.ESC+"[D";break;case 39:if(h.metaKey)break;n?(i.key=p.C0.ESC+"[1;"+(n+1)+"C",i.key===p.C0.ESC+"[1;3C"&&(i.key=p.C0.ESC+(u?"f":"[1;5C"))):i.key=a?p.C0.ESC+"OC":p.C0.ESC+"[C";break;case 38:if(h.metaKey)break;n?(i.key=p.C0.ESC+"[1;"+(n+1)+"A",u||i.key!==p.C0.ESC+"[1;3A"||(i.key=p.C0.ESC+"[1;5A")):i.key=a?p.C0.ESC+"OA":p.C0.ESC+"[A";break;case 40:if(h.metaKey)break;n?(i.key=p.C0.ESC+"[1;"+(n+1)+"B",u||i.key!==p.C0.ESC+"[1;3B"||(i.key=p.C0.ESC+"[1;5B")):i.key=a?p.C0.ESC+"OB":p.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(i.key=p.C0.ESC+"[2~");break;case 46:i.key=n?p.C0.ESC+"[3;"+(n+1)+"~":p.C0.ESC+"[3~";break;case 36:i.key=n?p.C0.ESC+"[1;"+(n+1)+"H":a?p.C0.ESC+"OH":p.C0.ESC+"[H";break;case 35:i.key=n?p.C0.ESC+"[1;"+(n+1)+"F":a?p.C0.ESC+"OF":p.C0.ESC+"[F";break;case 33:h.shiftKey?i.type=2:i.key=p.C0.ESC+"[5~";break;case 34:h.shiftKey?i.type=3:i.key=p.C0.ESC+"[6~";break;case 112:i.key=n?p.C0.ESC+"[1;"+(n+1)+"P":p.C0.ESC+"OP";break;case 113:i.key=n?p.C0.ESC+"[1;"+(n+1)+"Q":p.C0.ESC+"OQ";break;case 114:i.key=n?p.C0.ESC+"[1;"+(n+1)+"R":p.C0.ESC+"OR";break;case 115:i.key=n?p.C0.ESC+"[1;"+(n+1)+"S":p.C0.ESC+"OS";break;case 116:i.key=n?p.C0.ESC+"[15;"+(n+1)+"~":p.C0.ESC+"[15~";break;case 117:i.key=n?p.C0.ESC+"[17;"+(n+1)+"~":p.C0.ESC+"[17~";break;case 118:i.key=n?p.C0.ESC+"[18;"+(n+1)+"~":p.C0.ESC+"[18~";break;case 119:i.key=n?p.C0.ESC+"[19;"+(n+1)+"~":p.C0.ESC+"[19~";break;case 120:i.key=n?p.C0.ESC+"[20;"+(n+1)+"~":p.C0.ESC+"[20~";break;case 121:i.key=n?p.C0.ESC+"[21;"+(n+1)+"~":p.C0.ESC+"[21~";break;case 122:i.key=n?p.C0.ESC+"[23;"+(n+1)+"~":p.C0.ESC+"[23~";break;case 123:i.key=n?p.C0.ESC+"[24;"+(n+1)+"~":p.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(u&&!d||!h.altKey||h.metaKey)u&&!h.altKey&&!h.ctrlKey&&h.metaKey?h.keyCode===65&&(i.type=1):h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?i.key=h.key:h.key&&h.ctrlKey&&h.key==="_"&&(i.key=p.C0.US);else{var o=b[h.keyCode],t=o&&o[h.shiftKey?1:0];if(t)i.key=p.C0.ESC+t;else if(h.keyCode>=65&&h.keyCode<=90){var c=h.ctrlKey?h.keyCode-64:h.keyCode+32;i.key=p.C0.ESC+String.fromCharCode(c)}}else h.keyCode>=65&&h.keyCode<=90?i.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?i.key=p.C0.NUL:h.keyCode>=51&&h.keyCode<=55?i.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?i.key=p.C0.DEL:h.keyCode===219?i.key=p.C0.ESC:h.keyCode===220?i.key=p.C0.FS:h.keyCode===221&&(i.key=p.C0.GS)}return i}},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(r,s){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,v){l.__proto__=v}||function(l,v){for(var y in v)v.hasOwnProperty(y)&&(l[y]=v[y])})(r,s)},function(r,s){function l(){this.constructor=r}p(r,s),r.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}),h=this&&this.__decorate||function(r,s,l,v){var y,g=arguments.length,m=g<3?s:v===null?v=Object.getOwnPropertyDescriptor(s,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,s,l,v);else for(var S=r.length-1;S>=0;S--)(y=r[S])&&(m=(g<3?y(m):g>3?y(s,l,m):y(s,l))||m);return g>3&&m&&Object.defineProperty(s,l,m),m},a=this&&this.__param||function(r,s){return function(l,v){s(l,v,r)}};Object.defineProperty(f,"__esModule",{value:!0}),f.RenderService=void 0;var u=_(31),d=_(0),i=_(2),n=_(32),o=_(7),t=_(1),c=_(5),e=function(r){function s(l,v,y,g,m,S){var k=r.call(this)||this;if(k._renderer=l,k._rowCount=v,k._isPaused=!1,k._needsFullRefresh=!1,k._isNextRenderRedrawOnly=!0,k._needsSelectionRefresh=!1,k._canvasWidth=0,k._canvasHeight=0,k._selectionState={start:void 0,end:void 0,columnSelectMode:!1},k._onDimensionsChange=new d.EventEmitter,k._onRender=new d.EventEmitter,k._onRefreshRequest=new d.EventEmitter,k.register({dispose:function(){return k._renderer.dispose()}}),k._renderDebouncer=new u.RenderDebouncer(function(C,E){return k._renderRows(C,E)}),k.register(k._renderDebouncer),k._screenDprMonitor=new n.ScreenDprMonitor,k._screenDprMonitor.setListener(function(){return k.onDevicePixelRatioChange()}),k.register(k._screenDprMonitor),k.register(S.onResize(function(C){return k._fullRefresh()})),k.register(g.onOptionChange(function(){return k._renderer.onOptionsChanged()})),k.register(m.onCharSizeChange(function(){return k.onCharSizeChanged()})),k._renderer.onRequestRedraw(function(C){return k.refreshRows(C.start,C.end,!0)}),k.register(o.addDisposableDomListener(window,"resize",function(){return k.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var w=new IntersectionObserver(function(C){return k._onIntersectionChange(C[C.length-1])},{threshold:0});w.observe(y),k.register({dispose:function(){return w.disconnect()}})}return k}return b(s,r),Object.defineProperty(s.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),s.prototype._onIntersectionChange=function(l){this._isPaused=l.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},s.prototype.refreshRows=function(l,v,y){y===void 0&&(y=!1),this._isPaused?this._needsFullRefresh=!0:(y||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,v,this._rowCount))},s.prototype._renderRows=function(l,v){this._renderer.renderRows(l,v),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:l,end:v}),this._isNextRenderRedrawOnly=!0},s.prototype.resize=function(l,v){this._rowCount=v,this._fireOnCanvasResize()},s.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},s.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},s.prototype.dispose=function(){r.prototype.dispose.call(this)},s.prototype.setRenderer=function(l){var v=this;this._renderer.dispose(),this._renderer=l,this._renderer.onRequestRedraw(function(y){return v.refreshRows(y.start,y.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},s.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},s.prototype.setColors=function(l){this._renderer.setColors(l),this._fullRefresh()},s.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},s.prototype.onResize=function(l,v){this._renderer.onResize(l,v),this._fullRefresh()},s.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},s.prototype.onBlur=function(){this._renderer.onBlur()},s.prototype.onFocus=function(){this._renderer.onFocus()},s.prototype.onSelectionChanged=function(l,v,y){this._selectionState.start=l,this._selectionState.end=v,this._selectionState.columnSelectMode=y,this._renderer.onSelectionChanged(l,v,y)},s.prototype.onCursorMove=function(){this._renderer.onCursorMove()},s.prototype.clear=function(){this._renderer.clear()},s.prototype.registerCharacterJoiner=function(l){return this._renderer.registerCharacterJoiner(l)},s.prototype.deregisterCharacterJoiner=function(l){return this._renderer.deregisterCharacterJoiner(l)},s=h([a(3,t.IOptionsService),a(4,c.ICharSizeService),a(5,t.IBufferService)],s)}(i.Disposable);f.RenderService=e},function(D,f,_){"use strict";var p=this&&this.__decorate||function(i,n,o,t){var c,e=arguments.length,r=e<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,o):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(i,n,o,t);else for(var s=i.length-1;s>=0;s--)(c=i[s])&&(r=(e<3?c(r):e>3?c(n,o,r):c(n,o))||r);return e>3&&r&&Object.defineProperty(n,o,r),r},b=this&&this.__param||function(i,n){return function(o,t){n(o,t,i)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CharSizeService=void 0;var h=_(1),a=_(0),u=function(){function i(n,o,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new a.EventEmitter,this._measureStrategy=new d(n,o,this._optionsService)}return Object.defineProperty(i.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),i.prototype.measure=function(){var n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())},i=p([b(2,h.IOptionsService)],i)}();f.CharSizeService=u;var d=function(){function i(n,o,t){this._document=n,this._parentElement=o,this._optionsService=t,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return i.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var n=this._measureElement.getBoundingClientRect();return n.width!==0&&n.height!==0&&(this._result.width=n.width,this._result.height=Math.ceil(n.height)),this._result},i}()},function(D,f,_){"use strict";var p=this&&this.__decorate||function(d,i,n,o){var t,c=arguments.length,e=c<3?i:o===null?o=Object.getOwnPropertyDescriptor(i,n):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(d,i,n,o);else for(var r=d.length-1;r>=0;r--)(t=d[r])&&(e=(c<3?t(e):c>3?t(i,n,e):t(i,n))||e);return c>3&&e&&Object.defineProperty(i,n,e),e},b=this&&this.__param||function(d,i){return function(n,o){i(n,o,d)}};Object.defineProperty(f,"__esModule",{value:!0}),f.MouseService=void 0;var h=_(5),a=_(30),u=function(){function d(i,n){this._renderService=i,this._charSizeService=n}return d.prototype.getCoords=function(i,n,o,t,c){return a.getCoords(i,n,o,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,c)},d.prototype.getRawByteCoords=function(i,n,o,t){var c=this.getCoords(i,n,o,t);return a.getRawByteCoords(c)},d=p([b(0,h.IRenderService),b(1,h.ICharSizeService)],d)}();f.MouseService=u},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(t,c){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(t,c)},function(t,c){function e(){this.constructor=t}p(t,c),t.prototype=c===null?Object.create(c):(e.prototype=c.prototype,new e)}),h=this&&this.__decorate||function(t,c,e,r){var s,l=arguments.length,v=l<3?c:r===null?r=Object.getOwnPropertyDescriptor(c,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,c,e,r);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(v=(l<3?s(v):l>3?s(c,e,v):s(c,e))||v);return l>3&&v&&Object.defineProperty(c,e,v),v},a=this&&this.__param||function(t,c){return function(e,r){c(e,r,t)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Linkifier2=void 0;var u=_(1),d=_(0),i=_(2),n=_(7),o=function(t){function c(e){var r=t.call(this)||this;return r._bufferService=e,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new d.EventEmitter),r._onHideLinkUnderline=r.register(new d.EventEmitter),r.register(i.getDisposeArrayDisposable(r._linkCacheDisposables)),r}return b(c,t),Object.defineProperty(c.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),c.prototype.registerLinkProvider=function(e){var r=this;return this._linkProviders.push(e),{dispose:function(){var s=r._linkProviders.indexOf(e);s!==-1&&r._linkProviders.splice(s,1)}}},c.prototype.attachToDom=function(e,r,s){var l=this;this._element=e,this._mouseService=r,this._renderService=s,this.register(n.addDisposableDomListener(this._element,"mouseleave",function(){l._isMouseOut=!0,l._clearCurrentLink()})),this.register(n.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(n.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},c.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(r){this._isMouseOut=!1;for(var s=e.composedPath(),l=0;l<s.length;l++){var v=s[l];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._onHover(r),this._lastBufferCell=r)}}},c.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},c.prototype._askForLink=function(e,r){var s=this;this._activeProviderReplies&&r||(this._activeProviderReplies=new Map,this._activeLine=e.y);var l=!1;this._linkProviders.forEach(function(v,y){var g;r?!((g=s._activeProviderReplies)===null||g===void 0)&&g.get(y)&&(l=s._checkLinkProviderResult(y,e,l)):v.provideLinks(e.y,function(m){var S,k;if(!s._isMouseOut){var w=m==null?void 0:m.map(function(C){return{link:C}});(S=s._activeProviderReplies)===null||S===void 0||S.set(y,w),l=s._checkLinkProviderResult(y,e,l),((k=s._activeProviderReplies)===null||k===void 0?void 0:k.size)===s._linkProviders.length&&s._removeIntersectingLinks(e.y,s._activeProviderReplies)}})})},c.prototype._removeIntersectingLinks=function(e,r){for(var s=new Set,l=0;l<r.size;l++){var v=r.get(l);if(v)for(var y=0;y<v.length;y++)for(var g=v[y],m=g.link.range.start.y<e?0:g.link.range.start.x,S=g.link.range.end.y>e?this._bufferService.cols:g.link.range.end.x,k=m;k<=S;k++){if(s.has(k)){v.splice(y--,1);break}s.add(k)}}},c.prototype._checkLinkProviderResult=function(e,r,s){var l,v=this;if(!this._activeProviderReplies)return s;for(var y=this._activeProviderReplies.get(e),g=!1,m=0;m<e;m++)this._activeProviderReplies.has(m)&&!this._activeProviderReplies.get(m)||(g=!0);if(!g&&y){var S=y.find(function(w){return v._linkAtPosition(w.link,r)});S&&(s=!0,this._handleNewLink(S))}if(this._activeProviderReplies.size===this._linkProviders.length&&!s)for(m=0;m<this._activeProviderReplies.size;m++){var k=(l=this._activeProviderReplies.get(m))===null||l===void 0?void 0:l.find(function(w){return v._linkAtPosition(w.link,r)});if(k){s=!0,this._handleNewLink(k);break}}return s},c.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},c.prototype._clearCurrentLink=function(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,i.disposeArray(this._linkCacheDisposables))},c.prototype._handleNewLink=function(e){var r=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var l,v;return(v=(l=r._currentLink)===null||l===void 0?void 0:l.state)===null||v===void 0?void 0:v.decorations.pointerCursor},set:function(l){var v,y;!((v=r._currentLink)===null||v===void 0)&&v.state&&r._currentLink.state.decorations.pointerCursor!==l&&(r._currentLink.state.decorations.pointerCursor=l,r._currentLink.state.isHovered&&((y=r._element)===null||y===void 0||y.classList.toggle("xterm-cursor-pointer",l)))}},underline:{get:function(){var l,v;return(v=(l=r._currentLink)===null||l===void 0?void 0:l.state)===null||v===void 0?void 0:v.decorations.underline},set:function(l){var v,y,g;!((v=r._currentLink)===null||v===void 0)&&v.state&&((g=(y=r._currentLink)===null||y===void 0?void 0:y.state)===null||g===void 0?void 0:g.decorations.underline)!==l&&(r._currentLink.state.decorations.underline=l,r._currentLink.state.isHovered&&r._fireUnderlineEvent(e.link,l))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(l){var v=l.start===0?0:l.start+1+r._bufferService.buffer.ydisp;r._clearCurrentLink(v,l.end+1+r._bufferService.buffer.ydisp)})))}},c.prototype._linkHover=function(e,r,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(s,r.text)},c.prototype._fireUnderlineEvent=function(e,r){var s=e.range,l=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-l-1,s.end.x,s.end.y-l-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)},c.prototype._linkLeave=function(e,r,s){var l;!((l=this._currentLink)===null||l===void 0)&&l.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(s,r.text)},c.prototype._linkAtPosition=function(e,r){var s=e.range.start.y===e.range.end.y,l=e.range.start.y<r.y,v=e.range.end.y>r.y;return(s&&e.range.start.x<=r.x&&e.range.end.x>=r.x||l&&e.range.end.x>=r.x||v&&e.range.start.x<=r.x||l&&v)&&e.range.start.y<=r.y&&e.range.end.y>=r.y},c.prototype._positionFromMouseEvent=function(e,r,s){var l=s.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(l)return{x:l[0],y:l[1]+this._bufferService.buffer.ydisp}},c.prototype._createLinkUnderlineEvent=function(e,r,s,l,v){return{x1:e,y1:r,x2:s,y2:l,cols:this._bufferService.cols,fg:v}},c=h([a(0,u.IBufferService)],c)}(i.Disposable);f.Linkifier2=o},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.CoreBrowserService=void 0;var p=function(){function b(h){this._textarea=h}return Object.defineProperty(b.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),b}();f.CoreBrowserService=p},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(m,S){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,w){k.__proto__=w}||function(k,w){for(var C in w)w.hasOwnProperty(C)&&(k[C]=w[C])})(m,S)},function(m,S){function k(){this.constructor=m}p(m,S),m.prototype=S===null?Object.create(S):(k.prototype=S.prototype,new k)});Object.defineProperty(f,"__esModule",{value:!0}),f.CoreTerminal=void 0;var h=_(2),a=_(1),u=_(66),d=_(67),i=_(68),n=_(74),o=_(75),t=_(0),c=_(76),e=_(77),r=_(78),s=_(80),l=_(81),v=_(19),y=_(82),g=function(m){function S(k){var w=m.call(this)||this;return w._onBinary=new t.EventEmitter,w._onData=new t.EventEmitter,w._onLineFeed=new t.EventEmitter,w._onResize=new t.EventEmitter,w._onScroll=new t.EventEmitter,w._instantiationService=new u.InstantiationService,w.optionsService=new n.OptionsService(k),w._instantiationService.setService(a.IOptionsService,w.optionsService),w._bufferService=w.register(w._instantiationService.createInstance(i.BufferService)),w._instantiationService.setService(a.IBufferService,w._bufferService),w._logService=w._instantiationService.createInstance(d.LogService),w._instantiationService.setService(a.ILogService,w._logService),w._coreService=w.register(w._instantiationService.createInstance(o.CoreService,function(){return w.scrollToBottom()})),w._instantiationService.setService(a.ICoreService,w._coreService),w._coreMouseService=w._instantiationService.createInstance(c.CoreMouseService),w._instantiationService.setService(a.ICoreMouseService,w._coreMouseService),w._dirtyRowService=w._instantiationService.createInstance(e.DirtyRowService),w._instantiationService.setService(a.IDirtyRowService,w._dirtyRowService),w.unicodeService=w._instantiationService.createInstance(r.UnicodeService),w._instantiationService.setService(a.IUnicodeService,w.unicodeService),w._charsetService=w._instantiationService.createInstance(s.CharsetService),w._instantiationService.setService(a.ICharsetService,w._charsetService),w._inputHandler=new v.InputHandler(w._bufferService,w._charsetService,w._coreService,w._dirtyRowService,w._logService,w.optionsService,w._coreMouseService,w.unicodeService),w.register(t.forwardEvent(w._inputHandler.onLineFeed,w._onLineFeed)),w.register(w._inputHandler),w.register(t.forwardEvent(w._bufferService.onResize,w._onResize)),w.register(t.forwardEvent(w._coreService.onData,w._onData)),w.register(t.forwardEvent(w._coreService.onBinary,w._onBinary)),w.register(w.optionsService.onOptionChange(function(C){return w._updateOptions(C)})),w._writeBuffer=new y.WriteBuffer(function(C){return w._inputHandler.parse(C)}),w}return b(S,m),Object.defineProperty(S.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),S.prototype.dispose=function(){var k;this._isDisposed||(m.prototype.dispose.call(this),(k=this._windowsMode)===null||k===void 0||k.dispose(),this._windowsMode=void 0)},S.prototype.write=function(k,w){this._writeBuffer.write(k,w)},S.prototype.writeSync=function(k){this._writeBuffer.writeSync(k)},S.prototype.resize=function(k,w){isNaN(k)||isNaN(w)||(k=Math.max(k,i.MINIMUM_COLS),w=Math.max(w,i.MINIMUM_ROWS),this._bufferService.resize(k,w))},S.prototype.scroll=function(k,w){w===void 0&&(w=!1);var C,E=this._bufferService.buffer;(C=this._cachedBlankLine)&&C.length===this.cols&&C.getFg(0)===k.fg&&C.getBg(0)===k.bg||(C=E.getBlankLine(k,w),this._cachedBlankLine=C),C.isWrapped=w;var T=E.ybase+E.scrollTop,L=E.ybase+E.scrollBottom;if(E.scrollTop===0){var N=E.lines.isFull;L===E.lines.length-1?N?E.lines.recycle().copyFrom(C):E.lines.push(C.clone()):E.lines.splice(L+1,0,C.clone()),N?this._bufferService.isUserScrolling&&(E.ydisp=Math.max(E.ydisp-1,0)):(E.ybase++,this._bufferService.isUserScrolling||E.ydisp++)}else{var Z=L-T+1;E.lines.shiftElements(T+1,Z-1,-1),E.lines.set(L,C.clone())}this._bufferService.isUserScrolling||(E.ydisp=E.ybase),this._dirtyRowService.markRangeDirty(E.scrollTop,E.scrollBottom),this._onScroll.fire(E.ydisp)},S.prototype.scrollLines=function(k,w){var C=this._bufferService.buffer;if(k<0){if(C.ydisp===0)return;this._bufferService.isUserScrolling=!0}else k+C.ydisp>=C.ybase&&(this._bufferService.isUserScrolling=!1);var E=C.ydisp;C.ydisp=Math.max(Math.min(C.ydisp+k,C.ybase),0),E!==C.ydisp&&(w||this._onScroll.fire(C.ydisp))},S.prototype.scrollPages=function(k){this.scrollLines(k*(this.rows-1))},S.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},S.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},S.prototype.scrollToLine=function(k){var w=k-this._bufferService.buffer.ydisp;w!==0&&this.scrollLines(w)},S.prototype.addEscHandler=function(k,w){return this._inputHandler.addEscHandler(k,w)},S.prototype.addDcsHandler=function(k,w){return this._inputHandler.addDcsHandler(k,w)},S.prototype.addCsiHandler=function(k,w){return this._inputHandler.addCsiHandler(k,w)},S.prototype.addOscHandler=function(k,w){return this._inputHandler.addOscHandler(k,w)},S.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},S.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},S.prototype._updateOptions=function(k){var w;switch(k){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((w=this._windowsMode)===null||w===void 0||w.dispose(),this._windowsMode=void 0)}},S.prototype._enableWindowsMode=function(){var k=this;if(!this._windowsMode){var w=[];w.push(this.onLineFeed(l.updateWindowsModeWrappedState.bind(null,this._bufferService))),w.push(this.addCsiHandler({final:"H"},function(){return l.updateWindowsModeWrappedState(k._bufferService),!1})),this._windowsMode={dispose:function(){for(var C=0,E=w;C<E.length;C++)E[C].dispose()}}}},S}(h.Disposable);f.CoreTerminal=g},function(D,f,_){"use strict";var p=this&&this.__spreadArrays||function(){for(var d=0,i=0,n=arguments.length;i<n;i++)d+=arguments[i].length;var o=Array(d),t=0;for(i=0;i<n;i++)for(var c=arguments[i],e=0,r=c.length;e<r;e++,t++)o[t]=c[e];return o};Object.defineProperty(f,"__esModule",{value:!0}),f.InstantiationService=f.ServiceCollection=void 0;var b=_(1),h=_(14),a=function(){function d(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];this._entries=new Map;for(var o=0,t=i;o<t.length;o++){var c=t[o],e=c[0],r=c[1];this.set(e,r)}}return d.prototype.set=function(i,n){var o=this._entries.get(i);return this._entries.set(i,n),o},d.prototype.forEach=function(i){this._entries.forEach(function(n,o){return i(o,n)})},d.prototype.has=function(i){return this._entries.has(i)},d.prototype.get=function(i){return this._entries.get(i)},d}();f.ServiceCollection=a;var u=function(){function d(){this._services=new a,this._services.set(b.IInstantiationService,this)}return d.prototype.setService=function(i,n){this._services.set(i,n)},d.prototype.getService=function(i){return this._services.get(i)},d.prototype.createInstance=function(i){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];for(var t=h.getServiceDependencies(i).sort(function(y,g){return y.index-g.index}),c=[],e=0,r=t;e<r.length;e++){var s=r[e],l=this._services.get(s.id);if(!l)throw new Error("[createInstance] "+i.name+" depends on UNKNOWN service "+s.id+".");c.push(l)}var v=t.length>0?t[0].index:n.length;if(n.length!==v)throw new Error("[createInstance] First service dependency of "+i.name+" at position "+(v+1)+" conflicts with "+n.length+" static arguments");return new(i.bind.apply(i,p([void 0],p(n,c))))},d}();f.InstantiationService=u},function(D,f,_){"use strict";var p=this&&this.__decorate||function(n,o,t,c){var e,r=arguments.length,s=r<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,t):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,o,t,c);else for(var l=n.length-1;l>=0;l--)(e=n[l])&&(s=(r<3?e(s):r>3?e(o,t,s):e(o,t))||s);return r>3&&s&&Object.defineProperty(o,t,s),s},b=this&&this.__param||function(n,o){return function(t,c){o(t,c,n)}},h=this&&this.__spreadArrays||function(){for(var n=0,o=0,t=arguments.length;o<t;o++)n+=arguments[o].length;var c=Array(n),e=0;for(o=0;o<t;o++)for(var r=arguments[o],s=0,l=r.length;s<l;s++,e++)c[e]=r[s];return c};Object.defineProperty(f,"__esModule",{value:!0}),f.LogService=f.LogLevel=void 0;var a,u=_(1);(function(n){n[n.DEBUG=0]="DEBUG",n[n.INFO=1]="INFO",n[n.WARN=2]="WARN",n[n.ERROR=3]="ERROR",n[n.OFF=4]="OFF"})(a=f.LogLevel||(f.LogLevel={}));var d={debug:a.DEBUG,info:a.INFO,warn:a.WARN,error:a.ERROR,off:a.OFF},i=function(){function n(o){var t=this;this._optionsService=o,this._updateLogLevel(),this._optionsService.onOptionChange(function(c){c==="logLevel"&&t._updateLogLevel()})}return n.prototype._updateLogLevel=function(){this._logLevel=d[this._optionsService.options.logLevel]},n.prototype._evalLazyOptionalParams=function(o){for(var t=0;t<o.length;t++)typeof o[t]=="function"&&(o[t]=o[t]())},n.prototype._log=function(o,t,c){this._evalLazyOptionalParams(c),o.call.apply(o,h([console,"xterm.js: "+t],c))},n.prototype.debug=function(o){for(var t=[],c=1;c<arguments.length;c++)t[c-1]=arguments[c];this._logLevel<=a.DEBUG&&this._log(console.log,o,t)},n.prototype.info=function(o){for(var t=[],c=1;c<arguments.length;c++)t[c-1]=arguments[c];this._logLevel<=a.INFO&&this._log(console.info,o,t)},n.prototype.warn=function(o){for(var t=[],c=1;c<arguments.length;c++)t[c-1]=arguments[c];this._logLevel<=a.WARN&&this._log(console.warn,o,t)},n.prototype.error=function(o){for(var t=[],c=1;c<arguments.length;c++)t[c-1]=arguments[c];this._logLevel<=a.ERROR&&this._log(console.error,o,t)},n=p([b(0,u.IOptionsService)],n)}();f.LogService=i},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(t,c){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(t,c)},function(t,c){function e(){this.constructor=t}p(t,c),t.prototype=c===null?Object.create(c):(e.prototype=c.prototype,new e)}),h=this&&this.__decorate||function(t,c,e,r){var s,l=arguments.length,v=l<3?c:r===null?r=Object.getOwnPropertyDescriptor(c,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,c,e,r);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(v=(l<3?s(v):l>3?s(c,e,v):s(c,e))||v);return l>3&&v&&Object.defineProperty(c,e,v),v},a=this&&this.__param||function(t,c){return function(e,r){c(e,r,t)}};Object.defineProperty(f,"__esModule",{value:!0}),f.BufferService=f.MINIMUM_ROWS=f.MINIMUM_COLS=void 0;var u=_(1),d=_(69),i=_(0),n=_(2);f.MINIMUM_COLS=2,f.MINIMUM_ROWS=1;var o=function(t){function c(e){var r=t.call(this)||this;return r._optionsService=e,r.isUserScrolling=!1,r._onResize=new i.EventEmitter,r.cols=Math.max(e.options.cols,f.MINIMUM_COLS),r.rows=Math.max(e.options.rows,f.MINIMUM_ROWS),r.buffers=new d.BufferSet(e,r),r}return b(c,t),Object.defineProperty(c.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),c.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},c.prototype.resize=function(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:r})},c.prototype.reset=function(){this.buffers.dispose(),this.buffers=new d.BufferSet(this._optionsService,this),this.isUserScrolling=!1},c=h([a(0,u.IOptionsService)],c)}(n.Disposable);f.BufferService=o},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(d,i){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var t in o)o.hasOwnProperty(t)&&(n[t]=o[t])})(d,i)},function(d,i){function n(){this.constructor=d}p(d,i),d.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)});Object.defineProperty(f,"__esModule",{value:!0}),f.BufferSet=void 0;var h=_(70),a=_(0),u=function(d){function i(n,o){var t=d.call(this)||this;return t._onBufferActivate=t.register(new a.EventEmitter),t._normal=new h.Buffer(!0,n,o),t._normal.fillViewportRows(),t._alt=new h.Buffer(!1,n,o),t._activeBuffer=t._normal,t.setupTabStops(),t}return b(i,d),Object.defineProperty(i.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),i.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},i.prototype.activateAltBuffer=function(n){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(n),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},i.prototype.resize=function(n,o){this._normal.resize(n,o),this._alt.resize(n,o)},i.prototype.setupTabStops=function(n){this._normal.setupTabStops(n),this._alt.setupTabStops(n)},i}(_(2).Disposable);f.BufferSet=u},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.BufferStringIterator=f.Buffer=f.MAX_BUFFER_SIZE=void 0;var p=_(71),b=_(16),h=_(4),a=_(3),u=_(72),d=_(73),i=_(20),n=_(6);f.MAX_BUFFER_SIZE=4294967295;var o=function(){function c(e,r,s){this._hasScrollback=e,this._optionsService=r,this._bufferService=s,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=i.DEFAULT_CHARSET,this.markers=[],this._nullCell=h.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),this._whitespaceCell=h.CellData.fromCharData([0,a.WHITESPACE_CELL_CHAR,a.WHITESPACE_CELL_WIDTH,a.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new p.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return c.prototype.getNullCell=function(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell},c.prototype.getWhitespaceCell=function(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell},c.prototype.getBlankLine=function(e,r){return new b.BufferLine(this._bufferService.cols,this.getNullCell(e),r)},Object.defineProperty(c.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),c.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.options.scrollback;return r>f.MAX_BUFFER_SIZE?f.MAX_BUFFER_SIZE:r},c.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=b.DEFAULT_ATTR_DATA);for(var r=this._rows;r--;)this.lines.push(this.getBlankLine(e))}},c.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new p.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},c.prototype.resize=function(e,r){var s=this.getNullCell(b.DEFAULT_ATTR_DATA),l=this._getCorrectBufferLength(r);if(l>this.lines.maxLength&&(this.lines.maxLength=l),this.lines.length>0){if(this._cols<e)for(var v=0;v<this.lines.length;v++)this.lines.get(v).resize(e,s);var y=0;if(this._rows<r)for(var g=this._rows;g<r;g++)this.lines.length<r+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new b.BufferLine(e,s)):this.ybase>0&&this.lines.length<=this.ybase+this.y+y+1?(this.ybase--,y++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(e,s)));else for(g=this._rows;g>r;g--)this.lines.length>r+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(l<this.lines.maxLength){var m=this.lines.length-l;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=l}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,r-1),y&&(this.y+=y),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=r-1,this._isReflowEnabled&&(this._reflow(e,r),this._cols>e))for(v=0;v<this.lines.length;v++)this.lines.get(v).resize(e,s);this._cols=e,this._rows=r},Object.defineProperty(c.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),c.prototype._reflow=function(e,r){this._cols!==e&&(e>this._cols?this._reflowLarger(e,r):this._reflowSmaller(e,r))},c.prototype._reflowLarger=function(e,r){var s=u.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(s.length>0){var l=u.reflowLargerCreateNewLayout(this.lines,s);u.reflowLargerApplyNewLayout(this.lines,l.layout),this._reflowLargerAdjustViewport(e,r,l.countRemoved)}},c.prototype._reflowLargerAdjustViewport=function(e,r,s){for(var l=this.getNullCell(b.DEFAULT_ATTR_DATA),v=s;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<r&&this.lines.push(new b.BufferLine(e,l))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-s,0)},c.prototype._reflowSmaller=function(e,r){for(var s=this.getNullCell(b.DEFAULT_ATTR_DATA),l=[],v=0,y=this.lines.length-1;y>=0;y--){var g=this.lines.get(y);if(!(!g||!g.isWrapped&&g.getTrimmedLength()<=e)){for(var m=[g];g.isWrapped&&y>0;)g=this.lines.get(--y),m.unshift(g);var S=this.ybase+this.y;if(!(S>=y&&S<y+m.length)){var k=m[m.length-1].getTrimmedLength(),w=u.reflowSmallerGetNewLineLengths(m,this._cols,e),C=w.length-m.length,E=void 0;E=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+C):Math.max(0,this.lines.length-this.lines.maxLength+C);for(var T=[],L=0;L<C;L++){var N=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);T.push(N)}T.length>0&&(l.push({start:y+m.length+v,newLines:T}),v+=T.length),m.push.apply(m,T);var Z=w.length-1,q=w[Z];q===0&&(q=w[--Z]);for(var H=m.length-C-1,z=k;H>=0;){var A=Math.min(z,q);if(m[Z].copyCellsFrom(m[H],z-A,q-A,A,!0),(q-=A)===0&&(q=w[--Z]),(z-=A)===0){H--;var O=Math.max(H,0);z=u.getWrappedLineTrimmedLength(m,O,this._cols)}}for(L=0;L<m.length;L++)w[L]<e&&m[L].setCell(w[L],s);for(var X=C-E;X-- >0;)this.ybase===0?this.y<r-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-r&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+C,this.ybase+r-1)}}}if(l.length>0){var U=[],B=[];for(L=0;L<this.lines.length;L++)B.push(this.lines.get(L));var Y=this.lines.length,ue=Y-1,me=0,De=l[me];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);var Te=0;for(L=Math.min(this.lines.maxLength-1,Y+v-1);L>=0;L--)if(De&&De.start>ue+Te){for(var oe=De.newLines.length-1;oe>=0;oe--)this.lines.set(L--,De.newLines[oe]);L++,U.push({index:ue+1,amount:De.newLines.length}),Te+=De.newLines.length,De=l[++me]}else this.lines.set(L,B[ue--]);var be=0;for(L=U.length-1;L>=0;L--)U[L].index+=be,this.lines.onInsertEmitter.fire(U[L]),be+=U[L].amount;var Fe=Math.max(0,Y+v-this.lines.maxLength);Fe>0&&this.lines.onTrimEmitter.fire(Fe)}},c.prototype.stringIndexToBufferIndex=function(e,r,s){for(s===void 0&&(s=!1);r;){var l=this.lines.get(e);if(!l)return[-1,-1];for(var v=s?l.getTrimmedLength():l.length,y=0;y<v;++y)if(l.get(y)[a.CHAR_DATA_WIDTH_INDEX]&&(r-=l.get(y)[a.CHAR_DATA_CHAR_INDEX].length||1),r<0)return[e,y];e++}return[e,0]},c.prototype.translateBufferLineToString=function(e,r,s,l){s===void 0&&(s=0);var v=this.lines.get(e);return v?v.translateToString(r,s,l):""},c.prototype.getWrappedRangeForLine=function(e){for(var r=e,s=e;r>0&&this.lines.get(r).isWrapped;)r--;for(;s+1<this.lines.length&&this.lines.get(s+1).isWrapped;)s++;return{first:r,last:s}},c.prototype.setupTabStops=function(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.options.tabStopWidth)this.tabs[e]=!0},c.prototype.prevStop=function(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},c.prototype.nextStop=function(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},c.prototype.addMarker=function(e){var r=this,s=new d.Marker(e);return this.markers.push(s),s.register(this.lines.onTrim(function(l){s.line-=l,s.line<0&&s.dispose()})),s.register(this.lines.onInsert(function(l){s.line>=l.index&&(s.line+=l.amount)})),s.register(this.lines.onDelete(function(l){s.line>=l.index&&s.line<l.index+l.amount&&s.dispose(),s.line>l.index&&(s.line-=l.amount)})),s.register(s.onDispose(function(){return r._removeMarker(s)})),s},c.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},c.prototype.iterator=function(e,r,s,l,v){return new t(this,e,r,s,l,v)},c}();f.Buffer=o;var t=function(){function c(e,r,s,l,v,y){s===void 0&&(s=0),l===void 0&&(l=e.lines.length),v===void 0&&(v=0),y===void 0&&(y=0),this._buffer=e,this._trimRight=r,this._startIndex=s,this._endIndex=l,this._startOverscan=v,this._endOverscan=y,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return c.prototype.hasNext=function(){return this._current<this._endIndex},c.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var r="",s=e.first;s<=e.last;++s)r+=this._buffer.translateBufferLineToString(s,this._trimRight);return this._current=e.last+1,{range:e,content:r}},c}();f.BufferStringIterator=t},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.CircularList=void 0;var p=_(0),b=function(){function h(a){this._maxLength=a,this.onDeleteEmitter=new p.EventEmitter,this.onInsertEmitter=new p.EventEmitter,this.onTrimEmitter=new p.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(h.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"maxLength",{get:function(){return this._maxLength},set:function(a){if(this._maxLength!==a){for(var u=new Array(a),d=0;d<Math.min(a,this.length);d++)u[d]=this._array[this._getCyclicIndex(d)];this._array=u,this._maxLength=a,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"length",{get:function(){return this._length},set:function(a){if(a>this._length)for(var u=this._length;u<a;u++)this._array[u]=void 0;this._length=a},enumerable:!1,configurable:!0}),h.prototype.get=function(a){return this._array[this._getCyclicIndex(a)]},h.prototype.set=function(a,u){this._array[this._getCyclicIndex(a)]=u},h.prototype.push=function(a){this._array[this._getCyclicIndex(this._length)]=a,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},h.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(h.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),h.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},h.prototype.splice=function(a,u){for(var d=[],i=2;i<arguments.length;i++)d[i-2]=arguments[i];if(u){for(var n=a;n<this._length-u;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+u)];this._length-=u}for(n=this._length-1;n>=a;n--)this._array[this._getCyclicIndex(n+d.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<d.length;n++)this._array[this._getCyclicIndex(a+n)]=d[n];if(this._length+d.length>this._maxLength){var o=this._length+d.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=d.length},h.prototype.trimStart=function(a){a>this._length&&(a=this._length),this._startIndex+=a,this._length-=a,this.onTrimEmitter.fire(a)},h.prototype.shiftElements=function(a,u,d){if(!(u<=0)){if(a<0||a>=this._length)throw new Error("start argument out of range");if(a+d<0)throw new Error("Cannot shift elements in list beyond index 0");if(d>0){for(var i=u-1;i>=0;i--)this.set(a+i+d,this.get(a+i));var n=a+u+d-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<u;i++)this.set(a+i+d,this.get(a+i))}},h.prototype._getCyclicIndex=function(a){return(this._startIndex+a)%this._maxLength},h}();f.CircularList=b},function(D,f,_){"use strict";function p(b,h,a){if(h===b.length-1)return b[h].getTrimmedLength();var u=!b[h].hasContent(a-1)&&b[h].getWidth(a-1)===1,d=b[h+1].getWidth(0)===2;return u&&d?a-1:a}Object.defineProperty(f,"__esModule",{value:!0}),f.getWrappedLineTrimmedLength=f.reflowSmallerGetNewLineLengths=f.reflowLargerApplyNewLayout=f.reflowLargerCreateNewLayout=f.reflowLargerGetLinesToRemove=void 0,f.reflowLargerGetLinesToRemove=function(b,h,a,u,d){for(var i=[],n=0;n<b.length-1;n++){var o=n,t=b.get(++o);if(t.isWrapped){for(var c=[b.get(n)];o<b.length&&t.isWrapped;)c.push(t),t=b.get(++o);if(u>=n&&u<o)n+=c.length-1;else{for(var e=0,r=p(c,e,h),s=1,l=0;s<c.length;){var v=p(c,s,h),y=v-l,g=a-r,m=Math.min(y,g);c[e].copyCellsFrom(c[s],l,r,m,!1),(r+=m)===a&&(e++,r=0),(l+=m)===v&&(s++,l=0),r===0&&e!==0&&c[e-1].getWidth(a-1)===2&&(c[e].copyCellsFrom(c[e-1],a-1,r++,1,!1),c[e-1].setCell(a-1,d))}c[e].replaceCells(r,a,d);for(var S=0,k=c.length-1;k>0&&(k>e||c[k].getTrimmedLength()===0);k--)S++;S>0&&(i.push(n+c.length-S),i.push(S)),n+=c.length-1}}}return i},f.reflowLargerCreateNewLayout=function(b,h){for(var a=[],u=0,d=h[u],i=0,n=0;n<b.length;n++)if(d===n){var o=h[++u];b.onDeleteEmitter.fire({index:n-i,amount:o}),n+=o-1,i+=o,d=h[++u]}else a.push(n);return{layout:a,countRemoved:i}},f.reflowLargerApplyNewLayout=function(b,h){for(var a=[],u=0;u<h.length;u++)a.push(b.get(h[u]));for(u=0;u<a.length;u++)b.set(u,a[u]);b.length=h.length},f.reflowSmallerGetNewLineLengths=function(b,h,a){for(var u=[],d=b.map(function(r,s){return p(b,s,h)}).reduce(function(r,s){return r+s}),i=0,n=0,o=0;o<d;){if(d-o<a){u.push(d-o);break}i+=a;var t=p(b,n,h);i>t&&(i-=t,n++);var c=b[n].getWidth(i-1)===2;c&&i--;var e=c?a-1:a;u.push(e),o+=e}return u},f.getWrappedLineTrimmedLength=p},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(u,d){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o])})(u,d)},function(u,d){function i(){this.constructor=u}p(u,d),u.prototype=d===null?Object.create(d):(i.prototype=d.prototype,new i)});Object.defineProperty(f,"__esModule",{value:!0}),f.Marker=void 0;var h=_(0),a=function(u){function d(i){var n=u.call(this)||this;return n.line=i,n._id=d._nextId++,n.isDisposed=!1,n._onDispose=new h.EventEmitter,n}return b(d,u),Object.defineProperty(d.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},d._nextId=1,d}(_(2).Disposable);f.Marker=a},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.OptionsService=f.DEFAULT_OPTIONS=f.DEFAULT_BELL_SOUND=void 0;var p=_(0),b=_(11),h=_(33);f.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",f.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:f.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:b.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var a=["cols","rows"],u=function(){function d(i){this._onOptionChange=new p.EventEmitter,this.options=h.clone(f.DEFAULT_OPTIONS);for(var n=0,o=Object.keys(i);n<o.length;n++){var t=o[n];if(t in this.options){var c=i[t];this.options[t]=c}}}return Object.defineProperty(d.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),d.prototype.setOption=function(i,n){if(!(i in f.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');if(a.indexOf(i)!==-1)throw new Error('Option "'+i+'" can only be set in the constructor');this.options[i]!==n&&(n=this._sanitizeAndValidateOption(i,n),this.options[i]!==n&&(this.options[i]=n,this._onOptionChange.fire(i)))},d.prototype._sanitizeAndValidateOption=function(i,n){switch(i){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":n||(n=f.DEFAULT_OPTIONS[i]);break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(i+" cannot be less than 1, value: "+n);break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error(i+" cannot be less than 0, value: "+n);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(i+" cannot be less than or equal to 0, value: "+n)}return n},d.prototype.getOption=function(i){if(!(i in f.DEFAULT_OPTIONS))throw new Error('No option with key "'+i+'"');return this.options[i]},d}();f.OptionsService=u},function(D,f,_){"use strict";var p,b=this&&this.__extends||(p=function(e,r){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var v in l)l.hasOwnProperty(v)&&(s[v]=l[v])})(e,r)},function(e,r){function s(){this.constructor=e}p(e,r),e.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}),h=this&&this.__decorate||function(e,r,s,l){var v,y=arguments.length,g=y<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,r,s,l);else for(var m=e.length-1;m>=0;m--)(v=e[m])&&(g=(y<3?v(g):y>3?v(r,s,g):v(r,s))||g);return y>3&&g&&Object.defineProperty(r,s,g),g},a=this&&this.__param||function(e,r){return function(s,l){r(s,l,e)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreService=void 0;var u=_(1),d=_(0),i=_(33),n=_(2),o=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),c=function(e){function r(s,l,v,y){var g=e.call(this)||this;return g._bufferService=l,g._logService=v,g._optionsService=y,g.isCursorInitialized=!1,g.isCursorHidden=!1,g._onData=g.register(new d.EventEmitter),g._onUserInput=g.register(new d.EventEmitter),g._onBinary=g.register(new d.EventEmitter),g._scrollToBottom=s,g.register({dispose:function(){return g._scrollToBottom=void 0}}),g.modes=i.clone(o),g.decPrivateModes=i.clone(t),g}return b(r,e),Object.defineProperty(r.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.modes=i.clone(o),this.decPrivateModes=i.clone(t)},r.prototype.triggerDataEvent=function(s,l){if(l===void 0&&(l=!1),!this._optionsService.options.disableStdin){var v=this._bufferService.buffer;v.ybase!==v.ydisp&&this._scrollToBottom(),l&&this._onUserInput.fire(),this._logService.debug('sending data "'+s+'"',function(){return s.split("").map(function(y){return y.charCodeAt(0)})}),this._onData.fire(s)}},r.prototype.triggerBinaryEvent=function(s){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+s+'"',function(){return s.split("").map(function(l){return l.charCodeAt(0)})}),this._onBinary.fire(s))},r=h([a(1,u.IBufferService),a(2,u.ILogService),a(3,u.IOptionsService)],r)}(n.Disposable);f.CoreService=c},function(D,f,_){"use strict";var p=this&&this.__decorate||function(t,c,e,r){var s,l=arguments.length,v=l<3?c:r===null?r=Object.getOwnPropertyDescriptor(c,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,c,e,r);else for(var y=t.length-1;y>=0;y--)(s=t[y])&&(v=(l<3?s(v):l>3?s(c,e,v):s(c,e))||v);return l>3&&v&&Object.defineProperty(c,e,v),v},b=this&&this.__param||function(t,c){return function(e,r){c(e,r,t)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreMouseService=void 0;var h=_(1),a=_(0),u={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(t){return t.button!==4&&t.action===1&&(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)}},VT200:{events:19,restrict:function(t){return t.action!==32}},DRAG:{events:23,restrict:function(t){return t.action!==32||t.button!==3}},ANY:{events:31,restrict:function(t){return!0}}};function d(t,c){var e=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return t.button===4?(e|=64,e|=t.action):(e|=3&t.button,4&t.button&&(e|=64),8&t.button&&(e|=128),t.action===32?e|=32:t.action!==0||c||(e|=3)),e}var i=String.fromCharCode,n={DEFAULT:function(t){var c=[d(t,!1)+32,t.col+32,t.row+32];return c[0]>255||c[1]>255||c[2]>255?"":"\x1B[M"+i(c[0])+i(c[1])+i(c[2])},SGR:function(t){var c=t.action===0&&t.button!==4?"m":"M";return"\x1B[<"+d(t,!0)+";"+t.col+";"+t.row+c}},o=function(){function t(c,e){this._bufferService=c,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new a.EventEmitter,this._lastEvent=null;for(var r=0,s=Object.keys(u);r<s.length;r++){var l=s[r];this.addProtocol(l,u[l])}for(var v=0,y=Object.keys(n);v<y.length;v++){var g=y[v];this.addEncoding(g,n[g])}this.reset()}return t.prototype.addProtocol=function(c,e){this._protocols[c]=e},t.prototype.addEncoding=function(c,e){this._encodings[c]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(c){if(!this._protocols[c])throw new Error('unknown protocol "'+c+'"');this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(c){if(!this._encodings[c])throw new Error('unknown encoding "'+c+'"');this._activeEncoding=c},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(t.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),t.prototype.triggerMouseEvent=function(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,c))||!this._protocols[this._activeProtocol].restrict(c))return!1;var e=this._encodings[this._activeEncoding](c);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=c,!0},t.prototype.explainEvents=function(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}},t.prototype._compareEvents=function(c,e){return c.col===e.col&&c.row===e.row&&c.button===e.button&&c.action===e.action&&c.ctrl===e.ctrl&&c.alt===e.alt&&c.shift===e.shift},t=p([b(0,h.IBufferService),b(1,h.ICoreService)],t)}();f.CoreMouseService=o},function(D,f,_){"use strict";var p=this&&this.__decorate||function(u,d,i,n){var o,t=arguments.length,c=t<3?d:n===null?n=Object.getOwnPropertyDescriptor(d,i):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(u,d,i,n);else for(var e=u.length-1;e>=0;e--)(o=u[e])&&(c=(t<3?o(c):t>3?o(d,i,c):o(d,i))||c);return t>3&&c&&Object.defineProperty(d,i,c),c},b=this&&this.__param||function(u,d){return function(i,n){d(i,n,u)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DirtyRowService=void 0;var h=_(1),a=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,i){if(d>i){var n=d;d=i,i=n}d<this._start&&(this._start=d),i>this._end&&(this._end=i)},u.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u=p([b(0,h.IBufferService)],u)}();f.DirtyRowService=a},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeService=void 0;var p=_(0),b=_(79),h=function(){function a(){this._providers=Object.create(null),this._active="",this._onChange=new p.EventEmitter;var u=new b.UnicodeV6;this.register(u),this._active=u.version,this._activeProvider=u}return Object.defineProperty(a.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(a.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}),a.prototype.register=function(u){this._providers[u.version]=u},a.prototype.wcwidth=function(u){return this._activeProvider.wcwidth(u)},a.prototype.getStringCellWidth=function(u){for(var d=0,i=u.length,n=0;n<i;++n){var o=u.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=i)return d+this.wcwidth(o);var t=u.charCodeAt(n);56320<=t&&t<=57343?o=1024*(o-55296)+t-56320+65536:d+=this.wcwidth(t)}d+=this.wcwidth(o)}return d},a}();f.UnicodeService=h},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeV6=void 0;var p,b=_(15),h=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],a=[[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",!p){p=new Uint8Array(65536),b.fill(p,1),p[0]=0,b.fill(p,0,1,32),b.fill(p,0,127,160),b.fill(p,2,4352,4448),p[9001]=2,p[9002]=2,b.fill(p,2,11904,42192),p[12351]=1,b.fill(p,2,44032,55204),b.fill(p,2,63744,64256),b.fill(p,2,65040,65050),b.fill(p,2,65072,65136),b.fill(p,2,65280,65377),b.fill(p,2,65504,65511);for(var i=0;i<h.length;++i)b.fill(p,0,h[i][0],h[i][1]+1)}}return d.prototype.wcwidth=function(i){return i<32?0:i<127?1:i<65536?p[i]:function(n,o){var t,c=0,e=o.length-1;if(n<o[0][0]||n>o[e][1])return!1;for(;e>=c;)if(n>o[t=c+e>>1][1])c=t+1;else{if(!(n<o[t][0]))return!0;e=t-1}return!1}(i,a)?0:i>=131072&&i<=196605||i>=196608&&i<=262141?2:1},d}();f.UnicodeV6=u},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.CharsetService=void 0;var p=function(){function b(){this.glevel=0,this._charsets=[]}return b.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},b.prototype.setgLevel=function(h){this.glevel=h,this.charset=this._charsets[h]},b.prototype.setgCharset=function(h,a){this._charsets[h]=a,this.glevel===h&&(this.charset=a)},b}();f.CharsetService=p},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.updateWindowsModeWrappedState=void 0;var p=_(3);f.updateWindowsModeWrappedState=function(b){var h=b.buffer.lines.get(b.buffer.ybase+b.buffer.y-1),a=h==null?void 0:h.get(b.cols-1),u=b.buffer.lines.get(b.buffer.ybase+b.buffer.y);u&&a&&(u.isWrapped=a[p.CHAR_DATA_CODE_INDEX]!==p.NULL_CELL_CODE&&a[p.CHAR_DATA_CODE_INDEX]!==p.WHITESPACE_CELL_CODE)}},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.WriteBuffer=void 0;var p=function(){function b(h){this._action=h,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return b.prototype.writeSync=function(h){if(this._writeBuffer.length){for(var a=this._bufferOffset;a<this._writeBuffer.length;++a){var u=this._writeBuffer[a],d=this._callbacks[a];this._action(u),d&&d()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(h)},b.prototype.write=function(h,a){var u=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return u._innerWrite()})),this._pendingData+=h.length,this._writeBuffer.push(h),this._callbacks.push(a)},b.prototype._innerWrite=function(){for(var h=this,a=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()-a>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return h._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},b}();f.WriteBuffer=p},function(D,f,_){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.AddonManager=void 0;var p=function(){function b(){this._addons=[]}return b.prototype.dispose=function(){for(var h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()},b.prototype.loadAddon=function(h,a){var u=this,d={instance:a,dispose:a.dispose,isDisposed:!1};this._addons.push(d),a.dispose=function(){return u._wrappedAddonDispose(d)},a.activate(h)},b.prototype._wrappedAddonDispose=function(h){if(!h.isDisposed){for(var a=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===h){a=u;break}if(a===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(a,1)}},b}();f.AddonManager=p}])})}}]);