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.188a2cd1...

40 lines
614 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],{40001:function(Me,D,s){"use strict";s.d(D,{Z:function(){return r}});var _=s(96663),p=s(59301),b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},d=b,o=s(7657),u=function(a,t){return p.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:d}))},h=p.forwardRef(u),r=h},73331:function(Me,D,s){"use strict";s.d(D,{Z:function(){return r}});var _=s(96663),p=s(59301),b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},d=b,o=s(7657),u=function(a,t){return p.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:d}))},h=p.forwardRef(u),r=h},15277:function(Me,D,s){"use strict";s.d(D,{Z:function(){return r}});var _=s(96663),p=s(59301),b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},d=b,o=s(7657),u=function(a,t){return p.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:d}))},h=p.forwardRef(u),r=h},47472:function(Me,D,s){"use strict";s.d(D,{Z:function(){return r}});var _=s(96663),p=s(59301),b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},d=b,o=s(7657),u=function(a,t){return p.createElement(o.Z,(0,_.Z)({},a,{ref:t,icon:d}))},h=p.forwardRef(u),r=h},35593:function(Me,D,s){"use strict";s.d(D,{Z:function(){return Ue}});var _=s(44127),p=s(72071),b=s(6620),d=s(43403),o=s(92310),u=s.n(o),h=s(29301),r=s(76846),n=s(96452),a=s(6089),t=s(80402),f=s(34280),e=s(49658),i=s(59301),l=s(96663),c=s(77900),v=s(8654);function y(oe){var me=oe.prefixCls,se=oe.align,J=oe.arrow,ne=oe.arrowPos,Se=J||{},be=Se.className,_e=Se.content,ce=ne.x,ue=ce===void 0?0:ce,ee=ne.y,L=ee===void 0?0:ee,U=i.useRef();if(!se||!se.points)return null;var T={position:"absolute"};if(se.autoArrow!==!1){var Y=se.points[0],pe=se.points[1],Ce=Y[0],Z=Y[1],A=pe[0],Q=pe[1];Ce===A||!["t","b"].includes(Ce)?T.top=L:Ce==="t"?T.top=0:T.bottom=0,Z===Q||!["l","r"].includes(Z)?T.left=ue:Z==="l"?T.left=0:T.right=0}return i.createElement("div",{ref:U,className:u()("".concat(me,"-arrow"),be),style:T},_e)}function g(oe){var me=oe.prefixCls,se=oe.open,J=oe.zIndex,ne=oe.mask,Se=oe.motion;return ne?i.createElement(c.default,(0,l.Z)({},Se,{motionAppear:!0,visible:se,removeOnLeave:!0}),function(be){var _e=be.className;return i.createElement("div",{style:{zIndex:J},className:u()("".concat(me,"-mask"),_e)})}):null}var x=i.memo(function(oe){var me=oe.children;return me},function(oe,me){return me.cache}),E=x,C=i.forwardRef(function(oe,me){var se=oe.popup,J=oe.className,ne=oe.prefixCls,Se=oe.style,be=oe.target,_e=oe.onVisibleChanged,ce=oe.open,ue=oe.keepDom,ee=oe.fresh,L=oe.onClick,U=oe.mask,T=oe.arrow,Y=oe.arrowPos,pe=oe.align,Ce=oe.motion,Z=oe.maskMotion,A=oe.forceRender,Q=oe.getPopupContainer,V=oe.autoDestroy,he=oe.portal,ye=oe.zIndex,de=oe.onMouseEnter,N=oe.onMouseLeave,le=oe.onPointerEnter,M=oe.ready,ve=oe.offsetX,Re=oe.offsetY,w=oe.offsetR,ie=oe.offsetB,te=oe.onAlign,P=oe.onPrepare,j=oe.stretch,re=oe.targetWidth,Ae=oe.targetHeight,we=typeof se=="function"?se():se,Ee=ce||ue,Be=(Q==null?void 0:Q.length)>0,je=i.useState(!Q||!Be),ze=(0,p.Z)(je,2),He=ze[0],$e=ze[1];if((0,f.Z)(function(){!He&&Be&&be&&$e(!0)},[He,Be,be]),!He)return null;var Ie="auto",Ne={left:"-1000vw",top:"-1000vh",right:Ie,bottom:Ie};if(M||!ce){var Ve,Ge=pe.points,Qe=pe.dynamicInset||((Ve=pe._experimental)===null||Ve===void 0?void 0:Ve.dynamicInset),tt=Qe&&Ge[0][1]==="r",Je=Qe&&Ge[0][0]==="b";tt?(Ne.right=w,Ne.left=Ie):(Ne.left=ve,Ne.right=Ie),Je?(Ne.bottom=ie,Ne.top=Ie):(Ne.top=Re,Ne.bottom=Ie)}var et={};return j&&(j.includes("height")&&Ae?et.height=Ae:j.includes("minHeight")&&Ae&&(et.minHeight=Ae),j.includes("width")&&re?et.width=re:j.includes("minWidth")&&re&&(et.minWidth=re)),ce||(et.pointerEvents="none"),i.createElement(he,{open:A||Ee,getContainer:Q&&function(){return Q(be)},autoDestroy:V},i.createElement(g,{prefixCls:ne,open:ce,zIndex:ye,mask:U,motion:Z}),i.createElement(h.Z,{onResize:te,disabled:!ce},function(ot){return i.createElement(c.default,(0,l.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:A,leavedClassName:"".concat(ne,"-hidden")},Ce,{onAppearPrepare:P,onEnterPrepare:P,visible:ce,onVisibleChanged:function(ut){var ft;Ce==null||(ft=Ce.onVisibleChanged)===null||ft===void 0||ft.call(Ce,ut),_e(ut)}}),function(dt,ut){var ft=dt.className,qe=dt.style,_t=u()(ne,ft,J);return i.createElement("div",{ref:(0,v.sQ)(ot,me,ut),className:_t,style:(0,_.Z)((0,_.Z)((0,_.Z)((0,_.Z)({"--arrow-x":"".concat(Y.x||0,"px"),"--arrow-y":"".concat(Y.y||0,"px")},Ne),et),qe),{},{boxSizing:"border-box",zIndex:ye},Se),onMouseEnter:de,onMouseLeave:N,onPointerEnter:le,onClick:L},T&&i.createElement(y,{prefixCls:ne,arrow:T,arrowPos:Y,align:pe}),i.createElement(E,{cache:!ce&&!ee},we))})}))}),m=C,S=i.forwardRef(function(oe,me){var se=oe.children,J=oe.getTriggerDOMNode,ne=(0,v.Yr)(se),Se=i.useCallback(function(_e){(0,v.mH)(me,J?J(_e):_e)},[J]),be=(0,v.x1)(Se,se.ref);return ne?i.cloneElement(se,{ref:be}):se}),k=S,O=i.createContext(null),F=O;function z(oe){return oe?Array.isArray(oe)?oe:[oe]:[]}function H(oe,me,se,J){return i.useMemo(function(){var ne=z(se!=null?se:me),Se=z(J!=null?J:me),be=new Set(ne),_e=new Set(Se);return oe&&(be.has("hover")&&(be.delete("hover"),be.add("click")),_e.has("hover")&&(_e.delete("hover"),_e.add("click"))),[be,_e]},[oe,me,se,J])}var q=s(29194);function K(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],se=arguments.length>2?arguments[2]:void 0;return se?oe[0]===me[0]:oe[0]===me[0]&&oe[1]===me[1]}function $(oe,me,se,J){for(var ne=se.points,Se=Object.keys(oe),be=0;be<Se.length;be+=1){var _e,ce=Se[be];if(K((_e=oe[ce])===null||_e===void 0?void 0:_e.points,ne,J))return"".concat(me,"-placement-").concat(ce)}return""}function R(oe,me,se,J){return me||(se?{motionName:"".concat(oe,"-").concat(se)}:J?{motionName:J}:null)}function X(oe){return oe.ownerDocument.defaultView}function I(oe){for(var me=[],se=oe==null?void 0:oe.parentElement,J=["hidden","scroll","clip","auto"];se;){var ne=X(se).getComputedStyle(se),Se=ne.overflowX,be=ne.overflowY,_e=ne.overflow;[Se,be,_e].some(function(ce){return J.includes(ce)})&&me.push(se),se=se.parentElement}return me}function W(oe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(oe)?me:oe}function B(oe){return W(parseFloat(oe),0)}function G(oe,me){var se=(0,_.Z)({},oe);return(me||[]).forEach(function(J){if(!(J instanceof HTMLBodyElement||J instanceof HTMLHtmlElement)){var ne=X(J).getComputedStyle(J),Se=ne.overflow,be=ne.overflowClipMargin,_e=ne.borderTopWidth,ce=ne.borderBottomWidth,ue=ne.borderLeftWidth,ee=ne.borderRightWidth,L=J.getBoundingClientRect(),U=J.offsetHeight,T=J.clientHeight,Y=J.offsetWidth,pe=J.clientWidth,Ce=B(_e),Z=B(ce),A=B(ue),Q=B(ee),V=W(Math.round(L.width/Y*1e3)/1e3),he=W(Math.round(L.height/U*1e3)/1e3),ye=(Y-pe-A-Q)*V,de=(U-T-Ce-Z)*he,N=Ce*he,le=Z*he,M=A*V,ve=Q*V,Re=0,w=0;if(Se==="clip"){var ie=B(be);Re=ie*V,w=ie*he}var te=L.x+M-Re,P=L.y+N-w,j=te+L.width+2*Re-M-ve-ye,re=P+L.height+2*w-N-le-de;se.left=Math.max(se.left,te),se.top=Math.max(se.top,P),se.right=Math.min(se.right,j),se.bottom=Math.min(se.bottom,re)}}),se}function fe(oe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se="".concat(me),J=se.match(/^(.*)\%$/);return J?oe*(parseFloat(J[1])/100):parseFloat(se)}function xe(oe,me){var se=me||[],J=(0,p.Z)(se,2),ne=J[0],Se=J[1];return[fe(oe.width,ne),fe(oe.height,Se)]}function Le(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[oe[0],oe[1]]}function ke(oe,me){var se=me[0],J=me[1],ne,Se;return se==="t"?Se=oe.y:se==="b"?Se=oe.y+oe.height:Se=oe.y+oe.height/2,J==="l"?ne=oe.x:J==="r"?ne=oe.x+oe.width:ne=oe.x+oe.width/2,{x:ne,y:Se}}function ae(oe,me){var se={t:"b",b:"t",l:"r",r:"l"};return oe.map(function(J,ne){return ne===me?se[J]||"c":J}).join("")}function ge(oe,me,se,J,ne,Se,be){var _e=i.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:ne[J]||{}}),ce=(0,p.Z)(_e,2),ue=ce[0],ee=ce[1],L=i.useRef(0),U=i.useMemo(function(){return me?I(me):[]},[me]),T=i.useRef({}),Y=function(){T.current={}};oe||Y();var pe=(0,a.Z)(function(){if(me&&se&&oe){let bt=function(At,zt){var Yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_t,Jt=we.x+At,ar=we.y+zt,lr=Jt+Ve,kr=ar+Ne,Wr=Math.max(Jt,Yt.left),zr=Math.max(ar,Yt.top),jr=Math.min(lr,Yt.right),$r=Math.min(kr,Yt.bottom);return Math.max(0,(jr-Wr)*($r-zr))},Er=function(){Ot=we.y+Ye,Mt=Ot+Ne,Pt=we.x+nt,Qt=Pt+Ve};var A,Q,V=me,he=V.ownerDocument,ye=X(V),de=ye.getComputedStyle(V),N=de.width,le=de.height,M=de.position,ve=V.style.left,Re=V.style.top,w=V.style.right,ie=V.style.bottom,te=V.style.overflow,P=(0,_.Z)((0,_.Z)({},ne[J]),Se),j=he.createElement("div");(A=V.parentElement)===null||A===void 0||A.appendChild(j),j.style.left="".concat(V.offsetLeft,"px"),j.style.top="".concat(V.offsetTop,"px"),j.style.position=M,j.style.height="".concat(V.offsetHeight,"px"),j.style.width="".concat(V.offsetWidth,"px"),V.style.left="0",V.style.top="0",V.style.right="auto",V.style.bottom="auto",V.style.overflow="hidden";var re;if(Array.isArray(se))re={x:se[0],y:se[1],width:0,height:0};else{var Ae=se.getBoundingClientRect();re={x:Ae.x,y:Ae.y,width:Ae.width,height:Ae.height}}var we=V.getBoundingClientRect(),Ee=he.documentElement,Be=Ee.clientWidth,je=Ee.clientHeight,ze=Ee.scrollWidth,He=Ee.scrollHeight,$e=Ee.scrollTop,Ie=Ee.scrollLeft,Ne=we.height,Ve=we.width,Ge=re.height,Qe=re.width,tt={left:0,top:0,right:Be,bottom:je},Je={left:-Ie,top:-$e,right:ze-Ie,bottom:He-$e},et=P.htmlRegion,ot="visible",dt="visibleFirst";et!=="scroll"&&et!==dt&&(et=ot);var ut=et===dt,ft=G(Je,U),qe=G(tt,U),_t=et===ot?qe:ft,st=ut?qe:_t;V.style.left="auto",V.style.top="auto",V.style.right="0",V.style.bottom="0";var Lt=V.getBoundingClientRect();V.style.left=ve,V.style.top=Re,V.style.right=w,V.style.bottom=ie,V.style.overflow=te,(Q=V.parentElement)===null||Q===void 0||Q.removeChild(j);var vt=W(Math.round(Ve/parseFloat(N)*1e3)/1e3),mt=W(Math.round(Ne/parseFloat(le)*1e3)/1e3);if(vt===0||mt===0||(0,r.Sh)(se)&&!(0,q.Z)(se))return;var Ft=P.offset,lt=P.targetOffset,cr=xe(we,Ft),jt=(0,p.Z)(cr,2),xt=jt[0],yt=jt[1],St=xe(re,lt),ur=(0,p.Z)(St,2),fr=ur[0],Lr=ur[1];re.x-=fr,re.y-=Lr;var $t=P.points||[],pt=(0,p.Z)($t,2),Tt=pt[0],Fr=pt[1],Et=Le(Fr),gt=Le(Tt),hr=ke(re,Et),er=ke(we,gt),Dt=(0,_.Z)({},P),nt=hr.x-er.x+xt,Ye=hr.y-er.y+yt,Ct=bt(nt,Ye),wt=bt(nt,Ye,qe),Xt=ke(re,["t","l"]),tr=ke(we,["t","l"]),rr=ke(re,["b","r"]),ir=ke(we,["b","r"]),ht=P.overflow||{},Tr=ht.adjustX,dr=ht.adjustY,Zt=ht.shiftX,nr=ht.shiftY,_r=function(zt){return typeof zt=="boolean"?zt:zt>=0},Ot,Mt,Pt,Qt;Er();var or=_r(dr),sr=gt[0]===Et[0];if(or&&gt[0]==="t"&&(Mt>st.bottom||T.current.bt)){var Kt=Ye;sr?Kt-=Ne-Ge:Kt=Xt.y-ir.y-yt;var Bt=bt(nt,Kt),Dr=bt(nt,Kt,qe);Bt>Ct||Bt===Ct&&(!ut||Dr>=wt)?(T.current.bt=!0,Ye=Kt,yt=-yt,Dt.points=[ae(gt,0),ae(Et,0)]):T.current.bt=!1}if(or&&gt[0]==="b"&&(Ot<st.top||T.current.tb)){var ct=Ye;sr?ct+=Ne-Ge:ct=rr.y-tr.y-yt;var vr=bt(nt,ct),Or=bt(nt,ct,qe);vr>Ct||vr===Ct&&(!ut||Or>=wt)?(T.current.tb=!0,Ye=ct,yt=-yt,Dt.points=[ae(gt,0),ae(Et,0)]):T.current.tb=!1}var pr=_r(Tr),gr=gt[1]===Et[1];if(pr&&gt[1]==="l"&&(Qt>st.right||T.current.rl)){var Ht=nt;gr?Ht-=Ve-Qe:Ht=Xt.x-ir.x-xt;var mr=bt(Ht,Ye),Mr=bt(Ht,Ye,qe);mr>Ct||mr===Ct&&(!ut||Mr>=wt)?(T.current.rl=!0,nt=Ht,xt=-xt,Dt.points=[ae(gt,1),ae(Et,1)]):T.current.rl=!1}if(pr&&gt[1]==="r"&&(Pt<st.left||T.current.lr)){var Nt=nt;gr?Nt+=Ve-Qe:Nt=rr.x-tr.x-xt;var yr=bt(Nt,Ye),Vt=bt(Nt,Ye,qe);yr>Ct||yr===Ct&&(!ut||Vt>=wt)?(T.current.lr=!0,nt=Nt,xt=-xt,Dt.points=[ae(gt,1),ae(Et,1)]):T.current.lr=!1}Er();var kt=Zt===!0?0:Zt;typeof kt=="number"&&(Pt<qe.left&&(nt-=Pt-qe.left-xt,re.x+Qe<qe.left+kt&&(nt+=re.x-qe.left+Qe-kt)),Qt>qe.right&&(nt-=Qt-qe.right-xt,re.x>qe.right-kt&&(nt+=re.x-qe.right+kt)));var Ut=nr===!0?0:nr;typeof Ut=="number"&&(Ot<qe.top&&(Ye-=Ot-qe.top-yt,re.y+Ge<qe.top+Ut&&(Ye+=re.y-qe.top+Ge-Ut)),Mt>qe.bottom&&(Ye-=Mt-qe.bottom-yt,re.y>qe.bottom-Ut&&(Ye+=re.y-qe.bottom+Ut)));var Gt=we.x+nt,qt=Gt+Ve,Rt=we.y+Ye,br=Rt+Ne,Wt=re.x,It=Wt+Qe,xr=re.y,Pr=xr+Ge,Ir=Math.max(Gt,Wt),Sr=Math.min(qt,It),Xr=(Ir+Sr)/2,Kr=Xr-Gt,Br=Math.max(Rt,xr),Cr=Math.min(br,Pr),Hr=(Br+Cr)/2,Nr=Hr-Rt;be==null||be(me,Dt);var wr=Lt.right-we.x-(nt+we.width),Ur=Lt.bottom-we.y-(Ye+we.height);ee({ready:!0,offsetX:nt/vt,offsetY:Ye/mt,offsetR:wr/vt,offsetB:Ur/mt,arrowX:Kr/vt,arrowY:Nr/mt,scaleX:vt,scaleY:mt,align:Dt})}}),Ce=function(){L.current+=1;var Q=L.current;Promise.resolve().then(function(){L.current===Q&&pe()})},Z=function(){ee(function(Q){return(0,_.Z)((0,_.Z)({},Q),{},{ready:!1})})};return(0,f.Z)(Z,[J]),(0,f.Z)(function(){oe||Z()},[oe]),[ue.ready,ue.offsetX,ue.offsetY,ue.offsetR,ue.offsetB,ue.arrowX,ue.arrowY,ue.scaleX,ue.scaleY,ue.align,Ce]}var Fe=s(19127);function Te(oe,me,se,J,ne){(0,f.Z)(function(){if(oe&&me&&se){let L=function(){J(),ne()};var Se=me,be=se,_e=I(Se),ce=I(be),ue=X(be),ee=new Set([ue].concat((0,Fe.Z)(_e),(0,Fe.Z)(ce)));return ee.forEach(function(U){U.addEventListener("scroll",L,{passive:!0})}),ue.addEventListener("resize",L,{passive:!0}),J(),function(){ee.forEach(function(U){U.removeEventListener("scroll",L),ue.removeEventListener("resize",L)})}}},[oe,me,se])}var Oe=s(48736),Pe=s(16089);function De(oe,me,se,J,ne,Se,be,_e){var ce=i.useRef(oe),ue=i.useRef(!1);ce.current!==oe&&(ue.current=!0,ce.current=oe),i.useEffect(function(){var ee=(0,Pe.Z)(function(){ue.current=!1});return function(){Pe.Z.cancel(ee)}},[oe]),i.useEffect(function(){if(me&&J&&(!ne||Se)){var ee=function(){var M=!1,ve=function(ie){var te=ie.target;M=be(te)},Re=function(ie){var te=ie.target;!ue.current&&ce.current&&!M&&!be(te)&&_e(!1)};return[ve,Re]},L=ee(),U=(0,p.Z)(L,2),T=U[0],Y=U[1],pe=ee(),Ce=(0,p.Z)(pe,2),Z=Ce[0],A=Ce[1],Q=X(J);Q.addEventListener("mousedown",T,!0),Q.addEventListener("click",Y,!0),Q.addEventListener("contextmenu",Y,!0);var V=(0,n.A)(se);if(V&&(V.addEventListener("mousedown",Z,!0),V.addEventListener("click",A,!0),V.addEventListener("contextmenu",A,!0)),0)var he,ye,de,N;return function(){Q.removeEventListener("mousedown",T,!0),Q.removeEventListener("click",Y,!0),Q.removeEventListener("contextmenu",Y,!0),V&&(V.removeEventListener("mousedown",Z,!0),V.removeEventListener("click",A,!0),V.removeEventListener("contextmenu",A,!0))}}},[me,se,J,ne,Se])}var Xe=["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 Ke(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d.Z,me=i.forwardRef(function(se,J){var ne=se.prefixCls,Se=ne===void 0?"rc-trigger-popup":ne,be=se.children,_e=se.action,ce=_e===void 0?"hover":_e,ue=se.showAction,ee=se.hideAction,L=se.popupVisible,U=se.defaultPopupVisible,T=se.onPopupVisibleChange,Y=se.afterPopupVisibleChange,pe=se.mouseEnterDelay,Ce=se.mouseLeaveDelay,Z=Ce===void 0?.1:Ce,A=se.focusDelay,Q=se.blurDelay,V=se.mask,he=se.maskClosable,ye=he===void 0?!0:he,de=se.getPopupContainer,N=se.forceRender,le=se.autoDestroy,M=se.destroyPopupOnHide,ve=se.popup,Re=se.popupClassName,w=se.popupStyle,ie=se.popupPlacement,te=se.builtinPlacements,P=te===void 0?{}:te,j=se.popupAlign,re=se.zIndex,Ae=se.stretch,we=se.getPopupClassNameFromAlign,Ee=se.fresh,Be=se.alignPoint,je=se.onPopupClick,ze=se.onPopupAlign,He=se.arrow,$e=se.popupMotion,Ie=se.maskMotion,Ne=se.popupTransitionName,Ve=se.popupAnimation,Ge=se.maskTransitionName,Qe=se.maskAnimation,tt=se.className,Je=se.getTriggerDOMNode,et=(0,b.Z)(se,Xe),ot=le||M||!1,dt=i.useState(!1),ut=(0,p.Z)(dt,2),ft=ut[0],qe=ut[1];(0,f.Z)(function(){qe((0,e.Z)())},[]);var _t=i.useRef({}),st=i.useContext(F),Lt=i.useMemo(function(){return{registerSubPopup:function(Ze,rt){_t.current[Ze]=rt,st==null||st.registerSubPopup(Ze,rt)}}},[st]),vt=(0,t.Z)(),mt=i.useState(null),Ft=(0,p.Z)(mt,2),lt=Ft[0],cr=Ft[1],jt=(0,a.Z)(function(We){(0,r.Sh)(We)&&lt!==We&&cr(We),st==null||st.registerSubPopup(vt,We)}),xt=i.useState(null),yt=(0,p.Z)(xt,2),St=yt[0],ur=yt[1],fr=i.useRef(null),Lr=(0,a.Z)(function(We){(0,r.Sh)(We)&&St!==We&&(ur(We),fr.current=We)}),$t=i.Children.only(be),pt=($t==null?void 0:$t.props)||{},Tt={},Fr=(0,a.Z)(function(We){var Ze,rt,at=St;return(at==null?void 0:at.contains(We))||((Ze=(0,n.A)(at))===null||Ze===void 0?void 0:Ze.host)===We||We===at||(lt==null?void 0:lt.contains(We))||((rt=(0,n.A)(lt))===null||rt===void 0?void 0:rt.host)===We||We===lt||Object.values(_t.current).some(function(it){return(it==null?void 0:it.contains(We))||We===it})}),Et=R(Se,$e,Ve,Ne),gt=R(Se,Ie,Qe,Ge),hr=i.useState(U||!1),er=(0,p.Z)(hr,2),Dt=er[0],nt=er[1],Ye=L!=null?L:Dt,Ct=(0,a.Z)(function(We){L===void 0&&nt(We)});(0,f.Z)(function(){nt(L||!1)},[L]);var wt=i.useRef(Ye);wt.current=Ye;var Xt=i.useRef([]);Xt.current=[];var tr=(0,a.Z)(function(We){var Ze;Ct(We),((Ze=Xt.current[Xt.current.length-1])!==null&&Ze!==void 0?Ze:Ye)!==We&&(Xt.current.push(We),T==null||T(We))}),rr=i.useRef(),ir=function(){clearTimeout(rr.current)},ht=function(Ze){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ir(),rt===0?tr(Ze):rr.current=setTimeout(function(){tr(Ze)},rt*1e3)};i.useEffect(function(){return ir},[]);var Tr=i.useState(!1),dr=(0,p.Z)(Tr,2),Zt=dr[0],nr=dr[1];(0,f.Z)(function(We){(!We||Ye)&&nr(!0)},[Ye]);var _r=i.useState(null),Ot=(0,p.Z)(_r,2),Mt=Ot[0],Pt=Ot[1],Qt=i.useState([0,0]),or=(0,p.Z)(Qt,2),sr=or[0],Kt=or[1],Bt=function(Ze){Kt([Ze.clientX,Ze.clientY])},Dr=ge(Ye,lt,Be?sr:St,ie,P,j,ze),ct=(0,p.Z)(Dr,11),vr=ct[0],Or=ct[1],pr=ct[2],gr=ct[3],Ht=ct[4],mr=ct[5],Mr=ct[6],Nt=ct[7],yr=ct[8],Vt=ct[9],kt=ct[10],Ut=H(ft,ce,ue,ee),Gt=(0,p.Z)(Ut,2),qt=Gt[0],Rt=Gt[1],br=qt.has("click"),Wt=Rt.has("click")||Rt.has("contextMenu"),It=(0,a.Z)(function(){Zt||kt()}),xr=function(){wt.current&&Be&&Wt&&ht(!1)};Te(Ye,St,lt,It,xr),(0,f.Z)(function(){It()},[sr,ie]),(0,f.Z)(function(){Ye&&!(P!=null&&P[ie])&&It()},[JSON.stringify(j)]);var Pr=i.useMemo(function(){var We=$(P,Se,Vt,Be);return u()(We,we==null?void 0:we(Vt))},[Vt,we,P,Se,Be]);i.useImperativeHandle(J,function(){return{nativeElement:fr.current,forceAlign:It}});var Ir=i.useState(0),Sr=(0,p.Z)(Ir,2),Xr=Sr[0],Kr=Sr[1],Br=i.useState(0),Cr=(0,p.Z)(Br,2),Hr=Cr[0],Nr=Cr[1],wr=function(){if(Ae&&St){var Ze=St.getBoundingClientRect();Kr(Ze.width),Nr(Ze.height)}},Ur=function(){wr(),It()},bt=function(Ze){nr(!1),kt(),Y==null||Y(Ze)},Er=function(){return new Promise(function(Ze){wr(),Pt(function(){return Ze})})};(0,f.Z)(function(){Mt&&(kt(),Mt(),Pt(null))},[Mt]);function At(We,Ze,rt,at){Tt[We]=function(it){var Rr;at==null||at(it),ht(Ze,rt);for(var Zr=arguments.length,Qr=new Array(Zr>1?Zr-1:0),Ar=1;Ar<Zr;Ar++)Qr[Ar-1]=arguments[Ar];(Rr=pt[We])===null||Rr===void 0||Rr.call.apply(Rr,[pt,it].concat(Qr))}}(br||Wt)&&(Tt.onClick=function(We){var Ze;wt.current&&Wt?ht(!1):!wt.current&&br&&(Bt(We),ht(!0));for(var rt=arguments.length,at=new Array(rt>1?rt-1:0),it=1;it<rt;it++)at[it-1]=arguments[it];(Ze=pt.onClick)===null||Ze===void 0||Ze.call.apply(Ze,[pt,We].concat(at))}),De(Ye,Wt,St,lt,V,ye,Fr,ht);var zt=qt.has("hover"),Yt=Rt.has("hover"),Jt,ar;zt&&(At("onMouseEnter",!0,pe,function(We){Bt(We)}),At("onPointerEnter",!0,pe,function(We){Bt(We)}),Jt=function(Ze){(Ye||Zt)&&lt!==null&&lt!==void 0&&lt.contains(Ze.target)&&ht(!0,pe)},Be&&(Tt.onMouseMove=function(We){var Ze;(Ze=pt.onMouseMove)===null||Ze===void 0||Ze.call(pt,We)})),Yt&&(At("onMouseLeave",!1,Z),At("onPointerLeave",!1,Z),ar=function(){ht(!1,Z)}),qt.has("focus")&&At("onFocus",!0,A),Rt.has("focus")&&At("onBlur",!1,Q),qt.has("contextMenu")&&(Tt.onContextMenu=function(We){var Ze;wt.current&&Rt.has("contextMenu")?ht(!1):(Bt(We),ht(!0)),We.preventDefault();for(var rt=arguments.length,at=new Array(rt>1?rt-1:0),it=1;it<rt;it++)at[it-1]=arguments[it];(Ze=pt.onContextMenu)===null||Ze===void 0||Ze.call.apply(Ze,[pt,We].concat(at))}),tt&&(Tt.className=u()(pt.className,tt));var lr=(0,_.Z)((0,_.Z)({},pt),Tt),kr={},Wr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Wr.forEach(function(We){et[We]&&(kr[We]=function(){for(var Ze,rt=arguments.length,at=new Array(rt),it=0;it<rt;it++)at[it]=arguments[it];(Ze=lr[We])===null||Ze===void 0||Ze.call.apply(Ze,[lr].concat(at)),et[We].apply(et,at)})});var zr=i.cloneElement($t,(0,_.Z)((0,_.Z)({},lr),kr)),jr={x:mr,y:Mr},$r=He?(0,_.Z)({},He!==!0?He:{}):null;return i.createElement(i.Fragment,null,i.createElement(h.Z,{disabled:!Ye,ref:Lr,onResize:Ur},i.createElement(k,{getTriggerDOMNode:Je},zr)),i.createElement(F.Provider,{value:Lt},i.createElement(m,{portal:oe,ref:jt,prefixCls:Se,popup:ve,className:u()(Re,Pr),style:w,target:St,onMouseEnter:Jt,onMouseLeave:ar,onPointerEnter:Jt,zIndex:re,open:Ye,keepDom:Zt,fresh:Ee,onClick:je,mask:V,motion:Et,maskMotion:gt,onVisibleChanged:bt,onPrepare:Er,forceRender:N,autoDestroy:ot,getPopupContainer:de,align:Vt,arrow:$r,arrowPos:jr,ready:vr,offsetX:Or,offsetY:pr,offsetR:gr,offsetB:Ht,onAlign:It,stretch:Ae,targetWidth:Xr/Nt,targetHeight:Hr/yr})))});return me}var Ue=Ke(d.Z)},83471:function(){"use strict"},38674:function(){"use strict"},36045:function(Me,D,s){"use strict";s.d(D,{G0:function(){return se},JW:function(){return Le},Jd:function(){return I},Kl:function(){return ke},L5:function(){return l},MH:function(){return fe},MI:function(){return De},Qo:function(){return m},SO:function(){return i},Tf:function(){return g},VT:function(){return K},XO:function(){return f},Xy:function(){return E},Y0:function(){return z},Ye:function(){return oe},Yv:function(){return Pe},ZH:function(){return Fe},am:function(){return X},bD:function(){return Xe},eA:function(){return C},fA:function(){return ge},fY:function(){return k},g6:function(){return e},g7:function(){return Ke},gT:function(){return O},gn:function(){return Te},h$:function(){return Oe},hG:function(){return x},i8:function(){return ae},j3:function(){return xe},lH:function(){return B},li:function(){return c},n4:function(){return v},pU:function(){return H},qK:function(){return y},sA:function(){return q},sP:function(){return G},t$:function(){return W},wj:function(){return me},zl:function(){return S}});var _=s(99064),p=s(955),b=Object.defineProperty,d=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,h=(J,ne,Se)=>ne in J?b(J,ne,{enumerable:!0,configurable:!0,writable:!0,value:Se}):J[ne]=Se,r=(J,ne)=>{for(var Se in ne||(ne={}))o.call(ne,Se)&&h(J,Se,ne[Se]);if(d)for(var Se of d(ne))u.call(ne,Se)&&h(J,Se,ne[Se]);return J},n=(J,ne,Se)=>new Promise((be,_e)=>{var ce=L=>{try{ee(Se.next(L))}catch(U){_e(U)}},ue=L=>{try{ee(Se.throw(L))}catch(U){_e(U)}},ee=L=>L.done?be(L.value):Promise.resolve(L.value).then(ce,ue);ee((Se=Se.apply(J,ne)).next())});const a=(0,p.oP)(),t={};a!=null&&a.homework_common_id&&(t.homework_common_id=a==null?void 0:a.homework_common_id),a!=null&&a.exercisesId&&(t.exercise_id=a==null?void 0:a.exercisesId),console.log(a,t,"urlParamsAll");function f(J,ne){return(0,_.U2)(`tasks/${J}.json`,r(r({},ne),t))}function e(J,ne={}){return(0,_.U2)(`myshixuns/${J}/challenges.json`,r({},ne))}function i(J,ne){return(0,_.U2)(`myshixuns/${J}/subject_challenges.json`,ne)}function l(J,ne,Se){return(0,_.U2)(`tasks/${J}/star.json`,{shixun_id:ne,star:Se})}function c(J,ne){return ne.path&&(ne.path=encodeURIComponent(ne.path)),(0,_.U2)(`tasks/${J}/rep_content.json`,r(r({},ne),t))}function v(J,ne){return(0,_.v_)(`myshixuns/${J}/update_file.json`,r(r({},ne),t))}function y(J,ne){return(0,_.U2)(`tasks/${J}/reset_original_code.json`,r(r({},ne),t))}function g(J,ne){return(0,_.v_)(`myshixuns/${J}/reset_repository.json`,ne)}function x(J,ne){return(0,_.U2)(`tasks/${J}/reset_passed_code.json`,r(r({},ne),t))}function E(J,ne){return(0,_.v_)(`tasks/${J}/game_build.json`,r(r({},ne),t))}function C(J){return(0,_.ZP)("http://localhost:49352/api/game_build",{method:"post",body:J})}function m(J,ne){return(0,_.U2)(`tasks/${J}/game_status.json`,r(r({},ne),t))}function S(J,ne){return(0,_.v_)(`tasks/${J}/choose_build.json`,r(r({},ne),t))}function k(J){return(0,_.U2)(`myshixuns/${J}/get_remaining_time.json`)}function O(J){return(0,_.U2)(`tasks/${J}/picture_display.json`,t)}function F(J,ne){return get(`courses/${J}/inform_detail.json`,ne)}function z(J){return(0,_.v_)(`tasks/${J}/plus_or_cancel_praise.json`)}function H(J,ne={}){return(0,_.v_)(`myshixuns/${J}/repository.json`,ne)}function q(J,ne={}){return(0,_.U2)(`myshixuns/${J}/start.json`,ne)}function K(J,ne={}){return(0,_.v_)(`myshixuns/${J}/force_delete_pod.json`,ne)}function $(J,ne={}){return get(`myshixuns/${J}/set_tpisession.json`,ne)}function R(J){return get(`myshixuns/${J}/reset_pod.json`)}function X(J,ne){return(0,_.U2)(`myshixuns/${J}/reset_pod.json`,ne)}function I(J,ne){return(0,_.ZP)(`/api/tasks/${J}/reboot_esc.json`,{method:"post",body:ne})}function W(J){return(0,_.U2)(`tasks/${J}/check_test_sets.json`)}function B(J){return(0,_.U2)(`tasks/${J}/get_answer_info.json`)}function G(J){return(0,_.U2)(`tasks/${J}/get_choose_answer.json`)}function fe(J){return(0,_.U2)(`tasks/${J}/unlock_choose_answer.json`)}function xe(J,ne){return(0,_.U2)(`tasks/${J}/unlock_answer.json`,{answer_id:ne})}function Le(J,ne,Se,be){return(0,_.v_)(`tasks/${J}/set_games_status.json`,r({result:ne,data:Se},be||{}))}function ke(J,ne){return(0,_.U2)(`myshixuns/${J}/active_pod.json`,ne)}function ae(J,ne){return(0,_.U2)(`tasks/${J}/rank_list.json`,ne)}function ge(J,ne){return(0,_.v_)(`tasks/${J}/close_windows_vnc.json`,{tpi_id:ne})}function Fe(J,ne){return(0,_.U2)(`tasks/${J}/commit_files.json`,ne)}function Te(J,ne){return(0,_.U2)(`tasks/${J}/pull_files.json`,ne)}function Oe(J,ne){return(0,_.v_)(`tasks/${J}/log_output`,ne)}function Pe(J,ne){return(0,_.U2)(`tasks/${J}/stop_log_output.json`,ne)}function De(J){return n(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${J.id}/add_file.json`,{method:"post",body:J})})}function Xe(J){return n(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${J.id}/delete_git_file.json`,{method:"Delete",body:J})})}function Ke(J){return n(this,null,function*(){return(0,_.ZP)(`/api/myshixuns/${J.id}/mv_file.json`,{method:"post",body:J})})}function Ue(J){return n(this,null,function*(){return J.path&&(J.path=encodeURIComponent(J.path)),Fetch(`/api/tasks/${J.id}/rep_content.json`,{method:"get",params:J})})}function oe(J,ne){return(0,_.ZP)(`/api/shixuns/${J}/set_start_permanent.json`,{method:"put",body:ne})}function me(J){return n(this,null,function*(){return(0,_.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:J})})}function se(J){return n(this,null,function*(){return(0,_.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:J})})}},33538:function(Me,D,s){"use strict";s.d(D,{Z:function(){return d}});var _=s(89070),p={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},b=s(59301),d=({message:o,className:u,children:h,style:r={}})=>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)),o?b.createElement("p",{style:r},o):null,h,b.createElement(_.Outlet,null))},79346:function(Me,D,s){"use strict";s.d(D,{Z:function(){return b}});var _=s(59301),p=s(4676);class b extends _.Component{constructor(o){super(o);const u=window.document;this.node=u.createElement("div"),u.body.appendChild(this.node)}render(){const{children:o}=this.props;return(0,p.createPortal)(o,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},43254:function(Me,D,s){"use strict";s.r(D);var _=s(59301),p=s(89070),b=s(28787),d=s(82821),o=s(38674),u=s(34604),h=s(99064),r=s(59301),n=Object.defineProperty,a=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,e=(v,y,g)=>y in v?n(v,y,{enumerable:!0,configurable:!0,writable:!0,value:g}):v[y]=g,i=(v,y)=>{for(var g in y||(y={}))t.call(y,g)&&e(v,g,y[g]);if(a)for(var g of a(y))f.call(y,g)&&e(v,g,y[g]);return v},l=(v,y,g)=>new Promise((x,E)=>{var C=k=>{try{S(g.next(k))}catch(O){E(O)}},m=k=>{try{S(g.throw(k))}catch(O){E(O)}},S=k=>k.done?x(k.value):Promise.resolve(k.value).then(C,m);S((g=g.apply(v,y)).next())});const c=({classroomList:v,globalSetting:y,loading:g,dispatch:x})=>{var E;const[C,m]=(0,_.useState)({}),[S,k]=(0,_.useState)({}),O=(0,p.useParams)(),[F]=(0,p.useSearchParams)();let z="68yrbx3ech4a";switch(F.get("type")){case"windows":z="hvp5tzfof4wl";break;case"vnc":z="m3ifqz82epo9";break}let H;(0,_.useEffect)(()=>{q()},[]),(0,_.useEffect)(()=>{C.host&&setTimeout(()=>{u.Z.publish("create-socket",1)},500)},[C]);const q=()=>l(void 0,null,function*(){var K,$;const R=yield(0,h.ZP)(`/api/tasks/${F.get("taskId")||z||"68yrbx3ech4a"}.json`,{method:"get"});if(k(i({},R)),F.get("type")==="terminal"){const X=yield(0,h.ZP)(`/api/myshixuns/${(K=R==null?void 0:R.myshixun)==null?void 0:K.identifier}/start.json`,{method:"get",game_id:($=R==null?void 0:R.game)==null?void 0:$.id});m(i({},(X==null?void 0:X.data)||{}))}F.get("type")});return r.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},F.get("type")==="terminal"&&r.createElement(b.Z,{sshConfigData:C,sid:1}),F.get("type")!=="terminal"&&(S==null?void 0:S.challenge)&&r.createElement(d.Z,{taskId:z,myshixunId:(E=S==null?void 0:S.myshixun)==null?void 0:E.identifier,vnc_url:F.get("type")==="vnc",window_vnc_url:F.get("type")==="windows",taskData:S}))};D.default=(0,p.connect)(({classroomList:v,loading:y,globalSetting:g})=>({classroomList:v,globalSetting:g,loading:y.models.classroomList}))(c)},82821:function(Me,D,s){"use strict";s.d(D,{Z:function(){return I}});var _=s(59301),p=s(43418),b=s(8591),d=s(93948),o=s(33538),u=s(76374),h=s(79346),r=s(89070),n=s(955),a=s(92832),t=s(3113);const f=a.default.TextArea;var e=({onCancel:W,onSave:B,content:G})=>{const[fe,xe]=(0,_.useState)(G);function Le(ae){xe(ae.target.value)}function ke(){B(fe)}return(0,_.useEffect)(()=>{xe(G)},[G]),_.createElement("div",{className:"clipboard-box"},_.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),_.createElement(f,{value:fe,onChange:Le,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:W,style:{marginRight:10}},"\u53D6\u6D88"),_.createElement(t.ZP,{type:"primary",onClick:ke},"\u4FDD\u5B58")))},i=s(4901),l=s(36045),c=s(62013),v=s(34604),y=s(99064),g=s(59301),x=Object.defineProperty,E=Object.defineProperties,C=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,O=(W,B,G)=>B in W?x(W,B,{enumerable:!0,configurable:!0,writable:!0,value:G}):W[B]=G,F=(W,B)=>{for(var G in B||(B={}))S.call(B,G)&&O(W,G,B[G]);if(m)for(var G of m(B))k.call(B,G)&&O(W,G,B[G]);return W},z=(W,B)=>E(W,C(B)),H=(W,B,G)=>new Promise((fe,xe)=>{var Le=ge=>{try{ae(G.next(ge))}catch(Fe){xe(Fe)}},ke=ge=>{try{ae(G.throw(ge))}catch(Fe){xe(Fe)}},ae=ge=>ge.done?fe(ge.value):Promise.resolve(ge.value).then(Le,ke);ae((G=G.apply(W,B)).next())});function q(W){return W.replace(/\\u([\dA-Za-z]{4})/g,function(B,G){return String.fromCharCode(parseInt("0x"+G))})}function K(W){W||(W=window.location.search);let B=W.substr(1),G={};return B.split("&").forEach(function(fe){let xe=fe.split("=");G[xe[0]]=decodeURIComponent(xe[1])}),G}const $={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var R=(W=>(W[W.SET_LOADING=0]="SET_LOADING",W[W.SET_IS_LARGE=1]="SET_IS_LARGE",W[W.SET_MES=2]="SET_MES",W[W.SET_STATE=3]="SET_STATE",W[W.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",W[W.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",W[W.UPDATE_ALL=6]="UPDATE_ALL",W))(R||{});function X(W,B){switch(B.type){case 0:return z(F({},W),{loading:B.payload});case 1:return F({},z(F({},W),{isLarge:B.payload}));case 2:return z(F({},W),{mes:B.payload});case 3:return F(F({},W),B.payload);case 5:return z(F({},W),{transferContent:B.payload});case 4:return z(F({},W),{showClipBoardBox:B.payload});case 6:return F({loading:W.loading},B.payload);default:throw new Error}}var I=({vnc_url:W,window_vnc_url:B,linux_vnc:G,virtual_machine:fe,taskData:xe,shixun_environment_id:Le,tab_type:ke,instance_startup_type:ae,index_tab:ge,tpi_type:Fe})=>{const Te=(0,_.useRef)(),Oe=(0,_.useRef)(),Pe=(0,_.useRef)(),De=(0,_.useRef)(),Xe=(0,_.useRef)(),Ke=(0,_.useRef)(),Ue=(0,_.useRef)(),oe=(0,_.useRef)(),[me,se]=(0,_.useReducer)(X,$),[J,ne]=(0,_.useState)(0),{mes:Se,loading:be,showClipBoardBox:_e,isLarge:ce,transferContent:ue}=me,ee=(0,_.useRef)(),L=(0,_.useRef)(),[U]=(0,r.useSearchParams)();let[T,Y]=(0,_.useState)(0),pe=(0,_.useRef)();const Ce=(0,r.useParams)();(0,_.useEffect)(()=>()=>{var te,P;(P=(te=Oe.current)==null?void 0:te.disconnect)==null||P.call(te),clearTimeout(oe.current),clearInterval(ee.current)},[]),(0,_.useEffect)(()=>{L.current=me.loading},[me.loading]);const Z=()=>{var te;ae===2?setTimeout(()=>{Re()},1500):((te=Pe==null?void 0:Pe.current)==null?void 0:te.resizeSession)!==void 0&&((0,i.vp)()?Pe.current.resizeSession=!0:setTimeout(()=>{},900))};(0,_.useEffect)(()=>(document.addEventListener((0,i.gH)(),Z),()=>{document.removeEventListener((0,i.gH)(),Z)}),[]);function A(){se({type:4,payload:!1})}function Q(){se({type:1,payload:!ce})}function V(te){return Te.current&&(De.current=new u.Z(P=>{var j;for(let re of P)ae===2&&Re(),(re.target.offsetHeight>0||re.target.offsetWidth>0)&&te&&(te.scaleViewport=!0,(j=te==null?void 0:te._eventHandlers)==null||j.windowResize())}),De.current.observe(Te.current)),De.current}const he=()=>H(void 0,null,function*(){var te,P,j,re,Ae,we,Ee;let Be={};U.get("type")==="exercises"?Be.exercise_id=U.get("exercisesId"):Ce.courseId&&Ce.homeworkId&&(Be.homework_common_id=Ce.homeworkId);const je=yield(0,l.sA)((te=xe.myshixun)==null?void 0:te.identifier,F(z(F({},Ce),{taskId:Ce.taskId,shixun_environment_id:Le,tab_type:ke}),Be));if((j=(P=je==null?void 0:je.data)==null?void 0:P.data_list)!=null&&j.length)return v.Z.publish("pod-restrict-data",{identifier:(re=je==null?void 0:je.data)==null?void 0:re.identifier,data_list:(Ae=je==null?void 0:je.data)==null?void 0:Ae.data_list}),Promise.reject();if((je==null?void 0:je.status)===-3)return new Promise((ze,He)=>H(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:()=>H(void 0,null,function*(){clearTimeout(pe.current),Y(0),yield(0,l.fA)(Ce.taskId,je==null?void 0:je.message),ne(J+1)})})}));if((je==null?void 0:je.status)===-1)throw new String(je==null?void 0:je.message);if((je==null?void 0:je.status)===0)return fe&&((0,n.d8)("PVEAuthCookie",(Ee=(we=je==null?void 0:je.data)==null?void 0:we.cookie_options)==null?void 0:Ee.cookies_value,1),(0,n.d8)("PVELangCookie","zh_CN",1)),v.Z.publish("update-windows-time",je==null?void 0:je.data),v.Z.publish("send-tabs-result-data",z(F({},je==null?void 0:je.data),{index_tab:ge})),je});function ye(){Y(100),clearTimeout(pe.current),setTimeout(()=>{se({type:0,payload:!1})},1300),clearTimeout(ee.current)}const de=()=>{Pe.current=new c.Z(Te.current,Ue.current,{credentials:{password:Ke.current},wsProtocols:["binary"],show_dot:!0}),Pe.current.removeEventListener("disconnect",le),Pe.current.removeEventListener("connect",ye),Pe.current.removeEventListener("clipboard",N),window.rfbs2=Pe.current,De.current=V(Pe.current),Pe.current.viewOnly=Ce.view_only||!1,Pe.current.scaleViewport=Ce.scale||!0,Pe.current.showDotCursor=!0,Pe.current.resizeSession=!0,Pe.current.addEventListener("disconnect",le),Pe.current.addEventListener("connect",ye),Pe.current.addEventListener("clipboard",N)};function N(te){const P=q(te.detail.text);se({type:5,payload:P})}function le(){if(B)se({type:0,payload:!0}),ne(J+1);else{if(clearTimeout(oe.current),L.current)return;oe.current=setTimeout(()=>{ne(J+1)},6e3)}setTimeout(()=>{var te,P;(P=(te=Pe.current)==null?void 0:te.connect)==null||P.call(te)},3e3)}(0,_.useEffect)(()=>{if(v.Z.subscribe(`reset-linux-windows-vnc-${ge}`,()=>{ne(J+1)}),(B||W||G||fe)&&Te.current){clearTimeout(pe.current),ae===2&&Re(),new Promise(()=>H(void 0,null,function*(){var re,Ae,we,Ee,Be;const je=K();let ze=yield he();if(G||fe){const He=(Ae=(re=ze==null?void 0:ze.data)==null?void 0:re.link_url)!=null&&Ae.includes("?")?"&":"?";Xe.current.src=((we=ze==null?void 0:ze.data)==null?void 0:we.link_url)+He+"time="+Date.now(),se({type:0,payload:!1});return}else if(B)Ke.current="Edu123",Ue.current=decodeURIComponent((Ee=ze==null?void 0:ze.data)==null?void 0:Ee.link_url);else{const He=new URL(decodeURIComponent((Be=ze==null?void 0:ze.data)==null?void 0:Be.link_url)),{protocol:$e,searchParams:Ie,host:Ne}=He;Ke.current=Ie.get("password"),Ue.current=`${$e==="https:"?"wss":"ws"}://${Ne}/${je.path||"websockify"}`}if(ae===2){setTimeout(()=>{var He,$e,Ie,Ne;V(),Xe.current.style.cssText=Xe.current.style.cssText+"width:1920px;height:1080px;position:initial",Xe.current.src=`/rdp.html?${(He=ze==null?void 0:ze.data)!=null&&He.gpPort?"gpPort="+(($e=ze==null?void 0:ze.data)==null?void 0:$e.gpPort)+"&password="+((Ie=ze==null?void 0:ze.data)==null?void 0:Ie.password)+"&":""}tpiId=${(Ne=xe==null?void 0:xe.myshixun)==null?void 0:Ne.id}&envId=${Le}&tpiType=${Fe}`,se({type:0,payload:!1})},5e3);return}de()}));const te=v.Z.subscribe(`vnc-reset-${ge}`,re=>{if(re==="\u53D6\u6D88"){se({type:0,payload:!1});return}Y(0),se({type:3,payload:{loading:!0,mes:re||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),P=v.Z.subscribe(`send-ctrl-alt-delete-${ge}`,()=>{var re;(re=Pe.current)==null||re.sendCtrlAltDel(),b.ZP.success("\u53D1\u9001\u6210\u529F")}),j=v.Z.subscribe(`show-clipboard-box-${ge}`,()=>{se({type:4,payload:!0})});return Y(0),()=>{var re,Ae,we,Ee;(re=Pe.current)==null||re.removeEventListener("disconnect",le),(Ae=Pe.current)==null||Ae.removeEventListener("connect",ye),(we=Pe.current)==null||we.removeEventListener("clipboard",N),te(),P(),j(),Te.current&&((Ee=De.current)==null||Ee.unobserve(Te.current))}}},[W,B,G,J,Le,ke]);function M(){var te,P;(P=(te=Pe.current)==null?void 0:te.sendKey)==null||P.call(te,135)}function ve(te){return H(this,null,function*(){var P;if(W){const j=te,re=yield(0,y.ZP)(`/api/tasks/${Ce.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(j),shixun_environment_id:Le}});(re==null?void 0:re.status)===0&&(se({type:5,payload:te}),b.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A())}else(P=Pe.current)==null||P.clipboardPasteFrom(te),se({type:5,payload:te}),b.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),A()})}function Re(){var te,P;te=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Xe.current.parentElement.className="wh1080p",Xe.current.parentElement.style.cssText=`transform:scale(${te});transform-origin:center center`,Te.current.style.cssText="translate(-50%, -50%) scale("+te+")"}(0,_.useEffect)(()=>{T==0&&(clearTimeout(pe.current),w())},[T]);const w=()=>{T>99?T=99:(T=T+1,pe.current=setTimeout(()=>{w()},1500)),T<100&&Y(T)},ie=(0,_.useMemo)(()=>be?"none":G||fe||B&&ae===2?"block":"none",[G,be,fe,B]);return g.createElement(_.Fragment,null,ce&&g.createElement("a",{className:"btn-vnc-resize",onClick:Q},g.createElement("i",{className:"iconfont icon-tuichuquanping"})),g.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:ie==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},g.createElement("div",null,g.createElement("iframe",{style:{position:ce?"fixed":"absolute",left:0,top:ce?40:0,width:"100%",height:`calc(100% - ${ce?"100px":"0px"})`},frameBorder:"0",ref:Xe,allowFullScreen:!0}))),g.createElement("div",{style:{position:ce?"fixed":"absolute",left:0,top:ce?40:0,zIndex:5,width:"100%",height:`calc(100% - ${ce?"100px":"0px"})`},className:`${B?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${ce?"full-screen":""}`},be?g.createElement(o.Z,{message:Se,style:{color:"#0152d9"}},g.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},g.createElement(d.Z,{percent:T,format:te=>g.createElement("span",{className:"c-white"},te,"%")}))):null,g.createElement("div",{ref:Te,className:`vnc-panel ${be?"hidden zIndexf1":"animated fadeIn"}`})),g.createElement(h.Z,null,g.createElement(p.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:_e,onCancel:A,footer:null},g.createElement(e,{onCancel:A,onSave:ve,content:ue}))))}},28787:function(Me,D,s){"use strict";s.d(D,{Z:function(){return S}});var _=s(59301),p=s(24334),b=s(34376),d=s(83471),o={"xterm-panel":"xterm-panel___XA0p9"},u=s(34604),h=s(76374),r=s(36045),n=s(89070),a=s(955),t=s(43418),f=s(59301),e=Object.defineProperty,i=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,g=(k,O,F)=>O in k?e(k,O,{enumerable:!0,configurable:!0,writable:!0,value:F}):k[O]=F,x=(k,O)=>{for(var F in O||(O={}))v.call(O,F)&&g(k,F,O[F]);if(c)for(var F of c(O))y.call(O,F)&&g(k,F,O[F]);return k},E=(k,O)=>i(k,l(O)),C=(k,O,F)=>new Promise((z,H)=>{var q=R=>{try{$(F.next(R))}catch(X){H(X)}},K=R=>{try{$(F.throw(R))}catch(X){H(X)}},$=R=>R.done?z(R.value):Promise.resolve(R.value).then(q,K);$((F=F.apply(k,O)).next())});const m=3e4;var S=({itemData:k={},game:O,myshixun:F})=>{const z=(0,n.useParams)(),[H,q]=(0,_.useState)(null),[K,$]=(0,_.useState)({}),{link_url:R,password:X,port:I}=K,W=(0,_.useRef)(),B=(0,_.useRef)(),G=(0,_.useRef)(!1),fe=(0,_.useRef)(!1),xe=(0,_.useRef)(!0),Le=(0,a.oP)(),[ke]=(0,n.useSearchParams)(),{shixun_environment_id:ae,position:ge,tab_type:Fe,index_tab:Te,command_string:Oe}=k;(0,_.useEffect)(()=>{Xe()},[]);function Pe(Ke,Ue,oe){let me=oe._core._renderService.dimensions.actualCellWidth||9.5,se=oe._core._renderService.dimensions.actualCellHeight||18;const J=Math.floor(Ue/se);return[Math.floor(Ke/me),J]}function De(Ke,Ue){const oe=new h.Z(me=>{for(let se of me)if(se.target.offsetHeight>0||se.target.offsetWidth>0){const[J,ne]=Pe(se.target.offsetWidth,se.target.offsetHeight,Ke);console.log("cols, rows",J,ne),u.Z.publish(`ssh-xterm-resize-${Te}`,{columns:J,rows:ne,width:se.target.offsetWidth,height:se.target.offsetHeight}),Ke.resize(J,ne);const Se=p.Base64.decode("IA=="),be=p.Base64.decode("CBtbSw==");Ke.write(Se),Ke.write(be)}});return oe.observe(Ue),oe}function Xe(){return C(this,null,function*(){var Ke,Ue,oe,me,se;let J={};ke.get("type")==="exercises"?J.exercise_id=ke.get("exercisesId"):z.courseId&&z.homeworkId&&(J.homework_common_id=z.homeworkId);const ne=yield(0,r.sA)(F==null?void 0:F.identifier,x(x({shixun_environment_id:ae,tab_type:Fe,game_id:O.id},Le),J));if((Ue=(Ke=ne==null?void 0:ne.data)==null?void 0:Ke.data_list)!=null&&Ue.length){u.Z.publish("pod-restrict-data",{identifier:(oe=ne==null?void 0:ne.data)==null?void 0:oe.identifier,data_list:(me=ne==null?void 0:ne.data)==null?void 0:me.data_list});return}if((ne==null?void 0:ne.status)===-3)return new Promise((Se,be)=>C(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:()=>C(this,null,function*(){yield closeWindowsVnc(z.taskId,ne==null?void 0:ne.message),init()})})}));if(((se=ne==null?void 0:ne.data)==null?void 0:se.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:f.createElement("div",{className:"mb10"},"\u7531\u4E8E\u4E0A\u6B21\u7684\u5B9E\u9A8C\u73AF\u5883\u672A\u6B63\u5E38\u5173\u95ED\uFF0C\u65E0\u6CD5\u518D\u5F00\u542F\u65B0\u7684\u5B9E\u9A8C\u73AF\u5883,",f.createElement("br",null),f.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,r.VT)(F==null?void 0:F.identifier,{shixun_environment_id:ae,tab_type:Fe,game_id:O.id}).then(Se=>{(Se==null?void 0:Se.status)==0&&Xe()})}});return}(ne==null?void 0:ne.status)===0&&(u.Z.publish("update-windows-time",ne==null?void 0:ne.data),u.Z.publish("send-tabs-result-data",E(x({},ne==null?void 0:ne.data),{index_tab:Te})),$(ne.data),setTimeout(()=>u.Z.publish(`create-socket-${Te}`),300))})}return(0,_.useEffect)(()=>{if(W.current&&R){const Ke=new b.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});Ke.open(W.current),Ke.onData(oe=>{B.current&&B.current.readyState===1&&B.current.send(JSON.stringify({tp:"client",data:oe}))}),Ke.write("Connecting..."),q(Ke);const Ue=De(Ke,W.current);return()=>{Ke.dispose(),W.current&&(Ue==null||Ue.unobserve(W.current))}}},[R,W.current]),(0,_.useEffect)(()=>{if(H&&R){let Ke=function(){const me=new WebSocket(R);B.current=me,me.onopen=()=>{let J=H.element.parentElement;if(J){let ne=J.offsetWidth,Se=J.offsetHeight;console.log("init",{tp:"init",data:E(x({},K),{secret:X,width:ne,height:Se,rows:H.rows,columns:H.cols})}),me.send(JSON.stringify({tp:"init",data:E(x({},K),{secret:X,width:ne,height:Se,rows:H.rows,columns:H.cols})}))}H.focus()},me.onerror=J=>{console.log("------in socket error----",J,me,R)},me.onmessage=J=>{fe.current=!1,G.current||(H.write("\r"),setTimeout(()=>{},1e3)),G.current=!0,console.log("event:",J);const ne=p.Base64.decode(J.data.toString());let Se=H._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",ne,Se,H),H.write(ne),Oe!=null&&Oe.length?xe.current&&(xe.current=!1,setTimeout(()=>{B.current.send(JSON.stringify({tp:"client",data:(Oe==null?void 0:Oe.join("\r"))+"\r"})),H.setOption("disableStdin",!1)},1e3)):(xe.current=!1,H.setOption("disableStdin",!1))};const se=setInterval(()=>{var J;B.current&&((J=B.current)==null||J.send(JSON.stringify({tp:"h"})))},m);me.onclose=J=>{se&&clearInterval(se),console.log(se,"tid",Te),fe.current||H.write(`\r
connection closed`),fe.current=!0,setTimeout(()=>{Ke()},1e4)}};const Ue=u.Z.subscribe(`create-socket-${Te}`,()=>{Ke()}),oe=u.Z.subscribe(`ssh-xterm-resize-${Te}`,me=>{B.current&&B.current.readyState===1&&B.current.send(JSON.stringify({tp:"resize",data:x({},me)}))});return()=>{Ue(),oe(),B.current&&(B.current.close(),G.current=!1)}}},[H,R,I]),f.createElement("div",{ref:W,className:o["xterm-panel"]},R?null:f.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},4901:function(Me,D,s){"use strict";s.d(D,{BU:function(){return p},Dj:function(){return _},gH:function(){return b},vp:function(){return d}});function _(o){try{o.mozRequestFullScreen?o.mozRequestFullScreen():o.webkitRequestFullScreen&&o.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 d(){var o=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,u=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",o),window.isFullScreen?window.isFullScreen:o!=null}},36785:function(Me,D,s){"use strict";s.d(D,{o2:function(){return o},yT:function(){return u}});var _=s(19127),p=s(33166);const b=p.i.map(h=>`${h}-inverse`),d=["success","processing","error","default","warning"];function o(h){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,_.Z)(b),(0,_.Z)(p.i)).includes(h):p.i.includes(h)}function u(h){return d.includes(h)}},79676:function(Me,D,s){"use strict";s.d(D,{Z:function(){return u}});var _=s(19447);function p(h,r,n,a){if(a===!1)return{adjustX:!1,adjustY:!1};const t=a&&typeof a=="object"?a:{},f={};switch(h){case"top":case"bottom":f.shiftX=r.dropdownArrowOffset*2+n;break;case"left":case"right":f.shiftY=r.dropdownArrowOffsetVertical*2+n;break}const e=Object.assign(Object.assign({},f),t);return e.shiftX||(e.adjustX=!0),e.shiftY||(e.adjustY=!0),e}const b={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},d={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},o=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function u(h){const{arrowWidth:r,autoAdjustOverflow:n,arrowPointAtCenter:a,offset:t,borderRadius:f,visibleFirst:e}=h,i=r/2,l={};return Object.keys(b).forEach(c=>{const v=a&&d[c]||b[c],y=Object.assign(Object.assign({},v),{offset:[0,0]});switch(l[c]=y,o.has(c)&&(y.autoArrow=!1),c){case"top":case"topLeft":case"topRight":y.offset[1]=-i-t;break;case"bottom":case"bottomLeft":case"bottomRight":y.offset[1]=i+t;break;case"left":case"leftTop":case"leftBottom":y.offset[0]=-i-t;break;case"right":case"rightTop":case"rightBottom":y.offset[0]=i+t;break}const g=(0,_.fS)({contentRadius:f,limitVerticalRadius:!0});if(a)switch(c){case"topLeft":case"bottomLeft":y.offset[0]=-g.dropdownArrowOffset-i;break;case"topRight":case"bottomRight":y.offset[0]=g.dropdownArrowOffset+i;break;case"leftTop":case"rightTop":y.offset[1]=-g.dropdownArrowOffset-i;break;case"leftBottom":case"rightBottom":y.offset[1]=g.dropdownArrowOffset+i;break}y.overflow=p(c,g,r,n),e&&(y.htmlRegion="visibleFirst")}),l}},19080:function(Me,D,s){"use strict";s.d(D,{F:function(){return o},Z:function(){return d}});var _=s(92310),p=s.n(_);const b=null;function d(u,h,r){return p()({[`${u}-status-success`]:h==="success",[`${u}-status-warning`]:h==="warning",[`${u}-status-error`]:h==="error",[`${u}-status-validating`]:h==="validating",[`${u}-has-feedback`]:r})}const o=(u,h)=>h||u},9432:function(Me,D,s){"use strict";s.d(D,{Z:function(){return g},n:function(){return v}});var _=s(19248),p=s(92310),b=s.n(p),d=s(93681),o=s(8654),u=s(59301),h=s(19080),r=s(36355),n=s(1684),a=s(19716),t=s(32441),f=s(33234),e=s(59412),i=s(9937);function l(x){return!!(x.prefix||x.suffix||x.allowClear)}var c=function(x,E){var C={};for(var m in x)Object.prototype.hasOwnProperty.call(x,m)&&E.indexOf(m)<0&&(C[m]=x[m]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var S=0,m=Object.getOwnPropertySymbols(x);S<m.length;S++)E.indexOf(m[S])<0&&Object.prototype.propertyIsEnumerable.call(x,m[S])&&(C[m[S]]=x[m[S]]);return C};function v(x,E){if(!x)return;x.focus(E);const{cursor:C}=E||{};if(C){const m=x.value.length;switch(C){case"start":x.setSelectionRange(0,0);break;case"end":x.setSelectionRange(m,m);break;default:x.setSelectionRange(0,m);break}}}var g=(0,u.forwardRef)((x,E)=>{var C;const{prefixCls:m,bordered:S=!0,status:k,size:O,disabled:F,onBlur:z,onFocus:H,suffix:q,allowClear:K,addonAfter:$,addonBefore:R,className:X,style:I,styles:W,rootClassName:B,onChange:G,classNames:fe}=x,xe=c(x,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Le,direction:ke,input:ae}=u.useContext(r.E_),ge=Le("input",m),Fe=(0,u.useRef)(null),[Te,Oe]=(0,i.ZP)(ge),{compactSize:Pe,compactItemClassnames:De}=(0,f.ri)(ge,ke),Xe=(0,a.Z)(U=>{var T;return(T=O!=null?O:Pe)!==null&&T!==void 0?T:U}),Ke=u.useContext(n.Z),Ue=F!=null?F:Ke,{status:oe,hasFeedback:me,feedbackIcon:se}=(0,u.useContext)(t.aM),J=(0,h.F)(oe,k),ne=l(x)||!!me,Se=(0,u.useRef)(ne);(0,u.useEffect)(()=>{var U;ne&&Se.current,Se.current=ne},[ne]);const be=(0,e.Z)(Fe,!0),_e=U=>{be(),z==null||z(U)},ce=U=>{be(),H==null||H(U)},ue=U=>{be(),G==null||G(U)},ee=(me||q)&&u.createElement(u.Fragment,null,q,me&&se);let L;return typeof K=="object"&&(K!=null&&K.clearIcon)?L=K:K&&(L={clearIcon:u.createElement(_.Z,null)}),Te(u.createElement(d.default,Object.assign({ref:(0,o.sQ)(E,Fe),prefixCls:ge,autoComplete:ae==null?void 0:ae.autoComplete},xe,{disabled:Ue,onBlur:_e,onFocus:ce,style:Object.assign(Object.assign({},ae==null?void 0:ae.style),I),styles:Object.assign(Object.assign({},ae==null?void 0:ae.styles),W),suffix:ee,allowClear:L,className:b()(X,B,De,ae==null?void 0:ae.className),onChange:ue,addonAfter:$&&u.createElement(f.BR,null,u.createElement(t.Ux,{override:!0,status:!0},$)),addonBefore:R&&u.createElement(f.BR,null,u.createElement(t.Ux,{override:!0,status:!0},R)),classNames:Object.assign(Object.assign(Object.assign({},fe),ae==null?void 0:ae.classNames),{input:b()({[`${ge}-sm`]:Xe==="small",[`${ge}-lg`]:Xe==="large",[`${ge}-rtl`]:ke==="rtl",[`${ge}-borderless`]:!S},!ne&&(0,h.Z)(ge,J),fe==null?void 0:fe.input,(C=ae==null?void 0:ae.classNames)===null||C===void 0?void 0:C.input,Oe)}),classes:{affixWrapper:b()({[`${ge}-affix-wrapper-sm`]:Xe==="small",[`${ge}-affix-wrapper-lg`]:Xe==="large",[`${ge}-affix-wrapper-rtl`]:ke==="rtl",[`${ge}-affix-wrapper-borderless`]:!S},(0,h.Z)(`${ge}-affix-wrapper`,J,me),Oe),wrapper:b()({[`${ge}-group-rtl`]:ke==="rtl"},Oe),group:b()({[`${ge}-group-wrapper-sm`]:Xe==="small",[`${ge}-group-wrapper-lg`]:Xe==="large",[`${ge}-group-wrapper-rtl`]:ke==="rtl",[`${ge}-group-wrapper-disabled`]:Ue},(0,h.Z)(`${ge}-group-wrapper`,J,me),Oe)}})))})},1643:function(Me,D,s){"use strict";var _=s(19248),p=s(92310),b=s.n(p),d=s(9296),o=s(59301),u=s(19080),h=s(36355),r=s(1684),n=s(19716),a=s(32441),t=s(9432),f=s(9937),e=function(l,c){var v={};for(var y in l)Object.prototype.hasOwnProperty.call(l,y)&&c.indexOf(y)<0&&(v[y]=l[y]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var g=0,y=Object.getOwnPropertySymbols(l);g<y.length;g++)c.indexOf(y[g])<0&&Object.prototype.propertyIsEnumerable.call(l,y[g])&&(v[y[g]]=l[y[g]]);return v};const i=(0,o.forwardRef)((l,c)=>{const{prefixCls:v,bordered:y=!0,size:g,disabled:x,status:E,allowClear:C,showCount:m,classNames:S,rootClassName:k,className:O}=l,F=e(l,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:z,direction:H}=o.useContext(h.E_),q=(0,n.Z)(g),K=o.useContext(r.Z),$=x!=null?x:K,{status:R,hasFeedback:X,feedbackIcon:I}=o.useContext(a.aM),W=(0,u.F)(R,E),B=o.useRef(null);o.useImperativeHandle(c,()=>{var ke;return{resizableTextArea:(ke=B.current)===null||ke===void 0?void 0:ke.resizableTextArea,focus:ae=>{var ge,Fe;(0,t.n)((Fe=(ge=B.current)===null||ge===void 0?void 0:ge.resizableTextArea)===null||Fe===void 0?void 0:Fe.textArea,ae)},blur:()=>{var ae;return(ae=B.current)===null||ae===void 0?void 0:ae.blur()}}});const G=z("input",v);let fe;typeof C=="object"&&(C!=null&&C.clearIcon)?fe=C:C&&(fe={clearIcon:o.createElement(_.Z,null)});const[xe,Le]=(0,f.ZP)(G);return xe(o.createElement(d.default,Object.assign({},F,{disabled:$,allowClear:fe,className:b()(O,k),classes:{affixWrapper:b()(`${G}-textarea-affix-wrapper`,{[`${G}-affix-wrapper-rtl`]:H==="rtl",[`${G}-affix-wrapper-borderless`]:!y,[`${G}-affix-wrapper-sm`]:q==="small",[`${G}-affix-wrapper-lg`]:q==="large",[`${G}-textarea-show-count`]:m},(0,u.Z)(`${G}-affix-wrapper`,W),Le)},classNames:Object.assign(Object.assign({},S),{textarea:b()({[`${G}-borderless`]:!y,[`${G}-sm`]:q==="small",[`${G}-lg`]:q==="large"},(0,u.Z)(G,W),Le,S==null?void 0:S.textarea)}),prefixCls:G,suffix:X&&o.createElement("span",{className:`${G}-textarea-suffix`},I),showCount:m,ref:B})))});D.Z=i},59412:function(Me,D,s){"use strict";s.d(D,{Z:function(){return p}});var _=s(59301);function p(b,d){const o=(0,_.useRef)([]),u=()=>{o.current.push(setTimeout(()=>{var h,r,n,a;!((h=b.current)===null||h===void 0)&&h.input&&((r=b.current)===null||r===void 0?void 0:r.input.getAttribute("type"))==="password"&&(!((n=b.current)===null||n===void 0)&&n.input.hasAttribute("value"))&&((a=b.current)===null||a===void 0||a.input.removeAttribute("value"))}))};return(0,_.useEffect)(()=>(d&&u(),()=>o.current.forEach(h=>{h&&clearTimeout(h)})),[]),u}},92832:function(Me,D,s){"use strict";s.d(D,{default:function(){return q}});var _=s(92310),p=s.n(_),b=s(59301),d=s(36355),o=s(32441),u=s(9937),r=K=>{const{getPrefixCls:$,direction:R}=(0,b.useContext)(d.E_),{prefixCls:X,className:I}=K,W=$("input-group",X),B=$("input"),[G,fe]=(0,u.ZP)(B),xe=p()(W,{[`${W}-lg`]:K.size==="large",[`${W}-sm`]:K.size==="small",[`${W}-compact`]:K.compact,[`${W}-rtl`]:R==="rtl"},fe,I),Le=(0,b.useContext)(o.aM),ke=(0,b.useMemo)(()=>Object.assign(Object.assign({},Le),{isFormItemInput:!1}),[Le]);return G(b.createElement("span",{className:xe,style:K.style,onMouseEnter:K.onMouseEnter,onMouseLeave:K.onMouseLeave,onFocus:K.onFocus,onBlur:K.onBlur},b.createElement(o.aM.Provider,{value:ke},K.children)))},n=s(9432),a=s(73331),t=s(15277),f=s(2738),e=s(8654),i=s(59412),l=function(K,$){var R={};for(var X in K)Object.prototype.hasOwnProperty.call(K,X)&&$.indexOf(X)<0&&(R[X]=K[X]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,X=Object.getOwnPropertySymbols(K);I<X.length;I++)$.indexOf(X[I])<0&&Object.prototype.propertyIsEnumerable.call(K,X[I])&&(R[X[I]]=K[X[I]]);return R};const c=K=>K?b.createElement(t.Z,null):b.createElement(a.Z,null),v={click:"onClick",hover:"onMouseOver"};var g=b.forwardRef((K,$)=>{const{visibilityToggle:R=!0}=K,X=typeof R=="object"&&R.visible!==void 0,[I,W]=(0,b.useState)(()=>X?R.visible:!1),B=(0,b.useRef)(null);b.useEffect(()=>{X&&W(R.visible)},[X,R]);const G=(0,i.Z)(B),fe=()=>{const{disabled:Ue}=K;Ue||(I&&G(),W(oe=>{var me;const se=!oe;return typeof R=="object"&&((me=R.onVisibleChange)===null||me===void 0||me.call(R,se)),se}))},xe=Ue=>{const{action:oe="click",iconRender:me=c}=K,se=v[oe]||"",J=me(I),ne={[se]:fe,className:`${Ue}-icon`,key:"passwordIcon",onMouseDown:Se=>{Se.preventDefault()},onMouseUp:Se=>{Se.preventDefault()}};return b.cloneElement(b.isValidElement(J)?J:b.createElement("span",null,J),ne)},{className:Le,prefixCls:ke,inputPrefixCls:ae,size:ge}=K,Fe=l(K,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Te}=b.useContext(d.E_),Oe=Te("input",ae),Pe=Te("input-password",ke),De=R&&xe(Pe),Xe=p()(Pe,Le,{[`${Pe}-${ge}`]:!!ge}),Ke=Object.assign(Object.assign({},(0,f.Z)(Fe,["suffix","iconRender","visibilityToggle"])),{type:I?"text":"password",className:Xe,prefixCls:Oe,suffix:De});return ge&&(Ke.size=ge),b.createElement(n.Z,Object.assign({ref:(0,e.sQ)($,B)},Ke))}),x=s(47472),E=s(92343),C=s(3113),m=s(19716),S=s(33234),k=function(K,$){var R={};for(var X in K)Object.prototype.hasOwnProperty.call(K,X)&&$.indexOf(X)<0&&(R[X]=K[X]);if(K!=null&&typeof Object.getOwnPropertySymbols=="function")for(var I=0,X=Object.getOwnPropertySymbols(K);I<X.length;I++)$.indexOf(X[I])<0&&Object.prototype.propertyIsEnumerable.call(K,X[I])&&(R[X[I]]=K[X[I]]);return R},F=b.forwardRef((K,$)=>{const{prefixCls:R,inputPrefixCls:X,className:I,size:W,suffix:B,enterButton:G=!1,addonAfter:fe,loading:xe,disabled:Le,onSearch:ke,onChange:ae,onCompositionStart:ge,onCompositionEnd:Fe}=K,Te=k(K,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Oe,direction:Pe}=b.useContext(d.E_),De=b.useRef(!1),Xe=Oe("input-search",R),Ke=Oe("input",X),{compactSize:Ue}=(0,S.ri)(Xe,Pe),oe=(0,m.Z)(Y=>{var pe;return(pe=W!=null?W:Ue)!==null&&pe!==void 0?pe:Y}),me=b.useRef(null),se=Y=>{Y&&Y.target&&Y.type==="click"&&ke&&ke(Y.target.value,Y,{source:"clear"}),ae&&ae(Y)},J=Y=>{var pe;document.activeElement===((pe=me.current)===null||pe===void 0?void 0:pe.input)&&Y.preventDefault()},ne=Y=>{var pe,Ce;ke&&ke((Ce=(pe=me.current)===null||pe===void 0?void 0:pe.input)===null||Ce===void 0?void 0:Ce.value,Y,{source:"input"})},Se=Y=>{De.current||xe||ne(Y)},be=typeof G=="boolean"?b.createElement(x.Z,null):null,_e=`${Xe}-button`;let ce;const ue=G||{},ee=ue.type&&ue.type.__ANT_BUTTON===!0;ee||ue.type==="button"?ce=(0,E.Tm)(ue,Object.assign({onMouseDown:J,onClick:Y=>{var pe,Ce;(Ce=(pe=ue==null?void 0:ue.props)===null||pe===void 0?void 0:pe.onClick)===null||Ce===void 0||Ce.call(pe,Y),ne(Y)},key:"enterButton"},ee?{className:_e,size:oe}:{})):ce=b.createElement(C.ZP,{className:_e,type:G?"primary":void 0,size:oe,disabled:Le,key:"enterButton",onMouseDown:J,onClick:ne,loading:xe,icon:be},G),fe&&(ce=[ce,(0,E.Tm)(fe,{key:"addonAfter"})]);const L=p()(Xe,{[`${Xe}-rtl`]:Pe==="rtl",[`${Xe}-${oe}`]:!!oe,[`${Xe}-with-button`]:!!G},I),U=Y=>{De.current=!0,ge==null||ge(Y)},T=Y=>{De.current=!1,Fe==null||Fe(Y)};return b.createElement(n.Z,Object.assign({ref:(0,e.sQ)(me,$),onPressEnter:Se},Te,{size:oe,onCompositionStart:U,onCompositionEnd:T,prefixCls:Ke,addonAfter:ce,suffix:B,onChange:se,className:L,disabled:Le}))}),z=s(1643);const H=n.Z;H.Group=r,H.Search=F,H.TextArea=z.Z,H.Password=g;var q=H},9937:function(Me,D,s){"use strict";s.d(D,{M1:function(){return h},TM:function(){return E},Xy:function(){return r},bi:function(){return t},e5:function(){return x},ik:function(){return f},nz:function(){return o},pU:function(){return u},s7:function(){return e},x0:function(){return a}});var _=s(17313),p=s(74207),b=s(37613),d=s(83116);const o=C=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:C,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),u=C=>({borderColor:C.hoverBorderColor}),h=C=>({borderColor:C.activeBorderColor,boxShadow:C.activeShadow,outline:0}),r=C=>({color:C.colorTextDisabled,backgroundColor:C.colorBgContainerDisabled,borderColor:C.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},u((0,b.TS)(C,{hoverBorderColor:C.colorBorder})))}),n=C=>{const{paddingBlockLG:m,fontSizeLG:S,lineHeightLG:k,borderRadiusLG:O,paddingInlineLG:F}=C;return{padding:`${m}px ${F}px`,fontSize:S,lineHeight:k,borderRadius:O}},a=C=>({padding:`${C.paddingBlockSM}px ${C.paddingInlineSM}px`,borderRadius:C.borderRadiusSM}),t=(C,m)=>{const{componentCls:S,colorError:k,colorWarning:O,errorActiveShadow:F,warningActiveShadow:z,colorErrorBorderHover:H,colorWarningBorderHover:q}=C;return{[`&-status-error:not(${m}-disabled):not(${m}-borderless)${m}`]:{borderColor:k,"&:hover":{borderColor:H},"&:focus, &-focused":Object.assign({},h((0,b.TS)(C,{activeBorderColor:k,activeShadow:F}))),[`${S}-prefix, ${S}-suffix`]:{color:k}},[`&-status-warning:not(${m}-disabled):not(${m}-borderless)${m}`]:{borderColor:O,"&:hover":{borderColor:q},"&:focus, &-focused":Object.assign({},h((0,b.TS)(C,{activeBorderColor:O,activeShadow:z}))),[`${S}-prefix, ${S}-suffix`]:{color:O}}}},f=C=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${C.paddingBlock}px ${C.paddingInline}px`,color:C.colorText,fontSize:C.fontSize,lineHeight:C.lineHeight,backgroundColor:C.colorBgContainer,backgroundImage:"none",borderWidth:C.lineWidth,borderStyle:C.lineType,borderColor:C.colorBorder,borderRadius:C.borderRadius,transition:`all ${C.motionDurationMid}`},o(C.colorTextPlaceholder)),{"&:hover":Object.assign({},u(C)),"&:focus, &-focused":Object.assign({},h(C)),"&-disabled, &[disabled]":Object.assign({},r(C)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:C.controlHeight,lineHeight:C.lineHeight,verticalAlign:"bottom",transition:`all ${C.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},n(C)),"&-sm":Object.assign({},a(C)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),e=C=>{const{componentCls:m,antCls:S}=C;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:C.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${m}, &-lg > ${m}-group-addon`]:Object.assign({},n(C)),[`&-sm ${m}, &-sm > ${m}-group-addon`]:Object.assign({},a(C)),[`&-lg ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightLG},[`&-sm ${S}-select-single ${S}-select-selector`]:{height:C.controlHeightSM},[`> ${m}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${m}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${C.paddingInline}px`,color:C.colorText,fontWeight:"normal",fontSize:C.fontSize,textAlign:"center",backgroundColor:C.colorFillAlter,border:`${C.lineWidth}px ${C.lineType} ${C.colorBorder}`,borderRadius:C.borderRadius,transition:`all ${C.motionDurationSlow}`,lineHeight:1,[`${S}-select`]:{margin:`-${C.paddingBlock+1}px -${C.paddingInline}px`,[`&${S}-select-single:not(${S}-select-customize-input)`]:{[`${S}-select-selector`]:{backgroundColor:"inherit",border:`${C.lineWidth}px ${C.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${S}-select-selector`]:{color:C.colorPrimary}}},[`${S}-cascader-picker`]:{margin:`-9px -${C.paddingInline}px`,backgroundColor:"transparent",[`${S}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${m}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${m}-search-with-button &`]:{zIndex:0}}},[`> ${m}:first-child, ${m}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${m}-affix-wrapper`]:{[`&:not(:first-child) ${m}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${m}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${m}:last-child, ${m}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${S}-select ${S}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${m}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${m}-search &`]:{borderStartStartRadius:C.borderRadius,borderEndStartRadius:C.borderRadius}},[`&:not(:first-child), ${m}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${m}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,_.dF)()),{[`${m}-group-addon, ${m}-group-wrap, > ${m}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:C.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
& > ${m}-affix-wrapper,
& > ${m}-number-affix-wrapper,
& > ${S}-picker-range
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-C.lineWidth,borderInlineEndWidth:C.lineWidth},[`${m}`]:{float:"none"},[`& > ${S}-select > ${S}-select-selector,
& > ${S}-select-auto-complete ${m},
& > ${S}-cascader-picker ${m},
& > ${m}-group-wrapper ${m}`]:{borderInlineEndWidth:C.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${S}-select-focused`]:{zIndex:1},[`& > ${S}-select > ${S}-select-arrow`]:{zIndex:1},[`& > *:first-child,
& > ${S}-select:first-child > ${S}-select-selector,
& > ${S}-select-auto-complete:first-child ${m},
& > ${S}-cascader-picker:first-child ${m}`]:{borderStartStartRadius:C.borderRadius,borderEndStartRadius:C.borderRadius},[`& > *:last-child,
& > ${S}-select:last-child > ${S}-select-selector,
& > ${S}-cascader-picker:last-child ${m},
& > ${S}-cascader-picker-focused:last-child ${m}`]:{borderInlineEndWidth:C.lineWidth,borderStartEndRadius:C.borderRadius,borderEndEndRadius:C.borderRadius},[`& > ${S}-select-auto-complete ${m}`]:{verticalAlign:"top"},[`${m}-group-wrapper + ${m}-group-wrapper`]:{marginInlineStart:-C.lineWidth,[`${m}-affix-wrapper`]:{borderRadius:0}},[`${m}-group-wrapper:not(:last-child)`]:{[`&${m}-search > ${m}-group`]:{[`& > ${m}-group-addon > ${m}-search-button`]:{borderRadius:0},[`& > ${m}`]:{borderStartStartRadius:C.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:C.borderRadius}}}})}},i=C=>{const{componentCls:m,controlHeightSM:S,lineWidth:k}=C,F=(S-k*2-16)/2;return{[m]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,_.Wf)(C)),f(C)),t(C,m)),{'&[type="color"]':{height:C.controlHeight,[`&${m}-lg`]:{height:C.controlHeightLG},[`&${m}-sm`]:{height:S,paddingTop:F,paddingBottom:F}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},l=C=>{const{componentCls:m}=C;return{[`${m}-clear-icon`]:{margin:0,color:C.colorTextQuaternary,fontSize:C.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${C.motionDurationSlow}`,"&:hover":{color:C.colorTextTertiary},"&:active":{color:C.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${C.inputAffixPadding}px`}}}},c=C=>{const{componentCls:m,inputAffixPadding:S,colorTextDescription:k,motionDurationSlow:O,colorIcon:F,colorIconHover:z,iconCls:H}=C;return{[`${m}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},f(C)),{display:"inline-flex",[`&:not(${m}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},u(C)),{zIndex:1,[`${m}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${m}[disabled]`]:{background:"transparent"}},[`> input${m}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${m}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:C.paddingXS}},"&-show-count-suffix":{color:k},"&-show-count-has-suffix":{marginInlineEnd:C.paddingXXS},"&-prefix":{marginInlineEnd:S},"&-suffix":{marginInlineStart:S}}}),l(C)),{[`${H}${m}-password-icon`]:{color:F,cursor:"pointer",transition:`all ${O}`,"&:hover":{color:z}}}),t(C,`${m}-affix-wrapper`))}},v=C=>{const{componentCls:m,colorError:S,colorWarning:k,borderRadiusLG:O,borderRadiusSM:F}=C;return{[`${m}-group`]:Object.assign(Object.assign(Object.assign({},(0,_.Wf)(C)),e(C)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${m}-group-addon`]:{borderRadius:O,fontSize:C.fontSizeLG}},"&-sm":{[`${m}-group-addon`]:{borderRadius:F}},"&-status-error":{[`${m}-group-addon`]:{color:S,borderColor:S}},"&-status-warning":{[`${m}-group-addon`]:{color:k,borderColor:k}},"&-disabled":{[`${m}-group-addon`]:Object.assign({},r(C))},[`&:not(${m}-compact-first-item):not(${m}-compact-last-item)${m}-compact-item`]:{[`${m}, ${m}-group-addon`]:{borderRadius:0}},[`&:not(${m}-compact-last-item)${m}-compact-first-item`]:{[`${m}, ${m}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${m}-compact-first-item)${m}-compact-last-item`]:{[`${m}, ${m}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},y=C=>{const{componentCls:m,antCls:S}=C,k=`${m}-search`;return{[k]:{[`${m}`]:{"&:hover, &:focus":{borderColor:C.colorPrimaryHover,[`+ ${m}-group-addon ${k}-button:not(${S}-btn-primary)`]:{borderInlineStartColor:C.colorPrimaryHover}}},[`${m}-affix-wrapper`]:{borderRadius:0},[`${m}-lg`]:{lineHeight:C.lineHeightLG-2e-4},[`> ${m}-group`]:{[`> ${m}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${k}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:C.borderRadius,borderEndEndRadius:C.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${k}-button:not(${S}-btn-primary)`]:{color:C.colorTextDescription,"&:hover":{color:C.colorPrimaryHover},"&:active":{color:C.colorPrimaryActive},[`&${S}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${k}-button`]:{height:C.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${k}-button`]:{height:C.controlHeightLG},[`&-small ${k}-button`]:{height:C.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${m}-compact-item`]:{[`&:not(${m}-compact-last-item)`]:{[`${m}-group-addon`]:{[`${m}-search-button`]:{marginInlineEnd:-C.lineWidth,borderRadius:0}}},[`&:not(${m}-compact-first-item)`]:{[`${m},${m}-affix-wrapper`]:{borderRadius:0}},[`> ${m}-group-addon ${m}-search-button,
> ${m},
${m}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${m}-affix-wrapper-focused`]:{zIndex:2}}}}},g=C=>{const{componentCls:m,paddingLG:S}=C,k=`${m}-textarea`;return{[k]:{position:"relative","&-show-count":{[`> ${m}`]:{height:"100%"},[`${m}-data-count`]:{position:"absolute",bottom:-C.fontSize*C.lineHeight,insetInlineEnd:0,color:C.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${m}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${k}-has-feedback`]:{[`${m}`]:{paddingInlineEnd:S}},[`&-affix-wrapper${m}-affix-wrapper`]:{padding:0,[`> textarea${m}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${m}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${m}-clear-icon`]:{position:"absolute",insetInlineEnd:C.paddingXS,insetBlockStart:C.paddingXS},[`${k}-suffix`]:{position:"absolute",top:0,insetInlineEnd:C.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function x(C){return(0,b.TS)(C,{inputAffixPadding:C.paddingXXS})}const E=C=>{const{controlHeight:m,fontSize:S,lineHeight:k,lineWidth:O,controlHeightSM:F,controlHeightLG:z,fontSizeLG:H,lineHeightLG:q,paddingSM:K,controlPaddingHorizontalSM:$,controlPaddingHorizontal:R,colorFillAlter:X,colorPrimaryHover:I,controlOutlineWidth:W,controlOutline:B,colorErrorOutline:G,colorWarningOutline:fe}=C;return{paddingBlock:Math.max(Math.round((m-S*k)/2*10)/10-O,3),paddingBlockSM:Math.max(Math.round((F-S*k)/2*10)/10-O,0),paddingBlockLG:Math.ceil((z-H*q)/2*10)/10-O,paddingInline:K-O,paddingInlineSM:$-O,paddingInlineLG:R-O,addonBg:X,activeBorderColor:I,hoverBorderColor:I,activeShadow:`0 0 0 ${W}px ${B}`,errorActiveShadow:`0 0 0 ${W}px ${G}`,warningActiveShadow:`0 0 0 ${W}px ${fe}`}};D.ZP=(0,d.Z)("Input",C=>{const m=(0,b.TS)(C,x(C));return[i(m),g(m),c(m),v(m),y(m),(0,p.c)(m)]},E)},93948:function(Me,D,s){"use strict";s.d(D,{Z:function(){return Ce}});var _=s(59301),p=s(29679),b=s(40001),d=s(19248),o=s(99267),u=s(92310),h=s.n(u),r=s(2738),n=s(36355),a=s(96663),t=s(44127),f=s(6620),e={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},i=function(){var A=(0,_.useRef)([]),Q=(0,_.useRef)(null);return(0,_.useEffect)(function(){var V=Date.now(),he=!1;A.current.forEach(function(ye){if(ye){he=!0;var de=ye.style;de.transitionDuration=".3s, .3s, .3s, .06s",Q.current&&V-Q.current<100&&(de.transitionDuration="0s, 0s")}}),he&&(Q.current=Date.now())}),A.current},l=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],c=function(A){var Q=(0,t.Z)((0,t.Z)({},e),A),V=Q.className,he=Q.percent,ye=Q.prefixCls,de=Q.strokeColor,N=Q.strokeLinecap,le=Q.strokeWidth,M=Q.style,ve=Q.trailColor,Re=Q.trailWidth,w=Q.transition,ie=(0,f.Z)(Q,l);delete ie.gapPosition;var te=Array.isArray(he)?he:[he],P=Array.isArray(de)?de:[de],j=i(),re=le/2,Ae=100-le/2,we="M ".concat(N==="round"?re:0,",").concat(re,`
L `).concat(N==="round"?Ae:100,",").concat(re),Ee="0 0 100 ".concat(le),Be=0;return _.createElement("svg",(0,a.Z)({className:h()("".concat(ye,"-line"),V),viewBox:Ee,preserveAspectRatio:"none",style:M},ie),_.createElement("path",{className:"".concat(ye,"-line-trail"),d:we,strokeLinecap:N,stroke:ve,strokeWidth:Re||le,fillOpacity:"0"}),te.map(function(je,ze){var He=1;switch(N){case"round":He=1-le/100;break;case"square":He=1-le/2/100;break;default:He=1;break}var $e={strokeDasharray:"".concat(je*He,"px, 100px"),strokeDashoffset:"-".concat(Be,"px"),transition:w||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ie=P[ze]||P[P.length-1];return Be+=je,_.createElement("path",{key:ze,className:"".concat(ye,"-line-path"),d:we,strokeLinecap:N,stroke:Ie,strokeWidth:le,fillOpacity:"0",ref:function(Ve){j[ze]=Ve},style:$e})}))},v=c,y=s(20135),g=s(72071),x=s(47273),E=0,C=(0,x.Z)();function m(){var Z;return C?(Z=E,E+=1):Z="TEST_OR_SSR",Z}var S=function(Z){var A=_.useState(),Q=(0,g.Z)(A,2),V=Q[0],he=Q[1];return _.useEffect(function(){he("rc_progress_".concat(m()))},[]),Z||V},k=function(A){var Q=A.bg,V=A.children;return _.createElement("div",{style:{width:"100%",height:"100%",background:Q}},V)};function O(Z,A){return Object.keys(Z).map(function(Q){var V=parseFloat(Q),he="".concat(Math.floor(V*A),"%");return"".concat(Z[Q]," ").concat(he)})}var F=_.forwardRef(function(Z,A){var Q=Z.prefixCls,V=Z.color,he=Z.gradientId,ye=Z.radius,de=Z.style,N=Z.ptg,le=Z.strokeLinecap,M=Z.strokeWidth,ve=Z.size,Re=Z.gapDegree,w=V&&(0,y.Z)(V)==="object",ie=w?"#FFF":void 0,te=ve/2,P=_.createElement("circle",{className:"".concat(Q,"-circle-path"),r:ye,cx:te,cy:te,stroke:ie,strokeLinecap:le,strokeWidth:M,opacity:N===0?0:1,style:de,ref:A});if(!w)return P;var j="".concat(he,"-conic"),re=Re?"".concat(180+Re/2,"deg"):"0deg",Ae=O(V,(360-Re)/360),we=O(V,1),Ee="conic-gradient(from ".concat(re,", ").concat(Ae.join(", "),")"),Be="linear-gradient(to ".concat(Re?"bottom":"top",", ").concat(we.join(", "),")");return _.createElement(_.Fragment,null,_.createElement("mask",{id:j},P),_.createElement("foreignObject",{x:0,y:0,width:ve,height:ve,mask:"url(#".concat(j,")")},_.createElement(k,{bg:Be},_.createElement(k,{bg:Ee}))))}),z=F,H=100,q=function(A,Q,V,he,ye,de,N,le,M,ve){var Re=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,w=V/100*360*((360-de)/360),ie=de===0?0:{bottom:0,top:180,left:90,right:-90}[N],te=(100-he)/100*Q;M==="round"&&he!==100&&(te+=ve/2,te>=Q&&(te=Q-.01));var P=H/2;return{stroke:typeof le=="string"?le:void 0,strokeDasharray:"".concat(Q,"px ").concat(A),strokeDashoffset:te+Re,transform:"rotate(".concat(ye+w+ie,"deg)"),transformOrigin:"".concat(P,"px ").concat(P,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},K=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function $(Z){var A=Z!=null?Z:[];return Array.isArray(A)?A:[A]}var R=function(A){var Q=(0,t.Z)((0,t.Z)({},e),A),V=Q.id,he=Q.prefixCls,ye=Q.steps,de=Q.strokeWidth,N=Q.trailWidth,le=Q.gapDegree,M=le===void 0?0:le,ve=Q.gapPosition,Re=Q.trailColor,w=Q.strokeLinecap,ie=Q.style,te=Q.className,P=Q.strokeColor,j=Q.percent,re=(0,f.Z)(Q,K),Ae=H/2,we=S(V),Ee="".concat(we,"-gradient"),Be=Ae-de/2,je=Math.PI*2*Be,ze=M>0?90+M/2:-90,He=je*((360-M)/360),$e=(0,y.Z)(ye)==="object"?ye:{count:ye,space:2},Ie=$e.count,Ne=$e.space,Ve=$(j),Ge=$(P),Qe=Ge.find(function(ft){return ft&&(0,y.Z)(ft)==="object"}),tt=Qe&&(0,y.Z)(Qe)==="object",Je=tt?"butt":w,et=q(je,He,0,100,ze,M,ve,Re,Je,de),ot=i(),dt=function(){var qe=0;return Ve.map(function(_t,st){var Lt=Ge[st]||Ge[Ge.length-1],vt=q(je,He,qe,_t,ze,M,ve,Lt,Je,de);return qe+=_t,_.createElement(z,{key:st,color:Lt,ptg:_t,radius:Be,prefixCls:he,gradientId:Ee,style:vt,strokeLinecap:Je,strokeWidth:de,gapDegree:M,ref:function(Ft){ot[st]=Ft},size:H})}).reverse()},ut=function(){var qe=Math.round(Ie*(Ve[0]/100)),_t=100/Ie,st=0;return new Array(Ie).fill(null).map(function(Lt,vt){var mt=vt<=qe-1?Ge[0]:Re,Ft=mt&&(0,y.Z)(mt)==="object"?"url(#".concat(Ee,")"):void 0,lt=q(je,He,st,_t,ze,M,ve,mt,"butt",de,Ne);return st+=(He-lt.strokeDashoffset+Ne)*100/He,_.createElement("circle",{key:vt,className:"".concat(he,"-circle-path"),r:Be,cx:Ae,cy:Ae,stroke:Ft,strokeWidth:de,opacity:1,style:lt,ref:function(jt){ot[vt]=jt}})})};return _.createElement("svg",(0,a.Z)({className:h()("".concat(he,"-circle"),te),viewBox:"0 0 ".concat(H," ").concat(H),style:ie,id:V,role:"presentation"},re),!Ie&&_.createElement("circle",{className:"".concat(he,"-circle-trail"),r:Be,cx:Ae,cy:Ae,stroke:Re,strokeLinecap:Je,strokeWidth:N||de,style:et}),Ie?ut():dt())},X=R,I={Line:v,Circle:X},W=s(6848),B=s(93398);function G(Z){return!Z||Z<0?0:Z>100?100:Z}function fe(Z){let{success:A,successPercent:Q}=Z,V=Q;return A&&"progress"in A&&(V=A.progress),A&&"percent"in A&&(V=A.percent),V}const xe=Z=>{let{percent:A,success:Q,successPercent:V}=Z;const he=G(fe({success:Q,successPercent:V}));return[he,G(G(A)-he)]},Le=Z=>{let{success:A={},strokeColor:Q}=Z;const{strokeColor:V}=A;return[V||B.presetPrimaryColors.green,Q||null]},ke=(Z,A,Q)=>{var V,he,ye,de;let N=-1,le=-1;if(A==="step"){const M=Q.steps,ve=Q.strokeWidth;typeof Z=="string"||typeof Z=="undefined"?(N=Z==="small"?2:14,le=ve!=null?ve:8):typeof Z=="number"?[N,le]=[Z,Z]:[N=14,le=8]=Z,N*=M}else if(A==="line"){const M=Q==null?void 0:Q.strokeWidth;typeof Z=="string"||typeof Z=="undefined"?le=M||(Z==="small"?6:8):typeof Z=="number"?[N,le]=[Z,Z]:[N=-1,le=8]=Z}else(A==="circle"||A==="dashboard")&&(typeof Z=="string"||typeof Z=="undefined"?[N,le]=Z==="small"?[60,60]:[120,120]:typeof Z=="number"?[N,le]=[Z,Z]:(N=(he=(V=Z[0])!==null&&V!==void 0?V:Z[1])!==null&&he!==void 0?he:120,le=(de=(ye=Z[0])!==null&&ye!==void 0?ye:Z[1])!==null&&de!==void 0?de:120));return[N,le]},ae=3,ge=Z=>ae/Z*100;var Te=Z=>{const{prefixCls:A,trailColor:Q=null,strokeLinecap:V="round",gapPosition:he,gapDegree:ye,width:de=120,type:N,children:le,success:M,size:ve=de}=Z,[Re,w]=ke(ve,"circle");let{strokeWidth:ie}=Z;ie===void 0&&(ie=Math.max(ge(Re),6));const te={width:Re,height:w,fontSize:Re*.15+6},P=_.useMemo(()=>{if(ye||ye===0)return ye;if(N==="dashboard")return 75},[ye,N]),j=he||N==="dashboard"&&"bottom"||void 0,re=Object.prototype.toString.call(Z.strokeColor)==="[object Object]",Ae=Le({success:M,strokeColor:Z.strokeColor}),we=h()(`${A}-inner`,{[`${A}-circle-gradient`]:re}),Ee=_.createElement(X,{percent:xe(Z),strokeWidth:ie,trailWidth:ie,strokeColor:Ae,strokeLinecap:V,trailColor:Q,prefixCls:A,gapDegree:P,gapPosition:j});return _.createElement("div",{className:we,style:te},Re<=20?_.createElement(W.Z,{title:le},_.createElement("span",null,Ee)):_.createElement(_.Fragment,null,Ee,le))},Oe=function(Z,A){var Q={};for(var V in Z)Object.prototype.hasOwnProperty.call(Z,V)&&A.indexOf(V)<0&&(Q[V]=Z[V]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,V=Object.getOwnPropertySymbols(Z);he<V.length;he++)A.indexOf(V[he])<0&&Object.prototype.propertyIsEnumerable.call(Z,V[he])&&(Q[V[he]]=Z[V[he]]);return Q};const Pe=Z=>{let A=[];return Object.keys(Z).forEach(Q=>{const V=parseFloat(Q.replace(/%/g,""));isNaN(V)||A.push({key:V,value:Z[Q]})}),A=A.sort((Q,V)=>Q.key-V.key),A.map(Q=>{let{key:V,value:he}=Q;return`${he} ${V}%`}).join(", ")},De=(Z,A)=>{const{from:Q=B.presetPrimaryColors.blue,to:V=B.presetPrimaryColors.blue,direction:he=A==="rtl"?"to left":"to right"}=Z,ye=Oe(Z,["from","to","direction"]);if(Object.keys(ye).length!==0){const de=Pe(ye);return{backgroundImage:`linear-gradient(${he}, ${de})`}}return{backgroundImage:`linear-gradient(${he}, ${Q}, ${V})`}};var Ke=Z=>{const{prefixCls:A,direction:Q,percent:V,size:he,strokeWidth:ye,strokeColor:de,strokeLinecap:N="round",children:le,trailColor:M=null,success:ve}=Z,Re=de&&typeof de!="string"?De(de,Q):{backgroundColor:de},w=N==="square"||N==="butt"?0:void 0,ie={backgroundColor:M||void 0,borderRadius:w},te=he!=null?he:[-1,ye||(he==="small"?6:8)],[P,j]=ke(te,"line",{strokeWidth:ye}),re=Object.assign({width:`${G(V)}%`,height:j,borderRadius:w},Re),Ae=fe(Z),we={width:`${G(Ae)}%`,height:j,borderRadius:w,backgroundColor:ve==null?void 0:ve.strokeColor},Ee={width:P<0?"100%":P,height:j};return _.createElement(_.Fragment,null,_.createElement("div",{className:`${A}-outer`,style:Ee},_.createElement("div",{className:`${A}-inner`,style:ie},_.createElement("div",{className:`${A}-bg`,style:re}),Ae!==void 0?_.createElement("div",{className:`${A}-success-bg`,style:we}):null)),le)},oe=Z=>{const{size:A,steps:Q,percent:V=0,strokeWidth:he=8,strokeColor:ye,trailColor:de=null,prefixCls:N,children:le}=Z,M=Math.round(Q*(V/100)),ve=A==="small"?2:14,Re=A!=null?A:[ve,he],[w,ie]=ke(Re,"step",{steps:Q,strokeWidth:he}),te=w/Q,P=new Array(Q);for(let j=0;j<Q;j++){const re=Array.isArray(ye)?ye[j]:ye;P[j]=_.createElement("div",{key:j,className:h()(`${N}-steps-item`,{[`${N}-steps-item-active`]:j<=M-1}),style:{backgroundColor:j<=M-1?re:de,width:te,height:ie}})}return _.createElement("div",{className:`${N}-steps-outer`},P,le)},me=s(93083),se=s(17313),J=s(83116),ne=s(37613);const Se=Z=>{const A=Z?"100%":"-100%";return new me.Keyframes(`antProgress${Z?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${A}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${A}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},be=Z=>{const{componentCls:A,iconCls:Q}=Z;return{[A]:Object.assign(Object.assign({},(0,se.Wf)(Z)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:Z.fontSize,marginInlineEnd:Z.marginXS,marginBottom:Z.marginXS},[`${A}-outer`]:{display:"inline-block",width:"100%"},[`&${A}-show-info`]:{[`${A}-outer`]:{marginInlineEnd:`calc(-2em - ${Z.marginXS}px)`,paddingInlineEnd:`calc(2em + ${Z.paddingXS}px)`}},[`${A}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:Z.remainingColor,borderRadius:Z.lineBorderRadius},[`${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:Z.defaultColor}},[`${A}-success-bg, ${A}-bg`]:{position:"relative",backgroundColor:Z.defaultColor,borderRadius:Z.lineBorderRadius,transition:`all ${Z.motionDurationSlow} ${Z.motionEaseInOutCirc}`},[`${A}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:Z.colorSuccess},[`${A}-text`]:{display:"inline-block",width:"2em",marginInlineStart:Z.marginXS,color:Z.colorText,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[Q]:{fontSize:Z.fontSize}},[`&${A}-status-active`]:{[`${A}-bg::before`]:{position:"absolute",inset:0,backgroundColor:Z.colorBgContainer,borderRadius:Z.lineBorderRadius,opacity:0,animationName:Se(),animationDuration:Z.progressActiveMotionDuration,animationTimingFunction:Z.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${A}-rtl${A}-status-active`]:{[`${A}-bg::before`]:{animationName:Se(!0)}},[`&${A}-status-exception`]:{[`${A}-bg`]:{backgroundColor:Z.colorError},[`${A}-text`]:{color:Z.colorError}},[`&${A}-status-exception ${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:Z.colorError}},[`&${A}-status-success`]:{[`${A}-bg`]:{backgroundColor:Z.colorSuccess},[`${A}-text`]:{color:Z.colorSuccess}},[`&${A}-status-success ${A}-inner:not(${A}-circle-gradient)`]:{[`${A}-circle-path`]:{stroke:Z.colorSuccess}}})}},_e=Z=>{const{componentCls:A,iconCls:Q}=Z;return{[A]:{[`${A}-circle-trail`]:{stroke:Z.remainingColor},[`&${A}-circle ${A}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${A}-circle ${A}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:Z.circleTextColor,fontSize:Z.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[Q]:{fontSize:`${Z.fontSize/Z.fontSizeSM}em`}},[`${A}-circle&-status-exception`]:{[`${A}-text`]:{color:Z.colorError}},[`${A}-circle&-status-success`]:{[`${A}-text`]:{color:Z.colorSuccess}}},[`${A}-inline-circle`]:{lineHeight:1,[`${A}-inner`]:{verticalAlign:"bottom"}}}},ce=Z=>{const{componentCls:A}=Z;return{[A]:{[`${A}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:Z.progressStepMinWidth,marginInlineEnd:Z.progressStepMarginInlineEnd,backgroundColor:Z.remainingColor,transition:`all ${Z.motionDurationSlow}`,"&-active":{backgroundColor:Z.defaultColor}}}}}},ue=Z=>{const{componentCls:A,iconCls:Q}=Z;return{[A]:{[`${A}-small&-line, ${A}-small&-line ${A}-text ${Q}`]:{fontSize:Z.fontSizeSM}}}};var ee=(0,J.Z)("Progress",Z=>{const A=Z.marginXXS/2,Q=(0,ne.TS)(Z,{progressStepMarginInlineEnd:A,progressStepMinWidth:A,progressActiveMotionDuration:"2.4s"});return[be(Q),_e(Q),ce(Q),ue(Q)]},Z=>({circleTextColor:Z.colorText,defaultColor:Z.colorInfo,remainingColor:Z.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em"})),L=function(Z,A){var Q={};for(var V in Z)Object.prototype.hasOwnProperty.call(Z,V)&&A.indexOf(V)<0&&(Q[V]=Z[V]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,V=Object.getOwnPropertySymbols(Z);he<V.length;he++)A.indexOf(V[he])<0&&Object.prototype.propertyIsEnumerable.call(Z,V[he])&&(Q[V[he]]=Z[V[he]]);return Q};const U=null,T=["normal","exception","active","success"];var pe=_.forwardRef((Z,A)=>{const{prefixCls:Q,className:V,rootClassName:he,steps:ye,strokeColor:de,percent:N=0,size:le="default",showInfo:M=!0,type:ve="line",status:Re,format:w,style:ie}=Z,te=L(Z,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style"]),P=_.useMemo(()=>{var Ve,Ge;const Qe=fe(Z);return parseInt(Qe!==void 0?(Ve=Qe!=null?Qe:0)===null||Ve===void 0?void 0:Ve.toString():(Ge=N!=null?N:0)===null||Ge===void 0?void 0:Ge.toString(),10)},[N,Z.success,Z.successPercent]),j=_.useMemo(()=>!T.includes(Re)&&P>=100?"success":Re||"normal",[Re,P]),{getPrefixCls:re,direction:Ae,progress:we}=_.useContext(n.E_),Ee=re("progress",Q),[Be,je]=ee(Ee),ze=_.useMemo(()=>{if(!M)return null;const Ve=fe(Z);let Ge;const Qe=w||(Je=>`${Je}%`),tt=ve==="line";return w||j!=="exception"&&j!=="success"?Ge=Qe(G(N),G(Ve)):j==="exception"?Ge=tt?_.createElement(d.Z,null):_.createElement(o.Z,null):j==="success"&&(Ge=tt?_.createElement(p.Z,null):_.createElement(b.Z,null)),_.createElement("span",{className:`${Ee}-text`,title:typeof Ge=="string"?Ge:void 0},Ge)},[M,N,P,j,ve,Ee,w]),He=Array.isArray(de)?de[0]:de,$e=typeof de=="string"||Array.isArray(de)?de:void 0;let Ie;ve==="line"?Ie=ye?_.createElement(oe,Object.assign({},Z,{strokeColor:$e,prefixCls:Ee,steps:ye}),ze):_.createElement(Ke,Object.assign({},Z,{strokeColor:He,prefixCls:Ee,direction:Ae}),ze):(ve==="circle"||ve==="dashboard")&&(Ie=_.createElement(Te,Object.assign({},Z,{strokeColor:He,prefixCls:Ee,progressStatus:j}),ze));const Ne=h()(Ee,`${Ee}-status-${j}`,`${Ee}-${ve==="dashboard"&&"circle"||ye&&"steps"||ve}`,{[`${Ee}-inline-circle`]:ve==="circle"&&ke(le,"circle")[0]<=20,[`${Ee}-show-info`]:M,[`${Ee}-${le}`]:typeof le=="string",[`${Ee}-rtl`]:Ae==="rtl"},we==null?void 0:we.className,V,he,je);return Be(_.createElement("div",Object.assign({ref:A,style:Object.assign(Object.assign({},we==null?void 0:we.style),ie),className:Ne,role:"progressbar","aria-valuenow":P},(0,r.Z)(te,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),Ie))}),Ce=pe},19447:function(Me,D,s){"use strict";s.d(D,{ZP:function(){return o},fS:function(){return b},qN:function(){return p}});var _=s(47585);const p=8;function b(u){const h=p,{contentRadius:r,limitVerticalRadius:n}=u,a=r>12?r+2:12;return{dropdownArrowOffset:a,dropdownArrowOffsetVertical:n?h:a}}function d(u,h){return u?h:{}}function o(u,h){const{componentCls:r,sizePopupArrow:n,borderRadiusXS:a,borderRadiusOuter:t,boxShadowPopoverArrow:f}=u,{colorBg:e,contentRadius:i=u.borderRadiusLG,limitVerticalRadius:l,arrowDistance:c=0,arrowPlacement:v={left:!0,right:!0,top:!0,bottom:!0}}=h,{dropdownArrowOffsetVertical:y,dropdownArrowOffset:g}=b({contentRadius:i,limitVerticalRadius:l});return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,_.r)(n,a,t,e,f)),{"&:before":{background:e}})]},d(!!v.top,{[[`&-placement-top ${r}-arrow`,`&-placement-topLeft ${r}-arrow`,`&-placement-topRight ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${r}-arrow`]:{left:{_skip_check_:!0,value:g}},[`&-placement-topRight ${r}-arrow`]:{right:{_skip_check_:!0,value:g}}})),d(!!v.bottom,{[[`&-placement-bottom ${r}-arrow`,`&-placement-bottomLeft ${r}-arrow`,`&-placement-bottomRight ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${r}-arrow`]:{left:{_skip_check_:!0,value:g}},[`&-placement-bottomRight ${r}-arrow`]:{right:{_skip_check_:!0,value:g}}})),d(!!v.left,{[[`&-placement-left ${r}-arrow`,`&-placement-leftTop ${r}-arrow`,`&-placement-leftBottom ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${r}-arrow`]:{top:y},[`&-placement-leftBottom ${r}-arrow`]:{bottom:y}})),d(!!v.right,{[[`&-placement-right ${r}-arrow`,`&-placement-rightTop ${r}-arrow`,`&-placement-rightBottom ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${r}-arrow`]:{top:y},[`&-placement-rightBottom ${r}-arrow`]:{bottom:y}}))}}},47585:function(Me,D,s){"use strict";s.d(D,{r:function(){return _}});const _=(p,b,d,o,u)=>{const h=p/2,r=0,n=h,a=d*1/Math.sqrt(2),t=h-d*(1-1/Math.sqrt(2)),f=h-b*(1/Math.sqrt(2)),e=d*(Math.sqrt(2)-1)+b*(1/Math.sqrt(2)),i=2*h-f,l=e,c=2*h-a,v=t,y=2*h-r,g=n,x=h*Math.sqrt(2)+d*(Math.sqrt(2)-2),E=d*(Math.sqrt(2)-1);return{pointerEvents:"none",width:p,height:p,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:p,height:p/2,background:o,clipPath:{_multi_value_:!0,value:[`polygon(${E}px 100%, 50% ${E}px, ${2*h-E}px 100%, ${E}px 100%)`,`path('M ${r} ${n} A ${d} ${d} 0 0 0 ${a} ${t} L ${f} ${e} A ${b} ${b} 0 0 1 ${i} ${l} L ${c} ${v} A ${d} ${d} 0 0 0 ${y} ${g} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:x,height:x,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${b}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:u,zIndex:0,background:"transparent"}}}},33166:function(Me,D,s){"use strict";s.d(D,{i:function(){return _}});const _=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(Me,D,s){"use strict";s.d(D,{Z:function(){return p}});var _=s(33166);function p(b,d){return _.i.reduce((o,u)=>{const h=b[`${u}1`],r=b[`${u}3`],n=b[`${u}6`],a=b[`${u}7`];return Object.assign(Object.assign({},o),d(u,{lightColor:h,lightBorderColor:r,darkColor:n,textColor:a}))},{})}},6848:function(Me,D,s){"use strict";s.d(D,{Z:function(){return z}});var _=s(59301),p=s(92310),b=s.n(p),d=s(55477),o=s(18929),u=s(62892),h=s(79676),r=s(92343),n=s(36355),a=s(33234),t=s(88088),f=s(17313),e=s(29878),i=s(19447),l=s(45157),c=s(37613),v=s(83116);const y=H=>{const{componentCls:q,tooltipMaxWidth:K,tooltipColor:$,tooltipBg:R,tooltipBorderRadius:X,zIndexPopup:I,controlHeight:W,boxShadowSecondary:B,paddingSM:G,paddingXS:fe,tooltipRadiusOuter:xe}=H;return[{[q]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,f.Wf)(H)),{position:"absolute",zIndex:I,display:"block",width:"max-content",maxWidth:K,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":R,[`${q}-inner`]:{minWidth:W,minHeight:W,padding:`${G/2}px ${fe}px`,color:$,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:R,borderRadius:X,boxShadow:B,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${q}-inner`]:{borderRadius:Math.min(X,i.qN)}},[`${q}-content`]:{position:"relative"}}),(0,l.Z)(H,(Le,ke)=>{let{darkColor:ae}=ke;return{[`&${q}-${Le}`]:{[`${q}-inner`]:{backgroundColor:ae},[`${q}-arrow`]:{"--antd-arrow-background-color":ae}}}})),{"&-rtl":{direction:"rtl"}})},(0,i.ZP)((0,c.TS)(H,{borderRadiusOuter:xe}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:X,limitVerticalRadius:!0}),{[`${q}-pure`]:{position:"relative",maxWidth:"none",margin:H.sizePopupArrow}}]};var g=(H,q)=>(0,v.Z)("Tooltip",$=>{if(q===!1)return[];const{borderRadius:R,colorTextLightSolid:X,colorBgDefault:I,borderRadiusOuter:W}=$,B=(0,c.TS)($,{tooltipMaxWidth:250,tooltipColor:X,tooltipBorderRadius:R,tooltipBg:I,tooltipRadiusOuter:W>4?4:W});return[y(B),(0,e._y)($,"zoom-big-fast")]},$=>{let{zIndexPopupBase:R,colorBgSpotlight:X}=$;return{zIndexPopup:R+70,colorBgDefault:X}},{resetStyle:!1})(H),x=s(36785);function E(H,q){const K=(0,x.o2)(q),$=b()({[`${H}-${q}`]:q&&K}),R={},X={};return q&&!K&&(R.background=q,X["--antd-arrow-background-color"]=q),{className:$,overlayStyle:R,arrowStyle:X}}var m=H=>{const{prefixCls:q,className:K,placement:$="top",title:R,color:X,overlayInnerStyle:I}=H,{getPrefixCls:W}=_.useContext(n.E_),B=W("tooltip",q),[G,fe]=g(B,!0),xe=E(B,X),Le=xe.arrowStyle,ke=Object.assign(Object.assign({},I),xe.overlayStyle),ae=b()(fe,B,`${B}-pure`,`${B}-placement-${$}`,K,xe.className);return G(_.createElement("div",{className:ae,style:Le},_.createElement("div",{className:`${B}-arrow`}),_.createElement(d.G,Object.assign({},H,{className:fe,prefixCls:B,overlayInnerStyle:ke}),R)))},S=function(H,q){var K={};for(var $ in H)Object.prototype.hasOwnProperty.call(H,$)&&q.indexOf($)<0&&(K[$]=H[$]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,$=Object.getOwnPropertySymbols(H);R<$.length;R++)q.indexOf($[R])<0&&Object.prototype.propertyIsEnumerable.call(H,$[R])&&(K[$[R]]=H[$[R]]);return K};const k=(H,q)=>{const K={},$=Object.assign({},H);return q.forEach(R=>{H&&R in H&&(K[R]=H[R],delete $[R])}),{picked:K,omitted:$}};function O(H,q){const K=H.type;if((K.__ANT_BUTTON===!0||H.type==="button")&&H.props.disabled||K.__ANT_SWITCH===!0&&(H.props.disabled||H.props.loading)||K.__ANT_RADIO===!0&&H.props.disabled){const{picked:$,omitted:R}=k(H.props.style,["position","left","right","top","bottom","float","display","zIndex"]),X=Object.assign(Object.assign({display:"inline-block"},$),{cursor:"not-allowed",width:H.props.block?"100%":void 0}),I=Object.assign(Object.assign({},R),{pointerEvents:"none"}),W=(0,r.Tm)(H,{style:I,className:null});return _.createElement("span",{style:X,className:b()(H.props.className,`${q}-disabled-compatible-wrapper`)},W)}return H}const F=_.forwardRef((H,q)=>{var K,$;const{prefixCls:R,openClassName:X,getTooltipContainer:I,overlayClassName:W,color:B,overlayInnerStyle:G,children:fe,afterOpenChange:xe,afterVisibleChange:Le,destroyTooltipOnHide:ke,arrow:ae=!0,title:ge,overlay:Fe,builtinPlacements:Te,arrowPointAtCenter:Oe=!1,autoAdjustOverflow:Pe=!0}=H,De=!!ae,[,Xe]=(0,t.Z)(),{getPopupContainer:Ke,getPrefixCls:Ue,direction:oe}=_.useContext(n.E_),me=_.useRef(null),se=()=>{var ie;(ie=me.current)===null||ie===void 0||ie.forceAlign()};_.useImperativeHandle(q,()=>({forceAlign:se,forcePopupAlign:()=>{se()}}));const[J,ne]=(0,o.Z)(!1,{value:(K=H.open)!==null&&K!==void 0?K:H.visible,defaultValue:($=H.defaultOpen)!==null&&$!==void 0?$:H.defaultVisible}),Se=!ge&&!Fe&&ge!==0,be=ie=>{var te,P;ne(Se?!1:ie),Se||((te=H.onOpenChange)===null||te===void 0||te.call(H,ie),(P=H.onVisibleChange)===null||P===void 0||P.call(H,ie))},_e=_.useMemo(()=>{var ie,te;let P=Oe;return typeof ae=="object"&&(P=(te=(ie=ae.pointAtCenter)!==null&&ie!==void 0?ie:ae.arrowPointAtCenter)!==null&&te!==void 0?te:Oe),Te||(0,h.Z)({arrowPointAtCenter:P,autoAdjustOverflow:Pe,arrowWidth:De?Xe.sizePopupArrow:0,borderRadius:Xe.borderRadius,offset:Xe.marginXXS,visibleFirst:!0})},[Oe,ae,Te,Xe]),ce=_.useMemo(()=>ge===0?ge:Fe||ge||"",[Fe,ge]),ue=_.createElement(a.BR,null,typeof ce=="function"?ce():ce),{getPopupContainer:ee,placement:L="top",mouseEnterDelay:U=.1,mouseLeaveDelay:T=.1,overlayStyle:Y,rootClassName:pe}=H,Ce=S(H,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),Z=Ue("tooltip",R),A=Ue(),Q=H["data-popover-inject"];let V=J;!("open"in H)&&!("visible"in H)&&Se&&(V=!1);const he=O((0,r.l$)(fe)&&!(0,r.M2)(fe)?fe:_.createElement("span",null,fe),Z),ye=he.props,de=!ye.className||typeof ye.className=="string"?b()(ye.className,X||`${Z}-open`):ye.className,[N,le]=g(Z,!Q),M=E(Z,B),ve=M.arrowStyle,Re=Object.assign(Object.assign({},G),M.overlayStyle),w=b()(W,{[`${Z}-rtl`]:oe==="rtl"},M.className,pe,le);return N(_.createElement(d.Z,Object.assign({},Ce,{showArrow:De,placement:L,mouseEnterDelay:U,mouseLeaveDelay:T,prefixCls:Z,overlayClassName:w,overlayStyle:Object.assign(Object.assign({},ve),Y),getTooltipContainer:ee||I||Ke,ref:me,builtinPlacements:_e,overlay:ue,visible:V,onVisibleChange:be,afterVisibleChange:xe!=null?xe:Le,overlayInnerStyle:Re,arrowContent:_.createElement("span",{className:`${Z}-arrow-content`}),motion:{motionName:(0,u.m)(A,"zoom-big-fast",H.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!ke}),V?(0,r.Tm)(he,{className:de}):he))});F._InternalPanelDoNotUseOrYouWillBeFired=m;var z=F},24334:function(Me,D,s){var _,p;(function(b,d){Me.exports=d(b)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof s.g!="undefined"?s.g:this,function(b){"use strict";b=b||{};var d=b.Base64,o="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=function(K){for(var $={},R=0,X=K.length;R<X;R++)$[K.charAt(R)]=R;return $}(u),r=String.fromCharCode,n=function(K){if(K.length<2){var $=K.charCodeAt(0);return $<128?K:$<2048?r(192|$>>>6)+r(128|$&63):r(224|$>>>12&15)+r(128|$>>>6&63)+r(128|$&63)}else{var $=65536+(K.charCodeAt(0)-55296)*1024+(K.charCodeAt(1)-56320);return r(240|$>>>18&7)+r(128|$>>>12&63)+r(128|$>>>6&63)+r(128|$&63)}},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,t=function(K){return K.replace(a,n)},f=function(K){var $=[0,2,1][K.length%3],R=K.charCodeAt(0)<<16|(K.length>1?K.charCodeAt(1):0)<<8|(K.length>2?K.charCodeAt(2):0),X=[u.charAt(R>>>18),u.charAt(R>>>12&63),$>=2?"=":u.charAt(R>>>6&63),$>=1?"=":u.charAt(R&63)];return X.join("")},e=b.btoa&&typeof b.btoa=="function"?function(K){return b.btoa(K)}:function(K){if(K.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return K.replace(/[\s\S]{1,3}/g,f)},i=function(K){return e(t(String(K)))},l=function(K){return K.replace(/[+\/]/g,function($){return $=="+"?"-":"_"}).replace(/=/g,"")},c=function(K,$){return $?l(i(K)):i(K)},v=function(K){return c(K,!0)},y;b.Uint8Array&&(y=function(K,$){for(var R="",X=0,I=K.length;X<I;X+=3){var W=K[X],B=K[X+1],G=K[X+2],fe=W<<16|B<<8|G;R+=u.charAt(fe>>>18)+u.charAt(fe>>>12&63)+(typeof B!="undefined"?u.charAt(fe>>>6&63):"=")+(typeof G!="undefined"?u.charAt(fe&63):"=")}return $?l(R):R});var g=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,x=function(K){switch(K.length){case 4:var $=(7&K.charCodeAt(0))<<18|(63&K.charCodeAt(1))<<12|(63&K.charCodeAt(2))<<6|63&K.charCodeAt(3),R=$-65536;return r((R>>>10)+55296)+r((R&1023)+56320);case 3:return r((15&K.charCodeAt(0))<<12|(63&K.charCodeAt(1))<<6|63&K.charCodeAt(2));default:return r((31&K.charCodeAt(0))<<6|63&K.charCodeAt(1))}},E=function(K){return K.replace(g,x)},C=function(K){var $=K.length,R=$%4,X=($>0?h[K.charAt(0)]<<18:0)|($>1?h[K.charAt(1)]<<12:0)|($>2?h[K.charAt(2)]<<6:0)|($>3?h[K.charAt(3)]:0),I=[r(X>>>16),r(X>>>8&255),r(X&255)];return I.length-=[0,0,2,1][R],I.join("")},m=b.atob&&typeof b.atob=="function"?function(K){return b.atob(K)}:function(K){return K.replace(/\S{1,4}/g,C)},S=function(K){return m(String(K).replace(/[^A-Za-z0-9\+\/]/g,""))},k=function(K){return E(m(K))},O=function(K){return String(K).replace(/[-_]/g,function($){return $=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},F=function(K){return k(O(K))},z;b.Uint8Array&&(z=function(K){return Uint8Array.from(S(O(K)),function($){return $.charCodeAt(0)})});var H=function(){var K=b.Base64;return b.Base64=d,K};if(b.Base64={VERSION:o,atob:S,btoa:e,fromBase64:F,toBase64:c,utob:t,encode:c,encodeURI:v,btou:E,decode:F,noConflict:H,fromUint8Array:y,toUint8Array:z},typeof Object.defineProperty=="function"){var q=function(K){return{value:K,enumerable:!1,writable:!0,configurable:!0}};b.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",q(function(){return F(this)})),Object.defineProperty(String.prototype,"toBase64",q(function(K){return c(this,K)})),Object.defineProperty(String.prototype,"toBase64URI",q(function(){return c(this,!0)}))}}return b.Meteor&&(Base64=b.Base64),Me.exports?Me.exports.Base64=b.Base64:(_=[],p=function(){return b.Base64}.apply(D,_),p!==void 0&&(Me.exports=p)),{Base64:b.Base64}})},57128:function(Me,D,s){"use strict";function _(u){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(r){return typeof r}:_=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_(u)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=d(s(50500));function b(){if(typeof WeakMap!="function")return null;var u=new WeakMap;return b=function(){return u},u}function d(u){if(u&&u.__esModule)return u;if(u===null||_(u)!=="object"&&typeof u!="function")return{default:u};var h=b();if(h&&h.has(u))return h.get(u);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in u)if(Object.prototype.hasOwnProperty.call(u,a)){var t=n?Object.getOwnPropertyDescriptor(u,a):null;t&&(t.get||t.set)?Object.defineProperty(r,a,t):r[a]=u[a]}return r.default=u,h&&h.set(u,r),r}var o={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(h){"use strict";for(var r="",n=h.length,a=n%3,t=0;t<n-2;t+=3)r+=this.toBase64Table[h[t]>>2],r+=this.toBase64Table[((h[t]&3)<<4)+(h[t+1]>>4)],r+=this.toBase64Table[((h[t+1]&15)<<2)+(h[t+2]>>6)],r+=this.toBase64Table[h[t+2]&63];var f=n-a;return a===2?(r+=this.toBase64Table[h[f]>>2],r+=this.toBase64Table[((h[f]&3)<<4)+(h[f+1]>>4)],r+=this.toBase64Table[(h[f+1]&15)<<2],r+=this.toBase64Table[64]):a===1&&(r+=this.toBase64Table[h[f]>>2],r+=this.toBase64Table[(h[f]&3)<<4],r+=this.toBase64Table[64],r+=this.toBase64Table[64]),r},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(h){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=h.indexOf("=")-r;n<0&&(n=h.length-r);for(var a=(n>>2)*3+Math.floor(n%4/1.5),t=new Array(a),f=0,e=0,i=0,l=r;l<h.length;l++){var c=this.toBinaryTable[h.charCodeAt(l)&127],v=h.charAt(l)===this.base64Pad;if(c===-1){p.Error("Illegal character code "+h.charCodeAt(l)+" at position "+l);continue}e=e<<6|c,f+=6,f>=8&&(f-=8,v||(t[i++]=e>>f&255),e&=(1<<f)-1)}if(f){var y=new Error("Corrupted base64 string");throw y.name="Base64-Error",y}return t}};D.default=o},17852:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function s(d,o){if(!(d instanceof o))throw new TypeError("Cannot call a class as a function")}function _(d,o){for(var u=0;u<o.length;u++){var h=o[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(d,h.key,h)}}function p(d,o,u){return o&&_(d.prototype,o),u&&_(d,u),d}var b=function(){function d(){s(this,d)}return p(d,[{key:"decodeRect",value:function(u,h,r,n,a,t,f){if(a.rQwait("COPYRECT",4))return!1;var e=a.rQshift16(),i=a.rQshift16();return t.copyImage(e,i,u,h,r,n),!0}}]),d}();D.default=b},18330:function(Me,D,s){"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=d(s(50500));function b(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return b=function(){return n},n}function d(n){if(n&&n.__esModule)return n;if(n===null||_(n)!=="object"&&typeof n!="function")return{default:n};var a=b();if(a&&a.has(n))return a.get(n);var t={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var i=f?Object.getOwnPropertyDescriptor(n,e):null;i&&(i.get||i.set)?Object.defineProperty(t,e,i):t[e]=n[e]}return t.default=n,a&&a.set(n,t),t}function o(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}function u(n,a){for(var t=0;t<a.length;t++){var f=a[t];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(n,f.key,f)}}function h(n,a,t){return a&&u(n.prototype,a),t&&u(n,t),n}var r=function(){function n(){o(this,n),this._tiles=0,this._lastsubencoding=0}return h(n,[{key:"decodeRect",value:function(t,f,e,i,l,c,v){for(this._tiles===0&&(this._tilesX=Math.ceil(e/16),this._tilesY=Math.ceil(i/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){var y=1;if(l.rQwait("HEXTILE",y))return!1;var g=l.rQ,x=l.rQi,E=g[x];if(E>30)throw new Error("Illegal hextile subencoding (subencoding: "+E+")");var C=this._totalTiles-this._tiles,m=C%this._tilesX,S=Math.floor(C/this._tilesX),k=t+m*16,O=f+S*16,F=Math.min(16,t+e-k),z=Math.min(16,f+i-O);if(E&1)y+=F*z*4;else if(E&2&&(y+=4),E&4&&(y+=4),E&8){if(y++,l.rQwait("HEXTILE",y))return!1;var H=g[x+y-1];E&16?y+=H*6:y+=H*2}if(l.rQwait("HEXTILE",y))return!1;if(x++,E===0)this._lastsubencoding&1?p.Debug(" Ignoring blank after RAW"):c.fillRect(k,O,F,z,this._background);else if(E&1)c.blitImage(k,O,F,z,g,x),x+=y-1;else{if(E&2&&(this._background=[g[x],g[x+1],g[x+2],g[x+3]],x+=4),E&4&&(this._foreground=[g[x],g[x+1],g[x+2],g[x+3]],x+=4),c.startTile(k,O,F,z,this._background),E&8){var q=g[x];x++;for(var K=0;K<q;K++){var $=void 0;E&16?($=[g[x],g[x+1],g[x+2],g[x+3]],x+=4):$=this._foreground;var R=g[x];x++;var X=R>>4,I=R&15,W=g[x];x++;var B=(W>>4)+1,G=(W&15)+1;c.subTile(X,I,B,G,$)}}c.finishTile()}l.rQi=x,this._lastsubencoding=E,this._tiles--}return!0}}]),n}();D.default=r},11231:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function s(d,o){if(!(d instanceof o))throw new TypeError("Cannot call a class as a function")}function _(d,o){for(var u=0;u<o.length;u++){var h=o[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(d,h.key,h)}}function p(d,o,u){return o&&_(d.prototype,o),u&&_(d,u),d}var b=function(){function d(){s(this,d),this._lines=0}return p(d,[{key:"decodeRect",value:function(u,h,r,n,a,t,f){this._lines===0&&(this._lines=n);var e=f==8?1:4,i=r*e;if(a.rQwait("RAW",i))return!1;var l=h+(n-this._lines),c=Math.min(this._lines,Math.floor(a.rQlen/i)),v=a.rQ,y=a.rQi;if(f==8){for(var g=r*c,x=new Uint8Array(g*4),E=0;E<g;E++)x[E*4+0]=(v[y+E]>>0&3)*255/3,x[E*4+1]=(v[y+E]>>2&3)*255/3,x[E*4+2]=(v[y+E]>>4&3)*255/3,x[E*4+4]=0;v=x,y=0}return t.blitImage(u,l,r,c,v,y),a.rQskipBytes(c*i),this._lines-=c,!(this._lines>0)}}]),d}();D.default=b},57507:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function s(d,o){if(!(d instanceof o))throw new TypeError("Cannot call a class as a function")}function _(d,o){for(var u=0;u<o.length;u++){var h=o[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(d,h.key,h)}}function p(d,o,u){return o&&_(d.prototype,o),u&&_(d,u),d}var b=function(){function d(){s(this,d),this._subrects=0}return p(d,[{key:"decodeRect",value:function(u,h,r,n,a,t,f){if(this._subrects===0){if(a.rQwait("RRE",8))return!1;this._subrects=a.rQshift32();var e=a.rQshiftBytes(4);t.fillRect(u,h,r,n,e)}for(;this._subrects>0;){if(a.rQwait("RRE",12))return!1;var i=a.rQshiftBytes(4),l=a.rQshift16(),c=a.rQshift16(),v=a.rQshift16(),y=a.rQshift16();t.fillRect(u+l,h+c,v,y,i),this._subrects--}return!0}}]),d}();D.default=b},21330:function(Me,D,s){"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(s(50500)),b=d(s(48831));function d(t){return t&&t.__esModule?t:{default:t}}function o(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return o=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 f=o();if(f&&f.has(t))return f.get(t);var e={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var c=i?Object.getOwnPropertyDescriptor(t,l):null;c&&(c.get||c.set)?Object.defineProperty(e,l,c):e[l]=t[l]}return e.default=t,f&&f.set(t,e),e}function h(t,f){if(!(t instanceof f))throw new TypeError("Cannot call a class as a function")}function r(t,f){for(var e=0;e<f.length;e++){var i=f[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,f,e){return f&&r(t.prototype,f),e&&r(t,e),t}var a=function(){function t(){h(this,t),this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(var f=0;f<4;f++)this._zlibs[f]=new b.default}return n(t,[{key:"decodeRect",value:function(e,i,l,c,v,y,g){if(this._ctl===null){if(v.rQwait("TIGHT compression-control",1))return!1;this._ctl=v.rQshift8();for(var x=0;x<4;x++)this._ctl>>x&1&&(this._zlibs[x].reset(),p.Info("Reset zlib stream "+x));this._ctl=this._ctl>>4}var E;if(this._ctl===8)E=this._fillRect(e,i,l,c,v,y,g);else if(this._ctl===9)E=this._jpegRect(e,i,l,c,v,y,g);else if(this._ctl===10)E=this._pngRect(e,i,l,c,v,y,g);else if(!(this._ctl&128))E=this._basicRect(this._ctl,e,i,l,c,v,y,g);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return E&&(this._ctl=null),E}},{key:"_fillRect",value:function(e,i,l,c,v,y,g){if(v.rQwait("TIGHT",3))return!1;var x=v.rQi,E=v.rQ;return y.fillRect(e,i,l,c,[E[x+2],E[x+1],E[x]],!1),v.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(e,i,l,c,v,y,g){var x=this._readData(v);return x===null?!1:(y.imageRect(e,i,l,c,"image/jpeg",x),!0)}},{key:"_pngRect",value:function(e,i,l,c,v,y,g){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(e,i,l,c,v,y,g,x){if(this._filter===null)if(e&4){if(y.rQwait("TIGHT",1))return!1;this._filter=y.rQshift8()}else this._filter=0;var E=e&3,C;switch(this._filter){case 0:C=this._copyFilter(E,i,l,c,v,y,g,x);break;case 1:C=this._paletteFilter(E,i,l,c,v,y,g,x);break;case 2:C=this._gradientFilter(E,i,l,c,v,y,g,x);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return C&&(this._filter=null),C}},{key:"_copyFilter",value:function(e,i,l,c,v,y,g,x){var E=c*v*3,C;if(E<12){if(y.rQwait("TIGHT",E))return!1;C=y.rQshiftBytes(E)}else{if(C=this._readData(y),C===null)return!1;this._zlibs[e].setInput(C),C=this._zlibs[e].inflate(E),this._zlibs[e].setInput(null)}return g.blitRgbImage(i,l,c,v,C,0,!1),!0}},{key:"_paletteFilter",value:function(e,i,l,c,v,y,g,x){if(this._numColors===0){if(y.rQwait("TIGHT palette",1))return!1;var E=y.rQpeek8()+1,C=E*3;if(y.rQwait("TIGHT palette",1+C))return!1;this._numColors=E,y.rQskipBytes(1),y.rQshiftTo(this._palette,C)}var m=this._numColors<=2?1:8,S=Math.floor((c*m+7)/8),k=S*v,O;if(k<12){if(y.rQwait("TIGHT",k))return!1;O=y.rQshiftBytes(k)}else{if(O=this._readData(y),O===null)return!1;this._zlibs[e].setInput(O),O=this._zlibs[e].inflate(k),this._zlibs[e].setInput(null)}return this._numColors==2?this._monoRect(i,l,c,v,O,this._palette,g):this._paletteRect(i,l,c,v,O,this._palette,g),this._numColors=0,!0}},{key:"_monoRect",value:function(e,i,l,c,v,y,g){for(var x=this._getScratchBuffer(l*c*4),E=Math.floor((l+7)/8),C=Math.floor(l/8),m=0;m<c;m++){var S=void 0,k=void 0,O=void 0;for(O=0;O<C;O++)for(var F=7;F>=0;F--)S=(m*l+O*8+7-F)*4,k=(v[m*E+O]>>F&1)*3,x[S]=y[k],x[S+1]=y[k+1],x[S+2]=y[k+2],x[S+3]=255;for(var z=7;z>=8-l%8;z--)S=(m*l+O*8+7-z)*4,k=(v[m*E+O]>>z&1)*3,x[S]=y[k],x[S+1]=y[k+1],x[S+2]=y[k+2],x[S+3]=255}g.blitRgbxImage(e,i,l,c,x,0,!1)}},{key:"_paletteRect",value:function(e,i,l,c,v,y,g){for(var x=this._getScratchBuffer(l*c*4),E=l*c*4,C=0,m=0;C<E;C+=4,m++){var S=v[m]*3;x[C]=y[S],x[C+1]=y[S+1],x[C+2]=y[S+2],x[C+3]=255}g.blitRgbxImage(e,i,l,c,x,0,!1)}},{key:"_gradientFilter",value:function(e,i,l,c,v,y,g,x){throw new Error("Gradient filter not implemented")}},{key:"_readData",value:function(e){if(this._len===0){if(e.rQwait("TIGHT",3))return null;var i;i=e.rQshift8(),this._len=i&127,i&128&&(i=e.rQshift8(),this._len|=(i&127)<<7,i&128&&(i=e.rQshift8(),this._len|=i<<14))}if(e.rQwait("TIGHT",this._len))return null;var l=e.rQshiftBytes(this._len);return this._len=0,l}},{key:"_getScratchBuffer",value:function(e){return(!this._scratchBuffer||this._scratchBuffer.length<e)&&(this._scratchBuffer=new Uint8Array(e)),this._scratchBuffer}}]),t}();D.default=a},91649:function(Me,D,s){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=p(s(21330));function p(l){return l&&l.__esModule?l:{default:l}}function b(l){"@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(l)}function d(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}function o(l,c){for(var v=0;v<c.length;v++){var y=c[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(l,y.key,y)}}function u(l,c,v){return c&&o(l.prototype,c),v&&o(l,v),l}function h(l,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),c&&r(l,c)}function r(l,c){return r=Object.setPrototypeOf||function(y,g){return y.__proto__=g,y},r(l,c)}function n(l){var c=f();return function(){var y=e(l),g;if(c){var x=e(this).constructor;g=Reflect.construct(y,arguments,x)}else g=y.apply(this,arguments);return a(this,g)}}function a(l,c){return c&&(b(c)==="object"||typeof c=="function")?c:t(l)}function t(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function f(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}function e(l){return e=Object.setPrototypeOf?Object.getPrototypeOf:function(v){return v.__proto__||Object.getPrototypeOf(v)},e(l)}var i=function(l){h(v,l);var c=n(v);function v(){return d(this,v),c.apply(this,arguments)}return u(v,[{key:"_pngRect",value:function(g,x,E,C,m,S,k){var O=this._readData(m);return O===null?!1:(S.imageRect(g,x,E,C,"image/png",O),!0)}},{key:"_basicRect",value:function(g,x,E,C,m,S,k,O){throw new Error("BasicCompression received in TightPNG rect")}}]),v}(_.default);D.default=i},17834:function(Me,D,s){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=s(25805),p=b(s(27589));function b(r){return r&&r.__esModule?r:{default:r}}function d(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function o(r,n){for(var a=0;a<n.length;a++){var t=n[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function u(r,n,a){return n&&o(r.prototype,n),a&&o(r,a),r}var h=function(){function r(){d(this,r),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(r,[{key:"deflate",value:function(a){this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0,this.strm.output=this.outputBuffer,this.strm.avail_out=this.chunkSize,this.strm.next_out=0;var t=(0,_.deflate)(this.strm,_.Z_FULL_FLUSH),f=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=[f],i=f.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 l=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);i+=l.length,e.push(l)}while(this.strm.avail_in>0);for(var c=new Uint8Array(i),v=0,y=0;y<e.length;y++)c.set(e[y],v),v+=e[y].length;f=c}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,f}}]),r}();D.default=h},64966:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function s(E,C){if(!(E instanceof C))throw new TypeError("Cannot call a class as a function")}function _(E,C){for(var m=0;m<C.length;m++){var S=C[m];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(E,S.key,S)}}function p(E,C,m){return C&&_(E.prototype,C),m&&_(E,m),E}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],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=0,u,h,r,n,a,t;u=65536,h=1<<24,r=u|h,n=4,a=1024,t=n|a;var f=[r|a,o|o,u|o,r|t,r|n,u|t,o|n,u|o,o|a,r|a,r|t,o|a,h|t,r|n,h|o,o|n,o|t,h|a,h|a,u|a,u|a,r|o,r|o,h|t,u|n,h|n,h|n,u|n,o|o,o|t,u|t,h|o,u|o,r|t,o|n,r|o,r|a,h|o,h|o,o|a,r|n,u|o,u|a,h|n,o|a,o|n,h|t,u|t,r|t,u|n,r|o,h|t,h|n,o|t,u|t,r|a,o|t,h|a,h|a,o|o,u|n,u|a,o|o,r|n];u=1<<20,h=1<<31,r=u|h,n=32,a=32768,t=n|a;var e=[r|t,h|a,o|a,u|t,u|o,o|n,r|n,h|t,h|n,r|t,r|a,h|o,h|a,u|o,o|n,r|n,u|a,u|n,h|t,o|o,h|o,o|a,u|t,r|o,u|n,h|n,o|o,u|a,o|t,r|a,r|o,o|t,o|o,u|t,r|n,u|o,h|t,r|o,r|a,o|a,r|o,h|a,o|n,r|t,u|t,o|n,o|a,h|o,o|t,r|a,u|o,h|n,u|n,h|t,h|n,u|n,u|a,o|o,h|a,o|t,h|o,r|n,r|t,u|a];u=1<<17,h=1<<27,r=u|h,n=8,a=512,t=n|a;var i=[o|t,r|a,o|o,r|n,h|a,o|o,u|t,h|a,u|n,h|n,h|n,u|o,r|t,u|n,r|o,o|t,h|o,o|n,r|a,o|a,u|a,r|o,r|n,u|t,h|t,u|a,u|o,h|t,o|n,r|t,o|a,h|o,r|a,h|o,u|n,o|t,u|o,r|a,h|a,o|o,o|a,u|n,r|t,h|a,h|n,o|a,o|o,r|n,h|t,u|o,h|o,r|t,o|n,u|t,u|a,h|n,r|o,h|t,o|t,r|o,u|t,o|n,r|n,u|a];u=8192,h=1<<23,r=u|h,n=1,a=128,t=n|a;var l=[r|n,u|t,u|t,o|a,r|a,h|t,h|n,u|n,o|o,r|o,r|o,r|t,o|t,o|o,h|a,h|n,o|n,u|o,h|o,r|n,o|a,h|o,u|n,u|a,h|t,o|n,u|a,h|a,u|o,r|a,r|t,o|t,h|a,h|n,r|o,r|t,o|t,o|o,o|o,r|o,u|a,h|a,h|t,o|n,r|n,u|t,u|t,o|a,r|t,o|t,o|n,u|o,h|n,u|n,r|a,h|t,u|n,u|a,h|o,r|n,o|a,h|o,u|o,r|a];u=1<<25,h=1<<30,r=u|h,n=256,a=1<<19,t=n|a;var c=[o|n,u|t,u|a,r|n,o|a,o|n,h|o,u|a,h|t,o|a,u|n,h|t,r|n,r|a,o|t,h|o,u|o,h|a,h|a,o|o,h|n,r|t,r|t,u|n,r|a,h|n,o|o,r|o,u|t,u|o,r|o,o|t,o|a,r|n,o|n,u|o,h|o,u|a,r|n,h|t,u|n,h|o,r|a,u|t,h|t,o|n,u|o,r|a,r|t,o|t,r|o,r|t,u|a,o|o,h|a,r|o,o|t,u|n,h|n,o|a,o|o,h|a,u|t,h|n];u=1<<22,h=1<<29,r=u|h,n=16,a=16384,t=n|a;var v=[h|n,r|o,o|a,r|t,r|o,o|n,r|t,u|o,h|a,u|t,u|o,h|n,u|n,h|a,h|o,o|t,o|o,u|n,h|t,o|a,u|a,h|t,o|n,r|n,r|n,o|o,u|t,r|a,o|t,u|a,r|a,h|o,h|a,o|n,r|n,u|a,r|t,u|o,o|t,h|n,u|o,h|a,h|o,o|t,h|n,r|t,u|a,r|o,u|t,r|a,o|o,r|n,o|n,o|a,r|o,u|t,o|a,u|n,h|t,o|o,r|a,h|o,u|n,h|t];u=1<<21,h=1<<26,r=u|h,n=2,a=2048,t=n|a;var y=[u|o,r|n,h|t,o|o,o|a,h|t,u|t,r|a,r|t,u|o,o|o,h|n,o|n,h|o,r|n,o|t,h|a,u|t,u|n,h|a,h|n,r|o,r|a,u|n,r|o,o|a,o|t,r|t,u|a,o|n,h|o,u|a,h|o,u|a,u|o,h|t,h|t,r|n,r|n,o|n,u|n,h|o,h|a,u|o,r|a,o|t,u|t,r|a,o|t,h|n,r|t,r|o,u|a,o|o,o|n,r|t,o|o,u|t,r|o,o|a,h|n,h|a,o|a,u|n];u=1<<18,h=1<<28,r=u|h,n=64,a=4096,t=n|a;var g=[h|t,o|a,u|o,r|t,h|o,h|t,o|n,h|o,u|n,r|o,r|t,u|a,r|a,u|t,o|a,o|n,r|o,h|n,h|a,o|t,u|a,u|n,r|n,r|a,o|t,o|o,o|o,r|n,h|n,h|a,u|t,u|o,u|t,u|o,r|a,o|a,o|n,r|n,o|a,u|t,h|a,o|n,h|n,r|o,r|n,h|o,u|o,h|t,o|o,r|t,u|n,h|n,r|o,h|a,h|t,o|o,r|t,u|a,u|a,o|t,o|t,u|n,h|o,r|a],x=function(){function E(C){s(this,E),this.keys=[];for(var m=[],S=[],k=[],O=0,F=56;O<56;++O,F-=8){F+=F<-5?65:F<-3?31:F<-1?63:F===27?35:0;var z=F&7;m[O]=C[F>>>3]&1<<z?1:0}for(var H=0;H<16;++H){var q=H<<1,K=q+1;k[q]=k[K]=0;for(var $=28;$<59;$+=28)for(var R=$-28;R<$;++R){var X=R+d[H];S[R]=X<$?m[X]:m[X-28]}for(var I=0;I<24;++I)S[b[I]]!==0&&(k[q]|=1<<23-I),S[b[I+24]]!==0&&(k[K]|=1<<23-I)}for(var W=0,B=0,G=0;W<16;++W){var fe=k[B++],xe=k[B++];this.keys[G]=(fe&16515072)<<6,this.keys[G]|=(fe&4032)<<10,this.keys[G]|=(xe&16515072)>>>10,this.keys[G]|=(xe&4032)>>>6,++G,this.keys[G]=(fe&258048)<<12,this.keys[G]|=(fe&63)<<16,this.keys[G]|=(xe&258048)>>>4,this.keys[G]|=xe&63,++G}}return p(E,[{key:"enc8",value:function(m){var S=m.slice(),k=0,O,F,z;O=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],F=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],z=(O>>>4^F)&252645135,F^=z,O^=z<<4,z=(O>>>16^F)&65535,F^=z,O^=z<<16,z=(F>>>2^O)&858993459,O^=z,F^=z<<2,z=(F>>>8^O)&16711935,O^=z,F^=z<<8,F=F<<1|F>>>31&1,z=(O^F)&2863311530,O^=z,F^=z,O=O<<1|O>>>31&1;for(var H=0,q=0;H<8;++H){z=F<<28|F>>>4,z^=this.keys[q++];var K=y[z&63];K|=c[z>>>8&63],K|=i[z>>>16&63],K|=f[z>>>24&63],z=F^this.keys[q++],K|=g[z&63],K|=v[z>>>8&63],K|=l[z>>>16&63],K|=e[z>>>24&63],O^=K,z=O<<28|O>>>4,z^=this.keys[q++],K=y[z&63],K|=c[z>>>8&63],K|=i[z>>>16&63],K|=f[z>>>24&63],z=O^this.keys[q++],K|=g[z&63],K|=v[z>>>8&63],K|=l[z>>>16&63],K|=e[z>>>24&63],F^=K}for(F=F<<31|F>>>1,z=(O^F)&2863311530,O^=z,F^=z,O=O<<31|O>>>1,z=(O>>>8^F)&16711935,F^=z,O^=z<<8,z=(O>>>2^F)&858993459,F^=z,O^=z<<2,z=(F>>>16^O)&65535,O^=z,F^=z<<16,z=(F>>>4^O)&252645135,O^=z,F^=z<<4,z=[F,O],k=0;k<8;k++)S[k]=(z[k>>>2]>>>8*(3-k%4))%256,S[k]<0&&(S[k]+=256);return S}},{key:"encrypt",value:function(m){return this.enc8(m.slice(0,8)).concat(this.enc8(m.slice(8,16)))}}]),E}();D.default=x},22814:function(Me,D,s){"use strict";function _(e){"@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},_(e)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=r(s(50500)),b=u(s(57128)),d=s(41895),o=s(20860);function u(e){return e&&e.__esModule?e:{default:e}}function h(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return h=function(){return e},e}function r(e){if(e&&e.__esModule)return e;if(e===null||_(e)!=="object"&&typeof e!="function")return{default:e};var i=h();if(i&&i.has(e))return i.get(e);var l={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in e)if(Object.prototype.hasOwnProperty.call(e,v)){var y=c?Object.getOwnPropertyDescriptor(e,v):null;y&&(y.get||y.set)?Object.defineProperty(l,v,y):l[v]=e[v]}return l.default=e,i&&i.set(e,l),l}function n(e,i){if(!(e instanceof i))throw new TypeError("Cannot call a class as a function")}function a(e,i){for(var l=0;l<i.length;l++){var c=i[l];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(e,c.key,c)}}function t(e,i,l){return i&&a(e.prototype,i),l&&a(e,l),e}var f=function(){function e(i){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=i,!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(l,c){var v=this._viewportLoc;l=Math.floor(l),c=Math.floor(c),this._clipViewport||(l=-v.w,c=-v.h);var y=v.x+v.w-1,g=v.y+v.h-1;l<0&&v.x+l<0&&(l=-v.x),y+l>=this._fbWidth&&(l-=y+l-this._fbWidth+1),v.y+c<0&&(c=-v.y),g+c>=this._fbHeight&&(c-=g+c-this._fbHeight+1),!(l===0&&c===0)&&(p.Debug("viewportChange deltaX: "+l+", deltaY: "+c),v.x+=l,v.y+=c,this._damage(v.x,v.y,v.w,v.h),this.flip())}},{key:"viewportChangeSize",value:function(l,c){(!this._clipViewport||typeof l=="undefined"||typeof c=="undefined")&&(p.Debug("Setting viewport to full display region"),l=this._fbWidth,c=this._fbHeight),l=Math.floor(l),c=Math.floor(c),l>this._fbWidth&&(l=this._fbWidth),c>this._fbHeight&&(c=this._fbHeight);var v=this._viewportLoc;if(v.w!==l||v.h!==c){v.w=l,v.h=c;var y=this._target;y.width=l,y.height=c,this.viewportChangePos(0,0),this._damage(v.x,v.y,v.w,v.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(l){return this._scale===0?0:(0,o.toSigned32bit)(l/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(l){return this._scale===0?0:(0,o.toSigned32bit)(l/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(l,c){this._prevDrawStyle="",this._fbWidth=l,this._fbHeight=c;var v=this._backbuffer;if(v.width!==l||v.height!==c){var y=null;v.width>0&&v.height>0&&(y=this._drawCtx.getImageData(0,0,v.width,v.height)),v.width!==l&&(v.width=l),v.height!==c&&(v.height=c),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(l,c,v,y){l<this._damageBounds.left&&(this._damageBounds.left=l),c<this._damageBounds.top&&(this._damageBounds.top=c),l+v>this._damageBounds.right&&(this._damageBounds.right=l+v),c+y>this._damageBounds.bottom&&(this._damageBounds.bottom=c+y)}},{key:"flip",value:function(l){if(this._renderQ.length!==0&&!l)this._renderQPush({type:"flip"});else{var c=this._damageBounds.left,v=this._damageBounds.top,y=this._damageBounds.right-c,g=this._damageBounds.bottom-v,x=c-this._viewportLoc.x,E=v-this._viewportLoc.y;x<0&&(y+=x,c-=x,x=0),E<0&&(g+=E,v-=E,E=0),x+y>this._viewportLoc.w&&(y=this._viewportLoc.w-x),E+g>this._viewportLoc.h&&(g=this._viewportLoc.h-E),y>0&&g>0&&this._targetCtx.drawImage(this._backbuffer,c,v,y,g,x,E,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(l,c,v,y,g,x){this._renderQ.length!==0&&!x?this._renderQPush({type:"fill",x:l,y:c,width:v,height:y,color:g}):(this._setFillColor(g),this._drawCtx.fillRect(l,c,v,y),this._damage(l,c,v,y))}},{key:"copyImage",value:function(l,c,v,y,g,x,E){this._renderQ.length!==0&&!E?this._renderQPush({type:"copy",oldX:l,oldY:c,x:v,y,width:g,height:x}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,l,c,g,x,v,y,g,x),this._damage(v,y,g,x))}},{key:"imageRect",value:function(l,c,v,y,g,x){if(!(v===0||y===0)){var E=new Image;E.src="data: "+g+";base64,"+b.default.encode(x),this._renderQPush({type:"img",img:E,x:l,y:c,width:v,height:y})}}},{key:"startTile",value:function(l,c,v,y,g){this._tileX=l,this._tileY=c,v===16&&y===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(v,y);for(var x=g[2],E=g[1],C=g[0],m=this._tile.data,S=0;S<v*y*4;S+=4)m[S]=x,m[S+1]=E,m[S+2]=C,m[S+3]=255}},{key:"subTile",value:function(l,c,v,y,g){for(var x=g[2],E=g[1],C=g[0],m=l+v,S=c+y,k=this._tile.data,O=this._tile.width,F=c;F<S;F++)for(var z=l;z<m;z++){var H=(z+F*O)*4;k[H]=x,k[H+1]=E,k[H+2]=C,k[H+3]=255}}},{key:"finishTile",value:function(){this._drawCtx.putImageData(this._tile,this._tileX,this._tileY),this._damage(this._tileX,this._tileY,this._tile.width,this._tile.height)}},{key:"blitImage",value:function(l,c,v,y,g,x,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(v*y*4);C.set(new Uint8Array(g.buffer,0,C.length)),this._renderQPush({type:"blit",data:C,x:l,y:c,width:v,height:y})}else this._bgrxImageData(l,c,v,y,g,x)}},{key:"blitRgbImage",value:function(l,c,v,y,g,x,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(v*y*3);C.set(new Uint8Array(g.buffer,0,C.length)),this._renderQPush({type:"blitRgb",data:C,x:l,y:c,width:v,height:y})}else this._rgbImageData(l,c,v,y,g,x)}},{key:"blitRgbxImage",value:function(l,c,v,y,g,x,E){if(this._renderQ.length!==0&&!E){var C=new Uint8Array(v*y*4);C.set(new Uint8Array(g.buffer,0,C.length)),this._renderQPush({type:"blitRgbx",data:C,x:l,y:c,width:v,height:y})}else this._rgbxImageData(l,c,v,y,g,x)}},{key:"drawImage",value:function(l,c,v){this._drawCtx.drawImage(l,c,v),this._damage(c,v,l.width,l.height)}},{key:"autoscale",value:function(l,c){var v;if(l===0||c===0)v=0;else{var y=this._viewportLoc,g=l/c,x=y.w/y.h;x>=g?v=l/y.w:v=c/y.h}this._rescale(v)}},{key:"_rescale",value:function(l){this._scale=l;var c=this._viewportLoc,v=l*c.w+"px",y=l*c.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(l){var c="rgb("+l[2]+","+l[1]+","+l[0]+")";c!==this._prevDrawStyle&&(this._drawCtx.fillStyle=c,this._prevDrawStyle=c)}},{key:"_rgbImageData",value:function(l,c,v,y,g,x){for(var E=this._drawCtx.createImageData(v,y),C=E.data,m=0,S=x;m<v*y*4;m+=4,S+=3)C[m]=g[S],C[m+1]=g[S+1],C[m+2]=g[S+2],C[m+3]=255;this._drawCtx.putImageData(E,l,c),this._damage(l,c,E.width,E.height)}},{key:"_bgrxImageData",value:function(l,c,v,y,g,x){for(var E=this._drawCtx.createImageData(v,y),C=E.data,m=0,S=x;m<v*y*4;m+=4,S+=4)C[m]=g[S+2],C[m+1]=g[S+1],C[m+2]=g[S],C[m+3]=255;this._drawCtx.putImageData(E,l,c),this._damage(l,c,E.width,E.height)}},{key:"_rgbxImageData",value:function(l,c,v,y,g,x){var E;d.supportsImageMetadata?E=new ImageData(new Uint8ClampedArray(g.buffer,g.byteOffset,v*y*4),v,y):(E=this._drawCtx.createImageData(v,y),E.data.set(new Uint8ClampedArray(g.buffer,g.byteOffset,v*y*4))),this._drawCtx.putImageData(E,l,c),this._damage(l,c,E.width,E.height)}},{key:"_renderQPush",value:function(l){this._renderQ.push(l),this._renderQ.length===1&&this._scanRenderQ()}},{key:"_resumeRenderQ",value:function(){this.removeEventListener("load",this._noVNCDisplay._resumeRenderQ),this._noVNCDisplay._scanRenderQ()}},{key:"_scanRenderQ",value:function(){for(var l=!0;l&&this._renderQ.length>0;){var c=this._renderQ[0];switch(c.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(c.oldX,c.oldY,c.x,c.y,c.width,c.height,!0);break;case"fill":this.fillRect(c.x,c.y,c.width,c.height,c.color,!0);break;case"blit":this.blitImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"blitRgb":this.blitRgbImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"img":if(c.img.complete&&c.img.width!==0&&c.img.height!==0){if(c.img.width!==c.width||c.img.height!==c.height){p.Error("Decoded image has incorrect dimensions. Got "+c.img.width+"x"+c.img.height+". Expected "+c.width+"x"+c.height+".");return}this.drawImage(c.img,c.x,c.y)}else c.img._noVNCDisplay=this,c.img.addEventListener("load",this._resumeRenderQ),l=!1;break}l&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(l){this._rescale(l)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(l){this._clipViewport=l;var c=this._viewportLoc;this.viewportChangeSize(c.w,c.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),e}();D.default=f},31729:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.encodingName=_,D.encodings=void 0;var s={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=s;function _(p){switch(p){case s.encodingRaw:return"Raw";case s.encodingCopyRect:return"CopyRect";case s.encodingRRE:return"RRE";case s.encodingHextile:return"Hextile";case s.encodingTight:return"Tight";case s.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+p+"]"}}},48831:function(Me,D,s){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=s(95766),p=b(s(27589));function b(r){return r&&r.__esModule?r:{default:r}}function d(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function o(r,n){for(var a=0;a<n.length;a++){var t=n[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}function u(r,n,a){return n&&o(r.prototype,n),a&&o(r,a),r}var h=function(){function r(){d(this,r),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(r,[{key:"setInput",value:function(a){a?(this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0):(this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0)}},{key:"inflate",value:function(a){a>this.chunkSize&&(this.chunkSize=a,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=a;var t=(0,_.inflate)(this.strm,0);if(t<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=a)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,_.inflateReset)(this.strm)}}]),r}();D.default=h},18280:function(Me,D,s){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=p(s(69314));function p(r){return r&&r.__esModule?r:{default:r}}var b={};function d(r,n){if(n===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in b)throw new Error('Duplicate entry for key "'+r+'"');b[r]=[n,n,n,n]}function o(r,n,a){if(n===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in b)throw new Error('Duplicate entry for key "'+r+'"');b[r]=[n,n,a,n]}function u(r,n,a){if(n===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in b)throw new Error('Duplicate entry for key "'+r+'"');b[r]=[n,n,n,a]}o("Alt",_.default.XK_Alt_L,_.default.XK_Alt_R),d("AltGraph",_.default.XK_ISO_Level3_Shift),d("CapsLock",_.default.XK_Caps_Lock),o("Control",_.default.XK_Control_L,_.default.XK_Control_R),o("Meta",_.default.XK_Super_L,_.default.XK_Super_R),d("NumLock",_.default.XK_Num_Lock),d("ScrollLock",_.default.XK_Scroll_Lock),o("Shift",_.default.XK_Shift_L,_.default.XK_Shift_R),u("Enter",_.default.XK_Return,_.default.XK_KP_Enter),d("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),d("Backspace",_.default.XK_BackSpace),u("Clear",_.default.XK_Clear,_.default.XK_KP_Begin),d("Copy",_.default.XF86XK_Copy),d("Cut",_.default.XF86XK_Cut),u("Delete",_.default.XK_Delete,_.default.XK_KP_Delete),u("Insert",_.default.XK_Insert,_.default.XK_KP_Insert),d("Paste",_.default.XF86XK_Paste),d("Redo",_.default.XK_Redo),d("Undo",_.default.XK_Undo),d("Cancel",_.default.XK_Cancel),d("ContextMenu",_.default.XK_Menu),d("Escape",_.default.XK_Escape),d("Execute",_.default.XK_Execute),d("Find",_.default.XK_Find),d("Help",_.default.XK_Help),d("Pause",_.default.XK_Pause),d("Select",_.default.XK_Select),d("ZoomIn",_.default.XF86XK_ZoomIn),d("ZoomOut",_.default.XF86XK_ZoomOut),d("BrightnessDown",_.default.XF86XK_MonBrightnessDown),d("BrightnessUp",_.default.XF86XK_MonBrightnessUp),d("Eject",_.default.XF86XK_Eject),d("LogOff",_.default.XF86XK_LogOff),d("Power",_.default.XF86XK_PowerOff),d("PowerOff",_.default.XF86XK_PowerDown),d("PrintScreen",_.default.XK_Print),d("Hibernate",_.default.XF86XK_Hibernate),d("Standby",_.default.XF86XK_Standby),d("WakeUp",_.default.XF86XK_WakeUp),d("AllCandidates",_.default.XK_MultipleCandidate),d("Alphanumeric",_.default.XK_Eisu_Shift),d("CodeInput",_.default.XK_Codeinput),d("Compose",_.default.XK_Multi_key),d("Convert",_.default.XK_Henkan),d("GroupFirst",_.default.XK_ISO_First_Group),d("GroupLast",_.default.XK_ISO_Last_Group),d("GroupNext",_.default.XK_ISO_Next_Group),d("GroupPrevious",_.default.XK_ISO_Prev_Group),d("NonConvert",_.default.XK_Muhenkan),d("PreviousCandidate",_.default.XK_PreviousCandidate),d("SingleCandidate",_.default.XK_SingleCandidate),d("HangulMode",_.default.XK_Hangul),d("HanjaMode",_.default.XK_Hangul_Hanja),d("JunjuaMode",_.default.XK_Hangul_Jeonja),d("Eisu",_.default.XK_Eisu_toggle),d("Hankaku",_.default.XK_Hankaku),d("Hiragana",_.default.XK_Hiragana),d("HiraganaKatakana",_.default.XK_Hiragana_Katakana),d("KanaMode",_.default.XK_Kana_Shift),d("KanjiMode",_.default.XK_Kanji),d("Katakana",_.default.XK_Katakana),d("Romaji",_.default.XK_Romaji),d("Zenkaku",_.default.XK_Zenkaku),d("ZenkakuHanaku",_.default.XK_Zenkaku_Hankaku),d("F1",_.default.XK_F1),d("F2",_.default.XK_F2),d("F3",_.default.XK_F3),d("F4",_.default.XK_F4),d("F5",_.default.XK_F5),d("F6",_.default.XK_F6),d("F7",_.default.XK_F7),d("F8",_.default.XK_F8),d("F9",_.default.XK_F9),d("F10",_.default.XK_F10),d("F11",_.default.XK_F11),d("F12",_.default.XK_F12),d("F13",_.default.XK_F13),d("F14",_.default.XK_F14),d("F15",_.default.XK_F15),d("F16",_.default.XK_F16),d("F17",_.default.XK_F17),d("F18",_.default.XK_F18),d("F19",_.default.XK_F19),d("F20",_.default.XK_F20),d("F21",_.default.XK_F21),d("F22",_.default.XK_F22),d("F23",_.default.XK_F23),d("F24",_.default.XK_F24),d("F25",_.default.XK_F25),d("F26",_.default.XK_F26),d("F27",_.default.XK_F27),d("F28",_.default.XK_F28),d("F29",_.default.XK_F29),d("F30",_.default.XK_F30),d("F31",_.default.XK_F31),d("F32",_.default.XK_F32),d("F33",_.default.XK_F33),d("F34",_.default.XK_F34),d("F35",_.default.XK_F35),d("Close",_.default.XF86XK_Close),d("MailForward",_.default.XF86XK_MailForward),d("MailReply",_.default.XF86XK_Reply),d("MailSend",_.default.XF86XK_Send),d("MediaFastForward",_.default.XF86XK_AudioForward),d("MediaPause",_.default.XF86XK_AudioPause),d("MediaPlay",_.default.XF86XK_AudioPlay),d("MediaRecord",_.default.XF86XK_AudioRecord),d("MediaRewind",_.default.XF86XK_AudioRewind),d("MediaStop",_.default.XF86XK_AudioStop),d("MediaTrackNext",_.default.XF86XK_AudioNext),d("MediaTrackPrevious",_.default.XF86XK_AudioPrev),d("New",_.default.XF86XK_New),d("Open",_.default.XF86XK_Open),d("Print",_.default.XK_Print),d("Save",_.default.XF86XK_Save),d("SpellCheck",_.default.XF86XK_Spell),d("AudioVolumeDown",_.default.XF86XK_AudioLowerVolume),d("AudioVolumeUp",_.default.XF86XK_AudioRaiseVolume),d("AudioVolumeMute",_.default.XF86XK_AudioMute),d("MicrophoneVolumeMute",_.default.XF86XK_AudioMicMute),d("LaunchApplication1",_.default.XF86XK_MyComputer),d("LaunchApplication2",_.default.XF86XK_Calculator),d("LaunchCalendar",_.default.XF86XK_Calendar),d("LaunchMail",_.default.XF86XK_Mail),d("LaunchMediaPlayer",_.default.XF86XK_AudioMedia),d("LaunchMusicPlayer",_.default.XF86XK_Music),d("LaunchPhone",_.default.XF86XK_Phone),d("LaunchScreenSaver",_.default.XF86XK_ScreenSaver),d("LaunchSpreadsheet",_.default.XF86XK_Excel),d("LaunchWebBrowser",_.default.XF86XK_WWW),d("LaunchWebCam",_.default.XF86XK_WebCam),d("LaunchWordProcessor",_.default.XF86XK_Word),d("BrowserBack",_.default.XF86XK_Back),d("BrowserFavorites",_.default.XF86XK_Favorites),d("BrowserForward",_.default.XF86XK_Forward),d("BrowserHome",_.default.XF86XK_HomePage),d("BrowserRefresh",_.default.XF86XK_Refresh),d("BrowserSearch",_.default.XF86XK_Search),d("BrowserStop",_.default.XF86XK_Stop),d("Dimmer",_.default.XF86XK_BrightnessAdjust),d("MediaAudioTrack",_.default.XF86XK_AudioCycleTrack),d("RandomToggle",_.default.XF86XK_AudioRandomPlay),d("SplitScreenToggle",_.default.XF86XK_SplitScreen),d("Subtitle",_.default.XF86XK_Subtitle),d("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 h=b;D.default=h},15311:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var s={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=s},91584:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function s(g,x){if(!(g instanceof x))throw new TypeError("Cannot call a class as a function")}function _(g,x){for(var E=0;E<x.length;E++){var C=x[E];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(g,C.key,C)}}function p(g,x,E){return x&&_(g.prototype,x),E&&_(g,E),g}var b=0,d=1,o=2,u=4,h=8,r=16,n=32,a=64,t=127,f=50,e=90,i=250,l=1e3,c=1e3,v=50,y=function(){function g(){s(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(E){this.detach(),this._target=E,this._target.addEventListener("touchstart",this._boundEventHandler),this._target.addEventListener("touchmove",this._boundEventHandler),this._target.addEventListener("touchend",this._boundEventHandler),this._target.addEventListener("touchcancel",this._boundEventHandler)}},{key:"detach",value:function(){this._target&&(this._stopLongpressTimeout(),this._stopTwoTouchTimeout(),this._target.removeEventListener("touchstart",this._boundEventHandler),this._target.removeEventListener("touchmove",this._boundEventHandler),this._target.removeEventListener("touchend",this._boundEventHandler),this._target.removeEventListener("touchcancel",this._boundEventHandler),this._target=null)}},{key:"_eventHandler",value:function(E){var C;switch(E.stopPropagation(),E.preventDefault(),E.type){case"touchstart":C=this._touchStart;break;case"touchmove":C=this._touchMove;break;case"touchend":case"touchcancel":C=this._touchEnd;break}for(var m=0;m<E.changedTouches.length;m++){var S=E.changedTouches[m];C.call(this,S.identifier,S.clientX,S.clientY)}}},{key:"_touchStart",value:function(E,C,m){if(this._hasDetectedGesture()||this._state===b){this._ignored.push(E);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>i){this._state=b,this._ignored.push(E);return}if(this._waitingRelease){this._state=b,this._ignored.push(E);return}switch(this._tracked.push({id:E,started:Date.now(),active:!0,firstX:C,firstY:m,lastX:C,lastY:m,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(d|h|r),this._stopLongpressTimeout();break;case 3:this._state&=~(o|n|a);break;default:this._state=b}}},{key:"_touchMove",value:function(E,C,m){var S=this._tracked.find(function(q){return q.id===E});if(S!==void 0){S.lastX=C,S.lastY=m;var k=C-S.firstX,O=m-S.firstY;if((S.firstX!==S.lastX||S.firstY!==S.lastY)&&(S.angle=Math.atan2(O,k)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(k,O)<f)return;if(this._state&=~(d|o|u|r),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~h),this._tracked.length!==2&&(this._state&=~(n|a)),this._tracked.length===2){var F=this._tracked.find(function(q){return q.id!==E}),z=Math.hypot(F.firstX-F.lastX,F.firstY-F.lastY);if(z>f){var H=Math.abs(S.angle-F.angle);H=Math.abs((H+180)%360-180),H>e?this._state&=~n:this._state&=~a,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}}},{key:"_touchEnd",value:function(E,C,m){if(this._ignored.indexOf(E)!==-1){this._ignored.splice(this._ignored.indexOf(E),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&=~(h|n|a),this._state&=~r,this._stopLongpressTimeout(),!this._waitingRelease))switch(this._releaseStart=Date.now(),this._waitingRelease=!0,this._tracked.length){case 1:this._state&=~(o|u);break;case 2:this._state&=~(d|u);break}if(this._waitingRelease){Date.now()-this._releaseStart>i&&(this._state=b),this._tracked.some(function(O){return Date.now()-O.started>l})&&(this._state=b);var S=this._tracked.find(function(O){return O.id===E});if(S.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==b)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var k=0;k<this._tracked.length;k++)this._tracked[k].active&&this._ignored.push(this._tracked[k].id);this._tracked=[],this._state=b,this._ignored.indexOf(E)!==-1&&this._ignored.splice(this._ignored.indexOf(E),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&(d|o|u)&&this._tracked.some(function(E){return E.active}))}},{key:"_startLongpressTimeout",value:function(){var E=this;this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout(function(){return E._longpressTimeout()},c)}},{key:"_stopLongpressTimeout",value:function(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}},{key:"_longpressTimeout",value:function(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=r,this._pushEvent("gesturestart")}},{key:"_startTwoTouchTimeout",value:function(){var E=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return E._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 E=this._getAverageMovement(),C=Math.abs(E.x),m=Math.abs(E.y),S=this._getAverageDistance(),k=Math.abs(Math.hypot(S.first.x,S.first.y)-Math.hypot(S.last.x,S.last.y));m<k&&C<k?this._state=a:this._state=n,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(E){var C={type:this._stateToGesture(this._state)},m=this._getPosition(),S=m.last;switch(E==="gesturestart"&&(S=m.first),this._state){case n:case a:S=m.first;break}if(C.clientX=S.x,C.clientY=S.y,this._state===a){var k=this._getAverageDistance();E==="gesturestart"?(C.magnitudeX=k.first.x,C.magnitudeY=k.first.y):(C.magnitudeX=k.last.x,C.magnitudeY=k.last.y)}else if(this._state===n)if(E==="gesturestart")C.magnitudeX=0,C.magnitudeY=0;else{var O=this._getAverageMovement();C.magnitudeX=O.x,C.magnitudeY=O.y}var F=new CustomEvent(E,{detail:C});this._target.dispatchEvent(F)}},{key:"_stateToGesture",value:function(E){switch(E){case d:return"onetap";case o:return"twotap";case u:return"threetap";case h:return"drag";case r:return"longpress";case n:return"twodrag";case a:return"pinch"}throw new Error("Unknown gesture state: "+E)}},{key:"_getPosition",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture position, no tracked touches");for(var E=this._tracked.length,C=0,m=0,S=0,k=0,O=0;O<this._tracked.length;O++)C+=this._tracked[O].firstX,m+=this._tracked[O].firstY,S+=this._tracked[O].lastX,k+=this._tracked[O].lastY;return{first:{x:C/E,y:m/E},last:{x:S/E,y:k/E}}}},{key:"_getAverageMovement",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture movement, no tracked touches");var E,C;E=C=0;for(var m=this._tracked.length,S=0;S<this._tracked.length;S++)E+=this._tracked[S].lastX-this._tracked[S].firstX,C+=this._tracked[S].lastY-this._tracked[S].firstY;return{x:E/m,y:C/m}}},{key:"_getAverageDistance",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture distance, no tracked touches");var E=this._tracked[0],C=this._tracked[this._tracked.length-1],m=Math.abs(C.firstX-E.firstX),S=Math.abs(C.firstY-E.firstY),k=Math.abs(C.lastX-E.lastX),O=Math.abs(C.lastY-E.lastY);return{first:{x:m,y:S},last:{x:k,y:O}}}}]),g}();D.default=y},1606:function(Me,D,s){"use strict";function _(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(c){return typeof c}:_=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},_(i)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var p=n(s(50500)),b=s(79420),d=n(s(50556)),o=h(s(69314)),u=n(s(41895));function h(i){return i&&i.__esModule?i:{default:i}}function r(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return r=function(){return i},i}function n(i){if(i&&i.__esModule)return i;if(i===null||_(i)!=="object"&&typeof i!="function")return{default:i};var l=r();if(l&&l.has(i))return l.get(i);var c={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in i)if(Object.prototype.hasOwnProperty.call(i,y)){var g=v?Object.getOwnPropertyDescriptor(i,y):null;g&&(g.get||g.set)?Object.defineProperty(c,y,g):c[y]=i[y]}return c.default=i,l&&l.set(i,c),c}function a(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}function t(i,l){for(var c=0;c<l.length;c++){var v=l[c];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(i,v.key,v)}}function f(i,l,c){return l&&t(i.prototype,l),c&&t(i,c),i}var e=function(){function i(l){a(this,i),this._target=l||null,this._keyDownList={},this._pendingKey=null,this._altGrArmed=!1,this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),keypress:this._handleKeyPress.bind(this),blur:this._allKeysUp.bind(this),checkalt:this._checkAlt.bind(this)},this.onkeyevent=function(){}}return f(i,[{key:"_sendKeyEvent",value:function(c,v,y){if(y)this._keyDownList[v]=c;else{if(!(v in this._keyDownList))return;delete this._keyDownList[v]}p.Debug("onkeyevent "+(y?"down":"up")+", keysym: "+c,", code: "+v),this.onkeyevent(c,v,y)}},{key:"_getKeyCode",value:function(c){var v=d.getKeycode(c);if(v!=="Unidentified")return v;if(c.keyCode&&c.type!=="keypress"&&c.keyCode!==229)return"Platform"+c.keyCode;if(c.keyIdentifier){if(c.keyIdentifier.substr(0,2)!=="U+")return c.keyIdentifier;var y=parseInt(c.keyIdentifier.substr(2),16),g=String.fromCharCode(y).toUpperCase();return"Platform"+g.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(c){var v=this._getKeyCode(c),y=d.getKeysym(c);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),v==="AltRight"&&c.timeStamp-this._altGrCtrlTime<50?y=o.default.XK_ISO_Level3_Shift:this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),v==="Unidentified"){y&&(this._sendKeyEvent(y,v,!0),this._sendKeyEvent(y,v,!1)),(0,b.stopEvent)(c);return}if(u.isMac()||u.isIOS())switch(y){case o.default.XK_Super_L:y=o.default.XK_Alt_L;break;case o.default.XK_Super_R:y=o.default.XK_Super_L;break;case o.default.XK_Alt_L:y=o.default.XK_Mode_switch;break;case o.default.XK_Alt_R:y=o.default.XK_ISO_Level3_Shift;break}if(v in this._keyDownList&&(y=this._keyDownList[v]),(u.isMac()||u.isIOS())&&v==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1),(0,b.stopEvent)(c);return}if(!y&&(!c.key||u.isIE()||u.isEdge())){this._pendingKey=v,setTimeout(this._handleKeyPressTimeout.bind(this),10,c);return}if(this._pendingKey=null,(0,b.stopEvent)(c),v==="ControlLeft"&&u.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=c.timeStamp;return}this._sendKeyEvent(y,v,!0)}},{key:"_handleKeyPress",value:function(c){if((0,b.stopEvent)(c),this._pendingKey!==null){var v=this._getKeyCode(c),y=d.getKeysym(c);if(!(v!=="Unidentified"&&v!=this._pendingKey)){if(v=this._pendingKey,this._pendingKey=null,!y){p.Info("keypress with no keysym:",c);return}this._sendKeyEvent(y,v,!0)}}}},{key:"_handleKeyPressTimeout",value:function(c){if(this._pendingKey!==null){var v,y=this._pendingKey;if(this._pendingKey=null,c.keyCode>=48&&c.keyCode<=57)v=c.keyCode;else if(c.keyCode>=65&&c.keyCode<=90){var g=String.fromCharCode(c.keyCode);c.shiftKey?g=g.toUpperCase():g=g.toLowerCase(),v=g.charCodeAt()}else v=0;this._sendKeyEvent(v,y,!0)}}},{key:"_handleKeyUp",value:function(c){(0,b.stopEvent)(c);var v=this._getKeyCode(c);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)),(u.isMac()||u.isIOS())&&v==="CapsLock"){this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(o.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[v],v,!1),u.isWindows()&&(v==="ShiftLeft"||v==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(o.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){p.Debug(">> Keyboard.allKeysUp");for(var c in this._keyDownList)this._sendKeyEvent(this._keyDownList[c],c,!1);p.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(c){if(!c.skipCheckAlt&&!c.altKey){var v=this._target,y=this._keyDownList;["AltLeft","AltRight"].forEach(function(g){if(g in y){var x=new KeyboardEvent("keyup",{key:y[g],code:g});x.skipCheckAlt=!0,v.dispatchEvent(x)}})}}},{key:"grab",value:function(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),u.isWindows()&&u.isFirefox()){var c=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(v){return document.addEventListener(v,c,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(u.isWindows()&&u.isFirefox()){var c=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(v){return document.removeEventListener(v,c)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),i}();D.default=e},69314:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var s={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=s},44836:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var s={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 d=s[b];return d!==void 0?d:16777216|b}};D.default=_},50556:function(Me,D,s){"use strict";function _(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(c){return typeof c}:_=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},_(i)}Object.defineProperty(D,"__esModule",{value:!0}),D.getKeycode=t,D.getKey=f,D.getKeysym=e;var p=a(s(69314)),b=a(s(44836)),d=a(s(88193)),o=a(s(15311)),u=a(s(18280)),h=n(s(41895));function r(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return r=function(){return i},i}function n(i){if(i&&i.__esModule)return i;if(i===null||_(i)!=="object"&&typeof i!="function")return{default:i};var l=r();if(l&&l.has(i))return l.get(i);var c={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in i)if(Object.prototype.hasOwnProperty.call(i,y)){var g=v?Object.getOwnPropertyDescriptor(i,y):null;g&&(g.get||g.set)?Object.defineProperty(c,y,g):c[y]=i[y]}return c.default=i,l&&l.set(i,c),c}function a(i){return i&&i.__esModule?i:{default:i}}function t(i){if(i.code){switch(i.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return i.code}if(i.type!=="keypress"&&i.keyCode in d.default){var l=d.default[i.keyCode];if(h.isMac()&&l==="ContextMenu"&&(l="MetaRight"),i.location===2)switch(l){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(i.location===3)switch(l){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return l}return"Unidentified"}function f(i){if(i.key!==void 0){switch(i.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 i.char}switch(i.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(i.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(i.key==="\0"&&i.code==="NumpadDecimal")return"Delete";if(!h.isIE()&&!h.isEdge()||i.key.length!==1&&i.key!=="Unidentified")return i.key}var l=t(i);return l in o.default?o.default[l]:i.charCode?String.fromCharCode(i.charCode):"Unidentified"}function e(i){var l=f(i);if(l==="Unidentified")return null;if(l in u.default){var c=i.location;if(l==="Meta"&&c===0&&(c=2),l==="Clear"&&c===3){var v=t(i);v==="NumLock"&&(c=0)}if((c===void 0||c>3)&&(c=0),l==="Meta"){var y=t(i);if(y==="AltLeft")return p.default.XK_Meta_L;if(y==="AltRight")return p.default.XK_Meta_R}if(l==="Clear"){var g=t(i);if(g==="NumLock")return p.default.XK_Num_Lock}return u.default[l][c]}if(l.length!==1)return null;var x=l.charCodeAt();return x?b.default.lookup(x):null}},88193:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var s={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=s},87619:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var s={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=s},62013:function(Me,D,s){"use strict";var _;_={value:!0},D.Z=void 0;var p=s(20860),b=z(s(50500)),d=s(31516),o=s(41895),u=s(92742),h=s(79420),r=O(s(5004)),n=O(s(22814)),a=O(s(48831)),t=O(s(17834)),f=O(s(1606)),e=O(s(91584)),i=O(s(54641)),l=O(s(16327)),c=O(s(64966)),v=O(s(69314)),y=O(s(87619)),g=s(31729);s(21882);var x=O(s(11231)),E=O(s(17852)),C=O(s(57507)),m=O(s(18330)),S=O(s(21330)),k=O(s(91649));function O(_e){return _e&&_e.__esModule?_e:{default:_e}}function F(){if(typeof WeakMap!="function")return null;var _e=new WeakMap;return F=function(){return _e},_e}function z(_e){if(_e&&_e.__esModule)return _e;if(_e===null||H(_e)!=="object"&&typeof _e!="function")return{default:_e};var ce=F();if(ce&&ce.has(_e))return ce.get(_e);var ue={},ee=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var L in _e)if(Object.prototype.hasOwnProperty.call(_e,L)){var U=ee?Object.getOwnPropertyDescriptor(_e,L):null;U&&(U.get||U.set)?Object.defineProperty(ue,L,U):ue[L]=_e[L]}return ue.default=_e,ce&&ce.set(_e,ue),ue}function H(_e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H=function(ue){return typeof ue}:H=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},H(_e)}function q(_e,ce){if(!(_e instanceof ce))throw new TypeError("Cannot call a class as a function")}function K(_e,ce){for(var ue=0;ue<ce.length;ue++){var ee=ce[ue];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(_e,ee.key,ee)}}function $(_e,ce,ue){return ce&&K(_e.prototype,ce),ue&&K(_e,ue),_e}function R(_e,ce){if(typeof ce!="function"&&ce!==null)throw new TypeError("Super expression must either be null or a function");_e.prototype=Object.create(ce&&ce.prototype,{constructor:{value:_e,writable:!0,configurable:!0}}),ce&&X(_e,ce)}function X(_e,ce){return X=Object.setPrototypeOf||function(ee,L){return ee.__proto__=L,ee},X(_e,ce)}function I(_e){var ce=G();return function(){var ee=fe(_e),L;if(ce){var U=fe(this).constructor;L=Reflect.construct(ee,arguments,U)}else L=ee.apply(this,arguments);return W(this,L)}}function W(_e,ce){return ce&&(H(ce)==="object"||typeof ce=="function")?ce:B(_e)}function B(_e){if(_e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e}function G(){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(_e){return!1}}function fe(_e){return fe=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},fe(_e)}var xe=3,Le="rgb(40, 40, 40)",ke=17,ae=50,ge=19,Fe=75,Te=50,Oe=1e3,Pe=50,De=1,Xe=null,Ke=null,Ue=null,oe=null,me=1<<24,se=1<<25,J=1<<26,ne=1<<27,Se=1<<28,be=function(_e){R(ue,_e);var ce=I(ue);function ue(ee,L,U){var T;if(q(this,ue),!ee)throw new Error("Must specify target");if(!L)throw new Error("Must specify URL");T=ce.call(this),T._target=ee,T._url=L,U=U||{},T._rfbCredentials=U.credentials||{},T._shared="shared"in U?!!U.shared:!0,T._repeaterID=U.repeaterID||"",T._wsProtocols=U.wsProtocols||[],T._rfbConnectionState="",T._rfbInitState="",T._rfbAuthScheme=-1,T._rfbCleanDisconnect=!0,T._rfbVersion=0,T._rfbMaxVersion=3.8,T._rfbTightVNC=!1,T._rfbVeNCryptState=0,T._rfbXvpVer=0,T._fbWidth=0,T._fbHeight=0,T._fbName="",T._capabilities={power:!1},T._supportsFence=!1,T._supportsContinuousUpdates=!1,T._enabledContinuousUpdates=!1,T._supportsSetDesktopSize=!1,T._screenID=0,T._screenFlags=0,T._qemuExtKeyEventSupported=!1,T._clipboardText=null,T._clipboardServerCapabilitiesActions={},T._clipboardServerCapabilitiesFormats={},T._sock=null,T._display=null,T._flushing=!1,T._keyboard=null,T._gestures=null,T._disconnTimer=null,T._resizeTimeout=null,T._mouseMoveTimer=null,T._decoders={},T._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},T._mousePos={},T._mouseButtonMask=0,T._mouseLastMoveTime=0,T._viewportDragging=!1,T._viewportDragPos={},T._viewportHasMoved=!1,T._accumulatedWheelDeltaX=0,T._accumulatedWheelDeltaY=0,T._gestureLastTapTime=null,T._gestureFirstDoubleTapEv=null,T._gestureLastMagnitudeX=0,T._gestureLastMagnitudeY=0,T._eventHandlers={focusCanvas:T._focusCanvas.bind(B(T)),windowResize:T._windowResize.bind(B(T)),handleMouse:T._handleMouse.bind(B(T)),handleWheel:T._handleWheel.bind(B(T)),handleGesture:T._handleGesture.bind(B(T))},b.Debug(">> RFB.constructor"),T._screen=document.createElement("div"),T._screen.style.display="flex",T._screen.style.width="100%",T._screen.style.height="100%",T._screen.style.overflow="auto",T._screen.style.background=Le,T._canvas=document.createElement("canvas"),T._canvas.style.margin="auto",T._canvas.style.outline="none",T._canvas.style.flexShrink="0",T._canvas.width=0,T._canvas.height=0,T._canvas.tabIndex=-1,T._screen.appendChild(T._canvas),T._cursor=new i.default,T._cursorImage=ue.cursors.none,T._decoders[g.encodings.encodingRaw]=new x.default,T._decoders[g.encodings.encodingCopyRect]=new E.default,T._decoders[g.encodings.encodingRRE]=new C.default,T._decoders[g.encodings.encodingHextile]=new m.default,T._decoders[g.encodings.encodingTight]=new S.default,T._decoders[g.encodings.encodingTightPNG]=new k.default;try{T._display=new n.default(T._canvas)}catch(Y){throw b.Error("Display exception: "+Y),Y}return T._display.onflush=T._onFlush.bind(B(T)),T._keyboard=new f.default(T._canvas),T._keyboard.onkeyevent=T._handleKeyEvent.bind(B(T)),T._gestures=new e.default,T._sock=new l.default,T._sock.on("message",function(){T._handleMessage()}),T._sock.on("open",function(){T._rfbConnectionState==="connecting"&&T._rfbInitState===""?(T._rfbInitState="ProtocolVersion",b.Debug("Starting VNC handshake")):T._fail("Unexpected server connection while "+T._rfbConnectionState)}),T._sock.on("close",function(Y){b.Debug("WebSocket on-close event");var pe="";switch(Y.code&&(pe="(code: "+Y.code,Y.reason&&(pe+=", reason: "+Y.reason),pe+=")"),T._rfbConnectionState){case"connecting":T._fail("Connection closed "+pe);break;case"connected":T._updateConnectionState("disconnecting"),T._updateConnectionState("disconnected");break;case"disconnecting":T._updateConnectionState("disconnected");break;case"disconnected":T._fail("Unexpected server disconnect when already disconnected "+pe);break;default:T._fail("Unexpected server disconnect before connecting "+pe);break}T._sock.off("close")}),T._sock.on("error",function(Y){return b.Warn("WebSocket on-error event")}),setTimeout(T._updateConnectionState.bind(B(T),"connecting")),b.Debug("<< RFB.constructor"),T.dragViewport=!1,T.focusOnClick=!0,T._viewOnly=!1,T._clipViewport=!1,T._scaleViewport=!1,T._resizeSession=!1,T._showDotCursor=!1,U.showDotCursor!==void 0&&(b.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),T._showDotCursor=U.showDotCursor),T._qualityLevel=6,T._compressionLevel=2,T}return $(ue,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(L){this._rfbCredentials=L,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(L,U,T){if(!(this._rfbConnectionState!=="connected"||this._viewOnly)){if(T===void 0){this.sendKey(L,U,!0),this.sendKey(L,U,!1);return}var Y=y.default[U];if(this._qemuExtKeyEventSupported&&Y)L=L||0,b.Info("Sending key ("+(T?"down":"up")+"): keysym "+L+", scancode "+Y),ue.messages.QEMUExtendedKeyEvent(this._sock,L,T,Y);else{if(!L)return;b.Info("Sending keysym ("+(T?"down":"up")+"): "+L),ue.messages.keyEvent(this._sock,L,T?1:0)}}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(L){if(!(this._rfbConnectionState!=="connected"||this._viewOnly))if(this._clipboardServerCapabilitiesFormats[De]&&this._clipboardServerCapabilitiesActions[ne])this._clipboardText=L,ue.messages.extendedClipboardNotify(this._sock,[De]);else{for(var U=new Uint8Array(L.length),T=0;T<L.length;T++)U[T]=L.charCodeAt(T);ue.messages.clientCutText(this._sock,U)}}},{key:"_connect",value:function(){b.Debug(">> RFB.connect"),b.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(L){L.name==="SyntaxError"?this._fail("Invalid host or port ("+L+")"):this._fail("Error when opening socket ("+L+")")}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(L){if(L.name!=="NotFoundError")throw L}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),b.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(L){this.focusOnClick&&this.focus()}},{key:"_setDesktopName",value:function(L){this._fbName=L,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(L){var U=this;window.requestAnimationFrame(function(){U._updateClip(),U._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var L=this._display.clipViewport,U=this._clipViewport;if(this._scaleViewport&&(U=!1),L!==U&&(this._display.clipViewport=U),U){var T=this._screenSize();this._display.viewportChangeSize(T.w,T.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var L=this._screenSize();this._display.autoscale(L.w,L.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!(!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)){var L=this._screenSize();ue.messages.setDesktopSize(this._sock,Math.floor(L.w),Math.floor(L.h),this._screenID,this._screenFlags),b.Debug("Requested new desktop size: "+L.w+"x"+L.h)}}},{key:"_screenSize",value:function(){var L=this._screen.getBoundingClientRect();return{w:L.width,h:L.height}}},{key:"_fixScrollbars",value:function(){var L=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=L}},{key:"_updateConnectionState",value:function(L){var U=this,T=this._rfbConnectionState;if(L===T){b.Debug("Already in state '"+L+"', ignoring");return}if(T==="disconnected"){b.Error("Tried changing state of a disconnected RFB object");return}switch(L){case"connected":if(T!=="connecting"){b.Error("Bad transition to connected state, previous connection state: "+T);return}break;case"disconnected":if(T!=="disconnecting"){b.Error("Bad transition to disconnected state, previous connection state: "+T);return}break;case"connecting":if(T!==""){b.Error("Bad transition to connecting state, previous connection state: "+T);return}break;case"disconnecting":if(T!=="connected"&&T!=="connecting"){b.Error("Bad transition to disconnecting state, previous connection state: "+T);return}break;default:b.Error("Unknown connection state: "+L);return}switch(this._rfbConnectionState=L,b.Debug("New state '"+L+"', was '"+T+"'."),this._disconnTimer&&L!=="disconnecting"&&(b.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close")),L){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."),U._updateConnectionState("disconnected")},xe*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(L){switch(this._rfbConnectionState){case"disconnecting":b.Error("Failed when disconnecting: "+L);break;case"connected":b.Error("Failed while connected: "+L);break;case"connecting":b.Error("Failed when connecting: "+L);break;default:b.Error("RFB failure: "+L);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(L,U){this._capabilities[L]=U,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(L,U,T){this.sendKey(L,U,T)}},{key:"_handleMouse",value:function(L){if(!(L.type==="click"&&L.target!==this._canvas)&&(L.stopPropagation(),L.preventDefault(),!(L.type==="click"||L.type==="contextmenu"))){var U=(0,u.clientToElement)(L.clientX,L.clientY,this._canvas);switch(L.type){case"mousedown":(0,h.setCapture)(this._canvas),this._handleMouseButton(U.x,U.y,!0,1<<L.button);break;case"mouseup":this._handleMouseButton(U.x,U.y,!1,1<<L.button);break;case"mousemove":this._handleMouseMove(U.x,U.y);break}}}},{key:"_handleMouseButton",value:function(L,U,T,Y){if(this.dragViewport)if(T&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:L,y:U},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(L,U,Y)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(L,U,this._mouseButtonMask)),T?this._mouseButtonMask|=Y:this._mouseButtonMask&=~Y,this._sendMouse(L,U,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(L,U){var T=this;if(this._viewportDragging){var Y=this._viewportDragPos.x-L,pe=this._viewportDragPos.y-U;(this._viewportHasMoved||Math.abs(Y)>o.dragThreshold||Math.abs(pe)>o.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:L,y:U},this._display.viewportChangePos(Y,pe));return}if(this._mousePos={x:L,y:U},this._mouseMoveTimer==null){var Ce=Date.now()-this._mouseLastMoveTime;Ce>ke?(this._sendMouse(L,U,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){T._handleDelayedMouseMove()},ke-Ce)}}},{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(L,U,T){this._rfbConnectionState==="connected"&&(this._viewOnly||ue.messages.pointerEvent(this._sock,this._display.absX(L),this._display.absY(U),T))}},{key:"_handleWheel",value:function(L){if(this._rfbConnectionState==="connected"&&!this._viewOnly){L.stopPropagation(),L.preventDefault();var U=(0,u.clientToElement)(L.clientX,L.clientY,this._canvas),T=L.deltaX,Y=L.deltaY;L.deltaMode!==0&&(T*=ge,Y*=ge),this._accumulatedWheelDeltaX+=T,this._accumulatedWheelDeltaY+=Y,Math.abs(this._accumulatedWheelDeltaX)>=ae&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(U.x,U.y,!0,32),this._handleMouseButton(U.x,U.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(U.x,U.y,!0,64),this._handleMouseButton(U.x,U.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=ae&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(U.x,U.y,!0,8),this._handleMouseButton(U.x,U.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(U.x,U.y,!0,16),this._handleMouseButton(U.x,U.y,!1,16)),this._accumulatedWheelDeltaY=0)}}},{key:"_fakeMouseMove",value:function(L,U,T){this._handleMouseMove(U,T),this._cursor.move(L.detail.clientX,L.detail.clientY)}},{key:"_handleTapEvent",value:function(L,U){var T=(0,u.clientToElement)(L.detail.clientX,L.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<Oe&&this._gestureFirstDoubleTapEv.detail.type===L.detail.type){var Y=this._gestureFirstDoubleTapEv.detail.clientX-L.detail.clientX,pe=this._gestureFirstDoubleTapEv.detail.clientY-L.detail.clientY,Ce=Math.hypot(Y,pe);Ce<Pe?T=(0,u.clientToElement)(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=L}else this._gestureFirstDoubleTapEv=L;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,U),this._handleMouseButton(T.x,T.y,!1,U)}},{key:"_handleGesture",value:function(L){var U,T=(0,u.clientToElement)(L.detail.clientX,L.detail.clientY,this._canvas);switch(L.type){case"gesturestart":switch(L.detail.type){case"onetap":this._handleTapEvent(L,1);break;case"twotap":this._handleTapEvent(L,4);break;case"threetap":this._handleTapEvent(L,2);break;case"drag":this._fakeMouseMove(L,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,1);break;case"longpress":this._fakeMouseMove(L,T.x,T.y),this._handleMouseButton(T.x,T.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=L.detail.magnitudeX,this._gestureLastMagnitudeY=L.detail.magnitudeY,this._fakeMouseMove(L,T.x,T.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(L.detail.magnitudeX,L.detail.magnitudeY),this._fakeMouseMove(L,T.x,T.y);break}break;case"gesturemove":switch(L.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(L,T.x,T.y);break;case"twodrag":for(this._fakeMouseMove(L,T.x,T.y);L.detail.magnitudeY-this._gestureLastMagnitudeY>Te;)this._handleMouseButton(T.x,T.y,!0,8),this._handleMouseButton(T.x,T.y,!1,8),this._gestureLastMagnitudeY+=Te;for(;L.detail.magnitudeY-this._gestureLastMagnitudeY<-Te;)this._handleMouseButton(T.x,T.y,!0,16),this._handleMouseButton(T.x,T.y,!1,16),this._gestureLastMagnitudeY-=Te;for(;L.detail.magnitudeX-this._gestureLastMagnitudeX>Te;)this._handleMouseButton(T.x,T.y,!0,32),this._handleMouseButton(T.x,T.y,!1,32),this._gestureLastMagnitudeX+=Te;for(;L.detail.magnitudeX-this._gestureLastMagnitudeX<-Te;)this._handleMouseButton(T.x,T.y,!0,64),this._handleMouseButton(T.x,T.y,!1,64),this._gestureLastMagnitudeX-=Te;break;case"pinch":if(this._fakeMouseMove(L,T.x,T.y),U=Math.hypot(L.detail.magnitudeX,L.detail.magnitudeY),Math.abs(U-this._gestureLastMagnitudeX)>Fe){for(this._handleKeyEvent(v.default.XK_Control_L,"ControlLeft",!0);U-this._gestureLastMagnitudeX>Fe;)this._handleMouseButton(T.x,T.y,!0,8),this._handleMouseButton(T.x,T.y,!1,8),this._gestureLastMagnitudeX+=Fe;for(;U-this._gestureLastMagnitudeX<-Fe;)this._handleMouseButton(T.x,T.y,!0,16),this._handleMouseButton(T.x,T.y,!1,16),this._gestureLastMagnitudeX-=Fe}this._handleKeyEvent(v.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(L.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(L,T.x,T.y),this._handleMouseButton(T.x,T.y,!1,1);break;case"longpress":this._fakeMouseMove(L,T.x,T.y),this._handleMouseButton(T.x,T.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var L=this._sock.rQshiftStr(12).substr(4,7);b.Info("Server ProtocolVersion: "+L);var U=0;switch(L){case"000.000":U=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 "+L)}if(U){for(var T="ID:"+this._repeaterID;T.length<250;)T+="\0";return this._sock.sendString(T),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var Y="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+Y+`
`),b.Debug("Sent ProtocolVersion: "+Y),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function L(Y,pe){for(var Ce=0;Ce<pe.length;Ce++)if(pe[Ce]===Y)return!0;return!1}if(this._rfbVersion>=3.7){var U=this._sock.rQshift8();if(this._sock.rQwait("security type",U,1))return!1;if(U===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var T=this._sock.rQshiftBytes(U);if(b.Debug("Server security types: "+T),L(1,T))this._rfbAuthScheme=1;else if(L(22,T))this._rfbAuthScheme=22;else if(L(16,T))this._rfbAuthScheme=16;else if(L(2,T))this._rfbAuthScheme=2;else if(L(19,T))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+T+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",b.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var L=this._sock.rQshift32(),U="";if(L>0){if(this._sock.rQwait("reason",L,4))return!1;U=this._sock.rQshiftStr(L)}return U!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:U}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+U+")")):(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 L=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(L),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var L=this._sock.rQshift8(),U=this._sock.rQshift8();if(!(L==0&&U==2))return this._fail("Unsupported VeNCrypt version "+L+"."+U);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var T=this._sock.rQshift8();if(T!=0)return this._fail("VeNCrypt failure "+T);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var Y=this._sock.rQshift8();if(Y<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=Y,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var pe=[],Ce=0;Ce<this._rfbVeNCryptSubtypesLength;Ce++)pe.push(this._sock.rQshift32());if(pe.indexOf(256)!=-1)this._sock.send([0,0,1,0]),this._rfbVeNCryptState=4;else return this._fail("VeNCrypt Plain subtype not offered by server")}if(this._rfbVeNCryptState==4){if(!this._rfbCredentials.username||!this._rfbCredentials.password)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1;var Z=(0,d.encodeUTF8)(this._rfbCredentials.username),A=(0,d.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,Z.length]),this._sock.send([0,0,0,A.length]),this._sock.sendString(Z),this._sock.sendString(A),this._rfbInitState="SecurityResult",!0}}},{key:"_negotiateStdVNCAuth",value:function(){if(this._sock.rQwait("auth challenge",16))return!1;if(this._rfbCredentials.password===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["password"]}})),!1;var L=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),U=ue.genDES(this._rfbCredentials.password,L);return this._sock.send(U),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(L){for(var U={0:{vendor:"TGHT",signature:"NOTUNNEL"}},T={},Y=0;Y<L;Y++){var pe=this._sock.rQshift32(),Ce=this._sock.rQshiftStr(4),Z=this._sock.rQshiftStr(8);T[pe]={vendor:Ce,signature:Z}}return b.Debug("Server Tight tunnel types: "+T),T[1]&&T[1].vendor==="SICR"&&T[1].signature==="SCHANNEL"&&(b.Debug("Detected Siemens server. Assuming NOTUNNEL support."),T[0]={vendor:"TGHT",signature:"NOTUNNEL"}),T[0]?T[0].vendor!=U[0].vendor||T[0].signature!=U[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(b.Debug("Selected tunnel type: "+U[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 L=this._sock.rQshift32();if(L>0&&this._sock.rQwait("tunnel capabilities",16*L,4))return!1;if(this._rfbTightVNC=!0,L>0)return this._negotiateTightTunnels(L),!1}if(this._sock.rQwait("sub auth count",4))return!1;var U=this._sock.rQshift32();if(U===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*U,4))return!1;for(var T={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},Y=[],pe=0;pe<U;pe++){this._sock.rQshift32();var Ce=this._sock.rQshiftStr(12);Y.push(Ce)}b.Debug("Server Tight authentication types: "+Y);for(var Z in T)if(Y.indexOf(Z)!=-1)switch(this._sock.send([0,0,0,T[Z]]),b.Debug("Selected authentication type: "+Z),Z){case"STDVNOAUTH__":return this._rfbInitState="SecurityResult",!0;case"STDVVNCAUTH_":return this._rfbAuthScheme=2,this._initMsg();case"TGHTULGNAUTH":return this._rfbAuthScheme=129,this._initMsg();default:return this._fail("Unsupported tiny auth scheme (scheme: "+Z+")")}return this._fail("No supported sub-auth types!")}},{key:"_negotiateAuthentication",value:function(){switch(this._rfbAuthScheme){case 1:return this._rfbVersion>=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var L=this._sock.rQshift32();return L===0?(this._rfbInitState="ClientInitialisation",b.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=L,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:L}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var L=this._sock.rQshift16(),U=this._sock.rQshift16(),T=this._sock.rQshift8(),Y=this._sock.rQshift8(),pe=this._sock.rQshift8(),Ce=this._sock.rQshift8(),Z=this._sock.rQshift16(),A=this._sock.rQshift16(),Q=this._sock.rQshift16(),V=this._sock.rQshift8(),he=this._sock.rQshift8(),ye=this._sock.rQshift8();this._sock.rQskipBytes(3);var de=this._sock.rQshift32();if(this._sock.rQwait("server init name",de,24))return!1;var N=this._sock.rQshiftStr(de);if(N=(0,d.decodeUTF8)(N,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+de))return!1;var le=this._sock.rQshift16(),M=this._sock.rQshift16(),ve=this._sock.rQshift16();this._sock.rQskipBytes(2);var Re=(le+M+ve)*16;if(this._sock.rQwait("TightVNC extended server init header",Re,32+de))return!1;this._sock.rQskipBytes(16*le),this._sock.rQskipBytes(16*M),this._sock.rQskipBytes(16*ve)}return b.Info("Screen: "+L+"x"+U+", bpp: "+T+", depth: "+Y+", bigEndian: "+pe+", trueColor: "+Ce+", redMax: "+Z+", greenMax: "+A+", blueMax: "+Q+", redShift: "+V+", greenShift: "+he+", blueShift: "+ye),this._setDesktopName(N),this._resize(L,U),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),ue.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),ue.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var L=[];L.push(g.encodings.encodingCopyRect),this._fbDepth==24&&(L.push(g.encodings.encodingTight),L.push(g.encodings.encodingTightPNG),L.push(g.encodings.encodingHextile),L.push(g.encodings.encodingRRE)),L.push(g.encodings.encodingRaw),L.push(g.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),L.push(g.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),L.push(g.encodings.pseudoEncodingDesktopSize),L.push(g.encodings.pseudoEncodingLastRect),L.push(g.encodings.pseudoEncodingQEMUExtendedKeyEvent),L.push(g.encodings.pseudoEncodingExtendedDesktopSize),L.push(g.encodings.pseudoEncodingXvp),L.push(g.encodings.pseudoEncodingFence),L.push(g.encodings.pseudoEncodingContinuousUpdates),L.push(g.encodings.pseudoEncodingDesktopName),L.push(g.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(L.push(g.encodings.pseudoEncodingVMwareCursor),L.push(g.encodings.pseudoEncodingCursor)),ue.messages.clientEncodings(this._sock,L)}},{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 L=this._sock.rQshift32();if(L=(0,p.toSigned32bit)(L),this._sock.rQwait("ServerCutText content",Math.abs(L),8))return!1;if(L>=0){var U=this._sock.rQshiftStr(L);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:U}}))}else{L=Math.abs(L);var T=this._sock.rQshift32(),Y=T&65535,pe=T&4278190080,Ce=!!(pe&me);if(Ce){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var Z=0;Z<=15;Z++){var A=1<<Z;Y&A&&(this._clipboardServerCapabilitiesFormats[A]=!0,this._sock.rQshift32())}for(var Q=24;Q<=31;Q++){var V=1<<Q;this._clipboardServerCapabilitiesActions[V]=!!(pe&V)}var he=[me,se,J,ne,Se];ue.messages.extendedClipboardCaps(this._sock,he,{extendedClipboardFormatText:0})}else if(pe===se){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[Se]&&Y&De&&ue.messages.extendedClipboardProvide(this._sock,[De],[this._clipboardText])}else if(pe===J){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[ne]&&(this._clipboardText!=null?ue.messages.extendedClipboardNotify(this._sock,[De]):ue.messages.extendedClipboardNotify(this._sock,[]))}else if(pe===ne){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[se]&&Y&De&&ue.messages.extendedClipboardRequest(this._sock,[De])}else if(pe===Se){if(this._viewOnly||!(Y&De))return!0;this._clipboardText=null;var ye=this._sock.rQshiftBytes(L-4),de=new a.default,N=null;de.setInput(ye);for(var le=0;le<=15;le++){var M=1<<le;if(Y&M){var ve=0,Re=de.inflate(4);ve|=Re[0]<<24,ve|=Re[1]<<16,ve|=Re[2]<<8,ve|=Re[3];var w=de.inflate(ve);M===De&&(N=w)}}if(de.setInput(null),N!==null){for(var ie="",te=0;te<N.length;te++)ie+=String.fromCharCode(N[te]);N=ie,N=(0,d.decodeUTF8)(N),N.length>0&&N.charAt(N.length-1)==="\0"&&(N=N.slice(0,-1)),N=N.replace(`\r
`,`
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:N}}))}}else return this._fail("Unexpected action in extended clipboard message: "+pe)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var L=this._sock.rQshift32(),U=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",U,9))return!1;U>64&&(b.Warn("Bad payload length ("+U+") in fence response"),U=64);var T=this._sock.rQshiftStr(U);return this._supportsFence=!0,L&1<<31?(L&=3,ue.messages.clientFence(this._sock,L,T),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var L=this._sock.rQshift8(),U=this._sock.rQshift8();switch(U){case 0:b.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=L,b.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+U+")");break}return!0}},{key:"_normalMsg",value:function(){var L;this._FBU.rects>0?L=0:L=this._sock.rQshift8();var U,T;switch(L){case 0:return T=this._framebufferUpdate(),T&&!this._enabledContinuousUpdates&&ue.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),T;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 U=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,U&&(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 "+L+")"),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 L=this._sock.rQshiftBytes(12);this._FBU.x=(L[0]<<8)+L[1],this._FBU.y=(L[2]<<8)+L[3],this._FBU.width=(L[4]<<8)+L[5],this._FBU.height=(L[6]<<8)+L[7],this._FBU.encoding=parseInt((L[8]<<24)+(L[9]<<16)+(L[10]<<8)+L[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 L=document.createEvent("keyboardEvent");L.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(U){}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 L=this._FBU.x,U=this._FBU.y,T=this._FBU.width,Y=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var pe=this._sock.rQshift8();this._sock.rQshift8();var Ce,Z=4;if(pe==0){var A=-256;if(Ce=new Array(T*Y*Z),this._sock.rQwait("VMware cursor classic encoding",T*Y*Z*2,2))return!1;for(var Q=new Array(T*Y),V=0;V<T*Y;V++)Q[V]=this._sock.rQshift32();for(var he=new Array(T*Y),ye=0;ye<T*Y;ye++)he[ye]=this._sock.rQshift32();for(var de=0;de<T*Y;de++)if(Q[de]==0){var N=he[de],le=N>>8&255,M=N>>16&255,ve=N>>24&255;Ce[de*Z]=le,Ce[de*Z+1]=M,Ce[de*Z+2]=ve,Ce[de*Z+3]=255}else(Q[de]&A)==A?he[de]==0?(Ce[de*Z]=0,Ce[de*Z+1]=0,Ce[de*Z+2]=0,Ce[de*Z+3]=0):((he[de]&A)==A,Ce[de*Z]=0,Ce[de*Z+1]=0,Ce[de*Z+2]=0,Ce[de*Z+3]=255):(Ce[de*Z]=0,Ce[de*Z+1]=0,Ce[de*Z+2]=0,Ce[de*Z+3]=255)}else if(pe==1){if(this._sock.rQwait("VMware cursor alpha encoding",T*Y*4,2))return!1;Ce=new Array(T*Y*Z);for(var Re=0;Re<T*Y;Re++){var w=this._sock.rQshift32();Ce[Re*4]=w>>24&255,Ce[Re*4+1]=w>>16&255,Ce[Re*4+2]=w>>8&255,Ce[Re*4+3]=w&255}}else return b.Warn("The given cursor type is not supported: "+pe+" given."),!1;return this._updateCursor(Ce,L,U,T,Y),!0}},{key:"_handleCursor",value:function(){var L=this._FBU.x,U=this._FBU.y,T=this._FBU.width,Y=this._FBU.height,pe=T*Y*4,Ce=Math.ceil(T/8)*Y,Z=pe+Ce;if(this._sock.rQwait("cursor encoding",Z))return!1;for(var A=this._sock.rQshiftBytes(pe),Q=this._sock.rQshiftBytes(Ce),V=new Uint8Array(T*Y*4),he=0,ye=0;ye<Y;ye++)for(var de=0;de<T;de++){var N=ye*Math.ceil(T/8)+Math.floor(de/8),le=Q[N]<<de%8&128?255:0;V[he]=A[he+2],V[he+1]=A[he+1],V[he+2]=A[he],V[he+3]=le,he+=4}return this._updateCursor(V,L,U,T,Y),!0}},{key:"_handleDesktopName",value:function(){if(this._sock.rQwait("DesktopName",4))return!1;var L=this._sock.rQshift32();if(this._sock.rQwait("DesktopName",L,4))return!1;var U=this._sock.rQshiftStr(L);return U=(0,d.decodeUTF8)(U,!0),this._setDesktopName(U),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var L=this._sock.rQpeek8(),U=4+L*16;if(this._sock.rQwait("ExtendedDesktopSize",U))return!1;var T=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,T&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var Y=0;Y<L;Y+=1)Y===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 pe="";switch(this._FBU.y){case 1:pe="Resize is administratively prohibited";break;case 2:pe="Out of resources";break;case 3:pe="Invalid screen layout";break;default:pe="Unknown reason";break}b.Warn("Server did not accept the resize request: "+pe)}else this._resize(this._FBU.width,this._FBU.height);return!0}},{key:"_handleDataRect",value:function(){var L=this._decoders[this._FBU.encoding];if(!L)return this._fail("Unsupported encoding (encoding: "+this._FBU.encoding+")"),!1;try{return L.decodeRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,this._sock,this._display,this._fbDepth)}catch(U){return this._fail("Error decoding rect: "+U),!1}}},{key:"_updateContinuousUpdates",value:function(){this._enabledContinuousUpdates&&ue.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(L,U){this._fbWidth=L,this._fbHeight=U,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(L,U){this._rfbXvpVer<L||(b.Info("Sending XVP operation "+U+" (version "+L+")"),ue.messages.xvpOp(this._sock,L,U))}},{key:"_updateCursor",value:function(L,U,T,Y,pe){this._cursorImage={rgbaPixels:L,hotx:U,hoty:T,w:Y,h:pe},this._refreshCursor()}},{key:"_shouldShowDotCursor",value:function(){if(!this._showDotCursor)return!1;for(var L=3;L<this._cursorImage.rgbaPixels.length;L+=4)if(this._cursorImage.rgbaPixels[L])return!1;return!0}},{key:"_refreshCursor",value:function(){if(!(this._rfbConnectionState!=="connecting"&&this._rfbConnectionState!=="connected")){var L=this._shouldShowDotCursor()?ue.cursors.dot:this._cursorImage;this._cursor.change(L.rgbaPixels,L.hotx,L.hoty,L.w,L.h)}}},{key:"viewOnly",get:function(){return this._viewOnly},set:function(L){this._viewOnly=L,(this._rfbConnectionState==="connecting"||this._rfbConnectionState==="connected")&&(L?this._keyboard.ungrab():this._keyboard.grab())}},{key:"capabilities",get:function(){return this._capabilities}},{key:"touchButton",get:function(){return 0},set:function(L){b.Warn("Using old API!")}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(L){this._clipViewport=L,this._updateClip()}},{key:"scaleViewport",get:function(){return this._scaleViewport},set:function(L){this._scaleViewport=L,L&&this._clipViewport&&this._updateClip(),this._updateScale(),!L&&this._clipViewport&&this._updateClip()}},{key:"resizeSession",get:function(){return this._resizeSession},set:function(L){this._resizeSession=L,L&&this._requestRemoteResize()}},{key:"showDotCursor",get:function(){return this._showDotCursor},set:function(L){this._showDotCursor=L,this._refreshCursor()}},{key:"background",get:function(){return this._screen.style.background},set:function(L){this._screen.style.background=L}},{key:"qualityLevel",get:function(){return this._qualityLevel},set:function(L){if(!Number.isInteger(L)||L<0||L>9){b.Error("qualityLevel must be an integer between 0 and 9");return}this._qualityLevel!==L&&(this._qualityLevel=L,this._rfbConnectionState==="connected"&&this._sendEncodings())}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(L){if(!Number.isInteger(L)||L<0||L>9){b.Error("compressionLevel must be an integer between 0 and 9");return}this._compressionLevel!==L&&(this._compressionLevel=L,this._rfbConnectionState==="connected"&&this._sendEncodings())}}],[{key:"genDES",value:function(L,U){var T=L.split("").map(function(Y){return Y.charCodeAt(0)});return new c.default(T).encrypt(U)}}]),ue}(r.default);D.Z=be,be.messages={keyEvent:function(ce,ue,ee){var L=ce._sQ,U=ce._sQlen;L[U]=4,L[U+1]=ee,L[U+2]=0,L[U+3]=0,L[U+4]=ue>>24,L[U+5]=ue>>16,L[U+6]=ue>>8,L[U+7]=ue,ce._sQlen+=8,ce.flush()},QEMUExtendedKeyEvent:function(ce,ue,ee,L){function U(Ce){var Z=L>>8,A=L&255;return Z===224&&A<127?A|128:Ce}var T=ce._sQ,Y=ce._sQlen;T[Y]=255,T[Y+1]=0,T[Y+2]=ee>>8,T[Y+3]=ee,T[Y+4]=ue>>24,T[Y+5]=ue>>16,T[Y+6]=ue>>8,T[Y+7]=ue;var pe=U(L);T[Y+8]=pe>>24,T[Y+9]=pe>>16,T[Y+10]=pe>>8,T[Y+11]=pe,ce._sQlen+=12,ce.flush()},pointerEvent:function(ce,ue,ee,L){var U=ce._sQ,T=ce._sQlen;U[T]=5,U[T+1]=L,U[T+2]=ue>>8,U[T+3]=ue,U[T+4]=ee>>8,U[T+5]=ee,ce._sQlen+=6,ce.flush()},_buildExtendedClipboardFlags:function(ce,ue){for(var ee=new Uint8Array(4),L=0,U=0,T=0;T<ce.length;T++)U|=ce[T];for(var Y=0;Y<ue.length;Y++)L|=ue[Y];return ee[0]=U>>24,ee[1]=0,ee[2]=0,ee[3]=L,ee},extendedClipboardProvide:function(ce,ue,ee){for(var L=new t.default,U=[],T=0;T<ue.length;T++){if(ue[T]!=De)throw new Error("Unsupported extended clipboard format for Provide message.");ee[T]=ee[T].replace(/\r\n|\r|\n/gm,`\r
`);var Y=(0,d.encodeUTF8)(ee[T]+"\0");U.push(Y.length>>24&255,Y.length>>16&255,Y.length>>8&255,Y.length&255);for(var pe=0;pe<Y.length;pe++)U.push(Y.charCodeAt(pe))}var Ce=L.deflate(new Uint8Array(U)),Z=new Uint8Array(4+Ce.length);Z.set(be.messages._buildExtendedClipboardFlags([Se],ue)),Z.set(Ce,4),be.messages.clientCutText(ce,Z,!0)},extendedClipboardNotify:function(ce,ue){var ee=be.messages._buildExtendedClipboardFlags([ne],ue);be.messages.clientCutText(ce,ee,!0)},extendedClipboardRequest:function(ce,ue){var ee=be.messages._buildExtendedClipboardFlags([se],ue);be.messages.clientCutText(ce,ee,!0)},extendedClipboardCaps:function(ce,ue,ee){var L=Object.keys(ee),U=new Uint8Array(4+4*L.length);L.map(function(pe){return parseInt(pe)}),L.sort(function(pe,Ce){return pe-Ce}),U.set(be.messages._buildExtendedClipboardFlags(ue,[]));for(var T=4,Y=0;Y<L.length;Y++)U[T]=ee[L[Y]]>>24,U[T+1]=ee[L[Y]]>>16,U[T+2]=ee[L[Y]]>>8,U[T+3]=ee[L[Y]]>>0,T+=4,U[3]|=1<<L[Y];be.messages.clientCutText(ce,U,!0)},clientCutText:function(ce,ue){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,L=ce._sQ,U=ce._sQlen;L[U]=6,L[U+1]=0,L[U+2]=0,L[U+3]=0;var T;ee?T=(0,p.toUnsigned32bit)(-ue.length):T=ue.length,L[U+4]=T>>24,L[U+5]=T>>16,L[U+6]=T>>8,L[U+7]=T,ce._sQlen+=8;for(var Y=0,pe=ue.length;pe>0;){for(var Ce=Math.min(pe,ce._sQbufferSize-ce._sQlen),Z=0;Z<Ce;Z++)L[ce._sQlen+Z]=ue[Y+Z];ce._sQlen+=Ce,ce.flush(),pe-=Ce,Y+=Ce}},setDesktopSize:function(ce,ue,ee,L,U){var T=ce._sQ,Y=ce._sQlen;T[Y]=251,T[Y+1]=0,T[Y+2]=ue>>8,T[Y+3]=ue,T[Y+4]=ee>>8,T[Y+5]=ee,T[Y+6]=1,T[Y+7]=0,T[Y+8]=L>>24,T[Y+9]=L>>16,T[Y+10]=L>>8,T[Y+11]=L,T[Y+12]=0,T[Y+13]=0,T[Y+14]=0,T[Y+15]=0,T[Y+16]=ue>>8,T[Y+17]=ue,T[Y+18]=ee>>8,T[Y+19]=ee,T[Y+20]=U>>24,T[Y+21]=U>>16,T[Y+22]=U>>8,T[Y+23]=U,ce._sQlen+=24,ce.flush()},clientFence:function(ce,ue,ee){var L=ce._sQ,U=ce._sQlen;L[U]=248,L[U+1]=0,L[U+2]=0,L[U+3]=0,L[U+4]=ue>>24,L[U+5]=ue>>16,L[U+6]=ue>>8,L[U+7]=ue;var T=ee.length;L[U+8]=T;for(var Y=0;Y<T;Y++)L[U+9+Y]=ee.charCodeAt(Y);ce._sQlen+=9+T,ce.flush()},enableContinuousUpdates:function(ce,ue,ee,L,U,T){var Y=ce._sQ,pe=ce._sQlen;Y[pe]=150,Y[pe+1]=ue,Y[pe+2]=ee>>8,Y[pe+3]=ee,Y[pe+4]=L>>8,Y[pe+5]=L,Y[pe+6]=U>>8,Y[pe+7]=U,Y[pe+8]=T>>8,Y[pe+9]=T,ce._sQlen+=10,ce.flush()},pixelFormat:function(ce,ue,ee){var L=ce._sQ,U=ce._sQlen,T;ue>16?T=32:ue>8?T=16:T=8;var Y=Math.floor(ue/3);L[U]=0,L[U+1]=0,L[U+2]=0,L[U+3]=0,L[U+4]=T,L[U+5]=ue,L[U+6]=0,L[U+7]=ee?1:0,L[U+8]=0,L[U+9]=(1<<Y)-1,L[U+10]=0,L[U+11]=(1<<Y)-1,L[U+12]=0,L[U+13]=(1<<Y)-1,L[U+14]=Y*2,L[U+15]=Y*1,L[U+16]=Y*0,L[U+17]=0,L[U+18]=0,L[U+19]=0,ce._sQlen+=20,ce.flush()},clientEncodings:function(ce,ue){var ee=ce._sQ,L=ce._sQlen;ee[L]=2,ee[L+1]=0,ee[L+2]=ue.length>>8,ee[L+3]=ue.length;for(var U=L+4,T=0;T<ue.length;T++){var Y=ue[T];ee[U]=Y>>24,ee[U+1]=Y>>16,ee[U+2]=Y>>8,ee[U+3]=Y,U+=4}ce._sQlen+=U-L,ce.flush()},fbUpdateRequest:function(ce,ue,ee,L,U,T){var Y=ce._sQ,pe=ce._sQlen;typeof ee=="undefined"&&(ee=0),typeof L=="undefined"&&(L=0),Y[pe]=3,Y[pe+1]=ue?1:0,Y[pe+2]=ee>>8&255,Y[pe+3]=ee&255,Y[pe+4]=L>>8&255,Y[pe+5]=L&255,Y[pe+6]=U>>8&255,Y[pe+7]=U&255,Y[pe+8]=T>>8&255,Y[pe+9]=T&255,ce._sQlen+=10,ce.flush()},xvpOp:function(ce,ue,ee){var L=ce._sQ,U=ce._sQlen;L[U]=250,L[U+1]=0,L[U+2]=ue,L[U+3]=ee,ce._sQlen+=4,ce.flush()}},be.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(Me,D,s){"use strict";function _(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(O){return typeof O}:_=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},_(S)}Object.defineProperty(D,"__esModule",{value:!0}),D.isMac=v,D.isWindows=y,D.isIOS=g,D.isSafari=x,D.isIE=E,D.isEdge=C,D.isFirefox=m,D.hasScrollbarGutter=D.supportsImageMetadata=D.supportsCursorURIs=D.dragThreshold=D.isTouchDevice=void 0;var p=d(s(50500));function b(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return b=function(){return S},S}function d(S){if(S&&S.__esModule)return S;if(S===null||_(S)!=="object"&&typeof S!="function")return{default:S};var k=b();if(k&&k.has(S))return k.get(S);var O={},F=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var z in S)if(Object.prototype.hasOwnProperty.call(S,z)){var H=F?Object.getOwnPropertyDescriptor(S,z):null;H&&(H.get||H.set)?Object.defineProperty(O,z,H):O[z]=S[z]}return O.default=S,k&&k.set(S,O),O}var o=!1;D.isTouchDevice=o,window.addEventListener("touchstart",function(){},!1);var u=10*(window.devicePixelRatio||1);D.dragThreshold=u;var h=!1;try{var r=document.createElement("canvas");r.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',r.style.cursor.indexOf("url")===0?(p.Info("Data URI scheme cursor supported"),h=!0):p.Warn("Data URI scheme cursor not supported")}catch(S){p.Error("Data URI scheme cursor test exception: "+S)}var n=h;D.supportsCursorURIs=n;var a=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),a=!0}catch(S){}var t=a;D.supportsImageMetadata=t;var f=!0;try{var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",document.body.appendChild(e);var i=document.createElement("div");e.appendChild(i);var l=e.offsetWidth-i.offsetWidth;e.parentNode.removeChild(e),f=l!=0}catch(S){p.Error("Scrollbar test exception: "+S)}var c=f;D.hasScrollbarGutter=c;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 x(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function E(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function C(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function m(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},54641:function(Me,D,s){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var _=s(41895);function p(h,r){if(!(h instanceof r))throw new TypeError("Cannot call a class as a function")}function b(h,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(h,a.key,a)}}function d(h,r,n){return r&&b(h.prototype,r),n&&b(h,n),h}var o=!_.supportsCursorURIs||_.isTouchDevice,u=function(){function h(){p(this,h),this._target=null,this._canvas=document.createElement("canvas"),o&&(this._canvas.style.position="fixed",this._canvas.style.zIndex="65535",this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden"),this._position={x:0,y:0},this._hotSpot={x:0,y:0},this._eventHandlers={mouseover:this._handleMouseOver.bind(this),mouseleave:this._handleMouseLeave.bind(this),mousemove:this._handleMouseMove.bind(this),mouseup:this._handleMouseUp.bind(this)}}return d(h,[{key:"attach",value:function(n){if(this._target&&this.detach(),this._target=n,o){document.body.appendChild(this._canvas);var a={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,a),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,a),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,a),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,a)}this.clear()}},{key:"detach",value:function(){if(this._target){if(o){var 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,a,t,f,e){if(f===0||e===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-a,this._position.y=this._position.y+this._hotSpot.y-t,this._hotSpot.x=a,this._hotSpot.y=t;var i=this._canvas.getContext("2d");this._canvas.width=f,this._canvas.height=e;var l;try{l=new ImageData(new Uint8ClampedArray(n),f,e)}catch(v){l=i.createImageData(f,e),l.data.set(new Uint8ClampedArray(n))}if(i.clearRect(0,0,f,e),i.putImageData(l,0,0),o)this._updatePosition();else{var c=this._canvas.toDataURL();this._target.style.cursor="url("+c+")"+a+" "+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,a){if(o){window.visualViewport?(this._position.x=n+window.visualViewport.offsetLeft,this._position.y=a+window.visualViewport.offsetTop):(this._position.x=n,this._position.y=a),this._updatePosition();var t=document.elementFromPoint(n,a);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 a=this,t=document.elementFromPoint(n.clientX,n.clientY);this._updateVisibility(t),this._captureIsActive()&&window.setTimeout(function(){a._target&&(t=document.elementFromPoint(n.clientX,n.clientY),a._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)}}]),h}();D.default=u},92742:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.clientToElement=s;function s(_,p,b){var d=b.getBoundingClientRect(),o={x:0,y:0};return _<d.left?o.x=0:_>=d.right?o.x=d.width-1:o.x=_-d.left,p<d.top?o.y=0:p>=d.bottom?o.y=d.height-1:o.y=p-d.top,o}},79420:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.getPointerEvent=s,D.stopEvent=_,D.setCapture=h,D.releaseCapture=r;function s(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 d(n){if(!p){var a=new n.constructor(n.type,n);p=!0,document.captureElement?document.captureElement.dispatchEvent(a):b.dispatchEvent(a),p=!1,n.stopPropagation(),a.defaultPrevented&&n.preventDefault(),n.type==="mouseup"&&r()}}function o(){var n=document.getElementById("noVNC_mouse_capture_elem");n.style.cursor=window.getComputedStyle(document.captureElement).cursor}var u=new MutationObserver(o);function h(n){if(n.setCapture)n.setCapture(),document.captureElement=n,n.addEventListener("mouseup",r);else{r();var a=document.getElementById("noVNC_mouse_capture_elem");a===null&&(a=document.createElement("div"),a.id="noVNC_mouse_capture_elem",a.style.position="fixed",a.style.top="0px",a.style.left="0px",a.style.width="100%",a.style.height="100%",a.style.zIndex=1e4,a.style.display="none",document.body.appendChild(a),a.addEventListener("contextmenu",d),a.addEventListener("mousemove",d),a.addEventListener("mouseup",d)),document.captureElement=n,u.observe(n,{attributes:!0}),o(),a.style.display="",window.addEventListener("mousemove",d),window.addEventListener("mouseup",d)}}function r(){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",d),window.removeEventListener("mouseup",d)}}},5004:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;function s(d,o){if(!(d instanceof o))throw new TypeError("Cannot call a class as a function")}function _(d,o){for(var u=0;u<o.length;u++){var h=o[u];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(d,h.key,h)}}function p(d,o,u){return o&&_(d.prototype,o),u&&_(d,u),d}var b=function(){function d(){s(this,d),this._listeners=new Map}return p(d,[{key:"addEventListener",value:function(u,h){this._listeners.has(u)||this._listeners.set(u,new Set),this._listeners.get(u).add(h)}},{key:"removeEventListener",value:function(u,h){this._listeners.has(u)&&this._listeners.get(u).delete(h)}},{key:"dispatchEvent",value:function(u){var h=this;return this._listeners.has(u.type)?(this._listeners.get(u.type).forEach(function(r){return r.call(h,u)}),!u.defaultPrevented):!0}}]),d}();D.default=b},20860:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.toUnsigned32bit=s,D.toSigned32bit=_;function s(p){return p>>>0}function _(p){return p|0}},50500:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.initLogging=o,D.getLogging=u,D.Error=D.Warn=D.Info=D.Debug=void 0;var s="warn",_=function(){};D.Debug=_;var p=function(){};D.Info=p;var b=function(){};D.Warn=b;var d=function(){};D.Error=d;function o(h){if(typeof h=="undefined"?h=s:s=h,D.Debug=_=D.Info=p=D.Warn=b=D.Error=d=function(){},typeof window.console!="undefined")switch(h){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=d=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+h+"'")}}function u(){return s}o()},21882:function(){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(D,s){"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 d in b)Object.prototype.hasOwnProperty.call(b,d)&&(_[d]=b[d])}return _},writable:!0,configurable:!0}),function(){function Me(D,s){s=s||{bubbles:!1,cancelable:!1,detail:void 0};var _=document.createEvent("CustomEvent");return _.initCustomEvent(D,s.bubbles,s.cancelable,s.detail),_}Me.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=Me)}(),Number.isInteger=Number.isInteger||function(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}},31516:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.decodeUTF8=s,D.encodeUTF8=_;function s(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(p))}catch(d){if(d instanceof URIError&&b)return p;throw d}}function _(p){return unescape(encodeURIComponent(p))}},35986:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.shrinkBuf=s,D.arraySet=_,D.flattenChunks=p,D.Buf32=D.Buf16=D.Buf8=void 0;function s(u,h){return u.length===h?u:u.subarray?u.subarray(0,h):(u.length=h,u)}function _(u,h,r,n,a){if(h.subarray&&u.subarray){u.set(h.subarray(r,r+n),a);return}for(var t=0;t<n;t++)u[a+t]=h[r+t]}function p(u){var h,r,n,a,t,f;for(n=0,h=0,r=u.length;h<r;h++)n+=u[h].length;for(f=new Uint8Array(n),a=0,h=0,r=u.length;h<r;h++)t=u[h],f.set(t,a),a+=t.length;return f}var b=Uint8Array;D.Buf8=b;var d=Uint16Array;D.Buf16=d;var o=Int32Array;D.Buf32=o},97580:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=s;function s(_,p,b,d){for(var o=_&65535|0,u=_>>>16&65535|0,h=0;b!==0;){h=b>2e3?2e3:b,b-=h;do o=o+p[d++]|0,u=u+o|0;while(--h);o%=65521,u%=65521}return o|u<<16|0}},1217:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=s;function s(){for(var b,d=[],o=0;o<256;o++){b=o;for(var u=0;u<8;u++)b=b&1?3988292384^b>>>1:b>>>1;d[o]=b}return d}var _=s();function p(b,d,o,u){var h=_,r=u+o;b^=-1;for(var n=u;n<r;n++)b=b>>>8^h[(b^d[n])&255];return b^-1}},25805:function(Me,D,s){"use strict";function _(w){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(te){return typeof te}:_=function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},_(w)}Object.defineProperty(D,"__esModule",{value:!0}),D.deflateInit=N,D.deflateInit2=de,D.deflateReset=he,D.deflateResetKeep=V,D.deflateSetHeader=ye,D.deflate=le,D.deflateEnd=M,D.deflateSetDictionary=ve,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(s(35986)),b=n(s(55796)),d=h(s(97580)),o=h(s(1217)),u=h(s(70892));function h(w){return w&&w.__esModule?w:{default:w}}function r(){if(typeof WeakMap!="function")return null;var w=new WeakMap;return r=function(){return w},w}function n(w){if(w&&w.__esModule)return w;if(w===null||_(w)!=="object"&&typeof w!="function")return{default:w};var ie=r();if(ie&&ie.has(w))return ie.get(w);var te={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var j in w)if(Object.prototype.hasOwnProperty.call(w,j)){var re=P?Object.getOwnPropertyDescriptor(w,j):null;re&&(re.get||re.set)?Object.defineProperty(te,j,re):te[j]=w[j]}return te.default=w,ie&&ie.set(w,te),te}var a=0;D.Z_NO_FLUSH=a;var t=1;D.Z_PARTIAL_FLUSH=t;var f=3;D.Z_FULL_FLUSH=f;var e=4;D.Z_FINISH=e;var i=5;D.Z_BLOCK=i;var l=0;D.Z_OK=l;var c=1;D.Z_STREAM_END=c;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 x=-1;D.Z_DEFAULT_COMPRESSION=x;var E=1;D.Z_FILTERED=E;var C=2;D.Z_HUFFMAN_ONLY=C;var m=3;D.Z_RLE=m;var S=4;D.Z_FIXED=S;var k=0;D.Z_DEFAULT_STRATEGY=k;var O=2;D.Z_UNKNOWN=O;var F=8;D.Z_DEFLATED=F;var z=9,H=15,q=8,K=29,$=256,R=$+1+K,X=30,I=19,W=2*R+1,B=15,G=3,fe=258,xe=fe+G+1,Le=32,ke=42,ae=69,ge=73,Fe=91,Te=103,Oe=113,Pe=666,De=1,Xe=2,Ke=3,Ue=4,oe=3;function me(w,ie){return w.msg=u.default[ie],ie}function se(w){return(w<<1)-(w>4?9:0)}function J(w){for(var ie=w.length;--ie>=0;)w[ie]=0}function ne(w){var ie=w.state,te=ie.pending;te>w.avail_out&&(te=w.avail_out),te!==0&&(p.arraySet(w.output,ie.pending_buf,ie.pending_out,te,w.next_out),w.next_out+=te,ie.pending_out+=te,w.total_out+=te,w.avail_out-=te,ie.pending-=te,ie.pending===0&&(ie.pending_out=0))}function Se(w,ie){b._tr_flush_block(w,w.block_start>=0?w.block_start:-1,w.strstart-w.block_start,ie),w.block_start=w.strstart,ne(w.strm)}function be(w,ie){w.pending_buf[w.pending++]=ie}function _e(w,ie){w.pending_buf[w.pending++]=ie>>>8&255,w.pending_buf[w.pending++]=ie&255}function ce(w,ie,te,P){var j=w.avail_in;return j>P&&(j=P),j===0?0:(w.avail_in-=j,p.arraySet(ie,w.input,w.next_in,j,te),w.state.wrap===1?w.adler=(0,d.default)(w.adler,ie,j,te):w.state.wrap===2&&(w.adler=(0,o.default)(w.adler,ie,j,te)),w.next_in+=j,w.total_in+=j,j)}function ue(w,ie){var te=w.max_chain_length,P=w.strstart,j,re,Ae=w.prev_length,we=w.nice_match,Ee=w.strstart>w.w_size-xe?w.strstart-(w.w_size-xe):0,Be=w.window,je=w.w_mask,ze=w.prev,He=w.strstart+fe,$e=Be[P+Ae-1],Ie=Be[P+Ae];w.prev_length>=w.good_match&&(te>>=2),we>w.lookahead&&(we=w.lookahead);do if(j=ie,!(Be[j+Ae]!==Ie||Be[j+Ae-1]!==$e||Be[j]!==Be[P]||Be[++j]!==Be[P+1])){P+=2,j++;do;while(Be[++P]===Be[++j]&&Be[++P]===Be[++j]&&Be[++P]===Be[++j]&&Be[++P]===Be[++j]&&Be[++P]===Be[++j]&&Be[++P]===Be[++j]&&Be[++P]===Be[++j]&&Be[++P]===Be[++j]&&P<He);if(re=fe-(He-P),P=He-fe,re>Ae){if(w.match_start=ie,Ae=re,re>=we)break;$e=Be[P+Ae-1],Ie=Be[P+Ae]}}while((ie=ze[ie&je])>Ee&&--te!==0);return Ae<=w.lookahead?Ae:w.lookahead}function ee(w){var ie=w.w_size,te,P,j,re,Ae;do{if(re=w.window_size-w.lookahead-w.strstart,w.strstart>=ie+(ie-xe)){p.arraySet(w.window,w.window,ie,ie,0),w.match_start-=ie,w.strstart-=ie,w.block_start-=ie,P=w.hash_size,te=P;do j=w.head[--te],w.head[te]=j>=ie?j-ie:0;while(--P);P=ie,te=P;do j=w.prev[--te],w.prev[te]=j>=ie?j-ie:0;while(--P);re+=ie}if(w.strm.avail_in===0)break;if(P=ce(w.strm,w.window,w.strstart+w.lookahead,re),w.lookahead+=P,w.lookahead+w.insert>=G)for(Ae=w.strstart-w.insert,w.ins_h=w.window[Ae],w.ins_h=(w.ins_h<<w.hash_shift^w.window[Ae+1])&w.hash_mask;w.insert&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[Ae+G-1])&w.hash_mask,w.prev[Ae&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=Ae,Ae++,w.insert--,!(w.lookahead+w.insert<G)););}while(w.lookahead<xe&&w.strm.avail_in!==0)}function L(w,ie){var te=65535;for(te>w.pending_buf_size-5&&(te=w.pending_buf_size-5);;){if(w.lookahead<=1){if(ee(w),w.lookahead===0&&ie===a)return De;if(w.lookahead===0)break}w.strstart+=w.lookahead,w.lookahead=0;var P=w.block_start+te;if((w.strstart===0||w.strstart>=P)&&(w.lookahead=w.strstart-P,w.strstart=P,Se(w,!1),w.strm.avail_out===0)||w.strstart-w.block_start>=w.w_size-xe&&(Se(w,!1),w.strm.avail_out===0))return De}return w.insert=0,ie===e?(Se(w,!0),w.strm.avail_out===0?Ke:Ue):(w.strstart>w.block_start&&(Se(w,!1),w.strm.avail_out===0),De)}function U(w,ie){for(var te,P;;){if(w.lookahead<xe){if(ee(w),w.lookahead<xe&&ie===a)return De;if(w.lookahead===0)break}if(te=0,w.lookahead>=G&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+G-1])&w.hash_mask,te=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),te!==0&&w.strstart-te<=w.w_size-xe&&(w.match_length=ue(w,te)),w.match_length>=G)if(P=b._tr_tally(w,w.strstart-w.match_start,w.match_length-G),w.lookahead-=w.match_length,w.match_length<=w.max_lazy_match&&w.lookahead>=G){w.match_length--;do w.strstart++,w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+G-1])&w.hash_mask,te=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart;while(--w.match_length!==0);w.strstart++}else w.strstart+=w.match_length,w.match_length=0,w.ins_h=w.window[w.strstart],w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+1])&w.hash_mask;else P=b._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++;if(P&&(Se(w,!1),w.strm.avail_out===0))return De}return w.insert=w.strstart<G-1?w.strstart:G-1,ie===e?(Se(w,!0),w.strm.avail_out===0?Ke:Ue):w.last_lit&&(Se(w,!1),w.strm.avail_out===0)?De:Xe}function T(w,ie){for(var te,P,j;;){if(w.lookahead<xe){if(ee(w),w.lookahead<xe&&ie===a)return De;if(w.lookahead===0)break}if(te=0,w.lookahead>=G&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+G-1])&w.hash_mask,te=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart),w.prev_length=w.match_length,w.prev_match=w.match_start,w.match_length=G-1,te!==0&&w.prev_length<w.max_lazy_match&&w.strstart-te<=w.w_size-xe&&(w.match_length=ue(w,te),w.match_length<=5&&(w.strategy===E||w.match_length===G&&w.strstart-w.match_start>4096)&&(w.match_length=G-1)),w.prev_length>=G&&w.match_length<=w.prev_length){j=w.strstart+w.lookahead-G,P=b._tr_tally(w,w.strstart-1-w.prev_match,w.prev_length-G),w.lookahead-=w.prev_length-1,w.prev_length-=2;do++w.strstart<=j&&(w.ins_h=(w.ins_h<<w.hash_shift^w.window[w.strstart+G-1])&w.hash_mask,te=w.prev[w.strstart&w.w_mask]=w.head[w.ins_h],w.head[w.ins_h]=w.strstart);while(--w.prev_length!==0);if(w.match_available=0,w.match_length=G-1,w.strstart++,P&&(Se(w,!1),w.strm.avail_out===0))return De}else if(w.match_available){if(P=b._tr_tally(w,0,w.window[w.strstart-1]),P&&Se(w,!1),w.strstart++,w.lookahead--,w.strm.avail_out===0)return De}else w.match_available=1,w.strstart++,w.lookahead--}return w.match_available&&(P=b._tr_tally(w,0,w.window[w.strstart-1]),w.match_available=0),w.insert=w.strstart<G-1?w.strstart:G-1,ie===e?(Se(w,!0),w.strm.avail_out===0?Ke:Ue):w.last_lit&&(Se(w,!1),w.strm.avail_out===0)?De:Xe}function Y(w,ie){for(var te,P,j,re,Ae=w.window;;){if(w.lookahead<=fe){if(ee(w),w.lookahead<=fe&&ie===a)return De;if(w.lookahead===0)break}if(w.match_length=0,w.lookahead>=G&&w.strstart>0&&(j=w.strstart-1,P=Ae[j],P===Ae[++j]&&P===Ae[++j]&&P===Ae[++j])){re=w.strstart+fe;do;while(P===Ae[++j]&&P===Ae[++j]&&P===Ae[++j]&&P===Ae[++j]&&P===Ae[++j]&&P===Ae[++j]&&P===Ae[++j]&&P===Ae[++j]&&j<re);w.match_length=fe-(re-j),w.match_length>w.lookahead&&(w.match_length=w.lookahead)}if(w.match_length>=G?(te=b._tr_tally(w,1,w.match_length-G),w.lookahead-=w.match_length,w.strstart+=w.match_length,w.match_length=0):(te=b._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++),te&&(Se(w,!1),w.strm.avail_out===0))return De}return w.insert=0,ie===e?(Se(w,!0),w.strm.avail_out===0?Ke:Ue):w.last_lit&&(Se(w,!1),w.strm.avail_out===0)?De:Xe}function pe(w,ie){for(var te;;){if(w.lookahead===0&&(ee(w),w.lookahead===0)){if(ie===a)return De;break}if(w.match_length=0,te=b._tr_tally(w,0,w.window[w.strstart]),w.lookahead--,w.strstart++,te&&(Se(w,!1),w.strm.avail_out===0))return De}return w.insert=0,ie===e?(Se(w,!0),w.strm.avail_out===0?Ke:Ue):w.last_lit&&(Se(w,!1),w.strm.avail_out===0)?De:Xe}function Ce(w,ie,te,P,j){this.good_length=w,this.max_lazy=ie,this.nice_length=te,this.max_chain=P,this.func=j}var Z;Z=[new Ce(0,0,0,0,L),new Ce(4,4,8,4,U),new Ce(4,5,16,8,U),new Ce(4,6,32,32,U),new Ce(4,4,16,16,T),new Ce(8,16,32,32,T),new Ce(8,16,128,128,T),new Ce(8,32,128,256,T),new Ce(32,128,258,1024,T),new Ce(32,258,258,4096,T)];function A(w){w.window_size=2*w.w_size,J(w.head),w.max_lazy_match=Z[w.level].max_lazy,w.good_match=Z[w.level].good_length,w.nice_match=Z[w.level].nice_length,w.max_chain_length=Z[w.level].max_chain,w.strstart=0,w.block_start=0,w.lookahead=0,w.insert=0,w.match_length=w.prev_length=G-1,w.match_available=0,w.ins_h=0}function Q(){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=F,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(W*2),this.dyn_dtree=new p.Buf16((2*X+1)*2),this.bl_tree=new p.Buf16((2*I+1)*2),J(this.dyn_ltree),J(this.dyn_dtree),J(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*R+1),J(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new p.Buf16(2*R+1),J(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 V(w){var ie;return!w||!w.state?me(w,v):(w.total_in=w.total_out=0,w.data_type=O,ie=w.state,ie.pending=0,ie.pending_out=0,ie.wrap<0&&(ie.wrap=-ie.wrap),ie.status=ie.wrap?ke:Oe,w.adler=ie.wrap===2?0:1,ie.last_flush=a,b._tr_init(ie),l)}function he(w){var ie=V(w);return ie===l&&A(w.state),ie}function ye(w,ie){return!w||!w.state||w.state.wrap!==2?v:(w.state.gzhead=ie,l)}function de(w,ie,te,P,j,re){if(!w)return v;var Ae=1;if(ie===x&&(ie=6),P<0?(Ae=0,P=-P):P>15&&(Ae=2,P-=16),j<1||j>z||te!==F||P<8||P>15||ie<0||ie>9||re<0||re>S)return me(w,v);P===8&&(P=9);var we=new Q;return w.state=we,we.strm=w,we.wrap=Ae,we.gzhead=null,we.w_bits=P,we.w_size=1<<we.w_bits,we.w_mask=we.w_size-1,we.hash_bits=j+7,we.hash_size=1<<we.hash_bits,we.hash_mask=we.hash_size-1,we.hash_shift=~~((we.hash_bits+G-1)/G),we.window=new p.Buf8(we.w_size*2),we.head=new p.Buf16(we.hash_size),we.prev=new p.Buf16(we.w_size),we.lit_bufsize=1<<j+6,we.pending_buf_size=we.lit_bufsize*4,we.pending_buf=new p.Buf8(we.pending_buf_size),we.d_buf=1*we.lit_bufsize,we.l_buf=3*we.lit_bufsize,we.level=ie,we.strategy=re,we.method=te,he(w)}function N(w,ie){return de(w,ie,F,H,q,k)}function le(w,ie){var te,P,j,re;if(!w||!w.state||ie>i||ie<0)return w?me(w,v):v;if(P=w.state,!w.output||!w.input&&w.avail_in!==0||P.status===Pe&&ie!==e)return me(w,w.avail_out===0?g:v);if(P.strm=w,te=P.last_flush,P.last_flush=ie,P.status===ke)if(P.wrap===2)w.adler=0,be(P,31),be(P,139),be(P,8),P.gzhead?(be(P,(P.gzhead.text?1:0)+(P.gzhead.hcrc?2:0)+(P.gzhead.extra?4:0)+(P.gzhead.name?8:0)+(P.gzhead.comment?16:0)),be(P,P.gzhead.time&255),be(P,P.gzhead.time>>8&255),be(P,P.gzhead.time>>16&255),be(P,P.gzhead.time>>24&255),be(P,P.level===9?2:P.strategy>=C||P.level<2?4:0),be(P,P.gzhead.os&255),P.gzhead.extra&&P.gzhead.extra.length&&(be(P,P.gzhead.extra.length&255),be(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=ae):(be(P,0),be(P,0),be(P,0),be(P,0),be(P,0),be(P,P.level===9?2:P.strategy>=C||P.level<2?4:0),be(P,oe),P.status=Oe);else{var Ae=F+(P.w_bits-8<<4)<<8,we=-1;P.strategy>=C||P.level<2?we=0:P.level<6?we=1:P.level===6?we=2:we=3,Ae|=we<<6,P.strstart!==0&&(Ae|=Le),Ae+=31-Ae%31,P.status=Oe,_e(P,Ae),P.strstart!==0&&(_e(P,w.adler>>>16),_e(P,w.adler&65535)),w.adler=1}if(P.status===ae)if(P.gzhead.extra){for(j=P.pending;P.gzindex<(P.gzhead.extra.length&65535)&&!(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>j&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-j,j)),ne(w),j=P.pending,P.pending===P.pending_buf_size));)be(P,P.gzhead.extra[P.gzindex]&255),P.gzindex++;P.gzhead.hcrc&&P.pending>j&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-j,j)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=ge)}else P.status=ge;if(P.status===ge)if(P.gzhead.name){j=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>j&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-j,j)),ne(w),j=P.pending,P.pending===P.pending_buf_size)){re=1;break}P.gzindex<P.gzhead.name.length?re=P.gzhead.name.charCodeAt(P.gzindex++)&255:re=0,be(P,re)}while(re!==0);P.gzhead.hcrc&&P.pending>j&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-j,j)),re===0&&(P.gzindex=0,P.status=Fe)}else P.status=Fe;if(P.status===Fe)if(P.gzhead.comment){j=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>j&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-j,j)),ne(w),j=P.pending,P.pending===P.pending_buf_size)){re=1;break}P.gzindex<P.gzhead.comment.length?re=P.gzhead.comment.charCodeAt(P.gzindex++)&255:re=0,be(P,re)}while(re!==0);P.gzhead.hcrc&&P.pending>j&&(w.adler=(0,o.default)(w.adler,P.pending_buf,P.pending-j,j)),re===0&&(P.status=Te)}else P.status=Te;if(P.status===Te&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&ne(w),P.pending+2<=P.pending_buf_size&&(be(P,w.adler&255),be(P,w.adler>>8&255),w.adler=0,P.status=Oe)):P.status=Oe),P.pending!==0){if(ne(w),w.avail_out===0)return P.last_flush=-1,l}else if(w.avail_in===0&&se(ie)<=se(te)&&ie!==e)return me(w,g);if(P.status===Pe&&w.avail_in!==0)return me(w,g);if(w.avail_in!==0||P.lookahead!==0||ie!==a&&P.status!==Pe){var Ee=P.strategy===C?pe(P,ie):P.strategy===m?Y(P,ie):Z[P.level].func(P,ie);if((Ee===Ke||Ee===Ue)&&(P.status=Pe),Ee===De||Ee===Ke)return w.avail_out===0&&(P.last_flush=-1),l;if(Ee===Xe&&(ie===t?b._tr_align(P):ie!==i&&(b._tr_stored_block(P,0,0,!1),ie===f&&(J(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),ne(w),w.avail_out===0))return P.last_flush=-1,l}return ie!==e?l:P.wrap<=0?c:(P.wrap===2?(be(P,w.adler&255),be(P,w.adler>>8&255),be(P,w.adler>>16&255),be(P,w.adler>>24&255),be(P,w.total_in&255),be(P,w.total_in>>8&255),be(P,w.total_in>>16&255),be(P,w.total_in>>24&255)):(_e(P,w.adler>>>16),_e(P,w.adler&65535)),ne(w),P.wrap>0&&(P.wrap=-P.wrap),P.pending!==0?l:c)}function M(w){var ie;return!w||!w.state?v:(ie=w.state.status,ie!==ke&&ie!==ae&&ie!==ge&&ie!==Fe&&ie!==Te&&ie!==Oe&&ie!==Pe?me(w,v):(w.state=null,ie===Oe?me(w,y):l))}function ve(w,ie){var te=ie.length,P,j,re,Ae,we,Ee,Be,je;if(!w||!w.state||(P=w.state,Ae=P.wrap,Ae===2||Ae===1&&P.status!==ke||P.lookahead))return v;for(Ae===1&&(w.adler=(0,d.default)(w.adler,ie,te,0)),P.wrap=0,te>=P.w_size&&(Ae===0&&(J(P.head),P.strstart=0,P.block_start=0,P.insert=0),je=new p.Buf8(P.w_size),p.arraySet(je,ie,te-P.w_size,P.w_size,0),ie=je,te=P.w_size),we=w.avail_in,Ee=w.next_in,Be=w.input,w.avail_in=te,w.next_in=0,w.input=ie,ee(P);P.lookahead>=G;){j=P.strstart,re=P.lookahead-(G-1);do P.ins_h=(P.ins_h<<P.hash_shift^P.window[j+G-1])&P.hash_mask,P.prev[j&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=j,j++;while(--re);P.strstart=j,P.lookahead=G-1,ee(P)}return P.strstart+=P.lookahead,P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=G-1,P.match_available=0,w.next_in=Ee,w.input=Be,w.avail_in=we,P.wrap=Ae,l}var Re="pako deflate (from Nodeca project)";D.deflateInfo=Re},16071:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=p;var s=30,_=12;function p(b,d){var o,u,h,r,n,a,t,f,e,i,l,c,v,y,g,x,E,C,m,S,k,O,F,z,H;o=b.state,u=b.next_in,z=b.input,h=u+(b.avail_in-5),r=b.next_out,H=b.output,n=r-(d-b.avail_out),a=r+(b.avail_out-257),t=o.dmax,f=o.wsize,e=o.whave,i=o.wnext,l=o.window,c=o.hold,v=o.bits,y=o.lencode,g=o.distcode,x=(1<<o.lenbits)-1,E=(1<<o.distbits)-1;e:do{v<15&&(c+=z[u++]<<v,v+=8,c+=z[u++]<<v,v+=8),C=y[c&x];t:for(;;){if(m=C>>>24,c>>>=m,v-=m,m=C>>>16&255,m===0)H[r++]=C&65535;else if(m&16){S=C&65535,m&=15,m&&(v<m&&(c+=z[u++]<<v,v+=8),S+=c&(1<<m)-1,c>>>=m,v-=m),v<15&&(c+=z[u++]<<v,v+=8,c+=z[u++]<<v,v+=8),C=g[c&E];r:for(;;){if(m=C>>>24,c>>>=m,v-=m,m=C>>>16&255,m&16){if(k=C&65535,m&=15,v<m&&(c+=z[u++]<<v,v+=8,v<m&&(c+=z[u++]<<v,v+=8)),k+=c&(1<<m)-1,k>t){b.msg="invalid distance too far back",o.mode=s;break e}if(c>>>=m,v-=m,m=r-n,k>m){if(m=k-m,m>e&&o.sane){b.msg="invalid distance too far back",o.mode=s;break e}if(O=0,F=l,i===0){if(O+=f-m,m<S){S-=m;do H[r++]=l[O++];while(--m);O=r-k,F=H}}else if(i<m){if(O+=f+i-m,m-=i,m<S){S-=m;do H[r++]=l[O++];while(--m);if(O=0,i<S){m=i,S-=m;do H[r++]=l[O++];while(--m);O=r-k,F=H}}}else if(O+=i-m,m<S){S-=m;do H[r++]=l[O++];while(--m);O=r-k,F=H}for(;S>2;)H[r++]=F[O++],H[r++]=F[O++],H[r++]=F[O++],S-=3;S&&(H[r++]=F[O++],S>1&&(H[r++]=F[O++]))}else{O=r-k;do H[r++]=H[O++],H[r++]=H[O++],H[r++]=H[O++],S-=3;while(S>2);S&&(H[r++]=H[O++],S>1&&(H[r++]=H[O++]))}}else if(m&64){b.msg="invalid distance code",o.mode=s;break e}else{C=g[(C&65535)+(c&(1<<m)-1)];continue r}break}}else if(m&64)if(m&32){o.mode=_;break e}else{b.msg="invalid literal/length code",o.mode=s;break e}else{C=y[(C&65535)+(c&(1<<m)-1)];continue t}break}}while(u<h&&r<a);S=v>>3,u-=S,v-=S<<3,c&=(1<<v)-1,b.next_in=u,b.next_out=r,b.avail_in=u<h?5+(h-u):5-(u-h),b.avail_out=r<a?257+(a-r):257-(r-a),o.hold=c,o.bits=v}},95766:function(Me,D,s){"use strict";function _(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(M){return typeof M}:_=function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},_(N)}Object.defineProperty(D,"__esModule",{value:!0}),D.inflateReset=ee,D.inflateReset2=L,D.inflateResetKeep=ue,D.inflateInit=T,D.inflateInit2=U,D.inflate=Q,D.inflateEnd=V,D.inflateGetHeader=he,D.inflateSetDictionary=ye,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(s(35986)),b=h(s(97580)),d=h(s(1217)),o=h(s(16071)),u=h(s(63093));function h(N){return N&&N.__esModule?N:{default:N}}function r(){if(typeof WeakMap!="function")return null;var N=new WeakMap;return r=function(){return N},N}function n(N){if(N&&N.__esModule)return N;if(N===null||_(N)!=="object"&&typeof N!="function")return{default:N};var le=r();if(le&&le.has(N))return le.get(N);var M={},ve=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Re in N)if(Object.prototype.hasOwnProperty.call(N,Re)){var w=ve?Object.getOwnPropertyDescriptor(N,Re):null;w&&(w.get||w.set)?Object.defineProperty(M,Re,w):M[Re]=N[Re]}return M.default=N,le&&le.set(N,M),M}var a=0,t=1,f=2,e=4;D.Z_FINISH=e;var i=5;D.Z_BLOCK=i;var l=6;D.Z_TREES=l;var c=0;D.Z_OK=c;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 x=-3;D.Z_DATA_ERROR=x;var E=-4;D.Z_MEM_ERROR=E;var C=-5;D.Z_BUF_ERROR=C;var m=8;D.Z_DEFLATED=m;var S=1,k=2,O=3,F=4,z=5,H=6,q=7,K=8,$=9,R=10,X=11,I=12,W=13,B=14,G=15,fe=16,xe=17,Le=18,ke=19,ae=20,ge=21,Fe=22,Te=23,Oe=24,Pe=25,De=26,Xe=27,Ke=28,Ue=29,oe=30,me=31,se=32,J=852,ne=592,Se=15,be=Se;function _e(N){return(N>>>24&255)+(N>>>8&65280)+((N&65280)<<8)+((N&255)<<24)}function ce(){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 ue(N){var le;return!N||!N.state?g:(le=N.state,N.total_in=N.total_out=le.total=0,N.msg="",le.wrap&&(N.adler=le.wrap&1),le.mode=S,le.last=0,le.havedict=0,le.dmax=32768,le.head=null,le.hold=0,le.bits=0,le.lencode=le.lendyn=new p.Buf32(J),le.distcode=le.distdyn=new p.Buf32(ne),le.sane=1,le.back=-1,c)}function ee(N){var le;return!N||!N.state?g:(le=N.state,le.wsize=0,le.whave=0,le.wnext=0,ue(N))}function L(N,le){var M,ve;return!N||!N.state||(ve=N.state,le<0?(M=0,le=-le):(M=(le>>4)+1,le<48&&(le&=15)),le&&(le<8||le>15))?g:(ve.window!==null&&ve.wbits!==le&&(ve.window=null),ve.wrap=M,ve.wbits=le,ee(N))}function U(N,le){var M,ve;return N?(ve=new ce,N.state=ve,ve.window=null,M=L(N,le),M!==c&&(N.state=null),M):g}function T(N){return U(N,be)}var Y=!0,pe,Ce;function Z(N){if(Y){var le;for(pe=new p.Buf32(512),Ce=new p.Buf32(32),le=0;le<144;)N.lens[le++]=8;for(;le<256;)N.lens[le++]=9;for(;le<280;)N.lens[le++]=7;for(;le<288;)N.lens[le++]=8;for((0,u.default)(t,N.lens,0,288,pe,0,N.work,{bits:9}),le=0;le<32;)N.lens[le++]=5;(0,u.default)(f,N.lens,0,32,Ce,0,N.work,{bits:5}),Y=!1}N.lencode=pe,N.lenbits=9,N.distcode=Ce,N.distbits=5}function A(N,le,M,ve){var Re,w=N.state;return w.window===null&&(w.wsize=1<<w.wbits,w.wnext=0,w.whave=0,w.window=new p.Buf8(w.wsize)),ve>=w.wsize?(p.arraySet(w.window,le,M-w.wsize,w.wsize,0),w.wnext=0,w.whave=w.wsize):(Re=w.wsize-w.wnext,Re>ve&&(Re=ve),p.arraySet(w.window,le,M-ve,Re,w.wnext),ve-=Re,ve?(p.arraySet(w.window,le,M-ve,ve,0),w.wnext=ve,w.whave=w.wsize):(w.wnext+=Re,w.wnext===w.wsize&&(w.wnext=0),w.whave<w.wsize&&(w.whave+=Re))),0}function Q(N,le){var M,ve,Re,w,ie,te,P,j,re,Ae,we,Ee,Be,je,ze=0,He,$e,Ie,Ne,Ve,Ge,Qe,tt,Je=new p.Buf8(4),et,ot,dt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return g;M=N.state,M.mode===I&&(M.mode=W),ie=N.next_out,Re=N.output,P=N.avail_out,w=N.next_in,ve=N.input,te=N.avail_in,j=M.hold,re=M.bits,Ae=te,we=P,tt=c;e:for(;;)switch(M.mode){case S:if(M.wrap===0){M.mode=W;break}for(;re<16;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(M.wrap&2&&j===35615){M.check=0,Je[0]=j&255,Je[1]=j>>>8&255,M.check=(0,d.default)(M.check,Je,2,0),j=0,re=0,M.mode=k;break}if(M.flags=0,M.head&&(M.head.done=!1),!(M.wrap&1)||(((j&255)<<8)+(j>>8))%31){N.msg="incorrect header check",M.mode=oe;break}if((j&15)!==m){N.msg="unknown compression method",M.mode=oe;break}if(j>>>=4,re-=4,Qe=(j&15)+8,M.wbits===0)M.wbits=Qe;else if(Qe>M.wbits){N.msg="invalid window size",M.mode=oe;break}M.dmax=1<<Qe,N.adler=M.check=1,M.mode=j&512?R:I,j=0,re=0;break;case k:for(;re<16;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(M.flags=j,(M.flags&255)!==m){N.msg="unknown compression method",M.mode=oe;break}if(M.flags&57344){N.msg="unknown header flags set",M.mode=oe;break}M.head&&(M.head.text=j>>8&1),M.flags&512&&(Je[0]=j&255,Je[1]=j>>>8&255,M.check=(0,d.default)(M.check,Je,2,0)),j=0,re=0,M.mode=O;case O:for(;re<32;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}M.head&&(M.head.time=j),M.flags&512&&(Je[0]=j&255,Je[1]=j>>>8&255,Je[2]=j>>>16&255,Je[3]=j>>>24&255,M.check=(0,d.default)(M.check,Je,4,0)),j=0,re=0,M.mode=F;case F:for(;re<16;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}M.head&&(M.head.xflags=j&255,M.head.os=j>>8),M.flags&512&&(Je[0]=j&255,Je[1]=j>>>8&255,M.check=(0,d.default)(M.check,Je,2,0)),j=0,re=0,M.mode=z;case z:if(M.flags&1024){for(;re<16;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}M.length=j,M.head&&(M.head.extra_len=j),M.flags&512&&(Je[0]=j&255,Je[1]=j>>>8&255,M.check=(0,d.default)(M.check,Je,2,0)),j=0,re=0}else M.head&&(M.head.extra=null);M.mode=H;case H:if(M.flags&1024&&(Ee=M.length,Ee>te&&(Ee=te),Ee&&(M.head&&(Qe=M.head.extra_len-M.length,M.head.extra||(M.head.extra=new Array(M.head.extra_len)),p.arraySet(M.head.extra,ve,w,Ee,Qe)),M.flags&512&&(M.check=(0,d.default)(M.check,ve,Ee,w)),te-=Ee,w+=Ee,M.length-=Ee),M.length))break e;M.length=0,M.mode=q;case q:if(M.flags&2048){if(te===0)break e;Ee=0;do Qe=ve[w+Ee++],M.head&&Qe&&M.length<65536&&(M.head.name+=String.fromCharCode(Qe));while(Qe&&Ee<te);if(M.flags&512&&(M.check=(0,d.default)(M.check,ve,Ee,w)),te-=Ee,w+=Ee,Qe)break e}else M.head&&(M.head.name=null);M.length=0,M.mode=K;case K:if(M.flags&4096){if(te===0)break e;Ee=0;do Qe=ve[w+Ee++],M.head&&Qe&&M.length<65536&&(M.head.comment+=String.fromCharCode(Qe));while(Qe&&Ee<te);if(M.flags&512&&(M.check=(0,d.default)(M.check,ve,Ee,w)),te-=Ee,w+=Ee,Qe)break e}else M.head&&(M.head.comment=null);M.mode=$;case $:if(M.flags&512){for(;re<16;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(j!==(M.check&65535)){N.msg="header crc mismatch",M.mode=oe;break}j=0,re=0}M.head&&(M.head.hcrc=M.flags>>9&1,M.head.done=!0),N.adler=M.check=0,M.mode=I;break;case R:for(;re<32;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}N.adler=M.check=_e(j),j=0,re=0,M.mode=X;case X:if(M.havedict===0)return N.next_out=ie,N.avail_out=P,N.next_in=w,N.avail_in=te,M.hold=j,M.bits=re,y;N.adler=M.check=1,M.mode=I;case I:if(le===i||le===l)break e;case W:if(M.last){j>>>=re&7,re-=re&7,M.mode=Xe;break}for(;re<3;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}switch(M.last=j&1,j>>>=1,re-=1,j&3){case 0:M.mode=B;break;case 1:if(Z(M),M.mode=ae,le===l){j>>>=2,re-=2;break e}break;case 2:M.mode=xe;break;case 3:N.msg="invalid block type",M.mode=oe}j>>>=2,re-=2;break;case B:for(j>>>=re&7,re-=re&7;re<32;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if((j&65535)!==(j>>>16^65535)){N.msg="invalid stored block lengths",M.mode=oe;break}if(M.length=j&65535,j=0,re=0,M.mode=G,le===l)break e;case G:M.mode=fe;case fe:if(Ee=M.length,Ee){if(Ee>te&&(Ee=te),Ee>P&&(Ee=P),Ee===0)break e;p.arraySet(Re,ve,w,Ee,ie),te-=Ee,w+=Ee,P-=Ee,ie+=Ee,M.length-=Ee;break}M.mode=I;break;case xe:for(;re<14;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(M.nlen=(j&31)+257,j>>>=5,re-=5,M.ndist=(j&31)+1,j>>>=5,re-=5,M.ncode=(j&15)+4,j>>>=4,re-=4,M.nlen>286||M.ndist>30){N.msg="too many length or distance symbols",M.mode=oe;break}M.have=0,M.mode=Le;case Le:for(;M.have<M.ncode;){for(;re<3;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}M.lens[dt[M.have++]]=j&7,j>>>=3,re-=3}for(;M.have<19;)M.lens[dt[M.have++]]=0;if(M.lencode=M.lendyn,M.lenbits=7,et={bits:M.lenbits},tt=(0,u.default)(a,M.lens,0,19,M.lencode,0,M.work,et),M.lenbits=et.bits,tt){N.msg="invalid code lengths set",M.mode=oe;break}M.have=0,M.mode=ke;case ke:for(;M.have<M.nlen+M.ndist;){for(;ze=M.lencode[j&(1<<M.lenbits)-1],He=ze>>>24,$e=ze>>>16&255,Ie=ze&65535,!(He<=re);){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(Ie<16)j>>>=He,re-=He,M.lens[M.have++]=Ie;else{if(Ie===16){for(ot=He+2;re<ot;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(j>>>=He,re-=He,M.have===0){N.msg="invalid bit length repeat",M.mode=oe;break}Qe=M.lens[M.have-1],Ee=3+(j&3),j>>>=2,re-=2}else if(Ie===17){for(ot=He+3;re<ot;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}j>>>=He,re-=He,Qe=0,Ee=3+(j&7),j>>>=3,re-=3}else{for(ot=He+7;re<ot;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}j>>>=He,re-=He,Qe=0,Ee=11+(j&127),j>>>=7,re-=7}if(M.have+Ee>M.nlen+M.ndist){N.msg="invalid bit length repeat",M.mode=oe;break}for(;Ee--;)M.lens[M.have++]=Qe}}if(M.mode===oe)break;if(M.lens[256]===0){N.msg="invalid code -- missing end-of-block",M.mode=oe;break}if(M.lenbits=9,et={bits:M.lenbits},tt=(0,u.default)(t,M.lens,0,M.nlen,M.lencode,0,M.work,et),M.lenbits=et.bits,tt){N.msg="invalid literal/lengths set",M.mode=oe;break}if(M.distbits=6,M.distcode=M.distdyn,et={bits:M.distbits},tt=(0,u.default)(f,M.lens,M.nlen,M.ndist,M.distcode,0,M.work,et),M.distbits=et.bits,tt){N.msg="invalid distances set",M.mode=oe;break}if(M.mode=ae,le===l)break e;case ae:M.mode=ge;case ge:if(te>=6&&P>=258){N.next_out=ie,N.avail_out=P,N.next_in=w,N.avail_in=te,M.hold=j,M.bits=re,(0,o.default)(N,we),ie=N.next_out,Re=N.output,P=N.avail_out,w=N.next_in,ve=N.input,te=N.avail_in,j=M.hold,re=M.bits,M.mode===I&&(M.back=-1);break}for(M.back=0;ze=M.lencode[j&(1<<M.lenbits)-1],He=ze>>>24,$e=ze>>>16&255,Ie=ze&65535,!(He<=re);){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if($e&&!($e&240)){for(Ne=He,Ve=$e,Ge=Ie;ze=M.lencode[Ge+((j&(1<<Ne+Ve)-1)>>Ne)],He=ze>>>24,$e=ze>>>16&255,Ie=ze&65535,!(Ne+He<=re);){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}j>>>=Ne,re-=Ne,M.back+=Ne}if(j>>>=He,re-=He,M.back+=He,M.length=Ie,$e===0){M.mode=De;break}if($e&32){M.back=-1,M.mode=I;break}if($e&64){N.msg="invalid literal/length code",M.mode=oe;break}M.extra=$e&15,M.mode=Fe;case Fe:if(M.extra){for(ot=M.extra;re<ot;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}M.length+=j&(1<<M.extra)-1,j>>>=M.extra,re-=M.extra,M.back+=M.extra}M.was=M.length,M.mode=Te;case Te:for(;ze=M.distcode[j&(1<<M.distbits)-1],He=ze>>>24,$e=ze>>>16&255,Ie=ze&65535,!(He<=re);){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(!($e&240)){for(Ne=He,Ve=$e,Ge=Ie;ze=M.distcode[Ge+((j&(1<<Ne+Ve)-1)>>Ne)],He=ze>>>24,$e=ze>>>16&255,Ie=ze&65535,!(Ne+He<=re);){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}j>>>=Ne,re-=Ne,M.back+=Ne}if(j>>>=He,re-=He,M.back+=He,$e&64){N.msg="invalid distance code",M.mode=oe;break}M.offset=Ie,M.extra=$e&15,M.mode=Oe;case Oe:if(M.extra){for(ot=M.extra;re<ot;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}M.offset+=j&(1<<M.extra)-1,j>>>=M.extra,re-=M.extra,M.back+=M.extra}if(M.offset>M.dmax){N.msg="invalid distance too far back",M.mode=oe;break}M.mode=Pe;case Pe:if(P===0)break e;if(Ee=we-P,M.offset>Ee){if(Ee=M.offset-Ee,Ee>M.whave&&M.sane){N.msg="invalid distance too far back",M.mode=oe;break}Ee>M.wnext?(Ee-=M.wnext,Be=M.wsize-Ee):Be=M.wnext-Ee,Ee>M.length&&(Ee=M.length),je=M.window}else je=Re,Be=ie-M.offset,Ee=M.length;Ee>P&&(Ee=P),P-=Ee,M.length-=Ee;do Re[ie++]=je[Be++];while(--Ee);M.length===0&&(M.mode=ge);break;case De:if(P===0)break e;Re[ie++]=M.length,P--,M.mode=ge;break;case Xe:if(M.wrap){for(;re<32;){if(te===0)break e;te--,j|=ve[w++]<<re,re+=8}if(we-=P,N.total_out+=we,M.total+=we,we&&(N.adler=M.check=M.flags?(0,d.default)(M.check,Re,we,ie-we):(0,b.default)(M.check,Re,we,ie-we)),we=P,(M.flags?j:_e(j))!==M.check){N.msg="incorrect data check",M.mode=oe;break}j=0,re=0}M.mode=Ke;case Ke:if(M.wrap&&M.flags){for(;re<32;){if(te===0)break e;te--,j+=ve[w++]<<re,re+=8}if(j!==(M.total&4294967295)){N.msg="incorrect length check",M.mode=oe;break}j=0,re=0}M.mode=Ue;case Ue:tt=v;break e;case oe:tt=x;break e;case me:return E;case se:default:return g}return N.next_out=ie,N.avail_out=P,N.next_in=w,N.avail_in=te,M.hold=j,M.bits=re,(M.wsize||we!==N.avail_out&&M.mode<oe&&(M.mode<Xe||le!==e))&&A(N,N.output,N.next_out,we-N.avail_out)?(M.mode=me,E):(Ae-=N.avail_in,we-=N.avail_out,N.total_in+=Ae,N.total_out+=we,M.total+=we,M.wrap&&we&&(N.adler=M.check=M.flags?(0,d.default)(M.check,Re,we,N.next_out-we):(0,b.default)(M.check,Re,we,N.next_out-we)),N.data_type=M.bits+(M.last?64:0)+(M.mode===I?128:0)+(M.mode===ae||M.mode===G?256:0),(Ae===0&&we===0||le===e)&&tt===c&&(tt=C),tt)}function V(N){if(!N||!N.state)return g;var le=N.state;return le.window&&(le.window=null),N.state=null,c}function he(N,le){var M;return!N||!N.state||(M=N.state,!(M.wrap&2))?g:(M.head=le,le.done=!1,c)}function ye(N,le){var M=le.length,ve,Re,w;return!N||!N.state||(ve=N.state,ve.wrap!==0&&ve.mode!==X)?g:ve.mode===X&&(Re=1,Re=(0,b.default)(Re,le,M,0),Re!==ve.check)?x:(w=A(N,le,M,M),w?(ve.mode=me,E):(ve.havedict=1,c))}var de="pako inflate (from Nodeca project)";D.inflateInfo=de},63093:function(Me,D,s){"use strict";function _(c){"@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},_(c)}Object.defineProperty(D,"__esModule",{value:!0}),D.default=l;var p=d(s(35986));function b(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return b=function(){return c},c}function d(c){if(c&&c.__esModule)return c;if(c===null||_(c)!=="object"&&typeof c!="function")return{default:c};var v=b();if(v&&v.has(c))return v.get(c);var y={},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in c)if(Object.prototype.hasOwnProperty.call(c,x)){var E=g?Object.getOwnPropertyDescriptor(c,x):null;E&&(E.get||E.set)?Object.defineProperty(y,x,E):y[x]=c[x]}return y.default=c,v&&v.set(c,y),y}var o=15,u=852,h=592,r=0,n=1,a=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],f=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],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],i=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function l(c,v,y,g,x,E,C,m){var S=m.bits,k=0,O=0,F=0,z=0,H=0,q=0,K=0,$=0,R=0,X=0,I,W,B,G,fe,xe=null,Le=0,ke,ae=new p.Buf16(o+1),ge=new p.Buf16(o+1),Fe=null,Te=0,Oe,Pe,De;for(k=0;k<=o;k++)ae[k]=0;for(O=0;O<g;O++)ae[v[y+O]]++;for(H=S,z=o;z>=1&&ae[z]===0;z--);if(H>z&&(H=z),z===0)return x[E++]=1<<24|64<<16|0,x[E++]=1<<24|64<<16|0,m.bits=1,0;for(F=1;F<z&&ae[F]===0;F++);for(H<F&&(H=F),$=1,k=1;k<=o;k++)if($<<=1,$-=ae[k],$<0)return-1;if($>0&&(c===r||z!==1))return-1;for(ge[1]=0,k=1;k<o;k++)ge[k+1]=ge[k]+ae[k];for(O=0;O<g;O++)v[y+O]!==0&&(C[ge[v[y+O]]++]=O);if(c===r?(xe=Fe=C,ke=19):c===n?(xe=t,Le-=257,Fe=f,Te-=257,ke=256):(xe=e,Fe=i,ke=-1),X=0,O=0,k=F,fe=E,q=H,K=0,B=-1,R=1<<H,G=R-1,c===n&&R>u||c===a&&R>h)return 1;for(;;){Oe=k-K,C[O]<ke?(Pe=0,De=C[O]):C[O]>ke?(Pe=Fe[Te+C[O]],De=xe[Le+C[O]]):(Pe=96,De=0),I=1<<k-K,W=1<<q,F=W;do W-=I,x[fe+(X>>K)+W]=Oe<<24|Pe<<16|De|0;while(W!==0);for(I=1<<k-1;X&I;)I>>=1;if(I!==0?(X&=I-1,X+=I):X=0,O++,--ae[k]===0){if(k===z)break;k=v[y+C[O]]}if(k>H&&(X&G)!==B){for(K===0&&(K=H),fe+=F,q=k-K,$=1<<q;q+K<z&&($-=ae[q+K],!($<=0));)q++,$<<=1;if(R+=1<<q,c===n&&R>u||c===a&&R>h)return 1;B=X&G,x[B]=H<<24|q<<16|fe-E|0}}return X!==0&&(x[fe+X]=k-K<<24|64<<16|0),m.bits=H,0}},70892:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=void 0;var s={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=s},55796:function(Me,D,s){"use strict";function _(A){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_=function(V){return typeof V}:_=function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},_(A)}Object.defineProperty(D,"__esModule",{value:!0}),D._tr_init=T,D._tr_stored_block=Y,D._tr_flush_block=Ce,D._tr_tally=Z,D._tr_align=pe;var p=d(s(35986));function b(){if(typeof WeakMap!="function")return null;var A=new WeakMap;return b=function(){return A},A}function d(A){if(A&&A.__esModule)return A;if(A===null||_(A)!=="object"&&typeof A!="function")return{default:A};var Q=b();if(Q&&Q.has(A))return Q.get(A);var V={},he=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ye in A)if(Object.prototype.hasOwnProperty.call(A,ye)){var de=he?Object.getOwnPropertyDescriptor(A,ye):null;de&&(de.get||de.set)?Object.defineProperty(V,ye,de):V[ye]=A[ye]}return V.default=A,Q&&Q.set(A,V),V}var o=4,u=0,h=1,r=2;function n(A){for(var Q=A.length;--Q>=0;)A[Q]=0}var a=0,t=1,f=2,e=3,i=258,l=29,c=256,v=c+1+l,y=30,g=19,x=2*v+1,E=15,C=16,m=7,S=256,k=16,O=17,F=18,z=[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],H=[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],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],$=512,R=new Array((v+2)*2);n(R);var X=new Array(y*2);n(X);var I=new Array($);n(I);var W=new Array(i-e+1);n(W);var B=new Array(l);n(B);var G=new Array(y);n(G);function fe(A,Q,V,he,ye){this.static_tree=A,this.extra_bits=Q,this.extra_base=V,this.elems=he,this.max_length=ye,this.has_stree=A&&A.length}var xe,Le,ke;function ae(A,Q){this.dyn_tree=A,this.max_code=0,this.stat_desc=Q}function ge(A){return A<256?I[A]:I[256+(A>>>7)]}function Fe(A,Q){A.pending_buf[A.pending++]=Q&255,A.pending_buf[A.pending++]=Q>>>8&255}function Te(A,Q,V){A.bi_valid>C-V?(A.bi_buf|=Q<<A.bi_valid&65535,Fe(A,A.bi_buf),A.bi_buf=Q>>C-A.bi_valid,A.bi_valid+=V-C):(A.bi_buf|=Q<<A.bi_valid&65535,A.bi_valid+=V)}function Oe(A,Q,V){Te(A,V[Q*2],V[Q*2+1])}function Pe(A,Q){var V=0;do V|=A&1,A>>>=1,V<<=1;while(--Q>0);return V>>>1}function De(A){A.bi_valid===16?(Fe(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):A.bi_valid>=8&&(A.pending_buf[A.pending++]=A.bi_buf&255,A.bi_buf>>=8,A.bi_valid-=8)}function Xe(A,Q){var V=Q.dyn_tree,he=Q.max_code,ye=Q.stat_desc.static_tree,de=Q.stat_desc.has_stree,N=Q.stat_desc.extra_bits,le=Q.stat_desc.extra_base,M=Q.stat_desc.max_length,ve,Re,w,ie,te,P,j=0;for(ie=0;ie<=E;ie++)A.bl_count[ie]=0;for(V[A.heap[A.heap_max]*2+1]=0,ve=A.heap_max+1;ve<x;ve++)Re=A.heap[ve],ie=V[V[Re*2+1]*2+1]+1,ie>M&&(ie=M,j++),V[Re*2+1]=ie,!(Re>he)&&(A.bl_count[ie]++,te=0,Re>=le&&(te=N[Re-le]),P=V[Re*2],A.opt_len+=P*(ie+te),de&&(A.static_len+=P*(ye[Re*2+1]+te)));if(j!==0){do{for(ie=M-1;A.bl_count[ie]===0;)ie--;A.bl_count[ie]--,A.bl_count[ie+1]+=2,A.bl_count[M]--,j-=2}while(j>0);for(ie=M;ie!==0;ie--)for(Re=A.bl_count[ie];Re!==0;)w=A.heap[--ve],!(w>he)&&(V[w*2+1]!==ie&&(A.opt_len+=(ie-V[w*2+1])*V[w*2],V[w*2+1]=ie),Re--)}}function Ke(A,Q,V){var he=new Array(E+1),ye=0,de,N;for(de=1;de<=E;de++)he[de]=ye=ye+V[de-1]<<1;for(N=0;N<=Q;N++){var le=A[N*2+1];le!==0&&(A[N*2]=Pe(he[le]++,le))}}function Ue(){var A,Q,V,he,ye,de=new Array(E+1);for(V=0,he=0;he<l-1;he++)for(B[he]=V,A=0;A<1<<z[he];A++)W[V++]=he;for(W[V-1]=he,ye=0,he=0;he<16;he++)for(G[he]=ye,A=0;A<1<<H[he];A++)I[ye++]=he;for(ye>>=7;he<y;he++)for(G[he]=ye<<7,A=0;A<1<<H[he]-7;A++)I[256+ye++]=he;for(Q=0;Q<=E;Q++)de[Q]=0;for(A=0;A<=143;)R[A*2+1]=8,A++,de[8]++;for(;A<=255;)R[A*2+1]=9,A++,de[9]++;for(;A<=279;)R[A*2+1]=7,A++,de[7]++;for(;A<=287;)R[A*2+1]=8,A++,de[8]++;for(Ke(R,v+1,de),A=0;A<y;A++)X[A*2+1]=5,X[A*2]=Pe(A,5);xe=new fe(R,z,c+1,v,E),Le=new fe(X,H,0,y,E),ke=new fe(new Array(0),q,0,g,m)}function oe(A){var Q;for(Q=0;Q<v;Q++)A.dyn_ltree[Q*2]=0;for(Q=0;Q<y;Q++)A.dyn_dtree[Q*2]=0;for(Q=0;Q<g;Q++)A.bl_tree[Q*2]=0;A.dyn_ltree[S*2]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function me(A){A.bi_valid>8?Fe(A,A.bi_buf):A.bi_valid>0&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function se(A,Q,V,he){me(A),he&&(Fe(A,V),Fe(A,~V)),p.arraySet(A.pending_buf,A.window,Q,V,A.pending),A.pending+=V}function J(A,Q,V,he){var ye=Q*2,de=V*2;return A[ye]<A[de]||A[ye]===A[de]&&he[Q]<=he[V]}function ne(A,Q,V){for(var he=A.heap[V],ye=V<<1;ye<=A.heap_len&&(ye<A.heap_len&&J(Q,A.heap[ye+1],A.heap[ye],A.depth)&&ye++,!J(Q,he,A.heap[ye],A.depth));)A.heap[V]=A.heap[ye],V=ye,ye<<=1;A.heap[V]=he}function Se(A,Q,V){var he,ye,de=0,N,le;if(A.last_lit!==0)do he=A.pending_buf[A.d_buf+de*2]<<8|A.pending_buf[A.d_buf+de*2+1],ye=A.pending_buf[A.l_buf+de],de++,he===0?Oe(A,ye,Q):(N=W[ye],Oe(A,N+c+1,Q),le=z[N],le!==0&&(ye-=B[N],Te(A,ye,le)),he--,N=ge(he),Oe(A,N,V),le=H[N],le!==0&&(he-=G[N],Te(A,he,le)));while(de<A.last_lit);Oe(A,S,Q)}function be(A,Q){var V=Q.dyn_tree,he=Q.stat_desc.static_tree,ye=Q.stat_desc.has_stree,de=Q.stat_desc.elems,N,le,M=-1,ve;for(A.heap_len=0,A.heap_max=x,N=0;N<de;N++)V[N*2]!==0?(A.heap[++A.heap_len]=M=N,A.depth[N]=0):V[N*2+1]=0;for(;A.heap_len<2;)ve=A.heap[++A.heap_len]=M<2?++M:0,V[ve*2]=1,A.depth[ve]=0,A.opt_len--,ye&&(A.static_len-=he[ve*2+1]);for(Q.max_code=M,N=A.heap_len>>1;N>=1;N--)ne(A,V,N);ve=de;do N=A.heap[1],A.heap[1]=A.heap[A.heap_len--],ne(A,V,1),le=A.heap[1],A.heap[--A.heap_max]=N,A.heap[--A.heap_max]=le,V[ve*2]=V[N*2]+V[le*2],A.depth[ve]=(A.depth[N]>=A.depth[le]?A.depth[N]:A.depth[le])+1,V[N*2+1]=V[le*2+1]=ve,A.heap[1]=ve++,ne(A,V,1);while(A.heap_len>=2);A.heap[--A.heap_max]=A.heap[1],Xe(A,Q),Ke(V,M,A.bl_count)}function _e(A,Q,V){var he,ye=-1,de,N=Q[0*2+1],le=0,M=7,ve=4;for(N===0&&(M=138,ve=3),Q[(V+1)*2+1]=65535,he=0;he<=V;he++)de=N,N=Q[(he+1)*2+1],!(++le<M&&de===N)&&(le<ve?A.bl_tree[de*2]+=le:de!==0?(de!==ye&&A.bl_tree[de*2]++,A.bl_tree[k*2]++):le<=10?A.bl_tree[O*2]++:A.bl_tree[F*2]++,le=0,ye=de,N===0?(M=138,ve=3):de===N?(M=6,ve=3):(M=7,ve=4))}function ce(A,Q,V){var he,ye=-1,de,N=Q[0*2+1],le=0,M=7,ve=4;for(N===0&&(M=138,ve=3),he=0;he<=V;he++)if(de=N,N=Q[(he+1)*2+1],!(++le<M&&de===N)){if(le<ve)do Oe(A,de,A.bl_tree);while(--le!==0);else de!==0?(de!==ye&&(Oe(A,de,A.bl_tree),le--),Oe(A,k,A.bl_tree),Te(A,le-3,2)):le<=10?(Oe(A,O,A.bl_tree),Te(A,le-3,3)):(Oe(A,F,A.bl_tree),Te(A,le-11,7));le=0,ye=de,N===0?(M=138,ve=3):de===N?(M=6,ve=3):(M=7,ve=4)}}function ue(A){var Q;for(_e(A,A.dyn_ltree,A.l_desc.max_code),_e(A,A.dyn_dtree,A.d_desc.max_code),be(A,A.bl_desc),Q=g-1;Q>=3&&A.bl_tree[K[Q]*2+1]===0;Q--);return A.opt_len+=3*(Q+1)+5+5+4,Q}function ee(A,Q,V,he){var ye;for(Te(A,Q-257,5),Te(A,V-1,5),Te(A,he-4,4),ye=0;ye<he;ye++)Te(A,A.bl_tree[K[ye]*2+1],3);ce(A,A.dyn_ltree,Q-1),ce(A,A.dyn_dtree,V-1)}function L(A){var Q=4093624447,V;for(V=0;V<=31;V++,Q>>>=1)if(Q&1&&A.dyn_ltree[V*2]!==0)return u;if(A.dyn_ltree[9*2]!==0||A.dyn_ltree[10*2]!==0||A.dyn_ltree[13*2]!==0)return h;for(V=32;V<c;V++)if(A.dyn_ltree[V*2]!==0)return h;return u}var U=!1;function T(A){U||(Ue(),U=!0),A.l_desc=new ae(A.dyn_ltree,xe),A.d_desc=new ae(A.dyn_dtree,Le),A.bl_desc=new ae(A.bl_tree,ke),A.bi_buf=0,A.bi_valid=0,oe(A)}function Y(A,Q,V,he){Te(A,(a<<1)+(he?1:0),3),se(A,Q,V,!0)}function pe(A){Te(A,t<<1,3),Oe(A,S,R),De(A)}function Ce(A,Q,V,he){var ye,de,N=0;A.level>0?(A.strm.data_type===r&&(A.strm.data_type=L(A)),be(A,A.l_desc),be(A,A.d_desc),N=ue(A),ye=A.opt_len+3+7>>>3,de=A.static_len+3+7>>>3,de<=ye&&(ye=de)):ye=de=V+5,V+4<=ye&&Q!==-1?Y(A,Q,V,he):A.strategy===o||de===ye?(Te(A,(t<<1)+(he?1:0),3),Se(A,R,X)):(Te(A,(f<<1)+(he?1:0),3),ee(A,A.l_desc.max_code+1,A.d_desc.max_code+1,N+1),Se(A,A.dyn_ltree,A.dyn_dtree)),oe(A),he&&me(A)}function Z(A,Q,V){return A.pending_buf[A.d_buf+A.last_lit*2]=Q>>>8&255,A.pending_buf[A.d_buf+A.last_lit*2+1]=Q&255,A.pending_buf[A.l_buf+A.last_lit]=V&255,A.last_lit++,Q===0?A.dyn_ltree[V*2]++:(A.matches++,Q--,A.dyn_ltree[(W[V]+c+1)*2]++,A.dyn_dtree[ge(Q)*2]++),A.last_lit===A.lit_bufsize-1}},27589:function(Me,D){"use strict";Object.defineProperty(D,"__esModule",{value:!0}),D.default=s;function s(){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(Me,D,s){"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=d(s(50500));function b(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return b=function(){return t},t}function d(t){if(t&&t.__esModule)return t;if(t===null||_(t)!=="object"&&typeof t!="function")return{default:t};var f=b();if(f&&f.has(t))return f.get(t);var e={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if(Object.prototype.hasOwnProperty.call(t,l)){var c=i?Object.getOwnPropertyDescriptor(t,l):null;c&&(c.get||c.set)?Object.defineProperty(e,l,c):e[l]=t[l]}return e.default=t,f&&f.set(t,e),e}function o(t,f){if(!(t instanceof f))throw new TypeError("Cannot call a class as a function")}function u(t,f){for(var e=0;e<f.length;e++){var i=f[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function h(t,f,e){return f&&u(t.prototype,f),e&&u(t,e),t}var r=!1,n=40*1024*1024,a=function(){function t(){o(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 h(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 i=0,l=e-1;l>=0;l--)i+=this._rQ[this._rQi++]<<l*8;return i}},{key:"rQshiftStr",value:function(e){typeof e=="undefined"&&(e=this.rQlen);for(var i="",l=0;l<e;l+=4096){var c=this.rQshiftBytes(Math.min(4096,e-l));i+=String.fromCharCode.apply(null,c)}return i}},{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,i){i===void 0&&(i=this.rQlen),e.set(new Uint8Array(this._rQ.buffer,this._rQi,i)),this._rQi+=i}},{key:"rQslice",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+e,i-e)}},{key:"rQwait",value:function(e,i,l){if(this.rQlen<i){if(l){if(this._rQi<l)throw new Error("rQwait cannot backup "+l+" bytes");this._rQi-=l}return!0}return!1}},{key:"flush",value:function(){this._sQlen>0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(e){this._sQ.set(e,this._sQlen),this._sQlen+=e.length,this.flush()}},{key:"sendString",value:function(e){this.send(e.split("").map(function(i){return i.charCodeAt(0)}))}},{key:"off",value:function(e){this._eventHandlers[e]=function(){}}},{key:"on",value:function(e,i){this._eventHandlers[e]=i}},{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,i){var l=this;this.init(),this._websocket=new WebSocket(e,i),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){p.Debug(">> WebSock.onopen"),l._websocket.protocol&&p.Info("Server choose sub-protocol: "+l._websocket.protocol),l._eventHandlers.open(),p.Debug("<< WebSock.onopen")},this._websocket.onclose=function(c){p.Debug(">> WebSock.onclose"),l._eventHandlers.close(c),p.Debug("<< WebSock.onclose")},this._websocket.onerror=function(c){p.Debug(">> WebSock.onerror: "+c),l._eventHandlers.error(c),p.Debug("<< WebSock.onerror: "+c)}}},{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 i=(this._rQlen-this._rQi+e)*8,l=this._rQbufferSize<i;if(l&&(this._rQbufferSize=Math.max(this._rQbufferSize*2,i)),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(l){var c=this._rQ.buffer;this._rQ=new Uint8Array(this._rQbufferSize),this._rQ.set(new Uint8Array(c,this._rQi,this._rQlen-this._rQi))}else r?this._rQ.copyWithin(0,this._rQi,this._rQlen):this._rQ.set(new Uint8Array(this._rQ.buffer,this._rQi,this._rQlen-this._rQi));this._rQlen=this._rQlen-this._rQi,this._rQi=0}},{key:"_DecodeMessage",value:function(e){var i=new Uint8Array(e);i.length>this._rQbufferSize-this._rQlen&&this._expandCompactRQ(i.length),this._rQ.set(i,this._rQlen),this._rQlen+=i.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=a},93681:function(Me,D,s){"use strict";s.r(D),s.d(D,{BaseInput:function(){return a},default:function(){return g}});var _=s(96663),p=s(44127),b=s(90493),d=s(20135),o=s(92310),u=s.n(o),h=s(59301),r=s(5643),n=function(E){var C,m,S=E.inputElement,k=E.prefixCls,O=E.prefix,F=E.suffix,z=E.addonBefore,H=E.addonAfter,q=E.className,K=E.style,$=E.disabled,R=E.readOnly,X=E.focused,I=E.triggerFocus,W=E.allowClear,B=E.value,G=E.handleReset,fe=E.hidden,xe=E.classes,Le=E.classNames,ke=E.dataAttrs,ae=E.styles,ge=E.components,Fe=(ge==null?void 0:ge.affixWrapper)||"span",Te=(ge==null?void 0:ge.groupWrapper)||"span",Oe=(ge==null?void 0:ge.wrapper)||"span",Pe=(ge==null?void 0:ge.groupAddon)||"span",De=(0,h.useRef)(null),Xe=function(ue){var ee;(ee=De.current)!==null&&ee!==void 0&&ee.contains(ue.target)&&(I==null||I())},Ke=function(){var ue;if(!W)return null;var ee=!$&&!R&&B,L="".concat(k,"-clear-icon"),U=(0,d.Z)(W)==="object"&&W!==null&&W!==void 0&&W.clearIcon?W.clearIcon:"\u2716";return h.createElement("span",{onClick:G,onMouseDown:function(Y){return Y.preventDefault()},className:u()(L,(ue={},(0,b.Z)(ue,"".concat(L,"-hidden"),!ee),(0,b.Z)(ue,"".concat(L,"-has-suffix"),!!F),ue)),role:"button",tabIndex:-1},U)},Ue=(0,h.cloneElement)(S,{value:B,hidden:fe,className:u()((C=S.props)===null||C===void 0?void 0:C.className,!(0,r.X3)(E)&&!(0,r.He)(E)&&q)||null,style:(0,p.Z)((0,p.Z)({},(m=S.props)===null||m===void 0?void 0:m.style),!(0,r.X3)(E)&&!(0,r.He)(E)?K:{})});if((0,r.X3)(E)){var oe,me="".concat(k,"-affix-wrapper"),se=u()(me,(oe={},(0,b.Z)(oe,"".concat(me,"-disabled"),$),(0,b.Z)(oe,"".concat(me,"-focused"),X),(0,b.Z)(oe,"".concat(me,"-readonly"),R),(0,b.Z)(oe,"".concat(me,"-input-with-clear-btn"),F&&W&&B),oe),!(0,r.He)(E)&&q,xe==null?void 0:xe.affixWrapper,Le==null?void 0:Le.affixWrapper),J=(F||W)&&h.createElement("span",{className:u()("".concat(k,"-suffix"),Le==null?void 0:Le.suffix),style:ae==null?void 0:ae.suffix},Ke(),F);Ue=h.createElement(Fe,(0,_.Z)({className:se,style:(0,p.Z)((0,p.Z)({},(0,r.He)(E)?void 0:K),ae==null?void 0:ae.affixWrapper),hidden:!(0,r.He)(E)&&fe,onClick:Xe},ke==null?void 0:ke.affixWrapper,{ref:De}),O&&h.createElement("span",{className:u()("".concat(k,"-prefix"),Le==null?void 0:Le.prefix),style:ae==null?void 0:ae.prefix},O),(0,h.cloneElement)(S,{value:B,hidden:null}),J)}if((0,r.He)(E)){var ne="".concat(k,"-group"),Se="".concat(ne,"-addon"),be=u()("".concat(k,"-wrapper"),ne,xe==null?void 0:xe.wrapper),_e=u()("".concat(k,"-group-wrapper"),q,xe==null?void 0:xe.group);return h.createElement(Te,{className:_e,style:K,hidden:fe},h.createElement(Oe,{className:be},z&&h.createElement(Pe,{className:Se},z),(0,h.cloneElement)(Ue,{hidden:null}),H&&h.createElement(Pe,{className:Se},H)))}return Ue},a=n,t=s(19127),f=s(72071),e=s(6620),i=s(18929),l=s(2738),c=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],v=(0,h.forwardRef)(function(x,E){var C=x.autoComplete,m=x.onChange,S=x.onFocus,k=x.onBlur,O=x.onPressEnter,F=x.onKeyDown,z=x.prefixCls,H=z===void 0?"rc-input":z,q=x.disabled,K=x.htmlSize,$=x.className,R=x.maxLength,X=x.suffix,I=x.showCount,W=x.type,B=W===void 0?"text":W,G=x.classes,fe=x.classNames,xe=x.styles,Le=(0,e.Z)(x,c),ke=(0,i.Z)(x.defaultValue,{value:x.value}),ae=(0,f.Z)(ke,2),ge=ae[0],Fe=ae[1],Te=(0,h.useState)(!1),Oe=(0,f.Z)(Te,2),Pe=Oe[0],De=Oe[1],Xe=(0,h.useRef)(null),Ke=function(_e){Xe.current&&(0,r.nH)(Xe.current,_e)};(0,h.useImperativeHandle)(E,function(){return{focus:Ke,blur:function(){var _e;(_e=Xe.current)===null||_e===void 0||_e.blur()},setSelectionRange:function(_e,ce,ue){var ee;(ee=Xe.current)===null||ee===void 0||ee.setSelectionRange(_e,ce,ue)},select:function(){var _e;(_e=Xe.current)===null||_e===void 0||_e.select()},input:Xe.current}}),(0,h.useEffect)(function(){De(function(be){return be&&q?!1:be})},[q]);var Ue=function(_e){x.value===void 0&&Fe(_e.target.value),Xe.current&&(0,r.rJ)(Xe.current,_e,m)},oe=function(_e){O&&_e.key==="Enter"&&O(_e),F==null||F(_e)},me=function(_e){De(!0),S==null||S(_e)},se=function(_e){De(!1),k==null||k(_e)},J=function(_e){Fe(""),Ke(),Xe.current&&(0,r.rJ)(Xe.current,_e,m)},ne=function(){var _e=(0,l.Z)(x,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return h.createElement("input",(0,_.Z)({autoComplete:C},_e,{onChange:Ue,onFocus:me,onBlur:se,onKeyDown:oe,className:u()(H,(0,b.Z)({},"".concat(H,"-disabled"),q),fe==null?void 0:fe.input),style:xe==null?void 0:xe.input,ref:Xe,size:K,type:B}))},Se=function(){var _e=Number(R)>0;if(X||I){var ce=(0,r.D7)(ge),ue=(0,t.Z)(ce).length,ee=(0,d.Z)(I)==="object"?I.formatter({value:ce,count:ue,maxLength:R}):"".concat(ue).concat(_e?" / ".concat(R):"");return h.createElement(h.Fragment,null,!!I&&h.createElement("span",{className:u()("".concat(H,"-show-count-suffix"),(0,b.Z)({},"".concat(H,"-show-count-has-suffix"),!!X),fe==null?void 0:fe.count),style:(0,p.Z)({},xe==null?void 0:xe.count)},ee),X)}return null};return h.createElement(a,(0,_.Z)({},Le,{prefixCls:H,className:$,inputElement:ne(),handleReset:J,value:(0,r.D7)(ge),focused:Pe,triggerFocus:Ke,suffix:Se(),disabled:q,classes:G,classNames:fe,styles:xe}))}),y=v,g=y},5643:function(Me,D,s){"use strict";s.d(D,{D7:function(){return o},He:function(){return _},X3:function(){return p},nH:function(){return d},rJ:function(){return b}});function _(u){return!!(u.addonBefore||u.addonAfter)}function p(u){return!!(u.prefix||u.suffix||u.allowClear)}function b(u,h,r,n){if(r){var a=h;if(h.type==="click"){var t=u.cloneNode(!0);a=Object.create(h,{target:{value:t},currentTarget:{value:t}}),t.value="",r(a);return}if(n!==void 0){a=Object.create(h,{target:{value:u},currentTarget:{value:u}}),u.value=n,r(a);return}r(a)}}function d(u,h){if(u){u.focus(h);var r=h||{},n=r.cursor;if(n){var a=u.value.length;switch(n){case"start":u.setSelectionRange(0,0);break;case"end":u.setSelectionRange(a,a);break;default:u.setSelectionRange(0,a)}}}}function o(u){return typeof u=="undefined"||u===null?"":String(u)}},29301:function(Me,D,s){"use strict";s.d(D,{Z:function(){return q}});var _=s(96663),p=s(59301),b=s(11592),d=s(48736),o=s(44127),u=s(20135),h=s(76846),r=s(8654),n=p.createContext(null);function a(K){var $=K.children,R=K.onBatchResize,X=p.useRef(0),I=p.useRef([]),W=p.useContext(n),B=p.useCallback(function(G,fe,xe){X.current+=1;var Le=X.current;I.current.push({size:G,element:fe,data:xe}),Promise.resolve().then(function(){Le===X.current&&(R==null||R(I.current),I.current=[])}),W==null||W(G,fe,xe)},[R,W]);return p.createElement(n.Provider,{value:B},$)}var t=s(76374),f=new Map;function e(K){K.forEach(function($){var R,X=$.target;(R=f.get(X))===null||R===void 0||R.forEach(function(I){return I(X)})})}var i=new t.Z(e),l=null,c=null;function v(K,$){f.has(K)||(f.set(K,new Set),i.observe(K)),f.get(K).add($)}function y(K,$){f.has(K)&&(f.get(K).delete($),f.get(K).size||(i.unobserve(K),f.delete(K)))}var g=s(52884),x=s(95727),E=s(65711),C=s(85745),m=function(K){(0,E.Z)(R,K);var $=(0,C.Z)(R);function R(){return(0,g.Z)(this,R),$.apply(this,arguments)}return(0,x.Z)(R,[{key:"render",value:function(){return this.props.children}}]),R}(p.Component);function S(K,$){var R=K.children,X=K.disabled,I=p.useRef(null),W=p.useRef(null),B=p.useContext(n),G=typeof R=="function",fe=G?R(I):R,xe=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Le=!G&&p.isValidElement(fe)&&(0,r.Yr)(fe),ke=Le?(0,r.C4)(fe):null,ae=(0,r.x1)(ke,I),ge=function(){var Pe;return(0,h.ZP)(I.current)||(I.current&&(0,u.Z)(I.current)==="object"?(0,h.ZP)((Pe=I.current)===null||Pe===void 0?void 0:Pe.nativeElement):null)||(0,h.ZP)(W.current)};p.useImperativeHandle($,function(){return ge()});var Fe=p.useRef(K);Fe.current=K;var Te=p.useCallback(function(Oe){var Pe=Fe.current,De=Pe.onResize,Xe=Pe.data,Ke=Oe.getBoundingClientRect(),Ue=Ke.width,oe=Ke.height,me=Oe.offsetWidth,se=Oe.offsetHeight,J=Math.floor(Ue),ne=Math.floor(oe);if(xe.current.width!==J||xe.current.height!==ne||xe.current.offsetWidth!==me||xe.current.offsetHeight!==se){var Se={width:J,height:ne,offsetWidth:me,offsetHeight:se};xe.current=Se;var be=me===Math.round(Ue)?Ue:me,_e=se===Math.round(oe)?oe:se,ce=(0,o.Z)((0,o.Z)({},Se),{},{offsetWidth:be,offsetHeight:_e});B==null||B(ce,Oe,Xe),De&&Promise.resolve().then(function(){De(ce,Oe)})}},[]);return p.useEffect(function(){var Oe=ge();return Oe&&!X&&v(Oe,Te),function(){return y(Oe,Te)}},[I.current,X]),p.createElement(m,{ref:W},Le?p.cloneElement(fe,{ref:ae}):fe)}var k=p.forwardRef(S),O=k,F="rc-observer-key";function z(K,$){var R=K.children,X=typeof R=="function"?[R]:(0,b.Z)(R);return X.map(function(I,W){var B=(I==null?void 0:I.key)||"".concat(F,"-").concat(W);return p.createElement(O,(0,_.Z)({},K,{key:B,ref:W===0?$:void 0}),I)})}var H=p.forwardRef(z);H.Collection=a;var q=H},9296:function(Me,D,s){"use strict";s.r(D),s.d(D,{ResizableTextArea:function(){return z},default:function(){return X}});var _=s(96663),p=s(44127),b=s(90493),d=s(20135),o=s(72071),u=s(6620),h=s(19127),r=s(92310),n=s.n(r),a=s(93681),t=s(5643),f=s(18929),e=s(59301),i=s(29301),l=s(34280),c=s(16089),v=`
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;
`,y=["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"],g={},x;function E(I){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,B=I.getAttribute("id")||I.getAttribute("data-reactid")||I.getAttribute("name");if(W&&g[B])return g[B];var G=window.getComputedStyle(I),fe=G.getPropertyValue("box-sizing")||G.getPropertyValue("-moz-box-sizing")||G.getPropertyValue("-webkit-box-sizing"),xe=parseFloat(G.getPropertyValue("padding-bottom"))+parseFloat(G.getPropertyValue("padding-top")),Le=parseFloat(G.getPropertyValue("border-bottom-width"))+parseFloat(G.getPropertyValue("border-top-width")),ke=y.map(function(ge){return"".concat(ge,":").concat(G.getPropertyValue(ge))}).join(";"),ae={sizingStyle:ke,paddingSize:xe,borderSize:Le,boxSizing:fe};return W&&B&&(g[B]=ae),ae}function C(I){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,G=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;x||(x=document.createElement("textarea"),x.setAttribute("tab-index","-1"),x.setAttribute("aria-hidden","true"),document.body.appendChild(x)),I.getAttribute("wrap")?x.setAttribute("wrap",I.getAttribute("wrap")):x.removeAttribute("wrap");var fe=E(I,W),xe=fe.paddingSize,Le=fe.borderSize,ke=fe.boxSizing,ae=fe.sizingStyle;x.setAttribute("style","".concat(ae,";").concat(v)),x.value=I.value||I.placeholder||"";var ge=void 0,Fe=void 0,Te,Oe=x.scrollHeight;if(ke==="border-box"?Oe+=Le:ke==="content-box"&&(Oe-=xe),B!==null||G!==null){x.value=" ";var Pe=x.scrollHeight-xe;B!==null&&(ge=Pe*B,ke==="border-box"&&(ge=ge+xe+Le),Oe=Math.max(ge,Oe)),G!==null&&(Fe=Pe*G,ke==="border-box"&&(Fe=Fe+xe+Le),Te=Oe>Fe?"":"hidden",Oe=Math.min(Fe,Oe))}var De={height:Oe,overflowY:Te,resize:"none"};return ge&&(De.minHeight=ge),Fe&&(De.maxHeight=Fe),De}var m=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],S=0,k=1,O=2,F=e.forwardRef(function(I,W){var B=I,G=B.prefixCls,fe=B.onPressEnter,xe=B.defaultValue,Le=B.value,ke=B.autoSize,ae=B.onResize,ge=B.className,Fe=B.style,Te=B.disabled,Oe=B.onChange,Pe=B.onInternalAutoSize,De=(0,u.Z)(B,m),Xe=(0,f.Z)(xe,{value:Le,postState:function(N){return N!=null?N:""}}),Ke=(0,o.Z)(Xe,2),Ue=Ke[0],oe=Ke[1],me=function(N){oe(N.target.value),Oe==null||Oe(N)},se=e.useRef();e.useImperativeHandle(W,function(){return{textArea:se.current}});var J=e.useMemo(function(){return ke&&(0,d.Z)(ke)==="object"?[ke.minRows,ke.maxRows]:[]},[ke]),ne=(0,o.Z)(J,2),Se=ne[0],be=ne[1],_e=!!ke,ce=function(){try{if(document.activeElement===se.current){var N=se.current,le=N.selectionStart,M=N.selectionEnd,ve=N.scrollTop;se.current.setSelectionRange(le,M),se.current.scrollTop=ve}}catch(Re){}},ue=e.useState(O),ee=(0,o.Z)(ue,2),L=ee[0],U=ee[1],T=e.useState(),Y=(0,o.Z)(T,2),pe=Y[0],Ce=Y[1],Z=function(){U(S)};(0,l.Z)(function(){_e&&Z()},[Le,Se,be,_e]),(0,l.Z)(function(){if(L===S)U(k);else if(L===k){var de=C(se.current,!1,Se,be);U(O),Ce(de)}else ce()},[L]);var A=e.useRef(),Q=function(){c.Z.cancel(A.current)},V=function(N){L===O&&(ae==null||ae(N),ke&&(Q(),A.current=(0,c.Z)(function(){Z()})))};e.useEffect(function(){return Q},[]);var he=_e?pe:null,ye=(0,p.Z)((0,p.Z)({},Fe),he);return(L===S||L===k)&&(ye.overflowY="hidden",ye.overflowX="hidden"),e.createElement(i.Z,{onResize:V,disabled:!(ke||ae)},e.createElement("textarea",(0,_.Z)({},De,{ref:se,style:ye,className:n()(G,ge,(0,b.Z)({},"".concat(G,"-disabled"),Te)),disabled:Te,value:Ue,onChange:me})))}),z=F,H=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function q(I,W){return(0,h.Z)(I||"").slice(0,W).join("")}function K(I,W,B,G){var fe=B;return I?fe=q(B,G):(0,h.Z)(W||"").length<B.length&&(0,h.Z)(B||"").length>G&&(fe=W),fe}var $=e.forwardRef(function(I,W){var B,G=I.defaultValue,fe=I.value,xe=I.onFocus,Le=I.onBlur,ke=I.onChange,ae=I.allowClear,ge=I.maxLength,Fe=I.onCompositionStart,Te=I.onCompositionEnd,Oe=I.suffix,Pe=I.prefixCls,De=Pe===void 0?"rc-textarea":Pe,Xe=I.classes,Ke=I.showCount,Ue=I.className,oe=I.style,me=I.disabled,se=I.hidden,J=I.classNames,ne=I.styles,Se=I.onResize,be=(0,u.Z)(I,H),_e=(0,f.Z)(G,{value:fe,defaultValue:G}),ce=(0,o.Z)(_e,2),ue=ce[0],ee=ce[1],L=(0,e.useRef)(null),U=e.useState(!1),T=(0,o.Z)(U,2),Y=T[0],pe=T[1],Ce=e.useState(!1),Z=(0,o.Z)(Ce,2),A=Z[0],Q=Z[1],V=e.useRef(),he=e.useRef(0),ye=e.useState(null),de=(0,o.Z)(ye,2),N=de[0],le=de[1],M=function(){var Ie;(Ie=L.current)===null||Ie===void 0||Ie.textArea.focus()};(0,e.useImperativeHandle)(W,function(){return{resizableTextArea:L.current,focus:M,blur:function(){var Ie;(Ie=L.current)===null||Ie===void 0||Ie.textArea.blur()}}}),(0,e.useEffect)(function(){pe(function($e){return!me&&$e})},[me]);var ve=Number(ge)>0,Re=function(Ie){Q(!0),V.current=ue,he.current=Ie.currentTarget.selectionStart,Fe==null||Fe(Ie)},w=function(Ie){Q(!1);var Ne=Ie.currentTarget.value;if(ve){var Ve,Ge=he.current>=ge+1||he.current===((Ve=V.current)===null||Ve===void 0?void 0:Ve.length);Ne=K(Ge,V.current,Ne,ge)}Ne!==ue&&(ee(Ne),(0,t.rJ)(Ie.currentTarget,Ie,ke,Ne)),Te==null||Te(Ie)},ie=function(Ie){var Ne=Ie.target.value;if(!A&&ve){var Ve=Ie.target.selectionStart>=ge+1||Ie.target.selectionStart===Ne.length||!Ie.target.selectionStart;Ne=K(Ve,ue,Ne,ge)}ee(Ne),(0,t.rJ)(Ie.currentTarget,Ie,ke,Ne)},te=function(Ie){var Ne=be.onPressEnter,Ve=be.onKeyDown;Ie.key==="Enter"&&Ne&&Ne(Ie),Ve==null||Ve(Ie)},P=function(Ie){pe(!0),xe==null||xe(Ie)},j=function(Ie){pe(!1),Le==null||Le(Ie)},re=function(Ie){var Ne;ee(""),M(),(0,t.rJ)((Ne=L.current)===null||Ne===void 0?void 0:Ne.textArea,Ie,ke)},Ae=(0,t.D7)(ue);!A&&ve&&fe==null&&(Ae=q(Ae,ge));var we=Oe,Ee;if(Ke){var Be=(0,h.Z)(Ae).length;(0,d.Z)(Ke)==="object"?Ee=Ke.formatter({value:Ae,count:Be,maxLength:ge}):Ee="".concat(Be).concat(ve?" / ".concat(ge):""),we=e.createElement(e.Fragment,null,we,e.createElement("span",{className:n()("".concat(De,"-data-count"),J==null?void 0:J.count),style:ne==null?void 0:ne.count},Ee))}var je=function(Ie){var Ne;Se==null||Se(Ie),(Ne=L.current)!==null&&Ne!==void 0&&Ne.textArea.style.height&&le(!0)},ze=!be.autoSize&&!Ke&&!ae,He=e.createElement(a.BaseInput,{value:Ae,allowClear:ae,handleReset:re,suffix:we,prefixCls:De,classes:{affixWrapper:n()(Xe==null?void 0:Xe.affixWrapper,(B={},(0,b.Z)(B,"".concat(De,"-show-count"),Ke),(0,b.Z)(B,"".concat(De,"-textarea-allow-clear"),ae),B))},disabled:me,focused:Y,className:Ue,style:(0,p.Z)((0,p.Z)({},oe),N&&!ze?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ee=="string"?Ee:void 0}},hidden:se,inputElement:e.createElement(z,(0,_.Z)({},be,{onKeyDown:te,onChange:ie,onFocus:P,onBlur:j,onCompositionStart:Re,onCompositionEnd:w,className:J==null?void 0:J.textarea,style:(0,p.Z)((0,p.Z)({},ne==null?void 0:ne.textarea),{},{resize:oe==null?void 0:oe.resize}),disabled:me,prefixCls:De,onResize:je,ref:L}))});return He}),R=$,X=R},55477:function(Me,D,s){"use strict";s.d(D,{G:function(){return e},Z:function(){return v}});var _=s(96663),p=s(44127),b=s(6620),d=s(35593),o=s(59301),u={shiftX:64,adjustY:1},h={adjustX:1,shiftY:!0},r=[0,0],n={left:{points:["cr","cl"],overflow:h,offset:[-4,0],targetOffset:r},right:{points:["cl","cr"],overflow:h,offset:[4,0],targetOffset:r},top:{points:["bc","tc"],overflow:u,offset:[0,-4],targetOffset:r},bottom:{points:["tc","bc"],overflow:u,offset:[0,4],targetOffset:r},topLeft:{points:["bl","tl"],overflow:u,offset:[0,-4],targetOffset:r},leftTop:{points:["tr","tl"],overflow:h,offset:[-4,0],targetOffset:r},topRight:{points:["br","tr"],overflow:u,offset:[0,-4],targetOffset:r},rightTop:{points:["tl","tr"],overflow:h,offset:[4,0],targetOffset:r},bottomRight:{points:["tr","br"],overflow:u,offset:[0,4],targetOffset:r},rightBottom:{points:["bl","br"],overflow:h,offset:[4,0],targetOffset:r},bottomLeft:{points:["tl","bl"],overflow:u,offset:[0,4],targetOffset:r},leftBottom:{points:["br","bl"],overflow:h,offset:[-4,0],targetOffset:r}},a=null,t=s(92310),f=s.n(t);function e(y){var g=y.children,x=y.prefixCls,E=y.id,C=y.overlayInnerStyle,m=y.className,S=y.style;return o.createElement("div",{className:f()("".concat(x,"-content"),m),style:S},o.createElement("div",{className:"".concat(x,"-inner"),id:E,role:"tooltip",style:C},typeof g=="function"?g():g))}var i=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],l=function(g,x){var E=g.overlayClassName,C=g.trigger,m=C===void 0?["hover"]:C,S=g.mouseEnterDelay,k=S===void 0?0:S,O=g.mouseLeaveDelay,F=O===void 0?.1:O,z=g.overlayStyle,H=g.prefixCls,q=H===void 0?"rc-tooltip":H,K=g.children,$=g.onVisibleChange,R=g.afterVisibleChange,X=g.transitionName,I=g.animation,W=g.motion,B=g.placement,G=B===void 0?"right":B,fe=g.align,xe=fe===void 0?{}:fe,Le=g.destroyTooltipOnHide,ke=Le===void 0?!1:Le,ae=g.defaultVisible,ge=g.getTooltipContainer,Fe=g.overlayInnerStyle,Te=g.arrowContent,Oe=g.overlay,Pe=g.id,De=g.showArrow,Xe=De===void 0?!0:De,Ke=(0,b.Z)(g,i),Ue=(0,o.useRef)(null);(0,o.useImperativeHandle)(x,function(){return Ue.current});var oe=(0,p.Z)({},Ke);"visible"in g&&(oe.popupVisible=g.visible);var me=function(){return o.createElement(e,{key:"content",prefixCls:q,id:Pe,overlayInnerStyle:Fe},Oe)};return o.createElement(d.Z,(0,_.Z)({popupClassName:E,prefixCls:q,popup:me,action:m,builtinPlacements:n,popupPlacement:G,ref:Ue,popupAlign:xe,getPopupContainer:ge,onPopupVisibleChange:$,afterPopupVisibleChange:R,popupTransitionName:X,popupAnimation:I,popupMotion:W,defaultPopupVisible:ae,autoDestroy:ke,mouseLeaveDelay:F,popupStyle:z,mouseEnterDelay:k,arrow:Xe},oe),K)},c=(0,o.forwardRef)(l),v=c},49658:function(Me,D){"use strict";D.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var s=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(s)||/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(s==null?void 0:s.substr(0,4))}},76374:function(Me,D,s){"use strict";var _=function(){if(typeof Map!="undefined")return Map;function q(K,$){var R=-1;return K.some(function(X,I){return X[0]===$?(R=I,!0):!1}),R}return function(){function K(){this.__entries__=[]}return Object.defineProperty(K.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),K.prototype.get=function($){var R=q(this.__entries__,$),X=this.__entries__[R];return X&&X[1]},K.prototype.set=function($,R){var X=q(this.__entries__,$);~X?this.__entries__[X][1]=R:this.__entries__.push([$,R])},K.prototype.delete=function($){var R=this.__entries__,X=q(R,$);~X&&R.splice(X,1)},K.prototype.has=function($){return!!~q(this.__entries__,$)},K.prototype.clear=function(){this.__entries__.splice(0)},K.prototype.forEach=function($,R){R===void 0&&(R=null);for(var X=0,I=this.__entries__;X<I.length;X++){var W=I[X];$.call(R,W[1],W[0])}},K}()}(),p=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,b=function(){return typeof s.g!="undefined"&&s.g.Math===Math?s.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),d=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(b):function(q){return setTimeout(function(){return q(Date.now())},1e3/60)}}(),o=2;function u(q,K){var $=!1,R=!1,X=0;function I(){$&&($=!1,q()),R&&B()}function W(){d(I)}function B(){var G=Date.now();if($){if(G-X<o)return;R=!0}else $=!0,R=!1,setTimeout(W,K);X=G}return B}var h=20,r=["top","right","bottom","left","width","height","size","weight"],n=typeof MutationObserver!="undefined",a=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),h)}return q.prototype.addObserver=function(K){~this.observers_.indexOf(K)||this.observers_.push(K),this.connected_||this.connect_()},q.prototype.removeObserver=function(K){var $=this.observers_,R=$.indexOf(K);~R&&$.splice(R,1),!$.length&&this.connected_&&this.disconnect_()},q.prototype.refresh=function(){var K=this.updateObservers_();K&&this.refresh()},q.prototype.updateObservers_=function(){var K=this.observers_.filter(function($){return $.gatherActive(),$.hasActive()});return K.forEach(function($){return $.broadcastActive()}),K.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(K){var $=K.propertyName,R=$===void 0?"":$,X=r.some(function(I){return!!~R.indexOf(I)});X&&this.refresh()},q.getInstance=function(){return this.instance_||(this.instance_=new q),this.instance_},q.instance_=null,q}(),t=function(q,K){for(var $=0,R=Object.keys(K);$<R.length;$++){var X=R[$];Object.defineProperty(q,X,{value:K[X],enumerable:!1,writable:!1,configurable:!0})}return q},f=function(q){var K=q&&q.ownerDocument&&q.ownerDocument.defaultView;return K||b},e=m(0,0,0,0);function i(q){return parseFloat(q)||0}function l(q){for(var K=[],$=1;$<arguments.length;$++)K[$-1]=arguments[$];return K.reduce(function(R,X){var I=q["border-"+X+"-width"];return R+i(I)},0)}function c(q){for(var K=["top","right","bottom","left"],$={},R=0,X=K;R<X.length;R++){var I=X[R],W=q["padding-"+I];$[I]=i(W)}return $}function v(q){var K=q.getBBox();return m(0,0,K.width,K.height)}function y(q){var K=q.clientWidth,$=q.clientHeight;if(!K&&!$)return e;var R=f(q).getComputedStyle(q),X=c(R),I=X.left+X.right,W=X.top+X.bottom,B=i(R.width),G=i(R.height);if(R.boxSizing==="border-box"&&(Math.round(B+I)!==K&&(B-=l(R,"left","right")+I),Math.round(G+W)!==$&&(G-=l(R,"top","bottom")+W)),!x(q)){var fe=Math.round(B+I)-K,xe=Math.round(G+W)-$;Math.abs(fe)!==1&&(B-=fe),Math.abs(xe)!==1&&(G-=xe)}return m(X.left,X.top,B,G)}var g=function(){return typeof SVGGraphicsElement!="undefined"?function(q){return q instanceof f(q).SVGGraphicsElement}:function(q){return q instanceof f(q).SVGElement&&typeof q.getBBox=="function"}}();function x(q){return q===f(q).document.documentElement}function E(q){return p?g(q)?v(q):y(q):e}function C(q){var K=q.x,$=q.y,R=q.width,X=q.height,I=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,W=Object.create(I.prototype);return t(W,{x:K,y:$,width:R,height:X,top:$,right:K+R,bottom:X+$,left:K}),W}function m(q,K,$,R){return{x:q,y:K,width:$,height:R}}var S=function(){function q(K){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=K}return q.prototype.isActive=function(){var K=E(this.target);return this.contentRect_=K,K.width!==this.broadcastWidth||K.height!==this.broadcastHeight},q.prototype.broadcastRect=function(){var K=this.contentRect_;return this.broadcastWidth=K.width,this.broadcastHeight=K.height,K},q}(),k=function(){function q(K,$){var R=C($);t(this,{target:K,contentRect:R})}return q}(),O=function(){function q(K,$,R){if(this.activeObservations_=[],this.observations_=new _,typeof K!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=K,this.controller_=$,this.callbackCtx_=R}return q.prototype.observe=function(K){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(K instanceof f(K).Element))throw new TypeError('parameter 1 is not of type "Element".');var $=this.observations_;$.has(K)||($.set(K,new S(K)),this.controller_.addObserver(this),this.controller_.refresh())}},q.prototype.unobserve=function(K){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(K instanceof f(K).Element))throw new TypeError('parameter 1 is not of type "Element".');var $=this.observations_;$.has(K)&&($.delete(K),$.size||this.controller_.removeObserver(this))}},q.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},q.prototype.gatherActive=function(){var K=this;this.clearActive(),this.observations_.forEach(function($){$.isActive()&&K.activeObservations_.push($)})},q.prototype.broadcastActive=function(){if(this.hasActive()){var K=this.callbackCtx_,$=this.activeObservations_.map(function(R){return new k(R.target,R.broadcastRect())});this.callback_.call(K,$,K),this.clearActive()}},q.prototype.clearActive=function(){this.activeObservations_.splice(0)},q.prototype.hasActive=function(){return this.activeObservations_.length>0},q}(),F=typeof WeakMap!="undefined"?new WeakMap:new _,z=function(){function q(K){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 $=a.getInstance(),R=new O(K,$,this);F.set(this,R)}return q}();["observe","unobserve","disconnect"].forEach(function(q){z.prototype[q]=function(){var K;return(K=F.get(this))[q].apply(K,arguments)}});var H=function(){return typeof b.ResizeObserver!="undefined"?b.ResizeObserver:z}();D.Z=H},34376:function(Me){(function(D,s){if(1)Me.exports=s();else var _,p})(window,function(){return function(D){var s={};function _(p){if(s[p])return s[p].exports;var b=s[p]={i:p,l:!1,exports:{}};return D[p].call(b.exports,b,b.exports,_),b.l=!0,b.exports}return _.m=D,_.c=s,_.d=function(p,b,d){_.o(p,b)||Object.defineProperty(p,b,{enumerable:!0,get:d})},_.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 d=Object.create(null);if(_.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:p}),2&b&&typeof p!="string")for(var o in p)_.d(d,o,function(u){return p[u]}.bind(null,o));return d},_.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,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.forwardEvent=s.EventEmitter=void 0;var p=function(){function b(){this._listeners=[],this._disposed=!1}return Object.defineProperty(b.prototype,"event",{get:function(){var d=this;return this._event||(this._event=function(o){return d._listeners.push(o),{dispose:function(){if(!d._disposed){for(var u=0;u<d._listeners.length;u++)if(d._listeners[u]===o)return void d._listeners.splice(u,1)}}}}),this._event},enumerable:!1,configurable:!0}),b.prototype.fire=function(d,o){for(var u=[],h=0;h<this._listeners.length;h++)u.push(this._listeners[h]);for(h=0;h<u.length;h++)u[h].call(void 0,d,o)},b.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},b}();s.EventEmitter=p,s.forwardEvent=function(b,d){return b(function(o){return d.fire(o)})}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.IUnicodeService=s.IOptionsService=s.ILogService=s.IInstantiationService=s.IDirtyRowService=s.ICharsetService=s.ICoreService=s.ICoreMouseService=s.IBufferService=void 0;var p=_(14);s.IBufferService=p.createDecorator("BufferService"),s.ICoreMouseService=p.createDecorator("CoreMouseService"),s.ICoreService=p.createDecorator("CoreService"),s.ICharsetService=p.createDecorator("CharsetService"),s.IDirtyRowService=p.createDecorator("DirtyRowService"),s.IInstantiationService=p.createDecorator("InstantiationService"),s.ILogService=p.createDecorator("LogService"),s.IOptionsService=p.createDecorator("OptionsService"),s.IUnicodeService=p.createDecorator("UnicodeService")},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getDisposeArrayDisposable=s.disposeArray=s.Disposable=void 0;var p=function(){function d(){this._disposables=[],this._isDisposed=!1}return d.prototype.dispose=function(){this._isDisposed=!0;for(var o=0,u=this._disposables;o<u.length;o++)u[o].dispose();this._disposables.length=0},d.prototype.register=function(o){return this._disposables.push(o),o},d.prototype.unregister=function(o){var u=this._disposables.indexOf(o);u!==-1&&this._disposables.splice(u,1)},d}();function b(d){for(var o=0,u=d;o<u.length;o++)u[o].dispose();d.length=0}s.Disposable=p,s.disposeArray=b,s.getDisposeArrayDisposable=function(d){return{dispose:function(){return b(d)}}}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WHITESPACE_CELL_CODE=s.WHITESPACE_CELL_WIDTH=s.WHITESPACE_CELL_CHAR=s.NULL_CELL_CODE=s.NULL_CELL_WIDTH=s.NULL_CELL_CHAR=s.CHAR_DATA_CODE_INDEX=s.CHAR_DATA_WIDTH_INDEX=s.CHAR_DATA_CHAR_INDEX=s.CHAR_DATA_ATTR_INDEX=s.DEFAULT_ATTR=s.DEFAULT_COLOR=void 0,s.DEFAULT_COLOR=256,s.DEFAULT_ATTR=256|s.DEFAULT_COLOR<<9,s.CHAR_DATA_ATTR_INDEX=0,s.CHAR_DATA_CHAR_INDEX=1,s.CHAR_DATA_WIDTH_INDEX=2,s.CHAR_DATA_CODE_INDEX=3,s.NULL_CELL_CHAR="",s.NULL_CELL_WIDTH=1,s.NULL_CELL_CODE=0,s.WHITESPACE_CELL_CHAR=" ",s.WHITESPACE_CELL_WIDTH=1,s.WHITESPACE_CELL_CODE=32},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(r,n){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var f in t)t.hasOwnProperty(f)&&(a[f]=t[f])})(r,n)},function(r,n){function a(){this.constructor=r}p(r,n),r.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)});Object.defineProperty(s,"__esModule",{value:!0}),s.CellData=void 0;var d=_(8),o=_(3),u=_(6),h=function(r){function n(){var a=r!==null&&r.apply(this,arguments)||this;return a.content=0,a.fg=0,a.bg=0,a.extended=new u.ExtendedAttrs,a.combinedData="",a}return b(n,r),n.fromCharData=function(a){var t=new n;return t.setFromCharData(a),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?d.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(a){this.fg=a[o.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(a[o.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(a[o.CHAR_DATA_CHAR_INDEX].length===2){var f=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=f&&f<=56319){var e=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(f-55296)+e-56320+65536|a[o.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=a[o.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|a[o.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=a[o.CHAR_DATA_CHAR_INDEX],this.content=2097152|a[o.CHAR_DATA_WIDTH_INDEX]<<22)},n.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},n}(u.AttributeData);s.CellData=h},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ISoundService=s.ISelectionService=s.IRenderService=s.IMouseService=s.ICoreBrowserService=s.ICharSizeService=void 0;var p=_(14);s.ICharSizeService=p.createDecorator("CharSizeService"),s.ICoreBrowserService=p.createDecorator("CoreBrowserService"),s.IMouseService=p.createDecorator("MouseService"),s.IRenderService=p.createDecorator("RenderService"),s.ISelectionService=p.createDecorator("SelectionService"),s.ISoundService=p.createDecorator("SoundService")},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ExtendedAttrs=s.AttributeData=void 0;var p=function(){function d(){this.fg=0,this.bg=0,this.extended=new b}return d.toColorRGB=function(o){return[o>>>16&255,o>>>8&255,255&o]},d.fromColorRGB=function(o){return(255&o[0])<<16|(255&o[1])<<8|255&o[2]},d.prototype.clone=function(){var o=new d;return o.fg=this.fg,o.bg=this.bg,o.extended=this.extended.clone(),o},d.prototype.isInverse=function(){return 67108864&this.fg},d.prototype.isBold=function(){return 134217728&this.fg},d.prototype.isUnderline=function(){return 268435456&this.fg},d.prototype.isBlink=function(){return 536870912&this.fg},d.prototype.isInvisible=function(){return 1073741824&this.fg},d.prototype.isItalic=function(){return 67108864&this.bg},d.prototype.isDim=function(){return 134217728&this.bg},d.prototype.getFgColorMode=function(){return 50331648&this.fg},d.prototype.getBgColorMode=function(){return 50331648&this.bg},d.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},d.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},d.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},d.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},d.prototype.isFgDefault=function(){return(50331648&this.fg)==0},d.prototype.isBgDefault=function(){return(50331648&this.bg)==0},d.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},d.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},d.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},d.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},d.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},d.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()},d.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},d.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},d.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},d.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},d.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},d}();s.AttributeData=p;var b=function(){function d(o,u){o===void 0&&(o=0),u===void 0&&(u=-1),this.underlineStyle=o,this.underlineColor=u}return d.prototype.clone=function(){return new d(this.underlineStyle,this.underlineColor)},d.prototype.isEmpty=function(){return this.underlineStyle===0},d}();s.ExtendedAttrs=b},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(p,b,d,o){p.addEventListener(b,d,o);var u=!1;return{dispose:function(){u||(u=!0,p.removeEventListener(b,d,o))}}}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Utf8ToUtf32=s.StringToUtf32=s.utf32ToString=s.stringFromCodePoint=void 0,s.stringFromCodePoint=function(d){return d>65535?(d-=65536,String.fromCharCode(55296+(d>>10))+String.fromCharCode(d%1024+56320)):String.fromCharCode(d)},s.utf32ToString=function(d,o,u){o===void 0&&(o=0),u===void 0&&(u=d.length);for(var h="",r=o;r<u;++r){var n=d[r];n>65535?(n-=65536,h+=String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):h+=String.fromCharCode(n)}return h};var p=function(){function d(){this._interim=0}return d.prototype.clear=function(){this._interim=0},d.prototype.decode=function(o,u){var h=o.length;if(!h)return 0;var r=0,n=0;this._interim&&(56320<=(f=o.charCodeAt(n++))&&f<=57343?u[r++]=1024*(this._interim-55296)+f-56320+65536:(u[r++]=this._interim,u[r++]=f),this._interim=0);for(var a=n;a<h;++a){var t=o.charCodeAt(a);if(55296<=t&&t<=56319){if(++a>=h)return this._interim=t,r;var f;56320<=(f=o.charCodeAt(a))&&f<=57343?u[r++]=1024*(t-55296)+f-56320+65536:(u[r++]=t,u[r++]=f)}else u[r++]=t}return r},d}();s.StringToUtf32=p;var b=function(){function d(){this.interim=new Uint8Array(3)}return d.prototype.clear=function(){this.interim.fill(0)},d.prototype.decode=function(o,u){var h=o.length;if(!h)return 0;var r,n,a,t,f=0,e=0,i=0;if(this.interim[0]){var l=!1,c=this.interim[0];c&=(224&c)==192?31:(240&c)==224?15:7;for(var v=0,y=void 0;(y=63&this.interim[++v])&&v<4;)c<<=6,c|=y;for(var g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=g-v;i<x;){if(i>=h)return 0;if((192&(y=o[i++]))!=128){i--,l=!0;break}this.interim[v++]=y,c<<=6,c|=63&y}l||(g===2?c<128?i--:u[f++]=c:g===3?c<2048||c>=55296&&c<=57343||(u[f++]=c):c<65536||c>1114111||(u[f++]=c)),this.interim.fill(0)}for(var E=h-4,C=i;C<h;){for(;!(!(C<E)||128&(r=o[C])||128&(n=o[C+1])||128&(a=o[C+2])||128&(t=o[C+3]));)u[f++]=r,u[f++]=n,u[f++]=a,u[f++]=t,C+=4;if((r=o[C++])<128)u[f++]=r;else if((224&r)==192){if(C>=h)return this.interim[0]=r,f;if((192&(n=o[C++]))!=128){C--;continue}if((e=(31&r)<<6|63&n)<128){C--;continue}u[f++]=e}else if((240&r)==224){if(C>=h)return this.interim[0]=r,f;if((192&(n=o[C++]))!=128){C--;continue}if(C>=h)return this.interim[0]=r,this.interim[1]=n,f;if((192&(a=o[C++]))!=128){C--;continue}if((e=(15&r)<<12|(63&n)<<6|63&a)<2048||e>=55296&&e<=57343)continue;u[f++]=e}else if((248&r)==240){if(C>=h)return this.interim[0]=r,f;if((192&(n=o[C++]))!=128){C--;continue}if(C>=h)return this.interim[0]=r,this.interim[1]=n,f;if((192&(a=o[C++]))!=128){C--;continue}if(C>=h)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=a,f;if((192&(t=o[C++]))!=128){C--;continue}if((e=(7&r)<<18|(63&n)<<12|(63&a)<<6|63&t)<65536||e>1114111)continue;u[f++]=e}}return f},d}();s.Utf8ToUtf32=b},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.CHAR_ATLAS_CELL_SPACING=s.DIM_OPACITY=s.INVERTED_DEFAULT_COLOR=void 0,s.INVERTED_DEFAULT_COLOR=257,s.DIM_OPACITY=.5,s.CHAR_ATLAS_CELL_SPACING=1},function(D,s,_){"use strict";var p,b,d,o;function u(r){var n=r.toString(16);return n.length<2?"0"+n:n}function h(r,n){return r<n?(n+.05)/(r+.05):(r+.05)/(n+.05)}Object.defineProperty(s,"__esModule",{value:!0}),s.contrastRatio=s.toPaddedHex=s.rgba=s.rgb=s.css=s.color=s.channels=void 0,function(r){r.toCss=function(n,a,t,f){return f!==void 0?"#"+u(n)+u(a)+u(t)+u(f):"#"+u(n)+u(a)+u(t)},r.toRgba=function(n,a,t,f){return f===void 0&&(f=255),(n<<24|a<<16|t<<8|f)>>>0}}(p=s.channels||(s.channels={})),(b=s.color||(s.color={})).blend=function(r,n){var a=(255&n.rgba)/255;if(a===1)return{css:n.css,rgba:n.rgba};var t=n.rgba>>24&255,f=n.rgba>>16&255,e=n.rgba>>8&255,i=r.rgba>>24&255,l=r.rgba>>16&255,c=r.rgba>>8&255,v=i+Math.round((t-i)*a),y=l+Math.round((f-l)*a),g=c+Math.round((e-c)*a);return{css:p.toCss(v,y,g),rgba:p.toRgba(v,y,g)}},b.isOpaque=function(r){return(255&r.rgba)==255},b.ensureContrastRatio=function(r,n,a){var t=o.ensureContrastRatio(r.rgba,n.rgba,a);if(t)return o.toColor(t>>24&255,t>>16&255,t>>8&255)},b.opaque=function(r){var n=(255|r.rgba)>>>0,a=o.toChannels(n),t=a[0],f=a[1],e=a[2];return{css:p.toCss(t,f,e),rgba:n}},b.opacity=function(r,n){var a=Math.round(255*n),t=o.toChannels(r.rgba),f=t[0],e=t[1],i=t[2];return{css:p.toCss(f,e,i,a),rgba:p.toRgba(f,e,i,a)}},(s.css||(s.css={})).toColor=function(r){switch(r.length){case 7:return{css:r,rgba:(parseInt(r.slice(1),16)<<8|255)>>>0};case 9:return{css:r,rgba:parseInt(r.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(r){function n(a,t,f){var e=a/255,i=t/255,l=f/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.0722*(l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4))}r.relativeLuminance=function(a){return n(a>>16&255,a>>8&255,255&a)},r.relativeLuminance2=n}(d=s.rgb||(s.rgb={})),function(r){function n(t,f,e){for(var i=t>>24&255,l=t>>16&255,c=t>>8&255,v=f>>24&255,y=f>>16&255,g=f>>8&255,x=h(d.relativeLuminance2(v,g,y),d.relativeLuminance2(i,l,c));x<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)),x=h(d.relativeLuminance2(v,g,y),d.relativeLuminance2(i,l,c));return(v<<24|y<<16|g<<8|255)>>>0}function a(t,f,e){for(var i=t>>24&255,l=t>>16&255,c=t>>8&255,v=f>>24&255,y=f>>16&255,g=f>>8&255,x=h(d.relativeLuminance2(v,g,y),d.relativeLuminance2(i,l,c));x<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))),x=h(d.relativeLuminance2(v,g,y),d.relativeLuminance2(i,l,c));return(v<<24|y<<16|g<<8|255)>>>0}r.ensureContrastRatio=function(t,f,e){var i=d.relativeLuminance(t>>8),l=d.relativeLuminance(f>>8);if(h(i,l)<e)return l<i?n(t,f,e):a(t,f,e)},r.reduceLuminance=n,r.increaseLuminance=a,r.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},r.toColor=function(t,f,e){return{css:p.toCss(t,f,e),rgba:p.toRgba(t,f,e)}}}(o=s.rgba||(s.rgba={})),s.toPaddedHex=u,s.contrastRatio=h},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.isLinux=s.isWindows=s.isIphone=s.isIpad=s.isMac=s.isSafari=s.isFirefox=void 0;var p=typeof navigator=="undefined",b=p?"node":navigator.userAgent,d=p?"node":navigator.platform;function o(u,h){return u.indexOf(h)>=0}s.isFirefox=!!~b.indexOf("Firefox"),s.isSafari=/^((?!chrome|android).)*safari/i.test(b),s.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],d),s.isIpad=d==="iPad",s.isIphone=d==="iPhone",s.isWindows=o(["Windows","Win16","Win32","WinCE"],d),s.isLinux=d.indexOf("Linux")>=0},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.C1=s.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"}(s.C0||(s.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"}(s.C1||(s.C1={}))},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BaseRenderLayer=void 0;var p=_(3),b=_(9),d=_(25),o=_(6),u=_(28),h=_(10),r=_(17),n=function(){function a(t,f,e,i,l,c,v,y){this._container=t,this._alpha=i,this._colors=l,this._rendererId=c,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-"+f+"-layer"),this._canvas.style.zIndex=e.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return a.prototype.dispose=function(){var t;r.removeElementFromParent(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},a.prototype._initCanvas=function(){this._ctx=u.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},a.prototype.onOptionsChanged=function(){},a.prototype.onBlur=function(){},a.prototype.onFocus=function(){},a.prototype.onCursorMove=function(){},a.prototype.onGridChanged=function(t,f){},a.prototype.onSelectionChanged=function(t,f,e){e===void 0&&(e=!1)},a.prototype.setColors=function(t){this._refreshCharAtlas(t)},a.prototype._setTransparency=function(t){if(t!==this._alpha){var f=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,f),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},a.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=d.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},a.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)},a.prototype._fillCells=function(t,f,e,i){this._ctx.fillRect(t*this._scaledCellWidth,f*this._scaledCellHeight,e*this._scaledCellWidth,i*this._scaledCellHeight)},a.prototype._fillBottomLineAtCells=function(t,f,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(f+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},a.prototype._fillLeftLineAtCell=function(t,f,e){this._ctx.fillRect(t*this._scaledCellWidth,f*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},a.prototype._strokeRectAtCell=function(t,f,e,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,f*this._scaledCellHeight+window.devicePixelRatio/2,e*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},a.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},a.prototype._clearCells=function(t,f,e,i){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,f*this._scaledCellHeight,e*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,f*this._scaledCellHeight,e*this._scaledCellWidth,i*this._scaledCellHeight))},a.prototype._fillCharTrueColor=function(t,f,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),f*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},a.prototype._drawChars=function(t,f,e){var i,l,c=this._getContrastColor(t);c||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,f,e,c):(t.isInverse()?(i=t.isBgDefault()?b.INVERTED_DEFAULT_COLOR:t.getBgColor(),l=t.isFgDefault()?b.INVERTED_DEFAULT_COLOR:t.getFgColor()):(l=t.isBgDefault()?p.DEFAULT_COLOR:t.getBgColor(),i=t.isFgDefault()?p.DEFAULT_COLOR:t.getFgColor()),i+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&i<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||p.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||p.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=l,this._currentGlyphIdentifier.fg=i,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,f*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,f,e))},a.prototype._drawUncachedChars=function(t,f,e,i){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(i)this._ctx.fillStyle=i.css;else if(t.isBgDefault())this._ctx.fillStyle=h.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var l=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(i)this._ctx.fillStyle=i.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var c=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}this._clipRow(e),t.isDim()&&(this._ctx.globalAlpha=b.DIM_OPACITY),this._ctx.fillText(t.getChars(),f*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},a.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},a.prototype._getFont=function(t,f){return(f?"italic":"")+" "+(t?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},a.prototype._getContrastColor=function(t){if(this._optionsService.options.minimumContrastRatio!==1){var f=this._colors.contrastCache.getColor(t.bg,t.fg);if(f!==void 0)return f||void 0;var e=t.getFgColor(),i=t.getFgColorMode(),l=t.getBgColor(),c=t.getBgColorMode(),v=!!t.isInverse(),y=!!t.isInverse();if(v){var g=e;e=l,l=g;var x=i;i=c,c=x}var E=this._resolveBackgroundRgba(c,l,v),C=this._resolveForegroundRgba(i,e,v,y),m=h.rgba.ensureContrastRatio(E,C,this._optionsService.options.minimumContrastRatio);if(m){var S={css:h.channels.toCss(m>>24&255,m>>16&255,m>>8&255),rgba:m};return this._colors.contrastCache.setColor(t.bg,t.fg,S),S}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},a.prototype._resolveBackgroundRgba=function(t,f,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[f].rgba;case 50331648:return f<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},a.prototype._resolveForegroundRgba=function(t,f,e,i){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&i&&f<8&&(f+=8),this._colors.ansi[f].rgba;case 50331648:return f<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},a}();s.BaseRenderLayer=n},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.createDecorator=s.getServiceDependencies=s.serviceRegistry=void 0;function p(b,d,o){d.di$target===d?d.di$dependencies.push({id:b,index:o}):(d.di$dependencies=[{id:b,index:o}],d.di$target=d)}s.serviceRegistry=new Map,s.getServiceDependencies=function(b){return b.di$dependencies||[]},s.createDecorator=function(b){if(s.serviceRegistry.has(b))return s.serviceRegistry.get(b);var d=function(o,u,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");p(d,o,h)};return d.toString=function(){return b},s.serviceRegistry.set(b,d),d}},function(D,s,_){"use strict";function p(b,d,o,u){if(o===void 0&&(o=0),u===void 0&&(u=b.length),o>=b.length)return b;o=(b.length+o)%b.length,u=u>=b.length?b.length:(b.length+u)%b.length;for(var h=o;h<u;++h)b[h]=d;return b}Object.defineProperty(s,"__esModule",{value:!0}),s.concat=s.fillFallback=s.fill=void 0,s.fill=function(b,d,o,u){return b.fill?b.fill(d,o,u):p(b,d,o,u)},s.fillFallback=p,s.concat=function(b,d){var o=new b.constructor(b.length+d.length);return o.set(b),o.set(d,b.length),o}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BufferLine=s.DEFAULT_ATTR_DATA=void 0;var p=_(8),b=_(3),d=_(4),o=_(6);s.DEFAULT_ATTR_DATA=Object.freeze(new o.AttributeData);var u=function(){function h(r,n,a){a===void 0&&(a=!1),this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);for(var t=n||d.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),f=0;f<r;++f)this.setCell(f,t);this.length=r}return h.prototype.get=function(r){var n=this._data[3*r+0],a=2097151&n;return[this._data[3*r+1],2097152&n?this._combined[r]:a?p.stringFromCodePoint(a):"",n>>22,2097152&n?this._combined[r].charCodeAt(this._combined[r].length-1):a]},h.prototype.set=function(r,n){this._data[3*r+1]=n[b.CHAR_DATA_ATTR_INDEX],n[b.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=n[1],this._data[3*r+0]=2097152|r|n[b.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=n[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|n[b.CHAR_DATA_WIDTH_INDEX]<<22},h.prototype.getWidth=function(r){return this._data[3*r+0]>>22},h.prototype.hasWidth=function(r){return 12582912&this._data[3*r+0]},h.prototype.getFg=function(r){return this._data[3*r+1]},h.prototype.getBg=function(r){return this._data[3*r+2]},h.prototype.hasContent=function(r){return 4194303&this._data[3*r+0]},h.prototype.getCodePoint=function(r){var n=this._data[3*r+0];return 2097152&n?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&n},h.prototype.isCombined=function(r){return 2097152&this._data[3*r+0]},h.prototype.getString=function(r){var n=this._data[3*r+0];return 2097152&n?this._combined[r]:2097151&n?p.stringFromCodePoint(2097151&n):""},h.prototype.loadCell=function(r,n){var a=3*r;return n.content=this._data[a+0],n.fg=this._data[a+1],n.bg=this._data[a+2],2097152&n.content&&(n.combinedData=this._combined[r]),268435456&n.bg&&(n.extended=this._extendedAttrs[r]),n},h.prototype.setCell=function(r,n){2097152&n.content&&(this._combined[r]=n.combinedData),268435456&n.bg&&(this._extendedAttrs[r]=n.extended),this._data[3*r+0]=n.content,this._data[3*r+1]=n.fg,this._data[3*r+2]=n.bg},h.prototype.setCellFromCodePoint=function(r,n,a,t,f,e){268435456&f&&(this._extendedAttrs[r]=e),this._data[3*r+0]=n|a<<22,this._data[3*r+1]=t,this._data[3*r+2]=f},h.prototype.addCodepointToCell=function(r,n){var a=this._data[3*r+0];2097152&a?this._combined[r]+=p.stringFromCodePoint(n):(2097151&a?(this._combined[r]=p.stringFromCodePoint(2097151&a)+p.stringFromCodePoint(n),a&=-2097152,a|=2097152):a=n|1<<22,this._data[3*r+0]=a)},h.prototype.insertCells=function(r,n,a,t){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.ExtendedAttrs),n<this.length-r){for(var f=new d.CellData,e=this.length-r-n-1;e>=0;--e)this.setCell(r+n+e,this.loadCell(r+e,f));for(e=0;e<n;++e)this.setCell(r+e,a)}else for(e=r;e<this.length;++e)this.setCell(e,a);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 o.ExtendedAttrs)},h.prototype.deleteCells=function(r,n,a,t){if(r%=this.length,n<this.length-r){for(var f=new d.CellData,e=0;e<this.length-r-n;++e)this.setCell(r+e,this.loadCell(r+n+e,f));for(e=this.length-n;e<this.length;++e)this.setCell(e,a)}else for(e=r;e<this.length;++e)this.setCell(e,a);r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.ExtendedAttrs),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodePoint(r,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.ExtendedAttrs)},h.prototype.replaceCells=function(r,n,a,t){for(r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new o.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 o.ExtendedAttrs);r<n&&r<this.length;)this.setCell(r++,a)},h.prototype.resize=function(r,n){if(r!==this.length){if(r>this.length){var a=new Uint32Array(3*r);this.length&&(3*r<this._data.length?a.set(this._data.subarray(0,3*r)):a.set(this._data)),this._data=a;for(var t=this.length;t<r;++t)this.setCell(t,n)}else if(r){(a=new Uint32Array(3*r)).set(this._data.subarray(0,3*r)),this._data=a;var f=Object.keys(this._combined);for(t=0;t<f.length;t++){var e=parseInt(f[t],10);e>=r&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=r}},h.prototype.fill=function(r){this._combined={},this._extendedAttrs={};for(var n=0;n<this.length;++n)this.setCell(n,r)},h.prototype.copyFrom=function(r){for(var n in this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={},r._combined)this._combined[n]=r._combined[n];for(var n in this._extendedAttrs={},r._extendedAttrs)this._extendedAttrs[n]=r._extendedAttrs[n];this.isWrapped=r.isWrapped},h.prototype.clone=function(){var r=new h(0);for(var n in r._data=new Uint32Array(this._data),r.length=this.length,this._combined)r._combined[n]=this._combined[n];for(var n in this._extendedAttrs)r._extendedAttrs[n]=this._extendedAttrs[n];return r.isWrapped=this.isWrapped,r},h.prototype.getTrimmedLength=function(){for(var r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0},h.prototype.copyCellsFrom=function(r,n,a,t,f){var e=r._data;if(f)for(var i=t-1;i>=0;i--)for(var l=0;l<3;l++)this._data[3*(a+i)+l]=e[3*(n+i)+l];else for(i=0;i<t;i++)for(l=0;l<3;l++)this._data[3*(a+i)+l]=e[3*(n+i)+l];var c=Object.keys(r._combined);for(l=0;l<c.length;l++){var v=parseInt(c[l],10);v>=n&&(this._combined[v-n+a]=r._combined[v])}},h.prototype.translateToString=function(r,n,a){r===void 0&&(r=!1),n===void 0&&(n=0),a===void 0&&(a=this.length),r&&(a=Math.min(a,this.getTrimmedLength()));for(var t="";n<a;){var f=this._data[3*n+0],e=2097151&f;t+=2097152&f?this._combined[n]:e?p.stringFromCodePoint(e):b.WHITESPACE_CELL_CHAR,n+=f>>22||1}return t},h}();s.BufferLine=u},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.removeElementFromParent=void 0,s.removeElementFromParent=function(){for(var p,b=[],d=0;d<arguments.length;d++)b[d]=arguments[d];for(var o=0,u=b;o<u.length;o++){var h=u[o];(p=h==null?void 0:h.parentElement)===null||p===void 0||p.removeChild(h)}}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(C,m){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,k){S.__proto__=k}||function(S,k){for(var O in k)k.hasOwnProperty(O)&&(S[O]=k[O])})(C,m)},function(C,m){function S(){this.constructor=C}p(C,m),C.prototype=m===null?Object.create(m):(S.prototype=m.prototype,new S)});Object.defineProperty(s,"__esModule",{value:!0}),s.InputHandler=s.WindowsOptionsReportType=void 0;var d,o=_(12),u=_(20),h=_(39),r=_(2),n=_(15),a=_(8),t=_(16),f=_(0),e=_(3),i=_(4),l=_(6),c=_(22),v=_(24),y={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function g(C,m){if(C>24)return m.setWinLines||!1;switch(C){case 1:return!!m.restoreWin;case 2:return!!m.minimizeWin;case 3:return!!m.setWinPosition;case 4:return!!m.setWinSizePixels;case 5:return!!m.raiseWin;case 6:return!!m.lowerWin;case 7:return!!m.refreshWin;case 8:return!!m.setWinSizeChars;case 9:return!!m.maximizeWin;case 10:return!!m.fullscreenWin;case 11:return!!m.getWinState;case 13:return!!m.getWinPosition;case 14:return!!m.getWinSizePixels;case 15:return!!m.getScreenSizePixels;case 16:return!!m.getCellSizePixels;case 18:return!!m.getWinSizeChars;case 19:return!!m.getScreenSizeChars;case 20:return!!m.getIconTitle;case 21:return!!m.getWinTitle;case 22:return!!m.pushTitle;case 23:return!!m.popTitle;case 24:return!!m.setWinLines}return!1}(function(C){C[C.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",C[C.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(d=s.WindowsOptionsReportType||(s.WindowsOptionsReportType={}));var x=function(){function C(m,S,k,O){this._bufferService=m,this._coreService=S,this._logService=k,this._optionsService=O,this._data=new Uint32Array(0)}return C.prototype.hook=function(m){this._data=new Uint32Array(0)},C.prototype.put=function(m,S,k){this._data=n.concat(this._data,m.subarray(S,k))},C.prototype.unhook=function(m){if(m){var S=a.utf32ToString(this._data);switch(this._data=new Uint32Array(0),S){case'"q':return this._coreService.triggerDataEvent(o.C0.ESC+'P1$r0"q'+o.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(o.C0.ESC+'P1$r61;1"p'+o.C0.ESC+"\\");case"r":var k=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r"+k+o.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(o.C0.ESC+"P1$r0m"+o.C0.ESC+"\\");case" q":var O={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return O-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(o.C0.ESC+"P1$r"+O+" q"+o.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",S),this._coreService.triggerDataEvent(o.C0.ESC+"P0$r"+o.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},C}(),E=function(C){function m(S,k,O,F,z,H,q,K,$){$===void 0&&($=new h.EscapeSequenceParser);var R=C.call(this)||this;R._bufferService=S,R._charsetService=k,R._coreService=O,R._dirtyRowService=F,R._logService=z,R._optionsService=H,R._coreMouseService=q,R._unicodeService=K,R._parser=$,R._parseBuffer=new Uint32Array(4096),R._stringDecoder=new a.StringToUtf32,R._utf8Decoder=new a.Utf8ToUtf32,R._workCell=new i.CellData,R._windowTitle="",R._iconName="",R._windowTitleStack=[],R._iconNameStack=[],R._curAttrData=t.DEFAULT_ATTR_DATA.clone(),R._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),R._onRequestBell=new f.EventEmitter,R._onRequestRefreshRows=new f.EventEmitter,R._onRequestReset=new f.EventEmitter,R._onRequestScroll=new f.EventEmitter,R._onRequestSyncScrollBar=new f.EventEmitter,R._onRequestWindowsOptionsReport=new f.EventEmitter,R._onA11yChar=new f.EventEmitter,R._onA11yTab=new f.EventEmitter,R._onCursorMove=new f.EventEmitter,R._onLineFeed=new f.EventEmitter,R._onScroll=new f.EventEmitter,R._onTitleChange=new f.EventEmitter,R.register(R._parser),R._parser.setCsiHandlerFallback(function(B,G){R._logService.debug("Unknown CSI code: ",{identifier:R._parser.identToString(B),params:G.toArray()})}),R._parser.setEscHandlerFallback(function(B){R._logService.debug("Unknown ESC code: ",{identifier:R._parser.identToString(B)})}),R._parser.setExecuteHandlerFallback(function(B){R._logService.debug("Unknown EXECUTE code: ",{code:B})}),R._parser.setOscHandlerFallback(function(B,G,fe){R._logService.debug("Unknown OSC code: ",{identifier:B,action:G,data:fe})}),R._parser.setDcsHandlerFallback(function(B,G,fe){G==="HOOK"&&(fe=fe.toArray()),R._logService.debug("Unknown DCS code: ",{identifier:R._parser.identToString(B),action:G,payload:fe})}),R._parser.setPrintHandler(function(B,G,fe){return R.print(B,G,fe)}),R._parser.setCsiHandler({final:"@"},function(B){return R.insertChars(B)}),R._parser.setCsiHandler({intermediates:" ",final:"@"},function(B){return R.scrollLeft(B)}),R._parser.setCsiHandler({final:"A"},function(B){return R.cursorUp(B)}),R._parser.setCsiHandler({intermediates:" ",final:"A"},function(B){return R.scrollRight(B)}),R._parser.setCsiHandler({final:"B"},function(B){return R.cursorDown(B)}),R._parser.setCsiHandler({final:"C"},function(B){return R.cursorForward(B)}),R._parser.setCsiHandler({final:"D"},function(B){return R.cursorBackward(B)}),R._parser.setCsiHandler({final:"E"},function(B){return R.cursorNextLine(B)}),R._parser.setCsiHandler({final:"F"},function(B){return R.cursorPrecedingLine(B)}),R._parser.setCsiHandler({final:"G"},function(B){return R.cursorCharAbsolute(B)}),R._parser.setCsiHandler({final:"H"},function(B){return R.cursorPosition(B)}),R._parser.setCsiHandler({final:"I"},function(B){return R.cursorForwardTab(B)}),R._parser.setCsiHandler({final:"J"},function(B){return R.eraseInDisplay(B)}),R._parser.setCsiHandler({prefix:"?",final:"J"},function(B){return R.eraseInDisplay(B)}),R._parser.setCsiHandler({final:"K"},function(B){return R.eraseInLine(B)}),R._parser.setCsiHandler({prefix:"?",final:"K"},function(B){return R.eraseInLine(B)}),R._parser.setCsiHandler({final:"L"},function(B){return R.insertLines(B)}),R._parser.setCsiHandler({final:"M"},function(B){return R.deleteLines(B)}),R._parser.setCsiHandler({final:"P"},function(B){return R.deleteChars(B)}),R._parser.setCsiHandler({final:"S"},function(B){return R.scrollUp(B)}),R._parser.setCsiHandler({final:"T"},function(B){return R.scrollDown(B)}),R._parser.setCsiHandler({final:"X"},function(B){return R.eraseChars(B)}),R._parser.setCsiHandler({final:"Z"},function(B){return R.cursorBackwardTab(B)}),R._parser.setCsiHandler({final:"`"},function(B){return R.charPosAbsolute(B)}),R._parser.setCsiHandler({final:"a"},function(B){return R.hPositionRelative(B)}),R._parser.setCsiHandler({final:"b"},function(B){return R.repeatPrecedingCharacter(B)}),R._parser.setCsiHandler({final:"c"},function(B){return R.sendDeviceAttributesPrimary(B)}),R._parser.setCsiHandler({prefix:">",final:"c"},function(B){return R.sendDeviceAttributesSecondary(B)}),R._parser.setCsiHandler({final:"d"},function(B){return R.linePosAbsolute(B)}),R._parser.setCsiHandler({final:"e"},function(B){return R.vPositionRelative(B)}),R._parser.setCsiHandler({final:"f"},function(B){return R.hVPosition(B)}),R._parser.setCsiHandler({final:"g"},function(B){return R.tabClear(B)}),R._parser.setCsiHandler({final:"h"},function(B){return R.setMode(B)}),R._parser.setCsiHandler({prefix:"?",final:"h"},function(B){return R.setModePrivate(B)}),R._parser.setCsiHandler({final:"l"},function(B){return R.resetMode(B)}),R._parser.setCsiHandler({prefix:"?",final:"l"},function(B){return R.resetModePrivate(B)}),R._parser.setCsiHandler({final:"m"},function(B){return R.charAttributes(B)}),R._parser.setCsiHandler({final:"n"},function(B){return R.deviceStatus(B)}),R._parser.setCsiHandler({prefix:"?",final:"n"},function(B){return R.deviceStatusPrivate(B)}),R._parser.setCsiHandler({intermediates:"!",final:"p"},function(B){return R.softReset(B)}),R._parser.setCsiHandler({intermediates:" ",final:"q"},function(B){return R.setCursorStyle(B)}),R._parser.setCsiHandler({final:"r"},function(B){return R.setScrollRegion(B)}),R._parser.setCsiHandler({final:"s"},function(B){return R.saveCursor(B)}),R._parser.setCsiHandler({final:"t"},function(B){return R.windowOptions(B)}),R._parser.setCsiHandler({final:"u"},function(B){return R.restoreCursor(B)}),R._parser.setCsiHandler({intermediates:"'",final:"}"},function(B){return R.insertColumns(B)}),R._parser.setCsiHandler({intermediates:"'",final:"~"},function(B){return R.deleteColumns(B)}),R._parser.setExecuteHandler(o.C0.BEL,function(){return R.bell()}),R._parser.setExecuteHandler(o.C0.LF,function(){return R.lineFeed()}),R._parser.setExecuteHandler(o.C0.VT,function(){return R.lineFeed()}),R._parser.setExecuteHandler(o.C0.FF,function(){return R.lineFeed()}),R._parser.setExecuteHandler(o.C0.CR,function(){return R.carriageReturn()}),R._parser.setExecuteHandler(o.C0.BS,function(){return R.backspace()}),R._parser.setExecuteHandler(o.C0.HT,function(){return R.tab()}),R._parser.setExecuteHandler(o.C0.SO,function(){return R.shiftOut()}),R._parser.setExecuteHandler(o.C0.SI,function(){return R.shiftIn()}),R._parser.setExecuteHandler(o.C1.IND,function(){return R.index()}),R._parser.setExecuteHandler(o.C1.NEL,function(){return R.nextLine()}),R._parser.setExecuteHandler(o.C1.HTS,function(){return R.tabSet()}),R._parser.setOscHandler(0,new c.OscHandler(function(B){R.setTitle(B),R.setIconName(B)})),R._parser.setOscHandler(1,new c.OscHandler(function(B){return R.setIconName(B)})),R._parser.setOscHandler(2,new c.OscHandler(function(B){return R.setTitle(B)})),R._parser.setEscHandler({final:"7"},function(){return R.saveCursor()}),R._parser.setEscHandler({final:"8"},function(){return R.restoreCursor()}),R._parser.setEscHandler({final:"D"},function(){return R.index()}),R._parser.setEscHandler({final:"E"},function(){return R.nextLine()}),R._parser.setEscHandler({final:"H"},function(){return R.tabSet()}),R._parser.setEscHandler({final:"M"},function(){return R.reverseIndex()}),R._parser.setEscHandler({final:"="},function(){return R.keypadApplicationMode()}),R._parser.setEscHandler({final:">"},function(){return R.keypadNumericMode()}),R._parser.setEscHandler({final:"c"},function(){return R.fullReset()}),R._parser.setEscHandler({final:"n"},function(){return R.setgLevel(2)}),R._parser.setEscHandler({final:"o"},function(){return R.setgLevel(3)}),R._parser.setEscHandler({final:"|"},function(){return R.setgLevel(3)}),R._parser.setEscHandler({final:"}"},function(){return R.setgLevel(2)}),R._parser.setEscHandler({final:"~"},function(){return R.setgLevel(1)}),R._parser.setEscHandler({intermediates:"%",final:"@"},function(){return R.selectDefaultCharset()}),R._parser.setEscHandler({intermediates:"%",final:"G"},function(){return R.selectDefaultCharset()});var X=function(B){I._parser.setEscHandler({intermediates:"(",final:B},function(){return R.selectCharset("("+B)}),I._parser.setEscHandler({intermediates:")",final:B},function(){return R.selectCharset(")"+B)}),I._parser.setEscHandler({intermediates:"*",final:B},function(){return R.selectCharset("*"+B)}),I._parser.setEscHandler({intermediates:"+",final:B},function(){return R.selectCharset("+"+B)}),I._parser.setEscHandler({intermediates:"-",final:B},function(){return R.selectCharset("-"+B)}),I._parser.setEscHandler({intermediates:".",final:B},function(){return R.selectCharset("."+B)}),I._parser.setEscHandler({intermediates:"/",final:B},function(){return R.selectCharset("/"+B)})},I=this;for(var W in u.CHARSETS)X(W);return R._parser.setEscHandler({intermediates:"#",final:"8"},function(){return R.screenAlignmentPattern()}),R._parser.setErrorHandler(function(B){return R._logService.error("Parsing error: ",B),B}),R._parser.setDcsHandler({intermediates:"$",final:"q"},new x(R._bufferService,R._coreService,R._logService,R._optionsService)),R}return b(m,C),Object.defineProperty(m.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),m.prototype.dispose=function(){C.prototype.dispose.call(this)},m.prototype.parse=function(S){var k=this._bufferService.buffer,O=k.x,F=k.y;if(this._logService.debug("parsing data",S),this._parseBuffer.length<S.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(S.length,131072))),this._dirtyRowService.clearRange(),S.length>131072)for(var z=0;z<S.length;z+=131072){var H=z+131072<S.length?z+131072:S.length,q=typeof S=="string"?this._stringDecoder.decode(S.substring(z,H),this._parseBuffer):this._utf8Decoder.decode(S.subarray(z,H),this._parseBuffer);this._parser.parse(this._parseBuffer,q)}else q=typeof S=="string"?this._stringDecoder.decode(S,this._parseBuffer):this._utf8Decoder.decode(S,this._parseBuffer),this._parser.parse(this._parseBuffer,q);(k=this._bufferService.buffer).x===O&&k.y===F||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},m.prototype.print=function(S,k,O){var F,z,H=this._bufferService.buffer,q=this._charsetService.charset,K=this._optionsService.options.screenReaderMode,$=this._bufferService.cols,R=this._coreService.decPrivateModes.wraparound,X=this._coreService.modes.insertMode,I=this._curAttrData,W=H.lines.get(H.ybase+H.y);this._dirtyRowService.markDirty(H.y),H.x&&O-k>0&&W.getWidth(H.x-1)===2&&W.setCellFromCodePoint(H.x-1,0,1,I.fg,I.bg,I.extended);for(var B=k;B<O;++B){if(F=S[B],z=this._unicodeService.wcwidth(F),F<127&&q){var G=q[String.fromCharCode(F)];G&&(F=G.charCodeAt(0))}if(K&&this._onA11yChar.fire(a.stringFromCodePoint(F)),z||!H.x){if(H.x+z-1>=$){if(R){for(;H.x<$;)W.setCellFromCodePoint(H.x++,0,1,I.fg,I.bg,I.extended);H.x=0,H.y++,H.y===H.scrollBottom+1?(H.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(H.y>=this._bufferService.rows&&(H.y=this._bufferService.rows-1),H.lines.get(H.ybase+H.y).isWrapped=!0),W=H.lines.get(H.ybase+H.y)}else if(H.x=$-1,z===2)continue}if(X&&(W.insertCells(H.x,z,H.getNullCell(I),I),W.getWidth($-1)===2&&W.setCellFromCodePoint($-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,I.fg,I.bg,I.extended)),W.setCellFromCodePoint(H.x++,F,z,I.fg,I.bg,I.extended),z>0)for(;--z;)W.setCellFromCodePoint(H.x++,0,0,I.fg,I.bg,I.extended)}else W.getWidth(H.x-1)?W.addCodepointToCell(H.x-1,F):W.addCodepointToCell(H.x-2,F)}O-k>0&&(W.loadCell(H.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),H.x<$&&O-k>0&&W.getWidth(H.x)===0&&!W.hasContent(H.x)&&W.setCellFromCodePoint(H.x,0,1,I.fg,I.bg,I.extended),this._dirtyRowService.markDirty(H.y)},m.prototype.addCsiHandler=function(S,k){var O=this;return S.final!=="t"||S.prefix||S.intermediates?this._parser.addCsiHandler(S,k):this._parser.addCsiHandler(S,function(F){return!g(F.params[0],O._optionsService.options.windowOptions)||k(F)})},m.prototype.addDcsHandler=function(S,k){return this._parser.addDcsHandler(S,new v.DcsHandler(k))},m.prototype.addEscHandler=function(S,k){return this._parser.addEscHandler(S,k)},m.prototype.addOscHandler=function(S,k){return this._parser.addOscHandler(S,new c.OscHandler(k))},m.prototype.bell=function(){this._onRequestBell.fire()},m.prototype.lineFeed=function(){var S=this._bufferService.buffer;this._dirtyRowService.markDirty(S.y),this._optionsService.options.convertEol&&(S.x=0),S.y++,S.y===S.scrollBottom+1?(S.y--,this._onRequestScroll.fire(this._eraseAttrData())):S.y>=this._bufferService.rows&&(S.y=this._bufferService.rows-1),S.x>=this._bufferService.cols&&S.x--,this._dirtyRowService.markDirty(S.y),this._onLineFeed.fire()},m.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},m.prototype.backspace=function(){var S,k=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(k.x>0&&k.x--);if(this._restrictCursor(this._bufferService.cols),k.x>0)k.x--;else if(k.x===0&&k.y>k.scrollTop&&k.y<=k.scrollBottom&&(!((S=k.lines.get(k.ybase+k.y))===null||S===void 0)&&S.isWrapped)){k.lines.get(k.ybase+k.y).isWrapped=!1,k.y--,k.x=this._bufferService.cols-1;var O=k.lines.get(k.ybase+k.y);O.hasWidth(k.x)&&!O.hasContent(k.x)&&k.x--}this._restrictCursor()},m.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var S=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-S)}},m.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},m.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},m.prototype._restrictCursor=function(S){S===void 0&&(S=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(S,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},m.prototype._setCursor=function(S,k){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=S,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+k):(this._bufferService.buffer.x=S,this._bufferService.buffer.y=k),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},m.prototype._moveCursor=function(S,k){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+S,this._bufferService.buffer.y+k)},m.prototype.cursorUp=function(S){var k=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;k>=0?this._moveCursor(0,-Math.min(k,S.params[0]||1)):this._moveCursor(0,-(S.params[0]||1))},m.prototype.cursorDown=function(S){var k=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;k>=0?this._moveCursor(0,Math.min(k,S.params[0]||1)):this._moveCursor(0,S.params[0]||1)},m.prototype.cursorForward=function(S){this._moveCursor(S.params[0]||1,0)},m.prototype.cursorBackward=function(S){this._moveCursor(-(S.params[0]||1),0)},m.prototype.cursorNextLine=function(S){this.cursorDown(S),this._bufferService.buffer.x=0},m.prototype.cursorPrecedingLine=function(S){this.cursorUp(S),this._bufferService.buffer.x=0},m.prototype.cursorCharAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},m.prototype.cursorPosition=function(S){this._setCursor(S.length>=2?(S.params[1]||1)-1:0,(S.params[0]||1)-1)},m.prototype.charPosAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},m.prototype.hPositionRelative=function(S){this._moveCursor(S.params[0]||1,0)},m.prototype.linePosAbsolute=function(S){this._setCursor(this._bufferService.buffer.x,(S.params[0]||1)-1)},m.prototype.vPositionRelative=function(S){this._moveCursor(0,S.params[0]||1)},m.prototype.hVPosition=function(S){this.cursorPosition(S)},m.prototype.tabClear=function(S){var k=S.params[0];k===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:k===3&&(this._bufferService.buffer.tabs={})},m.prototype.cursorForwardTab=function(S){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var k=S.params[0]||1;k--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},m.prototype.cursorBackwardTab=function(S){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)O.x=O.prevStop()},m.prototype._eraseInBufferLine=function(S,k,O,F){F===void 0&&(F=!1);var z=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+S);z.replaceCells(k,O,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),F&&(z.isWrapped=!1)},m.prototype._resetBufferLine=function(S){var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+S);k.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),k.isWrapped=!1},m.prototype.eraseInDisplay=function(S){var k;switch(this._restrictCursor(),S.params[0]){case 0:for(k=this._bufferService.buffer.y,this._dirtyRowService.markDirty(k),this._eraseInBufferLine(k++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);k<this._bufferService.rows;k++)this._resetBufferLine(k);this._dirtyRowService.markDirty(k);break;case 1:for(k=this._bufferService.buffer.y,this._dirtyRowService.markDirty(k),this._eraseInBufferLine(k,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(k+1).isWrapped=!1);k--;)this._resetBufferLine(k);this._dirtyRowService.markDirty(0);break;case 2:for(k=this._bufferService.rows,this._dirtyRowService.markDirty(k-1);k--;)this._resetBufferLine(k);this._dirtyRowService.markDirty(0);break;case 3:var O=this._bufferService.buffer.lines.length-this._bufferService.rows;O>0&&(this._bufferService.buffer.lines.trimStart(O),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-O,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-O,0),this._onScroll.fire(0))}},m.prototype.eraseInLine=function(S){switch(this._restrictCursor(),S.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},m.prototype.insertLines=function(S){this._restrictCursor();var k=S.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){for(var F=O.ybase+O.y,z=this._bufferService.rows-1-O.scrollBottom,H=this._bufferService.rows-1+O.ybase-z+1;k--;)O.lines.splice(H-1,1),O.lines.splice(F,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},m.prototype.deleteLines=function(S){this._restrictCursor();var k=S.params[0]||1,O=this._bufferService.buffer;if(!(O.y>O.scrollBottom||O.y<O.scrollTop)){var F,z=O.ybase+O.y;for(F=this._bufferService.rows-1-O.scrollBottom,F=this._bufferService.rows-1+O.ybase-F;k--;)O.lines.splice(z,1),O.lines.splice(F,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.y,O.scrollBottom),O.x=0}},m.prototype.insertChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.insertCells(this._bufferService.buffer.x,S.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},m.prototype.deleteChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.deleteCells(this._bufferService.buffer.x,S.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},m.prototype.scrollUp=function(S){for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)O.lines.splice(O.ybase+O.scrollTop,1),O.lines.splice(O.ybase+O.scrollBottom,0,O.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(O.scrollTop,O.scrollBottom)},m.prototype.scrollDown=function(S){for(var k=S.params[0]||1,O=this._bufferService.buffer;k--;)O.lines.splice(O.ybase+O.scrollBottom,1),O.lines.splice(O.ybase+O.scrollTop,0,O.getBlankLine(t.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(O.scrollTop,O.scrollBottom)},m.prototype.scrollLeft=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,F=k.scrollTop;F<=k.scrollBottom;++F){var z=k.lines.get(k.ybase+F);z.deleteCells(0,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},m.prototype.scrollRight=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,F=k.scrollTop;F<=k.scrollBottom;++F){var z=k.lines.get(k.ybase+F);z.insertCells(0,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},m.prototype.insertColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,F=k.scrollTop;F<=k.scrollBottom;++F){var z=this._bufferService.buffer.lines.get(k.ybase+F);z.insertCells(k.x,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},m.prototype.deleteColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var O=S.params[0]||1,F=k.scrollTop;F<=k.scrollBottom;++F){var z=k.lines.get(k.ybase+F);z.deleteCells(k.x,O,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},m.prototype.eraseChars=function(S){this._restrictCursor();var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);k&&(k.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(S.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},m.prototype.repeatPrecedingCharacter=function(S){if(this._parser.precedingCodepoint){for(var k=S.params[0]||1,O=new Uint32Array(k),F=0;F<k;++F)O[F]=this._parser.precedingCodepoint;this.print(O,0,O.length)}},m.prototype.sendDeviceAttributesPrimary=function(S){S.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(o.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(o.C0.ESC+"[?6c"))},m.prototype.sendDeviceAttributesSecondary=function(S){S.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(o.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(o.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(S.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(o.C0.ESC+"[>83;40003;0c"))},m.prototype._is=function(S){return(this._optionsService.options.termName+"").indexOf(S)===0},m.prototype.setMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!0}},m.prototype.setModePrivate=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,u.DEFAULT_CHARSET),this._charsetService.setgCharset(1,u.DEFAULT_CHARSET),this._charsetService.setgCharset(2,u.DEFAULT_CHARSET),this._charsetService.setgCharset(3,u.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},m.prototype.resetMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!1}},m.prototype.resetModePrivate=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),S.params[k]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},m.prototype._updateAttrColor=function(S,k,O,F,z){return k===2?(S|=50331648,S&=-16777216,S|=l.AttributeData.fromColorRGB([O,F,z])):k===5&&(S&=-50331904,S|=33554432|255&O),S},m.prototype._extractColor=function(S,k,O){var F=[0,0,-1,0,0,0],z=0,H=0;do{if(F[H+z]=S.params[k+H],S.hasSubParams(k+H)){var q=S.getSubParams(k+H),K=0;do F[1]===5&&(z=1),F[H+K+1+z]=q[K];while(++K<q.length&&K+H+1+z<F.length);break}if(F[1]===5&&H+z>=2||F[1]===2&&H+z>=5)break;F[1]&&(z=1)}while(++H+k<S.length&&H+z<F.length);for(K=2;K<F.length;++K)F[K]===-1&&(F[K]=0);switch(F[0]){case 38:O.fg=this._updateAttrColor(O.fg,F[1],F[3],F[4],F[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,F[1],F[3],F[4],F[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,F[1],F[3],F[4],F[5])}return H},m.prototype._processUnderline=function(S,k){k.extended=k.extended.clone(),(!~S||S>5)&&(S=1),k.extended.underlineStyle=S,k.fg|=268435456,S===0&&(k.fg&=-268435457),k.updateExtended()},m.prototype.charAttributes=function(S){if(S.length===1&&S.params[0]===0)return this._curAttrData.fg=t.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=t.DEFAULT_ATTR_DATA.bg);for(var k,O=S.length,F=this._curAttrData,z=0;z<O;z++)(k=S.params[z])>=30&&k<=37?(F.fg&=-50331904,F.fg|=16777216|k-30):k>=40&&k<=47?(F.bg&=-50331904,F.bg|=16777216|k-40):k>=90&&k<=97?(F.fg&=-50331904,F.fg|=16777224|k-90):k>=100&&k<=107?(F.bg&=-50331904,F.bg|=16777224|k-100):k===0?(F.fg=t.DEFAULT_ATTR_DATA.fg,F.bg=t.DEFAULT_ATTR_DATA.bg):k===1?F.fg|=134217728:k===3?F.bg|=67108864:k===4?(F.fg|=268435456,this._processUnderline(S.hasSubParams(z)?S.getSubParams(z)[0]:1,F)):k===5?F.fg|=536870912:k===7?F.fg|=67108864:k===8?F.fg|=1073741824:k===2?F.bg|=134217728:k===21?this._processUnderline(2,F):k===22?(F.fg&=-134217729,F.bg&=-134217729):k===23?F.bg&=-67108865:k===24?F.fg&=-268435457:k===25?F.fg&=-536870913:k===27?F.fg&=-67108865:k===28?F.fg&=-1073741825:k===39?(F.fg&=-67108864,F.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):k===49?(F.bg&=-67108864,F.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):k===38||k===48||k===58?z+=this._extractColor(S,z,F):k===59?(F.extended=F.extended.clone(),F.extended.underlineColor=-1,F.updateExtended()):k===100?(F.fg&=-67108864,F.fg|=16777215&t.DEFAULT_ATTR_DATA.fg,F.bg&=-67108864,F.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",k)},m.prototype.deviceStatus=function(S){switch(S.params[0]){case 5:this._coreService.triggerDataEvent(o.C0.ESC+"[0n");break;case 6:var k=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"["+k+";"+O+"R")}},m.prototype.deviceStatusPrivate=function(S){switch(S.params[0]){case 6:var k=this._bufferService.buffer.y+1,O=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(o.C0.ESC+"[?"+k+";"+O+"R")}},m.prototype.softReset=function(S){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=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},m.prototype.setCursorStyle=function(S){var k=S.params[0]||1;switch(k){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var O=k%2==1;this._optionsService.options.cursorBlink=O},m.prototype.setScrollRegion=function(S){var k,O=S.params[0]||1;(S.length<2||(k=S.params[1])>this._bufferService.rows||k===0)&&(k=this._bufferService.rows),k>O&&(this._bufferService.buffer.scrollTop=O-1,this._bufferService.buffer.scrollBottom=k-1,this._setCursor(0,0))},m.prototype.windowOptions=function(S){if(g(S.params[0],this._optionsService.options.windowOptions)){var k=S.length>1?S.params[1]:0;switch(S.params[0]){case 14:k!==2&&this._onRequestWindowsOptionsReport.fire(d.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(d.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(o.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:k!==0&&k!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),k!==0&&k!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:k!==0&&k!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),k!==0&&k!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},m.prototype.saveCursor=function(S){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},m.prototype.restoreCursor=function(S){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},m.prototype.setTitle=function(S){this._windowTitle=S,this._onTitleChange.fire(S)},m.prototype.setIconName=function(S){this._iconName=S},m.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},m.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},m.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},m.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,u.DEFAULT_CHARSET)},m.prototype.selectCharset=function(S){S.length===2?S[0]!=="/"&&this._charsetService.setgCharset(y[S[0]],u.CHARSETS[S[1]]||u.DEFAULT_CHARSET):this.selectDefaultCharset()},m.prototype.index=function(){this._restrictCursor();var S=this._bufferService.buffer;this._bufferService.buffer.y++,S.y===S.scrollBottom+1?(S.y--,this._onRequestScroll.fire(this._eraseAttrData())):S.y>=this._bufferService.rows&&(S.y=this._bufferService.rows-1),this._restrictCursor()},m.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},m.prototype.reverseIndex=function(){this._restrictCursor();var S=this._bufferService.buffer;if(S.y===S.scrollTop){var k=S.scrollBottom-S.scrollTop;S.lines.shiftElements(S.ybase+S.y,k,1),S.lines.set(S.ybase+S.y,S.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom)}else S.y--,this._restrictCursor()},m.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},m.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},m.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},m.prototype.setgLevel=function(S){this._charsetService.setgLevel(S)},m.prototype.screenAlignmentPattern=function(){var S=new i.CellData;S.content=1<<22|69,S.fg=this._curAttrData.fg,S.bg=this._curAttrData.bg;var k=this._bufferService.buffer;this._setCursor(0,0);for(var O=0;O<this._bufferService.rows;++O){var F=k.ybase+k.y+O,z=k.lines.get(F);z&&(z.fill(S),z.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},m}(r.Disposable);s.InputHandler=E},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DEFAULT_CHARSET=s.CHARSETS=void 0,s.CHARSETS={},s.DEFAULT_CHARSET=s.CHARSETS.B,s.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"},s.CHARSETS.A={"#":"\xA3"},s.CHARSETS.B=void 0,s.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},s.CHARSETS.C=s.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},s.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},s.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},s.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},s.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},s.CHARSETS.E=s.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},s.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},s.CHARSETS.H=s.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},s.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Params=void 0;var p=function(){function b(d,o){if(d===void 0&&(d=32),o===void 0&&(o=32),this.maxLength=d,this.maxSubParamsLength=o,o>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(o),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return b.fromArray=function(d){var o=new b;if(!d.length)return o;for(var u=d[0]instanceof Array?1:0;u<d.length;++u){var h=d[u];if(h instanceof Array)for(var r=0;r<h.length;++r)o.addSubParam(h[r]);else o.addParam(h)}return o},b.prototype.clone=function(){var d=new b(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d},b.prototype.toArray=function(){for(var d=[],o=0;o<this.length;++o){d.push(this.params[o]);var u=this._subParamsIdx[o]>>8,h=255&this._subParamsIdx[o];h-u>0&&d.push(Array.prototype.slice.call(this._subParams,u,h))}return d},b.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},b.prototype.addParam=function(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>2147483647?2147483647:d}},b.prototype.addSubParam=function(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>2147483647?2147483647:d,this._subParamsIdx[this.length-1]++}},b.prototype.hasSubParams=function(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0},b.prototype.getSubParams=function(d){var o=this._subParamsIdx[d]>>8,u=255&this._subParamsIdx[d];return u-o>0?this._subParams.subarray(o,u):null},b.prototype.getSubParamsAll=function(){for(var d={},o=0;o<this.length;++o){var u=this._subParamsIdx[o]>>8,h=255&this._subParamsIdx[o];h-u>0&&(d[o]=this._subParams.slice(u,h))}return d},b.prototype.addDigit=function(d){var o;if(!(this._rejectDigits||!(o=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var u=this._digitIsSub?this._subParams:this.params,h=u[o-1];u[o-1]=~h?Math.min(10*h+d,2147483647):d}},b}();s.Params=p},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.OscHandler=s.OscParser=void 0;var p=_(23),b=_(8),d=function(){function u(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return u.prototype.addHandler=function(h,r){this._handlers[h]===void 0&&(this._handlers[h]=[]);var n=this._handlers[h];return n.push(r),{dispose:function(){var a=n.indexOf(r);a!==-1&&n.splice(a,1)}}},u.prototype.setHandler=function(h,r){this._handlers[h]=[r]},u.prototype.clearHandler=function(h){this._handlers[h]&&delete this._handlers[h]},u.prototype.setHandlerFallback=function(h){this._handlerFb=h},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 h=this._handlers[this._id];if(h)for(var r=h.length-1;r>=0;r--)h[r].start();else this._handlerFb(this._id,"START")},u.prototype._put=function(h,r,n){var a=this._handlers[this._id];if(a)for(var t=a.length-1;t>=0;t--)a[t].put(h,r,n);else this._handlerFb(this._id,"PUT",b.utf32ToString(h,r,n))},u.prototype._end=function(h){var r=this._handlers[this._id];if(r){for(var n=r.length-1;n>=0&&r[n].end(h)===!1;n--);for(n--;n>=0;n--)r[n].end(!1)}else this._handlerFb(this._id,"END",h)},u.prototype.start=function(){this.reset(),this._id=-1,this._state=1},u.prototype.put=function(h,r,n){if(this._state!==3){if(this._state===1)for(;r<n;){var a=h[r++];if(a===59){this._state=2,this._start();break}if(a<48||57<a)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+a-48}this._state===2&&n-r>0&&this._put(h,r,n)}},u.prototype.end=function(h){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(h)),this._id=-1,this._state=0)},u}();s.OscParser=d;var o=function(){function u(h){this._handler=h,this._data="",this._hitLimit=!1}return u.prototype.start=function(){this._data="",this._hitLimit=!1},u.prototype.put=function(h,r,n){this._hitLimit||(this._data+=b.utf32ToString(h,r,n),this._data.length>p.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},u.prototype.end=function(h){var r;return this._hitLimit?r=!1:h&&(r=this._handler(this._data)),this._data="",this._hitLimit=!1,r},u}();s.OscHandler=o},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.PAYLOAD_LIMIT=void 0,s.PAYLOAD_LIMIT=1e7},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DcsHandler=s.DcsParser=void 0;var p=_(8),b=_(21),d=_(23),o=[],u=function(){function r(){this._handlers=Object.create(null),this._active=o,this._ident=0,this._handlerFb=function(){}}return r.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},r.prototype.addHandler=function(n,a){this._handlers[n]===void 0&&(this._handlers[n]=[]);var t=this._handlers[n];return t.push(a),{dispose:function(){var f=t.indexOf(a);f!==-1&&t.splice(f,1)}}},r.prototype.setHandler=function(n,a){this._handlers[n]=[a]},r.prototype.clearHandler=function(n){this._handlers[n]&&delete this._handlers[n]},r.prototype.setHandlerFallback=function(n){this._handlerFb=n},r.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=o,this._ident=0},r.prototype.hook=function(n,a){if(this.reset(),this._ident=n,this._active=this._handlers[n]||o,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(a);else this._handlerFb(this._ident,"HOOK",a)},r.prototype.put=function(n,a,t){if(this._active.length)for(var f=this._active.length-1;f>=0;f--)this._active[f].put(n,a,t);else this._handlerFb(this._ident,"PUT",p.utf32ToString(n,a,t))},r.prototype.unhook=function(n){if(this._active.length){for(var a=this._active.length-1;a>=0&&this._active[a].unhook(n)===!1;a--);for(a--;a>=0;a--)this._active[a].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",n);this._active=o,this._ident=0},r}();s.DcsParser=u;var h=function(){function r(n){this._handler=n,this._data="",this._hitLimit=!1}return r.prototype.hook=function(n){this._params=n.clone(),this._data="",this._hitLimit=!1},r.prototype.put=function(n,a,t){this._hitLimit||(this._data+=p.utf32ToString(n,a,t),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},r.prototype.unhook=function(n){var a;return this._hitLimit?a=!1:n&&(a=this._handler(this._data,this._params||new b.Params)),this._params=void 0,this._data="",this._hitLimit=!1,a},r}();s.DcsHandler=h},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.removeTerminalFromCache=s.acquireCharAtlas=void 0;var p=_(26),b=_(43),d=[];s.acquireCharAtlas=function(o,u,h,r,n){for(var a=p.generateConfig(r,n,o,h),t=0;t<d.length;t++){var f=(e=d[t]).ownedBy.indexOf(u);if(f>=0){if(p.configEquals(e.config,a))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),d.splice(t,1)):e.ownedBy.splice(f,1);break}}for(t=0;t<d.length;t++){var e=d[t];if(p.configEquals(e.config,a))return e.ownedBy.push(u),e.atlas}var i={atlas:new b.DynamicCharAtlas(document,a),config:a,ownedBy:[u]};return d.push(i),i.atlas},s.removeTerminalFromCache=function(o){for(var u=0;u<d.length;u++){var h=d[u].ownedBy.indexOf(o);if(h!==-1){d[u].ownedBy.length===1?(d[u].atlas.dispose(),d.splice(u,1)):d[u].ownedBy.splice(h,1);break}}}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.is256Color=s.configEquals=s.generateConfig=void 0;var p=_(3);s.generateConfig=function(b,d,o,u){var h={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:d,fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight,fontWeightBold:o.fontWeightBold,allowTransparency:o.allowTransparency,colors:h}},s.configEquals=function(b,d){for(var o=0;o<b.colors.ansi.length;o++)if(b.colors.ansi[o].rgba!==d.colors.ansi[o].rgba)return!1;return b.devicePixelRatio===d.devicePixelRatio&&b.fontFamily===d.fontFamily&&b.fontSize===d.fontSize&&b.fontWeight===d.fontWeight&&b.fontWeightBold===d.fontWeightBold&&b.allowTransparency===d.allowTransparency&&b.scaledCharWidth===d.scaledCharWidth&&b.scaledCharHeight===d.scaledCharHeight&&b.colors.foreground===d.colors.foreground&&b.colors.background===d.colors.background},s.is256Color=function(b){return b<p.DEFAULT_COLOR}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.ColorManager=s.DEFAULT_ANSI_COLORS=void 0;var p=_(10),b=_(45),d=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),u=p.css.toColor("#ffffff"),h=p.css.toColor("#000000"),r={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};s.DEFAULT_ANSI_COLORS=function(){for(var a=[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],f=0;f<216;f++){var e=t[f/36%6|0],i=t[f/6%6|0],l=t[f%6];a.push({css:p.channels.toCss(e,i,l),rgba:p.channels.toRgba(e,i,l)})}for(f=0;f<24;f++){var c=8+10*f;a.push({css:p.channels.toCss(c,c,c),rgba:p.channels.toRgba(c,c,c)})}return a}();var n=function(){function a(t,f){this.allowTransparency=f;var e=t.createElement("canvas");e.width=1,e.height=1;var i=e.getContext("2d");if(!i)throw new Error("Could not get rendering context");this._ctx=i,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new b.ColorContrastCache,this.colors={foreground:d,background:o,cursor:u,cursorAccent:h,selectionTransparent:r,selectionOpaque:p.color.blend(o,r),ansi:s.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return a.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},a.prototype.setTheme=function(t){t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,d),this.colors.background=this._parseColor(t.background,o),this.colors.cursor=this._parseColor(t.cursor,u,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,h,!0),this.colors.selectionTransparent=this._parseColor(t.selection,r,!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,s.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,s.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,s.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,s.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,s.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,s.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,s.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,s.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,s.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,s.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,s.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,s.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,s.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,s.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,s.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,s.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},a.prototype._parseColor=function(t,f,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return f;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+f.css),f;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(i[3]!==255){if(!e)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+f.css+"."),f;var l=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(E){return Number(E)}),c=l[0],v=l[1],y=l[2],g=l[3],x=Math.round(255*g);return{rgba:p.channels.toRgba(c,v,y,x),css:t}}return{css:this._ctx.fillStyle,rgba:p.channels.toRgba(i[0],i[1],i[2],i[3])}},a}();s.ColorManager=n},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.throwIfFalsy=void 0,s.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p}},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(n,a){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,f){t.__proto__=f}||function(t,f){for(var e in f)f.hasOwnProperty(e)&&(t[e]=f[e])})(n,a)},function(n,a){function t(){this.constructor=n}p(n,a),n.prototype=a===null?Object.create(a):(t.prototype=a.prototype,new t)});Object.defineProperty(s,"__esModule",{value:!0}),s.CharacterJoinerRegistry=s.JoinedCellData=void 0;var d=_(6),o=_(3),u=_(4),h=function(n){function a(t,f,e){var i=n.call(this)||this;return i.content=0,i.combinedData="",i.fg=t.fg,i.bg=t.bg,i.combinedData=f,i._width=e,i}return b(a,n),a.prototype.isCombined=function(){return 2097152},a.prototype.getWidth=function(){return this._width},a.prototype.getChars=function(){return this.combinedData},a.prototype.getCode=function(){return 2097151},a.prototype.setFromCharData=function(t){throw new Error("not implemented")},a.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},a}(d.AttributeData);s.JoinedCellData=h;var r=function(){function n(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new u.CellData}return n.prototype.registerCharacterJoiner=function(a){var t={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(t),t.id},n.prototype.deregisterCharacterJoiner=function(a){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===a)return this._characterJoiners.splice(t,1),!0;return!1},n.prototype.getJoinedCharacters=function(a){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(a);if(!t||t.length===0)return[];for(var f=[],e=t.translateToString(!0),i=0,l=0,c=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-i>1)for(var x=this._getJoinedRanges(e,c,l,t,i),E=0;E<x.length;E++)f.push(x[E]);i=g,c=l,v=this._workCell.fg,y=this._workCell.bg}l+=this._workCell.getChars().length||o.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-i>1)for(x=this._getJoinedRanges(e,c,l,t,i),E=0;E<x.length;E++)f.push(x[E]);return f},n.prototype._getJoinedRanges=function(a,t,f,e,i){for(var l=a.substring(t,f),c=this._characterJoiners[0].handler(l),v=1;v<this._characterJoiners.length;v++)for(var y=this._characterJoiners[v].handler(l),g=0;g<y.length;g++)n._mergeRanges(c,y[g]);return this._stringRangesToCellRanges(c,e,i),c},n.prototype._stringRangesToCellRanges=function(a,t,f){var e=0,i=!1,l=0,c=a[e];if(c){for(var v=f;v<this._bufferService.cols;v++){var y=t.getWidth(v),g=t.getString(v).length||o.WHITESPACE_CELL_CHAR.length;if(y!==0){if(!i&&c[0]<=l&&(c[0]=v,i=!0),c[1]<=l){if(c[1]=v,!(c=a[++e]))break;c[0]<=l?(c[0]=v,i=!0):i=!1}l+=g}}c&&(c[1]=this._bufferService.cols)}},n._mergeRanges=function(a,t){for(var f=!1,e=0;e<a.length;e++){var i=a[e];if(f){if(t[1]<=i[0])return a[e-1][1]=t[1],a;if(t[1]<=i[1])return a[e-1][1]=Math.max(t[1],i[1]),a.splice(e,1),a;a.splice(e,1),e--}else{if(t[1]<=i[0])return a.splice(e,0,t),a;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),a;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),f=!0)}}return f?a[a.length-1][1]=t[1]:a.push(t),a},n}();s.CharacterJoinerRegistry=r},function(D,s,_){"use strict";function p(b,d){var o=d.getBoundingClientRect();return[b.clientX-o.left,b.clientY-o.top]}Object.defineProperty(s,"__esModule",{value:!0}),s.getRawByteCoords=s.getCoords=s.getCoordsRelativeToElement=void 0,s.getCoordsRelativeToElement=p,s.getCoords=function(b,d,o,u,h,r,n,a){if(h){var t=p(b,d);if(t)return t[0]=Math.ceil((t[0]+(a?r/2:0))/r),t[1]=Math.ceil(t[1]/n),t[0]=Math.min(Math.max(t[0],1),o+(a?1:0)),t[1]=Math.min(Math.max(t[1],1),u),t}},s.getRawByteCoords=function(b){if(b)return{x:b[0]+32,y:b[1]+32}}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.RenderDebouncer=void 0;var p=function(){function b(d){this._renderCallback=d}return b.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},b.prototype.refresh=function(d,o,u){var h=this;this._rowCount=u,d=d!==void 0?d:0,o=o!==void 0?o:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,d):d,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,o):o,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return h._innerRefresh()}))},b.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var d=Math.max(this._rowStart,0),o=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(d,o)}},b}();s.RenderDebouncer=p},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(o,u){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,r){h.__proto__=r}||function(h,r){for(var n in r)r.hasOwnProperty(n)&&(h[n]=r[n])})(o,u)},function(o,u){function h(){this.constructor=o}p(o,u),o.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.ScreenDprMonitor=void 0;var d=function(o){function u(){var h=o!==null&&o.apply(this,arguments)||this;return h._currentDevicePixelRatio=window.devicePixelRatio,h}return b(u,o),u.prototype.setListener=function(h){var r=this;this._listener&&this.clearListener(),this._listener=h,this._outerListener=function(){r._listener&&(r._listener(window.devicePixelRatio,r._currentDevicePixelRatio),r._updateDpr())},this._updateDpr()},u.prototype.dispose=function(){o.prototype.dispose.call(this),this.clearListener()},u.prototype._updateDpr=function(){var h;this._outerListener&&((h=this._resolutionMediaMatchList)===null||h===void 0||h.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);s.ScreenDprMonitor=d},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.clone=void 0,s.clone=function p(b,d){if(d===void 0&&(d=5),typeof b!="object")return b;var o=Array.isArray(b)?[]:{};for(var u in b)o[u]=d<=1?b[u]:b[u]?p(b[u],d-1):b[u];return o}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.Terminal=void 0;var p=_(4),b=_(35),d=_(18),o=_(0),u=_(83),h=function(){function e(i){this._core=new b.Terminal(i),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 f(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(i,l){this._verifyIntegers(i,l),this._core.resize(i,l)},e.prototype.open=function(i){this._core.open(i)},e.prototype.attachCustomKeyEventHandler=function(i){this._core.attachCustomKeyEventHandler(i)},e.prototype.registerLinkMatcher=function(i,l,c){return this._checkProposedApi(),this._core.registerLinkMatcher(i,l,c)},e.prototype.deregisterLinkMatcher=function(i){this._checkProposedApi(),this._core.deregisterLinkMatcher(i)},e.prototype.registerLinkProvider=function(i){return this._checkProposedApi(),this._core.registerLinkProvider(i)},e.prototype.registerCharacterJoiner=function(i){return this._checkProposedApi(),this._core.registerCharacterJoiner(i)},e.prototype.deregisterCharacterJoiner=function(i){this._checkProposedApi(),this._core.deregisterCharacterJoiner(i)},e.prototype.registerMarker=function(i){return this._checkProposedApi(),this._verifyIntegers(i),this._core.addMarker(i)},e.prototype.addMarker=function(i){return this.registerMarker(i)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(i,l,c){this._verifyIntegers(i,l,c),this._core.select(i,l,c)},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(i,l){this._verifyIntegers(i,l),this._core.selectLines(i,l)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(i){this._verifyIntegers(i),this._core.scrollLines(i)},e.prototype.scrollPages=function(i){this._verifyIntegers(i),this._core.scrollPages(i)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(i){this._verifyIntegers(i),this._core.scrollToLine(i)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(i,l){this._core.write(i,l)},e.prototype.writeUtf8=function(i,l){this._core.write(i,l)},e.prototype.writeln=function(i,l){this._core.write(i),this._core.write(`\r
`,l)},e.prototype.paste=function(i){this._core.paste(i)},e.prototype.getOption=function(i){return this._core.optionsService.getOption(i)},e.prototype.setOption=function(i,l){this._core.optionsService.setOption(i,l)},e.prototype.refresh=function(i,l){this._verifyIntegers(i,l),this._core.refresh(i,l)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(i){return this._addonManager.loadAddon(this,i)},Object.defineProperty(e,"strings",{get:function(){return d},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];for(var c=0,v=i;c<v.length;c++){var y=v[c];if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}},e}();s.Terminal=h;var r=function(){function e(i,l){this._buffer=i,this.type=l}return e.prototype.init=function(i){return this._buffer=i,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(i){var l=this._buffer.lines.get(i);if(l)return new a(l)},e.prototype.getNullCell=function(){return new p.CellData},e}(),n=function(){function e(i){var l=this;this._buffers=i,this._onBufferChange=new o.EventEmitter,this._normal=new r(this._buffers.normal,"normal"),this._alternate=new r(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return l._onBufferChange.fire(l.active)})}return Object.defineProperty(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}(),a=function(){function e(i){this._line=i}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(i,l){if(!(i<0||i>=this._line.length))return l?(this._line.loadCell(i,l),l):this._line.loadCell(i,new p.CellData)},e.prototype.translateToString=function(i,l,c){return this._line.translateToString(i,l,c)},e}(),t=function(){function e(i){this._core=i}return e.prototype.registerCsiHandler=function(i,l){return this._core.addCsiHandler(i,function(c){return l(c.toArray())})},e.prototype.addCsiHandler=function(i,l){return this.registerCsiHandler(i,l)},e.prototype.registerDcsHandler=function(i,l){return this._core.addDcsHandler(i,function(c,v){return l(c,v.toArray())})},e.prototype.addDcsHandler=function(i,l){return this.registerDcsHandler(i,l)},e.prototype.registerEscHandler=function(i,l){return this._core.addEscHandler(i,l)},e.prototype.addEscHandler=function(i,l){return this.registerEscHandler(i,l)},e.prototype.registerOscHandler=function(i,l){return this._core.addOscHandler(i,l)},e.prototype.addOscHandler=function(i,l){return this.registerOscHandler(i,l)},e}(),f=function(){function e(i){this._core=i}return e.prototype.register=function(i){this._core.unicodeService.register(i)},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(i){this._core.unicodeService.activeVersion=i},enumerable:!1,configurable:!0}),e}()},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function($,R){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(X,I){X.__proto__=I}||function(X,I){for(var W in I)I.hasOwnProperty(W)&&(X[W]=I[W])})($,R)},function($,R){function X(){this.constructor=$}p($,R),$.prototype=R===null?Object.create(R):(X.prototype=R.prototype,new X)});Object.defineProperty(s,"__esModule",{value:!0}),s.Terminal=void 0;var d=_(36),o=_(37),u=_(38),h=_(12),r=_(19),n=_(40),a=_(50),t=_(51),f=_(11),e=_(7),i=_(18),l=_(54),c=_(55),v=_(56),y=_(57),g=_(59),x=_(0),E=_(16),C=_(27),m=_(60),S=_(5),k=_(61),O=_(62),F=_(63),z=_(64),H=_(65),q=typeof window!="undefined"?window.document:null,K=function($){function R(X){X===void 0&&(X={});var I=$.call(this,X)||this;return I.browser=f,I._keyDownHandled=!1,I._onCursorMove=new x.EventEmitter,I._onKey=new x.EventEmitter,I._onRender=new x.EventEmitter,I._onSelectionChange=new x.EventEmitter,I._onTitleChange=new x.EventEmitter,I._onFocus=new x.EventEmitter,I._onBlur=new x.EventEmitter,I._onA11yCharEmitter=new x.EventEmitter,I._onA11yTabEmitter=new x.EventEmitter,I._setup(),I.linkifier=I._instantiationService.createInstance(a.Linkifier),I.linkifier2=I.register(I._instantiationService.createInstance(F.Linkifier2)),I.register(I._inputHandler.onRequestBell(function(){return I.bell()})),I.register(I._inputHandler.onRequestRefreshRows(function(W,B){return I.refresh(W,B)})),I.register(I._inputHandler.onRequestReset(function(){return I.reset()})),I.register(I._inputHandler.onRequestScroll(function(W,B){return I.scroll(W,B||void 0)})),I.register(I._inputHandler.onRequestWindowsOptionsReport(function(W){return I._reportWindowsOptions(W)})),I.register(x.forwardEvent(I._inputHandler.onCursorMove,I._onCursorMove)),I.register(x.forwardEvent(I._inputHandler.onTitleChange,I._onTitleChange)),I.register(x.forwardEvent(I._inputHandler.onA11yChar,I._onA11yCharEmitter)),I.register(x.forwardEvent(I._inputHandler.onA11yTab,I._onA11yTabEmitter)),I.register(I._bufferService.onResize(function(W){return I._afterResize(W.cols,W.rows)})),I}return b(R,$),Object.defineProperty(R.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),R.prototype.dispose=function(){var X,I,W;this._isDisposed||($.prototype.dispose.call(this),(X=this._renderService)===null||X===void 0||X.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(W=(I=this.element)===null||I===void 0?void 0:I.parentNode)===null||W===void 0||W.removeChild(this.element))},R.prototype._setup=function(){$.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(R.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),R.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},R.prototype._updateOptions=function(X){var I,W,B,G;switch($.prototype._updateOptions.call(this,X),X){case"fontFamily":case"fontSize":(I=this._renderService)===null||I===void 0||I.clear(),(W=this._charSizeService)===null||W===void 0||W.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)):((G=this._accessibilityManager)===null||G===void 0||G.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},R.prototype._onTextAreaFocus=function(X){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[I"),this.updateCursorStyle(X),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},R.prototype.blur=function(){var X;return(X=this.textarea)===null||X===void 0?void 0:X.blur()},R.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},R.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var X=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),I=this._bufferService.buffer.y*X,W=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=W+"px",this.textarea.style.top=I+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=X+"px",this.textarea.style.lineHeight=X+"px",this.textarea.style.zIndex="-5"}},R.prototype._initGlobal=function(){var X=this;this._bindKeys(),this.register(e.addDisposableDomListener(this.element,"copy",function(W){X.hasSelection()&&u.copyHandler(W,X._selectionService)}));var I=function(W){return u.handlePasteEvent(W,X.textarea,X._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",I)),this.register(e.addDisposableDomListener(this.element,"paste",I)),f.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(W){W.button===2&&u.rightClickHandler(W,X.textarea,X.screenElement,X._selectionService,X.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(W){u.rightClickHandler(W,X.textarea,X.screenElement,X._selectionService,X.options.rightClickSelectsWord)})),f.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(W){W.button===1&&u.moveTextAreaUnderMouseCursor(W,X.textarea,X.screenElement)}))},R.prototype._bindKeys=function(){var X=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(I){return X._keyUp(I)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(I){return X._keyDown(I)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(I){return X._keyPress(I)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return X._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(I){return X._compositionHelper.compositionupdate(I)})),this.register(e.addDisposableDomListener(this.textarea,"compositionend",function(){return X._compositionHelper.compositionend()})),this.register(this.onRender(function(){return X._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(I){return X._queueLinkification(I.start,I.end)}))},R.prototype.open=function(X){var I=this;if(!X)throw new Error("Terminal requires a parent element.");q.body.contains(X)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=X.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),X.appendChild(this.element);var W=q.createDocumentFragment();this._viewportElement=q.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),W.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),W.appendChild(this.screenElement),this.textarea=q.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",i.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(fe){return I._onTextAreaFocus(fe)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return I._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var B=this._instantiationService.createInstance(z.CoreBrowserService,this.textarea);this._instantiationService.setService(S.ICoreBrowserService,B),this._charSizeService=this._instantiationService.createInstance(k.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(S.ICharSizeService,this._charSizeService),this._compositionView=q.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(W),this._theme=this.options.theme||this._theme,this._colorManager=new C.ColorManager(q,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(fe){return I._colorManager.onOptionsChange(fe)})),this._colorManager.setTheme(this._theme);var G=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(m.RenderService,G,this.rows,this.screenElement)),this._instantiationService.setService(S.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(fe){return I._onRender.fire(fe)})),this.onResize(function(fe){return I._renderService.resize(fe.cols,fe.rows)}),this._soundService=this._instantiationService.createInstance(l.SoundService),this._instantiationService.setService(S.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(O.MouseService),this._instantiationService.setService(S.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(o.Viewport,function(fe,xe){return I.scrollLines(fe,xe)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return I.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){I._renderService.onCursorMove(),I._syncTextArea()})),this.register(this.onResize(function(){return I._renderService.onResize(I.cols,I.rows)})),this.register(this.onBlur(function(){return I._renderService.onBlur()})),this.register(this.onFocus(function(){return I._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return I.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(S.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(fe){return I.scrollLines(fe.amount,fe.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return I._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(fe){return I._renderService.onSelectionChanged(fe.start,fe.end,fe.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(fe){I.textarea.value=fe,I.textarea.focus(),I.textarea.select()})),this.register(this.onScroll(function(){I.viewport.syncScrollArea(),I._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return I._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(c.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return I._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(e.addDisposableDomListener(this.element,"mousedown",function(fe){return I._selectionService.onMouseDown(fe)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new v.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},R.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+'"')}},R.prototype._setTheme=function(X){var I,W,B;this._theme=X,(I=this._colorManager)===null||I===void 0||I.setTheme(X),(W=this._renderService)===null||W===void 0||W.setColors(this._colorManager.colors),(B=this.viewport)===null||B===void 0||B.onThemeChange(this._colorManager.colors)},R.prototype.bindMouse=function(){var X=this,I=this,W=this.element;function B(ae){var ge,Fe,Te=I._mouseService.getRawByteCoords(ae,I.screenElement,I.cols,I.rows);if(!Te)return!1;switch(ae.overrideType||ae.type){case"mousemove":Fe=32,ae.buttons===void 0?(ge=3,ae.button!==void 0&&(ge=ae.button<3?ae.button:3)):ge=1&ae.buttons?0:4&ae.buttons?1:2&ae.buttons?2:3;break;case"mouseup":Fe=0,ge=ae.button<3?ae.button:3;break;case"mousedown":Fe=1,ge=ae.button<3?ae.button:3;break;case"wheel":ae.deltaY!==0&&(Fe=ae.deltaY<0?0:1),ge=4;break;default:return!1}return!(Fe===void 0||ge===void 0||ge>4)&&I._coreMouseService.triggerMouseEvent({col:Te.x-33,row:Te.y-33,button:ge,action:Fe,ctrl:ae.ctrlKey,alt:ae.altKey,shift:ae.shiftKey})}var G={mouseup:null,wheel:null,mousedrag:null,mousemove:null},fe=function(ae){return B(ae),ae.buttons||(X._document.removeEventListener("mouseup",G.mouseup),G.mousedrag&&X._document.removeEventListener("mousemove",G.mousedrag)),X.cancel(ae)},xe=function(ae){return B(ae),ae.preventDefault(),X.cancel(ae)},Le=function(ae){ae.buttons&&B(ae)},ke=function(ae){ae.buttons||B(ae)};this.register(this._coreMouseService.onProtocolChange(function(ae){ae?(X.optionsService.options.logLevel==="debug"&&X._logService.debug("Binding to mouse events:",X._coreMouseService.explainEvents(ae)),X.element.classList.add("enable-mouse-events"),X._selectionService.disable()):(X._logService.debug("Unbinding from mouse events."),X.element.classList.remove("enable-mouse-events"),X._selectionService.enable()),8&ae?G.mousemove||(W.addEventListener("mousemove",ke),G.mousemove=ke):(W.removeEventListener("mousemove",G.mousemove),G.mousemove=null),16&ae?G.wheel||(W.addEventListener("wheel",xe,{passive:!1}),G.wheel=xe):(W.removeEventListener("wheel",G.wheel),G.wheel=null),2&ae?G.mouseup||(G.mouseup=fe):(X._document.removeEventListener("mouseup",G.mouseup),G.mouseup=null),4&ae?G.mousedrag||(G.mousedrag=Le):(X._document.removeEventListener("mousemove",G.mousedrag),G.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(W,"mousedown",function(ae){if(ae.preventDefault(),X.focus(),X._coreMouseService.areMouseEventsActive&&!X._selectionService.shouldForceSelection(ae))return B(ae),G.mouseup&&X._document.addEventListener("mouseup",G.mouseup),G.mousedrag&&X._document.addEventListener("mousemove",G.mousedrag),X.cancel(ae)})),this.register(e.addDisposableDomListener(W,"wheel",function(ae){if(!G.wheel){if(!X.buffer.hasScrollback){var ge=X.viewport.getLinesScrolled(ae);if(ge===0)return;for(var Fe=h.C0.ESC+(X._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ae.deltaY<0?"A":"B"),Te="",Oe=0;Oe<Math.abs(ge);Oe++)Te+=Fe;X._coreService.triggerDataEvent(Te,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(W,"wheel",function(ae){if(!G.wheel)return X.viewport.onWheel(ae)?void 0:X.cancel(ae)},{passive:!1})),this.register(e.addDisposableDomListener(W,"touchstart",function(ae){if(!X._coreMouseService.areMouseEventsActive)return X.viewport.onTouchStart(ae),X.cancel(ae)},{passive:!0})),this.register(e.addDisposableDomListener(W,"touchmove",function(ae){if(!X._coreMouseService.areMouseEventsActive)return X.viewport.onTouchMove(ae)?void 0:X.cancel(ae)},{passive:!1}))},R.prototype.refresh=function(X,I){var W;(W=this._renderService)===null||W===void 0||W.refreshRows(X,I)},R.prototype._queueLinkification=function(X,I){var W;(W=this.linkifier)===null||W===void 0||W.linkifyRows(X,I)},R.prototype.updateCursorStyle=function(X){this._selectionService&&this._selectionService.shouldColumnSelect(X)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},R.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},R.prototype.scrollLines=function(X,I){$.prototype.scrollLines.call(this,X,I),this.refresh(0,this.rows-1)},R.prototype.paste=function(X){u.paste(X,this.textarea,this._coreService)},R.prototype.attachCustomKeyEventHandler=function(X){this._customKeyEventHandler=X},R.prototype.registerLinkMatcher=function(X,I,W){var B=this.linkifier.registerLinkMatcher(X,I,W);return this.refresh(0,this.rows-1),B},R.prototype.deregisterLinkMatcher=function(X){this.linkifier.deregisterLinkMatcher(X)&&this.refresh(0,this.rows-1)},R.prototype.registerLinkProvider=function(X){return this.linkifier2.registerLinkProvider(X)},R.prototype.registerCharacterJoiner=function(X){var I=this._renderService.registerCharacterJoiner(X);return this.refresh(0,this.rows-1),I},R.prototype.deregisterCharacterJoiner=function(X){this._renderService.deregisterCharacterJoiner(X)&&this.refresh(0,this.rows-1)},Object.defineProperty(R.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),R.prototype.addMarker=function(X){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+X)},R.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},R.prototype.select=function(X,I,W){this._selectionService.setSelection(X,I,W)},R.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},R.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]}},R.prototype.clearSelection=function(){var X;(X=this._selectionService)===null||X===void 0||X.clearSelection()},R.prototype.selectAll=function(){var X;(X=this._selectionService)===null||X===void 0||X.selectAll()},R.prototype.selectLines=function(X,I){var W;(W=this._selectionService)===null||W===void 0||W.selectLines(X,I)},R.prototype._keyDown=function(X){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(!this._compositionHelper.keydown(X))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var I=g.evaluateKeyboardEvent(X,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(X),I.type===3||I.type===2){var W=this.rows-1;return this.scrollLines(I.type===2?-W:W),this.cancel(X,!0)}return I.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,X)||(I.cancel&&this.cancel(X,!0),!I.key||(I.key!==h.C0.ETX&&I.key!==h.C0.CR||(this.textarea.value=""),this._onKey.fire({key:I.key,domEvent:X}),this._showCursor(),this._coreService.triggerDataEvent(I.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(X,!0)))},R.prototype._isThirdLevelShift=function(X,I){var W=X.isMac&&!this.options.macOptionIsMeta&&I.altKey&&!I.ctrlKey&&!I.metaKey||X.isWindows&&I.altKey&&I.ctrlKey&&!I.metaKey;return I.type==="keypress"?W:W&&(!I.keyCode||I.keyCode>47)},R.prototype._keyUp=function(X){this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1||(function(I){return I.keyCode===16||I.keyCode===17||I.keyCode===18}(X)||this.focus(),this.updateCursorStyle(X))},R.prototype._keyPress=function(X){var I;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(X)===!1)return!1;if(this.cancel(X),X.charCode)I=X.charCode;else if(X.which===null||X.which===void 0)I=X.keyCode;else{if(X.which===0||X.charCode===0)return!1;I=X.which}return!(!I||(X.altKey||X.ctrlKey||X.metaKey)&&!this._isThirdLevelShift(this.browser,X))&&(I=String.fromCharCode(I),this._onKey.fire({key:I,domEvent:X}),this._showCursor(),this._coreService.triggerDataEvent(I,!0),!0)},R.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},R.prototype.resize=function(X,I){X!==this.cols||I!==this.rows?$.prototype.resize.call(this,X,I):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},R.prototype._afterResize=function(X,I){var W,B;(W=this._charSizeService)===null||W===void 0||W.measure(),(B=this.viewport)===null||B===void 0||B.syncScrollArea(!0)},R.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var X=1;X<this.rows;X++)this.buffer.lines.push(this.buffer.getBlankLine(E.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},R.prototype.reset=function(){var X,I;this.options.rows=this.rows,this.options.cols=this.cols;var W=this._customKeyEventHandler;this._setup(),$.prototype.reset.call(this),(X=this._selectionService)===null||X===void 0||X.reset(),this._customKeyEventHandler=W,this.refresh(0,this.rows-1),(I=this.viewport)===null||I===void 0||I.syncScrollArea()},R.prototype._reportWindowsOptions=function(X){if(this._renderService)switch(X){case r.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var I=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),W=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(h.C0.ESC+"[4;"+W+";"+I+"t");break;case r.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var B=this._renderService.dimensions.scaledCellWidth.toFixed(0),G=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(h.C0.ESC+"[6;"+G+";"+B+"t")}},R.prototype.cancel=function(X,I){if(this.options.cancelEvents||I)return X.preventDefault(),X.stopPropagation(),!1},R.prototype._visualBell=function(){return!1},R.prototype._soundBell=function(){return this.options.bellStyle==="sound"},R}(H.CoreTerminal);s.Terminal=K},function(D,s,_){"use strict";var p=this&&this.__decorate||function(h,r,n,a){var t,f=arguments.length,e=f<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,n):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(h,r,n,a);else for(var i=h.length-1;i>=0;i--)(t=h[i])&&(e=(f<3?t(e):f>3?t(r,n,e):t(r,n))||e);return f>3&&e&&Object.defineProperty(r,n,e),e},b=this&&this.__param||function(h,r){return function(n,a){r(n,a,h)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CompositionHelper=void 0;var d=_(5),o=_(1),u=function(){function h(r,n,a,t,f,e){this._textarea=r,this._compositionView=n,this._bufferService=a,this._optionsService=t,this._charSizeService=f,this._coreService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(h.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),h.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},h.prototype.compositionupdate=function(r){var n=this;this._compositionView.textContent=r.data,this.updateCompositionElements(),setTimeout(function(){n._compositionPosition.end=n._textarea.value.length},0)},h.prototype.compositionend=function(){this._finalizeComposition(!0)},h.prototype.keydown=function(r){if(this._isComposing||this._isSendingComposition){if(r.keyCode===229||r.keyCode===16||r.keyCode===17||r.keyCode===18)return!1;this._finalizeComposition(!1)}return r.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},h.prototype._finalizeComposition=function(r){var n=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,r){var a={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(n._isSendingComposition){n._isSendingComposition=!1;var f=void 0;f=n._isComposing?n._textarea.value.substring(a.start,a.end):n._textarea.value.substring(a.start),n._coreService.triggerDataEvent(f,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},h.prototype._handleAnyTextareaChanges=function(){var r=this,n=this._textarea.value;setTimeout(function(){if(!r._isComposing){var a=r._textarea.value.replace(n,"");a.length>0&&r._coreService.triggerDataEvent(a,!0)}},0)},h.prototype.updateCompositionElements=function(r){var n=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var a=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),t=this._bufferService.buffer.y*a,f=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=f+"px",this._compositionView.style.top=t+"px",this._compositionView.style.height=a+"px",this._compositionView.style.lineHeight=a+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var e=this._compositionView.getBoundingClientRect();this._textarea.style.left=f+"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"}r||setTimeout(function(){return n.updateCompositionElements(!0)},0)}},h=p([b(2,o.IBufferService),b(3,o.IOptionsService),b(4,d.ICharSizeService),b(5,o.ICoreService)],h)}();s.CompositionHelper=u},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(t,f){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var l in i)i.hasOwnProperty(l)&&(e[l]=i[l])})(t,f)},function(t,f){function e(){this.constructor=t}p(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),d=this&&this.__decorate||function(t,f,e,i){var l,c=arguments.length,v=c<3?f:i===null?i=Object.getOwnPropertyDescriptor(f,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,f,e,i);else for(var y=t.length-1;y>=0;y--)(l=t[y])&&(v=(c<3?l(v):c>3?l(f,e,v):l(f,e))||v);return c>3&&v&&Object.defineProperty(f,e,v),v},o=this&&this.__param||function(t,f){return function(e,i){f(e,i,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Viewport=void 0;var u=_(2),h=_(7),r=_(5),n=_(1),a=function(t){function f(e,i,l,c,v,y,g){var x=t.call(this)||this;return x._scrollLines=e,x._viewportElement=i,x._scrollArea=l,x._bufferService=c,x._optionsService=v,x._charSizeService=y,x._renderService=g,x.scrollBarWidth=0,x._currentRowHeight=0,x._lastRecordedBufferLength=0,x._lastRecordedViewportHeight=0,x._lastRecordedBufferHeight=0,x._lastTouchY=0,x._lastScrollTop=0,x._wheelPartialScroll=0,x._refreshAnimationFrame=null,x._ignoreNextScrollEvent=!1,x.scrollBarWidth=x._viewportElement.offsetWidth-x._scrollArea.offsetWidth||15,x.register(h.addDisposableDomListener(x._viewportElement,"scroll",x._onScroll.bind(x))),setTimeout(function(){return x.syncScrollArea()},0),x}return b(f,t),f.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},f.prototype._refresh=function(e){var i=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return i._innerRefresh()}))},f.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 i=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==i&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=i),this._refreshAnimationFrame=null},f.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 i=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===i&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},f.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var i=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(i,!0)}},f.prototype._bubbleScroll=function(e,i){var l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(i<0&&this._viewportElement.scrollTop!==0||i>0&&l<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},f.prototype.onWheel=function(e){var i=this._getPixelsScrolled(e);return i!==0&&(this._viewportElement.scrollTop+=i,this._bubbleScroll(e,i))},f.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?i*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._currentRowHeight*this._bufferService.rows),i},f.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=this._currentRowHeight+0,this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i},f.prototype._applyScrollModifier=function(e,i){var l=this._optionsService.options.fastScrollModifier;return l==="alt"&&i.altKey||l==="ctrl"&&i.ctrlKey||l==="shift"&&i.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},f.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},f.prototype.onTouchMove=function(e){var i=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,i!==0&&(this._viewportElement.scrollTop+=i,this._bubbleScroll(e,i))},f=d([o(3,n.IBufferService),o(4,n.IOptionsService),o(5,r.ICharSizeService),o(6,r.IRenderService)],f)}(u.Disposable);s.Viewport=a},function(D,s,_){"use strict";function p(u){return u.replace(/\r?\n/g,"\r")}function b(u,h){return h?"\x1B[200~"+u+"\x1B[201~":u}function d(u,h,r){u=b(u=p(u),r.decPrivateModes.bracketedPasteMode),r.triggerDataEvent(u,!0),h.value=""}function o(u,h,r){var n=r.getBoundingClientRect(),a=u.clientX-n.left-10,t=u.clientY-n.top-10;h.style.width="20px",h.style.height="20px",h.style.left=a+"px",h.style.top=t+"px",h.style.zIndex="1000",h.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=p,s.bracketTextForPaste=b,s.copyHandler=function(u,h){u.clipboardData&&u.clipboardData.setData("text/plain",h.selectionText),u.preventDefault()},s.handlePasteEvent=function(u,h,r){u.stopPropagation(),u.clipboardData&&d(u.clipboardData.getData("text/plain"),h,r)},s.paste=d,s.moveTextAreaUnderMouseCursor=o,s.rightClickHandler=function(u,h,r,n,a){o(u,h,r),a&&!n.isClickInSelection(u)&&n.selectWordAtCursor(u),h.value=n.selectionText,h.select()}},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(t,f){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var l in i)i.hasOwnProperty(l)&&(e[l]=i[l])})(t,f)},function(t,f){function e(){this.constructor=t}p(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)});Object.defineProperty(s,"__esModule",{value:!0}),s.EscapeSequenceParser=s.VT500_TRANSITION_TABLE=s.TransitionTable=void 0;var d=_(2),o=_(15),u=_(21),h=_(22),r=_(24),n=function(){function t(f){this.table=new Uint8Array(f)}return t.prototype.setDefault=function(f,e){o.fill(this.table,f<<4|e)},t.prototype.add=function(f,e,i,l){this.table[e<<8|f]=i<<4|l},t.prototype.addMany=function(f,e,i,l){for(var c=0;c<f.length;c++)this.table[e<<8|f[c]]=i<<4|l},t}();s.TransitionTable=n,s.VT500_TRANSITION_TABLE=function(){var t=new n(4095),f=Array.apply(null,Array(256)).map(function(y,g){return g}),e=function(y,g){return f.slice(y,g)},i=e(32,127),l=e(0,24);l.push(25),l.push.apply(l,e(28,32));var c,v=e(0,14);for(c in t.setDefault(1,0),t.addMany(i,0,2,0),v)t.addMany([24,26,153,154],c,3,0),t.addMany(e(128,144),c,3,0),t.addMany(e(144,152),c,3,0),t.add(156,c,0,0),t.add(27,c,11,1),t.add(157,c,4,8),t.addMany([152,158,159],c,0,7),t.add(155,c,11,3),t.add(144,c,11,9);return t.addMany(l,0,3,0),t.addMany(l,1,3,1),t.add(127,1,0,1),t.addMany(l,8,0,8),t.addMany(l,3,3,3),t.add(127,3,0,3),t.addMany(l,4,3,4),t.add(127,4,0,4),t.addMany(l,6,3,6),t.addMany(l,5,3,5),t.add(127,5,0,5),t.addMany(l,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(i,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(i,7,0,7),t.addMany(l,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(l,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(l,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(l,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(l,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(l,13,13,13),t.addMany(i,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 a=function(t){function f(e){e===void 0&&(e=s.VT500_TRANSITION_TABLE);var i=t.call(this)||this;return i._transitions=e,i.initialState=0,i.currentState=i.initialState,i._params=new u.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(l,c,v){},i._executeHandlerFb=function(l){},i._csiHandlerFb=function(l,c){},i._escHandlerFb=function(l){},i._errorHandlerFb=function(l){return l},i._printHandler=i._printHandlerFb,i._executeHandlers=Object.create(null),i._csiHandlers=Object.create(null),i._escHandlers=Object.create(null),i._oscParser=new h.OscParser,i._dcsParser=new r.DcsParser,i._errorHandler=i._errorHandlerFb,i.setEscHandler({final:"\\"},function(){}),i}return b(f,t),f.prototype._identifier=function(e,i){i===void 0&&(i=[64,126]);var l=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((l=e.prefix.charCodeAt(0))&&60>l||l>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 c=0;c<e.intermediates.length;++c){var v=e.intermediates.charCodeAt(c);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=v}}if(e.final.length!==1)throw new Error("final must be a single byte");var y=e.final.charCodeAt(0);if(i[0]>y||y>i[1])throw new Error("final must be in range "+i[0]+" .. "+i[1]);return l<<=8,l|=y},f.prototype.identToString=function(e){for(var i=[];e;)i.push(String.fromCharCode(255&e)),e>>=8;return i.reverse().join("")},f.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},f.prototype.setPrintHandler=function(e){this._printHandler=e},f.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},f.prototype.addEscHandler=function(e,i){var l=this._identifier(e,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);var c=this._escHandlers[l];return c.push(i),{dispose:function(){var v=c.indexOf(i);v!==-1&&c.splice(v,1)}}},f.prototype.setEscHandler=function(e,i){this._escHandlers[this._identifier(e,[48,126])]=[i]},f.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},f.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},f.prototype.setExecuteHandler=function(e,i){this._executeHandlers[e.charCodeAt(0)]=i},f.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},f.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},f.prototype.addCsiHandler=function(e,i){var l=this._identifier(e);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);var c=this._csiHandlers[l];return c.push(i),{dispose:function(){var v=c.indexOf(i);v!==-1&&c.splice(v,1)}}},f.prototype.setCsiHandler=function(e,i){this._csiHandlers[this._identifier(e)]=[i]},f.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},f.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},f.prototype.addDcsHandler=function(e,i){return this._dcsParser.addHandler(this._identifier(e),i)},f.prototype.setDcsHandler=function(e,i){this._dcsParser.setHandler(this._identifier(e),i)},f.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},f.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},f.prototype.addOscHandler=function(e,i){return this._oscParser.addHandler(e,i)},f.prototype.setOscHandler=function(e,i){this._oscParser.setHandler(e,i)},f.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},f.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},f.prototype.setErrorHandler=function(e){this._errorHandler=e},f.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},f.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},f.prototype.parse=function(e,i){for(var l=0,c=0,v=this.currentState,y=this._oscParser,g=this._dcsParser,x=this._collect,E=this._params,C=this._transitions.table,m=0;m<i;++m){switch((c=C[v<<8|((l=e[m])<160?l:160)])>>4){case 2:for(var S=m+1;;++S){if(S>=i||(l=e[S])<32||l>126&&l<160){this._printHandler(e,m,S),m=S-1;break}if(++S>=i||(l=e[S])<32||l>126&&l<160){this._printHandler(e,m,S),m=S-1;break}if(++S>=i||(l=e[S])<32||l>126&&l<160){this._printHandler(e,m,S),m=S-1;break}if(++S>=i||(l=e[S])<32||l>126&&l<160){this._printHandler(e,m,S),m=S-1;break}}break;case 3:this._executeHandlers[l]?this._executeHandlers[l]():this._executeHandlerFb(l),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:l,currentState:v,collect:x,params:E,abort:!1}).abort)return;break;case 7:for(var k=this._csiHandlers[x<<8|l],O=k?k.length-1:-1;O>=0&&k[O](E)===!1;O--);O<0&&this._csiHandlerFb(x<<8|l,E),this.precedingCodepoint=0;break;case 8:do switch(l){case 59:E.addParam(0);break;case 58:E.addSubParam(-1);break;default:E.addDigit(l-48)}while(++m<i&&(l=e[m])>47&&l<60);m--;break;case 9:x<<=8,x|=l;break;case 10:for(var F=this._escHandlers[x<<8|l],z=F?F.length-1:-1;z>=0&&F[z]()===!1;z--);z<0&&this._escHandlerFb(x<<8|l),this.precedingCodepoint=0;break;case 11:E.reset(),E.addParam(0),x=0;break;case 12:g.hook(x<<8|l,E);break;case 13:for(var H=m+1;;++H)if(H>=i||(l=e[H])===24||l===26||l===27||l>127&&l<160){g.put(e,m,H),m=H-1;break}break;case 14:g.unhook(l!==24&&l!==26),l===27&&(c|=1),E.reset(),E.addParam(0),x=0,this.precedingCodepoint=0;break;case 4:y.start();break;case 5:for(var q=m+1;;q++)if(q>=i||(l=e[q])<32||l>127&&l<=159){y.put(e,m,q),m=q-1;break}break;case 6:y.end(l!==24&&l!==26),l===27&&(c|=1),E.reset(),E.addParam(0),x=0,this.precedingCodepoint=0}v=15&c}this._collect=x,this.currentState=v},f}(d.Disposable);s.EscapeSequenceParser=a},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(y,g){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var C in E)E.hasOwnProperty(C)&&(x[C]=E[C])})(y,g)},function(y,g){function x(){this.constructor=y}p(y,g),y.prototype=g===null?Object.create(g):(x.prototype=g.prototype,new x)}),d=this&&this.__decorate||function(y,g,x,E){var C,m=arguments.length,S=m<3?g:E===null?E=Object.getOwnPropertyDescriptor(g,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,g,x,E);else for(var k=y.length-1;k>=0;k--)(C=y[k])&&(S=(m<3?C(S):m>3?C(g,x,S):C(g,x))||S);return m>3&&S&&Object.defineProperty(g,x,S),S},o=this&&this.__param||function(y,g){return function(x,E){g(x,E,y)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Renderer=void 0;var u=_(41),h=_(47),r=_(48),n=_(49),a=_(29),t=_(2),f=_(5),e=_(1),i=_(25),l=_(0),c=1,v=function(y){function g(x,E,C,m,S,k,O,F,z){var H=y.call(this)||this;H._colors=x,H._screenElement=E,H._bufferService=S,H._charSizeService=k,H._optionsService=O,H._id=c++,H._onRequestRedraw=new l.EventEmitter;var q=H._optionsService.options.allowTransparency;return H._characterJoinerRegistry=new a.CharacterJoinerRegistry(H._bufferService),H._renderLayers=[new u.TextRenderLayer(H._screenElement,0,H._colors,H._characterJoinerRegistry,q,H._id,H._bufferService,O),new h.SelectionRenderLayer(H._screenElement,1,H._colors,H._id,H._bufferService,O),new n.LinkRenderLayer(H._screenElement,2,H._colors,H._id,C,m,H._bufferService,O),new r.CursorRenderLayer(H._screenElement,3,H._colors,H._id,H._onRequestRedraw,H._bufferService,O,F,z)],H.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},H._devicePixelRatio=window.devicePixelRatio,H._updateDimensions(),H.onOptionsChanged(),H}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 x=0,E=this._renderLayers;x<E.length;x++)E[x].dispose();y.prototype.dispose.call(this),i.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(x){this._colors=x;for(var E=0,C=this._renderLayers;E<C.length;E++){var m=C[E];m.setColors(this._colors),m.reset()}},g.prototype.onResize=function(x,E){this._updateDimensions();for(var C=0,m=this._renderLayers;C<m.length;C++)m[C].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(x){return x.onBlur()})},g.prototype.onFocus=function(){this._runOperation(function(x){return x.onFocus()})},g.prototype.onSelectionChanged=function(x,E,C){C===void 0&&(C=!1),this._runOperation(function(m){return m.onSelectionChanged(x,E,C)})},g.prototype.onCursorMove=function(){this._runOperation(function(x){return x.onCursorMove()})},g.prototype.onOptionsChanged=function(){this._runOperation(function(x){return x.onOptionsChanged()})},g.prototype.clear=function(){this._runOperation(function(x){return x.reset()})},g.prototype._runOperation=function(x){for(var E=0,C=this._renderLayers;E<C.length;E++)x(C[E])},g.prototype.renderRows=function(x,E){for(var C=0,m=this._renderLayers;C<m.length;C++)m[C].onGridChanged(x,E)},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(x){return this._characterJoinerRegistry.registerCharacterJoiner(x)},g.prototype.deregisterCharacterJoiner=function(x){return this._characterJoinerRegistry.deregisterCharacterJoiner(x)},g=d([o(4,e.IBufferService),o(5,f.ICharSizeService),o(6,e.IOptionsService),o(7,e.ICoreService),o(8,f.ICoreBrowserService)],g)}(t.Disposable);s.Renderer=v},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(t,f){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var l in i)i.hasOwnProperty(l)&&(e[l]=i[l])})(t,f)},function(t,f){function e(){this.constructor=t}p(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)});Object.defineProperty(s,"__esModule",{value:!0}),s.TextRenderLayer=void 0;var d=_(42),o=_(13),u=_(6),h=_(3),r=_(29),n=_(4),a=function(t){function f(e,i,l,c,v,y,g,x){var E=t.call(this,e,"text",i,v,l,y,g,x)||this;return E._characterWidth=0,E._characterFont="",E._characterOverlapCache={},E._workCell=new n.CellData,E._state=new d.GridCache,E._characterJoinerRegistry=c,E}return b(f,t),f.prototype.resize=function(e){t.prototype.resize.call(this,e);var i=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===i||(this._characterWidth=e.scaledCharWidth,this._characterFont=i,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},f.prototype.reset=function(){this._state.clear(),this._clearAll()},f.prototype._forEachCell=function(e,i,l,c){for(var v=e;v<=i;v++)for(var y=v+this._bufferService.buffer.ydisp,g=this._bufferService.buffer.lines.get(y),x=l?l.getJoinedCharacters(y):[],E=0;E<this._bufferService.cols;E++){g.loadCell(E,this._workCell);var C=this._workCell,m=!1,S=E;if(C.getWidth()!==0){if(x.length>0&&E===x[0][0]){m=!0;var k=x.shift();C=new r.JoinedCellData(this._workCell,g.translateToString(!0,k[0],k[1]),k[1]-k[0]),S=k[1]-1}!m&&this._isOverlapping(C)&&S<g.length-1&&g.getCodePoint(S+1)===h.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=2<<22),c(C,E,v),E=S}}},f.prototype._drawBackground=function(e,i){var l=this,c=this._ctx,v=this._bufferService.cols,y=0,g=0,x=null;c.save(),this._forEachCell(e,i,null,function(E,C,m){var S=null;E.isInverse()?S=E.isFgDefault()?l._colors.foreground.css:E.isFgRGB()?"rgb("+u.AttributeData.toColorRGB(E.getFgColor()).join(",")+")":l._colors.ansi[E.getFgColor()].css:E.isBgRGB()?S="rgb("+u.AttributeData.toColorRGB(E.getBgColor()).join(",")+")":E.isBgPalette()&&(S=l._colors.ansi[E.getBgColor()].css),x===null&&(y=C,g=m),m!==g?(c.fillStyle=x||"",l._fillCells(y,g,v-y,1),y=C,g=m):x!==S&&(c.fillStyle=x||"",l._fillCells(y,g,C-y,1),y=C,g=m),x=S}),x!==null&&(c.fillStyle=x,this._fillCells(y,g,v-y,1)),c.restore()},f.prototype._drawForeground=function(e,i){var l=this;this._forEachCell(e,i,this._characterJoinerRegistry,function(c,v,y){if(!c.isInvisible()&&(l._drawChars(c,v,y),c.isUnderline())){if(l._ctx.save(),c.isInverse())if(c.isBgDefault())l._ctx.fillStyle=l._colors.background.css;else if(c.isBgRGB())l._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(c.getBgColor()).join(",")+")";else{var g=c.getBgColor();l._optionsService.options.drawBoldTextInBrightColors&&c.isBold()&&g<8&&(g+=8),l._ctx.fillStyle=l._colors.ansi[g].css}else if(c.isFgDefault())l._ctx.fillStyle=l._colors.foreground.css;else if(c.isFgRGB())l._ctx.fillStyle="rgb("+u.AttributeData.toColorRGB(c.getFgColor()).join(",")+")";else{var x=c.getFgColor();l._optionsService.options.drawBoldTextInBrightColors&&c.isBold()&&x<8&&(x+=8),l._ctx.fillStyle=l._colors.ansi[x].css}l._fillBottomLineAtCells(v,y,c.getWidth()),l._ctx.restore()}})},f.prototype.onGridChanged=function(e,i){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,i-e+1),this._drawBackground(e,i),this._drawForeground(e,i))},f.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},f.prototype._isOverlapping=function(e){if(e.getWidth()!==1||e.getCode()<256)return!1;var i=e.getChars();if(this._characterOverlapCache.hasOwnProperty(i))return this._characterOverlapCache[i];this._ctx.save(),this._ctx.font=this._characterFont;var l=Math.floor(this._ctx.measureText(i).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[i]=l,l},f}(o.BaseRenderLayer);s.TextRenderLayer=a},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.GridCache=void 0;var p=function(){function b(){this.cache=[]}return b.prototype.resize=function(d,o){for(var u=0;u<d;u++){this.cache.length<=u&&this.cache.push([]);for(var h=this.cache[u].length;h<o;h++)this.cache[u].push(void 0);this.cache[u].length=o}this.cache.length=d},b.prototype.clear=function(){for(var d=0;d<this.cache.length;d++)for(var o=0;o<this.cache[d].length;o++)this.cache[d][o]=void 0},b}();s.GridCache=p},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(l,c){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])})(l,c)},function(l,c){function v(){this.constructor=l}p(l,c),l.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)});Object.defineProperty(s,"__esModule",{value:!0}),s.NoneCharAtlas=s.DynamicCharAtlas=s.getGlyphCacheKey=void 0;var d=_(9),o=_(44),u=_(27),h=_(46),r=_(11),n=_(28),a=_(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function f(l){return l.code<<21|l.bg<<12|l.fg<<3|(l.bold?0:4)+(l.dim?0:2)+(l.italic?0:1)}s.getGlyphCacheKey=f;var e=function(l){function c(v,y){var g=l.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 x=v.createElement("canvas");x.width=g._config.scaledCharWidth,x.height=g._config.scaledCharHeight,g._tmpCtx=n.throwIfFalsy(x.getContext("2d",{alpha:g._config.allowTransparency})),g._width=Math.floor(1024/g._config.scaledCharWidth),g._height=Math.floor(1024/g._config.scaledCharHeight);var E=g._width*g._height;return g._cacheMap=new h.LRUMap(E),g._cacheMap.prealloc(E),g}return b(c,l),c.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},c.prototype.beginFrame=function(){this._drawToCacheCount=0},c.prototype.draw=function(v,y,g,x){if(y.code===32)return!0;if(!this._canCache(y))return!1;var E=f(y),C=this._cacheMap.get(E);if(C!=null)return this._drawFromCache(v,C,g,x),!0;if(this._drawToCacheCount<100){var m=void 0;m=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var S=this._drawToCache(y,m);return this._cacheMap.set(E,S),this._drawFromCache(v,S,g,x),!0}return!1},c.prototype._canCache=function(v){return v.code<256},c.prototype._toCoordinateX=function(v){return v%this._width*this._config.scaledCharWidth},c.prototype._toCoordinateY=function(v){return Math.floor(v/this._width)*this._config.scaledCharHeight},c.prototype._drawFromCache=function(v,y,g,x){if(!y.isEmpty){var E=this._toCoordinateX(y.index),C=this._toCoordinateY(y.index);v.drawImage(y.inBitmap?this._bitmap:this._cacheCanvas,E,C,this._config.scaledCharWidth,this._config.scaledCharHeight,g,x,this._config.scaledCharWidth,this._config.scaledCharHeight)}},c.prototype._getColorFromAnsiIndex=function(v){return v<this._config.colors.ansi.length?this._config.colors.ansi[v]:u.DEFAULT_ANSI_COLORS[v]},c.prototype._getBackgroundColor=function(v){return this._config.allowTransparency?t:v.bg===d.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:v.bg<256?this._getColorFromAnsiIndex(v.bg):this._config.colors.background},c.prototype._getForegroundColor=function(v){return v.fg===d.INVERTED_DEFAULT_COLOR?a.color.opaque(this._config.colors.background):v.fg<256?this._getColorFromAnsiIndex(v.fg):this._config.colors.foreground},c.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 x=v.bold?this._config.fontWeightBold:this._config.fontWeight,E=v.italic?"italic":"";this._tmpCtx.font=E+" "+x+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(v).css,v.dim&&(this._tmpCtx.globalAlpha=d.DIM_OPACITY),this._tmpCtx.fillText(v.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var C=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),m=!1;this._config.allowTransparency||(m=function(F,z){for(var H=!0,q=z.rgba>>>24,K=z.rgba>>>16&255,$=z.rgba>>>8&255,R=0;R<F.data.length;R+=4)F.data[R]===q&&F.data[R+1]===K&&F.data[R+2]===$?F.data[R+3]=0:H=!1;return H}(C,g));var S=this._toCoordinateX(y),k=this._toCoordinateY(y);this._cacheCtx.putImageData(C,S,k);var O={index:y,isEmpty:m,inBitmap:!1};return this._addGlyphToBitmap(O),O},c.prototype._addGlyphToBitmap=function(v){var y=this;!("createImageBitmap"in window)||r.isFirefox||r.isSafari||(this._glyphsWaitingOnBitmap.push(v),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return y._generateBitmap()},100)))},c.prototype._generateBitmap=function(){var v=this,y=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(g){v._bitmap=g;for(var x=0;x<y.length;x++)y[x].inBitmap=!0}),this._bitmapCommitTimeout=null},c}(o.BaseCharAtlas);s.DynamicCharAtlas=e;var i=function(l){function c(v,y){return l.call(this)||this}return b(c,l),c.prototype.draw=function(v,y,g,x){return!1},c}(o.BaseCharAtlas);s.NoneCharAtlas=i},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.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}();s.BaseCharAtlas=p},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.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(d,o,u){this._rgba[d]||(this._rgba[d]={}),this._rgba[d][o]=u},b.prototype.getCss=function(d,o){return this._rgba[d]?this._rgba[d][o]:void 0},b.prototype.setColor=function(d,o,u){this._color[d]||(this._color[d]={}),this._color[d][o]=u},b.prototype.getColor=function(d,o){return this._color[d]?this._color[d][o]:void 0},b}();s.ColorContrastCache=p},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.LRUMap=void 0;var p=function(){function b(d){this.capacity=d,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return b.prototype._unlinkNode=function(d){var o=d.prev,u=d.next;d===this._head&&(this._head=u),d===this._tail&&(this._tail=o),o!==null&&(o.next=u),u!==null&&(u.prev=o)},b.prototype._appendNode=function(d){var o=this._tail;o!==null&&(o.next=d),d.prev=o,d.next=null,this._tail=d,this._head===null&&(this._head=d)},b.prototype.prealloc=function(d){for(var o=this._nodePool,u=0;u<d;u++)o.push({prev:null,next:null,key:null,value:null})},b.prototype.get=function(d){var o=this._map[d];return o!==void 0?(this._unlinkNode(o),this._appendNode(o),o.value):null},b.prototype.peekValue=function(d){var o=this._map[d];return o!==void 0?o.value:null},b.prototype.peek=function(){var d=this._head;return d===null?null:d.value},b.prototype.set=function(d,o){var u=this._map[d];if(u!==void 0)u=this._map[d],this._unlinkNode(u),u.value=o;else if(this.size>=this.capacity)u=this._head,this._unlinkNode(u),delete this._map[u.key],u.key=d,u.value=o,this._map[d]=u;else{var h=this._nodePool;h.length>0?((u=h.pop()).key=d,u.value=o):u={prev:null,next:null,key:d,value:o},this._map[d]=u,this.size++}this._appendNode(u)},b}();s.LRUMap=p},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(o,u){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,r){h.__proto__=r}||function(h,r){for(var n in r)r.hasOwnProperty(n)&&(h[n]=r[n])})(o,u)},function(o,u){function h(){this.constructor=o}p(o,u),o.prototype=u===null?Object.create(u):(h.prototype=u.prototype,new h)});Object.defineProperty(s,"__esModule",{value:!0}),s.SelectionRenderLayer=void 0;var d=function(o){function u(h,r,n,a,t,f){var e=o.call(this,h,"selection",r,!0,n,a,t,f)||this;return e._clearState(),e}return b(u,o),u.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},u.prototype.resize=function(h){o.prototype.resize.call(this,h),this._clearState()},u.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},u.prototype.onSelectionChanged=function(h,r,n){if(this._didStateChange(h,r,n,this._bufferService.buffer.ydisp))if(this._clearAll(),h&&r){var a=h[1]-this._bufferService.buffer.ydisp,t=r[1]-this._bufferService.buffer.ydisp,f=Math.max(a,0),e=Math.min(t,this._bufferService.rows-1);if(!(f>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,n){var i=h[0],l=r[0]-i,c=e-f+1;this._fillCells(i,f,l,c)}else{i=a===f?h[0]:0;var v=f===e?r[0]:this._bufferService.cols;this._fillCells(i,f,v-i,1);var y=Math.max(e-f-1,0);if(this._fillCells(0,f+1,this._bufferService.cols,y),f!==e){var g=t===e?r[0]:this._bufferService.cols;this._fillCells(0,e,g,1)}}this._state.start=[h[0],h[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=n,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},u.prototype._didStateChange=function(h,r,n,a){return!this._areCoordinatesEqual(h,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||n!==this._state.columnSelectMode||a!==this._state.ydisp},u.prototype._areCoordinatesEqual=function(h,r){return!(!h||!r)&&h[0]===r[0]&&h[1]===r[1]},u}(_(13).BaseRenderLayer);s.SelectionRenderLayer=d},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(r,n){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var f in t)t.hasOwnProperty(f)&&(a[f]=t[f])})(r,n)},function(r,n){function a(){this.constructor=r}p(r,n),r.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)});Object.defineProperty(s,"__esModule",{value:!0}),s.CursorRenderLayer=void 0;var d=_(13),o=_(4),u=function(r){function n(a,t,f,e,i,l,c,v,y){var g=r.call(this,a,"cursor",t,!0,f,e,l,c)||this;return g._onRequestRedraw=i,g._coreService=v,g._coreBrowserService=y,g._cell=new o.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,r),n.prototype.resize=function(a){r.prototype.resize.call(this,a),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 a,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new h(this._coreBrowserService.isFocused,function(){t._render(!0)})):((a=this._cursorBlinkStateManager)===null||a===void 0||a.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype.onGridChanged=function(a,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype._render=function(a){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,f=t-this._bufferService.buffer.ydisp;if(f<0||f>=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 i=this._optionsService.options.cursorStyle;return i&&i!=="block"?this._cursorRenderers[i](e,f,this._cell):this._renderBlurCursor(e,f,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=f,this._state.isFocused=!1,this._state.style=i,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===f&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](e,f,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=f,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},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(a,t,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(a,t,this._optionsService.options.cursorWidth),this._ctx.restore()},n.prototype._renderBlockCursor=function(a,t,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(a,t,f.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(f,a,t),this._ctx.restore()},n.prototype._renderUnderlineCursor=function(a,t,f){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(a,t),this._ctx.restore()},n.prototype._renderBlurCursor=function(a,t,f){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(a,t,f.getWidth(),1),this._ctx.restore()},n}(d.BaseRenderLayer);s.CursorRenderLayer=u;var h=function(){function r(n,a){this._renderCallback=a,this.isCursorVisible=!0,n&&this._restartInterval()}return Object.defineProperty(r.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},r.prototype.restartBlinkAnimation=function(){var n=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){n._renderCallback(),n._animationFrame=void 0})))},r.prototype._restartInterval=function(n){var a=this;n===void 0&&(n=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(a._animationTimeRestarted){var t=600-(Date.now()-a._animationTimeRestarted);if(a._animationTimeRestarted=void 0,t>0)return void a._restartInterval(t)}a.isCursorVisible=!1,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0}),a._blinkInterval=window.setInterval(function(){if(a._animationTimeRestarted){var f=600-(Date.now()-a._animationTimeRestarted);return a._animationTimeRestarted=void 0,void a._restartInterval(f)}a.isCursorVisible=!a.isCursorVisible,a._animationFrame=window.requestAnimationFrame(function(){a._renderCallback(),a._animationFrame=void 0})},600)},n)},r.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},r.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},r}()},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(r,n){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,t){a.__proto__=t}||function(a,t){for(var f in t)t.hasOwnProperty(f)&&(a[f]=t[f])})(r,n)},function(r,n){function a(){this.constructor=r}p(r,n),r.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)});Object.defineProperty(s,"__esModule",{value:!0}),s.LinkRenderLayer=void 0;var d=_(13),o=_(9),u=_(26),h=function(r){function n(a,t,f,e,i,l,c,v){var y=r.call(this,a,"link",t,!0,f,e,c,v)||this;return i.onShowLinkUnderline(function(g){return y._onShowLinkUnderline(g)}),i.onHideLinkUnderline(function(g){return y._onHideLinkUnderline(g)}),l.onShowLinkUnderline(function(g){return y._onShowLinkUnderline(g)}),l.onHideLinkUnderline(function(g){return y._onHideLinkUnderline(g)}),y}return b(n,r),n.prototype.resize=function(a){r.prototype.resize.call(this,a),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 a=this._state.y2-this._state.y1-1;a>0&&this._clearCells(0,this._state.y1+1,this._state.cols,a),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},n.prototype._onShowLinkUnderline=function(a){if(a.fg===o.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:a.fg&&u.is256Color(a.fg)?this._ctx.fillStyle=this._colors.ansi[a.fg].css:this._ctx.fillStyle=this._colors.foreground.css,a.y1===a.y2)this._fillBottomLineAtCells(a.x1,a.y1,a.x2-a.x1);else{this._fillBottomLineAtCells(a.x1,a.y1,a.cols-a.x1);for(var t=a.y1+1;t<a.y2;t++)this._fillBottomLineAtCells(0,t,a.cols);this._fillBottomLineAtCells(0,a.y2,a.x2)}this._state=a},n.prototype._onHideLinkUnderline=function(a){this._clearCurrentLink()},n}(d.BaseRenderLayer);s.LinkRenderLayer=h},function(D,s,_){"use strict";var p=this&&this.__decorate||function(r,n,a,t){var f,e=arguments.length,i=e<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,n,a,t);else for(var l=r.length-1;l>=0;l--)(f=r[l])&&(i=(e<3?f(i):e>3?f(n,a,i):f(n,a))||i);return e>3&&i&&Object.defineProperty(n,a,i),i},b=this&&this.__param||function(r,n){return function(a,t){n(a,t,r)}};Object.defineProperty(s,"__esModule",{value:!0}),s.MouseZone=s.Linkifier=void 0;var d=_(0),o=_(1),u=function(){function r(n,a,t){this._bufferService=n,this._logService=a,this._unicodeService=t,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new d.EventEmitter,this._onHideLinkUnderline=new d.EventEmitter,this._onLinkTooltip=new d.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(r.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),r.prototype.attachToDom=function(n,a){this._element=n,this._mouseZoneManager=a},r.prototype.linkifyRows=function(n,a){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=n,this._rowsToLinkify.end=a):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,n),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,a)),this._mouseZoneManager.clearAll(n,a),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},r._timeBeforeLatency))},r.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var n=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var a=n.ydisp+this._rowsToLinkify.start;if(!(a>=n.lines.length)){for(var t=n.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,f=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,a,t,f,f);e.hasNext();)for(var i=e.next(),l=0;l<this._linkMatchers.length;l++)this._doLinkifyRow(i.range.first,i.content,this._linkMatchers[l]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},r.prototype.registerLinkMatcher=function(n,a,t){if(t===void 0&&(t={}),!a)throw new Error("handler must be defined");var f={id:this._nextLinkMatcherId++,regex:n,handler:a,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(f),f.id},r.prototype._addLinkMatcherToList=function(n){if(this._linkMatchers.length!==0){for(var a=this._linkMatchers.length-1;a>=0;a--)if(n.priority<=this._linkMatchers[a].priority)return void this._linkMatchers.splice(a+1,0,n);this._linkMatchers.splice(0,0,n)}else this._linkMatchers.push(n)},r.prototype.deregisterLinkMatcher=function(n){for(var a=0;a<this._linkMatchers.length;a++)if(this._linkMatchers[a].id===n)return this._linkMatchers.splice(a,1),!0;return!1},r.prototype._doLinkifyRow=function(n,a,t){for(var f,e=this,i=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),l=-1,c=function(){var y=f[typeof t.matchIndex!="number"?0:t.matchIndex];if(!y)return v._logService.debug("match found without corresponding matchIndex",f,t),"break";if(l=a.indexOf(y,l+1),i.lastIndex=l+y.length,l<0)return"break";var g=v._bufferService.buffer.stringIndexToBufferIndex(n,l);if(g[0]<0)return"break";var x=v._bufferService.buffer.lines.get(g[0]);if(!x)return"break";var E=x.getFg(g[1]),C=E?E>>9&511:void 0;t.validationCallback?t.validationCallback(y,function(m){e._rowsTimeoutId||m&&e._addLink(g[1],g[0]-e._bufferService.buffer.ydisp,y,t,C)}):v._addLink(g[1],g[0]-v._bufferService.buffer.ydisp,y,t,C)},v=this;(f=i.exec(a))!==null&&c()!=="break";);},r.prototype._addLink=function(n,a,t,f,e){var i=this;if(this._mouseZoneManager&&this._element){var l=this._unicodeService.getStringCellWidth(t),c=n%this._bufferService.cols,v=a+Math.floor(n/this._bufferService.cols),y=(c+l)%this._bufferService.cols,g=v+Math.floor((c+l)/this._bufferService.cols);y===0&&(y=this._bufferService.cols,g--),this._mouseZoneManager.add(new h(c+1,v+1,y+1,g+1,function(x){if(f.handler)return f.handler(x,t);var E=window.open();E?(E.opener=null,E.location.href=t):console.warn("Opening link blocked as opener could not be cleared")},function(){i._onShowLinkUnderline.fire(i._createLinkHoverEvent(c,v,y,g,e)),i._element.classList.add("xterm-cursor-pointer")},function(x){i._onLinkTooltip.fire(i._createLinkHoverEvent(c,v,y,g,e)),f.hoverTooltipCallback&&f.hoverTooltipCallback(x,t,{start:{x:c,y:v},end:{x:y,y:g}})},function(){i._onHideLinkUnderline.fire(i._createLinkHoverEvent(c,v,y,g,e)),i._element.classList.remove("xterm-cursor-pointer"),f.hoverLeaveCallback&&f.hoverLeaveCallback()},function(x){return!f.willLinkActivate||f.willLinkActivate(x,t)}))}},r.prototype._createLinkHoverEvent=function(n,a,t,f,e){return{x1:n,y1:a,x2:t,y2:f,cols:this._bufferService.cols,fg:e}},r._timeBeforeLatency=200,r=p([b(0,o.IBufferService),b(1,o.ILogService),b(2,o.IUnicodeService)],r)}();s.Linkifier=u;var h=function(r,n,a,t,f,e,i,l,c){this.x1=r,this.y1=n,this.x2=a,this.y2=t,this.clickCallback=f,this.hoverCallback=e,this.tooltipCallback=i,this.leaveCallback=l,this.willLinkActivate=c};s.MouseZone=h},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(y,g){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,E){x.__proto__=E}||function(x,E){for(var C in E)E.hasOwnProperty(C)&&(x[C]=E[C])})(y,g)},function(y,g){function x(){this.constructor=y}p(y,g),y.prototype=g===null?Object.create(g):(x.prototype=g.prototype,new x)}),d=this&&this.__decorate||function(y,g,x,E){var C,m=arguments.length,S=m<3?g:E===null?E=Object.getOwnPropertyDescriptor(g,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,g,x,E);else for(var k=y.length-1;k>=0;k--)(C=y[k])&&(S=(m<3?C(S):m>3?C(g,x,S):C(g,x))||S);return m>3&&S&&Object.defineProperty(g,x,S),S},o=this&&this.__param||function(y,g){return function(x,E){g(x,E,y)}};Object.defineProperty(s,"__esModule",{value:!0}),s.SelectionService=void 0;var u=_(11),h=_(52),r=_(4),n=_(0),a=_(5),t=_(1),f=_(30),e=_(53),i=_(2),l="\xA0",c=new RegExp(l,"g"),v=function(y){function g(x,E,C,m,S,k,O){var F=y.call(this)||this;return F._element=x,F._screenElement=E,F._bufferService=C,F._coreService=m,F._mouseService=S,F._optionsService=k,F._renderService=O,F._dragScrollAmount=0,F._enabled=!0,F._workCell=new r.CellData,F._mouseDownTimeStamp=0,F._onLinuxMouseSelection=F.register(new n.EventEmitter),F._onRedrawRequest=F.register(new n.EventEmitter),F._onSelectionChange=F.register(new n.EventEmitter),F._onRequestScrollLines=F.register(new n.EventEmitter),F._mouseMoveListener=function(z){return F._onMouseMove(z)},F._mouseUpListener=function(z){return F._onMouseUp(z)},F._coreService.onUserInput(function(){F.hasSelection&&F.clearSelection()}),F._trimListener=F._bufferService.buffer.lines.onTrim(function(z){return F._onTrim(z)}),F.register(F._bufferService.buffers.onBufferActivate(function(z){return F._onBufferActivate(z)})),F.enable(),F._model=new h.SelectionModel(F._bufferService),F._activeSelectionMode=0,F}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 x=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!(!x||!E)&&(x[0]!==E[0]||x[1]!==E[1])},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"selectionText",{get:function(){var x=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!x||!E)return"";var C=this._bufferService.buffer,m=[];if(this._activeSelectionMode===3){if(x[0]===E[0])return"";for(var S=x[1];S<=E[1];S++){var k=C.translateBufferLineToString(S,!0,x[0],E[0]);m.push(k)}}else{var O=x[1]===E[1]?E[0]:void 0;for(m.push(C.translateBufferLineToString(x[1],!0,x[0],O)),S=x[1]+1;S<=E[1]-1;S++){var F=C.lines.get(S);k=C.translateBufferLineToString(S,!0),F&&F.isWrapped?m[m.length-1]+=k:m.push(k)}x[1]!==E[1]&&(F=C.lines.get(E[1]),k=C.translateBufferLineToString(E[1],!0,0,E[0]),F&&F.isWrapped?m[m.length-1]+=k:m.push(k))}return m.map(function(z){return z.replace(c," ")}).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(x){var E=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return E._refresh()})),u.isLinux&&x&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},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(x){var E=this._getMouseBufferCoords(x),C=this._model.finalSelectionStart,m=this._model.finalSelectionEnd;return!!(C&&m&&E)&&this._areCoordsInSelection(E,C,m)},g.prototype._areCoordsInSelection=function(x,E,C){return x[1]>E[1]&&x[1]<C[1]||E[1]===C[1]&&x[1]===E[1]&&x[0]>=E[0]&&x[0]<C[0]||E[1]<C[1]&&x[1]===C[1]&&x[0]<C[0]||E[1]<C[1]&&x[1]===E[1]&&x[0]>=E[0]},g.prototype.selectWordAtCursor=function(x){var E=this._getMouseBufferCoords(x);E&&(this._selectWordAt(E,!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(x,E){this._model.clearSelection(),x=Math.max(x,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,x],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()},g.prototype._onTrim=function(x){this._model.onTrim(x)&&this.refresh()},g.prototype._getMouseBufferCoords=function(x){var E=this._mouseService.getCoords(x,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E},g.prototype._getMouseEventScrollAmount=function(x){var E=f.getCoordsRelativeToElement(x,this._screenElement)[1],C=this._renderService.dimensions.canvasHeight;return E>=0&&E<=C?0:(E>C&&(E-=C),E=Math.min(Math.max(E,-50),50),(E/=50)/Math.abs(E)+Math.round(14*E))},g.prototype.shouldForceSelection=function(x){return u.isMac?x.altKey&&this._optionsService.options.macOptionClickForcesSelection:x.shiftKey},g.prototype.onMouseDown=function(x){if(this._mouseDownTimeStamp=x.timeStamp,(x.button!==2||!this.hasSelection)&&x.button===0){if(!this._enabled){if(!this.shouldForceSelection(x))return;x.stopPropagation()}x.preventDefault(),this._dragScrollAmount=0,this._enabled&&x.shiftKey?this._onIncrementalClick(x):x.detail===1?this._onSingleClick(x):x.detail===2?this._onDoubleClick(x):x.detail===3&&this._onTripleClick(x),this._addMouseDownListeners(),this.refresh(!0)}},g.prototype._addMouseDownListeners=function(){var x=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return x._dragScroll()},50)},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(x){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(x))},g.prototype._onSingleClick=function(x){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(x)?3:0,this._model.selectionStart=this._getMouseBufferCoords(x),this._model.selectionStart){this._model.selectionEnd=void 0;var E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},g.prototype._onDoubleClick=function(x){var E=this._getMouseBufferCoords(x);E&&(this._activeSelectionMode=1,this._selectWordAt(E,!0))},g.prototype._onTripleClick=function(x){var E=this._getMouseBufferCoords(x);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))},g.prototype.shouldColumnSelect=function(x){return x.altKey&&!(u.isMac&&this._optionsService.options.macOptionClickForcesSelection)},g.prototype._onMouseMove=function(x){if(x.stopImmediatePropagation(),this._model.selectionStart){var E=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(x),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(x),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var C=this._bufferService.buffer;if(this._model.selectionEnd[1]<C.lines.length){var m=C.lines.get(this._model.selectionEnd[1]);m&&m.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},g.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var x=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(x.ydisp+this._bufferService.rows,x.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=x.ydisp),this.refresh()}},g.prototype._onMouseUp=function(x){var E=x.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&x.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var C=this._mouseService.getCoords(x,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(C&&C[0]!==void 0&&C[1]!==void 0){var m=e.moveToCellSequence(C[0]-1,C[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(m,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},g.prototype._onBufferActivate=function(x){var E=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=x.activeBuffer.lines.onTrim(function(C){return E._onTrim(C)})},g.prototype._convertViewportColToCharacterIndex=function(x,E){for(var C=E[0],m=0;E[0]>=m;m++){var S=x.loadCell(m,this._workCell).getChars().length;this._workCell.getWidth()===0?C--:S>1&&E[0]!==m&&(C+=S-1)}return C},g.prototype.setSelection=function(x,E,C){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[x,E],this._model.selectionStartLength=C,this.refresh()},g.prototype._getWordAt=function(x,E,C,m){if(C===void 0&&(C=!0),m===void 0&&(m=!0),!(x[0]>=this._bufferService.cols)){var S=this._bufferService.buffer,k=S.lines.get(x[1]);if(k){var O=S.translateBufferLineToString(x[1],!1),F=this._convertViewportColToCharacterIndex(k,x),z=F,H=x[0]-F,q=0,K=0,$=0,R=0;if(O.charAt(F)===" "){for(;F>0&&O.charAt(F-1)===" ";)F--;for(;z<O.length&&O.charAt(z+1)===" ";)z++}else{var X=x[0],I=x[0];k.getWidth(X)===0&&(q++,X--),k.getWidth(I)===2&&(K++,I++);var W=k.getString(I).length;for(W>1&&(R+=W-1,z+=W-1);X>0&&F>0&&!this._isCharWordSeparator(k.loadCell(X-1,this._workCell));){k.loadCell(X-1,this._workCell);var B=this._workCell.getChars().length;this._workCell.getWidth()===0?(q++,X--):B>1&&($+=B-1,F-=B-1),F--,X--}for(;I<k.length&&z+1<O.length&&!this._isCharWordSeparator(k.loadCell(I+1,this._workCell));){k.loadCell(I+1,this._workCell);var G=this._workCell.getChars().length;this._workCell.getWidth()===2?(K++,I++):G>1&&(R+=G-1,z+=G-1),z++,I++}}z++;var fe=F+H-q+$,xe=Math.min(this._bufferService.cols,z-F+q+K-$-R);if(E||O.slice(F,z).trim()!==""){if(C&&fe===0&&k.getCodePoint(0)!==32){var Le=S.lines.get(x[1]-1);if(Le&&k.isWrapped&&Le.getCodePoint(this._bufferService.cols-1)!==32){var ke=this._getWordAt([this._bufferService.cols-1,x[1]-1],!1,!0,!1);if(ke){var ae=this._bufferService.cols-ke.start;fe-=ae,xe+=ae}}}if(m&&fe+xe===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){var ge=S.lines.get(x[1]+1);if(ge&&ge.isWrapped&&ge.getCodePoint(0)!==32){var Fe=this._getWordAt([0,x[1]+1],!1,!1,!0);Fe&&(xe+=Fe.length)}}return{start:fe,length:xe}}}}},g.prototype._selectWordAt=function(x,E){var C=this._getWordAt(x,E);if(C){for(;C.start<0;)C.start+=this._bufferService.cols,x[1]--;this._model.selectionStart=[C.start,x[1]],this._model.selectionStartLength=C.length}},g.prototype._selectToWordAt=function(x){var E=this._getWordAt(x,!0);if(E){for(var C=x[1];E.start<0;)E.start+=this._bufferService.cols,C--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,C++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,C]}},g.prototype._isCharWordSeparator=function(x){return x.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(x.getChars())>=0},g.prototype._selectLineAt=function(x){var E=this._bufferService.buffer.getWrappedRangeForLine(x);this._model.selectionStart=[0,E.first],this._model.selectionEnd=[this._bufferService.cols,E.last],this._model.selectionStartLength=0},g=d([o(2,t.IBufferService),o(3,t.ICoreService),o(4,a.IMouseService),o(5,t.IOptionsService),o(6,a.IRenderService)],g)}(i.Disposable);s.SelectionService=v},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SelectionModel=void 0;var p=function(){function b(d){this._bufferService=d,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 d=this.selectionStart[0]+this.selectionStartLength;return d>this._bufferService.cols?[d%this._bufferService.cols,this.selectionStart[1]+Math.floor(d/this._bufferService.cols)]:[d,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 d=this.selectionStart,o=this.selectionEnd;return!(!d||!o)&&(d[1]>o[1]||d[1]===o[1]&&d[0]>o[0])},b.prototype.onTrim=function(d){return this.selectionStart&&(this.selectionStart[1]-=d),this.selectionEnd&&(this.selectionEnd[1]-=d),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},b}();s.SelectionModel=p},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.moveToCellSequence=void 0;var p=_(12);function b(n,a,t,f){var e=n-d(t,n),i=a-d(t,a);return r(Math.abs(e-i)-function(l,c,v){for(var y=0,g=l-d(v,l),x=c-d(v,c),E=0;E<Math.abs(g-x);E++){var C=o(l,c)==="A"?-1:1,m=v.buffer.lines.get(g+C*E);m&&m.isWrapped&&y++}return y}(n,a,t),h(o(n,a),f))}function d(n,a){for(var t=0,f=n.buffer.lines.get(a),e=f&&f.isWrapped;e&&a>=0&&a<n.rows;)t++,e=(f=n.buffer.lines.get(--a))&&f.isWrapped;return t}function o(n,a){return n>a?"A":"B"}function u(n,a,t,f,e,i){for(var l=n,c=a,v="";l!==t||c!==f;)l+=e?1:-1,e&&l>i.cols-1?(v+=i.buffer.translateBufferLineToString(c,!1,n,l),l=0,n=0,c++):!e&&l<0&&(v+=i.buffer.translateBufferLineToString(c,!1,0,n+1),n=l=i.cols-1,c--);return v+i.buffer.translateBufferLineToString(c,!1,n,l)}function h(n,a){var t=a?"O":"[";return p.C0.ESC+t+n}function r(n,a){n=Math.floor(n);for(var t="",f=0;f<n;f++)t+=a;return t}s.moveToCellSequence=function(n,a,t,f){var e,i=t.buffer.x,l=t.buffer.y;if(!t.buffer.hasScrollback)return function(v,y,g,x,E,C){return b(y,x,E,C).length===0?"":r(u(v,y,v,y-d(E,y),!1,E).length,h("D",C))}(i,l,0,a,t,f)+b(l,a,t,f)+function(v,y,g,x,E,C){var m;m=b(y,x,E,C).length>0?x-d(E,x):y;var S=x,k=function(O,F,z,H,q,K){var $;return $=b(z,H,q,K).length>0?H-d(q,H):F,O<z&&$<=H||O>=z&&$<H?"C":"D"}(v,y,g,x,E,C);return r(u(v,m,g,S,k==="C",E).length,h(k,C))}(i,l,n,a,t,f);if(l===a)return e=i>n?"D":"C",r(Math.abs(i-n),h(e,f));e=l>a?"D":"C";var c=Math.abs(l-a);return r(function(v,y){return y.cols-v}(l>a?n:i,t)+(c-1)*t.cols+1+((l>a?i:n)-1),h(e,f))}},function(D,s,_){"use strict";var p=this&&this.__decorate||function(u,h,r,n){var a,t=arguments.length,f=t<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,h,r,n);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(f=(t<3?a(f):t>3?a(h,r,f):a(h,r))||f);return t>3&&f&&Object.defineProperty(h,r,f),f},b=this&&this.__param||function(u,h){return function(r,n){h(r,n,u)}};Object.defineProperty(s,"__esModule",{value:!0}),s.SoundService=void 0;var d=_(1),o=function(){function u(h){this._optionsService=h}return Object.defineProperty(u,"audioContext",{get:function(){if(!u._audioContext){var h=window.AudioContext||window.webkitAudioContext;if(!h)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;u._audioContext=new h}return u._audioContext},enumerable:!1,configurable:!0}),u.prototype.playBellSound=function(){var h=u.audioContext;if(h){var r=h.createBufferSource();h.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(n){r.buffer=n,r.connect(h.destination),r.start(0)})}},u.prototype._base64ToArrayBuffer=function(h){for(var r=window.atob(h),n=r.length,a=new Uint8Array(n),t=0;t<n;t++)a[t]=r.charCodeAt(t);return a.buffer},u.prototype._removeMimeType=function(h){return h.split(",")[1]},u=p([b(0,d.IOptionsService)],u)}();s.SoundService=o},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(t,f){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var l in i)i.hasOwnProperty(l)&&(e[l]=i[l])})(t,f)},function(t,f){function e(){this.constructor=t}p(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),d=this&&this.__decorate||function(t,f,e,i){var l,c=arguments.length,v=c<3?f:i===null?i=Object.getOwnPropertyDescriptor(f,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,f,e,i);else for(var y=t.length-1;y>=0;y--)(l=t[y])&&(v=(c<3?l(v):c>3?l(f,e,v):l(f,e))||v);return c>3&&v&&Object.defineProperty(f,e,v),v},o=this&&this.__param||function(t,f){return function(e,i){f(e,i,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.MouseZoneManager=void 0;var u=_(2),h=_(7),r=_(5),n=_(1),a=function(t){function f(e,i,l,c,v,y){var g=t.call(this)||this;return g._element=e,g._screenElement=i,g._bufferService=l,g._mouseService=c,g._selectionService=v,g._optionsService=y,g._zones=[],g._areZonesActive=!1,g._lastHoverCoords=[void 0,void 0],g._initialSelectionLength=0,g.register(h.addDisposableDomListener(g._element,"mousedown",function(x){return g._onMouseDown(x)})),g._mouseMoveListener=function(x){return g._onMouseMove(x)},g._mouseLeaveListener=function(x){return g._onMouseLeave(x)},g._clickListener=function(x){return g._onClick(x)},g}return b(f,t),f.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},f.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},f.prototype.clearAll=function(e,i){if(this._zones.length!==0){e&&i||(e=0,i=this._bufferService.rows-1);for(var l=0;l<this._zones.length;l++){var c=this._zones[l];(c.y1>e&&c.y1<=i+1||c.y2>e&&c.y2<=i+1||c.y1<e&&c.y2>i+1)&&(this._currentZone&&this._currentZone===c&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(l--,1))}this._zones.length===0&&this._deactivate()}},f.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},f.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},f.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},f.prototype._onHover=function(e){var i=this,l=this._findZoneEventAt(e);l!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),l&&(this._currentZone=l,l.hoverCallback&&l.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return i._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},f.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var i=this._findZoneEventAt(e);i&&i.tooltipCallback&&i.tooltipCallback(e)},f.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var i=this._findZoneEventAt(e);i!=null&&i.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())}},f.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},f.prototype._onClick=function(e){var i=this._findZoneEventAt(e),l=this._getSelectionLength();i&&l===this._initialSelectionLength&&(i.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},f.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},f.prototype._findZoneEventAt=function(e){var i=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(i)for(var l=i[0],c=i[1],v=0;v<this._zones.length;v++){var y=this._zones[v];if(y.y1===y.y2){if(c===y.y1&&l>=y.x1&&l<y.x2)return y}else if(c===y.y1&&l>=y.x1||c===y.y2&&l<y.x2||c>y.y1&&c<y.y2)return y}},f=d([o(2,n.IBufferService),o(3,r.IMouseService),o(4,r.ISelectionService),o(5,n.IOptionsService)],f)}(u.Disposable);s.MouseZoneManager=a},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(f,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var c in l)l.hasOwnProperty(c)&&(i[c]=l[c])})(f,e)},function(f,e){function i(){this.constructor=f}p(f,e),f.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;var d=_(18),o=_(11),u=_(31),h=_(7),r=_(2),n=_(32),a=_(17),t=function(f){function e(i,l){var c=f.call(this)||this;c._terminal=i,c._renderService=l,c._liveRegionLineCount=0,c._charsToConsume=[],c._charsToAnnounce="",c._accessibilityTreeRoot=document.createElement("div"),c._accessibilityTreeRoot.classList.add("xterm-accessibility"),c._rowContainer=document.createElement("div"),c._rowContainer.classList.add("xterm-accessibility-tree"),c._rowContainer.setAttribute("role","list"),c._rowElements=[];for(var v=0;v<c._terminal.rows;v++)c._rowElements[v]=c._createAccessibilityTreeNode(),c._rowContainer.appendChild(c._rowElements[v]);if(c._topBoundaryFocusListener=function(y){return c._onBoundaryFocus(y,0)},c._bottomBoundaryFocusListener=function(y){return c._onBoundaryFocus(y,1)},c._rowElements[0].addEventListener("focus",c._topBoundaryFocusListener),c._rowElements[c._rowElements.length-1].addEventListener("focus",c._bottomBoundaryFocusListener),c._refreshRowsDimensions(),c._accessibilityTreeRoot.appendChild(c._rowContainer),c._renderRowsDebouncer=new u.RenderDebouncer(c._renderRows.bind(c)),c._refreshRows(),c._liveRegion=document.createElement("div"),c._liveRegion.classList.add("live-region"),c._liveRegion.setAttribute("aria-live","assertive"),c._accessibilityTreeRoot.appendChild(c._liveRegion),!c._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return c._terminal.element.insertAdjacentElement("afterbegin",c._accessibilityTreeRoot),c.register(c._renderRowsDebouncer),c.register(c._terminal.onResize(function(y){return c._onResize(y.rows)})),c.register(c._terminal.onRender(function(y){return c._refreshRows(y.start,y.end)})),c.register(c._terminal.onScroll(function(){return c._refreshRows()})),c.register(c._terminal.onA11yChar(function(y){return c._onChar(y)})),c.register(c._terminal.onLineFeed(function(){return c._onChar(`
`)})),c.register(c._terminal.onA11yTab(function(y){return c._onTab(y)})),c.register(c._terminal.onKey(function(y){return c._onKey(y.key)})),c.register(c._terminal.onBlur(function(){return c._clearLiveRegion()})),c.register(c._renderService.onDimensionsChange(function(){return c._refreshRowsDimensions()})),c._screenDprMonitor=new n.ScreenDprMonitor,c.register(c._screenDprMonitor),c._screenDprMonitor.setListener(function(){return c._refreshRowsDimensions()}),c.register(h.addDisposableDomListener(window,"resize",function(){return c._refreshRowsDimensions()})),c}return b(e,f),e.prototype.dispose=function(){f.prototype.dispose.call(this),a.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(i,l){var c=i.target,v=this._rowElements[l===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")!==(l===0?"1":""+this._terminal.buffer.lines.length)&&i.relatedTarget===v){var y,g;if(l===0?(y=c,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(y=this._rowElements.shift(),g=c,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){var x=this._createAccessibilityTreeNode();this._rowElements.unshift(x),this._rowContainer.insertAdjacentElement("afterbegin",x)}else x=this._createAccessibilityTreeNode(),this._rowElements.push(x),this._rowContainer.appendChild(x);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}},e.prototype._onResize=function(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i},e.prototype._onTab=function(i){for(var l=0;l<i;l++)this._onChar(" ")},e.prototype._onChar=function(i){var l=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),o.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){l._accessibilityTreeRoot.appendChild(l._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,o.isMac&&a.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(i){this._clearLiveRegion(),this._charsToConsume.push(i)},e.prototype._refreshRows=function(i,l){this._renderRowsDebouncer.refresh(i,l,this._terminal.rows)},e.prototype._renderRows=function(i,l){for(var c=this._terminal.buffer,v=c.lines.length.toString(),y=i;y<=l;y++){var g=c.translateBufferLineToString(c.ydisp+y,!0),x=(c.ydisp+y+1).toString(),E=this._rowElements[y];E&&(g.length===0?E.innerHTML="&nbsp;":E.textContent=g,E.setAttribute("aria-posinset",x),E.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 i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}},e.prototype._refreshRowDimensions=function(i){i.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(r.Disposable);s.AccessibilityManager=t},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(c,v){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,g){y.__proto__=g}||function(y,g){for(var x in g)g.hasOwnProperty(x)&&(y[x]=g[x])})(c,v)},function(c,v){function y(){this.constructor=c}p(c,v),c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}),d=this&&this.__decorate||function(c,v,y,g){var x,E=arguments.length,C=E<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,y):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(c,v,y,g);else for(var m=c.length-1;m>=0;m--)(x=c[m])&&(C=(E<3?x(C):E>3?x(v,y,C):x(v,y))||C);return E>3&&C&&Object.defineProperty(v,y,C),C},o=this&&this.__param||function(c,v){return function(y,g){v(y,g,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.DomRenderer=void 0;var u=_(58),h=_(9),r=_(2),n=_(5),a=_(1),t=_(0),f=_(10),e=_(17),i=1,l=function(c){function v(y,g,x,E,C,m,S,k,O){var F=c.call(this)||this;return F._colors=y,F._element=g,F._screenElement=x,F._viewportElement=E,F._linkifier=C,F._linkifier2=m,F._charSizeService=S,F._optionsService=k,F._bufferService=O,F._terminalClass=i++,F._rowElements=[],F._rowContainer=document.createElement("div"),F._rowContainer.classList.add("xterm-rows"),F._rowContainer.style.lineHeight="normal",F._rowContainer.setAttribute("aria-hidden","true"),F._refreshRowElements(F._bufferService.cols,F._bufferService.rows),F._selectionContainer=document.createElement("div"),F._selectionContainer.classList.add("xterm-selection"),F._selectionContainer.setAttribute("aria-hidden","true"),F.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},F._updateDimensions(),F._injectCss(),F._rowFactory=new u.DomRendererRowFactory(document,F._optionsService,F._colors),F._element.classList.add("xterm-dom-renderer-owner-"+F._terminalClass),F._screenElement.appendChild(F._rowContainer),F._screenElement.appendChild(F._selectionContainer),F._linkifier.onShowLinkUnderline(function(z){return F._onLinkHover(z)}),F._linkifier.onHideLinkUnderline(function(z){return F._onLinkLeave(z)}),F._linkifier2.onShowLinkUnderline(function(z){return F._onLinkHover(z)}),F._linkifier2.onHideLinkUnderline(function(z){return F._onLinkLeave(z)}),F}return b(v,c),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),c.prototype.dispose.call(this)},v.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var y=0,g=this._rowElements;y<g.length;y++){var x=g[y];x.style.width=this.dimensions.canvasWidth+"px",x.style.height=this.dimensions.actualCellHeight+"px",x.style.lineHeight=this.dimensions.actualCellHeight+"px",x.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var E=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=E,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},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(x,E){g+=y._terminalSelector+" .xterm-fg-"+E+" { color: "+x.css+"; }"+y._terminalSelector+" .xterm-bg-"+E+" { background-color: "+x.css+"; }"}),g+=this._terminalSelector+" .xterm-fg-"+h.INVERTED_DEFAULT_COLOR+" { color: "+f.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+h.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 x=this._rowElements.length;x<=g;x++){var E=document.createElement("div");this._rowContainer.appendChild(E),this._rowElements.push(E)}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,x){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(y&&g){var E=y[1]-this._bufferService.buffer.ydisp,C=g[1]-this._bufferService.buffer.ydisp,m=Math.max(E,0),S=Math.min(C,this._bufferService.rows-1);if(!(m>=this._bufferService.rows||S<0)){var k=document.createDocumentFragment();if(x)k.appendChild(this._createSelectionElement(m,y[0],g[0],S-m+1));else{var O=E===m?y[0]:0,F=m===S?g[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(m,O,F));var z=S-m-1;if(k.appendChild(this._createSelectionElement(m+1,0,this._bufferService.cols,z)),m!==S){var H=C===S?g[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(S,0,H))}}this._selectionContainer.appendChild(k)}}},v.prototype._createSelectionElement=function(y,g,x,E){E===void 0&&(E=1);var C=document.createElement("div");return C.style.height=E*this.dimensions.actualCellHeight+"px",C.style.top=y*this.dimensions.actualCellHeight+"px",C.style.left=g*this.dimensions.actualCellWidth+"px",C.style.width=this.dimensions.actualCellWidth*(x-g)+"px",C},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 x=this._bufferService.buffer.ybase+this._bufferService.buffer.y,E=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),C=this._optionsService.options.cursorBlink,m=y;m<=g;m++){var S=this._rowElements[m];S.innerHTML="";var k=m+this._bufferService.buffer.ydisp,O=this._bufferService.buffer.lines.get(k),F=this._optionsService.options.cursorStyle;S.appendChild(this._rowFactory.createRow(O,k===x,F,E,C,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,x,E,C,m){for(;y!==g||x!==E;){var S=this._rowElements[x];if(!S)return;var k=S.children[y];k&&(k.style.textDecoration=m?"underline":"none"),++y>=C&&(y=0,x++)}},v=d([o(6,n.ICharSizeService),o(7,a.IOptionsService),o(8,a.IBufferService)],v)}(r.Disposable);s.DomRenderer=l},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DomRendererRowFactory=s.CURSOR_STYLE_UNDERLINE_CLASS=s.CURSOR_STYLE_BAR_CLASS=s.CURSOR_STYLE_BLOCK_CLASS=s.CURSOR_BLINK_CLASS=s.CURSOR_CLASS=s.UNDERLINE_CLASS=s.ITALIC_CLASS=s.DIM_CLASS=s.BOLD_CLASS=void 0;var p=_(9),b=_(3),d=_(4),o=_(10);s.BOLD_CLASS="xterm-bold",s.DIM_CLASS="xterm-dim",s.ITALIC_CLASS="xterm-italic",s.UNDERLINE_CLASS="xterm-underline",s.CURSOR_CLASS="xterm-cursor",s.CURSOR_BLINK_CLASS="xterm-cursor-blink",s.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",s.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",s.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var u=function(){function r(n,a,t){this._document=n,this._optionsService=a,this._colors=t,this._workCell=new d.CellData}return r.prototype.setColors=function(n){this._colors=n},r.prototype.createRow=function(n,a,t,f,e,i,l){for(var c=this._document.createDocumentFragment(),v=0,y=Math.min(n.length,l)-1;y>=0;y--)if(n.loadCell(y,this._workCell).getCode()!==b.NULL_CELL_CODE||a&&y===f){v=y+1;break}for(y=0;y<v;y++){n.loadCell(y,this._workCell);var g=this._workCell.getWidth();if(g!==0){var x=this._document.createElement("span");if(g>1&&(x.style.width=i*g+"px"),a&&y===f)switch(x.classList.add(s.CURSOR_CLASS),e&&x.classList.add(s.CURSOR_BLINK_CLASS),t){case"bar":x.classList.add(s.CURSOR_STYLE_BAR_CLASS);break;case"underline":x.classList.add(s.CURSOR_STYLE_UNDERLINE_CLASS);break;default:x.classList.add(s.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&x.classList.add(s.BOLD_CLASS),this._workCell.isItalic()&&x.classList.add(s.ITALIC_CLASS),this._workCell.isDim()&&x.classList.add(s.DIM_CLASS),this._workCell.isUnderline()&&x.classList.add(s.UNDERLINE_CLASS),this._workCell.isInvisible()?x.textContent=b.WHITESPACE_CELL_CHAR:x.textContent=this._workCell.getChars()||b.WHITESPACE_CELL_CHAR;var E=this._workCell.getFgColor(),C=this._workCell.getFgColorMode(),m=this._workCell.getBgColor(),S=this._workCell.getBgColorMode(),k=!!this._workCell.isInverse();if(k){var O=E;E=m,m=O;var F=C;C=S,S=F}switch(C){case 16777216:case 33554432:this._workCell.isBold()&&E<8&&this._optionsService.options.drawBoldTextInBrightColors&&(E+=8),this._applyMinimumContrast(x,this._colors.background,this._colors.ansi[E])||x.classList.add("xterm-fg-"+E);break;case 50331648:var z=o.rgba.toColor(E>>16&255,E>>8&255,255&E);this._applyMinimumContrast(x,this._colors.background,z)||this._addStyle(x,"color:#"+h(E.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(x,this._colors.background,this._colors.foreground)||k&&x.classList.add("xterm-fg-"+p.INVERTED_DEFAULT_COLOR)}switch(S){case 16777216:case 33554432:x.classList.add("xterm-bg-"+m);break;case 50331648:this._addStyle(x,"background-color:#"+h(m.toString(16),"0",6));break;case 0:default:k&&x.classList.add("xterm-bg-"+p.INVERTED_DEFAULT_COLOR)}c.appendChild(x)}}return c},r.prototype._applyMinimumContrast=function(n,a,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var f=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return f===void 0&&(f=o.color.ensureContrastRatio(a,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,f!=null?f:null)),!!f&&(this._addStyle(n,"color:"+f.css),!0)},r.prototype._addStyle=function(n,a){n.setAttribute("style",""+(n.getAttribute("style")||"")+a+";")},r}();function h(r,n,a){for(;r.length<a;)r=n+r;return r}s.DomRendererRowFactory=u},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.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:["'",'"']};s.evaluateKeyboardEvent=function(d,o,u,h){var r={type:0,cancel:!1,key:void 0},n=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?r.key=o?p.C0.ESC+"OA":p.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?r.key=o?p.C0.ESC+"OD":p.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?r.key=o?p.C0.ESC+"OC":p.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(r.key=o?p.C0.ESC+"OB":p.C0.ESC+"[B");break;case 8:if(d.shiftKey){r.key=p.C0.BS;break}if(d.altKey){r.key=p.C0.ESC+p.C0.DEL;break}r.key=p.C0.DEL;break;case 9:if(d.shiftKey){r.key=p.C0.ESC+"[Z";break}r.key=p.C0.HT,r.cancel=!0;break;case 13:r.key=d.altKey?p.C0.ESC+p.C0.CR:p.C0.CR,r.cancel=!0;break;case 27:r.key=p.C0.ESC,d.altKey&&(r.key=p.C0.ESC+p.C0.ESC),r.cancel=!0;break;case 37:if(d.metaKey)break;n?(r.key=p.C0.ESC+"[1;"+(n+1)+"D",r.key===p.C0.ESC+"[1;3D"&&(r.key=p.C0.ESC+(u?"b":"[1;5D"))):r.key=o?p.C0.ESC+"OD":p.C0.ESC+"[D";break;case 39:if(d.metaKey)break;n?(r.key=p.C0.ESC+"[1;"+(n+1)+"C",r.key===p.C0.ESC+"[1;3C"&&(r.key=p.C0.ESC+(u?"f":"[1;5C"))):r.key=o?p.C0.ESC+"OC":p.C0.ESC+"[C";break;case 38:if(d.metaKey)break;n?(r.key=p.C0.ESC+"[1;"+(n+1)+"A",u||r.key!==p.C0.ESC+"[1;3A"||(r.key=p.C0.ESC+"[1;5A")):r.key=o?p.C0.ESC+"OA":p.C0.ESC+"[A";break;case 40:if(d.metaKey)break;n?(r.key=p.C0.ESC+"[1;"+(n+1)+"B",u||r.key!==p.C0.ESC+"[1;3B"||(r.key=p.C0.ESC+"[1;5B")):r.key=o?p.C0.ESC+"OB":p.C0.ESC+"[B";break;case 45:d.shiftKey||d.ctrlKey||(r.key=p.C0.ESC+"[2~");break;case 46:r.key=n?p.C0.ESC+"[3;"+(n+1)+"~":p.C0.ESC+"[3~";break;case 36:r.key=n?p.C0.ESC+"[1;"+(n+1)+"H":o?p.C0.ESC+"OH":p.C0.ESC+"[H";break;case 35:r.key=n?p.C0.ESC+"[1;"+(n+1)+"F":o?p.C0.ESC+"OF":p.C0.ESC+"[F";break;case 33:d.shiftKey?r.type=2:r.key=p.C0.ESC+"[5~";break;case 34:d.shiftKey?r.type=3:r.key=p.C0.ESC+"[6~";break;case 112:r.key=n?p.C0.ESC+"[1;"+(n+1)+"P":p.C0.ESC+"OP";break;case 113:r.key=n?p.C0.ESC+"[1;"+(n+1)+"Q":p.C0.ESC+"OQ";break;case 114:r.key=n?p.C0.ESC+"[1;"+(n+1)+"R":p.C0.ESC+"OR";break;case 115:r.key=n?p.C0.ESC+"[1;"+(n+1)+"S":p.C0.ESC+"OS";break;case 116:r.key=n?p.C0.ESC+"[15;"+(n+1)+"~":p.C0.ESC+"[15~";break;case 117:r.key=n?p.C0.ESC+"[17;"+(n+1)+"~":p.C0.ESC+"[17~";break;case 118:r.key=n?p.C0.ESC+"[18;"+(n+1)+"~":p.C0.ESC+"[18~";break;case 119:r.key=n?p.C0.ESC+"[19;"+(n+1)+"~":p.C0.ESC+"[19~";break;case 120:r.key=n?p.C0.ESC+"[20;"+(n+1)+"~":p.C0.ESC+"[20~";break;case 121:r.key=n?p.C0.ESC+"[21;"+(n+1)+"~":p.C0.ESC+"[21~";break;case 122:r.key=n?p.C0.ESC+"[23;"+(n+1)+"~":p.C0.ESC+"[23~";break;case 123:r.key=n?p.C0.ESC+"[24;"+(n+1)+"~":p.C0.ESC+"[24~";break;default:if(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(u&&!h||!d.altKey||d.metaKey)u&&!d.altKey&&!d.ctrlKey&&d.metaKey?d.keyCode===65&&(r.type=1):d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?r.key=d.key:d.key&&d.ctrlKey&&d.key==="_"&&(r.key=p.C0.US);else{var a=b[d.keyCode],t=a&&a[d.shiftKey?1:0];if(t)r.key=p.C0.ESC+t;else if(d.keyCode>=65&&d.keyCode<=90){var f=d.ctrlKey?d.keyCode-64:d.keyCode+32;r.key=p.C0.ESC+String.fromCharCode(f)}}else d.keyCode>=65&&d.keyCode<=90?r.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?r.key=p.C0.NUL:d.keyCode>=51&&d.keyCode<=55?r.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?r.key=p.C0.DEL:d.keyCode===219?r.key=p.C0.ESC:d.keyCode===220?r.key=p.C0.FS:d.keyCode===221&&(r.key=p.C0.GS)}return r}},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(i,l){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])})(i,l)},function(i,l){function c(){this.constructor=i}p(i,l),i.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),d=this&&this.__decorate||function(i,l,c,v){var y,g=arguments.length,x=g<3?l:v===null?v=Object.getOwnPropertyDescriptor(l,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(i,l,c,v);else for(var E=i.length-1;E>=0;E--)(y=i[E])&&(x=(g<3?y(x):g>3?y(l,c,x):y(l,c))||x);return g>3&&x&&Object.defineProperty(l,c,x),x},o=this&&this.__param||function(i,l){return function(c,v){l(c,v,i)}};Object.defineProperty(s,"__esModule",{value:!0}),s.RenderService=void 0;var u=_(31),h=_(0),r=_(2),n=_(32),a=_(7),t=_(1),f=_(5),e=function(i){function l(c,v,y,g,x,E){var C=i.call(this)||this;if(C._renderer=c,C._rowCount=v,C._isPaused=!1,C._needsFullRefresh=!1,C._isNextRenderRedrawOnly=!0,C._needsSelectionRefresh=!1,C._canvasWidth=0,C._canvasHeight=0,C._selectionState={start:void 0,end:void 0,columnSelectMode:!1},C._onDimensionsChange=new h.EventEmitter,C._onRender=new h.EventEmitter,C._onRefreshRequest=new h.EventEmitter,C.register({dispose:function(){return C._renderer.dispose()}}),C._renderDebouncer=new u.RenderDebouncer(function(S,k){return C._renderRows(S,k)}),C.register(C._renderDebouncer),C._screenDprMonitor=new n.ScreenDprMonitor,C._screenDprMonitor.setListener(function(){return C.onDevicePixelRatioChange()}),C.register(C._screenDprMonitor),C.register(E.onResize(function(S){return C._fullRefresh()})),C.register(g.onOptionChange(function(){return C._renderer.onOptionsChanged()})),C.register(x.onCharSizeChange(function(){return C.onCharSizeChanged()})),C._renderer.onRequestRedraw(function(S){return C.refreshRows(S.start,S.end,!0)}),C.register(a.addDisposableDomListener(window,"resize",function(){return C.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var m=new IntersectionObserver(function(S){return C._onIntersectionChange(S[S.length-1])},{threshold:0});m.observe(y),C.register({dispose:function(){return m.disconnect()}})}return C}return b(l,i),Object.defineProperty(l.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),l.prototype._onIntersectionChange=function(c){this._isPaused=c.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},l.prototype.refreshRows=function(c,v,y){y===void 0&&(y=!1),this._isPaused?this._needsFullRefresh=!0:(y||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(c,v,this._rowCount))},l.prototype._renderRows=function(c,v){this._renderer.renderRows(c,v),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:c,end:v}),this._isNextRenderRedrawOnly=!0},l.prototype.resize=function(c,v){this._rowCount=v,this._fireOnCanvasResize()},l.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},l.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},l.prototype.dispose=function(){i.prototype.dispose.call(this)},l.prototype.setRenderer=function(c){var v=this;this._renderer.dispose(),this._renderer=c,this._renderer.onRequestRedraw(function(y){return v.refreshRows(y.start,y.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},l.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},l.prototype.setColors=function(c){this._renderer.setColors(c),this._fullRefresh()},l.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},l.prototype.onResize=function(c,v){this._renderer.onResize(c,v),this._fullRefresh()},l.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},l.prototype.onBlur=function(){this._renderer.onBlur()},l.prototype.onFocus=function(){this._renderer.onFocus()},l.prototype.onSelectionChanged=function(c,v,y){this._selectionState.start=c,this._selectionState.end=v,this._selectionState.columnSelectMode=y,this._renderer.onSelectionChanged(c,v,y)},l.prototype.onCursorMove=function(){this._renderer.onCursorMove()},l.prototype.clear=function(){this._renderer.clear()},l.prototype.registerCharacterJoiner=function(c){return this._renderer.registerCharacterJoiner(c)},l.prototype.deregisterCharacterJoiner=function(c){return this._renderer.deregisterCharacterJoiner(c)},l=d([o(3,t.IOptionsService),o(4,f.ICharSizeService),o(5,t.IBufferService)],l)}(r.Disposable);s.RenderService=e},function(D,s,_){"use strict";var p=this&&this.__decorate||function(r,n,a,t){var f,e=arguments.length,i=e<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,a):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,n,a,t);else for(var l=r.length-1;l>=0;l--)(f=r[l])&&(i=(e<3?f(i):e>3?f(n,a,i):f(n,a))||i);return e>3&&i&&Object.defineProperty(n,a,i),i},b=this&&this.__param||function(r,n){return function(a,t){n(a,t,r)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CharSizeService=void 0;var d=_(1),o=_(0),u=function(){function r(n,a,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new o.EventEmitter,this._measureStrategy=new h(n,a,this._optionsService)}return Object.defineProperty(r.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),r.prototype.measure=function(){var n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())},r=p([b(2,d.IOptionsService)],r)}();s.CharSizeService=u;var h=function(){function r(n,a,t){this._document=n,this._parentElement=a,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 r.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},r}()},function(D,s,_){"use strict";var p=this&&this.__decorate||function(h,r,n,a){var t,f=arguments.length,e=f<3?r:a===null?a=Object.getOwnPropertyDescriptor(r,n):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(h,r,n,a);else for(var i=h.length-1;i>=0;i--)(t=h[i])&&(e=(f<3?t(e):f>3?t(r,n,e):t(r,n))||e);return f>3&&e&&Object.defineProperty(r,n,e),e},b=this&&this.__param||function(h,r){return function(n,a){r(n,a,h)}};Object.defineProperty(s,"__esModule",{value:!0}),s.MouseService=void 0;var d=_(5),o=_(30),u=function(){function h(r,n){this._renderService=r,this._charSizeService=n}return h.prototype.getCoords=function(r,n,a,t,f){return o.getCoords(r,n,a,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,f)},h.prototype.getRawByteCoords=function(r,n,a,t){var f=this.getCoords(r,n,a,t);return o.getRawByteCoords(f)},h=p([b(0,d.IRenderService),b(1,d.ICharSizeService)],h)}();s.MouseService=u},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(t,f){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var l in i)i.hasOwnProperty(l)&&(e[l]=i[l])})(t,f)},function(t,f){function e(){this.constructor=t}p(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),d=this&&this.__decorate||function(t,f,e,i){var l,c=arguments.length,v=c<3?f:i===null?i=Object.getOwnPropertyDescriptor(f,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,f,e,i);else for(var y=t.length-1;y>=0;y--)(l=t[y])&&(v=(c<3?l(v):c>3?l(f,e,v):l(f,e))||v);return c>3&&v&&Object.defineProperty(f,e,v),v},o=this&&this.__param||function(t,f){return function(e,i){f(e,i,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier2=void 0;var u=_(1),h=_(0),r=_(2),n=_(7),a=function(t){function f(e){var i=t.call(this)||this;return i._bufferService=e,i._linkProviders=[],i._linkCacheDisposables=[],i._isMouseOut=!0,i._activeLine=-1,i._onShowLinkUnderline=i.register(new h.EventEmitter),i._onHideLinkUnderline=i.register(new h.EventEmitter),i.register(r.getDisposeArrayDisposable(i._linkCacheDisposables)),i}return b(f,t),Object.defineProperty(f.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),f.prototype.registerLinkProvider=function(e){var i=this;return this._linkProviders.push(e),{dispose:function(){var l=i._linkProviders.indexOf(e);l!==-1&&i._linkProviders.splice(l,1)}}},f.prototype.attachToDom=function(e,i,l){var c=this;this._element=e,this._mouseService=i,this._renderService=l,this.register(n.addDisposableDomListener(this._element,"mouseleave",function(){c._isMouseOut=!0,c._clearCurrentLink()})),this.register(n.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(n.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},f.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var i=this._positionFromMouseEvent(e,this._element,this._mouseService);if(i){this._isMouseOut=!1;for(var l=e.composedPath(),c=0;c<l.length;c++){var v=l[c];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&i.x===this._lastBufferCell.x&&i.y===this._lastBufferCell.y||(this._onHover(i),this._lastBufferCell=i)}}},f.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))},f.prototype._askForLink=function(e,i){var l=this;this._activeProviderReplies&&i||(this._activeProviderReplies=new Map,this._activeLine=e.y);var c=!1;this._linkProviders.forEach(function(v,y){var g;i?!((g=l._activeProviderReplies)===null||g===void 0)&&g.get(y)&&(c=l._checkLinkProviderResult(y,e,c)):v.provideLinks(e.y,function(x){var E,C;if(!l._isMouseOut){var m=x==null?void 0:x.map(function(S){return{link:S}});(E=l._activeProviderReplies)===null||E===void 0||E.set(y,m),c=l._checkLinkProviderResult(y,e,c),((C=l._activeProviderReplies)===null||C===void 0?void 0:C.size)===l._linkProviders.length&&l._removeIntersectingLinks(e.y,l._activeProviderReplies)}})})},f.prototype._removeIntersectingLinks=function(e,i){for(var l=new Set,c=0;c<i.size;c++){var v=i.get(c);if(v)for(var y=0;y<v.length;y++)for(var g=v[y],x=g.link.range.start.y<e?0:g.link.range.start.x,E=g.link.range.end.y>e?this._bufferService.cols:g.link.range.end.x,C=x;C<=E;C++){if(l.has(C)){v.splice(y--,1);break}l.add(C)}}},f.prototype._checkLinkProviderResult=function(e,i,l){var c,v=this;if(!this._activeProviderReplies)return l;for(var y=this._activeProviderReplies.get(e),g=!1,x=0;x<e;x++)this._activeProviderReplies.has(x)&&!this._activeProviderReplies.get(x)||(g=!0);if(!g&&y){var E=y.find(function(m){return v._linkAtPosition(m.link,i)});E&&(l=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(x=0;x<this._activeProviderReplies.size;x++){var C=(c=this._activeProviderReplies.get(x))===null||c===void 0?void 0:c.find(function(m){return v._linkAtPosition(m.link,i)});if(C){l=!0,this._handleNewLink(C);break}}return l},f.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var i=this._positionFromMouseEvent(e,this._element,this._mouseService);i&&this._linkAtPosition(this._currentLink.link,i)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},f.prototype._clearCurrentLink=function(e,i){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!i||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=i)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,r.disposeArray(this._linkCacheDisposables))},f.prototype._handleNewLink=function(e){var i=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(e.link,l)&&(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 c,v;return(v=(c=i._currentLink)===null||c===void 0?void 0:c.state)===null||v===void 0?void 0:v.decorations.pointerCursor},set:function(c){var v,y;!((v=i._currentLink)===null||v===void 0)&&v.state&&i._currentLink.state.decorations.pointerCursor!==c&&(i._currentLink.state.decorations.pointerCursor=c,i._currentLink.state.isHovered&&((y=i._element)===null||y===void 0||y.classList.toggle("xterm-cursor-pointer",c)))}},underline:{get:function(){var c,v;return(v=(c=i._currentLink)===null||c===void 0?void 0:c.state)===null||v===void 0?void 0:v.decorations.underline},set:function(c){var v,y,g;!((v=i._currentLink)===null||v===void 0)&&v.state&&((g=(y=i._currentLink)===null||y===void 0?void 0:y.state)===null||g===void 0?void 0:g.decorations.underline)!==c&&(i._currentLink.state.decorations.underline=c,i._currentLink.state.isHovered&&i._fireUnderlineEvent(e.link,c))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(c){var v=c.start===0?0:c.start+1+i._bufferService.buffer.ydisp;i._clearCurrentLink(v,c.end+1+i._bufferService.buffer.ydisp)})))}},f.prototype._linkHover=function(e,i,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),i.hover&&i.hover(l,i.text)},f.prototype._fireUnderlineEvent=function(e,i){var l=e.range,c=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-c-1,l.end.x,l.end.y-c-1,void 0);(i?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)},f.prototype._linkLeave=function(e,i,l){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),i.leave&&i.leave(l,i.text)},f.prototype._linkAtPosition=function(e,i){var l=e.range.start.y===e.range.end.y,c=e.range.start.y<i.y,v=e.range.end.y>i.y;return(l&&e.range.start.x<=i.x&&e.range.end.x>=i.x||c&&e.range.end.x>=i.x||v&&e.range.start.x<=i.x||c&&v)&&e.range.start.y<=i.y&&e.range.end.y>=i.y},f.prototype._positionFromMouseEvent=function(e,i,l){var c=l.getCoords(e,i,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}},f.prototype._createLinkUnderlineEvent=function(e,i,l,c,v){return{x1:e,y1:i,x2:l,y2:c,cols:this._bufferService.cols,fg:v}},f=d([o(0,u.IBufferService)],f)}(r.Disposable);s.Linkifier2=a},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.CoreBrowserService=void 0;var p=function(){function b(d){this._textarea=d}return Object.defineProperty(b.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),b}();s.CoreBrowserService=p},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(x,E){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,m){C.__proto__=m}||function(C,m){for(var S in m)m.hasOwnProperty(S)&&(C[S]=m[S])})(x,E)},function(x,E){function C(){this.constructor=x}p(x,E),x.prototype=E===null?Object.create(E):(C.prototype=E.prototype,new C)});Object.defineProperty(s,"__esModule",{value:!0}),s.CoreTerminal=void 0;var d=_(2),o=_(1),u=_(66),h=_(67),r=_(68),n=_(74),a=_(75),t=_(0),f=_(76),e=_(77),i=_(78),l=_(80),c=_(81),v=_(19),y=_(82),g=function(x){function E(C){var m=x.call(this)||this;return m._onBinary=new t.EventEmitter,m._onData=new t.EventEmitter,m._onLineFeed=new t.EventEmitter,m._onResize=new t.EventEmitter,m._onScroll=new t.EventEmitter,m._instantiationService=new u.InstantiationService,m.optionsService=new n.OptionsService(C),m._instantiationService.setService(o.IOptionsService,m.optionsService),m._bufferService=m.register(m._instantiationService.createInstance(r.BufferService)),m._instantiationService.setService(o.IBufferService,m._bufferService),m._logService=m._instantiationService.createInstance(h.LogService),m._instantiationService.setService(o.ILogService,m._logService),m._coreService=m.register(m._instantiationService.createInstance(a.CoreService,function(){return m.scrollToBottom()})),m._instantiationService.setService(o.ICoreService,m._coreService),m._coreMouseService=m._instantiationService.createInstance(f.CoreMouseService),m._instantiationService.setService(o.ICoreMouseService,m._coreMouseService),m._dirtyRowService=m._instantiationService.createInstance(e.DirtyRowService),m._instantiationService.setService(o.IDirtyRowService,m._dirtyRowService),m.unicodeService=m._instantiationService.createInstance(i.UnicodeService),m._instantiationService.setService(o.IUnicodeService,m.unicodeService),m._charsetService=m._instantiationService.createInstance(l.CharsetService),m._instantiationService.setService(o.ICharsetService,m._charsetService),m._inputHandler=new v.InputHandler(m._bufferService,m._charsetService,m._coreService,m._dirtyRowService,m._logService,m.optionsService,m._coreMouseService,m.unicodeService),m.register(t.forwardEvent(m._inputHandler.onLineFeed,m._onLineFeed)),m.register(m._inputHandler),m.register(t.forwardEvent(m._bufferService.onResize,m._onResize)),m.register(t.forwardEvent(m._coreService.onData,m._onData)),m.register(t.forwardEvent(m._coreService.onBinary,m._onBinary)),m.register(m.optionsService.onOptionChange(function(S){return m._updateOptions(S)})),m._writeBuffer=new y.WriteBuffer(function(S){return m._inputHandler.parse(S)}),m}return b(E,x),Object.defineProperty(E.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){var C;this._isDisposed||(x.prototype.dispose.call(this),(C=this._windowsMode)===null||C===void 0||C.dispose(),this._windowsMode=void 0)},E.prototype.write=function(C,m){this._writeBuffer.write(C,m)},E.prototype.writeSync=function(C){this._writeBuffer.writeSync(C)},E.prototype.resize=function(C,m){isNaN(C)||isNaN(m)||(C=Math.max(C,r.MINIMUM_COLS),m=Math.max(m,r.MINIMUM_ROWS),this._bufferService.resize(C,m))},E.prototype.scroll=function(C,m){m===void 0&&(m=!1);var S,k=this._bufferService.buffer;(S=this._cachedBlankLine)&&S.length===this.cols&&S.getFg(0)===C.fg&&S.getBg(0)===C.bg||(S=k.getBlankLine(C,m),this._cachedBlankLine=S),S.isWrapped=m;var O=k.ybase+k.scrollTop,F=k.ybase+k.scrollBottom;if(k.scrollTop===0){var z=k.lines.isFull;F===k.lines.length-1?z?k.lines.recycle().copyFrom(S):k.lines.push(S.clone()):k.lines.splice(F+1,0,S.clone()),z?this._bufferService.isUserScrolling&&(k.ydisp=Math.max(k.ydisp-1,0)):(k.ybase++,this._bufferService.isUserScrolling||k.ydisp++)}else{var H=F-O+1;k.lines.shiftElements(O+1,H-1,-1),k.lines.set(F,S.clone())}this._bufferService.isUserScrolling||(k.ydisp=k.ybase),this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom),this._onScroll.fire(k.ydisp)},E.prototype.scrollLines=function(C,m){var S=this._bufferService.buffer;if(C<0){if(S.ydisp===0)return;this._bufferService.isUserScrolling=!0}else C+S.ydisp>=S.ybase&&(this._bufferService.isUserScrolling=!1);var k=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+C,S.ybase),0),k!==S.ydisp&&(m||this._onScroll.fire(S.ydisp))},E.prototype.scrollPages=function(C){this.scrollLines(C*(this.rows-1))},E.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},E.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},E.prototype.scrollToLine=function(C){var m=C-this._bufferService.buffer.ydisp;m!==0&&this.scrollLines(m)},E.prototype.addEscHandler=function(C,m){return this._inputHandler.addEscHandler(C,m)},E.prototype.addDcsHandler=function(C,m){return this._inputHandler.addDcsHandler(C,m)},E.prototype.addCsiHandler=function(C,m){return this._inputHandler.addCsiHandler(C,m)},E.prototype.addOscHandler=function(C,m){return this._inputHandler.addOscHandler(C,m)},E.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},E.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},E.prototype._updateOptions=function(C){var m;switch(C){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((m=this._windowsMode)===null||m===void 0||m.dispose(),this._windowsMode=void 0)}},E.prototype._enableWindowsMode=function(){var C=this;if(!this._windowsMode){var m=[];m.push(this.onLineFeed(c.updateWindowsModeWrappedState.bind(null,this._bufferService))),m.push(this.addCsiHandler({final:"H"},function(){return c.updateWindowsModeWrappedState(C._bufferService),!1})),this._windowsMode={dispose:function(){for(var S=0,k=m;S<k.length;S++)k[S].dispose()}}}},E}(d.Disposable);s.CoreTerminal=g},function(D,s,_){"use strict";var p=this&&this.__spreadArrays||function(){for(var h=0,r=0,n=arguments.length;r<n;r++)h+=arguments[r].length;var a=Array(h),t=0;for(r=0;r<n;r++)for(var f=arguments[r],e=0,i=f.length;e<i;e++,t++)a[t]=f[e];return a};Object.defineProperty(s,"__esModule",{value:!0}),s.InstantiationService=s.ServiceCollection=void 0;var b=_(1),d=_(14),o=function(){function h(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this._entries=new Map;for(var a=0,t=r;a<t.length;a++){var f=t[a],e=f[0],i=f[1];this.set(e,i)}}return h.prototype.set=function(r,n){var a=this._entries.get(r);return this._entries.set(r,n),a},h.prototype.forEach=function(r){this._entries.forEach(function(n,a){return r(a,n)})},h.prototype.has=function(r){return this._entries.has(r)},h.prototype.get=function(r){return this._entries.get(r)},h}();s.ServiceCollection=o;var u=function(){function h(){this._services=new o,this._services.set(b.IInstantiationService,this)}return h.prototype.setService=function(r,n){this._services.set(r,n)},h.prototype.getService=function(r){return this._services.get(r)},h.prototype.createInstance=function(r){for(var n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];for(var t=d.getServiceDependencies(r).sort(function(y,g){return y.index-g.index}),f=[],e=0,i=t;e<i.length;e++){var l=i[e],c=this._services.get(l.id);if(!c)throw new Error("[createInstance] "+r.name+" depends on UNKNOWN service "+l.id+".");f.push(c)}var v=t.length>0?t[0].index:n.length;if(n.length!==v)throw new Error("[createInstance] First service dependency of "+r.name+" at position "+(v+1)+" conflicts with "+n.length+" static arguments");return new(r.bind.apply(r,p([void 0],p(n,f))))},h}();s.InstantiationService=u},function(D,s,_){"use strict";var p=this&&this.__decorate||function(n,a,t,f){var e,i=arguments.length,l=i<3?a:f===null?f=Object.getOwnPropertyDescriptor(a,t):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,a,t,f);else for(var c=n.length-1;c>=0;c--)(e=n[c])&&(l=(i<3?e(l):i>3?e(a,t,l):e(a,t))||l);return i>3&&l&&Object.defineProperty(a,t,l),l},b=this&&this.__param||function(n,a){return function(t,f){a(t,f,n)}},d=this&&this.__spreadArrays||function(){for(var n=0,a=0,t=arguments.length;a<t;a++)n+=arguments[a].length;var f=Array(n),e=0;for(a=0;a<t;a++)for(var i=arguments[a],l=0,c=i.length;l<c;l++,e++)f[e]=i[l];return f};Object.defineProperty(s,"__esModule",{value:!0}),s.LogService=s.LogLevel=void 0;var o,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"})(o=s.LogLevel||(s.LogLevel={}));var h={debug:o.DEBUG,info:o.INFO,warn:o.WARN,error:o.ERROR,off:o.OFF},r=function(){function n(a){var t=this;this._optionsService=a,this._updateLogLevel(),this._optionsService.onOptionChange(function(f){f==="logLevel"&&t._updateLogLevel()})}return n.prototype._updateLogLevel=function(){this._logLevel=h[this._optionsService.options.logLevel]},n.prototype._evalLazyOptionalParams=function(a){for(var t=0;t<a.length;t++)typeof a[t]=="function"&&(a[t]=a[t]())},n.prototype._log=function(a,t,f){this._evalLazyOptionalParams(f),a.call.apply(a,d([console,"xterm.js: "+t],f))},n.prototype.debug=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.DEBUG&&this._log(console.log,a,t)},n.prototype.info=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.INFO&&this._log(console.info,a,t)},n.prototype.warn=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.WARN&&this._log(console.warn,a,t)},n.prototype.error=function(a){for(var t=[],f=1;f<arguments.length;f++)t[f-1]=arguments[f];this._logLevel<=o.ERROR&&this._log(console.error,a,t)},n=p([b(0,u.IOptionsService)],n)}();s.LogService=r},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(t,f){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var l in i)i.hasOwnProperty(l)&&(e[l]=i[l])})(t,f)},function(t,f){function e(){this.constructor=t}p(t,f),t.prototype=f===null?Object.create(f):(e.prototype=f.prototype,new e)}),d=this&&this.__decorate||function(t,f,e,i){var l,c=arguments.length,v=c<3?f:i===null?i=Object.getOwnPropertyDescriptor(f,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,f,e,i);else for(var y=t.length-1;y>=0;y--)(l=t[y])&&(v=(c<3?l(v):c>3?l(f,e,v):l(f,e))||v);return c>3&&v&&Object.defineProperty(f,e,v),v},o=this&&this.__param||function(t,f){return function(e,i){f(e,i,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.BufferService=s.MINIMUM_ROWS=s.MINIMUM_COLS=void 0;var u=_(1),h=_(69),r=_(0),n=_(2);s.MINIMUM_COLS=2,s.MINIMUM_ROWS=1;var a=function(t){function f(e){var i=t.call(this)||this;return i._optionsService=e,i.isUserScrolling=!1,i._onResize=new r.EventEmitter,i.cols=Math.max(e.options.cols,s.MINIMUM_COLS),i.rows=Math.max(e.options.rows,s.MINIMUM_ROWS),i.buffers=new h.BufferSet(e,i),i}return b(f,t),Object.defineProperty(f.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},f.prototype.resize=function(e,i){this.cols=e,this.rows=i,this.buffers.resize(e,i),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:i})},f.prototype.reset=function(){this.buffers.dispose(),this.buffers=new h.BufferSet(this._optionsService,this),this.isUserScrolling=!1},f=d([o(0,u.IOptionsService)],f)}(n.Disposable);s.BufferService=a},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(h,r){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var t in a)a.hasOwnProperty(t)&&(n[t]=a[t])})(h,r)},function(h,r){function n(){this.constructor=h}p(h,r),h.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(s,"__esModule",{value:!0}),s.BufferSet=void 0;var d=_(70),o=_(0),u=function(h){function r(n,a){var t=h.call(this)||this;return t._onBufferActivate=t.register(new o.EventEmitter),t._normal=new d.Buffer(!0,n,a),t._normal.fillViewportRows(),t._alt=new d.Buffer(!1,n,a),t._activeBuffer=t._normal,t.setupTabStops(),t}return b(r,h),Object.defineProperty(r.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),r.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},r.prototype.activateAltBuffer=function(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}))},r.prototype.resize=function(n,a){this._normal.resize(n,a),this._alt.resize(n,a)},r.prototype.setupTabStops=function(n){this._normal.setupTabStops(n),this._alt.setupTabStops(n)},r}(_(2).Disposable);s.BufferSet=u},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.BufferStringIterator=s.Buffer=s.MAX_BUFFER_SIZE=void 0;var p=_(71),b=_(16),d=_(4),o=_(3),u=_(72),h=_(73),r=_(20),n=_(6);s.MAX_BUFFER_SIZE=4294967295;var a=function(){function f(e,i,l){this._hasScrollback=e,this._optionsService=i,this._bufferService=l,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=r.DEFAULT_CHARSET,this.markers=[],this._nullCell=d.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]),this._whitespaceCell=d.CellData.fromCharData([0,o.WHITESPACE_CELL_CHAR,o.WHITESPACE_CELL_WIDTH,o.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new p.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return f.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},f.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},f.prototype.getBlankLine=function(e,i){return new b.BufferLine(this._bufferService.cols,this.getNullCell(e),i)},Object.defineProperty(f.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),f.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var i=e+this._optionsService.options.scrollback;return i>s.MAX_BUFFER_SIZE?s.MAX_BUFFER_SIZE:i},f.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=b.DEFAULT_ATTR_DATA);for(var i=this._rows;i--;)this.lines.push(this.getBlankLine(e))}},f.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()},f.prototype.resize=function(e,i){var l=this.getNullCell(b.DEFAULT_ATTR_DATA),c=this._getCorrectBufferLength(i);if(c>this.lines.maxLength&&(this.lines.maxLength=c),this.lines.length>0){if(this._cols<e)for(var v=0;v<this.lines.length;v++)this.lines.get(v).resize(e,l);var y=0;if(this._rows<i)for(var g=this._rows;g<i;g++)this.lines.length<i+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new b.BufferLine(e,l)):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,l)));else for(g=this._rows;g>i;g--)this.lines.length>i+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(c<this.lines.maxLength){var x=this.lines.length-c;x>0&&(this.lines.trimStart(x),this.ybase=Math.max(this.ybase-x,0),this.ydisp=Math.max(this.ydisp-x,0),this.savedY=Math.max(this.savedY-x,0)),this.lines.maxLength=c}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,i-1),y&&(this.y+=y),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=i-1,this._isReflowEnabled&&(this._reflow(e,i),this._cols>e))for(v=0;v<this.lines.length;v++)this.lines.get(v).resize(e,l);this._cols=e,this._rows=i},Object.defineProperty(f.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),f.prototype._reflow=function(e,i){this._cols!==e&&(e>this._cols?this._reflowLarger(e,i):this._reflowSmaller(e,i))},f.prototype._reflowLarger=function(e,i){var l=u.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(l.length>0){var c=u.reflowLargerCreateNewLayout(this.lines,l);u.reflowLargerApplyNewLayout(this.lines,c.layout),this._reflowLargerAdjustViewport(e,i,c.countRemoved)}},f.prototype._reflowLargerAdjustViewport=function(e,i,l){for(var c=this.getNullCell(b.DEFAULT_ATTR_DATA),v=l;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<i&&this.lines.push(new b.BufferLine(e,c))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-l,0)},f.prototype._reflowSmaller=function(e,i){for(var l=this.getNullCell(b.DEFAULT_ATTR_DATA),c=[],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 x=[g];g.isWrapped&&y>0;)g=this.lines.get(--y),x.unshift(g);var E=this.ybase+this.y;if(!(E>=y&&E<y+x.length)){var C=x[x.length-1].getTrimmedLength(),m=u.reflowSmallerGetNewLineLengths(x,this._cols,e),S=m.length-x.length,k=void 0;k=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+S):Math.max(0,this.lines.length-this.lines.maxLength+S);for(var O=[],F=0;F<S;F++){var z=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);O.push(z)}O.length>0&&(c.push({start:y+x.length+v,newLines:O}),v+=O.length),x.push.apply(x,O);var H=m.length-1,q=m[H];q===0&&(q=m[--H]);for(var K=x.length-S-1,$=C;K>=0;){var R=Math.min($,q);if(x[H].copyCellsFrom(x[K],$-R,q-R,R,!0),(q-=R)===0&&(q=m[--H]),($-=R)===0){K--;var X=Math.max(K,0);$=u.getWrappedLineTrimmedLength(x,X,this._cols)}}for(F=0;F<x.length;F++)m[F]<e&&x[F].setCell(m[F],l);for(var I=S-k;I-- >0;)this.ybase===0?this.y<i-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-i&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+S,this.ybase+i-1)}}}if(c.length>0){var W=[],B=[];for(F=0;F<this.lines.length;F++)B.push(this.lines.get(F));var G=this.lines.length,fe=G-1,xe=0,Le=c[xe];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);var ke=0;for(F=Math.min(this.lines.maxLength-1,G+v-1);F>=0;F--)if(Le&&Le.start>fe+ke){for(var ae=Le.newLines.length-1;ae>=0;ae--)this.lines.set(F--,Le.newLines[ae]);F++,W.push({index:fe+1,amount:Le.newLines.length}),ke+=Le.newLines.length,Le=c[++xe]}else this.lines.set(F,B[fe--]);var ge=0;for(F=W.length-1;F>=0;F--)W[F].index+=ge,this.lines.onInsertEmitter.fire(W[F]),ge+=W[F].amount;var Fe=Math.max(0,G+v-this.lines.maxLength);Fe>0&&this.lines.onTrimEmitter.fire(Fe)}},f.prototype.stringIndexToBufferIndex=function(e,i,l){for(l===void 0&&(l=!1);i;){var c=this.lines.get(e);if(!c)return[-1,-1];for(var v=l?c.getTrimmedLength():c.length,y=0;y<v;++y)if(c.get(y)[o.CHAR_DATA_WIDTH_INDEX]&&(i-=c.get(y)[o.CHAR_DATA_CHAR_INDEX].length||1),i<0)return[e,y];e++}return[e,0]},f.prototype.translateBufferLineToString=function(e,i,l,c){l===void 0&&(l=0);var v=this.lines.get(e);return v?v.translateToString(i,l,c):""},f.prototype.getWrappedRangeForLine=function(e){for(var i=e,l=e;i>0&&this.lines.get(i).isWrapped;)i--;for(;l+1<this.lines.length&&this.lines.get(l+1).isWrapped;)l++;return{first:i,last:l}},f.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},f.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},f.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},f.prototype.addMarker=function(e){var i=this,l=new h.Marker(e);return this.markers.push(l),l.register(this.lines.onTrim(function(c){l.line-=c,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(function(c){l.line>=c.index&&(l.line+=c.amount)})),l.register(this.lines.onDelete(function(c){l.line>=c.index&&l.line<c.index+c.amount&&l.dispose(),l.line>c.index&&(l.line-=c.amount)})),l.register(l.onDispose(function(){return i._removeMarker(l)})),l},f.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},f.prototype.iterator=function(e,i,l,c,v){return new t(this,e,i,l,c,v)},f}();s.Buffer=a;var t=function(){function f(e,i,l,c,v,y){l===void 0&&(l=0),c===void 0&&(c=e.lines.length),v===void 0&&(v=0),y===void 0&&(y=0),this._buffer=e,this._trimRight=i,this._startIndex=l,this._endIndex=c,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 f.prototype.hasNext=function(){return this._current<this._endIndex},f.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 i="",l=e.first;l<=e.last;++l)i+=this._buffer.translateBufferLineToString(l,this._trimRight);return this._current=e.last+1,{range:e,content:i}},f}();s.BufferStringIterator=t},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.CircularList=void 0;var p=_(0),b=function(){function d(o){this._maxLength=o,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(d.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"maxLength",{get:function(){return this._maxLength},set:function(o){if(this._maxLength!==o){for(var u=new Array(o),h=0;h<Math.min(o,this.length);h++)u[h]=this._array[this._getCyclicIndex(h)];this._array=u,this._maxLength=o,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"length",{get:function(){return this._length},set:function(o){if(o>this._length)for(var u=this._length;u<o;u++)this._array[u]=void 0;this._length=o},enumerable:!1,configurable:!0}),d.prototype.get=function(o){return this._array[this._getCyclicIndex(o)]},d.prototype.set=function(o,u){this._array[this._getCyclicIndex(o)]=u},d.prototype.push=function(o){this._array[this._getCyclicIndex(this._length)]=o,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},d.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(d.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),d.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},d.prototype.splice=function(o,u){for(var h=[],r=2;r<arguments.length;r++)h[r-2]=arguments[r];if(u){for(var n=o;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>=o;n--)this._array[this._getCyclicIndex(n+h.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<h.length;n++)this._array[this._getCyclicIndex(o+n)]=h[n];if(this._length+h.length>this._maxLength){var a=this._length+h.length-this._maxLength;this._startIndex+=a,this._length=this._maxLength,this.onTrimEmitter.fire(a)}else this._length+=h.length},d.prototype.trimStart=function(o){o>this._length&&(o=this._length),this._startIndex+=o,this._length-=o,this.onTrimEmitter.fire(o)},d.prototype.shiftElements=function(o,u,h){if(!(u<=0)){if(o<0||o>=this._length)throw new Error("start argument out of range");if(o+h<0)throw new Error("Cannot shift elements in list beyond index 0");if(h>0){for(var r=u-1;r>=0;r--)this.set(o+r+h,this.get(o+r));var n=o+u+h-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;r<u;r++)this.set(o+r+h,this.get(o+r))}},d.prototype._getCyclicIndex=function(o){return(this._startIndex+o)%this._maxLength},d}();s.CircularList=b},function(D,s,_){"use strict";function p(b,d,o){if(d===b.length-1)return b[d].getTrimmedLength();var u=!b[d].hasContent(o-1)&&b[d].getWidth(o-1)===1,h=b[d+1].getWidth(0)===2;return u&&h?o-1:o}Object.defineProperty(s,"__esModule",{value:!0}),s.getWrappedLineTrimmedLength=s.reflowSmallerGetNewLineLengths=s.reflowLargerApplyNewLayout=s.reflowLargerCreateNewLayout=s.reflowLargerGetLinesToRemove=void 0,s.reflowLargerGetLinesToRemove=function(b,d,o,u,h){for(var r=[],n=0;n<b.length-1;n++){var a=n,t=b.get(++a);if(t.isWrapped){for(var f=[b.get(n)];a<b.length&&t.isWrapped;)f.push(t),t=b.get(++a);if(u>=n&&u<a)n+=f.length-1;else{for(var e=0,i=p(f,e,d),l=1,c=0;l<f.length;){var v=p(f,l,d),y=v-c,g=o-i,x=Math.min(y,g);f[e].copyCellsFrom(f[l],c,i,x,!1),(i+=x)===o&&(e++,i=0),(c+=x)===v&&(l++,c=0),i===0&&e!==0&&f[e-1].getWidth(o-1)===2&&(f[e].copyCellsFrom(f[e-1],o-1,i++,1,!1),f[e-1].setCell(o-1,h))}f[e].replaceCells(i,o,h);for(var E=0,C=f.length-1;C>0&&(C>e||f[C].getTrimmedLength()===0);C--)E++;E>0&&(r.push(n+f.length-E),r.push(E)),n+=f.length-1}}}return r},s.reflowLargerCreateNewLayout=function(b,d){for(var o=[],u=0,h=d[u],r=0,n=0;n<b.length;n++)if(h===n){var a=d[++u];b.onDeleteEmitter.fire({index:n-r,amount:a}),n+=a-1,r+=a,h=d[++u]}else o.push(n);return{layout:o,countRemoved:r}},s.reflowLargerApplyNewLayout=function(b,d){for(var o=[],u=0;u<d.length;u++)o.push(b.get(d[u]));for(u=0;u<o.length;u++)b.set(u,o[u]);b.length=d.length},s.reflowSmallerGetNewLineLengths=function(b,d,o){for(var u=[],h=b.map(function(i,l){return p(b,l,d)}).reduce(function(i,l){return i+l}),r=0,n=0,a=0;a<h;){if(h-a<o){u.push(h-a);break}r+=o;var t=p(b,n,d);r>t&&(r-=t,n++);var f=b[n].getWidth(r-1)===2;f&&r--;var e=f?o-1:o;u.push(e),a+=e}return u},s.getWrappedLineTrimmedLength=p},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(u,h){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)n.hasOwnProperty(a)&&(r[a]=n[a])})(u,h)},function(u,h){function r(){this.constructor=u}p(u,h),u.prototype=h===null?Object.create(h):(r.prototype=h.prototype,new r)});Object.defineProperty(s,"__esModule",{value:!0}),s.Marker=void 0;var d=_(0),o=function(u){function h(r){var n=u.call(this)||this;return n.line=r,n._id=h._nextId++,n.isDisposed=!1,n._onDispose=new d.EventEmitter,n}return b(h,u),Object.defineProperty(h.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),h.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},h._nextId=1,h}(_(2).Disposable);s.Marker=o},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.OptionsService=s.DEFAULT_OPTIONS=s.DEFAULT_BELL_SOUND=void 0;var p=_(0),b=_(11),d=_(33);s.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",s.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:s.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 o=["cols","rows"],u=function(){function h(r){this._onOptionChange=new p.EventEmitter,this.options=d.clone(s.DEFAULT_OPTIONS);for(var n=0,a=Object.keys(r);n<a.length;n++){var t=a[n];if(t in this.options){var f=r[t];this.options[t]=f}}}return Object.defineProperty(h.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),h.prototype.setOption=function(r,n){if(!(r in s.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');if(o.indexOf(r)!==-1)throw new Error('Option "'+r+'" can only be set in the constructor');this.options[r]!==n&&(n=this._sanitizeAndValidateOption(r,n),this.options[r]!==n&&(this.options[r]=n,this._onOptionChange.fire(r)))},h.prototype._sanitizeAndValidateOption=function(r,n){switch(r){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":n||(n=s.DEFAULT_OPTIONS[r]);break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(r+" 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(r+" cannot be less than 0, value: "+n);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(r+" cannot be less than or equal to 0, value: "+n)}return n},h.prototype.getOption=function(r){if(!(r in s.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');return this.options[r]},h}();s.OptionsService=u},function(D,s,_){"use strict";var p,b=this&&this.__extends||(p=function(e,i){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var v in c)c.hasOwnProperty(v)&&(l[v]=c[v])})(e,i)},function(e,i){function l(){this.constructor=e}p(e,i),e.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}),d=this&&this.__decorate||function(e,i,l,c){var v,y=arguments.length,g=y<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,i,l,c);else for(var x=e.length-1;x>=0;x--)(v=e[x])&&(g=(y<3?v(g):y>3?v(i,l,g):v(i,l))||g);return y>3&&g&&Object.defineProperty(i,l,g),g},o=this&&this.__param||function(e,i){return function(l,c){i(l,c,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreService=void 0;var u=_(1),h=_(0),r=_(33),n=_(2),a=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),f=function(e){function i(l,c,v,y){var g=e.call(this)||this;return g._bufferService=c,g._logService=v,g._optionsService=y,g.isCursorInitialized=!1,g.isCursorHidden=!1,g._onData=g.register(new h.EventEmitter),g._onUserInput=g.register(new h.EventEmitter),g._onBinary=g.register(new h.EventEmitter),g._scrollToBottom=l,g.register({dispose:function(){return g._scrollToBottom=void 0}}),g.modes=r.clone(a),g.decPrivateModes=r.clone(t),g}return b(i,e),Object.defineProperty(i.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),i.prototype.reset=function(){this.modes=r.clone(a),this.decPrivateModes=r.clone(t)},i.prototype.triggerDataEvent=function(l,c){if(c===void 0&&(c=!1),!this._optionsService.options.disableStdin){var v=this._bufferService.buffer;v.ybase!==v.ydisp&&this._scrollToBottom(),c&&this._onUserInput.fire(),this._logService.debug('sending data "'+l+'"',function(){return l.split("").map(function(y){return y.charCodeAt(0)})}),this._onData.fire(l)}},i.prototype.triggerBinaryEvent=function(l){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+l+'"',function(){return l.split("").map(function(c){return c.charCodeAt(0)})}),this._onBinary.fire(l))},i=d([o(1,u.IBufferService),o(2,u.ILogService),o(3,u.IOptionsService)],i)}(n.Disposable);s.CoreService=f},function(D,s,_){"use strict";var p=this&&this.__decorate||function(t,f,e,i){var l,c=arguments.length,v=c<3?f:i===null?i=Object.getOwnPropertyDescriptor(f,e):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,f,e,i);else for(var y=t.length-1;y>=0;y--)(l=t[y])&&(v=(c<3?l(v):c>3?l(f,e,v):l(f,e))||v);return c>3&&v&&Object.defineProperty(f,e,v),v},b=this&&this.__param||function(t,f){return function(e,i){f(e,i,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.CoreMouseService=void 0;var d=_(1),o=_(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 h(t,f){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||f||(e|=3)),e}var r=String.fromCharCode,n={DEFAULT:function(t){var f=[h(t,!1)+32,t.col+32,t.row+32];return f[0]>255||f[1]>255||f[2]>255?"":"\x1B[M"+r(f[0])+r(f[1])+r(f[2])},SGR:function(t){var f=t.action===0&&t.button!==4?"m":"M";return"\x1B[<"+h(t,!0)+";"+t.col+";"+t.row+f}},a=function(){function t(f,e){this._bufferService=f,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new o.EventEmitter,this._lastEvent=null;for(var i=0,l=Object.keys(u);i<l.length;i++){var c=l[i];this.addProtocol(c,u[c])}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(f,e){this._protocols[f]=e},t.prototype.addEncoding=function(f,e){this._encodings[f]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(f){if(!this._protocols[f])throw new Error('unknown protocol "'+f+'"');this._activeProtocol=f,this._onProtocolChange.fire(this._protocols[f].events)},enumerable:!1,configurable:!0}),Object.defineProperty(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(f){if(!this._encodings[f])throw new Error('unknown encoding "'+f+'"');this._activeEncoding=f},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(f){if(f.col<0||f.col>=this._bufferService.cols||f.row<0||f.row>=this._bufferService.rows||f.button===4&&f.action===32||f.button===3&&f.action!==32||f.button!==4&&(f.action===2||f.action===3)||(f.col++,f.row++,f.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,f))||!this._protocols[this._activeProtocol].restrict(f))return!1;var e=this._encodings[this._activeEncoding](f);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=f,!0},t.prototype.explainEvents=function(f){return{down:!!(1&f),up:!!(2&f),drag:!!(4&f),move:!!(8&f),wheel:!!(16&f)}},t.prototype._compareEvents=function(f,e){return f.col===e.col&&f.row===e.row&&f.button===e.button&&f.action===e.action&&f.ctrl===e.ctrl&&f.alt===e.alt&&f.shift===e.shift},t=p([b(0,d.IBufferService),b(1,d.ICoreService)],t)}();s.CoreMouseService=a},function(D,s,_){"use strict";var p=this&&this.__decorate||function(u,h,r,n){var a,t=arguments.length,f=t<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,h,r,n);else for(var e=u.length-1;e>=0;e--)(a=u[e])&&(f=(t<3?a(f):t>3?a(h,r,f):a(h,r))||f);return t>3&&f&&Object.defineProperty(h,r,f),f},b=this&&this.__param||function(u,h){return function(r,n){h(r,n,u)}};Object.defineProperty(s,"__esModule",{value:!0}),s.DirtyRowService=void 0;var d=_(1),o=function(){function u(h){this._bufferService=h,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(h){h<this._start?this._start=h:h>this._end&&(this._end=h)},u.prototype.markRangeDirty=function(h,r){if(h>r){var n=h;h=r,r=n}h<this._start&&(this._start=h),r>this._end&&(this._end=r)},u.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},u=p([b(0,d.IBufferService)],u)}();s.DirtyRowService=o},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeService=void 0;var p=_(0),b=_(79),d=function(){function o(){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(o.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"activeVersion",{get:function(){return this._active},set:function(u){if(!this._providers[u])throw new Error('unknown Unicode version "'+u+'"');this._active=u,this._activeProvider=this._providers[u],this._onChange.fire(u)},enumerable:!1,configurable:!0}),o.prototype.register=function(u){this._providers[u.version]=u},o.prototype.wcwidth=function(u){return this._activeProvider.wcwidth(u)},o.prototype.getStringCellWidth=function(u){for(var h=0,r=u.length,n=0;n<r;++n){var a=u.charCodeAt(n);if(55296<=a&&a<=56319){if(++n>=r)return h+this.wcwidth(a);var t=u.charCodeAt(n);56320<=t&&t<=57343?a=1024*(a-55296)+t-56320+65536:h+=this.wcwidth(t)}h+=this.wcwidth(a)}return h},o}();s.UnicodeService=d},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.UnicodeV6=void 0;var p,b=_(15),d=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],o=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],u=function(){function h(){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 r=0;r<d.length;++r)b.fill(p,0,d[r][0],d[r][1]+1)}}return h.prototype.wcwidth=function(r){return r<32?0:r<127?1:r<65536?p[r]:function(n,a){var t,f=0,e=a.length-1;if(n<a[0][0]||n>a[e][1])return!1;for(;e>=f;)if(n>a[t=f+e>>1][1])f=t+1;else{if(!(n<a[t][0]))return!0;e=t-1}return!1}(r,o)?0:r>=131072&&r<=196605||r>=196608&&r<=262141?2:1},h}();s.UnicodeV6=u},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.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(d){this.glevel=d,this.charset=this._charsets[d]},b.prototype.setgCharset=function(d,o){this._charsets[d]=o,this.glevel===d&&(this.charset=o)},b}();s.CharsetService=p},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.updateWindowsModeWrappedState=void 0;var p=_(3);s.updateWindowsModeWrappedState=function(b){var d=b.buffer.lines.get(b.buffer.ybase+b.buffer.y-1),o=d==null?void 0:d.get(b.cols-1),u=b.buffer.lines.get(b.buffer.ybase+b.buffer.y);u&&o&&(u.isWrapped=o[p.CHAR_DATA_CODE_INDEX]!==p.NULL_CELL_CODE&&o[p.CHAR_DATA_CODE_INDEX]!==p.WHITESPACE_CELL_CODE)}},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.WriteBuffer=void 0;var p=function(){function b(d){this._action=d,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return b.prototype.writeSync=function(d){if(this._writeBuffer.length){for(var o=this._bufferOffset;o<this._writeBuffer.length;++o){var u=this._writeBuffer[o],h=this._callbacks[o];this._action(u),h&&h()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(d)},b.prototype.write=function(d,o){var u=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return u._innerWrite()})),this._pendingData+=d.length,this._writeBuffer.push(d),this._callbacks.push(o)},b.prototype._innerWrite=function(){for(var d=this,o=Date.now();this._writeBuffer.length>this._bufferOffset;){var u=this._writeBuffer[this._bufferOffset],h=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(u),this._pendingData-=u.length,h&&h(),Date.now()-o>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return d._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},b}();s.WriteBuffer=p},function(D,s,_){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.AddonManager=void 0;var p=function(){function b(){this._addons=[]}return b.prototype.dispose=function(){for(var d=this._addons.length-1;d>=0;d--)this._addons[d].instance.dispose()},b.prototype.loadAddon=function(d,o){var u=this,h={instance:o,dispose:o.dispose,isDisposed:!1};this._addons.push(h),o.dispose=function(){return u._wrappedAddonDispose(h)},o.activate(d)},b.prototype._wrappedAddonDispose=function(d){if(!d.isDisposed){for(var o=-1,u=0;u<this._addons.length;u++)if(this._addons[u]===d){o=u;break}if(o===-1)throw new Error("Could not dispose an addon that has not been loaded");d.isDisposed=!0,d.dispose.apply(d.instance),this._addons.splice(o,1)}},b}();s.AddonManager=p}])})}}]);