|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5111],{40001:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return r}});var d=o(60499),m=o(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"},_=b,a=o(7657),f=function(s,e){return m.createElement(a.Z,(0,d.Z)({},s,{ref:e,icon:_}))},h=m.forwardRef(f),r=h},73331:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return r}});var d=o(60499),m=o(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"},_=b,a=o(7657),f=function(s,e){return m.createElement(a.Z,(0,d.Z)({},s,{ref:e,icon:_}))},h=m.forwardRef(f),r=h},15277:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return r}});var d=o(60499),m=o(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"},_=b,a=o(7657),f=function(s,e){return m.createElement(a.Z,(0,d.Z)({},s,{ref:e,icon:_}))},h=m.forwardRef(f),r=h},47472:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return r}});var d=o(60499),m=o(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"},_=b,a=o(7657),f=function(s,e){return m.createElement(a.Z,(0,d.Z)({},s,{ref:e,icon:_}))},h=m.forwardRef(f),r=h},68196:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return Le}});var d=o(85899),m=o(72190),b=o(42244),_=o(43403),a=o(92310),f=o.n(a),h=o(29301),r=o(76846),n=o(96452),s=o(6089),e=o(80402),u=o(34280),t=o(49658),i=o(59301),l=o(60499),c=o(77900),p=o(8654);function x(oe){var se=oe.prefixCls,ee=oe.align,me=oe.arrow,G=oe.arrowPos,ae=me||{},be=ae.className,Ee=ae.content,ye=G.x,ue=ye===void 0?0:ye,fe=G.y,Q=fe===void 0?0:fe,R=i.useRef();if(!ee||!ee.points)return null;var X={position:"absolute"};if(ee.autoArrow!==!1){var F=ee.points[0],re=ee.points[1],xe=F[0],Ce=F[1],Fe=re[0],I=re[1];xe===Fe||!["t","b"].includes(xe)?X.top=Q:xe==="t"?X.top=0:X.bottom=0,Ce===I||!["l","r"].includes(Ce)?X.left=ue:Ce==="l"?X.left=0:X.right=0}return i.createElement("div",{ref:R,className:f()("".concat(se,"-arrow"),be),style:X},Ee)}function v(oe){var se=oe.prefixCls,ee=oe.open,me=oe.zIndex,G=oe.mask,ae=oe.motion;return G?i.createElement(c.default,(0,l.Z)({},ae,{motionAppear:!0,visible:ee,removeOnLeave:!0}),function(be){var Ee=be.className;return i.createElement("div",{style:{zIndex:me},className:f()("".concat(se,"-mask"),Ee)})}):null}var y=i.memo(function(oe){var se=oe.children;return se},function(oe,se){return se.cache}),g=y,w=i.forwardRef(function(oe,se){var ee=oe.popup,me=oe.className,G=oe.prefixCls,ae=oe.style,be=oe.target,Ee=oe.onVisibleChanged,ye=oe.open,ue=oe.keepDom,fe=oe.fresh,Q=oe.onClick,R=oe.mask,X=oe.arrow,F=oe.arrowPos,re=oe.align,xe=oe.motion,Ce=oe.maskMotion,Fe=oe.forceRender,I=oe.getPopupContainer,de=oe.autoDestroy,_e=oe.portal,N=oe.zIndex,Z=oe.onMouseEnter,q=oe.onMouseLeave,B=oe.onPointerEnter,te=oe.onPointerDownCapture,T=oe.ready,ce=oe.offsetX,pe=oe.offsetY,C=oe.offsetR,ie=oe.offsetB,V=oe.onAlign,M=oe.onPrepare,W=oe.stretch,Y=oe.targetWidth,Ae=oe.targetHeight,we=typeof ee=="function"?ee():ee,ge=ye||ue,Oe=(I==null?void 0:I.length)>0,We=i.useState(!I||!Oe),Pe=(0,m.Z)(We,2),Be=Pe[0],$e=Pe[1];if((0,u.Z)(function(){!Be&&Oe&&be&&$e(!0)},[Be,Oe,be]),!Be)return null;var Ze="auto",Ve={left:"-1000vw",top:"-1000vh",right:Ze,bottom:Ze};if(T||!ye){var Je,et=re.points,Ue=re.dynamicInset||((Je=re._experimental)===null||Je===void 0?void 0:Je.dynamicInset),Ye=Ue&&et[0][1]==="r",qe=Ue&&et[0][0]==="b";Ye?(Ve.right=C,Ve.left=Ze):(Ve.left=ce,Ve.right=Ze),qe?(Ve.bottom=ie,Ve.top=Ze):(Ve.top=pe,Ve.bottom=Ze)}var Qe={};return W&&(W.includes("height")&&Ae?Qe.height=Ae:W.includes("minHeight")&&Ae&&(Qe.minHeight=Ae),W.includes("width")&&Y?Qe.width=Y:W.includes("minWidth")&&Y&&(Qe.minWidth=Y)),ye||(Qe.pointerEvents="none"),i.createElement(_e,{open:Fe||ge,getContainer:I&&function(){return I(be)},autoDestroy:de},i.createElement(v,{prefixCls:G,open:ye,zIndex:N,mask:R,motion:Ce}),i.createElement(h.Z,{onResize:V,disabled:!ye},function(je){return i.createElement(c.default,(0,l.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Fe,leavedClassName:"".concat(G,"-hidden")},xe,{onAppearPrepare:M,onEnterPrepare:M,visible:ye,onVisibleChanged:function(at){var ft;xe==null||(ft=xe.onVisibleChanged)===null||ft===void 0||ft.call(xe,at),Ee(at)}}),function(rt,at){var ft=rt.className,xt=rt.style,lt=f()(G,ft,me);return i.createElement("div",{ref:(0,p.sQ)(je,se,at),className:lt,style:(0,d.Z)((0,d.Z)((0,d.Z)((0,d.Z)({"--arrow-x":"".concat(F.x||0,"px"),"--arrow-y":"".concat(F.y||0,"px")},Ve),Qe),xt),{},{boxSizing:"border-box",zIndex:N},ae),onMouseEnter:Z,onMouseLeave:q,onPointerEnter:B,onClick:Q,onPointerDownCapture:te},X&&i.createElement(x,{prefixCls:G,arrow:X,arrowPos:F,align:re}),i.createElement(g,{cache:!ye&&!fe},we))})}))}),E=w,S=i.forwardRef(function(oe,se){var ee=oe.children,me=oe.getTriggerDOMNode,G=(0,p.Yr)(ee),ae=i.useCallback(function(Ee){(0,p.mH)(se,me?me(Ee):Ee)},[me]),be=(0,p.x1)(ae,(0,p.C4)(ee));return G?i.cloneElement(ee,{ref:be}):ee}),k=S,D=i.createContext(null),L=D;function z(oe){return oe?Array.isArray(oe)?oe:[oe]:[]}function j(oe,se,ee,me){return i.useMemo(function(){var G=z(ee!=null?ee:se),ae=z(me!=null?me:se),be=new Set(G),Ee=new Set(ae);return oe&&(be.has("hover")&&(be.delete("hover"),be.add("click")),Ee.has("hover")&&(Ee.delete("hover"),Ee.add("click"))),[be,Ee]},[oe,se,ee,me])}var le=o(29194);function U(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ee=arguments.length>2?arguments[2]:void 0;return ee?oe[0]===se[0]:oe[0]===se[0]&&oe[1]===se[1]}function J(oe,se,ee,me){for(var G=ee.points,ae=Object.keys(oe),be=0;be<ae.length;be+=1){var Ee,ye=ae[be];if(U((Ee=oe[ye])===null||Ee===void 0?void 0:Ee.points,G,me))return"".concat(se,"-placement-").concat(ye)}return""}function A(oe,se,ee,me){return se||(ee?{motionName:"".concat(oe,"-").concat(ee)}:me?{motionName:me}:null)}function P(oe){return oe.ownerDocument.defaultView}function K(oe){for(var se=[],ee=oe==null?void 0:oe.parentElement,me=["hidden","scroll","clip","auto"];ee;){var G=P(ee).getComputedStyle(ee),ae=G.overflowX,be=G.overflowY,Ee=G.overflow;[ae,be,Ee].some(function(ye){return me.includes(ye)})&&se.push(ee),ee=ee.parentElement}return se}function $(oe){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(oe)?se:oe}function H(oe){return $(parseFloat(oe),0)}function ne(oe,se){var ee=(0,d.Z)({},oe);return(se||[]).forEach(function(me){if(!(me instanceof HTMLBodyElement||me instanceof HTMLHtmlElement)){var G=P(me).getComputedStyle(me),ae=G.overflow,be=G.overflowClipMargin,Ee=G.borderTopWidth,ye=G.borderBottomWidth,ue=G.borderLeftWidth,fe=G.borderRightWidth,Q=me.getBoundingClientRect(),R=me.offsetHeight,X=me.clientHeight,F=me.offsetWidth,re=me.clientWidth,xe=H(Ee),Ce=H(ye),Fe=H(ue),I=H(fe),de=$(Math.round(Q.width/F*1e3)/1e3),_e=$(Math.round(Q.height/R*1e3)/1e3),N=(F-re-Fe-I)*de,Z=(R-X-xe-Ce)*_e,q=xe*_e,B=Ce*_e,te=Fe*de,T=I*de,ce=0,pe=0;if(ae==="clip"){var C=H(be);ce=C*de,pe=C*_e}var ie=Q.x+te-ce,V=Q.y+q-pe,M=ie+Q.width+2*ce-te-T-N,W=V+Q.height+2*pe-q-B-Z;ee.left=Math.max(ee.left,ie),ee.top=Math.max(ee.top,V),ee.right=Math.min(ee.right,M),ee.bottom=Math.min(ee.bottom,W)}}),ee}function ve(oe){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ee="".concat(se),me=ee.match(/^(.*)\%$/);return me?oe*(parseFloat(me[1])/100):parseFloat(ee)}function Se(oe,se){var ee=se||[],me=(0,m.Z)(ee,2),G=me[0],ae=me[1];return[ve(oe.width,G),ve(oe.height,ae)]}function He(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[oe[0],oe[1]]}function Me(oe,se){var ee=se[0],me=se[1],G,ae;return ee==="t"?ae=oe.y:ee==="b"?ae=oe.y+oe.height:ae=oe.y+oe.height/2,me==="l"?G=oe.x:me==="r"?G=oe.x+oe.width:G=oe.x+oe.width/2,{x:G,y:ae}}function he(oe,se){var ee={t:"b",b:"t",l:"r",r:"l"};return oe.map(function(me,G){return G===se?ee[me]||"c":me}).join("")}function ke(oe,se,ee,me,G,ae,be){var Ee=i.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:G[me]||{}}),ye=(0,m.Z)(Ee,2),ue=ye[0],fe=ye[1],Q=i.useRef(0),R=i.useMemo(function(){return se?K(se):[]},[se]),X=i.useRef({}),F=function(){X.current={}};oe||F();var re=(0,s.Z)(function(){if(se&&ee&&oe){let Et=function(ur,Dt){var Nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mt,fr=ge.x+ur,Rr=ge.y+Dt,jr=fr+qe,Zr=Rr+Ye,Vr=Math.max(fr,Nt.left),ze=Math.max(Rr,Nt.top),Ge=Math.min(jr,Nt.right),ot=Math.min(Zr,Nt.bottom);return Math.max(0,(Ge-Vr)*(ot-ze))},ir=function(){It=ge.y+st,Bt=It+Ye,Zt=ge.x+it,Tt=Zt+qe};var Fe,I,de,_e,N=se,Z=N.ownerDocument,q=P(N),B=q.getComputedStyle(N),te=B.position,T=N.style.left,ce=N.style.top,pe=N.style.right,C=N.style.bottom,ie=N.style.overflow,V=(0,d.Z)((0,d.Z)({},G[me]),ae),M=Z.createElement("div");(Fe=N.parentElement)===null||Fe===void 0||Fe.appendChild(M),M.style.left="".concat(N.offsetLeft,"px"),M.style.top="".concat(N.offsetTop,"px"),M.style.position=te,M.style.height="".concat(N.offsetHeight,"px"),M.style.width="".concat(N.offsetWidth,"px"),N.style.left="0",N.style.top="0",N.style.right="auto",N.style.bottom="auto",N.style.overflow="hidden";var W;if(Array.isArray(ee))W={x:ee[0],y:ee[1],width:0,height:0};else{var Y,Ae,we=ee.getBoundingClientRect();we.x=(Y=we.x)!==null&&Y!==void 0?Y:we.left,we.y=(Ae=we.y)!==null&&Ae!==void 0?Ae:we.top,W={x:we.x,y:we.y,width:we.width,height:we.height}}var ge=N.getBoundingClientRect(),Oe=q.getComputedStyle(N),We=Oe.height,Pe=Oe.width;ge.x=(I=ge.x)!==null&&I!==void 0?I:ge.left,ge.y=(de=ge.y)!==null&&de!==void 0?de:ge.top;var Be=Z.documentElement,$e=Be.clientWidth,Ze=Be.clientHeight,Ve=Be.scrollWidth,Je=Be.scrollHeight,et=Be.scrollTop,Ue=Be.scrollLeft,Ye=ge.height,qe=ge.width,Qe=W.height,je=W.width,rt={left:0,top:0,right:$e,bottom:Ze},at={left:-Ue,top:-et,right:Ve-Ue,bottom:Je-et},ft=V.htmlRegion,xt="visible",lt="visibleFirst";ft!=="scroll"&&ft!==lt&&(ft=xt);var ut=ft===lt,_t=ne(at,R),tt=ne(rt,R),mt=ft===xt?tt:_t,nt=ut?tt:mt;N.style.left="auto",N.style.top="auto",N.style.right="0",N.style.bottom="0";var Pt=N.getBoundingClientRect();N.style.left=T,N.style.top=ce,N.style.right=pe,N.style.bottom=C,N.style.overflow=ie,(_e=N.parentElement)===null||_e===void 0||_e.removeChild(M);var vt=$(Math.round(qe/parseFloat(Pe)*1e3)/1e3),yt=$(Math.round(Ye/parseFloat(We)*1e3)/1e3);if(vt===0||yt===0||(0,r.Sh)(ee)&&!(0,le.Z)(ee))return;var Ut=V.offset,Wt=V.targetOffset,kt=Se(ge,Ut),Jt=(0,m.Z)(kt,2),Ct=Jt[0],At=Jt[1],er=Se(W,Wt),bt=(0,m.Z)(er,2),Mt=bt[0],Or=bt[1];W.x-=Mt,W.y-=Or;var Tr=V.points||[],dr=(0,m.Z)(Tr,2),Dr=dr[0],hr=dr[1],Ot=He(hr),pt=He(Dr),ht=Me(W,Ot),_r=Me(ge,pt),St=(0,d.Z)({},V),it=ht.x-_r.x+Ct,st=ht.y-_r.y+At,Rt=Et(it,st),zt=Et(it,st,tt),wt=Me(W,["t","l"]),vr=Me(ge,["t","l"]),nr=Me(W,["b","r"]),$t=Me(ge,["b","r"]),jt=V.overflow||{},Pr=jt.adjustX,pr=jt.adjustY,tr=jt.shiftX,or=jt.shiftY,gr=function(Dt){return typeof Dt=="boolean"?Dt:Dt>=0},It,Bt,Zt,Tt;ir();var mr=gr(pr),gt=pt[0]===Ot[0];if(mr&&pt[0]==="t"&&(Bt>nt.bottom||X.current.bt)){var Vt=st;gt?Vt-=Ye-Qe:Vt=wt.y-$t.y-At;var yr=Et(it,Vt),Mr=Et(it,Vt,tt);yr>Rt||yr===Rt&&(!ut||Mr>=zt)?(X.current.bt=!0,st=Vt,At=-At,St.points=[he(pt,0),he(Ot,0)]):X.current.bt=!1}if(mr&&pt[0]==="b"&&(It<nt.top||X.current.tb)){var Qt=st;gt?Qt+=Ye-Qe:Qt=nr.y-vr.y-At;var br=Et(it,Qt),Ir=Et(it,Qt,tt);br>Rt||br===Rt&&(!ut||Ir>=zt)?(X.current.tb=!0,st=Qt,At=-At,St.points=[he(pt,0),he(Ot,0)]):X.current.tb=!1}var xr=gr(Pr),Cr=pt[1]===Ot[1];if(xr&&pt[1]==="l"&&(Tt>nt.right||X.current.rl)){var Gt=it;Cr?Gt-=qe-je:Gt=wt.x-$t.x-Ct;var qt=Et(Gt,st),sr=Et(Gt,st,tt);qt>Rt||qt===Rt&&(!ut||sr>=zt)?(X.current.rl=!0,it=Gt,Ct=-Ct,St.points=[he(pt,1),he(Ot,1)]):X.current.rl=!1}if(xr&&pt[1]==="r"&&(Zt<nt.left||X.current.lr)){var Yt=it;Cr?Yt+=qe-je:Yt=nr.x-vr.x-Ct;var ar=Et(Yt,st),rr=Et(Yt,st,tt);ar>Rt||ar===Rt&&(!ut||rr>=zt)?(X.current.lr=!0,it=Yt,Ct=-Ct,St.points=[he(pt,1),he(Ot,1)]):X.current.lr=!1}ir();var Lt=tr===!0?0:tr;typeof Lt=="number"&&(Zt<tt.left&&(it-=Zt-tt.left-Ct,W.x+je<tt.left+Lt&&(it+=W.x-tt.left+je-Lt)),Tt>tt.right&&(it-=Tt-tt.right-Ct,W.x>tt.right-Lt&&(it+=W.x-tt.right+Lt)));var Kt=or===!0?0:or;typeof Kt=="number"&&(It<tt.top&&(st-=It-tt.top-At,W.y+Qe<tt.top+Kt&&(st+=W.y-tt.top+Qe-Kt)),Bt>tt.bottom&&(st-=Bt-tt.bottom-At,W.y>tt.bottom-Kt&&(st+=W.y-tt.bottom+Kt)));var Xt=ge.x+it,Ht=Xt+qe,lr=ge.y+st,Br=lr+Ye,Sr=W.x,wr=Sr+je,Er=W.y,Kr=Er+Qe,Xr=Math.max(Xt,Sr),kr=Math.min(Ht,wr),Hr=(Xr+kr)/2,Nr=Hr-Xt,Ar=Math.max(lr,Er),Ur=Math.min(Br,Kr),Wr=(Ar+Ur)/2,zr=Wr-lr;be==null||be(se,St);var Ft=Pt.right-ge.x-(it+ge.width),cr=Pt.bottom-ge.y-(st+ge.height);vt===1&&(it=Math.floor(it),Ft=Math.floor(Ft)),yt===1&&(st=Math.floor(st),cr=Math.floor(cr));var $r={ready:!0,offsetX:it/vt,offsetY:st/yt,offsetR:Ft/vt,offsetB:cr/yt,arrowX:Nr/vt,arrowY:zr/yt,scaleX:vt,scaleY:yt,align:St};fe($r)}}),xe=function(){Q.current+=1;var I=Q.current;Promise.resolve().then(function(){Q.current===I&&re()})},Ce=function(){fe(function(I){return(0,d.Z)((0,d.Z)({},I),{},{ready:!1})})};return(0,u.Z)(Ce,[me]),(0,u.Z)(function(){oe||Ce()},[oe]),[ue.ready,ue.offsetX,ue.offsetY,ue.offsetR,ue.offsetB,ue.arrowX,ue.arrowY,ue.scaleX,ue.scaleY,ue.align,xe]}var Ke=o(77654);function Te(oe,se,ee,me,G){(0,u.Z)(function(){if(oe&&se&&ee){let Q=function(){me(),G()};var ae=se,be=ee,Ee=K(ae),ye=K(be),ue=P(be),fe=new Set([ue].concat((0,Ke.Z)(Ee),(0,Ke.Z)(ye)));return fe.forEach(function(R){R.addEventListener("scroll",Q,{passive:!0})}),ue.addEventListener("resize",Q,{passive:!0}),me(),function(){fe.forEach(function(R){R.removeEventListener("scroll",Q),ue.removeEventListener("resize",Q)})}}},[oe,se,ee])}var Ie=o(48736);function De(oe,se,ee,me,G,ae,be,Ee){var ye=i.useRef(oe);ye.current=oe;var ue=i.useRef(!1);i.useEffect(function(){if(se&&me&&(!G||ae)){var Q=function(){ue.current=!1},R=function(de){var _e;ye.current&&!be(((_e=de.composedPath)===null||_e===void 0||(_e=_e.call(de))===null||_e===void 0?void 0:_e[0])||de.target)&&!ue.current&&Ee(!1)},X=P(me);X.addEventListener("pointerdown",Q,!0),X.addEventListener("mousedown",R,!0),X.addEventListener("contextmenu",R,!0);var F=(0,n.A)(ee);if(F&&(F.addEventListener("mousedown",R,!0),F.addEventListener("contextmenu",R,!0)),0)var re,xe,Ce,Fe;return function(){X.removeEventListener("pointerdown",Q,!0),X.removeEventListener("mousedown",R,!0),X.removeEventListener("contextmenu",R,!0),F&&(F.removeEventListener("mousedown",R,!0),F.removeEventListener("contextmenu",R,!0))}}},[se,ee,me,G,ae]);function fe(){ue.current=!0}return fe}var Ne=["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 Re(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_.Z,se=i.forwardRef(function(ee,me){var G=ee.prefixCls,ae=G===void 0?"rc-trigger-popup":G,be=ee.children,Ee=ee.action,ye=Ee===void 0?"hover":Ee,ue=ee.showAction,fe=ee.hideAction,Q=ee.popupVisible,R=ee.defaultPopupVisible,X=ee.onPopupVisibleChange,F=ee.afterPopupVisibleChange,re=ee.mouseEnterDelay,xe=ee.mouseLeaveDelay,Ce=xe===void 0?.1:xe,Fe=ee.focusDelay,I=ee.blurDelay,de=ee.mask,_e=ee.maskClosable,N=_e===void 0?!0:_e,Z=ee.getPopupContainer,q=ee.forceRender,B=ee.autoDestroy,te=ee.destroyPopupOnHide,T=ee.popup,ce=ee.popupClassName,pe=ee.popupStyle,C=ee.popupPlacement,ie=ee.builtinPlacements,V=ie===void 0?{}:ie,M=ee.popupAlign,W=ee.zIndex,Y=ee.stretch,Ae=ee.getPopupClassNameFromAlign,we=ee.fresh,ge=ee.alignPoint,Oe=ee.onPopupClick,We=ee.onPopupAlign,Pe=ee.arrow,Be=ee.popupMotion,$e=ee.maskMotion,Ze=ee.popupTransitionName,Ve=ee.popupAnimation,Je=ee.maskTransitionName,et=ee.maskAnimation,Ue=ee.className,Ye=ee.getTriggerDOMNode,qe=(0,b.Z)(ee,Ne),Qe=B||te||!1,je=i.useState(!1),rt=(0,m.Z)(je,2),at=rt[0],ft=rt[1];(0,u.Z)(function(){ft((0,t.Z)())},[]);var xt=i.useRef({}),lt=i.useContext(L),ut=i.useMemo(function(){return{registerSubPopup:function(Ge,ot){xt.current[Ge]=ot,lt==null||lt.registerSubPopup(Ge,ot)}}},[lt]),_t=(0,e.Z)(),tt=i.useState(null),mt=(0,m.Z)(tt,2),nt=mt[0],Pt=mt[1],vt=i.useRef(null),yt=(0,s.Z)(function(ze){vt.current=ze,(0,r.Sh)(ze)&&nt!==ze&&Pt(ze),lt==null||lt.registerSubPopup(_t,ze)}),Ut=i.useState(null),Wt=(0,m.Z)(Ut,2),kt=Wt[0],Jt=Wt[1],Ct=i.useRef(null),At=(0,s.Z)(function(ze){(0,r.Sh)(ze)&&kt!==ze&&(Jt(ze),Ct.current=ze)}),er=i.Children.only(be),bt=(er==null?void 0:er.props)||{},Mt={},Or=(0,s.Z)(function(ze){var Ge,ot,dt=kt;return(dt==null?void 0:dt.contains(ze))||((Ge=(0,n.A)(dt))===null||Ge===void 0?void 0:Ge.host)===ze||ze===dt||(nt==null?void 0:nt.contains(ze))||((ot=(0,n.A)(nt))===null||ot===void 0?void 0:ot.host)===ze||ze===nt||Object.values(xt.current).some(function(ct){return(ct==null?void 0:ct.contains(ze))||ze===ct})}),Tr=A(ae,Be,Ve,Ze),dr=A(ae,$e,et,Je),Dr=i.useState(R||!1),hr=(0,m.Z)(Dr,2),Ot=hr[0],pt=hr[1],ht=Q!=null?Q:Ot,_r=(0,s.Z)(function(ze){Q===void 0&&pt(ze)});(0,u.Z)(function(){pt(Q||!1)},[Q]);var St=i.useRef(ht);St.current=ht;var it=i.useRef([]);it.current=[];var st=(0,s.Z)(function(ze){var Ge;_r(ze),((Ge=it.current[it.current.length-1])!==null&&Ge!==void 0?Ge:ht)!==ze&&(it.current.push(ze),X==null||X(ze))}),Rt=i.useRef(),zt=function(){clearTimeout(Rt.current)},wt=function(Ge){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;zt(),ot===0?st(Ge):Rt.current=setTimeout(function(){st(Ge)},ot*1e3)};i.useEffect(function(){return zt},[]);var vr=i.useState(!1),nr=(0,m.Z)(vr,2),$t=nr[0],jt=nr[1];(0,u.Z)(function(ze){(!ze||ht)&&jt(!0)},[ht]);var Pr=i.useState(null),pr=(0,m.Z)(Pr,2),tr=pr[0],or=pr[1],gr=i.useState(null),It=(0,m.Z)(gr,2),Bt=It[0],Zt=It[1],Tt=function(Ge){Zt([Ge.clientX,Ge.clientY])},mr=ke(ht,nt,ge&&Bt!==null?Bt:kt,C,V,M,We),gt=(0,m.Z)(mr,11),Vt=gt[0],yr=gt[1],Mr=gt[2],Qt=gt[3],br=gt[4],Ir=gt[5],xr=gt[6],Cr=gt[7],Gt=gt[8],qt=gt[9],sr=gt[10],Yt=j(at,ye,ue,fe),ar=(0,m.Z)(Yt,2),rr=ar[0],Lt=ar[1],Kt=rr.has("click"),Xt=Lt.has("click")||Lt.has("contextMenu"),Ht=(0,s.Z)(function(){$t||sr()}),lr=function(){St.current&&ge&&Xt&&wt(!1)};Te(ht,kt,nt,Ht,lr),(0,u.Z)(function(){Ht()},[Bt,C]),(0,u.Z)(function(){ht&&!(V!=null&&V[C])&&Ht()},[JSON.stringify(M)]);var Br=i.useMemo(function(){var ze=J(V,ae,qt,ge);return f()(ze,Ae==null?void 0:Ae(qt))},[qt,Ae,V,ae,ge]);i.useImperativeHandle(me,function(){return{nativeElement:Ct.current,popupElement:vt.current,forceAlign:Ht}});var Sr=i.useState(0),wr=(0,m.Z)(Sr,2),Er=wr[0],Kr=wr[1],Xr=i.useState(0),kr=(0,m.Z)(Xr,2),Hr=kr[0],Nr=kr[1],Ar=function(){if(Y&&kt){var Ge=kt.getBoundingClientRect();Kr(Ge.width),Nr(Ge.height)}},Ur=function(){Ar(),Ht()},Wr=function(Ge){jt(!1),sr(),F==null||F(Ge)},zr=function(){return new Promise(function(Ge){Ar(),or(function(){return Ge})})};(0,u.Z)(function(){tr&&(sr(),tr(),or(null))},[tr]);function Ft(ze,Ge,ot,dt){Mt[ze]=function(ct){var Lr;dt==null||dt(ct),wt(Ge,ot);for(var Qr=arguments.length,Gr=new Array(Qr>1?Qr-1:0),Fr=1;Fr<Qr;Fr++)Gr[Fr-1]=arguments[Fr];(Lr=bt[ze])===null||Lr===void 0||Lr.call.apply(Lr,[bt,ct].concat(Gr))}}(Kt||Xt)&&(Mt.onClick=function(ze){var Ge;St.current&&Xt?wt(!1):!St.current&&Kt&&(Tt(ze),wt(!0));for(var ot=arguments.length,dt=new Array(ot>1?ot-1:0),ct=1;ct<ot;ct++)dt[ct-1]=arguments[ct];(Ge=bt.onClick)===null||Ge===void 0||Ge.call.apply(Ge,[bt,ze].concat(dt))});var cr=De(ht,Xt,kt,nt,de,N,Or,wt),$r=rr.has("hover"),Et=Lt.has("hover"),ir,ur;$r&&(Ft("onMouseEnter",!0,re,function(ze){Tt(ze)}),Ft("onPointerEnter",!0,re,function(ze){Tt(ze)}),ir=function(Ge){(ht||$t)&&nt!==null&&nt!==void 0&&nt.contains(Ge.target)&&wt(!0,re)},ge&&(Mt.onMouseMove=function(ze){var Ge;(Ge=bt.onMouseMove)===null||Ge===void 0||Ge.call(bt,ze)})),Et&&(Ft("onMouseLeave",!1,Ce),Ft("onPointerLeave",!1,Ce),ur=function(){wt(!1,Ce)}),rr.has("focus")&&Ft("onFocus",!0,Fe),Lt.has("focus")&&Ft("onBlur",!1,I),rr.has("contextMenu")&&(Mt.onContextMenu=function(ze){var Ge;St.current&&Lt.has("contextMenu")?wt(!1):(Tt(ze),wt(!0)),ze.preventDefault();for(var ot=arguments.length,dt=new Array(ot>1?ot-1:0),ct=1;ct<ot;ct++)dt[ct-1]=arguments[ct];(Ge=bt.onContextMenu)===null||Ge===void 0||Ge.call.apply(Ge,[bt,ze].concat(dt))}),Ue&&(Mt.className=f()(bt.className,Ue));var Dt=i.useRef(!1);Dt.current||(Dt.current=q||ht||$t);var Nt=(0,d.Z)((0,d.Z)({},bt),Mt),fr={},Rr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Rr.forEach(function(ze){qe[ze]&&(fr[ze]=function(){for(var Ge,ot=arguments.length,dt=new Array(ot),ct=0;ct<ot;ct++)dt[ct]=arguments[ct];(Ge=Nt[ze])===null||Ge===void 0||Ge.call.apply(Ge,[Nt].concat(dt)),qe[ze].apply(qe,dt)})});var jr=i.cloneElement(er,(0,d.Z)((0,d.Z)({},Nt),fr)),Zr={x:Ir,y:xr},Vr=Pe?(0,d.Z)({},Pe!==!0?Pe:{}):null;return i.createElement(i.Fragment,null,i.createElement(h.Z,{disabled:!ht,ref:At,onResize:Ur},i.createElement(k,{getTriggerDOMNode:Ye},jr)),Dt.current&&i.createElement(L.Provider,{value:ut},i.createElement(E,{portal:oe,ref:yt,prefixCls:ae,popup:T,className:f()(ce,Br),style:pe,target:kt,onMouseEnter:ir,onMouseLeave:ur,onPointerEnter:ir,zIndex:W,open:ht,keepDom:$t,fresh:we,onClick:Oe,onPointerDownCapture:cr,mask:de,motion:Tr,maskMotion:dr,onVisibleChanged:Wr,onPrepare:zr,forceRender:q,autoDestroy:Qe,getPopupContainer:Z,align:qt,arrow:Vr,arrowPos:Zr,ready:Vt,offsetX:yr,offsetY:Mr,offsetR:Qt,offsetB:br,onAlign:Ht,stretch:Y,targetWidth:Er/Cr,targetHeight:Hr/Gt})))});return se}var Le=Re(_.Z)},66744:function(){"use strict"},4420:function(){"use strict"},12510:function(Xe,O,o){"use strict";o.d(O,{G0:function(){return me},JW:function(){return He},Jd:function(){return K},Kl:function(){return Me},L5:function(){return l},MH:function(){return ve},MI:function(){return Ne},Qo:function(){return E},SO:function(){return i},Tf:function(){return v},VT:function(){return U},XO:function(){return u},Xy:function(){return g},Y0:function(){return z},Ye:function(){return se},Yv:function(){return De},ZH:function(){return Ke},am:function(){return P},bD:function(){return Re},eA:function(){return w},fA:function(){return ke},fY:function(){return k},g6:function(){return t},g7:function(){return Le},gT:function(){return D},gn:function(){return Te},h$:function(){return Ie},hG:function(){return y},i8:function(){return he},j3:function(){return Se},lH:function(){return H},li:function(){return c},n4:function(){return p},pU:function(){return j},qK:function(){return x},sA:function(){return le},sP:function(){return ne},t$:function(){return $},wj:function(){return ee},zl:function(){return S}});var d=o(49317),m=o(76406),b=Object.defineProperty,_=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,h=(G,ae,be)=>ae in G?b(G,ae,{enumerable:!0,configurable:!0,writable:!0,value:be}):G[ae]=be,r=(G,ae)=>{for(var be in ae||(ae={}))a.call(ae,be)&&h(G,be,ae[be]);if(_)for(var be of _(ae))f.call(ae,be)&&h(G,be,ae[be]);return G},n=(G,ae,be)=>new Promise((Ee,ye)=>{var ue=R=>{try{Q(be.next(R))}catch(X){ye(X)}},fe=R=>{try{Q(be.throw(R))}catch(X){ye(X)}},Q=R=>R.done?Ee(R.value):Promise.resolve(R.value).then(ue,fe);Q((be=be.apply(G,ae)).next())});const s=(0,m.oP)(),e={};s!=null&&s.homework_common_id&&(e.homework_common_id=s==null?void 0:s.homework_common_id),s!=null&&s.exercisesId&&(e.exercise_id=s==null?void 0:s.exercisesId),console.log(s,e,"urlParamsAll");function u(G,ae){return(0,d.U2)(`tasks/${G}.json`,r(r({},ae),e))}function t(G,ae={}){return(0,d.U2)(`myshixuns/${G}/challenges.json`,r({},ae))}function i(G,ae){return(0,d.U2)(`myshixuns/${G}/subject_challenges.json`,ae)}function l(G,ae,be){return(0,d.U2)(`tasks/${G}/star.json`,{shixun_id:ae,star:be})}function c(G,ae){return ae.path&&(ae.path=encodeURIComponent(ae.path)),(0,d.U2)(`tasks/${G}/rep_content.json`,r(r({},ae),e))}function p(G,ae){return(0,d.v_)(`myshixuns/${G}/update_file.json`,r(r({},ae),e))}function x(G,ae){return(0,d.U2)(`tasks/${G}/reset_original_code.json`,r(r({},ae),e))}function v(G,ae){return(0,d.v_)(`myshixuns/${G}/reset_repository.json`,ae)}function y(G,ae){return(0,d.U2)(`tasks/${G}/reset_passed_code.json`,r(r({},ae),e))}function g(G,ae){return(0,d.v_)(`tasks/${G}/game_build.json`,r(r({},ae),e))}function w(G){return(0,d.ZP)("http://localhost:49352/api/game_build",{method:"post",body:G})}function E(G,ae){return(0,d.U2)(`tasks/${G}/game_status.json`,r(r({},ae),e))}function S(G,ae){return(0,d.v_)(`tasks/${G}/choose_build.json`,r(r({},ae),e))}function k(G){return(0,d.U2)(`myshixuns/${G}/get_remaining_time.json`)}function D(G){return(0,d.U2)(`tasks/${G}/picture_display.json`,e)}function L(G,ae){return get(`courses/${G}/inform_detail.json`,ae)}function z(G){return(0,d.v_)(`tasks/${G}/plus_or_cancel_praise.json`)}function j(G,ae={}){return(0,d.v_)(`myshixuns/${G}/repository.json`,ae)}function le(G,ae={}){return(0,d.U2)(`myshixuns/${G}/start.json`,ae)}function U(G,ae={}){return(0,d.v_)(`myshixuns/${G}/force_delete_pod.json`,ae)}function J(G,ae={}){return get(`myshixuns/${G}/set_tpisession.json`,ae)}function A(G){return get(`myshixuns/${G}/reset_pod.json`)}function P(G,ae){return(0,d.U2)(`myshixuns/${G}/reset_pod.json`,ae)}function K(G,ae){return(0,d.ZP)(`/api/tasks/${G}/reboot_esc.json`,{method:"post",body:ae})}function $(G){return(0,d.U2)(`tasks/${G}/check_test_sets.json`)}function H(G){return(0,d.U2)(`tasks/${G==null?void 0:G.id}/get_answer_info.json`,{homework_common_id:G==null?void 0:G.homework_common_id,cost_time:G==null?void 0:G.cost_time})}function ne(G){return(0,d.U2)(`tasks/${G==null?void 0:G.id}/get_choose_answer.json`,{homework_common_id:G==null?void 0:G.homework_common_id,cost_time:G==null?void 0:G.cost_time})}function ve(G){return(0,d.U2)(`tasks/${G}/unlock_choose_answer.json`)}function Se(G,ae){return(0,d.U2)(`tasks/${G}/unlock_answer.json`,{answer_id:ae})}function He(G,ae,be,Ee){return(0,d.v_)(`tasks/${G}/set_games_status.json`,r({result:ae,data:be},Ee||{}))}function Me(G,ae){return(0,d.U2)(`myshixuns/${G}/active_pod.json`,ae)}function he(G,ae){return(0,d.U2)(`tasks/${G}/rank_list.json`,ae)}function ke(G,ae){return(0,d.v_)(`tasks/${G}/close_windows_vnc.json`,{tpi_id:ae})}function Ke(G,ae){return(0,d.U2)(`tasks/${G}/commit_files.json`,ae)}function Te(G,ae){return(0,d.U2)(`tasks/${G}/pull_files.json`,ae)}function Ie(G,ae){return(0,d.v_)(`tasks/${G}/log_output`,ae)}function De(G,ae){return(0,d.U2)(`tasks/${G}/stop_log_output.json`,ae)}function Ne(G){return n(this,null,function*(){return(0,d.ZP)(`/api/myshixuns/${G.id}/add_file.json`,{method:"post",body:G})})}function Re(G){return n(this,null,function*(){return(0,d.ZP)(`/api/myshixuns/${G.id}/delete_git_file.json`,{method:"Delete",body:G})})}function Le(G){return n(this,null,function*(){return(0,d.ZP)(`/api/myshixuns/${G.id}/mv_file.json`,{method:"post",body:G})})}function oe(G){return n(this,null,function*(){return G.path&&(G.path=encodeURIComponent(G.path)),Fetch(`/api/tasks/${G.id}/rep_content.json`,{method:"get",params:G})})}function se(G,ae){return(0,d.ZP)(`/api/shixuns/${G}/set_start_permanent.json`,{method:"put",body:ae})}function ee(G){return n(this,null,function*(){return(0,d.ZP)("/api/myshixuns/wuying_record.json",{method:"get",params:G})})}function me(G){return n(this,null,function*(){return(0,d.ZP)("/api/jupyters/save_with_wuying_tpi.json",{method:"Get",params:G})})}},28010:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return _}});var d=o(44283),m={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},b=o(59301),_=({message:a,className:f,children:h,style:r={}})=>b.createElement("div",{className:`custom-spinner ${m.idsRingWrapper} ${f}`},b.createElement("div",{className:m.ldsRing},b.createElement("div",null),b.createElement("div",null),b.createElement("div",null),b.createElement("div",null)),a?b.createElement("p",{style:r},a):null,h,b.createElement(d.Outlet,null))},88487:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return b}});var d=o(59301),m=o(4676);class b extends d.Component{constructor(a){super(a);const f=window.document;this.node=f.createElement("div"),f.body.appendChild(this.node)}render(){const{children:a}=this.props;return(0,m.createPortal)(a,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},19482:function(Xe,O,o){"use strict";o.r(O);var d=o(59301),m=o(44283),b=o(32297),_=o(20967),a=o(4420),f=o(33156),h=o(49317),r=o(59301),n=Object.defineProperty,s=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,t=(p,x,v)=>x in p?n(p,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):p[x]=v,i=(p,x)=>{for(var v in x||(x={}))e.call(x,v)&&t(p,v,x[v]);if(s)for(var v of s(x))u.call(x,v)&&t(p,v,x[v]);return p},l=(p,x,v)=>new Promise((y,g)=>{var w=k=>{try{S(v.next(k))}catch(D){g(D)}},E=k=>{try{S(v.throw(k))}catch(D){g(D)}},S=k=>k.done?y(k.value):Promise.resolve(k.value).then(w,E);S((v=v.apply(p,x)).next())});const c=({classroomList:p,globalSetting:x,loading:v,dispatch:y})=>{var g;const[w,E]=(0,d.useState)({}),[S,k]=(0,d.useState)({}),D=(0,m.useParams)(),[L]=(0,m.useSearchParams)();let z="68yrbx3ech4a";switch(L.get("type")){case"windows":z="hvp5tzfof4wl";break;case"vnc":z="m3ifqz82epo9";break}let j;(0,d.useEffect)(()=>{le()},[]),(0,d.useEffect)(()=>{w.host&&setTimeout(()=>{f.Z.publish("create-socket",1)},500)},[w]);const le=()=>l(void 0,null,function*(){var U,J;const A=yield(0,h.ZP)(`/api/tasks/${L.get("taskId")||z||"68yrbx3ech4a"}.json`,{method:"get"});if(k(i({},A)),L.get("type")==="terminal"){const P=yield(0,h.ZP)(`/api/myshixuns/${(U=A==null?void 0:A.myshixun)==null?void 0:U.identifier}/start.json`,{method:"get",game_id:(J=A==null?void 0:A.game)==null?void 0:J.id});E(i({},(P==null?void 0:P.data)||{}))}L.get("type")});return r.createElement("section",{style:{position:"fixed",width:"100%",height:"100%",zIndex:22,top:0,right:0,bottom:0,left:0}},L.get("type")==="terminal"&&r.createElement(b.Z,{sshConfigData:w,sid:1}),L.get("type")!=="terminal"&&(S==null?void 0:S.challenge)&&r.createElement(_.Z,{taskId:z,myshixunId:(g=S==null?void 0:S.myshixun)==null?void 0:g.identifier,vnc_url:L.get("type")==="vnc",window_vnc_url:L.get("type")==="windows",taskData:S}))};O.default=(0,m.connect)(({classroomList:p,loading:x,globalSetting:v})=>({classroomList:p,globalSetting:v,loading:x.models.classroomList}))(c)},20967:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return K}});var d=o(59301),m=o(62957),b=o(6767),_=o(89787),a=o(28010),f=o(76374),h=o(88487),r=o(44283),n=o(76406),s=o(37568),e=o(7939);const u=s.default.TextArea;var t=({onCancel:$,onSave:H,content:ne})=>{const[ve,Se]=(0,d.useState)(ne);function He(he){Se(he.target.value)}function Me(){H(ve)}return(0,d.useEffect)(()=>{Se(ne)},[ne]),d.createElement("div",{className:"clipboard-box"},d.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),d.createElement(u,{value:ve,onChange:He,className:"clipboard"}),d.createElement("p",null," ",d.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 "),d.createElement("p",null," ",d.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 "),d.createElement("div",{className:"btn-action-container"},d.createElement(e.ZP,{type:"ghost",onClick:$,style:{marginRight:10}},"\u53D6\u6D88"),d.createElement(e.ZP,{type:"primary",onClick:Me},"\u4FDD\u5B58")))},i=o(67195),l=o(12510),c=o(62013),p=o(33156),x=o(49317),v=o(59301),y=Object.defineProperty,g=Object.defineProperties,w=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,D=($,H,ne)=>H in $?y($,H,{enumerable:!0,configurable:!0,writable:!0,value:ne}):$[H]=ne,L=($,H)=>{for(var ne in H||(H={}))S.call(H,ne)&&D($,ne,H[ne]);if(E)for(var ne of E(H))k.call(H,ne)&&D($,ne,H[ne]);return $},z=($,H)=>g($,w(H)),j=($,H,ne)=>new Promise((ve,Se)=>{var He=ke=>{try{he(ne.next(ke))}catch(Ke){Se(Ke)}},Me=ke=>{try{he(ne.throw(ke))}catch(Ke){Se(Ke)}},he=ke=>ke.done?ve(ke.value):Promise.resolve(ke.value).then(He,Me);he((ne=ne.apply($,H)).next())});function le($){return $.replace(/\\u([\dA-Za-z]{4})/g,function(H,ne){return String.fromCharCode(parseInt("0x"+ne))})}function U($){$||($=window.location.search);let H=$.substr(1),ne={};return H.split("&").forEach(function(ve){let Se=ve.split("=");ne[Se[0]]=decodeURIComponent(Se[1])}),ne}const J={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"};var A=($=>($[$.SET_LOADING=0]="SET_LOADING",$[$.SET_IS_LARGE=1]="SET_IS_LARGE",$[$.SET_MES=2]="SET_MES",$[$.SET_STATE=3]="SET_STATE",$[$.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",$[$.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",$[$.UPDATE_ALL=6]="UPDATE_ALL",$))(A||{});function P($,H){switch(H.type){case 0:return z(L({},$),{loading:H.payload});case 1:return L({},z(L({},$),{isLarge:H.payload}));case 2:return z(L({},$),{mes:H.payload});case 3:return L(L({},$),H.payload);case 5:return z(L({},$),{transferContent:H.payload});case 4:return z(L({},$),{showClipBoardBox:H.payload});case 6:return L({loading:$.loading},H.payload);default:throw new Error}}var K=({vnc_url:$,window_vnc_url:H,linux_vnc:ne,virtual_machine:ve,taskData:Se,shixun_environment_id:He,tab_type:Me,instance_startup_type:he,index_tab:ke,tpi_type:Ke})=>{const Te=(0,d.useRef)(),Ie=(0,d.useRef)(),De=(0,d.useRef)(),Ne=(0,d.useRef)(),Re=(0,d.useRef)(),Le=(0,d.useRef)(),oe=(0,d.useRef)(),se=(0,d.useRef)(),[ee,me]=(0,d.useReducer)(P,J),[G,ae]=(0,d.useState)(0),{mes:be,loading:Ee,showClipBoardBox:ye,isLarge:ue,transferContent:fe}=ee,Q=(0,d.useRef)(),R=(0,d.useRef)(),[X]=(0,r.useSearchParams)();let[F,re]=(0,d.useState)(0),xe=(0,d.useRef)();const Ce=(0,r.useParams)();(0,d.useEffect)(()=>()=>{var V,M;(M=(V=Ie.current)==null?void 0:V.disconnect)==null||M.call(V),clearTimeout(se.current),clearInterval(Q.current)},[]),(0,d.useEffect)(()=>{R.current=ee.loading},[ee.loading]);const Fe=()=>{var V;he===2?setTimeout(()=>{pe()},1500):((V=De==null?void 0:De.current)==null?void 0:V.resizeSession)!==void 0&&((0,i.vp)()?De.current.resizeSession=!0:setTimeout(()=>{},900))};(0,d.useEffect)(()=>(document.addEventListener((0,i.gH)(),Fe),()=>{document.removeEventListener((0,i.gH)(),Fe)}),[]);function I(){me({type:4,payload:!1})}function de(){me({type:1,payload:!ue})}function _e(V){return Te.current&&(Ne.current=new f.Z(M=>{var W;for(let Y of M)he===2&&pe(),(Y.target.offsetHeight>0||Y.target.offsetWidth>0)&&V&&(V.scaleViewport=!0,(W=V==null?void 0:V._eventHandlers)==null||W.windowResize())}),Ne.current.observe(Te.current)),Ne.current}const N=()=>j(void 0,null,function*(){var V,M,W,Y,Ae,we,ge,Oe;let We={};X.get("type")==="exercises"?We.exercise_id=X.get("exercisesId"):Ce.courseId&&Ce.homeworkId&&(We.homework_common_id=Ce.homeworkId);const Pe=yield(0,l.sA)((V=Se.myshixun)==null?void 0:V.identifier,L(z(L({},Ce),{taskId:Ce.taskId,shixun_environment_id:He,game_id:(M=Se==null?void 0:Se.game)==null?void 0:M.id,tab_type:Me}),We));if((Y=(W=Pe==null?void 0:Pe.data)==null?void 0:W.data_list)!=null&&Y.length)return p.Z.publish("pod-restrict-data",{identifier:(Ae=Pe==null?void 0:Pe.data)==null?void 0:Ae.identifier,data_list:(we=Pe==null?void 0:Pe.data)==null?void 0:we.data_list}),Promise.reject();if((Pe==null?void 0:Pe.status)===-3)return new Promise((Be,$e)=>j(void 0,null,function*(){m.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>j(void 0,null,function*(){clearTimeout(xe.current),re(0),yield(0,l.fA)(Ce.taskId,Pe==null?void 0:Pe.message),ae(G+1)})})}));if((Pe==null?void 0:Pe.status)===-1)throw new String(Pe==null?void 0:Pe.message);if((Pe==null?void 0:Pe.status)===0)return ve&&((0,n.d8)("PVEAuthCookie",(Oe=(ge=Pe==null?void 0:Pe.data)==null?void 0:ge.cookie_options)==null?void 0:Oe.cookies_value,1),(0,n.d8)("PVELangCookie","zh_CN",1)),p.Z.publish("update-windows-time",Pe==null?void 0:Pe.data),p.Z.publish("send-tabs-result-data",z(L({},Pe==null?void 0:Pe.data),{index_tab:ke})),Pe});function Z(){re(100),clearTimeout(xe.current),setTimeout(()=>{me({type:0,payload:!1})},1300),clearTimeout(Q.current)}const q=()=>{De.current=new c.Z(Te.current,oe.current,{credentials:{password:Le.current},wsProtocols:["binary"],show_dot:!0}),De.current.removeEventListener("disconnect",te),De.current.removeEventListener("connect",Z),De.current.removeEventListener("clipboard",B),window.rfbs2=De.current,Ne.current=_e(De.current),De.current.viewOnly=Ce.view_only||!1,De.current.scaleViewport=Ce.scale||!0,De.current.showDotCursor=!0,De.current.resizeSession=!0,De.current.addEventListener("disconnect",te),De.current.addEventListener("connect",Z),De.current.addEventListener("clipboard",B)};function B(V){const M=le(V.detail.text);me({type:5,payload:M})}function te(){if(H)me({type:0,payload:!0}),ae(G+1);else{if(clearTimeout(se.current),R.current)return;se.current=setTimeout(()=>{ae(G+1)},6e3)}setTimeout(()=>{var V,M;(M=(V=De.current)==null?void 0:V.connect)==null||M.call(V)},3e3)}(0,d.useEffect)(()=>{if(p.Z.subscribe(`reset-linux-windows-vnc-${ke}`,()=>{ae(G+1)}),(H||$||ne||ve)&&Te.current){clearTimeout(xe.current),he===2&&pe(),new Promise(()=>j(void 0,null,function*(){var Y,Ae,we,ge,Oe;const We=U();let Pe=yield N();if(ne||ve){const Be=(Ae=(Y=Pe==null?void 0:Pe.data)==null?void 0:Y.link_url)!=null&&Ae.includes("?")?"&":"?";Re.current.src=((we=Pe==null?void 0:Pe.data)==null?void 0:we.link_url)+Be+"time="+Date.now(),me({type:0,payload:!1});return}else if(H)Le.current="Edu123",oe.current=decodeURIComponent((ge=Pe==null?void 0:Pe.data)==null?void 0:ge.link_url);else{const Be=new URL(decodeURIComponent((Oe=Pe==null?void 0:Pe.data)==null?void 0:Oe.link_url)),{protocol:$e,searchParams:Ze,host:Ve}=Be;Le.current=Ze.get("password"),oe.current=`${$e==="https:"?"wss":"ws"}://${Ve}/${We.path||"websockify"}`}if(he===2){setTimeout(()=>{var Be,$e,Ze,Ve;_e(),Re.current.style.cssText=Re.current.style.cssText+"width:1920px;height:1080px;position:initial",Re.current.src=`/rdp.html?${(Be=Pe==null?void 0:Pe.data)!=null&&Be.gpPort?"gpPort="+(($e=Pe==null?void 0:Pe.data)==null?void 0:$e.gpPort)+"&password="+((Ze=Pe==null?void 0:Pe.data)==null?void 0:Ze.password)+"&":""}tpiId=${(Ve=Se==null?void 0:Se.myshixun)==null?void 0:Ve.id}&envId=${He}&tpiType=${Ke}`,me({type:0,payload:!1})},5e3);return}q()}));const V=p.Z.subscribe(`vnc-reset-${ke}`,Y=>{if(Y==="\u53D6\u6D88"){me({type:0,payload:!1});return}re(0),me({type:3,payload:{loading:!0,mes:Y||"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),M=p.Z.subscribe(`send-ctrl-alt-delete-${ke}`,()=>{var Y;(Y=De.current)==null||Y.sendCtrlAltDel(),b.ZP.success("\u53D1\u9001\u6210\u529F")}),W=p.Z.subscribe(`show-clipboard-box-${ke}`,()=>{me({type:4,payload:!0})});return re(0),()=>{var Y,Ae,we,ge;(Y=De.current)==null||Y.removeEventListener("disconnect",te),(Ae=De.current)==null||Ae.removeEventListener("connect",Z),(we=De.current)==null||we.removeEventListener("clipboard",B),V(),M(),W(),Te.current&&((ge=Ne.current)==null||ge.unobserve(Te.current))}}},[$,H,ne,G,He,Me]);function T(){var V,M;(M=(V=De.current)==null?void 0:V.sendKey)==null||M.call(V,135)}function ce(V){return j(this,null,function*(){var M;if($){const W=V,Y=yield(0,x.ZP)(`/api/tasks/${Ce.taskId}/vnc_paste.json`,{method:"post",body:{content:Base64.encode(W),shixun_environment_id:He}});(Y==null?void 0:Y.status)===0&&(me({type:5,payload:V}),b.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),I())}else(M=De.current)==null||M.clipboardPasteFrom(V),me({type:5,payload:V}),b.ZP.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),I()})}function pe(){var V,M;V=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),Re.current.parentElement.className="wh1080p",Re.current.parentElement.style.cssText=`transform:scale(${V});transform-origin:center center`,Te.current.style.cssText="translate(-50%, -50%) scale("+V+")"}(0,d.useEffect)(()=>{F==0&&(clearTimeout(xe.current),C())},[F]);const C=()=>{F>99?F=99:(F=F+1,xe.current=setTimeout(()=>{C()},1500)),F<100&&re(F)},ie=(0,d.useMemo)(()=>Ee?"none":ne||ve||H&&he===2?"block":"none",[ne,Ee,ve,H]);return v.createElement(d.Fragment,null,ue&&v.createElement("a",{className:"btn-vnc-resize",onClick:de},v.createElement("i",{className:"iconfont icon-tuichuquanping"})),v.createElement("div",{style:{width:"100%",height:"100%",overflow:"hidden",position:"absolute",display:ie==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},v.createElement("div",null,v.createElement("iframe",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},frameBorder:"0",ref:Re,allowFullScreen:!0}))),v.createElement("div",{style:{position:ue?"fixed":"absolute",left:0,top:ue?40:0,zIndex:5,width:"100%",height:`calc(100% - ${ue?"100px":"0px"})`},className:`${H?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"} ${ue?"full-screen":""}`},Ee?v.createElement(a.Z,{message:be,style:{color:"#0152d9"}},v.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},v.createElement(_.Z,{percent:F,format:V=>v.createElement("span",{className:"c-white"},V,"%")}))):null,v.createElement("div",{ref:Te,className:`vnc-panel ${Ee?"hidden zIndexf1":"animated fadeIn"}`})),v.createElement(h.Z,null,v.createElement(m.default,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,open:ye,onCancel:I,footer:null},v.createElement(t,{onCancel:I,onSave:ce,content:fe}))))}},32297:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return S}});var d=o(59301),m=o(24334),b=o(34376),_=o(66744),a={"xterm-panel":"xterm-panel___XA0p9"},f=o(33156),h=o(76374),r=o(12510),n=o(44283),s=o(76406),e=o(62957),u=o(59301),t=Object.defineProperty,i=Object.defineProperties,l=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,v=(k,D,L)=>D in k?t(k,D,{enumerable:!0,configurable:!0,writable:!0,value:L}):k[D]=L,y=(k,D)=>{for(var L in D||(D={}))p.call(D,L)&&v(k,L,D[L]);if(c)for(var L of c(D))x.call(D,L)&&v(k,L,D[L]);return k},g=(k,D)=>i(k,l(D)),w=(k,D,L)=>new Promise((z,j)=>{var le=A=>{try{J(L.next(A))}catch(P){j(P)}},U=A=>{try{J(L.throw(A))}catch(P){j(P)}},J=A=>A.done?z(A.value):Promise.resolve(A.value).then(le,U);J((L=L.apply(k,D)).next())});const E=3e4;var S=({itemData:k={},game:D,myshixun:L})=>{const z=(0,n.useParams)(),[j,le]=(0,d.useState)(null),[U,J]=(0,d.useState)({}),{link_url:A,password:P,port:K}=U,$=(0,d.useRef)(),H=(0,d.useRef)(),ne=(0,d.useRef)(!1),ve=(0,d.useRef)(!1),Se=(0,d.useRef)(!0),He=(0,s.oP)(),[Me]=(0,n.useSearchParams)(),{shixun_environment_id:he,position:ke,tab_type:Ke,index_tab:Te,command_string:Ie}=k;(0,d.useEffect)(()=>{Re()},[]);function De(Le,oe,se){let ee=se._core._renderService.dimensions.actualCellWidth||9.5,me=se._core._renderService.dimensions.actualCellHeight||18;const G=Math.floor(oe/me);return[Math.floor(Le/ee),G]}function Ne(Le,oe){const se=new h.Z(ee=>{for(let me of ee)if(me.target.offsetHeight>0||me.target.offsetWidth>0){const[G,ae]=De(me.target.offsetWidth,me.target.offsetHeight,Le);console.log("cols, rows",G,ae),f.Z.publish(`ssh-xterm-resize-${Te}`,{columns:G,rows:ae,width:me.target.offsetWidth,height:me.target.offsetHeight}),Le.resize(G,ae);const be=m.Base64.decode("IA=="),Ee=m.Base64.decode("CBtbSw==");Le.write(be),Le.write(Ee)}});return se.observe(oe),se}function Re(){return w(this,null,function*(){var Le,oe,se,ee,me;let G={};Me.get("type")==="exercises"?G.exercise_id=Me.get("exercisesId"):z.courseId&&z.homeworkId&&(G.homework_common_id=z.homeworkId);const ae=yield(0,r.sA)(L==null?void 0:L.identifier,y(y({shixun_environment_id:he,tab_type:Ke,game_id:D.id},He),G));if((oe=(Le=ae==null?void 0:ae.data)==null?void 0:Le.data_list)!=null&&oe.length){f.Z.publish("pod-restrict-data",{identifier:(se=ae==null?void 0:ae.data)==null?void 0:se.identifier,data_list:(ee=ae==null?void 0:ae.data)==null?void 0:ee.data_list});return}if((ae==null?void 0:ae.status)===-3)return new Promise((be,Ee)=>w(this,null,function*(){e.default.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:()=>w(this,null,function*(){yield closeWindowsVnc(z.taskId,ae==null?void 0:ae.message),init()})})}));if(((me=ae==null?void 0:ae.data)==null?void 0:me.code)===200036){e.default.confirm({centered:!0,icon:null,width:430,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:u.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,",u.createElement("br",null),u.createElement("span",{style:{color:"#fd4020"}},"\u9700\u5F3A\u5236\u5220\u9664\u65E7\u5B9E\u9A8C\u73AF\u5883\u518D\u91CD\u65B0\u5F00\u542F")),onOk:()=>{(0,r.VT)(L==null?void 0:L.identifier,{shixun_environment_id:he,tab_type:Ke,game_id:D.id}).then(be=>{(be==null?void 0:be.status)==0&&Re()})}});return}(ae==null?void 0:ae.status)===0&&(f.Z.publish("update-windows-time",ae==null?void 0:ae.data),f.Z.publish("send-tabs-result-data",g(y({},ae==null?void 0:ae.data),{index_tab:Te})),J(ae.data),setTimeout(()=>f.Z.publish(`create-socket-${Te}`),300))})}return(0,d.useEffect)(()=>{if($.current&&A){const Le=new b.Terminal({fontSize:16,rendererType:"dom",disableStdin:!0});Le.open($.current),Le.onData(se=>{H.current&&H.current.readyState===1&&H.current.send(JSON.stringify({tp:"client",data:se}))}),Le.write("Connecting..."),le(Le);const oe=Ne(Le,$.current);return()=>{Le.dispose(),$.current&&(oe==null||oe.unobserve($.current))}}},[A,$.current]),(0,d.useEffect)(()=>{if(j&&A){let Le=function(){const ee=new WebSocket(A);H.current=ee,ee.onopen=()=>{let G=j.element.parentElement;if(G){let ae=G.offsetWidth,be=G.offsetHeight;console.log("init",{tp:"init",data:g(y({},U),{secret:P,width:ae,height:be,rows:j.rows,columns:j.cols})}),ee.send(JSON.stringify({tp:"init",data:g(y({},U),{secret:P,width:ae,height:be,rows:j.rows,columns:j.cols})}))}j.focus()},ee.onerror=G=>{console.log("------in socket error----",G,ee,A)},ee.onmessage=G=>{ve.current=!1,ne.current||(j.write("\r"),setTimeout(()=>{},1e3)),ne.current=!0,console.log("event:",G);const ae=m.Base64.decode(G.data.toString());let be=j._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",ae,be,j),j.write(ae),Ie!=null&&Ie.length?Se.current&&(Se.current=!1,setTimeout(()=>{H.current.send(JSON.stringify({tp:"client",data:(Ie==null?void 0:Ie.join("\r"))+"\r"})),j.setOption("disableStdin",!1)},1e3)):(Se.current=!1,j.setOption("disableStdin",!1))};const me=setInterval(()=>{var G;H.current&&((G=H.current)==null||G.send(JSON.stringify({tp:"h"})))},E);ee.onclose=G=>{me&&clearInterval(me),console.log(me,"tid",Te),ve.current||j.write(`\r
|
|
|
connection closed`),ve.current=!0,setTimeout(()=>{Le()},1e4)}};const oe=f.Z.subscribe(`create-socket-${Te}`,()=>{Le()}),se=f.Z.subscribe(`ssh-xterm-resize-${Te}`,ee=>{H.current&&H.current.readyState===1&&H.current.send(JSON.stringify({tp:"resize",data:y({},ee)}))});return()=>{oe(),se(),H.current&&(H.current.close(),ne.current=!1)}}},[j,A,K]),u.createElement("div",{ref:$,className:a["xterm-panel"]},A?null:u.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},67195:function(Xe,O,o){"use strict";o.d(O,{BU:function(){return m},Dj:function(){return d},gH:function(){return b},vp:function(){return _}});function d(a){try{a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullScreen&&a.webkitRequestFullScreen()}catch(f){console.log(f,":e")}}function m(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const b=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function _(){var a=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,f=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",a),window.isFullScreen?window.isFullScreen:a!=null}},29509:function(Xe,O,o){"use strict";o.d(O,{o2:function(){return a},yT:function(){return f}});var d=o(77654),m=o(34998);const b=m.i.map(h=>`${h}-inverse`),_=["success","processing","error","default","warning"];function a(h){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,d.Z)(b),(0,d.Z)(m.i)).includes(h):m.i.includes(h)}function f(h){return _.includes(h)}},86013:function(Xe,O,o){"use strict";var d=o(59301),m=o(19248);const b=_=>{let a;return typeof _=="object"&&(_!=null&&_.clearIcon)?a=_:_&&(a={clearIcon:d.createElement(m.Z,null)}),a};O.Z=b},52838:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return f}});var d=o(37645);function m(h,r,n,s){if(s===!1)return{adjustX:!1,adjustY:!1};const e=s&&typeof s=="object"?s:{},u={};switch(h){case"top":case"bottom":u.shiftX=r.arrowOffsetHorizontal*2+n,u.shiftY=!0,u.adjustY=!0;break;case"left":case"right":u.shiftY=r.arrowOffsetVertical*2+n,u.shiftX=!0,u.adjustX=!0;break}const t=Object.assign(Object.assign({},u),e);return t.shiftX||(t.adjustX=!0),t.shiftY||(t.adjustY=!0),t}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"]}},_={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"]}},a=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function f(h){const{arrowWidth:r,autoAdjustOverflow:n,arrowPointAtCenter:s,offset:e,borderRadius:u,visibleFirst:t}=h,i=r/2,l={};return Object.keys(b).forEach(c=>{const p=s&&_[c]||b[c],x=Object.assign(Object.assign({},p),{offset:[0,0],dynamicInset:!0});switch(l[c]=x,a.has(c)&&(x.autoArrow=!1),c){case"top":case"topLeft":case"topRight":x.offset[1]=-i-e;break;case"bottom":case"bottomLeft":case"bottomRight":x.offset[1]=i+e;break;case"left":case"leftTop":case"leftBottom":x.offset[0]=-i-e;break;case"right":case"rightTop":case"rightBottom":x.offset[0]=i+e;break}const v=(0,d.wZ)({contentRadius:u,limitVerticalRadius:!0});if(s)switch(c){case"topLeft":case"bottomLeft":x.offset[0]=-v.arrowOffsetHorizontal-i;break;case"topRight":case"bottomRight":x.offset[0]=v.arrowOffsetHorizontal+i;break;case"leftTop":case"rightTop":x.offset[1]=-v.arrowOffsetHorizontal*2+i;break;case"leftBottom":case"rightBottom":x.offset[1]=v.arrowOffsetHorizontal*2-i;break}x.overflow=m(c,v,r,n),t&&(x.htmlRegion="visibleFirst")}),l}},82855:function(Xe,O,o){"use strict";o.d(O,{F:function(){return a},Z:function(){return _}});var d=o(92310),m=o.n(d);const b=null;function _(f,h,r){return m()({[`${f}-status-success`]:h==="success",[`${f}-status-warning`]:h==="warning",[`${f}-status-error`]:h==="error",[`${f}-status-validating`]:h==="validating",[`${f}-has-feedback`]:r})}const a=(f,h)=>h||f},24971:function(Xe,O,o){"use strict";var d=o(59301),m=o(56553),b=o(48755);const _=function(a,f){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var r,n;const{variant:s,[a]:e}=d.useContext(b.E_),u=d.useContext(m.pg),t=e==null?void 0:e.variant;let i;typeof f!="undefined"?i=f:h===!1?i="borderless":i=(n=(r=u!=null?u:t)!==null&&r!==void 0?r:s)!==null&&n!==void 0?n:"outlined";const l=b.tr.includes(i);return[i,l]};O.Z=_},49397:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return g}});var d=o(59301),m=o(92310),b=o.n(m),_=o(36901),a=o(8654),f=o(62487),h=o(86013),r=o(82855),n=o(48755),s=o(2171),e=o(83397),u=o(31756),t=o(56553),i=o(24971),l=o(70045),c=o(23826),p=o(53075);function x(w){return!!(w.prefix||w.suffix||w.allowClear||w.showCount)}var v=function(w,E){var S={};for(var k in w)Object.prototype.hasOwnProperty.call(w,k)&&E.indexOf(k)<0&&(S[k]=w[k]);if(w!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,k=Object.getOwnPropertySymbols(w);D<k.length;D++)E.indexOf(k[D])<0&&Object.prototype.propertyIsEnumerable.call(w,k[D])&&(S[k[D]]=w[k[D]]);return S},g=(0,d.forwardRef)((w,E)=>{const{prefixCls:S,bordered:k=!0,status:D,size:L,disabled:z,onBlur:j,onFocus:le,suffix:U,allowClear:J,addonAfter:A,addonBefore:P,className:K,style:$,styles:H,rootClassName:ne,onChange:ve,classNames:Se,variant:He}=w,Me=v(w,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:he,direction:ke,allowClear:Ke,autoComplete:Te,className:Ie,style:De,classNames:Ne,styles:Re}=(0,n.dj)("input"),Le=he("input",S),oe=(0,d.useRef)(null),se=(0,e.Z)(Le),[ee,me,G]=(0,p.TI)(Le,ne),[ae]=(0,p.ZP)(Le,se),{compactSize:be,compactItemClassnames:Ee}=(0,l.ri)(Le,ke),ye=(0,u.Z)(B=>{var te;return(te=L!=null?L:be)!==null&&te!==void 0?te:B}),ue=d.useContext(s.Z),fe=z!=null?z:ue,{status:Q,hasFeedback:R,feedbackIcon:X}=(0,d.useContext)(t.aM),F=(0,r.F)(Q,D),re=x(w)||!!R,xe=(0,d.useRef)(re),Ce=(0,c.Z)(oe,!0),Fe=B=>{Ce(),j==null||j(B)},I=B=>{Ce(),le==null||le(B)},de=B=>{Ce(),ve==null||ve(B)},_e=(R||U)&&d.createElement(d.Fragment,null,U,R&&X),N=(0,h.Z)(J!=null?J:Ke),[Z,q]=(0,i.Z)("input",He,k);return ee(ae(d.createElement(_.default,Object.assign({ref:(0,a.sQ)(E,oe),prefixCls:Le,autoComplete:Te},Me,{disabled:fe,onBlur:Fe,onFocus:I,style:Object.assign(Object.assign({},De),$),styles:Object.assign(Object.assign({},Re),H),suffix:_e,allowClear:N,className:b()(K,ne,G,se,Ee,Ie),onChange:de,addonBefore:P&&d.createElement(f.Z,{form:!0,space:!0},P),addonAfter:A&&d.createElement(f.Z,{form:!0,space:!0},A),classNames:Object.assign(Object.assign(Object.assign({},Se),Ne),{input:b()({[`${Le}-sm`]:ye==="small",[`${Le}-lg`]:ye==="large",[`${Le}-rtl`]:ke==="rtl"},Se==null?void 0:Se.input,Ne.input,me),variant:b()({[`${Le}-${Z}`]:q},(0,r.Z)(Le,F)),affixWrapper:b()({[`${Le}-affix-wrapper-sm`]:ye==="small",[`${Le}-affix-wrapper-lg`]:ye==="large",[`${Le}-affix-wrapper-rtl`]:ke==="rtl"},me),wrapper:b()({[`${Le}-group-rtl`]:ke==="rtl"},me),groupWrapper:b()({[`${Le}-group-wrapper-sm`]:ye==="small",[`${Le}-group-wrapper-lg`]:ye==="large",[`${Le}-group-wrapper-rtl`]:ke==="rtl",[`${Le}-group-wrapper-${Z}`]:q},(0,r.Z)(`${Le}-group-wrapper`,F,R),me)})}))))})},79809:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return E}});var d=o(59301),m=o(92310),b=o.n(m),_=o(22711),a=o(86013),f=o(82855),h=o(48755),r=o(2171),n=o(83397),s=o(31756),e=o(56553),u=o(24971),t=o(70045),i=o(30292),l=o(53075),c=o(16931),p=o(51636),x=o(64910);const v=S=>{const{componentCls:k,paddingLG:D}=S,L=`${k}-textarea`;return{[`textarea${k}`]:{maxWidth:"100%",height:"auto",minHeight:S.controlHeight,lineHeight:S.lineHeight,verticalAlign:"bottom",transition:`all ${S.motionDurationSlow}`,resize:"vertical",[`&${k}-mouse-active`]:{transition:`all ${S.motionDurationSlow}, height 0s, width 0s`}},[`${k}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[L]:{position:"relative","&-show-count":{[`> ${k}`]:{height:"100%"},[`${k}-data-count`]:{position:"absolute",bottom:S.calc(S.fontSize).mul(S.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:S.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
|
&-allow-clear > ${k},
|
|
|
&-affix-wrapper${L}-has-feedback ${k}
|
|
|
`]:{paddingInlineEnd:D},[`&-affix-wrapper${k}-affix-wrapper`]:{padding:0,[`> textarea${k}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:S.calc(S.controlHeight).sub(S.calc(S.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${k}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${k}-clear-icon`]:{position:"absolute",insetInlineEnd:S.paddingInline,insetBlockStart:S.paddingXS},[`${L}-suffix`]:{position:"absolute",top:0,insetInlineEnd:S.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${k}-affix-wrapper-sm`]:{[`${k}-suffix`]:{[`${k}-clear-icon`]:{insetInlineEnd:S.paddingInlineSM}}}}}};var y=(0,c.I$)(["Input","TextArea"],S=>{const k=(0,p.mergeToken)(S,(0,x.e)(S));return[v(k)]},x.T,{resetFont:!1}),g=function(S,k){var D={};for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&k.indexOf(L)<0&&(D[L]=S[L]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,L=Object.getOwnPropertySymbols(S);z<L.length;z++)k.indexOf(L[z])<0&&Object.prototype.propertyIsEnumerable.call(S,L[z])&&(D[L[z]]=S[L[z]]);return D},E=(0,d.forwardRef)((S,k)=>{var D;const{prefixCls:L,bordered:z=!0,size:j,disabled:le,status:U,allowClear:J,classNames:A,rootClassName:P,className:K,style:$,styles:H,variant:ne,showCount:ve,onMouseDown:Se,onResize:He}=S,Me=g(S,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:he,direction:ke,allowClear:Ke,autoComplete:Te,className:Ie,style:De,classNames:Ne,styles:Re}=(0,h.dj)("textArea"),Le=d.useContext(r.Z),oe=le!=null?le:Le,{status:se,hasFeedback:ee,feedbackIcon:me}=d.useContext(e.aM),G=(0,f.F)(se,U),ae=d.useRef(null);d.useImperativeHandle(k,()=>{var q;return{resizableTextArea:(q=ae.current)===null||q===void 0?void 0:q.resizableTextArea,focus:B=>{var te,T;(0,i.nH)((T=(te=ae.current)===null||te===void 0?void 0:te.resizableTextArea)===null||T===void 0?void 0:T.textArea,B)},blur:()=>{var B;return(B=ae.current)===null||B===void 0?void 0:B.blur()}}});const be=he("input",L),Ee=(0,n.Z)(be),[ye,ue,fe]=(0,l.TI)(be,P),[Q]=y(be,Ee),{compactSize:R,compactItemClassnames:X}=(0,t.ri)(be,ke),F=(0,s.Z)(q=>{var B;return(B=j!=null?j:R)!==null&&B!==void 0?B:q}),[re,xe]=(0,u.Z)("textArea",ne,z),Ce=(0,a.Z)(J!=null?J:Ke),[Fe,I]=d.useState(!1),[de,_e]=d.useState(!1),N=q=>{I(!0),Se==null||Se(q);const B=()=>{I(!1),document.removeEventListener("mouseup",B)};document.addEventListener("mouseup",B)},Z=q=>{var B,te;if(He==null||He(q),Fe&&typeof getComputedStyle=="function"){const T=(te=(B=ae.current)===null||B===void 0?void 0:B.nativeElement)===null||te===void 0?void 0:te.querySelector("textarea");T&&getComputedStyle(T).resize==="both"&&_e(!0)}};return ye(Q(d.createElement(_.default,Object.assign({autoComplete:Te},Me,{style:Object.assign(Object.assign({},De),$),styles:Object.assign(Object.assign({},Re),H),disabled:oe,allowClear:Ce,className:b()(fe,Ee,K,P,X,Ie,de&&`${be}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},A),Ne),{textarea:b()({[`${be}-sm`]:F==="small",[`${be}-lg`]:F==="large"},ue,A==null?void 0:A.textarea,Ne.textarea,Fe&&`${be}-mouse-active`),variant:b()({[`${be}-${re}`]:xe},(0,f.Z)(be,G)),affixWrapper:b()(`${be}-textarea-affix-wrapper`,{[`${be}-affix-wrapper-rtl`]:ke==="rtl",[`${be}-affix-wrapper-sm`]:F==="small",[`${be}-affix-wrapper-lg`]:F==="large",[`${be}-textarea-show-count`]:ve||((D=S.count)===null||D===void 0?void 0:D.show)},ue)}),prefixCls:be,suffix:ee&&d.createElement("span",{className:`${be}-textarea-suffix`},me),showCount:ve,ref:ae,onResize:Z,onMouseDown:N}))))})},23826:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return m}});var d=o(59301);function m(b,_){const a=(0,d.useRef)([]),f=()=>{a.current.push(setTimeout(()=>{var h,r,n,s;!((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"))&&((s=b.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return(0,d.useEffect)(()=>(_&&f(),()=>a.current.forEach(h=>{h&&clearTimeout(h)})),[]),f}},37568:function(Xe,O,o){"use strict";o.d(O,{default:function(){return Ne}});var d=o(59301),m=o(92310),b=o.n(m),_=o(48755),a=o(56553),f=o(53075),r=Re=>{const{getPrefixCls:Le,direction:oe}=(0,d.useContext)(_.E_),{prefixCls:se,className:ee}=Re,me=Le("input-group",se),G=Le("input"),[ae,be,Ee]=(0,f.ZP)(G),ye=b()(me,Ee,{[`${me}-lg`]:Re.size==="large",[`${me}-sm`]:Re.size==="small",[`${me}-compact`]:Re.compact,[`${me}-rtl`]:oe==="rtl"},be,ee),ue=(0,d.useContext)(a.aM),fe=(0,d.useMemo)(()=>Object.assign(Object.assign({},ue),{isFormItemInput:!1}),[ue]);return ae(d.createElement("span",{className:ye,style:Re.style,onMouseEnter:Re.onMouseEnter,onMouseLeave:Re.onMouseLeave,onFocus:Re.onFocus,onBlur:Re.onBlur},d.createElement(a.aM.Provider,{value:fe},Re.children)))},n=o(49397),s=o(77654),e=o(6089),u=o(26112),t=o(82855),i=o(31756),l=o(16931),c=o(51636),p=o(64910);const x=Re=>{const{componentCls:Le,paddingXS:oe}=Re;return{[Le]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:oe,"&-rtl":{direction:"rtl"},[`${Le}-input`]:{textAlign:"center",paddingInline:Re.paddingXXS},[`&${Le}-sm ${Le}-input`]:{paddingInline:Re.calc(Re.paddingXXS).div(2).equal()},[`&${Le}-lg ${Le}-input`]:{paddingInline:Re.paddingXS}}}};var v=(0,l.I$)(["Input","OTP"],Re=>{const Le=(0,c.mergeToken)(Re,(0,p.e)(Re));return[x(Le)]},p.T),y=o(16089),g=function(Re,Le){var oe={};for(var se in Re)Object.prototype.hasOwnProperty.call(Re,se)&&Le.indexOf(se)<0&&(oe[se]=Re[se]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,se=Object.getOwnPropertySymbols(Re);ee<se.length;ee++)Le.indexOf(se[ee])<0&&Object.prototype.propertyIsEnumerable.call(Re,se[ee])&&(oe[se[ee]]=Re[se[ee]]);return oe},E=d.forwardRef((Re,Le)=>{const{value:oe,onChange:se,onActiveChange:ee,index:me,mask:G}=Re,ae=g(Re,["value","onChange","onActiveChange","index","mask"]),be=oe&&typeof G=="string"?G:oe,Ee=R=>{se(me,R.target.value)},ye=d.useRef(null);d.useImperativeHandle(Le,()=>ye.current);const ue=()=>{(0,y.Z)(()=>{var R;const X=(R=ye.current)===null||R===void 0?void 0:R.input;document.activeElement===X&&X&&X.select()})},fe=R=>{const{key:X,ctrlKey:F,metaKey:re}=R;X==="ArrowLeft"?ee(me-1):X==="ArrowRight"?ee(me+1):X==="z"&&(F||re)&&R.preventDefault(),ue()},Q=R=>{R.key==="Backspace"&&!oe&&ee(me-1),ue()};return d.createElement(n.Z,Object.assign({type:G===!0?"password":"text"},ae,{ref:ye,value:be,onInput:Ee,onFocus:ue,onKeyDown:fe,onKeyUp:Q,onMouseDown:ue,onMouseUp:ue}))}),S=function(Re,Le){var oe={};for(var se in Re)Object.prototype.hasOwnProperty.call(Re,se)&&Le.indexOf(se)<0&&(oe[se]=Re[se]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,se=Object.getOwnPropertySymbols(Re);ee<se.length;ee++)Le.indexOf(se[ee])<0&&Object.prototype.propertyIsEnumerable.call(Re,se[ee])&&(oe[se[ee]]=Re[se[ee]]);return oe};function k(Re){return(Re||"").split("")}const D=Re=>{const{index:Le,prefixCls:oe,separator:se}=Re,ee=typeof se=="function"?se(Le):se;return ee?d.createElement("span",{className:`${oe}-separator`},ee):null};var z=d.forwardRef((Re,Le)=>{const{prefixCls:oe,length:se=6,size:ee,defaultValue:me,value:G,onChange:ae,formatter:be,separator:Ee,variant:ye,disabled:ue,status:fe,autoFocus:Q,mask:R,type:X,onInput:F,inputMode:re}=Re,xe=S(Re,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:Ce,direction:Fe}=d.useContext(_.E_),I=Ce("otp",oe),de=(0,u.Z)(xe,{aria:!0,data:!0,attr:!0}),[_e,N,Z]=v(I),q=(0,i.Z)(ge=>ee!=null?ee:ge),B=d.useContext(a.aM),te=(0,t.F)(B.status,fe),T=d.useMemo(()=>Object.assign(Object.assign({},B),{status:te,hasFeedback:!1,feedbackIcon:null}),[B,te]),ce=d.useRef(null),pe=d.useRef({});d.useImperativeHandle(Le,()=>({focus:()=>{var ge;(ge=pe.current[0])===null||ge===void 0||ge.focus()},blur:()=>{var ge;for(let Oe=0;Oe<se;Oe+=1)(ge=pe.current[Oe])===null||ge===void 0||ge.blur()},nativeElement:ce.current}));const C=ge=>be?be(ge):ge,[ie,V]=d.useState(()=>k(C(me||"")));d.useEffect(()=>{G!==void 0&&V(k(G))},[G]);const M=(0,e.Z)(ge=>{V(ge),F&&F(ge),ae&&ge.length===se&&ge.every(Oe=>Oe)&&ge.some((Oe,We)=>ie[We]!==Oe)&&ae(ge.join(""))}),W=(0,e.Z)((ge,Oe)=>{let We=(0,s.Z)(ie);for(let Be=0;Be<ge;Be+=1)We[Be]||(We[Be]="");Oe.length<=1?We[ge]=Oe:We=We.slice(0,ge).concat(k(Oe)),We=We.slice(0,se);for(let Be=We.length-1;Be>=0&&!We[Be];Be-=1)We.pop();const Pe=C(We.map(Be=>Be||" ").join(""));return We=k(Pe).map((Be,$e)=>Be===" "&&!We[$e]?We[$e]:Be),We}),Y=(ge,Oe)=>{var We;const Pe=W(ge,Oe),Be=Math.min(ge+Oe.length,se-1);Be!==ge&&Pe[ge]!==void 0&&((We=pe.current[Be])===null||We===void 0||We.focus()),M(Pe)},Ae=ge=>{var Oe;(Oe=pe.current[ge])===null||Oe===void 0||Oe.focus()},we={variant:ye,disabled:ue,status:te,mask:R,type:X,inputMode:re};return _e(d.createElement("div",Object.assign({},de,{ref:ce,className:b()(I,{[`${I}-sm`]:q==="small",[`${I}-lg`]:q==="large",[`${I}-rtl`]:Fe==="rtl"},Z,N)}),d.createElement(a.aM.Provider,{value:T},Array.from({length:se}).map((ge,Oe)=>{const We=`otp-${Oe}`,Pe=ie[Oe]||"";return d.createElement(d.Fragment,{key:We},d.createElement(E,Object.assign({ref:Be=>{pe.current[Oe]=Be},index:Oe,size:q,htmlSize:1,className:`${I}-input`,onChange:Y,value:Pe,onActiveChange:Ae,autoFocus:Oe===0&&Q},we)),Oe<se-1&&d.createElement(D,{separator:Ee,index:Oe,prefixCls:I}))}))))}),j=o(73331),le=o(15277),U=o(2738),J=o(8654),A=o(2171),P=o(23826),K=function(Re,Le){var oe={};for(var se in Re)Object.prototype.hasOwnProperty.call(Re,se)&&Le.indexOf(se)<0&&(oe[se]=Re[se]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,se=Object.getOwnPropertySymbols(Re);ee<se.length;ee++)Le.indexOf(se[ee])<0&&Object.prototype.propertyIsEnumerable.call(Re,se[ee])&&(oe[se[ee]]=Re[se[ee]]);return oe};const $=Re=>Re?d.createElement(le.Z,null):d.createElement(j.Z,null),H={click:"onClick",hover:"onMouseOver"};var ve=d.forwardRef((Re,Le)=>{const{disabled:oe,action:se="click",visibilityToggle:ee=!0,iconRender:me=$}=Re,G=d.useContext(A.Z),ae=oe!=null?oe:G,be=typeof ee=="object"&&ee.visible!==void 0,[Ee,ye]=(0,d.useState)(()=>be?ee.visible:!1),ue=(0,d.useRef)(null);d.useEffect(()=>{be&&ye(ee.visible)},[be,ee]);const fe=(0,P.Z)(ue),Q=()=>{var q;if(ae)return;Ee&&fe();const B=!Ee;ye(B),typeof ee=="object"&&((q=ee.onVisibleChange)===null||q===void 0||q.call(ee,B))},R=q=>{const B=H[se]||"",te=me(Ee),T={[B]:Q,className:`${q}-icon`,key:"passwordIcon",onMouseDown:ce=>{ce.preventDefault()},onMouseUp:ce=>{ce.preventDefault()}};return d.cloneElement(d.isValidElement(te)?te:d.createElement("span",null,te),T)},{className:X,prefixCls:F,inputPrefixCls:re,size:xe}=Re,Ce=K(Re,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:Fe}=d.useContext(_.E_),I=Fe("input",re),de=Fe("input-password",F),_e=ee&&R(de),N=b()(de,X,{[`${de}-${xe}`]:!!xe}),Z=Object.assign(Object.assign({},(0,U.Z)(Ce,["suffix","iconRender","visibilityToggle"])),{type:Ee?"text":"password",className:N,prefixCls:I,suffix:_e});return xe&&(Z.size=xe),d.createElement(n.Z,Object.assign({ref:(0,J.sQ)(Le,ue)},Z))}),Se=o(47472),He=o(22703),Me=o(7939),he=o(70045),ke=function(Re,Le){var oe={};for(var se in Re)Object.prototype.hasOwnProperty.call(Re,se)&&Le.indexOf(se)<0&&(oe[se]=Re[se]);if(Re!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,se=Object.getOwnPropertySymbols(Re);ee<se.length;ee++)Le.indexOf(se[ee])<0&&Object.prototype.propertyIsEnumerable.call(Re,se[ee])&&(oe[se[ee]]=Re[se[ee]]);return oe},Te=d.forwardRef((Re,Le)=>{const{prefixCls:oe,inputPrefixCls:se,className:ee,size:me,suffix:G,enterButton:ae=!1,addonAfter:be,loading:Ee,disabled:ye,onSearch:ue,onChange:fe,onCompositionStart:Q,onCompositionEnd:R}=Re,X=ke(Re,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:F,direction:re}=d.useContext(_.E_),xe=d.useRef(!1),Ce=F("input-search",oe),Fe=F("input",se),{compactSize:I}=(0,he.ri)(Ce,re),de=(0,i.Z)(Y=>{var Ae;return(Ae=me!=null?me:I)!==null&&Ae!==void 0?Ae:Y}),_e=d.useRef(null),N=Y=>{Y!=null&&Y.target&&Y.type==="click"&&ue&&ue(Y.target.value,Y,{source:"clear"}),fe==null||fe(Y)},Z=Y=>{var Ae;document.activeElement===((Ae=_e.current)===null||Ae===void 0?void 0:Ae.input)&&Y.preventDefault()},q=Y=>{var Ae,we;ue&&ue((we=(Ae=_e.current)===null||Ae===void 0?void 0:Ae.input)===null||we===void 0?void 0:we.value,Y,{source:"input"})},B=Y=>{xe.current||Ee||q(Y)},te=typeof ae=="boolean"?d.createElement(Se.Z,null):null,T=`${Ce}-button`;let ce;const pe=ae||{},C=pe.type&&pe.type.__ANT_BUTTON===!0;C||pe.type==="button"?ce=(0,He.Tm)(pe,Object.assign({onMouseDown:Z,onClick:Y=>{var Ae,we;(we=(Ae=pe==null?void 0:pe.props)===null||Ae===void 0?void 0:Ae.onClick)===null||we===void 0||we.call(Ae,Y),q(Y)},key:"enterButton"},C?{className:T,size:de}:{})):ce=d.createElement(Me.ZP,{className:T,type:ae?"primary":void 0,size:de,disabled:ye,key:"enterButton",onMouseDown:Z,onClick:q,loading:Ee,icon:te},ae),be&&(ce=[ce,(0,He.Tm)(be,{key:"addonAfter"})]);const ie=b()(Ce,{[`${Ce}-rtl`]:re==="rtl",[`${Ce}-${de}`]:!!de,[`${Ce}-with-button`]:!!ae},ee),V=Object.assign(Object.assign({},X),{className:ie,prefixCls:Fe,type:"search"}),M=Y=>{xe.current=!0,Q==null||Q(Y)},W=Y=>{xe.current=!1,R==null||R(Y)};return d.createElement(n.Z,Object.assign({ref:(0,J.sQ)(_e,Le),onPressEnter:B},V,{size:de,onCompositionStart:M,onCompositionEnd:W,addonAfter:ce,suffix:G,onChange:N,disabled:ye}))}),Ie=o(79809);const De=n.Z;De.Group=r,De.Search=Te,De.TextArea=Ie.Z,De.Password=ve,De.OTP=z;var Ne=De},53075:function(Xe,O,o){"use strict";o.d(O,{TI:function(){return y},ik:function(){return u},nz:function(){return r},s7:function(){return t},x0:function(){return e}});var d=o(36237),m=o(63356),b=o(56119),_=o(16931),a=o(51636),f=o(64910),h=o(39082);const r=g=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:g,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),n=g=>({borderColor:g.activeBorderColor,boxShadow:g.activeShadow,outline:0,backgroundColor:g.activeBg}),s=g=>{const{paddingBlockLG:w,lineHeightLG:E,borderRadiusLG:S,paddingInlineLG:k}=g;return{padding:`${(0,d.unit)(w)} ${(0,d.unit)(k)}`,fontSize:g.inputFontSizeLG,lineHeight:E,borderRadius:S}},e=g=>({padding:`${(0,d.unit)(g.paddingBlockSM)} ${(0,d.unit)(g.paddingInlineSM)}`,fontSize:g.inputFontSizeSM,borderRadius:g.borderRadiusSM}),u=g=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${(0,d.unit)(g.paddingBlock)} ${(0,d.unit)(g.paddingInline)}`,color:g.colorText,fontSize:g.inputFontSize,lineHeight:g.lineHeight,borderRadius:g.borderRadius,transition:`all ${g.motionDurationMid}`},r(g.colorTextPlaceholder)),{"&-lg":Object.assign({},s(g)),"&-sm":Object.assign({},e(g)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),t=g=>{const{componentCls:w,antCls:E}=g;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:g.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${w}, &-lg > ${w}-group-addon`]:Object.assign({},s(g)),[`&-sm ${w}, &-sm > ${w}-group-addon`]:Object.assign({},e(g)),[`&-lg ${E}-select-single ${E}-select-selector`]:{height:g.controlHeightLG},[`&-sm ${E}-select-single ${E}-select-selector`]:{height:g.controlHeightSM},[`> ${w}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${w}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${(0,d.unit)(g.paddingInline)}`,color:g.colorText,fontWeight:"normal",fontSize:g.inputFontSize,textAlign:"center",borderRadius:g.borderRadius,transition:`all ${g.motionDurationSlow}`,lineHeight:1,[`${E}-select`]:{margin:`${(0,d.unit)(g.calc(g.paddingBlock).add(1).mul(-1).equal())} ${(0,d.unit)(g.calc(g.paddingInline).mul(-1).equal())}`,[`&${E}-select-single:not(${E}-select-customize-input):not(${E}-pagination-size-changer)`]:{[`${E}-select-selector`]:{backgroundColor:"inherit",border:`${(0,d.unit)(g.lineWidth)} ${g.lineType} transparent`,boxShadow:"none"}}},[`${E}-cascader-picker`]:{margin:`-9px ${(0,d.unit)(g.calc(g.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${E}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[w]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${w}-search-with-button &`]:{zIndex:0}}},[`> ${w}:first-child, ${w}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${E}-select ${E}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${w}-affix-wrapper`]:{[`&:not(:first-child) ${w}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${w}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${w}:last-child, ${w}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${E}-select ${E}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${w}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${w}-search &`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius}},[`&:not(:first-child), ${w}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${w}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,m.dF)()),{[`${w}-group-addon, ${w}-group-wrap, > ${w}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:g.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${w}-affix-wrapper,
|
|
|
& > ${w}-number-affix-wrapper,
|
|
|
& > ${E}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:g.calc(g.lineWidth).mul(-1).equal(),borderInlineEndWidth:g.lineWidth},[w]:{float:"none"},[`& > ${E}-select > ${E}-select-selector,
|
|
|
& > ${E}-select-auto-complete ${w},
|
|
|
& > ${E}-cascader-picker ${w},
|
|
|
& > ${w}-group-wrapper ${w}`]:{borderInlineEndWidth:g.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${E}-select-focused`]:{zIndex:1},[`& > ${E}-select > ${E}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${E}-select:first-child > ${E}-select-selector,
|
|
|
& > ${E}-select-auto-complete:first-child ${w},
|
|
|
& > ${E}-cascader-picker:first-child ${w}`]:{borderStartStartRadius:g.borderRadius,borderEndStartRadius:g.borderRadius},[`& > *:last-child,
|
|
|
& > ${E}-select:last-child > ${E}-select-selector,
|
|
|
& > ${E}-cascader-picker:last-child ${w},
|
|
|
& > ${E}-cascader-picker-focused:last-child ${w}`]:{borderInlineEndWidth:g.lineWidth,borderStartEndRadius:g.borderRadius,borderEndEndRadius:g.borderRadius},[`& > ${E}-select-auto-complete ${w}`]:{verticalAlign:"top"},[`${w}-group-wrapper + ${w}-group-wrapper`]:{marginInlineStart:g.calc(g.lineWidth).mul(-1).equal(),[`${w}-affix-wrapper`]:{borderRadius:0}},[`${w}-group-wrapper:not(:last-child)`]:{[`&${w}-search > ${w}-group`]:{[`& > ${w}-group-addon > ${w}-search-button`]:{borderRadius:0},[`& > ${w}`]:{borderStartStartRadius:g.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:g.borderRadius}}}})}},i=g=>{const{componentCls:w,controlHeightSM:E,lineWidth:S,calc:k}=g,L=k(E).sub(k(S).mul(2)).sub(16).div(2).equal();return{[w]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,m.Wf)(g)),u(g)),(0,h.qG)(g)),(0,h.H8)(g)),(0,h.Mu)(g)),(0,h.vc)(g)),{'&[type="color"]':{height:g.controlHeight,[`&${w}-lg`]:{height:g.controlHeightLG},[`&${w}-sm`]:{height:E,paddingTop:L,paddingBottom:L}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},l=g=>{const{componentCls:w}=g;return{[`${w}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:g.colorTextQuaternary,fontSize:g.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${g.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:g.colorTextTertiary},"&:active":{color:g.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${(0,d.unit)(g.inputAffixPadding)}`}}}},c=g=>{const{componentCls:w,inputAffixPadding:E,colorTextDescription:S,motionDurationSlow:k,colorIcon:D,colorIconHover:L,iconCls:z}=g,j=`${w}-affix-wrapper`,le=`${w}-affix-wrapper-disabled`;return{[j]:Object.assign(Object.assign(Object.assign(Object.assign({},u(g)),{display:"inline-flex",[`&:not(${w}-disabled):hover`]:{zIndex:1,[`${w}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${w}`]:{padding:0},[`> input${w}, > textarea${w}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[w]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:g.paddingXS}},"&-show-count-suffix":{color:S},"&-show-count-has-suffix":{marginInlineEnd:g.paddingXXS},"&-prefix":{marginInlineEnd:E},"&-suffix":{marginInlineStart:E}}}),l(g)),{[`${z}${w}-password-icon`]:{color:D,cursor:"pointer",transition:`all ${k}`,"&:hover":{color:L}}}),[`${w}-underlined`]:{borderRadius:0},[le]:{[`${z}${w}-password-icon`]:{color:D,cursor:"not-allowed","&:hover":{color:D}}}}},p=g=>{const{componentCls:w,borderRadiusLG:E,borderRadiusSM:S}=g;return{[`${w}-group`]:Object.assign(Object.assign(Object.assign({},(0,m.Wf)(g)),t(g)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${w}-group-addon`]:{borderRadius:E,fontSize:g.inputFontSizeLG}},"&-sm":{[`${w}-group-addon`]:{borderRadius:S}}},(0,h.ir)(g)),(0,h.S5)(g)),{[`&:not(${w}-compact-first-item):not(${w}-compact-last-item)${w}-compact-item`]:{[`${w}, ${w}-group-addon`]:{borderRadius:0}},[`&:not(${w}-compact-last-item)${w}-compact-first-item`]:{[`${w}, ${w}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${w}-compact-first-item)${w}-compact-last-item`]:{[`${w}, ${w}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${w}-compact-last-item)${w}-compact-item`]:{[`${w}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${w}-compact-first-item)${w}-compact-item`]:{[`${w}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},x=g=>{const{componentCls:w,antCls:E}=g,S=`${w}-search`;return{[S]:{[w]:{"&:hover, &:focus":{[`+ ${w}-group-addon ${S}-button:not(${E}-btn-primary)`]:{borderInlineStartColor:g.colorPrimaryHover}}},[`${w}-affix-wrapper`]:{height:g.controlHeight,borderRadius:0},[`${w}-lg`]:{lineHeight:g.calc(g.lineHeightLG).sub(2e-4).equal()},[`> ${w}-group`]:{[`> ${w}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${S}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${S}-button:not(${E}-btn-primary)`]:{color:g.colorTextDescription,"&:hover":{color:g.colorPrimaryHover},"&:active":{color:g.colorPrimaryActive},[`&${E}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${S}-button`]:{height:g.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${w}-affix-wrapper, ${S}-button`]:{height:g.controlHeightLG}},"&-small":{[`${w}-affix-wrapper, ${S}-button`]:{height:g.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${w}-compact-item`]:{[`&:not(${w}-compact-last-item)`]:{[`${w}-group-addon`]:{[`${w}-search-button`]:{marginInlineEnd:g.calc(g.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${w}-compact-first-item)`]:{[`${w},${w}-affix-wrapper`]:{borderRadius:0}},[`> ${w}-group-addon ${w}-search-button,
|
|
|
> ${w},
|
|
|
${w}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${w}-affix-wrapper-focused`]:{zIndex:2}}}}},v=g=>{const{componentCls:w}=g;return{[`${w}-out-of-range`]:{[`&, & input, & textarea, ${w}-show-count-suffix, ${w}-data-count`]:{color:g.colorError}}}},y=(0,_.I$)(["Input","Shared"],g=>{const w=(0,a.mergeToken)(g,(0,f.e)(g));return[i(w),c(w)]},f.T,{resetFont:!1});O.ZP=(0,_.I$)(["Input","Component"],g=>{const w=(0,a.mergeToken)(g,(0,f.e)(g));return[p(w),x(w),v(w),(0,b.c)(w)]},f.T,{resetFont:!1})},64910:function(Xe,O,o){"use strict";o.d(O,{T:function(){return b},e:function(){return m}});var d=o(51636);function m(_){return(0,d.mergeToken)(_,{inputAffixPadding:_.paddingXXS})}const b=_=>{const{controlHeight:a,fontSize:f,lineHeight:h,lineWidth:r,controlHeightSM:n,controlHeightLG:s,fontSizeLG:e,lineHeightLG:u,paddingSM:t,controlPaddingHorizontalSM:i,controlPaddingHorizontal:l,colorFillAlter:c,colorPrimaryHover:p,colorPrimary:x,controlOutlineWidth:v,controlOutline:y,colorErrorOutline:g,colorWarningOutline:w,colorBgContainer:E,inputFontSize:S,inputFontSizeLG:k,inputFontSizeSM:D}=_,L=S||f,z=D||L,j=k||e,le=Math.round((a-L*h)/2*10)/10-r,U=Math.round((n-z*h)/2*10)/10-r,J=Math.ceil((s-j*u)/2*10)/10-r;return{paddingBlock:Math.max(le,0),paddingBlockSM:Math.max(U,0),paddingBlockLG:Math.max(J,0),paddingInline:t-r,paddingInlineSM:i-r,paddingInlineLG:l-r,addonBg:c,activeBorderColor:x,hoverBorderColor:p,activeShadow:`0 0 0 ${v}px ${y}`,errorActiveShadow:`0 0 0 ${v}px ${g}`,warningActiveShadow:`0 0 0 ${v}px ${w}`,hoverBg:E,activeBg:E,inputFontSize:L,inputFontSizeLG:j,inputFontSizeSM:z}}},39082:function(Xe,O,o){"use strict";o.d(O,{$U:function(){return a},H8:function(){return t},Mu:function(){return s},S5:function(){return l},Xy:function(){return _},ir:function(){return n},qG:function(){return h},vc:function(){return x}});var d=o(36237),m=o(51636);const b=v=>({borderColor:v.hoverBorderColor,backgroundColor:v.hoverBg}),_=v=>({color:v.colorTextDisabled,backgroundColor:v.colorBgContainerDisabled,borderColor:v.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},b((0,m.mergeToken)(v,{hoverBorderColor:v.colorBorder,hoverBg:v.colorBgContainerDisabled})))}),a=(v,y)=>({background:v.colorBgContainer,borderWidth:v.lineWidth,borderStyle:v.lineType,borderColor:y.borderColor,"&:hover":{borderColor:y.hoverBorderColor,backgroundColor:v.hoverBg},"&:focus, &:focus-within":{borderColor:y.activeBorderColor,boxShadow:y.activeShadow,outline:0,backgroundColor:v.activeBg}}),f=(v,y)=>({[`&${v.componentCls}-status-${y.status}:not(${v.componentCls}-disabled)`]:Object.assign(Object.assign({},a(v,y)),{[`${v.componentCls}-prefix, ${v.componentCls}-suffix`]:{color:y.affixColor}}),[`&${v.componentCls}-status-${y.status}${v.componentCls}-disabled`]:{borderColor:y.borderColor}}),h=(v,y)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a(v,{borderColor:v.colorBorder,hoverBorderColor:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeShadow:v.activeShadow})),{[`&${v.componentCls}-disabled, &[disabled]`]:Object.assign({},_(v))}),f(v,{status:"error",borderColor:v.colorError,hoverBorderColor:v.colorErrorBorderHover,activeBorderColor:v.colorError,activeShadow:v.errorActiveShadow,affixColor:v.colorError})),f(v,{status:"warning",borderColor:v.colorWarning,hoverBorderColor:v.colorWarningBorderHover,activeBorderColor:v.colorWarning,activeShadow:v.warningActiveShadow,affixColor:v.colorWarning})),y)}),r=(v,y)=>({[`&${v.componentCls}-group-wrapper-status-${y.status}`]:{[`${v.componentCls}-group-addon`]:{borderColor:y.addonBorderColor,color:y.addonColor}}}),n=v=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${v.componentCls}-group`]:{"&-addon":{background:v.addonBg,border:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},r(v,{status:"error",addonBorderColor:v.colorError,addonColor:v.colorErrorText})),r(v,{status:"warning",addonBorderColor:v.colorWarning,addonColor:v.colorWarningText})),{[`&${v.componentCls}-group-wrapper-disabled`]:{[`${v.componentCls}-group-addon`]:Object.assign({},_(v))}})}),s=(v,y)=>{const{componentCls:g}=v;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${g}-disabled, &[disabled]`]:{color:v.colorTextDisabled,cursor:"not-allowed"},[`&${g}-status-error`]:{"&, & input, & textarea":{color:v.colorError}},[`&${g}-status-warning`]:{"&, & input, & textarea":{color:v.colorWarning}}},y)}},e=(v,y)=>{var g;return{background:y.bg,borderWidth:v.lineWidth,borderStyle:v.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(g=y==null?void 0:y.inputColor)!==null&&g!==void 0?g:"unset"},"&:hover":{background:y.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:y.activeBorderColor,backgroundColor:v.activeBg}}},u=(v,y)=>({[`&${v.componentCls}-status-${y.status}:not(${v.componentCls}-disabled)`]:Object.assign(Object.assign({},e(v,y)),{[`${v.componentCls}-prefix, ${v.componentCls}-suffix`]:{color:y.affixColor}})}),t=(v,y)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e(v,{bg:v.colorFillTertiary,hoverBg:v.colorFillSecondary,activeBorderColor:v.activeBorderColor})),{[`&${v.componentCls}-disabled, &[disabled]`]:Object.assign({},_(v))}),u(v,{status:"error",bg:v.colorErrorBg,hoverBg:v.colorErrorBgHover,activeBorderColor:v.colorError,inputColor:v.colorErrorText,affixColor:v.colorError})),u(v,{status:"warning",bg:v.colorWarningBg,hoverBg:v.colorWarningBgHover,activeBorderColor:v.colorWarning,inputColor:v.colorWarningText,affixColor:v.colorWarning})),y)}),i=(v,y)=>({[`&${v.componentCls}-group-wrapper-status-${y.status}`]:{[`${v.componentCls}-group-addon`]:{background:y.addonBg,color:y.addonColor}}}),l=v=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${v.componentCls}-group`]:{"&-addon":{background:v.colorFillTertiary},[`${v.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorSplit}`}}}},i(v,{status:"error",addonBg:v.colorErrorBg,addonColor:v.colorErrorText})),i(v,{status:"warning",addonBg:v.colorWarningBg,addonColor:v.colorWarningText})),{[`&${v.componentCls}-group-wrapper-disabled`]:{[`${v.componentCls}-group`]:{"&-addon":{background:v.colorFillTertiary,color:v.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorBorder}`,borderTop:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorBorder}`,borderBottom:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorBorder}`,borderTop:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorBorder}`,borderBottom:`${(0,d.unit)(v.lineWidth)} ${v.lineType} ${v.colorBorder}`}}}})}),c=(v,y)=>({background:v.colorBgContainer,borderWidth:`${(0,d.unit)(v.lineWidth)} 0`,borderStyle:`${v.lineType} none`,borderColor:`transparent transparent ${y.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${y.borderColor} transparent`,backgroundColor:v.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${y.borderColor} transparent`,outline:0,backgroundColor:v.activeBg}}),p=(v,y)=>({[`&${v.componentCls}-status-${y.status}:not(${v.componentCls}-disabled)`]:Object.assign(Object.assign({},c(v,y)),{[`${v.componentCls}-prefix, ${v.componentCls}-suffix`]:{color:y.affixColor}}),[`&${v.componentCls}-status-${y.status}${v.componentCls}-disabled`]:{borderColor:`transparent transparent ${y.borderColor} transparent`}}),x=(v,y)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c(v,{borderColor:v.colorBorder,hoverBorderColor:v.hoverBorderColor,activeBorderColor:v.activeBorderColor,activeShadow:v.activeShadow})),{[`&${v.componentCls}-disabled, &[disabled]`]:{color:v.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${v.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),p(v,{status:"error",borderColor:v.colorError,hoverBorderColor:v.colorErrorBorderHover,activeBorderColor:v.colorError,activeShadow:v.errorActiveShadow,affixColor:v.colorError})),p(v,{status:"warning",borderColor:v.colorWarning,hoverBorderColor:v.colorWarningBorderHover,activeBorderColor:v.colorWarning,activeShadow:v.warningActiveShadow,affixColor:v.colorWarning})),y)})},89787:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return _e}});var d=o(59301),m=o(17835),b=o(29679),_=o(40001),a=o(19248),f=o(99267),h=o(92310),r=o.n(h),n=o(2738),s=o(48755),e=o(60499),u=o(85899),t=o(42244),i={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},l=function(){var Z=(0,d.useRef)([]),q=(0,d.useRef)(null);return(0,d.useEffect)(function(){var B=Date.now(),te=!1;Z.current.forEach(function(T){if(T){te=!0;var ce=T.style;ce.transitionDuration=".3s, .3s, .3s, .06s",q.current&&B-q.current<100&&(ce.transitionDuration="0s, 0s")}}),te&&(q.current=Date.now())}),Z.current},c=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],p=function(Z){var q=(0,u.Z)((0,u.Z)({},i),Z),B=q.className,te=q.percent,T=q.prefixCls,ce=q.strokeColor,pe=q.strokeLinecap,C=q.strokeWidth,ie=q.style,V=q.trailColor,M=q.trailWidth,W=q.transition,Y=(0,t.Z)(q,c);delete Y.gapPosition;var Ae=Array.isArray(te)?te:[te],we=Array.isArray(ce)?ce:[ce],ge=l(),Oe=C/2,We=100-C/2,Pe="M ".concat(pe==="round"?Oe:0,",").concat(Oe,`
|
|
|
L `).concat(pe==="round"?We:100,",").concat(Oe),Be="0 0 100 ".concat(C),$e=0;return d.createElement("svg",(0,e.Z)({className:r()("".concat(T,"-line"),B),viewBox:Be,preserveAspectRatio:"none",style:ie},Y),d.createElement("path",{className:"".concat(T,"-line-trail"),d:Pe,strokeLinecap:pe,stroke:V,strokeWidth:M||C,fillOpacity:"0"}),Ae.map(function(Ze,Ve){var Je=1;switch(pe){case"round":Je=1-C/100;break;case"square":Je=1-C/2/100;break;default:Je=1;break}var et={strokeDasharray:"".concat(Ze*Je,"px, 100px"),strokeDashoffset:"-".concat($e,"px"),transition:W||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ue=we[Ve]||we[we.length-1];return $e+=Ze,d.createElement("path",{key:Ve,className:"".concat(T,"-line-path"),d:Pe,strokeLinecap:pe,stroke:Ue,strokeWidth:C,fillOpacity:"0",ref:function(qe){ge[Ve]=qe},style:et})}))},x=p,v=o(43749),y=o(72190),g=o(47273),w=0,E=(0,g.Z)();function S(){var N;return E?(N=w,w+=1):N="TEST_OR_SSR",N}var k=function(N){var Z=d.useState(),q=(0,y.Z)(Z,2),B=q[0],te=q[1];return d.useEffect(function(){te("rc_progress_".concat(S()))},[]),N||B},D=function(Z){var q=Z.bg,B=Z.children;return d.createElement("div",{style:{width:"100%",height:"100%",background:q}},B)};function L(N,Z){return Object.keys(N).map(function(q){var B=parseFloat(q),te="".concat(Math.floor(B*Z),"%");return"".concat(N[q]," ").concat(te)})}var z=d.forwardRef(function(N,Z){var q=N.prefixCls,B=N.color,te=N.gradientId,T=N.radius,ce=N.style,pe=N.ptg,C=N.strokeLinecap,ie=N.strokeWidth,V=N.size,M=N.gapDegree,W=B&&(0,v.Z)(B)==="object",Y=W?"#FFF":void 0,Ae=V/2,we=d.createElement("circle",{className:"".concat(q,"-circle-path"),r:T,cx:Ae,cy:Ae,stroke:Y,strokeLinecap:C,strokeWidth:ie,opacity:pe===0?0:1,style:ce,ref:Z});if(!W)return we;var ge="".concat(te,"-conic"),Oe=M?"".concat(180+M/2,"deg"):"0deg",We=L(B,(360-M)/360),Pe=L(B,1),Be="conic-gradient(from ".concat(Oe,", ").concat(We.join(", "),")"),$e="linear-gradient(to ".concat(M?"bottom":"top",", ").concat(Pe.join(", "),")");return d.createElement(d.Fragment,null,d.createElement("mask",{id:ge},we),d.createElement("foreignObject",{x:0,y:0,width:V,height:V,mask:"url(#".concat(ge,")")},d.createElement(D,{bg:$e},d.createElement(D,{bg:Be}))))}),j=z,le=100,U=function(Z,q,B,te,T,ce,pe,C,ie,V){var M=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,W=B/100*360*((360-ce)/360),Y=ce===0?0:{bottom:0,top:180,left:90,right:-90}[pe],Ae=(100-te)/100*q;ie==="round"&&te!==100&&(Ae+=V/2,Ae>=q&&(Ae=q-.01));var we=le/2;return{stroke:typeof C=="string"?C:void 0,strokeDasharray:"".concat(q,"px ").concat(Z),strokeDashoffset:Ae+M,transform:"rotate(".concat(T+W+Y,"deg)"),transformOrigin:"".concat(we,"px ").concat(we,"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}},J=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function A(N){var Z=N!=null?N:[];return Array.isArray(Z)?Z:[Z]}var P=function(Z){var q=(0,u.Z)((0,u.Z)({},i),Z),B=q.id,te=q.prefixCls,T=q.steps,ce=q.strokeWidth,pe=q.trailWidth,C=q.gapDegree,ie=C===void 0?0:C,V=q.gapPosition,M=q.trailColor,W=q.strokeLinecap,Y=q.style,Ae=q.className,we=q.strokeColor,ge=q.percent,Oe=(0,t.Z)(q,J),We=le/2,Pe=k(B),Be="".concat(Pe,"-gradient"),$e=We-ce/2,Ze=Math.PI*2*$e,Ve=ie>0?90+ie/2:-90,Je=Ze*((360-ie)/360),et=(0,v.Z)(T)==="object"?T:{count:T,gap:2},Ue=et.count,Ye=et.gap,qe=A(ge),Qe=A(we),je=Qe.find(function(_t){return _t&&(0,v.Z)(_t)==="object"}),rt=je&&(0,v.Z)(je)==="object",at=rt?"butt":W,ft=U(Ze,Je,0,100,Ve,ie,V,M,at,ce),xt=l(),lt=function(){var tt=0;return qe.map(function(mt,nt){var Pt=Qe[nt]||Qe[Qe.length-1],vt=U(Ze,Je,tt,mt,Ve,ie,V,Pt,at,ce);return tt+=mt,d.createElement(j,{key:nt,color:Pt,ptg:mt,radius:$e,prefixCls:te,gradientId:Be,style:vt,strokeLinecap:at,strokeWidth:ce,gapDegree:ie,ref:function(Ut){xt[nt]=Ut},size:le})}).reverse()},ut=function(){var tt=Math.round(Ue*(qe[0]/100)),mt=100/Ue,nt=0;return new Array(Ue).fill(null).map(function(Pt,vt){var yt=vt<=tt-1?Qe[0]:M,Ut=yt&&(0,v.Z)(yt)==="object"?"url(#".concat(Be,")"):void 0,Wt=U(Ze,Je,nt,mt,Ve,ie,V,yt,"butt",ce,Ye);return nt+=(Je-Wt.strokeDashoffset+Ye)*100/Je,d.createElement("circle",{key:vt,className:"".concat(te,"-circle-path"),r:$e,cx:We,cy:We,stroke:Ut,strokeWidth:ce,opacity:1,style:Wt,ref:function(Jt){xt[vt]=Jt}})})};return d.createElement("svg",(0,e.Z)({className:r()("".concat(te,"-circle"),Ae),viewBox:"0 0 ".concat(le," ").concat(le),style:Y,id:B,role:"presentation"},Oe),!Ue&&d.createElement("circle",{className:"".concat(te,"-circle-trail"),r:$e,cx:We,cy:We,stroke:M,strokeLinecap:at,strokeWidth:pe||ce,style:ft}),Ue?ut():lt())},K=P,$={Line:x,Circle:K},H=o(25399),ne=o(68361);function ve(N){return!N||N<0?0:N>100?100:N}function Se(N){let{success:Z,successPercent:q}=N,B=q;return Z&&"progress"in Z&&(B=Z.progress),Z&&"percent"in Z&&(B=Z.percent),B}const He=N=>{let{percent:Z,success:q,successPercent:B}=N;const te=ve(Se({success:q,successPercent:B}));return[te,ve(ve(Z)-te)]},Me=N=>{let{success:Z={},strokeColor:q}=N;const{strokeColor:B}=Z;return[B||ne.presetPrimaryColors.green,q||null]},he=(N,Z,q)=>{var B,te,T,ce;let pe=-1,C=-1;if(Z==="step"){const ie=q.steps,V=q.strokeWidth;typeof N=="string"||typeof N=="undefined"?(pe=N==="small"?2:14,C=V!=null?V:8):typeof N=="number"?[pe,C]=[N,N]:[pe=14,C=8]=Array.isArray(N)?N:[N.width,N.height],pe*=ie}else if(Z==="line"){const ie=q==null?void 0:q.strokeWidth;typeof N=="string"||typeof N=="undefined"?C=ie||(N==="small"?6:8):typeof N=="number"?[pe,C]=[N,N]:[pe=-1,C=8]=Array.isArray(N)?N:[N.width,N.height]}else(Z==="circle"||Z==="dashboard")&&(typeof N=="string"||typeof N=="undefined"?[pe,C]=N==="small"?[60,60]:[120,120]:typeof N=="number"?[pe,C]=[N,N]:Array.isArray(N)&&(pe=(te=(B=N[0])!==null&&B!==void 0?B:N[1])!==null&&te!==void 0?te:120,C=(ce=(T=N[0])!==null&&T!==void 0?T:N[1])!==null&&ce!==void 0?ce:120));return[pe,C]},ke=3,Ke=N=>ke/N*100;var Ie=N=>{const{prefixCls:Z,trailColor:q=null,strokeLinecap:B="round",gapPosition:te,gapDegree:T,width:ce=120,type:pe,children:C,success:ie,size:V=ce,steps:M}=N,[W,Y]=he(V,"circle");let{strokeWidth:Ae}=N;Ae===void 0&&(Ae=Math.max(Ke(W),6));const we={width:W,height:Y,fontSize:W*.15+6},ge=d.useMemo(()=>{if(T||T===0)return T;if(pe==="dashboard")return 75},[T,pe]),Oe=He(N),We=te||pe==="dashboard"&&"bottom"||void 0,Pe=Object.prototype.toString.call(N.strokeColor)==="[object Object]",Be=Me({success:ie,strokeColor:N.strokeColor}),$e=r()(`${Z}-inner`,{[`${Z}-circle-gradient`]:Pe}),Ze=d.createElement(K,{steps:M,percent:M?Oe[1]:Oe,strokeWidth:Ae,trailWidth:Ae,strokeColor:M?Be[1]:Be,strokeLinecap:B,trailColor:q,prefixCls:Z,gapDegree:ge,gapPosition:We}),Ve=W<=20,Je=d.createElement("div",{className:$e,style:we},Ze,!Ve&&C);return Ve?d.createElement(H.Z,{title:C},Je):Je},De=o(36237),Ne=o(63356),Re=o(16931),Le=o(51636);const oe="--progress-line-stroke-color",se="--progress-percent",ee=N=>{const Z=N?"100%":"-100%";return new De.Keyframes(`antProgress${N?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${Z}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${Z}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},me=N=>{const{componentCls:Z,iconCls:q}=N;return{[Z]:Object.assign(Object.assign({},(0,Ne.Wf)(N)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:N.fontSize},[`${Z}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${Z}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:N.remainingColor,borderRadius:N.lineBorderRadius},[`${Z}-inner:not(${Z}-circle-gradient)`]:{[`${Z}-circle-path`]:{stroke:N.defaultColor}},[`${Z}-success-bg, ${Z}-bg`]:{position:"relative",background:N.defaultColor,borderRadius:N.lineBorderRadius,transition:`all ${N.motionDurationSlow} ${N.motionEaseInOutCirc}`},[`${Z}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${Z}-text`]:{width:"max-content",marginInlineStart:0,marginTop:N.marginXXS}},[`${Z}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${oe})`]},height:"100%",width:`calc(1 / var(${se}) * 100%)`,display:"block"},[`&${Z}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${Z}-text-inner`]:{color:N.colorWhite,[`&${Z}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${Z}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:N.colorSuccess},[`${Z}-text`]:{display:"inline-block",marginInlineStart:N.marginXS,color:N.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[q]:{fontSize:N.fontSize},[`&${Z}-text-outer`]:{width:"max-content"},[`&${Z}-text-outer${Z}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:N.marginXS}},[`${Z}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${(0,De.unit)(N.paddingXXS)}`,[`&${Z}-text-start`]:{justifyContent:"start"},[`&${Z}-text-end`]:{justifyContent:"end"}},[`&${Z}-status-active`]:{[`${Z}-bg::before`]:{position:"absolute",inset:0,backgroundColor:N.colorBgContainer,borderRadius:N.lineBorderRadius,opacity:0,animationName:ee(),animationDuration:N.progressActiveMotionDuration,animationTimingFunction:N.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${Z}-rtl${Z}-status-active`]:{[`${Z}-bg::before`]:{animationName:ee(!0)}},[`&${Z}-status-exception`]:{[`${Z}-bg`]:{backgroundColor:N.colorError},[`${Z}-text`]:{color:N.colorError}},[`&${Z}-status-exception ${Z}-inner:not(${Z}-circle-gradient)`]:{[`${Z}-circle-path`]:{stroke:N.colorError}},[`&${Z}-status-success`]:{[`${Z}-bg`]:{backgroundColor:N.colorSuccess},[`${Z}-text`]:{color:N.colorSuccess}},[`&${Z}-status-success ${Z}-inner:not(${Z}-circle-gradient)`]:{[`${Z}-circle-path`]:{stroke:N.colorSuccess}}})}},G=N=>{const{componentCls:Z,iconCls:q}=N;return{[Z]:{[`${Z}-circle-trail`]:{stroke:N.remainingColor},[`&${Z}-circle ${Z}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${Z}-circle ${Z}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:N.circleTextColor,fontSize:N.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[q]:{fontSize:N.circleIconFontSize}},[`${Z}-circle&-status-exception`]:{[`${Z}-text`]:{color:N.colorError}},[`${Z}-circle&-status-success`]:{[`${Z}-text`]:{color:N.colorSuccess}}},[`${Z}-inline-circle`]:{lineHeight:1,[`${Z}-inner`]:{verticalAlign:"bottom"}}}},ae=N=>{const{componentCls:Z}=N;return{[Z]:{[`${Z}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:N.progressStepMinWidth,marginInlineEnd:N.progressStepMarginInlineEnd,backgroundColor:N.remainingColor,transition:`all ${N.motionDurationSlow}`,"&-active":{backgroundColor:N.defaultColor}}}}}},be=N=>{const{componentCls:Z,iconCls:q}=N;return{[Z]:{[`${Z}-small&-line, ${Z}-small&-line ${Z}-text ${q}`]:{fontSize:N.fontSizeSM}}}},Ee=N=>({circleTextColor:N.colorText,defaultColor:N.colorInfo,remainingColor:N.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${N.fontSize/N.fontSizeSM}em`});var ye=(0,Re.I$)("Progress",N=>{const Z=N.calc(N.marginXXS).div(2).equal(),q=(0,Le.mergeToken)(N,{progressStepMarginInlineEnd:Z,progressStepMinWidth:Z,progressActiveMotionDuration:"2.4s"});return[me(q),G(q),ae(q),be(q)]},Ee),ue=function(N,Z){var q={};for(var B in N)Object.prototype.hasOwnProperty.call(N,B)&&Z.indexOf(B)<0&&(q[B]=N[B]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var te=0,B=Object.getOwnPropertySymbols(N);te<B.length;te++)Z.indexOf(B[te])<0&&Object.prototype.propertyIsEnumerable.call(N,B[te])&&(q[B[te]]=N[B[te]]);return q};const fe=N=>{let Z=[];return Object.keys(N).forEach(q=>{const B=parseFloat(q.replace(/%/g,""));Number.isNaN(B)||Z.push({key:B,value:N[q]})}),Z=Z.sort((q,B)=>q.key-B.key),Z.map(q=>{let{key:B,value:te}=q;return`${te} ${B}%`}).join(", ")},Q=(N,Z)=>{const{from:q=ne.presetPrimaryColors.blue,to:B=ne.presetPrimaryColors.blue,direction:te=Z==="rtl"?"to left":"to right"}=N,T=ue(N,["from","to","direction"]);if(Object.keys(T).length!==0){const pe=fe(T),C=`linear-gradient(${te}, ${pe})`;return{background:C,[oe]:C}}const ce=`linear-gradient(${te}, ${q}, ${B})`;return{background:ce,[oe]:ce}};var X=N=>{const{prefixCls:Z,direction:q,percent:B,size:te,strokeWidth:T,strokeColor:ce,strokeLinecap:pe="round",children:C,trailColor:ie=null,percentPosition:V,success:M}=N,{align:W,type:Y}=V,Ae=ce&&typeof ce!="string"?Q(ce,q):{[oe]:ce,background:ce},we=pe==="square"||pe==="butt"?0:void 0,ge=te!=null?te:[-1,T||(te==="small"?6:8)],[Oe,We]=he(ge,"line",{strokeWidth:T}),Pe={backgroundColor:ie||void 0,borderRadius:we},Be=Object.assign(Object.assign({width:`${ve(B)}%`,height:We,borderRadius:we},Ae),{[se]:ve(B)/100}),$e=Se(N),Ze={width:`${ve($e)}%`,height:We,borderRadius:we,backgroundColor:M==null?void 0:M.strokeColor},Ve={width:Oe<0?"100%":Oe},Je=d.createElement("div",{className:`${Z}-inner`,style:Pe},d.createElement("div",{className:r()(`${Z}-bg`,`${Z}-bg-${Y}`),style:Be},Y==="inner"&&C),$e!==void 0&&d.createElement("div",{className:`${Z}-success-bg`,style:Ze})),et=Y==="outer"&&W==="start",Ue=Y==="outer"&&W==="end";return Y==="outer"&&W==="center"?d.createElement("div",{className:`${Z}-layout-bottom`},Je,C):d.createElement("div",{className:`${Z}-outer`,style:Ve},et&&C,Je,Ue&&C)},re=N=>{const{size:Z,steps:q,rounding:B=Math.round,percent:te=0,strokeWidth:T=8,strokeColor:ce,trailColor:pe=null,prefixCls:C,children:ie}=N,V=B(q*(te/100)),M=Z==="small"?2:14,W=Z!=null?Z:[M,T],[Y,Ae]=he(W,"step",{steps:q,strokeWidth:T}),we=Y/q,ge=Array.from({length:q});for(let Oe=0;Oe<q;Oe++){const We=Array.isArray(ce)?ce[Oe]:ce;ge[Oe]=d.createElement("div",{key:Oe,className:r()(`${C}-steps-item`,{[`${C}-steps-item-active`]:Oe<=V-1}),style:{backgroundColor:Oe<=V-1?We:pe,width:we,height:Ae}})}return d.createElement("div",{className:`${C}-steps-outer`},ge,ie)},xe=function(N,Z){var q={};for(var B in N)Object.prototype.hasOwnProperty.call(N,B)&&Z.indexOf(B)<0&&(q[B]=N[B]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var te=0,B=Object.getOwnPropertySymbols(N);te<B.length;te++)Z.indexOf(B[te])<0&&Object.prototype.propertyIsEnumerable.call(N,B[te])&&(q[B[te]]=N[B[te]]);return q};const Ce=null,Fe=["normal","exception","active","success"];var de=d.forwardRef((N,Z)=>{const{prefixCls:q,className:B,rootClassName:te,steps:T,strokeColor:ce,percent:pe=0,size:C="default",showInfo:ie=!0,type:V="line",status:M,format:W,style:Y,percentPosition:Ae={}}=N,we=xe(N,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:ge="end",type:Oe="outer"}=Ae,We=Array.isArray(ce)?ce[0]:ce,Pe=typeof ce=="string"||Array.isArray(ce)?ce:void 0,Be=d.useMemo(()=>{if(We){const lt=typeof We=="string"?We:Object.values(We)[0];return new m.FastColor(lt).isLight()}return!1},[ce]),$e=d.useMemo(()=>{var lt,ut;const _t=Se(N);return parseInt(_t!==void 0?(lt=_t!=null?_t:0)===null||lt===void 0?void 0:lt.toString():(ut=pe!=null?pe:0)===null||ut===void 0?void 0:ut.toString(),10)},[pe,N.success,N.successPercent]),Ze=d.useMemo(()=>!Fe.includes(M)&&$e>=100?"success":M||"normal",[M,$e]),{getPrefixCls:Ve,direction:Je,progress:et}=d.useContext(s.E_),Ue=Ve("progress",q),[Ye,qe,Qe]=ye(Ue),je=V==="line",rt=je&&!T,at=d.useMemo(()=>{if(!ie)return null;const lt=Se(N);let ut;const _t=W||(mt=>`${mt}%`),tt=je&&Be&&Oe==="inner";return Oe==="inner"||W||Ze!=="exception"&&Ze!=="success"?ut=_t(ve(pe),ve(lt)):Ze==="exception"?ut=je?d.createElement(a.Z,null):d.createElement(f.Z,null):Ze==="success"&&(ut=je?d.createElement(b.Z,null):d.createElement(_.Z,null)),d.createElement("span",{className:r()(`${Ue}-text`,{[`${Ue}-text-bright`]:tt,[`${Ue}-text-${ge}`]:rt,[`${Ue}-text-${Oe}`]:rt}),title:typeof ut=="string"?ut:void 0},ut)},[ie,pe,$e,Ze,V,Ue,W]);let ft;V==="line"?ft=T?d.createElement(re,Object.assign({},N,{strokeColor:Pe,prefixCls:Ue,steps:typeof T=="object"?T.count:T}),at):d.createElement(X,Object.assign({},N,{strokeColor:We,prefixCls:Ue,direction:Je,percentPosition:{align:ge,type:Oe}}),at):(V==="circle"||V==="dashboard")&&(ft=d.createElement(Ie,Object.assign({},N,{strokeColor:We,prefixCls:Ue,progressStatus:Ze}),at));const xt=r()(Ue,`${Ue}-status-${Ze}`,{[`${Ue}-${V==="dashboard"&&"circle"||V}`]:V!=="line",[`${Ue}-inline-circle`]:V==="circle"&&he(C,"circle")[0]<=20,[`${Ue}-line`]:rt,[`${Ue}-line-align-${ge}`]:rt,[`${Ue}-line-position-${Oe}`]:rt,[`${Ue}-steps`]:T,[`${Ue}-show-info`]:ie,[`${Ue}-${C}`]:typeof C=="string",[`${Ue}-rtl`]:Je==="rtl"},et==null?void 0:et.className,B,te,qe,Qe);return Ye(d.createElement("div",Object.assign({ref:Z,style:Object.assign(Object.assign({},et==null?void 0:et.style),Y),className:xt,role:"progressbar","aria-valuenow":$e,"aria-valuemin":0,"aria-valuemax":100},(0,n.Z)(we,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),ft))}),_e=de},37645:function(Xe,O,o){"use strict";o.d(O,{ZP:function(){return f},qN:function(){return b},wZ:function(){return _}});var d=o(36237),m=o(36305);const b=8;function _(h){const{contentRadius:r,limitVerticalRadius:n}=h,s=r>12?r+2:12;return{arrowOffsetHorizontal:s,arrowOffsetVertical:n?b:s}}function a(h,r){return h?r:{}}function f(h,r,n){const{componentCls:s,boxShadowPopoverArrow:e,arrowOffsetVertical:u,arrowOffsetHorizontal:t}=h,{arrowDistance:i=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[s]:Object.assign(Object.assign(Object.assign(Object.assign({[`${s}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,m.W)(h,r,e)),{"&:before":{background:r}})]},a(!!l.top,{[[`&-placement-top > ${s}-arrow`,`&-placement-topLeft > ${s}-arrow`,`&-placement-topRight > ${s}-arrow`].join(",")]:{bottom:i,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${s}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":t,[`> ${s}-arrow`]:{left:{_skip_check_:!0,value:t}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,d.unit)(t)})`,[`> ${s}-arrow`]:{right:{_skip_check_:!0,value:t}}}})),a(!!l.bottom,{[[`&-placement-bottom > ${s}-arrow`,`&-placement-bottomLeft > ${s}-arrow`,`&-placement-bottomRight > ${s}-arrow`].join(",")]:{top:i,transform:"translateY(-100%)"},[`&-placement-bottom > ${s}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":t,[`> ${s}-arrow`]:{left:{_skip_check_:!0,value:t}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${(0,d.unit)(t)})`,[`> ${s}-arrow`]:{right:{_skip_check_:!0,value:t}}}})),a(!!l.left,{[[`&-placement-left > ${s}-arrow`,`&-placement-leftTop > ${s}-arrow`,`&-placement-leftBottom > ${s}-arrow`].join(",")]:{right:{_skip_check_:!0,value:i},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${s}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${s}-arrow`]:{top:u},[`&-placement-leftBottom > ${s}-arrow`]:{bottom:u}})),a(!!l.right,{[[`&-placement-right > ${s}-arrow`,`&-placement-rightTop > ${s}-arrow`,`&-placement-rightBottom > ${s}-arrow`].join(",")]:{left:{_skip_check_:!0,value:i},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${s}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${s}-arrow`]:{top:u},[`&-placement-rightBottom > ${s}-arrow`]:{bottom:u}}))}}},36305:function(Xe,O,o){"use strict";o.d(O,{W:function(){return b},w:function(){return m}});var d=o(36237);function m(_){const{sizePopupArrow:a,borderRadiusXS:f,borderRadiusOuter:h}=_,r=a/2,n=0,s=r,e=h*1/Math.sqrt(2),u=r-h*(1-1/Math.sqrt(2)),t=r-f*(1/Math.sqrt(2)),i=h*(Math.sqrt(2)-1)+f*(1/Math.sqrt(2)),l=2*r-t,c=i,p=2*r-e,x=u,v=2*r-n,y=s,g=r*Math.sqrt(2)+h*(Math.sqrt(2)-2),w=h*(Math.sqrt(2)-1),E=`polygon(${w}px 100%, 50% ${w}px, ${2*r-w}px 100%, ${w}px 100%)`,S=`path('M ${n} ${s} A ${h} ${h} 0 0 0 ${e} ${u} L ${t} ${i} A ${f} ${f} 0 0 1 ${l} ${c} L ${p} ${x} A ${h} ${h} 0 0 0 ${v} ${y} Z')`;return{arrowShadowWidth:g,arrowPath:S,arrowPolygon:E}}const b=(_,a,f)=>{const{sizePopupArrow:h,arrowPolygon:r,arrowPath:n,arrowShadowWidth:s,borderRadiusXS:e,calc:u}=_;return{pointerEvents:"none",width:h,height:h,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:h,height:u(h).div(2).equal(),background:a,clipPath:{_multi_value_:!0,value:[r,n]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${(0,d.unit)(e)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:f,zIndex:0,background:"transparent"}}}},93427:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return m}});var d=o(34998);function m(b,_){return d.i.reduce((a,f)=>{const h=b[`${f}1`],r=b[`${f}3`],n=b[`${f}6`],s=b[`${f}7`];return Object.assign(Object.assign({},a),_(f,{lightColor:h,lightBorderColor:r,darkColor:n,textColor:s}))},{})}},25399:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return A}});var d=o(59301),m=o(92310),b=o.n(m),_=o(29125),a=o(18929),f=o(62487),h=o(75030),r=o(86641),n=o(52838),s=o(22703),e=o(32383),u=o(55743),t=o(57700),i=o(48755),l=o(36237),c=o(63356),p=o(34925),x=o(37645),v=o(36305),y=o(93427),g=o(51636),w=o(16931);const E=P=>{const{calc:K,componentCls:$,tooltipMaxWidth:H,tooltipColor:ne,tooltipBg:ve,tooltipBorderRadius:Se,zIndexPopup:He,controlHeight:Me,boxShadowSecondary:he,paddingSM:ke,paddingXS:Ke,arrowOffsetHorizontal:Te,sizePopupArrow:Ie}=P,De=K(Se).add(Ie).add(Te).equal(),Ne=K(Se).mul(2).add(Ie).equal();return[{[$]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,c.Wf)(P)),{position:"absolute",zIndex:He,display:"block",width:"max-content",maxWidth:H,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":ve,[`${$}-inner`]:{minWidth:Ne,minHeight:Me,padding:`${(0,l.unit)(P.calc(ke).div(2).equal())} ${(0,l.unit)(Ke)}`,color:ne,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ve,borderRadius:Se,boxShadow:he,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:De},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${$}-inner`]:{borderRadius:P.min(Se,x.qN)}},[`${$}-content`]:{position:"relative"}}),(0,y.Z)(P,(Re,Le)=>{let{darkColor:oe}=Le;return{[`&${$}-${Re}`]:{[`${$}-inner`]:{backgroundColor:oe},[`${$}-arrow`]:{"--antd-arrow-background-color":oe}}}})),{"&-rtl":{direction:"rtl"}})},(0,x.ZP)(P,"var(--antd-arrow-background-color)"),{[`${$}-pure`]:{position:"relative",maxWidth:"none",margin:P.sizePopupArrow}}]},S=P=>Object.assign(Object.assign({zIndexPopup:P.zIndexPopupBase+70},(0,x.wZ)({contentRadius:P.borderRadius,limitVerticalRadius:!0})),(0,v.w)((0,g.mergeToken)(P,{borderRadiusOuter:Math.min(P.borderRadiusOuter,4)})));var k=function(P){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return(0,w.I$)("Tooltip",H=>{const{borderRadius:ne,colorTextLightSolid:ve,colorBgSpotlight:Se}=H,He=(0,g.mergeToken)(H,{tooltipMaxWidth:250,tooltipColor:ve,tooltipBorderRadius:ne,tooltipBg:Se});return[E(He),(0,p._y)(H,"zoom-big-fast")]},S,{resetStyle:!1,injectStyle:K})(P)},D=o(29509);function L(P,K){const $=(0,D.o2)(K),H=b()({[`${P}-${K}`]:K&&$}),ne={},ve={};return K&&!$&&(ne.background=K,ve["--antd-arrow-background-color"]=K),{className:H,overlayStyle:ne,arrowStyle:ve}}var j=P=>{const{prefixCls:K,className:$,placement:H="top",title:ne,color:ve,overlayInnerStyle:Se}=P,{getPrefixCls:He}=d.useContext(i.E_),Me=He("tooltip",K),[he,ke,Ke]=k(Me),Te=L(Me,ve),Ie=Te.arrowStyle,De=Object.assign(Object.assign({},Se),Te.overlayStyle),Ne=b()(ke,Ke,Me,`${Me}-pure`,`${Me}-placement-${H}`,$,Te.className);return he(d.createElement("div",{className:Ne,style:Ie},d.createElement("div",{className:`${Me}-arrow`}),d.createElement(_.G,Object.assign({},P,{className:ke,prefixCls:Me,overlayInnerStyle:De}),ne)))},le=function(P,K){var $={};for(var H in P)Object.prototype.hasOwnProperty.call(P,H)&&K.indexOf(H)<0&&($[H]=P[H]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ne=0,H=Object.getOwnPropertySymbols(P);ne<H.length;ne++)K.indexOf(H[ne])<0&&Object.prototype.propertyIsEnumerable.call(P,H[ne])&&($[H[ne]]=P[H[ne]]);return $};const J=d.forwardRef((P,K)=>{var $,H;const{prefixCls:ne,openClassName:ve,getTooltipContainer:Se,color:He,overlayInnerStyle:Me,children:he,afterOpenChange:ke,afterVisibleChange:Ke,destroyTooltipOnHide:Te,arrow:Ie=!0,title:De,overlay:Ne,builtinPlacements:Re,arrowPointAtCenter:Le=!1,autoAdjustOverflow:oe=!0,motion:se,getPopupContainer:ee,placement:me="top",mouseEnterDelay:G=.1,mouseLeaveDelay:ae=.1,overlayStyle:be,rootClassName:Ee,overlayClassName:ye,styles:ue,classNames:fe}=P,Q=le(P,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),R=!!Ie,[,X]=(0,t.ZP)(),{getPopupContainer:F,getPrefixCls:re,direction:xe,className:Ce,style:Fe,classNames:I,styles:de}=(0,i.dj)("tooltip"),_e=(0,e.ln)("Tooltip"),N=d.useRef(null),Z=()=>{var Ue;(Ue=N.current)===null||Ue===void 0||Ue.forceAlign()};d.useImperativeHandle(K,()=>{var Ue,Ye;return{forceAlign:Z,forcePopupAlign:()=>{_e.deprecated(!1,"forcePopupAlign","forceAlign"),Z()},nativeElement:(Ue=N.current)===null||Ue===void 0?void 0:Ue.nativeElement,popupElement:(Ye=N.current)===null||Ye===void 0?void 0:Ye.popupElement}});const[q,B]=(0,a.Z)(!1,{value:($=P.open)!==null&&$!==void 0?$:P.visible,defaultValue:(H=P.defaultOpen)!==null&&H!==void 0?H:P.defaultVisible}),te=!De&&!Ne&&De!==0,T=Ue=>{var Ye,qe;B(te?!1:Ue),te||((Ye=P.onOpenChange)===null||Ye===void 0||Ye.call(P,Ue),(qe=P.onVisibleChange)===null||qe===void 0||qe.call(P,Ue))},ce=d.useMemo(()=>{var Ue,Ye;let qe=Le;return typeof Ie=="object"&&(qe=(Ye=(Ue=Ie.pointAtCenter)!==null&&Ue!==void 0?Ue:Ie.arrowPointAtCenter)!==null&&Ye!==void 0?Ye:Le),Re||(0,n.Z)({arrowPointAtCenter:qe,autoAdjustOverflow:oe,arrowWidth:R?X.sizePopupArrow:0,borderRadius:X.borderRadius,offset:X.marginXXS,visibleFirst:!0})},[Le,Ie,Re,X]),pe=d.useMemo(()=>De===0?De:Ne||De||"",[Ne,De]),C=d.createElement(f.Z,{space:!0},typeof pe=="function"?pe():pe),ie=re("tooltip",ne),V=re(),M=P["data-popover-inject"];let W=q;!("open"in P)&&!("visible"in P)&&te&&(W=!1);const Y=d.isValidElement(he)&&!(0,s.M2)(he)?he:d.createElement("span",null,he),Ae=Y.props,we=!Ae.className||typeof Ae.className=="string"?b()(Ae.className,ve||`${ie}-open`):Ae.className,[ge,Oe,We]=k(ie,!M),Pe=L(ie,He),Be=Pe.arrowStyle,$e=b()(ye,{[`${ie}-rtl`]:xe==="rtl"},Pe.className,Ee,Oe,We,Ce,I.root,fe==null?void 0:fe.root),Ze=b()(I.body,fe==null?void 0:fe.body),[Ve,Je]=(0,h.Cn)("Tooltip",Q.zIndex),et=d.createElement(_.Z,Object.assign({},Q,{zIndex:Ve,showArrow:R,placement:me,mouseEnterDelay:G,mouseLeaveDelay:ae,prefixCls:ie,classNames:{root:$e,body:Ze},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Be),de.root),Fe),be),ue==null?void 0:ue.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},de.body),Me),ue==null?void 0:ue.body),Pe.overlayStyle)},getTooltipContainer:ee||Se||F,ref:N,builtinPlacements:ce,overlay:C,visible:W,onVisibleChange:T,afterVisibleChange:ke!=null?ke:Ke,arrowContent:d.createElement("span",{className:`${ie}-arrow-content`}),motion:{motionName:(0,r.m)(V,"zoom-big-fast",P.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Te}),W?(0,s.Tm)(Y,{className:we}):Y);return ge(d.createElement(u.Z.Provider,{value:Je},et))});J._InternalPanelDoNotUseOrYouWillBeFired=j;var A=J},24334:function(Xe,O,o){var d,m;(function(b,_){Xe.exports=_(b)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof o.g!="undefined"?o.g:this,function(b){"use strict";b=b||{};var _=b.Base64,a="2.6.4",f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=function(U){for(var J={},A=0,P=U.length;A<P;A++)J[U.charAt(A)]=A;return J}(f),r=String.fromCharCode,n=function(U){if(U.length<2){var J=U.charCodeAt(0);return J<128?U:J<2048?r(192|J>>>6)+r(128|J&63):r(224|J>>>12&15)+r(128|J>>>6&63)+r(128|J&63)}else{var J=65536+(U.charCodeAt(0)-55296)*1024+(U.charCodeAt(1)-56320);return r(240|J>>>18&7)+r(128|J>>>12&63)+r(128|J>>>6&63)+r(128|J&63)}},s=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,e=function(U){return U.replace(s,n)},u=function(U){var J=[0,2,1][U.length%3],A=U.charCodeAt(0)<<16|(U.length>1?U.charCodeAt(1):0)<<8|(U.length>2?U.charCodeAt(2):0),P=[f.charAt(A>>>18),f.charAt(A>>>12&63),J>=2?"=":f.charAt(A>>>6&63),J>=1?"=":f.charAt(A&63)];return P.join("")},t=b.btoa&&typeof b.btoa=="function"?function(U){return b.btoa(U)}:function(U){if(U.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return U.replace(/[\s\S]{1,3}/g,u)},i=function(U){return t(e(String(U)))},l=function(U){return U.replace(/[+\/]/g,function(J){return J=="+"?"-":"_"}).replace(/=/g,"")},c=function(U,J){return J?l(i(U)):i(U)},p=function(U){return c(U,!0)},x;b.Uint8Array&&(x=function(U,J){for(var A="",P=0,K=U.length;P<K;P+=3){var $=U[P],H=U[P+1],ne=U[P+2],ve=$<<16|H<<8|ne;A+=f.charAt(ve>>>18)+f.charAt(ve>>>12&63)+(typeof H!="undefined"?f.charAt(ve>>>6&63):"=")+(typeof ne!="undefined"?f.charAt(ve&63):"=")}return J?l(A):A});var v=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(U){switch(U.length){case 4:var J=(7&U.charCodeAt(0))<<18|(63&U.charCodeAt(1))<<12|(63&U.charCodeAt(2))<<6|63&U.charCodeAt(3),A=J-65536;return r((A>>>10)+55296)+r((A&1023)+56320);case 3:return r((15&U.charCodeAt(0))<<12|(63&U.charCodeAt(1))<<6|63&U.charCodeAt(2));default:return r((31&U.charCodeAt(0))<<6|63&U.charCodeAt(1))}},g=function(U){return U.replace(v,y)},w=function(U){var J=U.length,A=J%4,P=(J>0?h[U.charAt(0)]<<18:0)|(J>1?h[U.charAt(1)]<<12:0)|(J>2?h[U.charAt(2)]<<6:0)|(J>3?h[U.charAt(3)]:0),K=[r(P>>>16),r(P>>>8&255),r(P&255)];return K.length-=[0,0,2,1][A],K.join("")},E=b.atob&&typeof b.atob=="function"?function(U){return b.atob(U)}:function(U){return U.replace(/\S{1,4}/g,w)},S=function(U){return E(String(U).replace(/[^A-Za-z0-9\+\/]/g,""))},k=function(U){return g(E(U))},D=function(U){return String(U).replace(/[-_]/g,function(J){return J=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(U){return k(D(U))},z;b.Uint8Array&&(z=function(U){return Uint8Array.from(S(D(U)),function(J){return J.charCodeAt(0)})});var j=function(){var U=b.Base64;return b.Base64=_,U};if(b.Base64={VERSION:a,atob:S,btoa:t,fromBase64:L,toBase64:c,utob:e,encode:c,encodeURI:p,btou:g,decode:L,noConflict:j,fromUint8Array:x,toUint8Array:z},typeof Object.defineProperty=="function"){var le=function(U){return{value:U,enumerable:!1,writable:!0,configurable:!0}};b.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",le(function(){return L(this)})),Object.defineProperty(String.prototype,"toBase64",le(function(U){return c(this,U)})),Object.defineProperty(String.prototype,"toBase64URI",le(function(){return c(this,!0)}))}}return b.Meteor&&(Base64=b.Base64),Xe.exports?Xe.exports.Base64=b.Base64:(d=[],m=function(){return b.Base64}.apply(O,d),m!==void 0&&(Xe.exports=m)),{Base64:b.Base64}})},57128:function(Xe,O,o){"use strict";function d(f){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(r){return typeof r}:d=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},d(f)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var m=_(o(50500));function b(){if(typeof WeakMap!="function")return null;var f=new WeakMap;return b=function(){return f},f}function _(f){if(f&&f.__esModule)return f;if(f===null||d(f)!=="object"&&typeof f!="function")return{default:f};var h=b();if(h&&h.has(f))return h.get(f);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in f)if(Object.prototype.hasOwnProperty.call(f,s)){var e=n?Object.getOwnPropertyDescriptor(f,s):null;e&&(e.get||e.set)?Object.defineProperty(r,s,e):r[s]=f[s]}return r.default=f,h&&h.set(f,r),r}var a={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(h){"use strict";for(var r="",n=h.length,s=n%3,e=0;e<n-2;e+=3)r+=this.toBase64Table[h[e]>>2],r+=this.toBase64Table[((h[e]&3)<<4)+(h[e+1]>>4)],r+=this.toBase64Table[((h[e+1]&15)<<2)+(h[e+2]>>6)],r+=this.toBase64Table[h[e+2]&63];var u=n-s;return s===2?(r+=this.toBase64Table[h[u]>>2],r+=this.toBase64Table[((h[u]&3)<<4)+(h[u+1]>>4)],r+=this.toBase64Table[(h[u+1]&15)<<2],r+=this.toBase64Table[64]):s===1&&(r+=this.toBase64Table[h[u]>>2],r+=this.toBase64Table[(h[u]&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 s=(n>>2)*3+Math.floor(n%4/1.5),e=new Array(s),u=0,t=0,i=0,l=r;l<h.length;l++){var c=this.toBinaryTable[h.charCodeAt(l)&127],p=h.charAt(l)===this.base64Pad;if(c===-1){m.Error("Illegal character code "+h.charCodeAt(l)+" at position "+l);continue}t=t<<6|c,u+=6,u>=8&&(u-=8,p||(e[i++]=t>>u&255),t&=(1<<u)-1)}if(u){var x=new Error("Corrupted base64 string");throw x.name="Base64-Error",x}return e}};O.default=a},17852:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;function o(_,a){if(!(_ instanceof a))throw new TypeError("Cannot call a class as a function")}function d(_,a){for(var f=0;f<a.length;f++){var h=a[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,h.key,h)}}function m(_,a,f){return a&&d(_.prototype,a),f&&d(_,f),_}var b=function(){function _(){o(this,_)}return m(_,[{key:"decodeRect",value:function(f,h,r,n,s,e,u){if(s.rQwait("COPYRECT",4))return!1;var t=s.rQshift16(),i=s.rQshift16();return e.copyImage(t,i,f,h,r,n),!0}}]),_}();O.default=b},18330:function(Xe,O,o){"use strict";function d(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(e){return typeof e}:d=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(n)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var m=_(o(50500));function b(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return b=function(){return n},n}function _(n){if(n&&n.__esModule)return n;if(n===null||d(n)!=="object"&&typeof n!="function")return{default:n};var s=b();if(s&&s.has(n))return s.get(n);var e={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){var i=u?Object.getOwnPropertyDescriptor(n,t):null;i&&(i.get||i.set)?Object.defineProperty(e,t,i):e[t]=n[t]}return e.default=n,s&&s.set(n,e),e}function a(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function f(n,s){for(var e=0;e<s.length;e++){var u=s[e];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,u.key,u)}}function h(n,s,e){return s&&f(n.prototype,s),e&&f(n,e),n}var r=function(){function n(){a(this,n),this._tiles=0,this._lastsubencoding=0}return h(n,[{key:"decodeRect",value:function(e,u,t,i,l,c,p){for(this._tiles===0&&(this._tilesX=Math.ceil(t/16),this._tilesY=Math.ceil(i/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){var x=1;if(l.rQwait("HEXTILE",x))return!1;var v=l.rQ,y=l.rQi,g=v[y];if(g>30)throw new Error("Illegal hextile subencoding (subencoding: "+g+")");var w=this._totalTiles-this._tiles,E=w%this._tilesX,S=Math.floor(w/this._tilesX),k=e+E*16,D=u+S*16,L=Math.min(16,e+t-k),z=Math.min(16,u+i-D);if(g&1)x+=L*z*4;else if(g&2&&(x+=4),g&4&&(x+=4),g&8){if(x++,l.rQwait("HEXTILE",x))return!1;var j=v[y+x-1];g&16?x+=j*6:x+=j*2}if(l.rQwait("HEXTILE",x))return!1;if(y++,g===0)this._lastsubencoding&1?m.Debug(" Ignoring blank after RAW"):c.fillRect(k,D,L,z,this._background);else if(g&1)c.blitImage(k,D,L,z,v,y),y+=x-1;else{if(g&2&&(this._background=[v[y],v[y+1],v[y+2],v[y+3]],y+=4),g&4&&(this._foreground=[v[y],v[y+1],v[y+2],v[y+3]],y+=4),c.startTile(k,D,L,z,this._background),g&8){var le=v[y];y++;for(var U=0;U<le;U++){var J=void 0;g&16?(J=[v[y],v[y+1],v[y+2],v[y+3]],y+=4):J=this._foreground;var A=v[y];y++;var P=A>>4,K=A&15,$=v[y];y++;var H=($>>4)+1,ne=($&15)+1;c.subTile(P,K,H,ne,J)}}c.finishTile()}l.rQi=y,this._lastsubencoding=g,this._tiles--}return!0}}]),n}();O.default=r},11231:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;function o(_,a){if(!(_ instanceof a))throw new TypeError("Cannot call a class as a function")}function d(_,a){for(var f=0;f<a.length;f++){var h=a[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,h.key,h)}}function m(_,a,f){return a&&d(_.prototype,a),f&&d(_,f),_}var b=function(){function _(){o(this,_),this._lines=0}return m(_,[{key:"decodeRect",value:function(f,h,r,n,s,e,u){this._lines===0&&(this._lines=n);var t=u==8?1:4,i=r*t;if(s.rQwait("RAW",i))return!1;var l=h+(n-this._lines),c=Math.min(this._lines,Math.floor(s.rQlen/i)),p=s.rQ,x=s.rQi;if(u==8){for(var v=r*c,y=new Uint8Array(v*4),g=0;g<v;g++)y[g*4+0]=(p[x+g]>>0&3)*255/3,y[g*4+1]=(p[x+g]>>2&3)*255/3,y[g*4+2]=(p[x+g]>>4&3)*255/3,y[g*4+4]=0;p=y,x=0}return e.blitImage(f,l,r,c,p,x),s.rQskipBytes(c*i),this._lines-=c,!(this._lines>0)}}]),_}();O.default=b},57507:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;function o(_,a){if(!(_ instanceof a))throw new TypeError("Cannot call a class as a function")}function d(_,a){for(var f=0;f<a.length;f++){var h=a[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,h.key,h)}}function m(_,a,f){return a&&d(_.prototype,a),f&&d(_,f),_}var b=function(){function _(){o(this,_),this._subrects=0}return m(_,[{key:"decodeRect",value:function(f,h,r,n,s,e,u){if(this._subrects===0){if(s.rQwait("RRE",8))return!1;this._subrects=s.rQshift32();var t=s.rQshiftBytes(4);e.fillRect(f,h,r,n,t)}for(;this._subrects>0;){if(s.rQwait("RRE",12))return!1;var i=s.rQshiftBytes(4),l=s.rQshift16(),c=s.rQshift16(),p=s.rQshift16(),x=s.rQshift16();e.fillRect(f+l,h+c,p,x,i),this._subrects--}return!0}}]),_}();O.default=b},21330:function(Xe,O,o){"use strict";function d(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(t){return typeof t}:d=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(e)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var m=f(o(50500)),b=_(o(48831));function _(e){return e&&e.__esModule?e:{default:e}}function a(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return a=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(e===null||d(e)!=="object"&&typeof e!="function")return{default:e};var u=a();if(u&&u.has(e))return u.get(e);var t={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var c=i?Object.getOwnPropertyDescriptor(e,l):null;c&&(c.get||c.set)?Object.defineProperty(t,l,c):t[l]=e[l]}return t.default=e,u&&u.set(e,t),t}function h(e,u){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}function r(e,u){for(var t=0;t<u.length;t++){var i=u[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,u,t){return u&&r(e.prototype,u),t&&r(e,t),e}var s=function(){function e(){h(this,e),this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(var u=0;u<4;u++)this._zlibs[u]=new b.default}return n(e,[{key:"decodeRect",value:function(t,i,l,c,p,x,v){if(this._ctl===null){if(p.rQwait("TIGHT compression-control",1))return!1;this._ctl=p.rQshift8();for(var y=0;y<4;y++)this._ctl>>y&1&&(this._zlibs[y].reset(),m.Info("Reset zlib stream "+y));this._ctl=this._ctl>>4}var g;if(this._ctl===8)g=this._fillRect(t,i,l,c,p,x,v);else if(this._ctl===9)g=this._jpegRect(t,i,l,c,p,x,v);else if(this._ctl===10)g=this._pngRect(t,i,l,c,p,x,v);else if(!(this._ctl&128))g=this._basicRect(this._ctl,t,i,l,c,p,x,v);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return g&&(this._ctl=null),g}},{key:"_fillRect",value:function(t,i,l,c,p,x,v){if(p.rQwait("TIGHT",3))return!1;var y=p.rQi,g=p.rQ;return x.fillRect(t,i,l,c,[g[y+2],g[y+1],g[y]],!1),p.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(t,i,l,c,p,x,v){var y=this._readData(p);return y===null?!1:(x.imageRect(t,i,l,c,"image/jpeg",y),!0)}},{key:"_pngRect",value:function(t,i,l,c,p,x,v){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(t,i,l,c,p,x,v,y){if(this._filter===null)if(t&4){if(x.rQwait("TIGHT",1))return!1;this._filter=x.rQshift8()}else this._filter=0;var g=t&3,w;switch(this._filter){case 0:w=this._copyFilter(g,i,l,c,p,x,v,y);break;case 1:w=this._paletteFilter(g,i,l,c,p,x,v,y);break;case 2:w=this._gradientFilter(g,i,l,c,p,x,v,y);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return w&&(this._filter=null),w}},{key:"_copyFilter",value:function(t,i,l,c,p,x,v,y){var g=c*p*3,w;if(g<12){if(x.rQwait("TIGHT",g))return!1;w=x.rQshiftBytes(g)}else{if(w=this._readData(x),w===null)return!1;this._zlibs[t].setInput(w),w=this._zlibs[t].inflate(g),this._zlibs[t].setInput(null)}return v.blitRgbImage(i,l,c,p,w,0,!1),!0}},{key:"_paletteFilter",value:function(t,i,l,c,p,x,v,y){if(this._numColors===0){if(x.rQwait("TIGHT palette",1))return!1;var g=x.rQpeek8()+1,w=g*3;if(x.rQwait("TIGHT palette",1+w))return!1;this._numColors=g,x.rQskipBytes(1),x.rQshiftTo(this._palette,w)}var E=this._numColors<=2?1:8,S=Math.floor((c*E+7)/8),k=S*p,D;if(k<12){if(x.rQwait("TIGHT",k))return!1;D=x.rQshiftBytes(k)}else{if(D=this._readData(x),D===null)return!1;this._zlibs[t].setInput(D),D=this._zlibs[t].inflate(k),this._zlibs[t].setInput(null)}return this._numColors==2?this._monoRect(i,l,c,p,D,this._palette,v):this._paletteRect(i,l,c,p,D,this._palette,v),this._numColors=0,!0}},{key:"_monoRect",value:function(t,i,l,c,p,x,v){for(var y=this._getScratchBuffer(l*c*4),g=Math.floor((l+7)/8),w=Math.floor(l/8),E=0;E<c;E++){var S=void 0,k=void 0,D=void 0;for(D=0;D<w;D++)for(var L=7;L>=0;L--)S=(E*l+D*8+7-L)*4,k=(p[E*g+D]>>L&1)*3,y[S]=x[k],y[S+1]=x[k+1],y[S+2]=x[k+2],y[S+3]=255;for(var z=7;z>=8-l%8;z--)S=(E*l+D*8+7-z)*4,k=(p[E*g+D]>>z&1)*3,y[S]=x[k],y[S+1]=x[k+1],y[S+2]=x[k+2],y[S+3]=255}v.blitRgbxImage(t,i,l,c,y,0,!1)}},{key:"_paletteRect",value:function(t,i,l,c,p,x,v){for(var y=this._getScratchBuffer(l*c*4),g=l*c*4,w=0,E=0;w<g;w+=4,E++){var S=p[E]*3;y[w]=x[S],y[w+1]=x[S+1],y[w+2]=x[S+2],y[w+3]=255}v.blitRgbxImage(t,i,l,c,y,0,!1)}},{key:"_gradientFilter",value:function(t,i,l,c,p,x,v,y){throw new Error("Gradient filter not implemented")}},{key:"_readData",value:function(t){if(this._len===0){if(t.rQwait("TIGHT",3))return null;var i;i=t.rQshift8(),this._len=i&127,i&128&&(i=t.rQshift8(),this._len|=(i&127)<<7,i&128&&(i=t.rQshift8(),this._len|=i<<14))}if(t.rQwait("TIGHT",this._len))return null;var l=t.rQshiftBytes(this._len);return this._len=0,l}},{key:"_getScratchBuffer",value:function(t){return(!this._scratchBuffer||this._scratchBuffer.length<t)&&(this._scratchBuffer=new Uint8Array(t)),this._scratchBuffer}}]),e}();O.default=s},91649:function(Xe,O,o){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=m(o(21330));function m(l){return l&&l.__esModule?l:{default:l}}function b(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(p){return typeof p}:b=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},b(l)}function _(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}function a(l,c){for(var p=0;p<c.length;p++){var x=c[p];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}}function f(l,c,p){return c&&a(l.prototype,c),p&&a(l,p),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(x,v){return x.__proto__=v,x},r(l,c)}function n(l){var c=u();return function(){var x=t(l),v;if(c){var y=t(this).constructor;v=Reflect.construct(x,arguments,y)}else v=x.apply(this,arguments);return s(this,v)}}function s(l,c){return c&&(b(c)==="object"||typeof c=="function")?c:e(l)}function e(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function u(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}function t(l){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(p){return p.__proto__||Object.getPrototypeOf(p)},t(l)}var i=function(l){h(p,l);var c=n(p);function p(){return _(this,p),c.apply(this,arguments)}return f(p,[{key:"_pngRect",value:function(v,y,g,w,E,S,k){var D=this._readData(E);return D===null?!1:(S.imageRect(v,y,g,w,"image/png",D),!0)}},{key:"_basicRect",value:function(v,y,g,w,E,S,k,D){throw new Error("BasicCompression received in TightPNG rect")}}]),p}(d.default);O.default=i},17834:function(Xe,O,o){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=o(25805),m=b(o(27589));function b(r){return r&&r.__esModule?r:{default:r}}function _(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function a(r,n){for(var s=0;s<n.length;s++){var e=n[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function f(r,n,s){return n&&a(r.prototype,n),s&&a(r,s),r}var h=function(){function r(){_(this,r),this.strm=new m.default,this.chunkSize=1024*10*10,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,(0,d.deflateInit)(this.strm,this.windowBits)}return f(r,[{key:"deflate",value:function(s){this.strm.input=s,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0,this.strm.output=this.outputBuffer,this.strm.avail_out=this.chunkSize,this.strm.next_out=0;var e=(0,d.deflate)(this.strm,d.Z_FULL_FLUSH),u=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);if(e<0)throw new Error("zlib deflate failed");if(this.strm.avail_in>0){var t=[u],i=u.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,e=(0,d.deflate)(this.strm,d.Z_FULL_FLUSH),e<0)throw new Error("zlib deflate failed");var l=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);i+=l.length,t.push(l)}while(this.strm.avail_in>0);for(var c=new Uint8Array(i),p=0,x=0;x<t.length;x++)c.set(t[x],p),p+=t[x].length;u=c}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,u}}]),r}();O.default=h},64966:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;function o(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}function d(g,w){for(var E=0;E<w.length;E++){var S=w[E];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(g,S.key,S)}}function m(g,w,E){return w&&d(g.prototype,w),E&&d(g,E),g}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],_=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=0,f,h,r,n,s,e;f=65536,h=1<<24,r=f|h,n=4,s=1024,e=n|s;var u=[r|s,a|a,f|a,r|e,r|n,f|e,a|n,f|a,a|s,r|s,r|e,a|s,h|e,r|n,h|a,a|n,a|e,h|s,h|s,f|s,f|s,r|a,r|a,h|e,f|n,h|n,h|n,f|n,a|a,a|e,f|e,h|a,f|a,r|e,a|n,r|a,r|s,h|a,h|a,a|s,r|n,f|a,f|s,h|n,a|s,a|n,h|e,f|e,r|e,f|n,r|a,h|e,h|n,a|e,f|e,r|s,a|e,h|s,h|s,a|a,f|n,f|s,a|a,r|n];f=1<<20,h=1<<31,r=f|h,n=32,s=32768,e=n|s;var t=[r|e,h|s,a|s,f|e,f|a,a|n,r|n,h|e,h|n,r|e,r|s,h|a,h|s,f|a,a|n,r|n,f|s,f|n,h|e,a|a,h|a,a|s,f|e,r|a,f|n,h|n,a|a,f|s,a|e,r|s,r|a,a|e,a|a,f|e,r|n,f|a,h|e,r|a,r|s,a|s,r|a,h|s,a|n,r|e,f|e,a|n,a|s,h|a,a|e,r|s,f|a,h|n,f|n,h|e,h|n,f|n,f|s,a|a,h|s,a|e,h|a,r|n,r|e,f|s];f=1<<17,h=1<<27,r=f|h,n=8,s=512,e=n|s;var i=[a|e,r|s,a|a,r|n,h|s,a|a,f|e,h|s,f|n,h|n,h|n,f|a,r|e,f|n,r|a,a|e,h|a,a|n,r|s,a|s,f|s,r|a,r|n,f|e,h|e,f|s,f|a,h|e,a|n,r|e,a|s,h|a,r|s,h|a,f|n,a|e,f|a,r|s,h|s,a|a,a|s,f|n,r|e,h|s,h|n,a|s,a|a,r|n,h|e,f|a,h|a,r|e,a|n,f|e,f|s,h|n,r|a,h|e,a|e,r|a,f|e,a|n,r|n,f|s];f=8192,h=1<<23,r=f|h,n=1,s=128,e=n|s;var l=[r|n,f|e,f|e,a|s,r|s,h|e,h|n,f|n,a|a,r|a,r|a,r|e,a|e,a|a,h|s,h|n,a|n,f|a,h|a,r|n,a|s,h|a,f|n,f|s,h|e,a|n,f|s,h|s,f|a,r|s,r|e,a|e,h|s,h|n,r|a,r|e,a|e,a|a,a|a,r|a,f|s,h|s,h|e,a|n,r|n,f|e,f|e,a|s,r|e,a|e,a|n,f|a,h|n,f|n,r|s,h|e,f|n,f|s,h|a,r|n,a|s,h|a,f|a,r|s];f=1<<25,h=1<<30,r=f|h,n=256,s=1<<19,e=n|s;var c=[a|n,f|e,f|s,r|n,a|s,a|n,h|a,f|s,h|e,a|s,f|n,h|e,r|n,r|s,a|e,h|a,f|a,h|s,h|s,a|a,h|n,r|e,r|e,f|n,r|s,h|n,a|a,r|a,f|e,f|a,r|a,a|e,a|s,r|n,a|n,f|a,h|a,f|s,r|n,h|e,f|n,h|a,r|s,f|e,h|e,a|n,f|a,r|s,r|e,a|e,r|a,r|e,f|s,a|a,h|s,r|a,a|e,f|n,h|n,a|s,a|a,h|s,f|e,h|n];f=1<<22,h=1<<29,r=f|h,n=16,s=16384,e=n|s;var p=[h|n,r|a,a|s,r|e,r|a,a|n,r|e,f|a,h|s,f|e,f|a,h|n,f|n,h|s,h|a,a|e,a|a,f|n,h|e,a|s,f|s,h|e,a|n,r|n,r|n,a|a,f|e,r|s,a|e,f|s,r|s,h|a,h|s,a|n,r|n,f|s,r|e,f|a,a|e,h|n,f|a,h|s,h|a,a|e,h|n,r|e,f|s,r|a,f|e,r|s,a|a,r|n,a|n,a|s,r|a,f|e,a|s,f|n,h|e,a|a,r|s,h|a,f|n,h|e];f=1<<21,h=1<<26,r=f|h,n=2,s=2048,e=n|s;var x=[f|a,r|n,h|e,a|a,a|s,h|e,f|e,r|s,r|e,f|a,a|a,h|n,a|n,h|a,r|n,a|e,h|s,f|e,f|n,h|s,h|n,r|a,r|s,f|n,r|a,a|s,a|e,r|e,f|s,a|n,h|a,f|s,h|a,f|s,f|a,h|e,h|e,r|n,r|n,a|n,f|n,h|a,h|s,f|a,r|s,a|e,f|e,r|s,a|e,h|n,r|e,r|a,f|s,a|a,a|n,r|e,a|a,f|e,r|a,a|s,h|n,h|s,a|s,f|n];f=1<<18,h=1<<28,r=f|h,n=64,s=4096,e=n|s;var v=[h|e,a|s,f|a,r|e,h|a,h|e,a|n,h|a,f|n,r|a,r|e,f|s,r|s,f|e,a|s,a|n,r|a,h|n,h|s,a|e,f|s,f|n,r|n,r|s,a|e,a|a,a|a,r|n,h|n,h|s,f|e,f|a,f|e,f|a,r|s,a|s,a|n,r|n,a|s,f|e,h|s,a|n,h|n,r|a,r|n,h|a,f|a,h|e,a|a,r|e,f|n,h|n,r|a,h|s,h|e,a|a,r|e,f|s,f|s,a|e,a|e,f|n,h|a,r|s],y=function(){function g(w){o(this,g),this.keys=[];for(var E=[],S=[],k=[],D=0,L=56;D<56;++D,L-=8){L+=L<-5?65:L<-3?31:L<-1?63:L===27?35:0;var z=L&7;E[D]=w[L>>>3]&1<<z?1:0}for(var j=0;j<16;++j){var le=j<<1,U=le+1;k[le]=k[U]=0;for(var J=28;J<59;J+=28)for(var A=J-28;A<J;++A){var P=A+_[j];S[A]=P<J?E[P]:E[P-28]}for(var K=0;K<24;++K)S[b[K]]!==0&&(k[le]|=1<<23-K),S[b[K+24]]!==0&&(k[U]|=1<<23-K)}for(var $=0,H=0,ne=0;$<16;++$){var ve=k[H++],Se=k[H++];this.keys[ne]=(ve&16515072)<<6,this.keys[ne]|=(ve&4032)<<10,this.keys[ne]|=(Se&16515072)>>>10,this.keys[ne]|=(Se&4032)>>>6,++ne,this.keys[ne]=(ve&258048)<<12,this.keys[ne]|=(ve&63)<<16,this.keys[ne]|=(Se&258048)>>>4,this.keys[ne]|=Se&63,++ne}}return m(g,[{key:"enc8",value:function(E){var S=E.slice(),k=0,D,L,z;D=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],L=S[k++]<<24|S[k++]<<16|S[k++]<<8|S[k++],z=(D>>>4^L)&252645135,L^=z,D^=z<<4,z=(D>>>16^L)&65535,L^=z,D^=z<<16,z=(L>>>2^D)&858993459,D^=z,L^=z<<2,z=(L>>>8^D)&16711935,D^=z,L^=z<<8,L=L<<1|L>>>31&1,z=(D^L)&2863311530,D^=z,L^=z,D=D<<1|D>>>31&1;for(var j=0,le=0;j<8;++j){z=L<<28|L>>>4,z^=this.keys[le++];var U=x[z&63];U|=c[z>>>8&63],U|=i[z>>>16&63],U|=u[z>>>24&63],z=L^this.keys[le++],U|=v[z&63],U|=p[z>>>8&63],U|=l[z>>>16&63],U|=t[z>>>24&63],D^=U,z=D<<28|D>>>4,z^=this.keys[le++],U=x[z&63],U|=c[z>>>8&63],U|=i[z>>>16&63],U|=u[z>>>24&63],z=D^this.keys[le++],U|=v[z&63],U|=p[z>>>8&63],U|=l[z>>>16&63],U|=t[z>>>24&63],L^=U}for(L=L<<31|L>>>1,z=(D^L)&2863311530,D^=z,L^=z,D=D<<31|D>>>1,z=(D>>>8^L)&16711935,L^=z,D^=z<<8,z=(D>>>2^L)&858993459,L^=z,D^=z<<2,z=(L>>>16^D)&65535,D^=z,L^=z<<16,z=(L>>>4^D)&252645135,D^=z,L^=z<<4,z=[L,D],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(E){return this.enc8(E.slice(0,8)).concat(this.enc8(E.slice(8,16)))}}]),g}();O.default=y},22814:function(Xe,O,o){"use strict";function d(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(l){return typeof l}:d=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},d(t)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var m=r(o(50500)),b=f(o(57128)),_=o(41895),a=o(20860);function f(t){return t&&t.__esModule?t:{default:t}}function h(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return h=function(){return t},t}function r(t){if(t&&t.__esModule)return t;if(t===null||d(t)!=="object"&&typeof t!="function")return{default:t};var i=h();if(i&&i.has(t))return i.get(t);var l={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in t)if(Object.prototype.hasOwnProperty.call(t,p)){var x=c?Object.getOwnPropertyDescriptor(t,p):null;x&&(x.get||x.set)?Object.defineProperty(l,p,x):l[p]=t[p]}return l.default=t,i&&i.set(t,l),l}function n(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function s(t,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(t,c.key,c)}}function e(t,i,l){return i&&s(t.prototype,i),l&&s(t,l),t}var u=function(){function t(i){if(n(this,t),this._drawCtx=null,this._renderQ=[],this._flushing=!1,this._fbWidth=0,this._fbHeight=0,this._prevDrawStyle="",this._tile=null,this._tile16x16=null,this._tileX=0,this._tileY=0,m.Debug(">> Display.constructor"),this._target=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},m.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),m.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return e(t,[{key:"viewportChangePos",value:function(l,c){var p=this._viewportLoc;l=Math.floor(l),c=Math.floor(c),this._clipViewport||(l=-p.w,c=-p.h);var x=p.x+p.w-1,v=p.y+p.h-1;l<0&&p.x+l<0&&(l=-p.x),x+l>=this._fbWidth&&(l-=x+l-this._fbWidth+1),p.y+c<0&&(c=-p.y),v+c>=this._fbHeight&&(c-=v+c-this._fbHeight+1),!(l===0&&c===0)&&(m.Debug("viewportChange deltaX: "+l+", deltaY: "+c),p.x+=l,p.y+=c,this._damage(p.x,p.y,p.w,p.h),this.flip())}},{key:"viewportChangeSize",value:function(l,c){(!this._clipViewport||typeof l=="undefined"||typeof c=="undefined")&&(m.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 p=this._viewportLoc;if(p.w!==l||p.h!==c){p.w=l,p.h=c;var x=this._target;x.width=l,x.height=c,this.viewportChangePos(0,0),this._damage(p.x,p.y,p.w,p.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(l){return this._scale===0?0:(0,a.toSigned32bit)(l/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(l){return this._scale===0?0:(0,a.toSigned32bit)(l/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(l,c){this._prevDrawStyle="",this._fbWidth=l,this._fbHeight=c;var p=this._backbuffer;if(p.width!==l||p.height!==c){var x=null;p.width>0&&p.height>0&&(x=this._drawCtx.getImageData(0,0,p.width,p.height)),p.width!==l&&(p.width=l),p.height!==c&&(p.height=c),x&&this._drawCtx.putImageData(x,0,0)}var v=this._viewportLoc;this.viewportChangeSize(v.w,v.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(l,c,p,x){l<this._damageBounds.left&&(this._damageBounds.left=l),c<this._damageBounds.top&&(this._damageBounds.top=c),l+p>this._damageBounds.right&&(this._damageBounds.right=l+p),c+x>this._damageBounds.bottom&&(this._damageBounds.bottom=c+x)}},{key:"flip",value:function(l){if(this._renderQ.length!==0&&!l)this._renderQPush({type:"flip"});else{var c=this._damageBounds.left,p=this._damageBounds.top,x=this._damageBounds.right-c,v=this._damageBounds.bottom-p,y=c-this._viewportLoc.x,g=p-this._viewportLoc.y;y<0&&(x+=y,c-=y,y=0),g<0&&(v+=g,p-=g,g=0),y+x>this._viewportLoc.w&&(x=this._viewportLoc.w-y),g+v>this._viewportLoc.h&&(v=this._viewportLoc.h-g),x>0&&v>0&&this._targetCtx.drawImage(this._backbuffer,c,p,x,v,y,g,x,v),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,p,x,v,y){this._renderQ.length!==0&&!y?this._renderQPush({type:"fill",x:l,y:c,width:p,height:x,color:v}):(this._setFillColor(v),this._drawCtx.fillRect(l,c,p,x),this._damage(l,c,p,x))}},{key:"copyImage",value:function(l,c,p,x,v,y,g){this._renderQ.length!==0&&!g?this._renderQPush({type:"copy",oldX:l,oldY:c,x:p,y:x,width:v,height:y}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,l,c,v,y,p,x,v,y),this._damage(p,x,v,y))}},{key:"imageRect",value:function(l,c,p,x,v,y){if(!(p===0||x===0)){var g=new Image;g.src="data: "+v+";base64,"+b.default.encode(y),this._renderQPush({type:"img",img:g,x:l,y:c,width:p,height:x})}}},{key:"startTile",value:function(l,c,p,x,v){this._tileX=l,this._tileY=c,p===16&&x===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(p,x);for(var y=v[2],g=v[1],w=v[0],E=this._tile.data,S=0;S<p*x*4;S+=4)E[S]=y,E[S+1]=g,E[S+2]=w,E[S+3]=255}},{key:"subTile",value:function(l,c,p,x,v){for(var y=v[2],g=v[1],w=v[0],E=l+p,S=c+x,k=this._tile.data,D=this._tile.width,L=c;L<S;L++)for(var z=l;z<E;z++){var j=(z+L*D)*4;k[j]=y,k[j+1]=g,k[j+2]=w,k[j+3]=255}}},{key:"finishTile",value:function(){this._drawCtx.putImageData(this._tile,this._tileX,this._tileY),this._damage(this._tileX,this._tileY,this._tile.width,this._tile.height)}},{key:"blitImage",value:function(l,c,p,x,v,y,g){if(this._renderQ.length!==0&&!g){var w=new Uint8Array(p*x*4);w.set(new Uint8Array(v.buffer,0,w.length)),this._renderQPush({type:"blit",data:w,x:l,y:c,width:p,height:x})}else this._bgrxImageData(l,c,p,x,v,y)}},{key:"blitRgbImage",value:function(l,c,p,x,v,y,g){if(this._renderQ.length!==0&&!g){var w=new Uint8Array(p*x*3);w.set(new Uint8Array(v.buffer,0,w.length)),this._renderQPush({type:"blitRgb",data:w,x:l,y:c,width:p,height:x})}else this._rgbImageData(l,c,p,x,v,y)}},{key:"blitRgbxImage",value:function(l,c,p,x,v,y,g){if(this._renderQ.length!==0&&!g){var w=new Uint8Array(p*x*4);w.set(new Uint8Array(v.buffer,0,w.length)),this._renderQPush({type:"blitRgbx",data:w,x:l,y:c,width:p,height:x})}else this._rgbxImageData(l,c,p,x,v,y)}},{key:"drawImage",value:function(l,c,p){this._drawCtx.drawImage(l,c,p),this._damage(c,p,l.width,l.height)}},{key:"autoscale",value:function(l,c){var p;if(l===0||c===0)p=0;else{var x=this._viewportLoc,v=l/c,y=x.w/x.h;y>=v?p=l/x.w:p=c/x.h}this._rescale(p)}},{key:"_rescale",value:function(l){this._scale=l;var c=this._viewportLoc,p=l*c.w+"px",x=l*c.h+"px";(this._target.style.width!==p||this._target.style.height!==x)&&(this._target.style.width=p,this._target.style.height=x)}},{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,p,x,v,y){for(var g=this._drawCtx.createImageData(p,x),w=g.data,E=0,S=y;E<p*x*4;E+=4,S+=3)w[E]=v[S],w[E+1]=v[S+1],w[E+2]=v[S+2],w[E+3]=255;this._drawCtx.putImageData(g,l,c),this._damage(l,c,g.width,g.height)}},{key:"_bgrxImageData",value:function(l,c,p,x,v,y){for(var g=this._drawCtx.createImageData(p,x),w=g.data,E=0,S=y;E<p*x*4;E+=4,S+=4)w[E]=v[S+2],w[E+1]=v[S+1],w[E+2]=v[S],w[E+3]=255;this._drawCtx.putImageData(g,l,c),this._damage(l,c,g.width,g.height)}},{key:"_rgbxImageData",value:function(l,c,p,x,v,y){var g;_.supportsImageMetadata?g=new ImageData(new Uint8ClampedArray(v.buffer,v.byteOffset,p*x*4),p,x):(g=this._drawCtx.createImageData(p,x),g.data.set(new Uint8ClampedArray(v.buffer,v.byteOffset,p*x*4))),this._drawCtx.putImageData(g,l,c),this._damage(l,c,g.width,g.height)}},{key:"_renderQPush",value:function(l){this._renderQ.push(l),this._renderQ.length===1&&this._scanRenderQ()}},{key:"_resumeRenderQ",value:function(){this.removeEventListener("load",this._noVNCDisplay._resumeRenderQ),this._noVNCDisplay._scanRenderQ()}},{key:"_scanRenderQ",value:function(){for(var l=!0;l&&this._renderQ.length>0;){var c=this._renderQ[0];switch(c.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(c.oldX,c.oldY,c.x,c.y,c.width,c.height,!0);break;case"fill":this.fillRect(c.x,c.y,c.width,c.height,c.color,!0);break;case"blit":this.blitImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"blitRgb":this.blitRgbImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(c.x,c.y,c.width,c.height,c.data,0,!0);break;case"img":if(c.img.complete&&c.img.width!==0&&c.img.height!==0){if(c.img.width!==c.width||c.img.height!==c.height){m.Error("Decoded image has incorrect dimensions. Got "+c.img.width+"x"+c.img.height+". Expected "+c.width+"x"+c.height+".");return}this.drawImage(c.img,c.x,c.y)}else c.img._noVNCDisplay=this,c.img.addEventListener("load",this._resumeRenderQ),l=!1;break}l&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(l){this._rescale(l)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(l){this._clipViewport=l;var c=this._viewportLoc;this.viewportChangeSize(c.w,c.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),t}();O.default=u},31729:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.encodingName=d,O.encodings=void 0;var o={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};O.encodings=o;function d(m){switch(m){case o.encodingRaw:return"Raw";case o.encodingCopyRect:return"CopyRect";case o.encodingRRE:return"RRE";case o.encodingHextile:return"Hextile";case o.encodingTight:return"Tight";case o.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+m+"]"}}},48831:function(Xe,O,o){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=o(95766),m=b(o(27589));function b(r){return r&&r.__esModule?r:{default:r}}function _(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function a(r,n){for(var s=0;s<n.length;s++){var e=n[s];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}function f(r,n,s){return n&&a(r.prototype,n),s&&a(r,s),r}var h=function(){function r(){_(this,r),this.strm=new m.default,this.chunkSize=1024*10*10,this.strm.output=new Uint8Array(this.chunkSize),this.windowBits=5,(0,d.inflateInit)(this.strm,this.windowBits)}return f(r,[{key:"setInput",value:function(s){s?(this.strm.input=s,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0):(this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0)}},{key:"inflate",value:function(s){s>this.chunkSize&&(this.chunkSize=s,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=s;var e=(0,d.inflate)(this.strm,0);if(e<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=s)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,d.inflateReset)(this.strm)}}]),r}();O.default=h},18280:function(Xe,O,o){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=m(o(69314));function m(r){return r&&r.__esModule?r:{default:r}}var b={};function _(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 a(r,n,s){if(n===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(s===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in b)throw new Error('Duplicate entry for key "'+r+'"');b[r]=[n,n,s,n]}function f(r,n,s){if(n===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(s===void 0)throw new Error('Undefined keysym for key "'+r+'"');if(r in b)throw new Error('Duplicate entry for key "'+r+'"');b[r]=[n,n,n,s]}a("Alt",d.default.XK_Alt_L,d.default.XK_Alt_R),_("AltGraph",d.default.XK_ISO_Level3_Shift),_("CapsLock",d.default.XK_Caps_Lock),a("Control",d.default.XK_Control_L,d.default.XK_Control_R),a("Meta",d.default.XK_Super_L,d.default.XK_Super_R),_("NumLock",d.default.XK_Num_Lock),_("ScrollLock",d.default.XK_Scroll_Lock),a("Shift",d.default.XK_Shift_L,d.default.XK_Shift_R),f("Enter",d.default.XK_Return,d.default.XK_KP_Enter),_("Tab",d.default.XK_Tab),f(" ",d.default.XK_space,d.default.XK_KP_Space),f("ArrowDown",d.default.XK_Down,d.default.XK_KP_Down),f("ArrowUp",d.default.XK_Up,d.default.XK_KP_Up),f("ArrowLeft",d.default.XK_Left,d.default.XK_KP_Left),f("ArrowRight",d.default.XK_Right,d.default.XK_KP_Right),f("End",d.default.XK_End,d.default.XK_KP_End),f("Home",d.default.XK_Home,d.default.XK_KP_Home),f("PageDown",d.default.XK_Next,d.default.XK_KP_Next),f("PageUp",d.default.XK_Prior,d.default.XK_KP_Prior),_("Backspace",d.default.XK_BackSpace),f("Clear",d.default.XK_Clear,d.default.XK_KP_Begin),_("Copy",d.default.XF86XK_Copy),_("Cut",d.default.XF86XK_Cut),f("Delete",d.default.XK_Delete,d.default.XK_KP_Delete),f("Insert",d.default.XK_Insert,d.default.XK_KP_Insert),_("Paste",d.default.XF86XK_Paste),_("Redo",d.default.XK_Redo),_("Undo",d.default.XK_Undo),_("Cancel",d.default.XK_Cancel),_("ContextMenu",d.default.XK_Menu),_("Escape",d.default.XK_Escape),_("Execute",d.default.XK_Execute),_("Find",d.default.XK_Find),_("Help",d.default.XK_Help),_("Pause",d.default.XK_Pause),_("Select",d.default.XK_Select),_("ZoomIn",d.default.XF86XK_ZoomIn),_("ZoomOut",d.default.XF86XK_ZoomOut),_("BrightnessDown",d.default.XF86XK_MonBrightnessDown),_("BrightnessUp",d.default.XF86XK_MonBrightnessUp),_("Eject",d.default.XF86XK_Eject),_("LogOff",d.default.XF86XK_LogOff),_("Power",d.default.XF86XK_PowerOff),_("PowerOff",d.default.XF86XK_PowerDown),_("PrintScreen",d.default.XK_Print),_("Hibernate",d.default.XF86XK_Hibernate),_("Standby",d.default.XF86XK_Standby),_("WakeUp",d.default.XF86XK_WakeUp),_("AllCandidates",d.default.XK_MultipleCandidate),_("Alphanumeric",d.default.XK_Eisu_Shift),_("CodeInput",d.default.XK_Codeinput),_("Compose",d.default.XK_Multi_key),_("Convert",d.default.XK_Henkan),_("GroupFirst",d.default.XK_ISO_First_Group),_("GroupLast",d.default.XK_ISO_Last_Group),_("GroupNext",d.default.XK_ISO_Next_Group),_("GroupPrevious",d.default.XK_ISO_Prev_Group),_("NonConvert",d.default.XK_Muhenkan),_("PreviousCandidate",d.default.XK_PreviousCandidate),_("SingleCandidate",d.default.XK_SingleCandidate),_("HangulMode",d.default.XK_Hangul),_("HanjaMode",d.default.XK_Hangul_Hanja),_("JunjuaMode",d.default.XK_Hangul_Jeonja),_("Eisu",d.default.XK_Eisu_toggle),_("Hankaku",d.default.XK_Hankaku),_("Hiragana",d.default.XK_Hiragana),_("HiraganaKatakana",d.default.XK_Hiragana_Katakana),_("KanaMode",d.default.XK_Kana_Shift),_("KanjiMode",d.default.XK_Kanji),_("Katakana",d.default.XK_Katakana),_("Romaji",d.default.XK_Romaji),_("Zenkaku",d.default.XK_Zenkaku),_("ZenkakuHanaku",d.default.XK_Zenkaku_Hankaku),_("F1",d.default.XK_F1),_("F2",d.default.XK_F2),_("F3",d.default.XK_F3),_("F4",d.default.XK_F4),_("F5",d.default.XK_F5),_("F6",d.default.XK_F6),_("F7",d.default.XK_F7),_("F8",d.default.XK_F8),_("F9",d.default.XK_F9),_("F10",d.default.XK_F10),_("F11",d.default.XK_F11),_("F12",d.default.XK_F12),_("F13",d.default.XK_F13),_("F14",d.default.XK_F14),_("F15",d.default.XK_F15),_("F16",d.default.XK_F16),_("F17",d.default.XK_F17),_("F18",d.default.XK_F18),_("F19",d.default.XK_F19),_("F20",d.default.XK_F20),_("F21",d.default.XK_F21),_("F22",d.default.XK_F22),_("F23",d.default.XK_F23),_("F24",d.default.XK_F24),_("F25",d.default.XK_F25),_("F26",d.default.XK_F26),_("F27",d.default.XK_F27),_("F28",d.default.XK_F28),_("F29",d.default.XK_F29),_("F30",d.default.XK_F30),_("F31",d.default.XK_F31),_("F32",d.default.XK_F32),_("F33",d.default.XK_F33),_("F34",d.default.XK_F34),_("F35",d.default.XK_F35),_("Close",d.default.XF86XK_Close),_("MailForward",d.default.XF86XK_MailForward),_("MailReply",d.default.XF86XK_Reply),_("MailSend",d.default.XF86XK_Send),_("MediaFastForward",d.default.XF86XK_AudioForward),_("MediaPause",d.default.XF86XK_AudioPause),_("MediaPlay",d.default.XF86XK_AudioPlay),_("MediaRecord",d.default.XF86XK_AudioRecord),_("MediaRewind",d.default.XF86XK_AudioRewind),_("MediaStop",d.default.XF86XK_AudioStop),_("MediaTrackNext",d.default.XF86XK_AudioNext),_("MediaTrackPrevious",d.default.XF86XK_AudioPrev),_("New",d.default.XF86XK_New),_("Open",d.default.XF86XK_Open),_("Print",d.default.XK_Print),_("Save",d.default.XF86XK_Save),_("SpellCheck",d.default.XF86XK_Spell),_("AudioVolumeDown",d.default.XF86XK_AudioLowerVolume),_("AudioVolumeUp",d.default.XF86XK_AudioRaiseVolume),_("AudioVolumeMute",d.default.XF86XK_AudioMute),_("MicrophoneVolumeMute",d.default.XF86XK_AudioMicMute),_("LaunchApplication1",d.default.XF86XK_MyComputer),_("LaunchApplication2",d.default.XF86XK_Calculator),_("LaunchCalendar",d.default.XF86XK_Calendar),_("LaunchMail",d.default.XF86XK_Mail),_("LaunchMediaPlayer",d.default.XF86XK_AudioMedia),_("LaunchMusicPlayer",d.default.XF86XK_Music),_("LaunchPhone",d.default.XF86XK_Phone),_("LaunchScreenSaver",d.default.XF86XK_ScreenSaver),_("LaunchSpreadsheet",d.default.XF86XK_Excel),_("LaunchWebBrowser",d.default.XF86XK_WWW),_("LaunchWebCam",d.default.XF86XK_WebCam),_("LaunchWordProcessor",d.default.XF86XK_Word),_("BrowserBack",d.default.XF86XK_Back),_("BrowserFavorites",d.default.XF86XK_Favorites),_("BrowserForward",d.default.XF86XK_Forward),_("BrowserHome",d.default.XF86XK_HomePage),_("BrowserRefresh",d.default.XF86XK_Refresh),_("BrowserSearch",d.default.XF86XK_Search),_("BrowserStop",d.default.XF86XK_Stop),_("Dimmer",d.default.XF86XK_BrightnessAdjust),_("MediaAudioTrack",d.default.XF86XK_AudioCycleTrack),_("RandomToggle",d.default.XF86XK_AudioRandomPlay),_("SplitScreenToggle",d.default.XF86XK_SplitScreen),_("Subtitle",d.default.XF86XK_Subtitle),_("VideoModeNext",d.default.XF86XK_Next_VMode),f("=",d.default.XK_equal,d.default.XK_KP_Equal),f("+",d.default.XK_plus,d.default.XK_KP_Add),f("-",d.default.XK_minus,d.default.XK_KP_Subtract),f("*",d.default.XK_asterisk,d.default.XK_KP_Multiply),f("/",d.default.XK_slash,d.default.XK_KP_Divide),f(".",d.default.XK_period,d.default.XK_KP_Decimal),f(",",d.default.XK_comma,d.default.XK_KP_Separator),f("0",d.default.XK_0,d.default.XK_KP_0),f("1",d.default.XK_1,d.default.XK_KP_1),f("2",d.default.XK_2,d.default.XK_KP_2),f("3",d.default.XK_3,d.default.XK_KP_3),f("4",d.default.XK_4,d.default.XK_KP_4),f("5",d.default.XK_5,d.default.XK_KP_5),f("6",d.default.XK_6,d.default.XK_KP_6),f("7",d.default.XK_7,d.default.XK_KP_7),f("8",d.default.XK_8,d.default.XK_KP_8),f("9",d.default.XK_9,d.default.XK_KP_9);var h=b;O.default=h},15311:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var o={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"};O.default=o},91584:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;function o(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){for(var g=0;g<y.length;g++){var w=y[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(v,w.key,w)}}function m(v,y,g){return y&&d(v.prototype,y),g&&d(v,g),v}var b=0,_=1,a=2,f=4,h=8,r=16,n=32,s=64,e=127,u=50,t=90,i=250,l=1e3,c=1e3,p=50,x=function(){function v(){o(this,v),this._target=null,this._state=e,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}return m(v,[{key:"attach",value:function(g){this.detach(),this._target=g,this._target.addEventListener("touchstart",this._boundEventHandler),this._target.addEventListener("touchmove",this._boundEventHandler),this._target.addEventListener("touchend",this._boundEventHandler),this._target.addEventListener("touchcancel",this._boundEventHandler)}},{key:"detach",value:function(){this._target&&(this._stopLongpressTimeout(),this._stopTwoTouchTimeout(),this._target.removeEventListener("touchstart",this._boundEventHandler),this._target.removeEventListener("touchmove",this._boundEventHandler),this._target.removeEventListener("touchend",this._boundEventHandler),this._target.removeEventListener("touchcancel",this._boundEventHandler),this._target=null)}},{key:"_eventHandler",value:function(g){var w;switch(g.stopPropagation(),g.preventDefault(),g.type){case"touchstart":w=this._touchStart;break;case"touchmove":w=this._touchMove;break;case"touchend":case"touchcancel":w=this._touchEnd;break}for(var E=0;E<g.changedTouches.length;E++){var S=g.changedTouches[E];w.call(this,S.identifier,S.clientX,S.clientY)}}},{key:"_touchStart",value:function(g,w,E){if(this._hasDetectedGesture()||this._state===b){this._ignored.push(g);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>i){this._state=b,this._ignored.push(g);return}if(this._waitingRelease){this._state=b,this._ignored.push(g);return}switch(this._tracked.push({id:g,started:Date.now(),active:!0,firstX:w,firstY:E,lastX:w,lastY:E,angle:0}),this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(_|h|r),this._stopLongpressTimeout();break;case 3:this._state&=~(a|n|s);break;default:this._state=b}}},{key:"_touchMove",value:function(g,w,E){var S=this._tracked.find(function(le){return le.id===g});if(S!==void 0){S.lastX=w,S.lastY=E;var k=w-S.firstX,D=E-S.firstY;if((S.firstX!==S.lastX||S.firstY!==S.lastY)&&(S.angle=Math.atan2(D,k)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(k,D)<u)return;if(this._state&=~(_|a|f|r),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~h),this._tracked.length!==2&&(this._state&=~(n|s)),this._tracked.length===2){var L=this._tracked.find(function(le){return le.id!==g}),z=Math.hypot(L.firstX-L.lastX,L.firstY-L.lastY);if(z>u){var j=Math.abs(S.angle-L.angle);j=Math.abs((j+180)%360-180),j>t?this._state&=~n:this._state&=~s,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}}},{key:"_touchEnd",value:function(g,w,E){if(this._ignored.indexOf(g)!==-1){this._ignored.splice(this._ignored.indexOf(g),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=e,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=b),!this._hasDetectedGesture()&&(this._state&=~(h|n|s),this._state&=~r,this._stopLongpressTimeout(),!this._waitingRelease))switch(this._releaseStart=Date.now(),this._waitingRelease=!0,this._tracked.length){case 1:this._state&=~(a|f);break;case 2:this._state&=~(_|f);break}if(this._waitingRelease){Date.now()-this._releaseStart>i&&(this._state=b),this._tracked.some(function(D){return Date.now()-D.started>l})&&(this._state=b);var S=this._tracked.find(function(D){return D.id===g});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(g)!==-1&&this._ignored.splice(this._ignored.indexOf(g),1),this._ignored.length===0&&(this._state=e,this._waitingRelease=!1)}},{key:"_hasDetectedGesture",value:function(){return!(this._state===b||this._state&this._state-1||this._state&(_|a|f)&&this._tracked.some(function(g){return g.active}))}},{key:"_startLongpressTimeout",value:function(){var g=this;this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout(function(){return g._longpressTimeout()},c)}},{key:"_stopLongpressTimeout",value:function(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}},{key:"_longpressTimeout",value:function(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=r,this._pushEvent("gesturestart")}},{key:"_startTwoTouchTimeout",value:function(){var g=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return g._twoTouchTimeout()},p)}},{key:"_stopTwoTouchTimeout",value:function(){clearTimeout(this._twoTouchTimeoutId),this._twoTouchTimeoutId=null}},{key:"_isTwoTouchTimeoutRunning",value:function(){return this._twoTouchTimeoutId!==null}},{key:"_twoTouchTimeout",value:function(){if(this._tracked.length===0)throw new Error("A pinch or two drag gesture failed, no tracked touches");var g=this._getAverageMovement(),w=Math.abs(g.x),E=Math.abs(g.y),S=this._getAverageDistance(),k=Math.abs(Math.hypot(S.first.x,S.first.y)-Math.hypot(S.last.x,S.last.y));E<k&&w<k?this._state=s:this._state=n,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(g){var w={type:this._stateToGesture(this._state)},E=this._getPosition(),S=E.last;switch(g==="gesturestart"&&(S=E.first),this._state){case n:case s:S=E.first;break}if(w.clientX=S.x,w.clientY=S.y,this._state===s){var k=this._getAverageDistance();g==="gesturestart"?(w.magnitudeX=k.first.x,w.magnitudeY=k.first.y):(w.magnitudeX=k.last.x,w.magnitudeY=k.last.y)}else if(this._state===n)if(g==="gesturestart")w.magnitudeX=0,w.magnitudeY=0;else{var D=this._getAverageMovement();w.magnitudeX=D.x,w.magnitudeY=D.y}var L=new CustomEvent(g,{detail:w});this._target.dispatchEvent(L)}},{key:"_stateToGesture",value:function(g){switch(g){case _:return"onetap";case a:return"twotap";case f:return"threetap";case h:return"drag";case r:return"longpress";case n:return"twodrag";case s:return"pinch"}throw new Error("Unknown gesture state: "+g)}},{key:"_getPosition",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture position, no tracked touches");for(var g=this._tracked.length,w=0,E=0,S=0,k=0,D=0;D<this._tracked.length;D++)w+=this._tracked[D].firstX,E+=this._tracked[D].firstY,S+=this._tracked[D].lastX,k+=this._tracked[D].lastY;return{first:{x:w/g,y:E/g},last:{x:S/g,y:k/g}}}},{key:"_getAverageMovement",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture movement, no tracked touches");var g,w;g=w=0;for(var E=this._tracked.length,S=0;S<this._tracked.length;S++)g+=this._tracked[S].lastX-this._tracked[S].firstX,w+=this._tracked[S].lastY-this._tracked[S].firstY;return{x:g/E,y:w/E}}},{key:"_getAverageDistance",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture distance, no tracked touches");var g=this._tracked[0],w=this._tracked[this._tracked.length-1],E=Math.abs(w.firstX-g.firstX),S=Math.abs(w.firstY-g.firstY),k=Math.abs(w.lastX-g.lastX),D=Math.abs(w.lastY-g.lastY);return{first:{x:E,y:S},last:{x:k,y:D}}}}]),v}();O.default=x},1606:function(Xe,O,o){"use strict";function d(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(c){return typeof c}:d=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},d(i)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var m=n(o(50500)),b=o(79420),_=n(o(50556)),a=h(o(69314)),f=n(o(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||d(i)!=="object"&&typeof i!="function")return{default:i};var l=r();if(l&&l.has(i))return l.get(i);var c={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in i)if(Object.prototype.hasOwnProperty.call(i,x)){var v=p?Object.getOwnPropertyDescriptor(i,x):null;v&&(v.get||v.set)?Object.defineProperty(c,x,v):c[x]=i[x]}return c.default=i,l&&l.set(i,c),c}function s(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}function e(i,l){for(var c=0;c<l.length;c++){var p=l[c];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(i,p.key,p)}}function u(i,l,c){return l&&e(i.prototype,l),c&&e(i,c),i}var t=function(){function i(l){s(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 u(i,[{key:"_sendKeyEvent",value:function(c,p,x){if(x)this._keyDownList[p]=c;else{if(!(p in this._keyDownList))return;delete this._keyDownList[p]}m.Debug("onkeyevent "+(x?"down":"up")+", keysym: "+c,", code: "+p),this.onkeyevent(c,p,x)}},{key:"_getKeyCode",value:function(c){var p=_.getKeycode(c);if(p!=="Unidentified")return p;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 x=parseInt(c.keyIdentifier.substr(2),16),v=String.fromCharCode(x).toUpperCase();return"Platform"+v.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(c){var p=this._getKeyCode(c),x=_.getKeysym(c);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),p==="AltRight"&&c.timeStamp-this._altGrCtrlTime<50?x=a.default.XK_ISO_Level3_Shift:this._sendKeyEvent(a.default.XK_Control_L,"ControlLeft",!0)),p==="Unidentified"){x&&(this._sendKeyEvent(x,p,!0),this._sendKeyEvent(x,p,!1)),(0,b.stopEvent)(c);return}if(f.isMac()||f.isIOS())switch(x){case a.default.XK_Super_L:x=a.default.XK_Alt_L;break;case a.default.XK_Super_R:x=a.default.XK_Super_L;break;case a.default.XK_Alt_L:x=a.default.XK_Mode_switch;break;case a.default.XK_Alt_R:x=a.default.XK_ISO_Level3_Shift;break}if(p in this._keyDownList&&(x=this._keyDownList[p]),(f.isMac()||f.isIOS())&&p==="CapsLock"){this._sendKeyEvent(a.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(a.default.XK_Caps_Lock,"CapsLock",!1),(0,b.stopEvent)(c);return}if(!x&&(!c.key||f.isIE()||f.isEdge())){this._pendingKey=p,setTimeout(this._handleKeyPressTimeout.bind(this),10,c);return}if(this._pendingKey=null,(0,b.stopEvent)(c),p==="ControlLeft"&&f.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=c.timeStamp;return}this._sendKeyEvent(x,p,!0)}},{key:"_handleKeyPress",value:function(c){if((0,b.stopEvent)(c),this._pendingKey!==null){var p=this._getKeyCode(c),x=_.getKeysym(c);if(!(p!=="Unidentified"&&p!=this._pendingKey)){if(p=this._pendingKey,this._pendingKey=null,!x){m.Info("keypress with no keysym:",c);return}this._sendKeyEvent(x,p,!0)}}}},{key:"_handleKeyPressTimeout",value:function(c){if(this._pendingKey!==null){var p,x=this._pendingKey;if(this._pendingKey=null,c.keyCode>=48&&c.keyCode<=57)p=c.keyCode;else if(c.keyCode>=65&&c.keyCode<=90){var v=String.fromCharCode(c.keyCode);c.shiftKey?v=v.toUpperCase():v=v.toLowerCase(),p=v.charCodeAt()}else p=0;this._sendKeyEvent(p,x,!0)}}},{key:"_handleKeyUp",value:function(c){(0,b.stopEvent)(c);var p=this._getKeyCode(c);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(a.default.XK_Control_L,"ControlLeft",!0)),(f.isMac()||f.isIOS())&&p==="CapsLock"){this._sendKeyEvent(a.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(a.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[p],p,!1),f.isWindows()&&(p==="ShiftLeft"||p==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(a.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){m.Debug(">> Keyboard.allKeysUp");for(var c in this._keyDownList)this._sendKeyEvent(this._keyDownList[c],c,!1);m.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(c){if(!c.skipCheckAlt&&!c.altKey){var p=this._target,x=this._keyDownList;["AltLeft","AltRight"].forEach(function(v){if(v in x){var y=new KeyboardEvent("keyup",{key:x[v],code:v});y.skipCheckAlt=!0,p.dispatchEvent(y)}})}}},{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),f.isWindows()&&f.isFirefox()){var c=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(p){return document.addEventListener(p,c,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(f.isWindows()&&f.isFirefox()){var c=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(p){return document.removeEventListener(p,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}();O.default=t},69314:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var o={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};O.default=o},44836:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var o={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},d={lookup:function(b){if(b>=32&&b<=255)return b;var _=o[b];return _!==void 0?_:16777216|b}};O.default=d},50556:function(Xe,O,o){"use strict";function d(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(c){return typeof c}:d=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},d(i)}Object.defineProperty(O,"__esModule",{value:!0}),O.getKeycode=e,O.getKey=u,O.getKeysym=t;var m=s(o(69314)),b=s(o(44836)),_=s(o(88193)),a=s(o(15311)),f=s(o(18280)),h=n(o(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||d(i)!=="object"&&typeof i!="function")return{default:i};var l=r();if(l&&l.has(i))return l.get(i);var c={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in i)if(Object.prototype.hasOwnProperty.call(i,x)){var v=p?Object.getOwnPropertyDescriptor(i,x):null;v&&(v.get||v.set)?Object.defineProperty(c,x,v):c[x]=i[x]}return c.default=i,l&&l.set(i,c),c}function s(i){return i&&i.__esModule?i:{default:i}}function e(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 _.default){var l=_.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 u(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=e(i);return l in a.default?a.default[l]:i.charCode?String.fromCharCode(i.charCode):"Unidentified"}function t(i){var l=u(i);if(l==="Unidentified")return null;if(l in f.default){var c=i.location;if(l==="Meta"&&c===0&&(c=2),l==="Clear"&&c===3){var p=e(i);p==="NumLock"&&(c=0)}if((c===void 0||c>3)&&(c=0),l==="Meta"){var x=e(i);if(x==="AltLeft")return m.default.XK_Meta_L;if(x==="AltRight")return m.default.XK_Meta_R}if(l==="Clear"){var v=e(i);if(v==="NumLock")return m.default.XK_Num_Lock}return f.default[l][c]}if(l.length!==1)return null;var y=l.charCodeAt();return y?b.default.lookup(y):null}},88193:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var o={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"};O.default=o},87619:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var o={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};O.default=o},62013:function(Xe,O,o){"use strict";var d;d={value:!0},O.Z=void 0;var m=o(20860),b=z(o(50500)),_=o(31516),a=o(41895),f=o(92742),h=o(79420),r=D(o(5004)),n=D(o(22814)),s=D(o(48831)),e=D(o(17834)),u=D(o(1606)),t=D(o(91584)),i=D(o(54641)),l=D(o(16327)),c=D(o(64966)),p=D(o(69314)),x=D(o(87619)),v=o(31729);o(21882);var y=D(o(11231)),g=D(o(17852)),w=D(o(57507)),E=D(o(18330)),S=D(o(21330)),k=D(o(91649));function D(ye){return ye&&ye.__esModule?ye:{default:ye}}function L(){if(typeof WeakMap!="function")return null;var ye=new WeakMap;return L=function(){return ye},ye}function z(ye){if(ye&&ye.__esModule)return ye;if(ye===null||j(ye)!=="object"&&typeof ye!="function")return{default:ye};var ue=L();if(ue&&ue.has(ye))return ue.get(ye);var fe={},Q=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in ye)if(Object.prototype.hasOwnProperty.call(ye,R)){var X=Q?Object.getOwnPropertyDescriptor(ye,R):null;X&&(X.get||X.set)?Object.defineProperty(fe,R,X):fe[R]=ye[R]}return fe.default=ye,ue&&ue.set(ye,fe),fe}function j(ye){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j=function(fe){return typeof fe}:j=function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},j(ye)}function le(ye,ue){if(!(ye instanceof ue))throw new TypeError("Cannot call a class as a function")}function U(ye,ue){for(var fe=0;fe<ue.length;fe++){var Q=ue[fe];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(ye,Q.key,Q)}}function J(ye,ue,fe){return ue&&U(ye.prototype,ue),fe&&U(ye,fe),ye}function A(ye,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");ye.prototype=Object.create(ue&&ue.prototype,{constructor:{value:ye,writable:!0,configurable:!0}}),ue&&P(ye,ue)}function P(ye,ue){return P=Object.setPrototypeOf||function(Q,R){return Q.__proto__=R,Q},P(ye,ue)}function K(ye){var ue=ne();return function(){var Q=ve(ye),R;if(ue){var X=ve(this).constructor;R=Reflect.construct(Q,arguments,X)}else R=Q.apply(this,arguments);return $(this,R)}}function $(ye,ue){return ue&&(j(ue)==="object"||typeof ue=="function")?ue:H(ye)}function H(ye){if(ye===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye}function ne(){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(ye){return!1}}function ve(ye){return ve=Object.setPrototypeOf?Object.getPrototypeOf:function(fe){return fe.__proto__||Object.getPrototypeOf(fe)},ve(ye)}var Se=3,He="rgb(40, 40, 40)",Me=17,he=50,ke=19,Ke=75,Te=50,Ie=1e3,De=50,Ne=1,Re=null,Le=null,oe=null,se=null,ee=1<<24,me=1<<25,G=1<<26,ae=1<<27,be=1<<28,Ee=function(ye){A(fe,ye);var ue=K(fe);function fe(Q,R,X){var F;if(le(this,fe),!Q)throw new Error("Must specify target");if(!R)throw new Error("Must specify URL");F=ue.call(this),F._target=Q,F._url=R,X=X||{},F._rfbCredentials=X.credentials||{},F._shared="shared"in X?!!X.shared:!0,F._repeaterID=X.repeaterID||"",F._wsProtocols=X.wsProtocols||[],F._rfbConnectionState="",F._rfbInitState="",F._rfbAuthScheme=-1,F._rfbCleanDisconnect=!0,F._rfbVersion=0,F._rfbMaxVersion=3.8,F._rfbTightVNC=!1,F._rfbVeNCryptState=0,F._rfbXvpVer=0,F._fbWidth=0,F._fbHeight=0,F._fbName="",F._capabilities={power:!1},F._supportsFence=!1,F._supportsContinuousUpdates=!1,F._enabledContinuousUpdates=!1,F._supportsSetDesktopSize=!1,F._screenID=0,F._screenFlags=0,F._qemuExtKeyEventSupported=!1,F._clipboardText=null,F._clipboardServerCapabilitiesActions={},F._clipboardServerCapabilitiesFormats={},F._sock=null,F._display=null,F._flushing=!1,F._keyboard=null,F._gestures=null,F._disconnTimer=null,F._resizeTimeout=null,F._mouseMoveTimer=null,F._decoders={},F._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},F._mousePos={},F._mouseButtonMask=0,F._mouseLastMoveTime=0,F._viewportDragging=!1,F._viewportDragPos={},F._viewportHasMoved=!1,F._accumulatedWheelDeltaX=0,F._accumulatedWheelDeltaY=0,F._gestureLastTapTime=null,F._gestureFirstDoubleTapEv=null,F._gestureLastMagnitudeX=0,F._gestureLastMagnitudeY=0,F._eventHandlers={focusCanvas:F._focusCanvas.bind(H(F)),windowResize:F._windowResize.bind(H(F)),handleMouse:F._handleMouse.bind(H(F)),handleWheel:F._handleWheel.bind(H(F)),handleGesture:F._handleGesture.bind(H(F))},b.Debug(">> RFB.constructor"),F._screen=document.createElement("div"),F._screen.style.display="flex",F._screen.style.width="100%",F._screen.style.height="100%",F._screen.style.overflow="auto",F._screen.style.background=He,F._canvas=document.createElement("canvas"),F._canvas.style.margin="auto",F._canvas.style.outline="none",F._canvas.style.flexShrink="0",F._canvas.width=0,F._canvas.height=0,F._canvas.tabIndex=-1,F._screen.appendChild(F._canvas),F._cursor=new i.default,F._cursorImage=fe.cursors.none,F._decoders[v.encodings.encodingRaw]=new y.default,F._decoders[v.encodings.encodingCopyRect]=new g.default,F._decoders[v.encodings.encodingRRE]=new w.default,F._decoders[v.encodings.encodingHextile]=new E.default,F._decoders[v.encodings.encodingTight]=new S.default,F._decoders[v.encodings.encodingTightPNG]=new k.default;try{F._display=new n.default(F._canvas)}catch(re){throw b.Error("Display exception: "+re),re}return F._display.onflush=F._onFlush.bind(H(F)),F._keyboard=new u.default(F._canvas),F._keyboard.onkeyevent=F._handleKeyEvent.bind(H(F)),F._gestures=new t.default,F._sock=new l.default,F._sock.on("message",function(){F._handleMessage()}),F._sock.on("open",function(){F._rfbConnectionState==="connecting"&&F._rfbInitState===""?(F._rfbInitState="ProtocolVersion",b.Debug("Starting VNC handshake")):F._fail("Unexpected server connection while "+F._rfbConnectionState)}),F._sock.on("close",function(re){b.Debug("WebSocket on-close event");var xe="";switch(re.code&&(xe="(code: "+re.code,re.reason&&(xe+=", reason: "+re.reason),xe+=")"),F._rfbConnectionState){case"connecting":F._fail("Connection closed "+xe);break;case"connected":F._updateConnectionState("disconnecting"),F._updateConnectionState("disconnected");break;case"disconnecting":F._updateConnectionState("disconnected");break;case"disconnected":F._fail("Unexpected server disconnect when already disconnected "+xe);break;default:F._fail("Unexpected server disconnect before connecting "+xe);break}F._sock.off("close")}),F._sock.on("error",function(re){return b.Warn("WebSocket on-error event")}),setTimeout(F._updateConnectionState.bind(H(F),"connecting")),b.Debug("<< RFB.constructor"),F.dragViewport=!1,F.focusOnClick=!0,F._viewOnly=!1,F._clipViewport=!1,F._scaleViewport=!1,F._resizeSession=!1,F._showDotCursor=!1,X.showDotCursor!==void 0&&(b.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),F._showDotCursor=X.showDotCursor),F._qualityLevel=6,F._compressionLevel=2,F}return J(fe,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(R){this._rfbCredentials=R,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){this._rfbConnectionState!=="connected"||this._viewOnly||(b.Info("Sending Ctrl-Alt-Del"),this.sendKey(p.default.XK_Control_L,"ControlLeft",!0),this.sendKey(p.default.XK_Alt_L,"AltLeft",!0),this.sendKey(p.default.XK_Delete,"Delete",!0),this.sendKey(p.default.XK_Delete,"Delete",!1),this.sendKey(p.default.XK_Alt_L,"AltLeft",!1),this.sendKey(p.default.XK_Control_L,"ControlLeft",!1))}},{key:"machineShutdown",value:function(){this._xvpOp(1,2)}},{key:"machineReboot",value:function(){this._xvpOp(1,3)}},{key:"machineReset",value:function(){this._xvpOp(1,4)}},{key:"sendKey",value:function(R,X,F){if(!(this._rfbConnectionState!=="connected"||this._viewOnly)){if(F===void 0){this.sendKey(R,X,!0),this.sendKey(R,X,!1);return}var re=x.default[X];if(this._qemuExtKeyEventSupported&&re)R=R||0,b.Info("Sending key ("+(F?"down":"up")+"): keysym "+R+", scancode "+re),fe.messages.QEMUExtendedKeyEvent(this._sock,R,F,re);else{if(!R)return;b.Info("Sending keysym ("+(F?"down":"up")+"): "+R),fe.messages.keyEvent(this._sock,R,F?1:0)}}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(R){if(!(this._rfbConnectionState!=="connected"||this._viewOnly))if(this._clipboardServerCapabilitiesFormats[Ne]&&this._clipboardServerCapabilitiesActions[ae])this._clipboardText=R,fe.messages.extendedClipboardNotify(this._sock,[Ne]);else{for(var X=new Uint8Array(R.length),F=0;F<R.length;F++)X[F]=R.charCodeAt(F);fe.messages.clientCutText(this._sock,X)}}},{key:"_connect",value:function(){b.Debug(">> RFB.connect"),b.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(R){R.name==="SyntaxError"?this._fail("Invalid host or port ("+R+")"):this._fail("Error when opening socket ("+R+")")}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),window.addEventListener("resize",this._eventHandlers.windowResize),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),b.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){b.Debug(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),window.removeEventListener("resize",this._eventHandlers.windowResize),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(R){if(R.name!=="NotFoundError")throw R}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),b.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(R){this.focusOnClick&&this.focus()}},{key:"_setDesktopName",value:function(R){this._fbName=R,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(R){var X=this;window.requestAnimationFrame(function(){X._updateClip(),X._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var R=this._display.clipViewport,X=this._clipViewport;if(this._scaleViewport&&(X=!1),R!==X&&(this._display.clipViewport=X),X){var F=this._screenSize();this._display.viewportChangeSize(F.w,F.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var R=this._screenSize();this._display.autoscale(R.w,R.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!(!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)){var R=this._screenSize();fe.messages.setDesktopSize(this._sock,Math.floor(R.w),Math.floor(R.h),this._screenID,this._screenFlags),b.Debug("Requested new desktop size: "+R.w+"x"+R.h)}}},{key:"_screenSize",value:function(){var R=this._screen.getBoundingClientRect();return{w:R.width,h:R.height}}},{key:"_fixScrollbars",value:function(){var R=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=R}},{key:"_updateConnectionState",value:function(R){var X=this,F=this._rfbConnectionState;if(R===F){b.Debug("Already in state '"+R+"', ignoring");return}if(F==="disconnected"){b.Error("Tried changing state of a disconnected RFB object");return}switch(R){case"connected":if(F!=="connecting"){b.Error("Bad transition to connected state, previous connection state: "+F);return}break;case"disconnected":if(F!=="disconnecting"){b.Error("Bad transition to disconnected state, previous connection state: "+F);return}break;case"connecting":if(F!==""){b.Error("Bad transition to connecting state, previous connection state: "+F);return}break;case"disconnecting":if(F!=="connected"&&F!=="connecting"){b.Error("Bad transition to disconnecting state, previous connection state: "+F);return}break;default:b.Error("Unknown connection state: "+R);return}switch(this._rfbConnectionState=R,b.Debug("New state '"+R+"', was '"+F+"'."),this._disconnTimer&&R!=="disconnecting"&&(b.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close")),R){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){b.Error("Disconnection timed out."),X._updateConnectionState("disconnected")},Se*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(R){switch(this._rfbConnectionState){case"disconnecting":b.Error("Failed when disconnecting: "+R);break;case"connected":b.Error("Failed while connected: "+R);break;case"connecting":b.Error("Failed when connecting: "+R);break;default:b.Error("RFB failure: "+R);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(R,X){this._capabilities[R]=X,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){b.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":b.Error("Got data while disconnected");break;case"connected":for(;!(this._flushing||!this._normalMsg()||this._sock.rQlen===0););break;default:this._initMsg();break}}},{key:"_handleKeyEvent",value:function(R,X,F){this.sendKey(R,X,F)}},{key:"_handleMouse",value:function(R){if(!(R.type==="click"&&R.target!==this._canvas)&&(R.stopPropagation(),R.preventDefault(),!(R.type==="click"||R.type==="contextmenu"))){var X=(0,f.clientToElement)(R.clientX,R.clientY,this._canvas);switch(R.type){case"mousedown":(0,h.setCapture)(this._canvas),this._handleMouseButton(X.x,X.y,!0,1<<R.button);break;case"mouseup":this._handleMouseButton(X.x,X.y,!1,1<<R.button);break;case"mousemove":this._handleMouseMove(X.x,X.y);break}}}},{key:"_handleMouseButton",value:function(R,X,F,re){if(this.dragViewport)if(F&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:R,y:X},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(R,X,re)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(R,X,this._mouseButtonMask)),F?this._mouseButtonMask|=re:this._mouseButtonMask&=~re,this._sendMouse(R,X,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(R,X){var F=this;if(this._viewportDragging){var re=this._viewportDragPos.x-R,xe=this._viewportDragPos.y-X;(this._viewportHasMoved||Math.abs(re)>a.dragThreshold||Math.abs(xe)>a.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:R,y:X},this._display.viewportChangePos(re,xe));return}if(this._mousePos={x:R,y:X},this._mouseMoveTimer==null){var Ce=Date.now()-this._mouseLastMoveTime;Ce>Me?(this._sendMouse(R,X,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){F._handleDelayedMouseMove()},Me-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(R,X,F){this._rfbConnectionState==="connected"&&(this._viewOnly||fe.messages.pointerEvent(this._sock,this._display.absX(R),this._display.absY(X),F))}},{key:"_handleWheel",value:function(R){if(this._rfbConnectionState==="connected"&&!this._viewOnly){R.stopPropagation(),R.preventDefault();var X=(0,f.clientToElement)(R.clientX,R.clientY,this._canvas),F=R.deltaX,re=R.deltaY;R.deltaMode!==0&&(F*=ke,re*=ke),this._accumulatedWheelDeltaX+=F,this._accumulatedWheelDeltaY+=re,Math.abs(this._accumulatedWheelDeltaX)>=he&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(X.x,X.y,!0,32),this._handleMouseButton(X.x,X.y,!1,32)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(X.x,X.y,!0,64),this._handleMouseButton(X.x,X.y,!1,64)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=he&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(X.x,X.y,!0,8),this._handleMouseButton(X.x,X.y,!1,8)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(X.x,X.y,!0,16),this._handleMouseButton(X.x,X.y,!1,16)),this._accumulatedWheelDeltaY=0)}}},{key:"_fakeMouseMove",value:function(R,X,F){this._handleMouseMove(X,F),this._cursor.move(R.detail.clientX,R.detail.clientY)}},{key:"_handleTapEvent",value:function(R,X){var F=(0,f.clientToElement)(R.detail.clientX,R.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<Ie&&this._gestureFirstDoubleTapEv.detail.type===R.detail.type){var re=this._gestureFirstDoubleTapEv.detail.clientX-R.detail.clientX,xe=this._gestureFirstDoubleTapEv.detail.clientY-R.detail.clientY,Ce=Math.hypot(re,xe);Ce<De?F=(0,f.clientToElement)(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=R}else this._gestureFirstDoubleTapEv=R;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,F.x,F.y),this._handleMouseButton(F.x,F.y,!0,X),this._handleMouseButton(F.x,F.y,!1,X)}},{key:"_handleGesture",value:function(R){var X,F=(0,f.clientToElement)(R.detail.clientX,R.detail.clientY,this._canvas);switch(R.type){case"gesturestart":switch(R.detail.type){case"onetap":this._handleTapEvent(R,1);break;case"twotap":this._handleTapEvent(R,4);break;case"threetap":this._handleTapEvent(R,2);break;case"drag":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!0,1);break;case"longpress":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=R.detail.magnitudeX,this._gestureLastMagnitudeY=R.detail.magnitudeY,this._fakeMouseMove(R,F.x,F.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(R.detail.magnitudeX,R.detail.magnitudeY),this._fakeMouseMove(R,F.x,F.y);break}break;case"gesturemove":switch(R.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(R,F.x,F.y);break;case"twodrag":for(this._fakeMouseMove(R,F.x,F.y);R.detail.magnitudeY-this._gestureLastMagnitudeY>Te;)this._handleMouseButton(F.x,F.y,!0,8),this._handleMouseButton(F.x,F.y,!1,8),this._gestureLastMagnitudeY+=Te;for(;R.detail.magnitudeY-this._gestureLastMagnitudeY<-Te;)this._handleMouseButton(F.x,F.y,!0,16),this._handleMouseButton(F.x,F.y,!1,16),this._gestureLastMagnitudeY-=Te;for(;R.detail.magnitudeX-this._gestureLastMagnitudeX>Te;)this._handleMouseButton(F.x,F.y,!0,32),this._handleMouseButton(F.x,F.y,!1,32),this._gestureLastMagnitudeX+=Te;for(;R.detail.magnitudeX-this._gestureLastMagnitudeX<-Te;)this._handleMouseButton(F.x,F.y,!0,64),this._handleMouseButton(F.x,F.y,!1,64),this._gestureLastMagnitudeX-=Te;break;case"pinch":if(this._fakeMouseMove(R,F.x,F.y),X=Math.hypot(R.detail.magnitudeX,R.detail.magnitudeY),Math.abs(X-this._gestureLastMagnitudeX)>Ke){for(this._handleKeyEvent(p.default.XK_Control_L,"ControlLeft",!0);X-this._gestureLastMagnitudeX>Ke;)this._handleMouseButton(F.x,F.y,!0,8),this._handleMouseButton(F.x,F.y,!1,8),this._gestureLastMagnitudeX+=Ke;for(;X-this._gestureLastMagnitudeX<-Ke;)this._handleMouseButton(F.x,F.y,!0,16),this._handleMouseButton(F.x,F.y,!1,16),this._gestureLastMagnitudeX-=Ke}this._handleKeyEvent(p.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(R.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!1,1);break;case"longpress":this._fakeMouseMove(R,F.x,F.y),this._handleMouseButton(F.x,F.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var R=this._sock.rQshiftStr(12).substr(4,7);b.Info("Server ProtocolVersion: "+R);var X=0;switch(R){case"000.000":X=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+R)}if(X){for(var F="ID:"+this._repeaterID;F.length<250;)F+="\0";return this._sock.sendString(F),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var re="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+re+`
|
|
|
`),b.Debug("Sent ProtocolVersion: "+re),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function R(re,xe){for(var Ce=0;Ce<xe.length;Ce++)if(xe[Ce]===re)return!0;return!1}if(this._rfbVersion>=3.7){var X=this._sock.rQshift8();if(this._sock.rQwait("security type",X,1))return!1;if(X===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var F=this._sock.rQshiftBytes(X);if(b.Debug("Server security types: "+F),R(1,F))this._rfbAuthScheme=1;else if(R(22,F))this._rfbAuthScheme=22;else if(R(16,F))this._rfbAuthScheme=16;else if(R(2,F))this._rfbAuthScheme=2;else if(R(19,F))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+F+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",b.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var R=this._sock.rQshift32(),X="";if(R>0){if(this._sock.rQwait("reason",R,4))return!1;X=this._sock.rQshiftStr(R)}return X!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:X}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+X+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var R=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(R),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var R=this._sock.rQshift8(),X=this._sock.rQshift8();if(!(R==0&&X==2))return this._fail("Unsupported VeNCrypt version "+R+"."+X);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var F=this._sock.rQshift8();if(F!=0)return this._fail("VeNCrypt failure "+F);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var re=this._sock.rQshift8();if(re<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=re,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var xe=[],Ce=0;Ce<this._rfbVeNCryptSubtypesLength;Ce++)xe.push(this._sock.rQshift32());if(xe.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 Fe=(0,_.encodeUTF8)(this._rfbCredentials.username),I=(0,_.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,Fe.length]),this._sock.send([0,0,0,I.length]),this._sock.sendString(Fe),this._sock.sendString(I),this._rfbInitState="SecurityResult",!0}}},{key:"_negotiateStdVNCAuth",value:function(){if(this._sock.rQwait("auth challenge",16))return!1;if(this._rfbCredentials.password===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["password"]}})),!1;var R=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),X=fe.genDES(this._rfbCredentials.password,R);return this._sock.send(X),this._rfbInitState="SecurityResult",!0}},{key:"_negotiateTightUnixAuth",value:function(){return this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0?(this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1):(this._sock.send([0,0,0,this._rfbCredentials.username.length]),this._sock.send([0,0,0,this._rfbCredentials.password.length]),this._sock.sendString(this._rfbCredentials.username),this._sock.sendString(this._rfbCredentials.password),this._rfbInitState="SecurityResult",!0)}},{key:"_negotiateTightTunnels",value:function(R){for(var X={0:{vendor:"TGHT",signature:"NOTUNNEL"}},F={},re=0;re<R;re++){var xe=this._sock.rQshift32(),Ce=this._sock.rQshiftStr(4),Fe=this._sock.rQshiftStr(8);F[xe]={vendor:Ce,signature:Fe}}return b.Debug("Server Tight tunnel types: "+F),F[1]&&F[1].vendor==="SICR"&&F[1].signature==="SCHANNEL"&&(b.Debug("Detected Siemens server. Assuming NOTUNNEL support."),F[0]={vendor:"TGHT",signature:"NOTUNNEL"}),F[0]?F[0].vendor!=X[0].vendor||F[0].signature!=X[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(b.Debug("Selected tunnel type: "+X[0]),this._sock.send([0,0,0,0]),!1):this._fail("Server wanted tunnels, but doesn't support the notunnel type")}},{key:"_negotiateTightAuth",value:function(){if(!this._rfbTightVNC){if(this._sock.rQwait("num tunnels",4))return!1;var R=this._sock.rQshift32();if(R>0&&this._sock.rQwait("tunnel capabilities",16*R,4))return!1;if(this._rfbTightVNC=!0,R>0)return this._negotiateTightTunnels(R),!1}if(this._sock.rQwait("sub auth count",4))return!1;var X=this._sock.rQshift32();if(X===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*X,4))return!1;for(var F={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},re=[],xe=0;xe<X;xe++){this._sock.rQshift32();var Ce=this._sock.rQshiftStr(12);re.push(Ce)}b.Debug("Server Tight authentication types: "+re);for(var Fe in F)if(re.indexOf(Fe)!=-1)switch(this._sock.send([0,0,0,F[Fe]]),b.Debug("Selected authentication type: "+Fe),Fe){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: "+Fe+")")}return this._fail("No supported sub-auth types!")}},{key:"_negotiateAuthentication",value:function(){switch(this._rfbAuthScheme){case 1:return this._rfbVersion>=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var R=this._sock.rQshift32();return R===0?(this._rfbInitState="ClientInitialisation",b.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=R,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:R}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var R=this._sock.rQshift16(),X=this._sock.rQshift16(),F=this._sock.rQshift8(),re=this._sock.rQshift8(),xe=this._sock.rQshift8(),Ce=this._sock.rQshift8(),Fe=this._sock.rQshift16(),I=this._sock.rQshift16(),de=this._sock.rQshift16(),_e=this._sock.rQshift8(),N=this._sock.rQshift8(),Z=this._sock.rQshift8();this._sock.rQskipBytes(3);var q=this._sock.rQshift32();if(this._sock.rQwait("server init name",q,24))return!1;var B=this._sock.rQshiftStr(q);if(B=(0,_.decodeUTF8)(B,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+q))return!1;var te=this._sock.rQshift16(),T=this._sock.rQshift16(),ce=this._sock.rQshift16();this._sock.rQskipBytes(2);var pe=(te+T+ce)*16;if(this._sock.rQwait("TightVNC extended server init header",pe,32+q))return!1;this._sock.rQskipBytes(16*te),this._sock.rQskipBytes(16*T),this._sock.rQskipBytes(16*ce)}return b.Info("Screen: "+R+"x"+X+", bpp: "+F+", depth: "+re+", bigEndian: "+xe+", trueColor: "+Ce+", redMax: "+Fe+", greenMax: "+I+", blueMax: "+de+", redShift: "+_e+", greenShift: "+N+", blueShift: "+Z),this._setDesktopName(B),this._resize(R,X),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),fe.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),fe.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var R=[];R.push(v.encodings.encodingCopyRect),this._fbDepth==24&&(R.push(v.encodings.encodingTight),R.push(v.encodings.encodingTightPNG),R.push(v.encodings.encodingHextile),R.push(v.encodings.encodingRRE)),R.push(v.encodings.encodingRaw),R.push(v.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),R.push(v.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),R.push(v.encodings.pseudoEncodingDesktopSize),R.push(v.encodings.pseudoEncodingLastRect),R.push(v.encodings.pseudoEncodingQEMUExtendedKeyEvent),R.push(v.encodings.pseudoEncodingExtendedDesktopSize),R.push(v.encodings.pseudoEncodingXvp),R.push(v.encodings.pseudoEncodingFence),R.push(v.encodings.pseudoEncodingContinuousUpdates),R.push(v.encodings.pseudoEncodingDesktopName),R.push(v.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(R.push(v.encodings.pseudoEncodingVMwareCursor),R.push(v.encodings.pseudoEncodingCursor)),fe.messages.clientEncodings(this._sock,R)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return b.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(b.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var R=this._sock.rQshift32();if(R=(0,m.toSigned32bit)(R),this._sock.rQwait("ServerCutText content",Math.abs(R),8))return!1;if(R>=0){var X=this._sock.rQshiftStr(R);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:X}}))}else{R=Math.abs(R);var F=this._sock.rQshift32(),re=F&65535,xe=F&4278190080,Ce=!!(xe&ee);if(Ce){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var Fe=0;Fe<=15;Fe++){var I=1<<Fe;re&I&&(this._clipboardServerCapabilitiesFormats[I]=!0,this._sock.rQshift32())}for(var de=24;de<=31;de++){var _e=1<<de;this._clipboardServerCapabilitiesActions[_e]=!!(xe&_e)}var N=[ee,me,G,ae,be];fe.messages.extendedClipboardCaps(this._sock,N,{extendedClipboardFormatText:0})}else if(xe===me){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[be]&&re&Ne&&fe.messages.extendedClipboardProvide(this._sock,[Ne],[this._clipboardText])}else if(xe===G){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[ae]&&(this._clipboardText!=null?fe.messages.extendedClipboardNotify(this._sock,[Ne]):fe.messages.extendedClipboardNotify(this._sock,[]))}else if(xe===ae){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[me]&&re&Ne&&fe.messages.extendedClipboardRequest(this._sock,[Ne])}else if(xe===be){if(this._viewOnly||!(re&Ne))return!0;this._clipboardText=null;var Z=this._sock.rQshiftBytes(R-4),q=new s.default,B=null;q.setInput(Z);for(var te=0;te<=15;te++){var T=1<<te;if(re&T){var ce=0,pe=q.inflate(4);ce|=pe[0]<<24,ce|=pe[1]<<16,ce|=pe[2]<<8,ce|=pe[3];var C=q.inflate(ce);T===Ne&&(B=C)}}if(q.setInput(null),B!==null){for(var ie="",V=0;V<B.length;V++)ie+=String.fromCharCode(B[V]);B=ie,B=(0,_.decodeUTF8)(B),B.length>0&&B.charAt(B.length-1)==="\0"&&(B=B.slice(0,-1)),B=B.replace(`\r
|
|
|
`,`
|
|
|
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:B}}))}}else return this._fail("Unexpected action in extended clipboard message: "+xe)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var R=this._sock.rQshift32(),X=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",X,9))return!1;X>64&&(b.Warn("Bad payload length ("+X+") in fence response"),X=64);var F=this._sock.rQshiftStr(X);return this._supportsFence=!0,R&1<<31?(R&=3,fe.messages.clientFence(this._sock,R,F),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var R=this._sock.rQshift8(),X=this._sock.rQshift8();switch(X){case 0:b.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=R,b.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+X+")");break}return!0}},{key:"_normalMsg",value:function(){var R;this._FBU.rects>0?R=0:R=this._sock.rQshift8();var X,F;switch(R){case 0:return F=this._framebufferUpdate(),F&&!this._enabledContinuousUpdates&&fe.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),F;case 1:return this._handleSetColourMapMsg();case 2:return b.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return X=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,X&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),b.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+R+")"),b.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var R=this._sock.rQshiftBytes(12);this._FBU.x=(R[0]<<8)+R[1],this._FBU.y=(R[2]<<8)+R[3],this._FBU.width=(R[4]<<8)+R[5],this._FBU.height=(R[6]<<8)+R[7],this._FBU.encoding=parseInt((R[8]<<24)+(R[9]<<16)+(R[10]<<8)+R[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case v.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case v.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case v.encodings.pseudoEncodingCursor:return this._handleCursor();case v.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var R=document.createEvent("keyboardEvent");R.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(X){}return!0;case v.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case v.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case v.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var R=this._FBU.x,X=this._FBU.y,F=this._FBU.width,re=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var xe=this._sock.rQshift8();this._sock.rQshift8();var Ce,Fe=4;if(xe==0){var I=-256;if(Ce=new Array(F*re*Fe),this._sock.rQwait("VMware cursor classic encoding",F*re*Fe*2,2))return!1;for(var de=new Array(F*re),_e=0;_e<F*re;_e++)de[_e]=this._sock.rQshift32();for(var N=new Array(F*re),Z=0;Z<F*re;Z++)N[Z]=this._sock.rQshift32();for(var q=0;q<F*re;q++)if(de[q]==0){var B=N[q],te=B>>8&255,T=B>>16&255,ce=B>>24&255;Ce[q*Fe]=te,Ce[q*Fe+1]=T,Ce[q*Fe+2]=ce,Ce[q*Fe+3]=255}else(de[q]&I)==I?N[q]==0?(Ce[q*Fe]=0,Ce[q*Fe+1]=0,Ce[q*Fe+2]=0,Ce[q*Fe+3]=0):((N[q]&I)==I,Ce[q*Fe]=0,Ce[q*Fe+1]=0,Ce[q*Fe+2]=0,Ce[q*Fe+3]=255):(Ce[q*Fe]=0,Ce[q*Fe+1]=0,Ce[q*Fe+2]=0,Ce[q*Fe+3]=255)}else if(xe==1){if(this._sock.rQwait("VMware cursor alpha encoding",F*re*4,2))return!1;Ce=new Array(F*re*Fe);for(var pe=0;pe<F*re;pe++){var C=this._sock.rQshift32();Ce[pe*4]=C>>24&255,Ce[pe*4+1]=C>>16&255,Ce[pe*4+2]=C>>8&255,Ce[pe*4+3]=C&255}}else return b.Warn("The given cursor type is not supported: "+xe+" given."),!1;return this._updateCursor(Ce,R,X,F,re),!0}},{key:"_handleCursor",value:function(){var R=this._FBU.x,X=this._FBU.y,F=this._FBU.width,re=this._FBU.height,xe=F*re*4,Ce=Math.ceil(F/8)*re,Fe=xe+Ce;if(this._sock.rQwait("cursor encoding",Fe))return!1;for(var I=this._sock.rQshiftBytes(xe),de=this._sock.rQshiftBytes(Ce),_e=new Uint8Array(F*re*4),N=0,Z=0;Z<re;Z++)for(var q=0;q<F;q++){var B=Z*Math.ceil(F/8)+Math.floor(q/8),te=de[B]<<q%8&128?255:0;_e[N]=I[N+2],_e[N+1]=I[N+1],_e[N+2]=I[N],_e[N+3]=te,N+=4}return this._updateCursor(_e,R,X,F,re),!0}},{key:"_handleDesktopName",value:function(){if(this._sock.rQwait("DesktopName",4))return!1;var R=this._sock.rQshift32();if(this._sock.rQwait("DesktopName",R,4))return!1;var X=this._sock.rQshiftStr(R);return X=(0,_.decodeUTF8)(X,!0),this._setDesktopName(X),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var R=this._sock.rQpeek8(),X=4+R*16;if(this._sock.rQwait("ExtendedDesktopSize",X))return!1;var F=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,F&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var re=0;re<R;re+=1)re===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 xe="";switch(this._FBU.y){case 1:xe="Resize is administratively prohibited";break;case 2:xe="Out of resources";break;case 3:xe="Invalid screen layout";break;default:xe="Unknown reason";break}b.Warn("Server did not accept the resize request: "+xe)}else this._resize(this._FBU.width,this._FBU.height);return!0}},{key:"_handleDataRect",value:function(){var R=this._decoders[this._FBU.encoding];if(!R)return this._fail("Unsupported encoding (encoding: "+this._FBU.encoding+")"),!1;try{return R.decodeRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,this._sock,this._display,this._fbDepth)}catch(X){return this._fail("Error decoding rect: "+X),!1}}},{key:"_updateContinuousUpdates",value:function(){this._enabledContinuousUpdates&&fe.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(R,X){this._fbWidth=R,this._fbHeight=X,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(R,X){this._rfbXvpVer<R||(b.Info("Sending XVP operation "+X+" (version "+R+")"),fe.messages.xvpOp(this._sock,R,X))}},{key:"_updateCursor",value:function(R,X,F,re,xe){this._cursorImage={rgbaPixels:R,hotx:X,hoty:F,w:re,h:xe},this._refreshCursor()}},{key:"_shouldShowDotCursor",value:function(){if(!this._showDotCursor)return!1;for(var R=3;R<this._cursorImage.rgbaPixels.length;R+=4)if(this._cursorImage.rgbaPixels[R])return!1;return!0}},{key:"_refreshCursor",value:function(){if(!(this._rfbConnectionState!=="connecting"&&this._rfbConnectionState!=="connected")){var R=this._shouldShowDotCursor()?fe.cursors.dot:this._cursorImage;this._cursor.change(R.rgbaPixels,R.hotx,R.hoty,R.w,R.h)}}},{key:"viewOnly",get:function(){return this._viewOnly},set:function(R){this._viewOnly=R,(this._rfbConnectionState==="connecting"||this._rfbConnectionState==="connected")&&(R?this._keyboard.ungrab():this._keyboard.grab())}},{key:"capabilities",get:function(){return this._capabilities}},{key:"touchButton",get:function(){return 0},set:function(R){b.Warn("Using old API!")}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(R){this._clipViewport=R,this._updateClip()}},{key:"scaleViewport",get:function(){return this._scaleViewport},set:function(R){this._scaleViewport=R,R&&this._clipViewport&&this._updateClip(),this._updateScale(),!R&&this._clipViewport&&this._updateClip()}},{key:"resizeSession",get:function(){return this._resizeSession},set:function(R){this._resizeSession=R,R&&this._requestRemoteResize()}},{key:"showDotCursor",get:function(){return this._showDotCursor},set:function(R){this._showDotCursor=R,this._refreshCursor()}},{key:"background",get:function(){return this._screen.style.background},set:function(R){this._screen.style.background=R}},{key:"qualityLevel",get:function(){return this._qualityLevel},set:function(R){if(!Number.isInteger(R)||R<0||R>9){b.Error("qualityLevel must be an integer between 0 and 9");return}this._qualityLevel!==R&&(this._qualityLevel=R,this._rfbConnectionState==="connected"&&this._sendEncodings())}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(R){if(!Number.isInteger(R)||R<0||R>9){b.Error("compressionLevel must be an integer between 0 and 9");return}this._compressionLevel!==R&&(this._compressionLevel=R,this._rfbConnectionState==="connected"&&this._sendEncodings())}}],[{key:"genDES",value:function(R,X){var F=R.split("").map(function(re){return re.charCodeAt(0)});return new c.default(F).encrypt(X)}}]),fe}(r.default);O.Z=Ee,Ee.messages={keyEvent:function(ue,fe,Q){var R=ue._sQ,X=ue._sQlen;R[X]=4,R[X+1]=Q,R[X+2]=0,R[X+3]=0,R[X+4]=fe>>24,R[X+5]=fe>>16,R[X+6]=fe>>8,R[X+7]=fe,ue._sQlen+=8,ue.flush()},QEMUExtendedKeyEvent:function(ue,fe,Q,R){function X(Ce){var Fe=R>>8,I=R&255;return Fe===224&&I<127?I|128:Ce}var F=ue._sQ,re=ue._sQlen;F[re]=255,F[re+1]=0,F[re+2]=Q>>8,F[re+3]=Q,F[re+4]=fe>>24,F[re+5]=fe>>16,F[re+6]=fe>>8,F[re+7]=fe;var xe=X(R);F[re+8]=xe>>24,F[re+9]=xe>>16,F[re+10]=xe>>8,F[re+11]=xe,ue._sQlen+=12,ue.flush()},pointerEvent:function(ue,fe,Q,R){var X=ue._sQ,F=ue._sQlen;X[F]=5,X[F+1]=R,X[F+2]=fe>>8,X[F+3]=fe,X[F+4]=Q>>8,X[F+5]=Q,ue._sQlen+=6,ue.flush()},_buildExtendedClipboardFlags:function(ue,fe){for(var Q=new Uint8Array(4),R=0,X=0,F=0;F<ue.length;F++)X|=ue[F];for(var re=0;re<fe.length;re++)R|=fe[re];return Q[0]=X>>24,Q[1]=0,Q[2]=0,Q[3]=R,Q},extendedClipboardProvide:function(ue,fe,Q){for(var R=new e.default,X=[],F=0;F<fe.length;F++){if(fe[F]!=Ne)throw new Error("Unsupported extended clipboard format for Provide message.");Q[F]=Q[F].replace(/\r\n|\r|\n/gm,`\r
|
|
|
`);var re=(0,_.encodeUTF8)(Q[F]+"\0");X.push(re.length>>24&255,re.length>>16&255,re.length>>8&255,re.length&255);for(var xe=0;xe<re.length;xe++)X.push(re.charCodeAt(xe))}var Ce=R.deflate(new Uint8Array(X)),Fe=new Uint8Array(4+Ce.length);Fe.set(Ee.messages._buildExtendedClipboardFlags([be],fe)),Fe.set(Ce,4),Ee.messages.clientCutText(ue,Fe,!0)},extendedClipboardNotify:function(ue,fe){var Q=Ee.messages._buildExtendedClipboardFlags([ae],fe);Ee.messages.clientCutText(ue,Q,!0)},extendedClipboardRequest:function(ue,fe){var Q=Ee.messages._buildExtendedClipboardFlags([me],fe);Ee.messages.clientCutText(ue,Q,!0)},extendedClipboardCaps:function(ue,fe,Q){var R=Object.keys(Q),X=new Uint8Array(4+4*R.length);R.map(function(xe){return parseInt(xe)}),R.sort(function(xe,Ce){return xe-Ce}),X.set(Ee.messages._buildExtendedClipboardFlags(fe,[]));for(var F=4,re=0;re<R.length;re++)X[F]=Q[R[re]]>>24,X[F+1]=Q[R[re]]>>16,X[F+2]=Q[R[re]]>>8,X[F+3]=Q[R[re]]>>0,F+=4,X[3]|=1<<R[re];Ee.messages.clientCutText(ue,X,!0)},clientCutText:function(ue,fe){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,R=ue._sQ,X=ue._sQlen;R[X]=6,R[X+1]=0,R[X+2]=0,R[X+3]=0;var F;Q?F=(0,m.toUnsigned32bit)(-fe.length):F=fe.length,R[X+4]=F>>24,R[X+5]=F>>16,R[X+6]=F>>8,R[X+7]=F,ue._sQlen+=8;for(var re=0,xe=fe.length;xe>0;){for(var Ce=Math.min(xe,ue._sQbufferSize-ue._sQlen),Fe=0;Fe<Ce;Fe++)R[ue._sQlen+Fe]=fe[re+Fe];ue._sQlen+=Ce,ue.flush(),xe-=Ce,re+=Ce}},setDesktopSize:function(ue,fe,Q,R,X){var F=ue._sQ,re=ue._sQlen;F[re]=251,F[re+1]=0,F[re+2]=fe>>8,F[re+3]=fe,F[re+4]=Q>>8,F[re+5]=Q,F[re+6]=1,F[re+7]=0,F[re+8]=R>>24,F[re+9]=R>>16,F[re+10]=R>>8,F[re+11]=R,F[re+12]=0,F[re+13]=0,F[re+14]=0,F[re+15]=0,F[re+16]=fe>>8,F[re+17]=fe,F[re+18]=Q>>8,F[re+19]=Q,F[re+20]=X>>24,F[re+21]=X>>16,F[re+22]=X>>8,F[re+23]=X,ue._sQlen+=24,ue.flush()},clientFence:function(ue,fe,Q){var R=ue._sQ,X=ue._sQlen;R[X]=248,R[X+1]=0,R[X+2]=0,R[X+3]=0,R[X+4]=fe>>24,R[X+5]=fe>>16,R[X+6]=fe>>8,R[X+7]=fe;var F=Q.length;R[X+8]=F;for(var re=0;re<F;re++)R[X+9+re]=Q.charCodeAt(re);ue._sQlen+=9+F,ue.flush()},enableContinuousUpdates:function(ue,fe,Q,R,X,F){var re=ue._sQ,xe=ue._sQlen;re[xe]=150,re[xe+1]=fe,re[xe+2]=Q>>8,re[xe+3]=Q,re[xe+4]=R>>8,re[xe+5]=R,re[xe+6]=X>>8,re[xe+7]=X,re[xe+8]=F>>8,re[xe+9]=F,ue._sQlen+=10,ue.flush()},pixelFormat:function(ue,fe,Q){var R=ue._sQ,X=ue._sQlen,F;fe>16?F=32:fe>8?F=16:F=8;var re=Math.floor(fe/3);R[X]=0,R[X+1]=0,R[X+2]=0,R[X+3]=0,R[X+4]=F,R[X+5]=fe,R[X+6]=0,R[X+7]=Q?1:0,R[X+8]=0,R[X+9]=(1<<re)-1,R[X+10]=0,R[X+11]=(1<<re)-1,R[X+12]=0,R[X+13]=(1<<re)-1,R[X+14]=re*2,R[X+15]=re*1,R[X+16]=re*0,R[X+17]=0,R[X+18]=0,R[X+19]=0,ue._sQlen+=20,ue.flush()},clientEncodings:function(ue,fe){var Q=ue._sQ,R=ue._sQlen;Q[R]=2,Q[R+1]=0,Q[R+2]=fe.length>>8,Q[R+3]=fe.length;for(var X=R+4,F=0;F<fe.length;F++){var re=fe[F];Q[X]=re>>24,Q[X+1]=re>>16,Q[X+2]=re>>8,Q[X+3]=re,X+=4}ue._sQlen+=X-R,ue.flush()},fbUpdateRequest:function(ue,fe,Q,R,X,F){var re=ue._sQ,xe=ue._sQlen;typeof Q=="undefined"&&(Q=0),typeof R=="undefined"&&(R=0),re[xe]=3,re[xe+1]=fe?1:0,re[xe+2]=Q>>8&255,re[xe+3]=Q&255,re[xe+4]=R>>8&255,re[xe+5]=R&255,re[xe+6]=X>>8&255,re[xe+7]=X&255,re[xe+8]=F>>8&255,re[xe+9]=F&255,ue._sQlen+=10,ue.flush()},xvpOp:function(ue,fe,Q){var R=ue._sQ,X=ue._sQlen;R[X]=250,R[X+1]=0,R[X+2]=fe,R[X+3]=Q,ue._sQlen+=4,ue.flush()}},Ee.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},41895:function(Xe,O,o){"use strict";function d(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(D){return typeof D}:d=function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},d(S)}Object.defineProperty(O,"__esModule",{value:!0}),O.isMac=p,O.isWindows=x,O.isIOS=v,O.isSafari=y,O.isIE=g,O.isEdge=w,O.isFirefox=E,O.hasScrollbarGutter=O.supportsImageMetadata=O.supportsCursorURIs=O.dragThreshold=O.isTouchDevice=void 0;var m=_(o(50500));function b(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return b=function(){return S},S}function _(S){if(S&&S.__esModule)return S;if(S===null||d(S)!=="object"&&typeof S!="function")return{default:S};var k=b();if(k&&k.has(S))return k.get(S);var D={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var z in S)if(Object.prototype.hasOwnProperty.call(S,z)){var j=L?Object.getOwnPropertyDescriptor(S,z):null;j&&(j.get||j.set)?Object.defineProperty(D,z,j):D[z]=S[z]}return D.default=S,k&&k.set(S,D),D}var a=!1;O.isTouchDevice=a,window.addEventListener("touchstart",function(){},!1);var f=10*(window.devicePixelRatio||1);O.dragThreshold=f;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?(m.Info("Data URI scheme cursor supported"),h=!0):m.Warn("Data URI scheme cursor not supported")}catch(S){m.Error("Data URI scheme cursor test exception: "+S)}var n=h;O.supportsCursorURIs=n;var s=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),s=!0}catch(S){}var e=s;O.supportsImageMetadata=e;var u=!0;try{var t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);var i=document.createElement("div");t.appendChild(i);var l=t.offsetWidth-i.offsetWidth;t.parentNode.removeChild(t),u=l!=0}catch(S){m.Error("Scrollbar test exception: "+S)}var c=u;O.hasScrollbarGutter=c;function p(){return navigator&&!!/mac/i.exec(navigator.platform)}function x(){return navigator&&!!/win/i.exec(navigator.platform)}function v(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function y(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function g(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function w(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function E(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},54641:function(Xe,O,o){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var d=o(41895);function m(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 s=r[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(h,s.key,s)}}function _(h,r,n){return r&&b(h.prototype,r),n&&b(h,n),h}var a=!d.supportsCursorURIs||d.isTouchDevice,f=function(){function h(){m(this,h),this._target=null,this._canvas=document.createElement("canvas"),a&&(this._canvas.style.position="fixed",this._canvas.style.zIndex="65535",this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden"),this._position={x:0,y:0},this._hotSpot={x:0,y:0},this._eventHandlers={mouseover:this._handleMouseOver.bind(this),mouseleave:this._handleMouseLeave.bind(this),mousemove:this._handleMouseMove.bind(this),mouseup:this._handleMouseUp.bind(this)}}return _(h,[{key:"attach",value:function(n){if(this._target&&this.detach(),this._target=n,a){document.body.appendChild(this._canvas);var s={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,s),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,s),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,s),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,s)}this.clear()}},{key:"detach",value:function(){if(this._target){if(a){var n={capture:!0,passive:!0};this._target.removeEventListener("mouseover",this._eventHandlers.mouseover,n),this._target.removeEventListener("mouseleave",this._eventHandlers.mouseleave,n),this._target.removeEventListener("mousemove",this._eventHandlers.mousemove,n),this._target.removeEventListener("mouseup",this._eventHandlers.mouseup,n),document.body.removeChild(this._canvas)}this._target=null}}},{key:"change",value:function(n,s,e,u,t){if(u===0||t===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-s,this._position.y=this._position.y+this._hotSpot.y-e,this._hotSpot.x=s,this._hotSpot.y=e;var i=this._canvas.getContext("2d");this._canvas.width=u,this._canvas.height=t;var l;try{l=new ImageData(new Uint8ClampedArray(n),u,t)}catch(p){l=i.createImageData(u,t),l.data.set(new Uint8ClampedArray(n))}if(i.clearRect(0,0,u,t),i.putImageData(l,0,0),a)this._updatePosition();else{var c=this._canvas.toDataURL();this._target.style.cursor="url("+c+")"+s+" "+e+", default"}}},{key:"clear",value:function(){this._target.style.cursor="none",this._canvas.width=0,this._canvas.height=0,this._position.x=this._position.x+this._hotSpot.x,this._position.y=this._position.y+this._hotSpot.y,this._hotSpot.x=0,this._hotSpot.y=0}},{key:"move",value:function(n,s){if(a){window.visualViewport?(this._position.x=n+window.visualViewport.offsetLeft,this._position.y=s+window.visualViewport.offsetTop):(this._position.x=n,this._position.y=s),this._updatePosition();var e=document.elementFromPoint(n,s);this._updateVisibility(e)}}},{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 s=this,e=document.elementFromPoint(n.clientX,n.clientY);this._updateVisibility(e),this._captureIsActive()&&window.setTimeout(function(){s._target&&(e=document.elementFromPoint(n.clientX,n.clientY),s._updateVisibility(e))},0)}},{key:"_showCursor",value:function(){this._canvas.style.visibility==="hidden"&&(this._canvas.style.visibility="")}},{key:"_hideCursor",value:function(){this._canvas.style.visibility!=="hidden"&&(this._canvas.style.visibility="hidden")}},{key:"_shouldShowCursor",value:function(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}();O.default=f},92742:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.clientToElement=o;function o(d,m,b){var _=b.getBoundingClientRect(),a={x:0,y:0};return d<_.left?a.x=0:d>=_.right?a.x=_.width-1:a.x=d-_.left,m<_.top?a.y=0:m>=_.bottom?a.y=_.height-1:a.y=m-_.top,a}},79420:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.getPointerEvent=o,O.stopEvent=d,O.setCapture=h,O.releaseCapture=r;function o(n){return n.changedTouches?n.changedTouches[0]:n.touches?n.touches[0]:n}function d(n){n.stopPropagation(),n.preventDefault()}var m=!1,b=null;document.captureElement=null;function _(n){if(!m){var s=new n.constructor(n.type,n);m=!0,document.captureElement?document.captureElement.dispatchEvent(s):b.dispatchEvent(s),m=!1,n.stopPropagation(),s.defaultPrevented&&n.preventDefault(),n.type==="mouseup"&&r()}}function a(){var n=document.getElementById("noVNC_mouse_capture_elem");n.style.cursor=window.getComputedStyle(document.captureElement).cursor}var f=new MutationObserver(a);function h(n){if(n.setCapture)n.setCapture(),document.captureElement=n,n.addEventListener("mouseup",r);else{r();var s=document.getElementById("noVNC_mouse_capture_elem");s===null&&(s=document.createElement("div"),s.id="noVNC_mouse_capture_elem",s.style.position="fixed",s.style.top="0px",s.style.left="0px",s.style.width="100%",s.style.height="100%",s.style.zIndex=1e4,s.style.display="none",document.body.appendChild(s),s.addEventListener("contextmenu",_),s.addEventListener("mousemove",_),s.addEventListener("mouseup",_)),document.captureElement=n,f.observe(n,{attributes:!0}),a(),s.style.display="",window.addEventListener("mousemove",_),window.addEventListener("mouseup",_)}}function r(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;b=document.captureElement,document.captureElement=null,f.disconnect();var n=document.getElementById("noVNC_mouse_capture_elem");n.style.display="none",window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",_)}}},5004:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;function o(_,a){if(!(_ instanceof a))throw new TypeError("Cannot call a class as a function")}function d(_,a){for(var f=0;f<a.length;f++){var h=a[f];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,h.key,h)}}function m(_,a,f){return a&&d(_.prototype,a),f&&d(_,f),_}var b=function(){function _(){o(this,_),this._listeners=new Map}return m(_,[{key:"addEventListener",value:function(f,h){this._listeners.has(f)||this._listeners.set(f,new Set),this._listeners.get(f).add(h)}},{key:"removeEventListener",value:function(f,h){this._listeners.has(f)&&this._listeners.get(f).delete(h)}},{key:"dispatchEvent",value:function(f){var h=this;return this._listeners.has(f.type)?(this._listeners.get(f.type).forEach(function(r){return r.call(h,f)}),!f.defaultPrevented):!0}}]),_}();O.default=b},20860:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.toUnsigned32bit=o,O.toSigned32bit=d;function o(m){return m>>>0}function d(m){return m|0}},50500:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.initLogging=a,O.getLogging=f,O.Error=O.Warn=O.Info=O.Debug=void 0;var o="warn",d=function(){};O.Debug=d;var m=function(){};O.Info=m;var b=function(){};O.Warn=b;var _=function(){};O.Error=_;function a(h){if(typeof h=="undefined"?h=o:o=h,O.Debug=d=O.Info=m=O.Warn=b=O.Error=_=function(){},typeof window.console!="undefined")switch(h){case"debug":O.Debug=d=console.debug.bind(window.console);case"info":O.Info=m=console.info.bind(window.console);case"warn":O.Warn=b=console.warn.bind(window.console);case"error":O.Error=_=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+h+"'")}}function f(){return o}a()},21882:function(){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(O,o){"use strict";if(O==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(O),m=1;m<arguments.length;m++){var b=arguments[m];if(b!=null)for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(d[_]=b[_])}return d},writable:!0,configurable:!0}),function(){function Xe(O,o){o=o||{bubbles:!1,cancelable:!1,detail:void 0};var d=document.createEvent("CustomEvent");return d.initCustomEvent(O,o.bubbles,o.cancelable,o.detail),d}Xe.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=Xe)}(),Number.isInteger=Number.isInteger||function(O){return typeof O=="number"&&isFinite(O)&&Math.floor(O)===O}},31516:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.decodeUTF8=o,O.encodeUTF8=d;function o(m){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(m))}catch(_){if(_ instanceof URIError&&b)return m;throw _}}function d(m){return unescape(encodeURIComponent(m))}},35986:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.shrinkBuf=o,O.arraySet=d,O.flattenChunks=m,O.Buf32=O.Buf16=O.Buf8=void 0;function o(f,h){return f.length===h?f:f.subarray?f.subarray(0,h):(f.length=h,f)}function d(f,h,r,n,s){if(h.subarray&&f.subarray){f.set(h.subarray(r,r+n),s);return}for(var e=0;e<n;e++)f[s+e]=h[r+e]}function m(f){var h,r,n,s,e,u;for(n=0,h=0,r=f.length;h<r;h++)n+=f[h].length;for(u=new Uint8Array(n),s=0,h=0,r=f.length;h<r;h++)e=f[h],u.set(e,s),s+=e.length;return u}var b=Uint8Array;O.Buf8=b;var _=Uint16Array;O.Buf16=_;var a=Int32Array;O.Buf32=a},97580:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=o;function o(d,m,b,_){for(var a=d&65535|0,f=d>>>16&65535|0,h=0;b!==0;){h=b>2e3?2e3:b,b-=h;do a=a+m[_++]|0,f=f+a|0;while(--h);a%=65521,f%=65521}return a|f<<16|0}},1217:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=o;function o(){for(var b,_=[],a=0;a<256;a++){b=a;for(var f=0;f<8;f++)b=b&1?3988292384^b>>>1:b>>>1;_[a]=b}return _}var d=o();function m(b,_,a,f){var h=d,r=f+a;b^=-1;for(var n=f;n<r;n++)b=b>>>8^h[(b^_[n])&255];return b^-1}},25805:function(Xe,O,o){"use strict";function d(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(V){return typeof V}:d=function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},d(C)}Object.defineProperty(O,"__esModule",{value:!0}),O.deflateInit=B,O.deflateInit2=q,O.deflateReset=N,O.deflateResetKeep=_e,O.deflateSetHeader=Z,O.deflate=te,O.deflateEnd=T,O.deflateSetDictionary=ce,O.deflateInfo=O.Z_DEFLATED=O.Z_UNKNOWN=O.Z_DEFAULT_STRATEGY=O.Z_FIXED=O.Z_RLE=O.Z_HUFFMAN_ONLY=O.Z_FILTERED=O.Z_DEFAULT_COMPRESSION=O.Z_BUF_ERROR=O.Z_DATA_ERROR=O.Z_STREAM_ERROR=O.Z_STREAM_END=O.Z_OK=O.Z_BLOCK=O.Z_FINISH=O.Z_FULL_FLUSH=O.Z_PARTIAL_FLUSH=O.Z_NO_FLUSH=void 0;var m=n(o(35986)),b=n(o(55796)),_=h(o(97580)),a=h(o(1217)),f=h(o(70892));function h(C){return C&&C.__esModule?C:{default:C}}function r(){if(typeof WeakMap!="function")return null;var C=new WeakMap;return r=function(){return C},C}function n(C){if(C&&C.__esModule)return C;if(C===null||d(C)!=="object"&&typeof C!="function")return{default:C};var ie=r();if(ie&&ie.has(C))return ie.get(C);var V={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var W in C)if(Object.prototype.hasOwnProperty.call(C,W)){var Y=M?Object.getOwnPropertyDescriptor(C,W):null;Y&&(Y.get||Y.set)?Object.defineProperty(V,W,Y):V[W]=C[W]}return V.default=C,ie&&ie.set(C,V),V}var s=0;O.Z_NO_FLUSH=s;var e=1;O.Z_PARTIAL_FLUSH=e;var u=3;O.Z_FULL_FLUSH=u;var t=4;O.Z_FINISH=t;var i=5;O.Z_BLOCK=i;var l=0;O.Z_OK=l;var c=1;O.Z_STREAM_END=c;var p=-2;O.Z_STREAM_ERROR=p;var x=-3;O.Z_DATA_ERROR=x;var v=-5;O.Z_BUF_ERROR=v;var y=-1;O.Z_DEFAULT_COMPRESSION=y;var g=1;O.Z_FILTERED=g;var w=2;O.Z_HUFFMAN_ONLY=w;var E=3;O.Z_RLE=E;var S=4;O.Z_FIXED=S;var k=0;O.Z_DEFAULT_STRATEGY=k;var D=2;O.Z_UNKNOWN=D;var L=8;O.Z_DEFLATED=L;var z=9,j=15,le=8,U=29,J=256,A=J+1+U,P=30,K=19,$=2*A+1,H=15,ne=3,ve=258,Se=ve+ne+1,He=32,Me=42,he=69,ke=73,Ke=91,Te=103,Ie=113,De=666,Ne=1,Re=2,Le=3,oe=4,se=3;function ee(C,ie){return C.msg=f.default[ie],ie}function me(C){return(C<<1)-(C>4?9:0)}function G(C){for(var ie=C.length;--ie>=0;)C[ie]=0}function ae(C){var ie=C.state,V=ie.pending;V>C.avail_out&&(V=C.avail_out),V!==0&&(m.arraySet(C.output,ie.pending_buf,ie.pending_out,V,C.next_out),C.next_out+=V,ie.pending_out+=V,C.total_out+=V,C.avail_out-=V,ie.pending-=V,ie.pending===0&&(ie.pending_out=0))}function be(C,ie){b._tr_flush_block(C,C.block_start>=0?C.block_start:-1,C.strstart-C.block_start,ie),C.block_start=C.strstart,ae(C.strm)}function Ee(C,ie){C.pending_buf[C.pending++]=ie}function ye(C,ie){C.pending_buf[C.pending++]=ie>>>8&255,C.pending_buf[C.pending++]=ie&255}function ue(C,ie,V,M){var W=C.avail_in;return W>M&&(W=M),W===0?0:(C.avail_in-=W,m.arraySet(ie,C.input,C.next_in,W,V),C.state.wrap===1?C.adler=(0,_.default)(C.adler,ie,W,V):C.state.wrap===2&&(C.adler=(0,a.default)(C.adler,ie,W,V)),C.next_in+=W,C.total_in+=W,W)}function fe(C,ie){var V=C.max_chain_length,M=C.strstart,W,Y,Ae=C.prev_length,we=C.nice_match,ge=C.strstart>C.w_size-Se?C.strstart-(C.w_size-Se):0,Oe=C.window,We=C.w_mask,Pe=C.prev,Be=C.strstart+ve,$e=Oe[M+Ae-1],Ze=Oe[M+Ae];C.prev_length>=C.good_match&&(V>>=2),we>C.lookahead&&(we=C.lookahead);do if(W=ie,!(Oe[W+Ae]!==Ze||Oe[W+Ae-1]!==$e||Oe[W]!==Oe[M]||Oe[++W]!==Oe[M+1])){M+=2,W++;do;while(Oe[++M]===Oe[++W]&&Oe[++M]===Oe[++W]&&Oe[++M]===Oe[++W]&&Oe[++M]===Oe[++W]&&Oe[++M]===Oe[++W]&&Oe[++M]===Oe[++W]&&Oe[++M]===Oe[++W]&&Oe[++M]===Oe[++W]&&M<Be);if(Y=ve-(Be-M),M=Be-ve,Y>Ae){if(C.match_start=ie,Ae=Y,Y>=we)break;$e=Oe[M+Ae-1],Ze=Oe[M+Ae]}}while((ie=Pe[ie&We])>ge&&--V!==0);return Ae<=C.lookahead?Ae:C.lookahead}function Q(C){var ie=C.w_size,V,M,W,Y,Ae;do{if(Y=C.window_size-C.lookahead-C.strstart,C.strstart>=ie+(ie-Se)){m.arraySet(C.window,C.window,ie,ie,0),C.match_start-=ie,C.strstart-=ie,C.block_start-=ie,M=C.hash_size,V=M;do W=C.head[--V],C.head[V]=W>=ie?W-ie:0;while(--M);M=ie,V=M;do W=C.prev[--V],C.prev[V]=W>=ie?W-ie:0;while(--M);Y+=ie}if(C.strm.avail_in===0)break;if(M=ue(C.strm,C.window,C.strstart+C.lookahead,Y),C.lookahead+=M,C.lookahead+C.insert>=ne)for(Ae=C.strstart-C.insert,C.ins_h=C.window[Ae],C.ins_h=(C.ins_h<<C.hash_shift^C.window[Ae+1])&C.hash_mask;C.insert&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[Ae+ne-1])&C.hash_mask,C.prev[Ae&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=Ae,Ae++,C.insert--,!(C.lookahead+C.insert<ne)););}while(C.lookahead<Se&&C.strm.avail_in!==0)}function R(C,ie){var V=65535;for(V>C.pending_buf_size-5&&(V=C.pending_buf_size-5);;){if(C.lookahead<=1){if(Q(C),C.lookahead===0&&ie===s)return Ne;if(C.lookahead===0)break}C.strstart+=C.lookahead,C.lookahead=0;var M=C.block_start+V;if((C.strstart===0||C.strstart>=M)&&(C.lookahead=C.strstart-M,C.strstart=M,be(C,!1),C.strm.avail_out===0)||C.strstart-C.block_start>=C.w_size-Se&&(be(C,!1),C.strm.avail_out===0))return Ne}return C.insert=0,ie===t?(be(C,!0),C.strm.avail_out===0?Le:oe):(C.strstart>C.block_start&&(be(C,!1),C.strm.avail_out===0),Ne)}function X(C,ie){for(var V,M;;){if(C.lookahead<Se){if(Q(C),C.lookahead<Se&&ie===s)return Ne;if(C.lookahead===0)break}if(V=0,C.lookahead>=ne&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+ne-1])&C.hash_mask,V=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart),V!==0&&C.strstart-V<=C.w_size-Se&&(C.match_length=fe(C,V)),C.match_length>=ne)if(M=b._tr_tally(C,C.strstart-C.match_start,C.match_length-ne),C.lookahead-=C.match_length,C.match_length<=C.max_lazy_match&&C.lookahead>=ne){C.match_length--;do C.strstart++,C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+ne-1])&C.hash_mask,V=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart;while(--C.match_length!==0);C.strstart++}else C.strstart+=C.match_length,C.match_length=0,C.ins_h=C.window[C.strstart],C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+1])&C.hash_mask;else M=b._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++;if(M&&(be(C,!1),C.strm.avail_out===0))return Ne}return C.insert=C.strstart<ne-1?C.strstart:ne-1,ie===t?(be(C,!0),C.strm.avail_out===0?Le:oe):C.last_lit&&(be(C,!1),C.strm.avail_out===0)?Ne:Re}function F(C,ie){for(var V,M,W;;){if(C.lookahead<Se){if(Q(C),C.lookahead<Se&&ie===s)return Ne;if(C.lookahead===0)break}if(V=0,C.lookahead>=ne&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+ne-1])&C.hash_mask,V=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart),C.prev_length=C.match_length,C.prev_match=C.match_start,C.match_length=ne-1,V!==0&&C.prev_length<C.max_lazy_match&&C.strstart-V<=C.w_size-Se&&(C.match_length=fe(C,V),C.match_length<=5&&(C.strategy===g||C.match_length===ne&&C.strstart-C.match_start>4096)&&(C.match_length=ne-1)),C.prev_length>=ne&&C.match_length<=C.prev_length){W=C.strstart+C.lookahead-ne,M=b._tr_tally(C,C.strstart-1-C.prev_match,C.prev_length-ne),C.lookahead-=C.prev_length-1,C.prev_length-=2;do++C.strstart<=W&&(C.ins_h=(C.ins_h<<C.hash_shift^C.window[C.strstart+ne-1])&C.hash_mask,V=C.prev[C.strstart&C.w_mask]=C.head[C.ins_h],C.head[C.ins_h]=C.strstart);while(--C.prev_length!==0);if(C.match_available=0,C.match_length=ne-1,C.strstart++,M&&(be(C,!1),C.strm.avail_out===0))return Ne}else if(C.match_available){if(M=b._tr_tally(C,0,C.window[C.strstart-1]),M&&be(C,!1),C.strstart++,C.lookahead--,C.strm.avail_out===0)return Ne}else C.match_available=1,C.strstart++,C.lookahead--}return C.match_available&&(M=b._tr_tally(C,0,C.window[C.strstart-1]),C.match_available=0),C.insert=C.strstart<ne-1?C.strstart:ne-1,ie===t?(be(C,!0),C.strm.avail_out===0?Le:oe):C.last_lit&&(be(C,!1),C.strm.avail_out===0)?Ne:Re}function re(C,ie){for(var V,M,W,Y,Ae=C.window;;){if(C.lookahead<=ve){if(Q(C),C.lookahead<=ve&&ie===s)return Ne;if(C.lookahead===0)break}if(C.match_length=0,C.lookahead>=ne&&C.strstart>0&&(W=C.strstart-1,M=Ae[W],M===Ae[++W]&&M===Ae[++W]&&M===Ae[++W])){Y=C.strstart+ve;do;while(M===Ae[++W]&&M===Ae[++W]&&M===Ae[++W]&&M===Ae[++W]&&M===Ae[++W]&&M===Ae[++W]&&M===Ae[++W]&&M===Ae[++W]&&W<Y);C.match_length=ve-(Y-W),C.match_length>C.lookahead&&(C.match_length=C.lookahead)}if(C.match_length>=ne?(V=b._tr_tally(C,1,C.match_length-ne),C.lookahead-=C.match_length,C.strstart+=C.match_length,C.match_length=0):(V=b._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++),V&&(be(C,!1),C.strm.avail_out===0))return Ne}return C.insert=0,ie===t?(be(C,!0),C.strm.avail_out===0?Le:oe):C.last_lit&&(be(C,!1),C.strm.avail_out===0)?Ne:Re}function xe(C,ie){for(var V;;){if(C.lookahead===0&&(Q(C),C.lookahead===0)){if(ie===s)return Ne;break}if(C.match_length=0,V=b._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++,V&&(be(C,!1),C.strm.avail_out===0))return Ne}return C.insert=0,ie===t?(be(C,!0),C.strm.avail_out===0?Le:oe):C.last_lit&&(be(C,!1),C.strm.avail_out===0)?Ne:Re}function Ce(C,ie,V,M,W){this.good_length=C,this.max_lazy=ie,this.nice_length=V,this.max_chain=M,this.func=W}var Fe;Fe=[new Ce(0,0,0,0,R),new Ce(4,4,8,4,X),new Ce(4,5,16,8,X),new Ce(4,6,32,32,X),new Ce(4,4,16,16,F),new Ce(8,16,32,32,F),new Ce(8,16,128,128,F),new Ce(8,32,128,256,F),new Ce(32,128,258,1024,F),new Ce(32,258,258,4096,F)];function I(C){C.window_size=2*C.w_size,G(C.head),C.max_lazy_match=Fe[C.level].max_lazy,C.good_match=Fe[C.level].good_length,C.nice_match=Fe[C.level].nice_length,C.max_chain_length=Fe[C.level].max_chain,C.strstart=0,C.block_start=0,C.lookahead=0,C.insert=0,C.match_length=C.prev_length=ne-1,C.match_available=0,C.ins_h=0}function de(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=L,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new m.Buf16($*2),this.dyn_dtree=new m.Buf16((2*P+1)*2),this.bl_tree=new m.Buf16((2*K+1)*2),G(this.dyn_ltree),G(this.dyn_dtree),G(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(H+1),this.heap=new m.Buf16(2*A+1),G(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*A+1),G(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 _e(C){var ie;return!C||!C.state?ee(C,p):(C.total_in=C.total_out=0,C.data_type=D,ie=C.state,ie.pending=0,ie.pending_out=0,ie.wrap<0&&(ie.wrap=-ie.wrap),ie.status=ie.wrap?Me:Ie,C.adler=ie.wrap===2?0:1,ie.last_flush=s,b._tr_init(ie),l)}function N(C){var ie=_e(C);return ie===l&&I(C.state),ie}function Z(C,ie){return!C||!C.state||C.state.wrap!==2?p:(C.state.gzhead=ie,l)}function q(C,ie,V,M,W,Y){if(!C)return p;var Ae=1;if(ie===y&&(ie=6),M<0?(Ae=0,M=-M):M>15&&(Ae=2,M-=16),W<1||W>z||V!==L||M<8||M>15||ie<0||ie>9||Y<0||Y>S)return ee(C,p);M===8&&(M=9);var we=new de;return C.state=we,we.strm=C,we.wrap=Ae,we.gzhead=null,we.w_bits=M,we.w_size=1<<we.w_bits,we.w_mask=we.w_size-1,we.hash_bits=W+7,we.hash_size=1<<we.hash_bits,we.hash_mask=we.hash_size-1,we.hash_shift=~~((we.hash_bits+ne-1)/ne),we.window=new m.Buf8(we.w_size*2),we.head=new m.Buf16(we.hash_size),we.prev=new m.Buf16(we.w_size),we.lit_bufsize=1<<W+6,we.pending_buf_size=we.lit_bufsize*4,we.pending_buf=new m.Buf8(we.pending_buf_size),we.d_buf=1*we.lit_bufsize,we.l_buf=3*we.lit_bufsize,we.level=ie,we.strategy=Y,we.method=V,N(C)}function B(C,ie){return q(C,ie,L,j,le,k)}function te(C,ie){var V,M,W,Y;if(!C||!C.state||ie>i||ie<0)return C?ee(C,p):p;if(M=C.state,!C.output||!C.input&&C.avail_in!==0||M.status===De&&ie!==t)return ee(C,C.avail_out===0?v:p);if(M.strm=C,V=M.last_flush,M.last_flush=ie,M.status===Me)if(M.wrap===2)C.adler=0,Ee(M,31),Ee(M,139),Ee(M,8),M.gzhead?(Ee(M,(M.gzhead.text?1:0)+(M.gzhead.hcrc?2:0)+(M.gzhead.extra?4:0)+(M.gzhead.name?8:0)+(M.gzhead.comment?16:0)),Ee(M,M.gzhead.time&255),Ee(M,M.gzhead.time>>8&255),Ee(M,M.gzhead.time>>16&255),Ee(M,M.gzhead.time>>24&255),Ee(M,M.level===9?2:M.strategy>=w||M.level<2?4:0),Ee(M,M.gzhead.os&255),M.gzhead.extra&&M.gzhead.extra.length&&(Ee(M,M.gzhead.extra.length&255),Ee(M,M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(C.adler=(0,a.default)(C.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=he):(Ee(M,0),Ee(M,0),Ee(M,0),Ee(M,0),Ee(M,0),Ee(M,M.level===9?2:M.strategy>=w||M.level<2?4:0),Ee(M,se),M.status=Ie);else{var Ae=L+(M.w_bits-8<<4)<<8,we=-1;M.strategy>=w||M.level<2?we=0:M.level<6?we=1:M.level===6?we=2:we=3,Ae|=we<<6,M.strstart!==0&&(Ae|=He),Ae+=31-Ae%31,M.status=Ie,ye(M,Ae),M.strstart!==0&&(ye(M,C.adler>>>16),ye(M,C.adler&65535)),C.adler=1}if(M.status===he)if(M.gzhead.extra){for(W=M.pending;M.gzindex<(M.gzhead.extra.length&65535)&&!(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>W&&(C.adler=(0,a.default)(C.adler,M.pending_buf,M.pending-W,W)),ae(C),W=M.pending,M.pending===M.pending_buf_size));)Ee(M,M.gzhead.extra[M.gzindex]&255),M.gzindex++;M.gzhead.hcrc&&M.pending>W&&(C.adler=(0,a.default)(C.adler,M.pending_buf,M.pending-W,W)),M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=ke)}else M.status=ke;if(M.status===ke)if(M.gzhead.name){W=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>W&&(C.adler=(0,a.default)(C.adler,M.pending_buf,M.pending-W,W)),ae(C),W=M.pending,M.pending===M.pending_buf_size)){Y=1;break}M.gzindex<M.gzhead.name.length?Y=M.gzhead.name.charCodeAt(M.gzindex++)&255:Y=0,Ee(M,Y)}while(Y!==0);M.gzhead.hcrc&&M.pending>W&&(C.adler=(0,a.default)(C.adler,M.pending_buf,M.pending-W,W)),Y===0&&(M.gzindex=0,M.status=Ke)}else M.status=Ke;if(M.status===Ke)if(M.gzhead.comment){W=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>W&&(C.adler=(0,a.default)(C.adler,M.pending_buf,M.pending-W,W)),ae(C),W=M.pending,M.pending===M.pending_buf_size)){Y=1;break}M.gzindex<M.gzhead.comment.length?Y=M.gzhead.comment.charCodeAt(M.gzindex++)&255:Y=0,Ee(M,Y)}while(Y!==0);M.gzhead.hcrc&&M.pending>W&&(C.adler=(0,a.default)(C.adler,M.pending_buf,M.pending-W,W)),Y===0&&(M.status=Te)}else M.status=Te;if(M.status===Te&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&ae(C),M.pending+2<=M.pending_buf_size&&(Ee(M,C.adler&255),Ee(M,C.adler>>8&255),C.adler=0,M.status=Ie)):M.status=Ie),M.pending!==0){if(ae(C),C.avail_out===0)return M.last_flush=-1,l}else if(C.avail_in===0&&me(ie)<=me(V)&&ie!==t)return ee(C,v);if(M.status===De&&C.avail_in!==0)return ee(C,v);if(C.avail_in!==0||M.lookahead!==0||ie!==s&&M.status!==De){var ge=M.strategy===w?xe(M,ie):M.strategy===E?re(M,ie):Fe[M.level].func(M,ie);if((ge===Le||ge===oe)&&(M.status=De),ge===Ne||ge===Le)return C.avail_out===0&&(M.last_flush=-1),l;if(ge===Re&&(ie===e?b._tr_align(M):ie!==i&&(b._tr_stored_block(M,0,0,!1),ie===u&&(G(M.head),M.lookahead===0&&(M.strstart=0,M.block_start=0,M.insert=0))),ae(C),C.avail_out===0))return M.last_flush=-1,l}return ie!==t?l:M.wrap<=0?c:(M.wrap===2?(Ee(M,C.adler&255),Ee(M,C.adler>>8&255),Ee(M,C.adler>>16&255),Ee(M,C.adler>>24&255),Ee(M,C.total_in&255),Ee(M,C.total_in>>8&255),Ee(M,C.total_in>>16&255),Ee(M,C.total_in>>24&255)):(ye(M,C.adler>>>16),ye(M,C.adler&65535)),ae(C),M.wrap>0&&(M.wrap=-M.wrap),M.pending!==0?l:c)}function T(C){var ie;return!C||!C.state?p:(ie=C.state.status,ie!==Me&&ie!==he&&ie!==ke&&ie!==Ke&&ie!==Te&&ie!==Ie&&ie!==De?ee(C,p):(C.state=null,ie===Ie?ee(C,x):l))}function ce(C,ie){var V=ie.length,M,W,Y,Ae,we,ge,Oe,We;if(!C||!C.state||(M=C.state,Ae=M.wrap,Ae===2||Ae===1&&M.status!==Me||M.lookahead))return p;for(Ae===1&&(C.adler=(0,_.default)(C.adler,ie,V,0)),M.wrap=0,V>=M.w_size&&(Ae===0&&(G(M.head),M.strstart=0,M.block_start=0,M.insert=0),We=new m.Buf8(M.w_size),m.arraySet(We,ie,V-M.w_size,M.w_size,0),ie=We,V=M.w_size),we=C.avail_in,ge=C.next_in,Oe=C.input,C.avail_in=V,C.next_in=0,C.input=ie,Q(M);M.lookahead>=ne;){W=M.strstart,Y=M.lookahead-(ne-1);do M.ins_h=(M.ins_h<<M.hash_shift^M.window[W+ne-1])&M.hash_mask,M.prev[W&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=W,W++;while(--Y);M.strstart=W,M.lookahead=ne-1,Q(M)}return M.strstart+=M.lookahead,M.block_start=M.strstart,M.insert=M.lookahead,M.lookahead=0,M.match_length=M.prev_length=ne-1,M.match_available=0,C.next_in=ge,C.input=Oe,C.avail_in=we,M.wrap=Ae,l}var pe="pako deflate (from Nodeca project)";O.deflateInfo=pe},16071:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=m;var o=30,d=12;function m(b,_){var a,f,h,r,n,s,e,u,t,i,l,c,p,x,v,y,g,w,E,S,k,D,L,z,j;a=b.state,f=b.next_in,z=b.input,h=f+(b.avail_in-5),r=b.next_out,j=b.output,n=r-(_-b.avail_out),s=r+(b.avail_out-257),e=a.dmax,u=a.wsize,t=a.whave,i=a.wnext,l=a.window,c=a.hold,p=a.bits,x=a.lencode,v=a.distcode,y=(1<<a.lenbits)-1,g=(1<<a.distbits)-1;e:do{p<15&&(c+=z[f++]<<p,p+=8,c+=z[f++]<<p,p+=8),w=x[c&y];t:for(;;){if(E=w>>>24,c>>>=E,p-=E,E=w>>>16&255,E===0)j[r++]=w&65535;else if(E&16){S=w&65535,E&=15,E&&(p<E&&(c+=z[f++]<<p,p+=8),S+=c&(1<<E)-1,c>>>=E,p-=E),p<15&&(c+=z[f++]<<p,p+=8,c+=z[f++]<<p,p+=8),w=v[c&g];r:for(;;){if(E=w>>>24,c>>>=E,p-=E,E=w>>>16&255,E&16){if(k=w&65535,E&=15,p<E&&(c+=z[f++]<<p,p+=8,p<E&&(c+=z[f++]<<p,p+=8)),k+=c&(1<<E)-1,k>e){b.msg="invalid distance too far back",a.mode=o;break e}if(c>>>=E,p-=E,E=r-n,k>E){if(E=k-E,E>t&&a.sane){b.msg="invalid distance too far back",a.mode=o;break e}if(D=0,L=l,i===0){if(D+=u-E,E<S){S-=E;do j[r++]=l[D++];while(--E);D=r-k,L=j}}else if(i<E){if(D+=u+i-E,E-=i,E<S){S-=E;do j[r++]=l[D++];while(--E);if(D=0,i<S){E=i,S-=E;do j[r++]=l[D++];while(--E);D=r-k,L=j}}}else if(D+=i-E,E<S){S-=E;do j[r++]=l[D++];while(--E);D=r-k,L=j}for(;S>2;)j[r++]=L[D++],j[r++]=L[D++],j[r++]=L[D++],S-=3;S&&(j[r++]=L[D++],S>1&&(j[r++]=L[D++]))}else{D=r-k;do j[r++]=j[D++],j[r++]=j[D++],j[r++]=j[D++],S-=3;while(S>2);S&&(j[r++]=j[D++],S>1&&(j[r++]=j[D++]))}}else if(E&64){b.msg="invalid distance code",a.mode=o;break e}else{w=v[(w&65535)+(c&(1<<E)-1)];continue r}break}}else if(E&64)if(E&32){a.mode=d;break e}else{b.msg="invalid literal/length code",a.mode=o;break e}else{w=x[(w&65535)+(c&(1<<E)-1)];continue t}break}}while(f<h&&r<s);S=p>>3,f-=S,p-=S<<3,c&=(1<<p)-1,b.next_in=f,b.next_out=r,b.avail_in=f<h?5+(h-f):5-(f-h),b.avail_out=r<s?257+(s-r):257-(r-s),a.hold=c,a.bits=p}},95766:function(Xe,O,o){"use strict";function d(B){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(T){return typeof T}:d=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},d(B)}Object.defineProperty(O,"__esModule",{value:!0}),O.inflateReset=Q,O.inflateReset2=R,O.inflateResetKeep=fe,O.inflateInit=F,O.inflateInit2=X,O.inflate=de,O.inflateEnd=_e,O.inflateGetHeader=N,O.inflateSetDictionary=Z,O.inflateInfo=O.Z_DEFLATED=O.Z_BUF_ERROR=O.Z_MEM_ERROR=O.Z_DATA_ERROR=O.Z_STREAM_ERROR=O.Z_NEED_DICT=O.Z_STREAM_END=O.Z_OK=O.Z_TREES=O.Z_BLOCK=O.Z_FINISH=void 0;var m=n(o(35986)),b=h(o(97580)),_=h(o(1217)),a=h(o(16071)),f=h(o(63093));function h(B){return B&&B.__esModule?B:{default:B}}function r(){if(typeof WeakMap!="function")return null;var B=new WeakMap;return r=function(){return B},B}function n(B){if(B&&B.__esModule)return B;if(B===null||d(B)!=="object"&&typeof B!="function")return{default:B};var te=r();if(te&&te.has(B))return te.get(B);var T={},ce=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var pe in B)if(Object.prototype.hasOwnProperty.call(B,pe)){var C=ce?Object.getOwnPropertyDescriptor(B,pe):null;C&&(C.get||C.set)?Object.defineProperty(T,pe,C):T[pe]=B[pe]}return T.default=B,te&&te.set(B,T),T}var s=0,e=1,u=2,t=4;O.Z_FINISH=t;var i=5;O.Z_BLOCK=i;var l=6;O.Z_TREES=l;var c=0;O.Z_OK=c;var p=1;O.Z_STREAM_END=p;var x=2;O.Z_NEED_DICT=x;var v=-2;O.Z_STREAM_ERROR=v;var y=-3;O.Z_DATA_ERROR=y;var g=-4;O.Z_MEM_ERROR=g;var w=-5;O.Z_BUF_ERROR=w;var E=8;O.Z_DEFLATED=E;var S=1,k=2,D=3,L=4,z=5,j=6,le=7,U=8,J=9,A=10,P=11,K=12,$=13,H=14,ne=15,ve=16,Se=17,He=18,Me=19,he=20,ke=21,Ke=22,Te=23,Ie=24,De=25,Ne=26,Re=27,Le=28,oe=29,se=30,ee=31,me=32,G=852,ae=592,be=15,Ee=be;function ye(B){return(B>>>24&255)+(B>>>8&65280)+((B&65280)<<8)+((B&255)<<24)}function ue(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function fe(B){var te;return!B||!B.state?v:(te=B.state,B.total_in=B.total_out=te.total=0,B.msg="",te.wrap&&(B.adler=te.wrap&1),te.mode=S,te.last=0,te.havedict=0,te.dmax=32768,te.head=null,te.hold=0,te.bits=0,te.lencode=te.lendyn=new m.Buf32(G),te.distcode=te.distdyn=new m.Buf32(ae),te.sane=1,te.back=-1,c)}function Q(B){var te;return!B||!B.state?v:(te=B.state,te.wsize=0,te.whave=0,te.wnext=0,fe(B))}function R(B,te){var T,ce;return!B||!B.state||(ce=B.state,te<0?(T=0,te=-te):(T=(te>>4)+1,te<48&&(te&=15)),te&&(te<8||te>15))?v:(ce.window!==null&&ce.wbits!==te&&(ce.window=null),ce.wrap=T,ce.wbits=te,Q(B))}function X(B,te){var T,ce;return B?(ce=new ue,B.state=ce,ce.window=null,T=R(B,te),T!==c&&(B.state=null),T):v}function F(B){return X(B,Ee)}var re=!0,xe,Ce;function Fe(B){if(re){var te;for(xe=new m.Buf32(512),Ce=new m.Buf32(32),te=0;te<144;)B.lens[te++]=8;for(;te<256;)B.lens[te++]=9;for(;te<280;)B.lens[te++]=7;for(;te<288;)B.lens[te++]=8;for((0,f.default)(e,B.lens,0,288,xe,0,B.work,{bits:9}),te=0;te<32;)B.lens[te++]=5;(0,f.default)(u,B.lens,0,32,Ce,0,B.work,{bits:5}),re=!1}B.lencode=xe,B.lenbits=9,B.distcode=Ce,B.distbits=5}function I(B,te,T,ce){var pe,C=B.state;return C.window===null&&(C.wsize=1<<C.wbits,C.wnext=0,C.whave=0,C.window=new m.Buf8(C.wsize)),ce>=C.wsize?(m.arraySet(C.window,te,T-C.wsize,C.wsize,0),C.wnext=0,C.whave=C.wsize):(pe=C.wsize-C.wnext,pe>ce&&(pe=ce),m.arraySet(C.window,te,T-ce,pe,C.wnext),ce-=pe,ce?(m.arraySet(C.window,te,T-ce,ce,0),C.wnext=ce,C.whave=C.wsize):(C.wnext+=pe,C.wnext===C.wsize&&(C.wnext=0),C.whave<C.wsize&&(C.whave+=pe))),0}function de(B,te){var T,ce,pe,C,ie,V,M,W,Y,Ae,we,ge,Oe,We,Pe=0,Be,$e,Ze,Ve,Je,et,Ue,Ye,qe=new m.Buf8(4),Qe,je,rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!B||!B.state||!B.output||!B.input&&B.avail_in!==0)return v;T=B.state,T.mode===K&&(T.mode=$),ie=B.next_out,pe=B.output,M=B.avail_out,C=B.next_in,ce=B.input,V=B.avail_in,W=T.hold,Y=T.bits,Ae=V,we=M,Ye=c;e:for(;;)switch(T.mode){case S:if(T.wrap===0){T.mode=$;break}for(;Y<16;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(T.wrap&2&&W===35615){T.check=0,qe[0]=W&255,qe[1]=W>>>8&255,T.check=(0,_.default)(T.check,qe,2,0),W=0,Y=0,T.mode=k;break}if(T.flags=0,T.head&&(T.head.done=!1),!(T.wrap&1)||(((W&255)<<8)+(W>>8))%31){B.msg="incorrect header check",T.mode=se;break}if((W&15)!==E){B.msg="unknown compression method",T.mode=se;break}if(W>>>=4,Y-=4,Ue=(W&15)+8,T.wbits===0)T.wbits=Ue;else if(Ue>T.wbits){B.msg="invalid window size",T.mode=se;break}T.dmax=1<<Ue,B.adler=T.check=1,T.mode=W&512?A:K,W=0,Y=0;break;case k:for(;Y<16;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(T.flags=W,(T.flags&255)!==E){B.msg="unknown compression method",T.mode=se;break}if(T.flags&57344){B.msg="unknown header flags set",T.mode=se;break}T.head&&(T.head.text=W>>8&1),T.flags&512&&(qe[0]=W&255,qe[1]=W>>>8&255,T.check=(0,_.default)(T.check,qe,2,0)),W=0,Y=0,T.mode=D;case D:for(;Y<32;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}T.head&&(T.head.time=W),T.flags&512&&(qe[0]=W&255,qe[1]=W>>>8&255,qe[2]=W>>>16&255,qe[3]=W>>>24&255,T.check=(0,_.default)(T.check,qe,4,0)),W=0,Y=0,T.mode=L;case L:for(;Y<16;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}T.head&&(T.head.xflags=W&255,T.head.os=W>>8),T.flags&512&&(qe[0]=W&255,qe[1]=W>>>8&255,T.check=(0,_.default)(T.check,qe,2,0)),W=0,Y=0,T.mode=z;case z:if(T.flags&1024){for(;Y<16;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}T.length=W,T.head&&(T.head.extra_len=W),T.flags&512&&(qe[0]=W&255,qe[1]=W>>>8&255,T.check=(0,_.default)(T.check,qe,2,0)),W=0,Y=0}else T.head&&(T.head.extra=null);T.mode=j;case j:if(T.flags&1024&&(ge=T.length,ge>V&&(ge=V),ge&&(T.head&&(Ue=T.head.extra_len-T.length,T.head.extra||(T.head.extra=new Array(T.head.extra_len)),m.arraySet(T.head.extra,ce,C,ge,Ue)),T.flags&512&&(T.check=(0,_.default)(T.check,ce,ge,C)),V-=ge,C+=ge,T.length-=ge),T.length))break e;T.length=0,T.mode=le;case le:if(T.flags&2048){if(V===0)break e;ge=0;do Ue=ce[C+ge++],T.head&&Ue&&T.length<65536&&(T.head.name+=String.fromCharCode(Ue));while(Ue&&ge<V);if(T.flags&512&&(T.check=(0,_.default)(T.check,ce,ge,C)),V-=ge,C+=ge,Ue)break e}else T.head&&(T.head.name=null);T.length=0,T.mode=U;case U:if(T.flags&4096){if(V===0)break e;ge=0;do Ue=ce[C+ge++],T.head&&Ue&&T.length<65536&&(T.head.comment+=String.fromCharCode(Ue));while(Ue&&ge<V);if(T.flags&512&&(T.check=(0,_.default)(T.check,ce,ge,C)),V-=ge,C+=ge,Ue)break e}else T.head&&(T.head.comment=null);T.mode=J;case J:if(T.flags&512){for(;Y<16;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(W!==(T.check&65535)){B.msg="header crc mismatch",T.mode=se;break}W=0,Y=0}T.head&&(T.head.hcrc=T.flags>>9&1,T.head.done=!0),B.adler=T.check=0,T.mode=K;break;case A:for(;Y<32;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}B.adler=T.check=ye(W),W=0,Y=0,T.mode=P;case P:if(T.havedict===0)return B.next_out=ie,B.avail_out=M,B.next_in=C,B.avail_in=V,T.hold=W,T.bits=Y,x;B.adler=T.check=1,T.mode=K;case K:if(te===i||te===l)break e;case $:if(T.last){W>>>=Y&7,Y-=Y&7,T.mode=Re;break}for(;Y<3;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}switch(T.last=W&1,W>>>=1,Y-=1,W&3){case 0:T.mode=H;break;case 1:if(Fe(T),T.mode=he,te===l){W>>>=2,Y-=2;break e}break;case 2:T.mode=Se;break;case 3:B.msg="invalid block type",T.mode=se}W>>>=2,Y-=2;break;case H:for(W>>>=Y&7,Y-=Y&7;Y<32;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if((W&65535)!==(W>>>16^65535)){B.msg="invalid stored block lengths",T.mode=se;break}if(T.length=W&65535,W=0,Y=0,T.mode=ne,te===l)break e;case ne:T.mode=ve;case ve:if(ge=T.length,ge){if(ge>V&&(ge=V),ge>M&&(ge=M),ge===0)break e;m.arraySet(pe,ce,C,ge,ie),V-=ge,C+=ge,M-=ge,ie+=ge,T.length-=ge;break}T.mode=K;break;case Se:for(;Y<14;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(T.nlen=(W&31)+257,W>>>=5,Y-=5,T.ndist=(W&31)+1,W>>>=5,Y-=5,T.ncode=(W&15)+4,W>>>=4,Y-=4,T.nlen>286||T.ndist>30){B.msg="too many length or distance symbols",T.mode=se;break}T.have=0,T.mode=He;case He:for(;T.have<T.ncode;){for(;Y<3;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}T.lens[rt[T.have++]]=W&7,W>>>=3,Y-=3}for(;T.have<19;)T.lens[rt[T.have++]]=0;if(T.lencode=T.lendyn,T.lenbits=7,Qe={bits:T.lenbits},Ye=(0,f.default)(s,T.lens,0,19,T.lencode,0,T.work,Qe),T.lenbits=Qe.bits,Ye){B.msg="invalid code lengths set",T.mode=se;break}T.have=0,T.mode=Me;case Me:for(;T.have<T.nlen+T.ndist;){for(;Pe=T.lencode[W&(1<<T.lenbits)-1],Be=Pe>>>24,$e=Pe>>>16&255,Ze=Pe&65535,!(Be<=Y);){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(Ze<16)W>>>=Be,Y-=Be,T.lens[T.have++]=Ze;else{if(Ze===16){for(je=Be+2;Y<je;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(W>>>=Be,Y-=Be,T.have===0){B.msg="invalid bit length repeat",T.mode=se;break}Ue=T.lens[T.have-1],ge=3+(W&3),W>>>=2,Y-=2}else if(Ze===17){for(je=Be+3;Y<je;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}W>>>=Be,Y-=Be,Ue=0,ge=3+(W&7),W>>>=3,Y-=3}else{for(je=Be+7;Y<je;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}W>>>=Be,Y-=Be,Ue=0,ge=11+(W&127),W>>>=7,Y-=7}if(T.have+ge>T.nlen+T.ndist){B.msg="invalid bit length repeat",T.mode=se;break}for(;ge--;)T.lens[T.have++]=Ue}}if(T.mode===se)break;if(T.lens[256]===0){B.msg="invalid code -- missing end-of-block",T.mode=se;break}if(T.lenbits=9,Qe={bits:T.lenbits},Ye=(0,f.default)(e,T.lens,0,T.nlen,T.lencode,0,T.work,Qe),T.lenbits=Qe.bits,Ye){B.msg="invalid literal/lengths set",T.mode=se;break}if(T.distbits=6,T.distcode=T.distdyn,Qe={bits:T.distbits},Ye=(0,f.default)(u,T.lens,T.nlen,T.ndist,T.distcode,0,T.work,Qe),T.distbits=Qe.bits,Ye){B.msg="invalid distances set",T.mode=se;break}if(T.mode=he,te===l)break e;case he:T.mode=ke;case ke:if(V>=6&&M>=258){B.next_out=ie,B.avail_out=M,B.next_in=C,B.avail_in=V,T.hold=W,T.bits=Y,(0,a.default)(B,we),ie=B.next_out,pe=B.output,M=B.avail_out,C=B.next_in,ce=B.input,V=B.avail_in,W=T.hold,Y=T.bits,T.mode===K&&(T.back=-1);break}for(T.back=0;Pe=T.lencode[W&(1<<T.lenbits)-1],Be=Pe>>>24,$e=Pe>>>16&255,Ze=Pe&65535,!(Be<=Y);){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if($e&&!($e&240)){for(Ve=Be,Je=$e,et=Ze;Pe=T.lencode[et+((W&(1<<Ve+Je)-1)>>Ve)],Be=Pe>>>24,$e=Pe>>>16&255,Ze=Pe&65535,!(Ve+Be<=Y);){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}W>>>=Ve,Y-=Ve,T.back+=Ve}if(W>>>=Be,Y-=Be,T.back+=Be,T.length=Ze,$e===0){T.mode=Ne;break}if($e&32){T.back=-1,T.mode=K;break}if($e&64){B.msg="invalid literal/length code",T.mode=se;break}T.extra=$e&15,T.mode=Ke;case Ke:if(T.extra){for(je=T.extra;Y<je;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}T.length+=W&(1<<T.extra)-1,W>>>=T.extra,Y-=T.extra,T.back+=T.extra}T.was=T.length,T.mode=Te;case Te:for(;Pe=T.distcode[W&(1<<T.distbits)-1],Be=Pe>>>24,$e=Pe>>>16&255,Ze=Pe&65535,!(Be<=Y);){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(!($e&240)){for(Ve=Be,Je=$e,et=Ze;Pe=T.distcode[et+((W&(1<<Ve+Je)-1)>>Ve)],Be=Pe>>>24,$e=Pe>>>16&255,Ze=Pe&65535,!(Ve+Be<=Y);){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}W>>>=Ve,Y-=Ve,T.back+=Ve}if(W>>>=Be,Y-=Be,T.back+=Be,$e&64){B.msg="invalid distance code",T.mode=se;break}T.offset=Ze,T.extra=$e&15,T.mode=Ie;case Ie:if(T.extra){for(je=T.extra;Y<je;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}T.offset+=W&(1<<T.extra)-1,W>>>=T.extra,Y-=T.extra,T.back+=T.extra}if(T.offset>T.dmax){B.msg="invalid distance too far back",T.mode=se;break}T.mode=De;case De:if(M===0)break e;if(ge=we-M,T.offset>ge){if(ge=T.offset-ge,ge>T.whave&&T.sane){B.msg="invalid distance too far back",T.mode=se;break}ge>T.wnext?(ge-=T.wnext,Oe=T.wsize-ge):Oe=T.wnext-ge,ge>T.length&&(ge=T.length),We=T.window}else We=pe,Oe=ie-T.offset,ge=T.length;ge>M&&(ge=M),M-=ge,T.length-=ge;do pe[ie++]=We[Oe++];while(--ge);T.length===0&&(T.mode=ke);break;case Ne:if(M===0)break e;pe[ie++]=T.length,M--,T.mode=ke;break;case Re:if(T.wrap){for(;Y<32;){if(V===0)break e;V--,W|=ce[C++]<<Y,Y+=8}if(we-=M,B.total_out+=we,T.total+=we,we&&(B.adler=T.check=T.flags?(0,_.default)(T.check,pe,we,ie-we):(0,b.default)(T.check,pe,we,ie-we)),we=M,(T.flags?W:ye(W))!==T.check){B.msg="incorrect data check",T.mode=se;break}W=0,Y=0}T.mode=Le;case Le:if(T.wrap&&T.flags){for(;Y<32;){if(V===0)break e;V--,W+=ce[C++]<<Y,Y+=8}if(W!==(T.total&4294967295)){B.msg="incorrect length check",T.mode=se;break}W=0,Y=0}T.mode=oe;case oe:Ye=p;break e;case se:Ye=y;break e;case ee:return g;case me:default:return v}return B.next_out=ie,B.avail_out=M,B.next_in=C,B.avail_in=V,T.hold=W,T.bits=Y,(T.wsize||we!==B.avail_out&&T.mode<se&&(T.mode<Re||te!==t))&&I(B,B.output,B.next_out,we-B.avail_out)?(T.mode=ee,g):(Ae-=B.avail_in,we-=B.avail_out,B.total_in+=Ae,B.total_out+=we,T.total+=we,T.wrap&&we&&(B.adler=T.check=T.flags?(0,_.default)(T.check,pe,we,B.next_out-we):(0,b.default)(T.check,pe,we,B.next_out-we)),B.data_type=T.bits+(T.last?64:0)+(T.mode===K?128:0)+(T.mode===he||T.mode===ne?256:0),(Ae===0&&we===0||te===t)&&Ye===c&&(Ye=w),Ye)}function _e(B){if(!B||!B.state)return v;var te=B.state;return te.window&&(te.window=null),B.state=null,c}function N(B,te){var T;return!B||!B.state||(T=B.state,!(T.wrap&2))?v:(T.head=te,te.done=!1,c)}function Z(B,te){var T=te.length,ce,pe,C;return!B||!B.state||(ce=B.state,ce.wrap!==0&&ce.mode!==P)?v:ce.mode===P&&(pe=1,pe=(0,b.default)(pe,te,T,0),pe!==ce.check)?y:(C=I(B,te,T,T),C?(ce.mode=ee,g):(ce.havedict=1,c))}var q="pako inflate (from Nodeca project)";O.inflateInfo=q},63093:function(Xe,O,o){"use strict";function d(c){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(x){return typeof x}:d=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},d(c)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=l;var m=_(o(35986));function b(){if(typeof WeakMap!="function")return null;var c=new WeakMap;return b=function(){return c},c}function _(c){if(c&&c.__esModule)return c;if(c===null||d(c)!=="object"&&typeof c!="function")return{default:c};var p=b();if(p&&p.has(c))return p.get(c);var x={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in c)if(Object.prototype.hasOwnProperty.call(c,y)){var g=v?Object.getOwnPropertyDescriptor(c,y):null;g&&(g.get||g.set)?Object.defineProperty(x,y,g):x[y]=c[y]}return x.default=c,p&&p.set(c,x),x}var a=15,f=852,h=592,r=0,n=1,s=2,e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],u=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],t=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],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,p,x,v,y,g,w,E){var S=E.bits,k=0,D=0,L=0,z=0,j=0,le=0,U=0,J=0,A=0,P=0,K,$,H,ne,ve,Se=null,He=0,Me,he=new m.Buf16(a+1),ke=new m.Buf16(a+1),Ke=null,Te=0,Ie,De,Ne;for(k=0;k<=a;k++)he[k]=0;for(D=0;D<v;D++)he[p[x+D]]++;for(j=S,z=a;z>=1&&he[z]===0;z--);if(j>z&&(j=z),z===0)return y[g++]=1<<24|64<<16|0,y[g++]=1<<24|64<<16|0,E.bits=1,0;for(L=1;L<z&&he[L]===0;L++);for(j<L&&(j=L),J=1,k=1;k<=a;k++)if(J<<=1,J-=he[k],J<0)return-1;if(J>0&&(c===r||z!==1))return-1;for(ke[1]=0,k=1;k<a;k++)ke[k+1]=ke[k]+he[k];for(D=0;D<v;D++)p[x+D]!==0&&(w[ke[p[x+D]]++]=D);if(c===r?(Se=Ke=w,Me=19):c===n?(Se=e,He-=257,Ke=u,Te-=257,Me=256):(Se=t,Ke=i,Me=-1),P=0,D=0,k=L,ve=g,le=j,U=0,H=-1,A=1<<j,ne=A-1,c===n&&A>f||c===s&&A>h)return 1;for(;;){Ie=k-U,w[D]<Me?(De=0,Ne=w[D]):w[D]>Me?(De=Ke[Te+w[D]],Ne=Se[He+w[D]]):(De=96,Ne=0),K=1<<k-U,$=1<<le,L=$;do $-=K,y[ve+(P>>U)+$]=Ie<<24|De<<16|Ne|0;while($!==0);for(K=1<<k-1;P&K;)K>>=1;if(K!==0?(P&=K-1,P+=K):P=0,D++,--he[k]===0){if(k===z)break;k=p[x+w[D]]}if(k>j&&(P&ne)!==H){for(U===0&&(U=j),ve+=L,le=k-U,J=1<<le;le+U<z&&(J-=he[le+U],!(J<=0));)le++,J<<=1;if(A+=1<<le,c===n&&A>f||c===s&&A>h)return 1;H=P&ne,y[H]=j<<24|le<<16|ve-g|0}}return P!==0&&(y[ve+P]=k-U<<24|64<<16|0),E.bits=j,0}},70892:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var o={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"};O.default=o},55796:function(Xe,O,o){"use strict";function d(I){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(_e){return typeof _e}:d=function(_e){return _e&&typeof Symbol=="function"&&_e.constructor===Symbol&&_e!==Symbol.prototype?"symbol":typeof _e},d(I)}Object.defineProperty(O,"__esModule",{value:!0}),O._tr_init=F,O._tr_stored_block=re,O._tr_flush_block=Ce,O._tr_tally=Fe,O._tr_align=xe;var m=_(o(35986));function b(){if(typeof WeakMap!="function")return null;var I=new WeakMap;return b=function(){return I},I}function _(I){if(I&&I.__esModule)return I;if(I===null||d(I)!=="object"&&typeof I!="function")return{default:I};var de=b();if(de&&de.has(I))return de.get(I);var _e={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Z in I)if(Object.prototype.hasOwnProperty.call(I,Z)){var q=N?Object.getOwnPropertyDescriptor(I,Z):null;q&&(q.get||q.set)?Object.defineProperty(_e,Z,q):_e[Z]=I[Z]}return _e.default=I,de&&de.set(I,_e),_e}var a=4,f=0,h=1,r=2;function n(I){for(var de=I.length;--de>=0;)I[de]=0}var s=0,e=1,u=2,t=3,i=258,l=29,c=256,p=c+1+l,x=30,v=19,y=2*p+1,g=15,w=16,E=7,S=256,k=16,D=17,L=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],j=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],le=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=512,A=new Array((p+2)*2);n(A);var P=new Array(x*2);n(P);var K=new Array(J);n(K);var $=new Array(i-t+1);n($);var H=new Array(l);n(H);var ne=new Array(x);n(ne);function ve(I,de,_e,N,Z){this.static_tree=I,this.extra_bits=de,this.extra_base=_e,this.elems=N,this.max_length=Z,this.has_stree=I&&I.length}var Se,He,Me;function he(I,de){this.dyn_tree=I,this.max_code=0,this.stat_desc=de}function ke(I){return I<256?K[I]:K[256+(I>>>7)]}function Ke(I,de){I.pending_buf[I.pending++]=de&255,I.pending_buf[I.pending++]=de>>>8&255}function Te(I,de,_e){I.bi_valid>w-_e?(I.bi_buf|=de<<I.bi_valid&65535,Ke(I,I.bi_buf),I.bi_buf=de>>w-I.bi_valid,I.bi_valid+=_e-w):(I.bi_buf|=de<<I.bi_valid&65535,I.bi_valid+=_e)}function Ie(I,de,_e){Te(I,_e[de*2],_e[de*2+1])}function De(I,de){var _e=0;do _e|=I&1,I>>>=1,_e<<=1;while(--de>0);return _e>>>1}function Ne(I){I.bi_valid===16?(Ke(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):I.bi_valid>=8&&(I.pending_buf[I.pending++]=I.bi_buf&255,I.bi_buf>>=8,I.bi_valid-=8)}function Re(I,de){var _e=de.dyn_tree,N=de.max_code,Z=de.stat_desc.static_tree,q=de.stat_desc.has_stree,B=de.stat_desc.extra_bits,te=de.stat_desc.extra_base,T=de.stat_desc.max_length,ce,pe,C,ie,V,M,W=0;for(ie=0;ie<=g;ie++)I.bl_count[ie]=0;for(_e[I.heap[I.heap_max]*2+1]=0,ce=I.heap_max+1;ce<y;ce++)pe=I.heap[ce],ie=_e[_e[pe*2+1]*2+1]+1,ie>T&&(ie=T,W++),_e[pe*2+1]=ie,!(pe>N)&&(I.bl_count[ie]++,V=0,pe>=te&&(V=B[pe-te]),M=_e[pe*2],I.opt_len+=M*(ie+V),q&&(I.static_len+=M*(Z[pe*2+1]+V)));if(W!==0){do{for(ie=T-1;I.bl_count[ie]===0;)ie--;I.bl_count[ie]--,I.bl_count[ie+1]+=2,I.bl_count[T]--,W-=2}while(W>0);for(ie=T;ie!==0;ie--)for(pe=I.bl_count[ie];pe!==0;)C=I.heap[--ce],!(C>N)&&(_e[C*2+1]!==ie&&(I.opt_len+=(ie-_e[C*2+1])*_e[C*2],_e[C*2+1]=ie),pe--)}}function Le(I,de,_e){var N=new Array(g+1),Z=0,q,B;for(q=1;q<=g;q++)N[q]=Z=Z+_e[q-1]<<1;for(B=0;B<=de;B++){var te=I[B*2+1];te!==0&&(I[B*2]=De(N[te]++,te))}}function oe(){var I,de,_e,N,Z,q=new Array(g+1);for(_e=0,N=0;N<l-1;N++)for(H[N]=_e,I=0;I<1<<z[N];I++)$[_e++]=N;for($[_e-1]=N,Z=0,N=0;N<16;N++)for(ne[N]=Z,I=0;I<1<<j[N];I++)K[Z++]=N;for(Z>>=7;N<x;N++)for(ne[N]=Z<<7,I=0;I<1<<j[N]-7;I++)K[256+Z++]=N;for(de=0;de<=g;de++)q[de]=0;for(I=0;I<=143;)A[I*2+1]=8,I++,q[8]++;for(;I<=255;)A[I*2+1]=9,I++,q[9]++;for(;I<=279;)A[I*2+1]=7,I++,q[7]++;for(;I<=287;)A[I*2+1]=8,I++,q[8]++;for(Le(A,p+1,q),I=0;I<x;I++)P[I*2+1]=5,P[I*2]=De(I,5);Se=new ve(A,z,c+1,p,g),He=new ve(P,j,0,x,g),Me=new ve(new Array(0),le,0,v,E)}function se(I){var de;for(de=0;de<p;de++)I.dyn_ltree[de*2]=0;for(de=0;de<x;de++)I.dyn_dtree[de*2]=0;for(de=0;de<v;de++)I.bl_tree[de*2]=0;I.dyn_ltree[S*2]=1,I.opt_len=I.static_len=0,I.last_lit=I.matches=0}function ee(I){I.bi_valid>8?Ke(I,I.bi_buf):I.bi_valid>0&&(I.pending_buf[I.pending++]=I.bi_buf),I.bi_buf=0,I.bi_valid=0}function me(I,de,_e,N){ee(I),N&&(Ke(I,_e),Ke(I,~_e)),m.arraySet(I.pending_buf,I.window,de,_e,I.pending),I.pending+=_e}function G(I,de,_e,N){var Z=de*2,q=_e*2;return I[Z]<I[q]||I[Z]===I[q]&&N[de]<=N[_e]}function ae(I,de,_e){for(var N=I.heap[_e],Z=_e<<1;Z<=I.heap_len&&(Z<I.heap_len&&G(de,I.heap[Z+1],I.heap[Z],I.depth)&&Z++,!G(de,N,I.heap[Z],I.depth));)I.heap[_e]=I.heap[Z],_e=Z,Z<<=1;I.heap[_e]=N}function be(I,de,_e){var N,Z,q=0,B,te;if(I.last_lit!==0)do N=I.pending_buf[I.d_buf+q*2]<<8|I.pending_buf[I.d_buf+q*2+1],Z=I.pending_buf[I.l_buf+q],q++,N===0?Ie(I,Z,de):(B=$[Z],Ie(I,B+c+1,de),te=z[B],te!==0&&(Z-=H[B],Te(I,Z,te)),N--,B=ke(N),Ie(I,B,_e),te=j[B],te!==0&&(N-=ne[B],Te(I,N,te)));while(q<I.last_lit);Ie(I,S,de)}function Ee(I,de){var _e=de.dyn_tree,N=de.stat_desc.static_tree,Z=de.stat_desc.has_stree,q=de.stat_desc.elems,B,te,T=-1,ce;for(I.heap_len=0,I.heap_max=y,B=0;B<q;B++)_e[B*2]!==0?(I.heap[++I.heap_len]=T=B,I.depth[B]=0):_e[B*2+1]=0;for(;I.heap_len<2;)ce=I.heap[++I.heap_len]=T<2?++T:0,_e[ce*2]=1,I.depth[ce]=0,I.opt_len--,Z&&(I.static_len-=N[ce*2+1]);for(de.max_code=T,B=I.heap_len>>1;B>=1;B--)ae(I,_e,B);ce=q;do B=I.heap[1],I.heap[1]=I.heap[I.heap_len--],ae(I,_e,1),te=I.heap[1],I.heap[--I.heap_max]=B,I.heap[--I.heap_max]=te,_e[ce*2]=_e[B*2]+_e[te*2],I.depth[ce]=(I.depth[B]>=I.depth[te]?I.depth[B]:I.depth[te])+1,_e[B*2+1]=_e[te*2+1]=ce,I.heap[1]=ce++,ae(I,_e,1);while(I.heap_len>=2);I.heap[--I.heap_max]=I.heap[1],Re(I,de),Le(_e,T,I.bl_count)}function ye(I,de,_e){var N,Z=-1,q,B=de[0*2+1],te=0,T=7,ce=4;for(B===0&&(T=138,ce=3),de[(_e+1)*2+1]=65535,N=0;N<=_e;N++)q=B,B=de[(N+1)*2+1],!(++te<T&&q===B)&&(te<ce?I.bl_tree[q*2]+=te:q!==0?(q!==Z&&I.bl_tree[q*2]++,I.bl_tree[k*2]++):te<=10?I.bl_tree[D*2]++:I.bl_tree[L*2]++,te=0,Z=q,B===0?(T=138,ce=3):q===B?(T=6,ce=3):(T=7,ce=4))}function ue(I,de,_e){var N,Z=-1,q,B=de[0*2+1],te=0,T=7,ce=4;for(B===0&&(T=138,ce=3),N=0;N<=_e;N++)if(q=B,B=de[(N+1)*2+1],!(++te<T&&q===B)){if(te<ce)do Ie(I,q,I.bl_tree);while(--te!==0);else q!==0?(q!==Z&&(Ie(I,q,I.bl_tree),te--),Ie(I,k,I.bl_tree),Te(I,te-3,2)):te<=10?(Ie(I,D,I.bl_tree),Te(I,te-3,3)):(Ie(I,L,I.bl_tree),Te(I,te-11,7));te=0,Z=q,B===0?(T=138,ce=3):q===B?(T=6,ce=3):(T=7,ce=4)}}function fe(I){var de;for(ye(I,I.dyn_ltree,I.l_desc.max_code),ye(I,I.dyn_dtree,I.d_desc.max_code),Ee(I,I.bl_desc),de=v-1;de>=3&&I.bl_tree[U[de]*2+1]===0;de--);return I.opt_len+=3*(de+1)+5+5+4,de}function Q(I,de,_e,N){var Z;for(Te(I,de-257,5),Te(I,_e-1,5),Te(I,N-4,4),Z=0;Z<N;Z++)Te(I,I.bl_tree[U[Z]*2+1],3);ue(I,I.dyn_ltree,de-1),ue(I,I.dyn_dtree,_e-1)}function R(I){var de=4093624447,_e;for(_e=0;_e<=31;_e++,de>>>=1)if(de&1&&I.dyn_ltree[_e*2]!==0)return f;if(I.dyn_ltree[9*2]!==0||I.dyn_ltree[10*2]!==0||I.dyn_ltree[13*2]!==0)return h;for(_e=32;_e<c;_e++)if(I.dyn_ltree[_e*2]!==0)return h;return f}var X=!1;function F(I){X||(oe(),X=!0),I.l_desc=new he(I.dyn_ltree,Se),I.d_desc=new he(I.dyn_dtree,He),I.bl_desc=new he(I.bl_tree,Me),I.bi_buf=0,I.bi_valid=0,se(I)}function re(I,de,_e,N){Te(I,(s<<1)+(N?1:0),3),me(I,de,_e,!0)}function xe(I){Te(I,e<<1,3),Ie(I,S,A),Ne(I)}function Ce(I,de,_e,N){var Z,q,B=0;I.level>0?(I.strm.data_type===r&&(I.strm.data_type=R(I)),Ee(I,I.l_desc),Ee(I,I.d_desc),B=fe(I),Z=I.opt_len+3+7>>>3,q=I.static_len+3+7>>>3,q<=Z&&(Z=q)):Z=q=_e+5,_e+4<=Z&&de!==-1?re(I,de,_e,N):I.strategy===a||q===Z?(Te(I,(e<<1)+(N?1:0),3),be(I,A,P)):(Te(I,(u<<1)+(N?1:0),3),Q(I,I.l_desc.max_code+1,I.d_desc.max_code+1,B+1),be(I,I.dyn_ltree,I.dyn_dtree)),se(I),N&&ee(I)}function Fe(I,de,_e){return I.pending_buf[I.d_buf+I.last_lit*2]=de>>>8&255,I.pending_buf[I.d_buf+I.last_lit*2+1]=de&255,I.pending_buf[I.l_buf+I.last_lit]=_e&255,I.last_lit++,de===0?I.dyn_ltree[_e*2]++:(I.matches++,de--,I.dyn_ltree[($[_e]+c+1)*2]++,I.dyn_dtree[ke(de)*2]++),I.last_lit===I.lit_bufsize-1}},27589:function(Xe,O){"use strict";Object.defineProperty(O,"__esModule",{value:!0}),O.default=o;function o(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},16327:function(Xe,O,o){"use strict";function d(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(t){return typeof t}:d=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(e)}Object.defineProperty(O,"__esModule",{value:!0}),O.default=void 0;var m=_(o(50500));function b(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return b=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(e===null||d(e)!=="object"&&typeof e!="function")return{default:e};var u=b();if(u&&u.has(e))return u.get(e);var t={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var c=i?Object.getOwnPropertyDescriptor(e,l):null;c&&(c.get||c.set)?Object.defineProperty(t,l,c):t[l]=e[l]}return t.default=e,u&&u.set(e,t),t}function a(e,u){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}function f(e,u){for(var t=0;t<u.length;t++){var i=u[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,u,t){return u&&f(e.prototype,u),t&&f(e,t),e}var r=!1,n=40*1024*1024,s=function(){function e(){a(this,e),this._websocket=null,this._rQi=0,this._rQlen=0,this._rQbufferSize=1024*1024*4,this._rQ=null,this._sQbufferSize=1024*10,this._sQlen=0,this._sQ=null,this._eventHandlers={message:function(){},open:function(){},close:function(){},error:function(){}}}return h(e,[{key:"rQpeek8",value:function(){return this._rQ[this._rQi]}},{key:"rQskipBytes",value:function(t){this._rQi+=t}},{key:"rQshift8",value:function(){return this._rQshift(1)}},{key:"rQshift16",value:function(){return this._rQshift(2)}},{key:"rQshift32",value:function(){return this._rQshift(4)}},{key:"_rQshift",value:function(t){for(var i=0,l=t-1;l>=0;l--)i+=this._rQ[this._rQi++]<<l*8;return i}},{key:"rQshiftStr",value:function(t){typeof t=="undefined"&&(t=this.rQlen);for(var i="",l=0;l<t;l+=4096){var c=this.rQshiftBytes(Math.min(4096,t-l));i+=String.fromCharCode.apply(null,c)}return i}},{key:"rQshiftBytes",value:function(t){return typeof t=="undefined"&&(t=this.rQlen),this._rQi+=t,new Uint8Array(this._rQ.buffer,this._rQi-t,t)}},{key:"rQshiftTo",value:function(t,i){i===void 0&&(i=this.rQlen),t.set(new Uint8Array(this._rQ.buffer,this._rQi,i)),this._rQi+=i}},{key:"rQslice",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+t,i-t)}},{key:"rQwait",value:function(t,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(t){this._sQ.set(t,this._sQlen),this._sQlen+=t.length,this.flush()}},{key:"sendString",value:function(t){this.send(t.split("").map(function(i){return i.charCodeAt(0)}))}},{key:"off",value:function(t){this._eventHandlers[t]=function(){}}},{key:"on",value:function(t,i){this._eventHandlers[t]=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(t,i){var l=this;this.init(),this._websocket=new WebSocket(t,i),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){m.Debug(">> WebSock.onopen"),l._websocket.protocol&&m.Info("Server choose sub-protocol: "+l._websocket.protocol),l._eventHandlers.open(),m.Debug("<< WebSock.onopen")},this._websocket.onclose=function(c){m.Debug(">> WebSock.onclose"),l._eventHandlers.close(c),m.Debug("<< WebSock.onclose")},this._websocket.onerror=function(c){m.Debug(">> WebSock.onerror: "+c),l._eventHandlers.error(c),m.Debug("<< WebSock.onerror: "+c)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(m.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(){})}},{key:"_encodeMessage",value:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}},{key:"_expandCompactRQ",value:function(t){var i=(this._rQlen-this._rQi+t)*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<t))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(t){var i=new Uint8Array(t);i.length>this._rQbufferSize-this._rQlen&&this._expandCompactRQ(i.length),this._rQ.set(i,this._rQlen),this._rQlen+=i.length}},{key:"_recvMessage",value:function(t){this._DecodeMessage(t.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):m.Debug("Ignoring empty message")}},{key:"sQ",get:function(){return this._sQ}},{key:"rQ",get:function(){return this._rQ}},{key:"rQi",get:function(){return this._rQi},set:function(t){this._rQi=t}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),e}();O.default=s},66003:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return h}});var d=o(42244),m=o(85899),b=o(43749),_=o(59301),a=["show"];function f(r,n){if(!n.max)return!0;var s=n.strategy(r);return s<=n.max}function h(r,n){return _.useMemo(function(){var s={};n&&(s.show=(0,b.Z)(n)==="object"&&n.formatter?n.formatter:!!n),s=(0,m.Z)((0,m.Z)({},s),r);var e=s,u=e.show,t=(0,d.Z)(e,a);return(0,m.Z)((0,m.Z)({},t),{},{show:!!u,showFormatter:typeof u=="function"?u:void 0,strategy:t.strategy||function(i){return i.length}})},[r,n])}},36901:function(Xe,O,o){"use strict";o.r(O),o.d(O,{BaseInput:function(){return s},default:function(){return y}});var d=o(85899),m=o(60499),b=o(18642),_=o(43749),a=o(92310),f=o.n(a),h=o(59301),r=o(30292),n=h.forwardRef(function(g,w){var E,S,k,D=g.inputElement,L=g.children,z=g.prefixCls,j=g.prefix,le=g.suffix,U=g.addonBefore,J=g.addonAfter,A=g.className,P=g.style,K=g.disabled,$=g.readOnly,H=g.focused,ne=g.triggerFocus,ve=g.allowClear,Se=g.value,He=g.handleReset,Me=g.hidden,he=g.classes,ke=g.classNames,Ke=g.dataAttrs,Te=g.styles,Ie=g.components,De=g.onClear,Ne=L!=null?L:D,Re=(Ie==null?void 0:Ie.affixWrapper)||"span",Le=(Ie==null?void 0:Ie.groupWrapper)||"span",oe=(Ie==null?void 0:Ie.wrapper)||"span",se=(Ie==null?void 0:Ie.groupAddon)||"span",ee=(0,h.useRef)(null),me=function(de){var _e;(_e=ee.current)!==null&&_e!==void 0&&_e.contains(de.target)&&(ne==null||ne())},G=(0,r.X3)(g),ae=(0,h.cloneElement)(Ne,{value:Se,className:f()((E=Ne.props)===null||E===void 0?void 0:E.className,!G&&(ke==null?void 0:ke.variant))||null}),be=(0,h.useRef)(null);if(h.useImperativeHandle(w,function(){return{nativeElement:be.current||ee.current}}),G){var Ee=null;if(ve){var ye=!K&&!$&&Se,ue="".concat(z,"-clear-icon"),fe=(0,_.Z)(ve)==="object"&&ve!==null&&ve!==void 0&&ve.clearIcon?ve.clearIcon:"\u2716";Ee=h.createElement("button",{type:"button",tabIndex:-1,onClick:function(de){He==null||He(de),De==null||De()},onMouseDown:function(de){return de.preventDefault()},className:f()(ue,(0,b.Z)((0,b.Z)({},"".concat(ue,"-hidden"),!ye),"".concat(ue,"-has-suffix"),!!le))},fe)}var Q="".concat(z,"-affix-wrapper"),R=f()(Q,(0,b.Z)((0,b.Z)((0,b.Z)((0,b.Z)((0,b.Z)({},"".concat(z,"-disabled"),K),"".concat(Q,"-disabled"),K),"".concat(Q,"-focused"),H),"".concat(Q,"-readonly"),$),"".concat(Q,"-input-with-clear-btn"),le&&ve&&Se),he==null?void 0:he.affixWrapper,ke==null?void 0:ke.affixWrapper,ke==null?void 0:ke.variant),X=(le||ve)&&h.createElement("span",{className:f()("".concat(z,"-suffix"),ke==null?void 0:ke.suffix),style:Te==null?void 0:Te.suffix},Ee,le);ae=h.createElement(Re,(0,m.Z)({className:R,style:Te==null?void 0:Te.affixWrapper,onClick:me},Ke==null?void 0:Ke.affixWrapper,{ref:ee}),j&&h.createElement("span",{className:f()("".concat(z,"-prefix"),ke==null?void 0:ke.prefix),style:Te==null?void 0:Te.prefix},j),ae,X)}if((0,r.He)(g)){var F="".concat(z,"-group"),re="".concat(F,"-addon"),xe="".concat(F,"-wrapper"),Ce=f()("".concat(z,"-wrapper"),F,he==null?void 0:he.wrapper,ke==null?void 0:ke.wrapper),Fe=f()(xe,(0,b.Z)({},"".concat(xe,"-disabled"),K),he==null?void 0:he.group,ke==null?void 0:ke.groupWrapper);ae=h.createElement(Le,{className:Fe,ref:be},h.createElement(oe,{className:Ce},U&&h.createElement(se,{className:re},U),ae,J&&h.createElement(se,{className:re},J)))}return h.cloneElement(ae,{className:f()((S=ae.props)===null||S===void 0?void 0:S.className,A)||null,style:(0,d.Z)((0,d.Z)({},(k=ae.props)===null||k===void 0?void 0:k.style),P),hidden:Me})}),s=n,e=o(77654),u=o(72190),t=o(42244),i=o(18929),l=o(2738),c=o(66003),p=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],x=(0,h.forwardRef)(function(g,w){var E=g.autoComplete,S=g.onChange,k=g.onFocus,D=g.onBlur,L=g.onPressEnter,z=g.onKeyDown,j=g.onKeyUp,le=g.prefixCls,U=le===void 0?"rc-input":le,J=g.disabled,A=g.htmlSize,P=g.className,K=g.maxLength,$=g.suffix,H=g.showCount,ne=g.count,ve=g.type,Se=ve===void 0?"text":ve,He=g.classes,Me=g.classNames,he=g.styles,ke=g.onCompositionStart,Ke=g.onCompositionEnd,Te=(0,t.Z)(g,p),Ie=(0,h.useState)(!1),De=(0,u.Z)(Ie,2),Ne=De[0],Re=De[1],Le=(0,h.useRef)(!1),oe=(0,h.useRef)(!1),se=(0,h.useRef)(null),ee=(0,h.useRef)(null),me=function(pe){se.current&&(0,r.nH)(se.current,pe)},G=(0,i.Z)(g.defaultValue,{value:g.value}),ae=(0,u.Z)(G,2),be=ae[0],Ee=ae[1],ye=be==null?"":String(be),ue=(0,h.useState)(null),fe=(0,u.Z)(ue,2),Q=fe[0],R=fe[1],X=(0,c.Z)(ne,H),F=X.max||K,re=X.strategy(ye),xe=!!F&&re>F;(0,h.useImperativeHandle)(w,function(){var ce;return{focus:me,blur:function(){var C;(C=se.current)===null||C===void 0||C.blur()},setSelectionRange:function(C,ie,V){var M;(M=se.current)===null||M===void 0||M.setSelectionRange(C,ie,V)},select:function(){var C;(C=se.current)===null||C===void 0||C.select()},input:se.current,nativeElement:((ce=ee.current)===null||ce===void 0?void 0:ce.nativeElement)||se.current}}),(0,h.useEffect)(function(){oe.current&&(oe.current=!1),Re(function(ce){return ce&&J?!1:ce})},[J]);var Ce=function(pe,C,ie){var V=C;if(!Le.current&&X.exceedFormatter&&X.max&&X.strategy(C)>X.max){if(V=X.exceedFormatter(C,{max:X.max}),C!==V){var M,W;R([((M=se.current)===null||M===void 0?void 0:M.selectionStart)||0,((W=se.current)===null||W===void 0?void 0:W.selectionEnd)||0])}}else if(ie.source==="compositionEnd")return;Ee(V),se.current&&(0,r.rJ)(se.current,pe,S,V)};(0,h.useEffect)(function(){if(Q){var ce;(ce=se.current)===null||ce===void 0||ce.setSelectionRange.apply(ce,(0,e.Z)(Q))}},[Q]);var Fe=function(pe){Ce(pe,pe.target.value,{source:"change"})},I=function(pe){Le.current=!1,Ce(pe,pe.currentTarget.value,{source:"compositionEnd"}),Ke==null||Ke(pe)},de=function(pe){L&&pe.key==="Enter"&&!oe.current&&(oe.current=!0,L(pe)),z==null||z(pe)},_e=function(pe){pe.key==="Enter"&&(oe.current=!1),j==null||j(pe)},N=function(pe){Re(!0),k==null||k(pe)},Z=function(pe){oe.current&&(oe.current=!1),Re(!1),D==null||D(pe)},q=function(pe){Ee(""),me(),se.current&&(0,r.rJ)(se.current,pe,S)},B=xe&&"".concat(U,"-out-of-range"),te=function(){var pe=(0,l.Z)(g,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return h.createElement("input",(0,m.Z)({autoComplete:E},pe,{onChange:Fe,onFocus:N,onBlur:Z,onKeyDown:de,onKeyUp:_e,className:f()(U,(0,b.Z)({},"".concat(U,"-disabled"),J),Me==null?void 0:Me.input),style:he==null?void 0:he.input,ref:se,size:A,type:Se,onCompositionStart:function(ie){Le.current=!0,ke==null||ke(ie)},onCompositionEnd:I}))},T=function(){var pe=Number(F)>0;if($||X.show){var C=X.showFormatter?X.showFormatter({value:ye,count:re,maxLength:F}):"".concat(re).concat(pe?" / ".concat(F):"");return h.createElement(h.Fragment,null,X.show&&h.createElement("span",{className:f()("".concat(U,"-show-count-suffix"),(0,b.Z)({},"".concat(U,"-show-count-has-suffix"),!!$),Me==null?void 0:Me.count),style:(0,d.Z)({},he==null?void 0:he.count)},C),$)}return null};return h.createElement(s,(0,m.Z)({},Te,{prefixCls:U,className:f()(P,B),handleReset:q,value:ye,focused:Ne,triggerFocus:me,suffix:T(),disabled:J,classes:He,classNames:Me,styles:he}),te())}),v=x,y=v},30292:function(Xe,O,o){"use strict";o.d(O,{He:function(){return d},X3:function(){return m},nH:function(){return a},rJ:function(){return _}});function d(f){return!!(f.addonBefore||f.addonAfter)}function m(f){return!!(f.prefix||f.suffix||f.allowClear)}function b(f,h,r){var n=h.cloneNode(!0),s=Object.create(f,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof h.selectionStart=="number"&&typeof h.selectionEnd=="number"&&(n.selectionStart=h.selectionStart,n.selectionEnd=h.selectionEnd),n.setSelectionRange=function(){h.setSelectionRange.apply(h,arguments)},s}function _(f,h,r,n){if(r){var s=h;if(h.type==="click"){s=b(h,f,""),r(s);return}if(f.type!=="file"&&n!==void 0){s=b(h,f,n),r(s);return}r(s)}}function a(f,h){if(f){f.focus(h);var r=h||{},n=r.cursor;if(n){var s=f.value.length;switch(n){case"start":f.setSelectionRange(0,0);break;case"end":f.setSelectionRange(s,s);break;default:f.setSelectionRange(0,s)}}}}},29301:function(Xe,O,o){"use strict";o.d(O,{Z:function(){return le}});var d=o(60499),m=o(59301),b=o(11592),_=o(48736),a=o(85899),f=o(43749),h=o(76846),r=o(8654),n=m.createContext(null);function s(U){var J=U.children,A=U.onBatchResize,P=m.useRef(0),K=m.useRef([]),$=m.useContext(n),H=m.useCallback(function(ne,ve,Se){P.current+=1;var He=P.current;K.current.push({size:ne,element:ve,data:Se}),Promise.resolve().then(function(){He===P.current&&(A==null||A(K.current),K.current=[])}),$==null||$(ne,ve,Se)},[A,$]);return m.createElement(n.Provider,{value:H},J)}var e=o(76374),u=new Map;function t(U){U.forEach(function(J){var A,P=J.target;(A=u.get(P))===null||A===void 0||A.forEach(function(K){return K(P)})})}var i=new e.Z(t),l=null,c=null;function p(U,J){u.has(U)||(u.set(U,new Set),i.observe(U)),u.get(U).add(J)}function x(U,J){u.has(U)&&(u.get(U).delete(J),u.get(U).size||(i.unobserve(U),u.delete(U)))}var v=o(38705),y=o(17212),g=o(39153),w=o(55401),E=function(U){(0,g.Z)(A,U);var J=(0,w.Z)(A);function A(){return(0,v.Z)(this,A),J.apply(this,arguments)}return(0,y.Z)(A,[{key:"render",value:function(){return this.props.children}}]),A}(m.Component);function S(U,J){var A=U.children,P=U.disabled,K=m.useRef(null),$=m.useRef(null),H=m.useContext(n),ne=typeof A=="function",ve=ne?A(K):A,Se=m.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),He=!ne&&m.isValidElement(ve)&&(0,r.Yr)(ve),Me=He?(0,r.C4)(ve):null,he=(0,r.x1)(Me,K),ke=function(){var De;return(0,h.ZP)(K.current)||(K.current&&(0,f.Z)(K.current)==="object"?(0,h.ZP)((De=K.current)===null||De===void 0?void 0:De.nativeElement):null)||(0,h.ZP)($.current)};m.useImperativeHandle(J,function(){return ke()});var Ke=m.useRef(U);Ke.current=U;var Te=m.useCallback(function(Ie){var De=Ke.current,Ne=De.onResize,Re=De.data,Le=Ie.getBoundingClientRect(),oe=Le.width,se=Le.height,ee=Ie.offsetWidth,me=Ie.offsetHeight,G=Math.floor(oe),ae=Math.floor(se);if(Se.current.width!==G||Se.current.height!==ae||Se.current.offsetWidth!==ee||Se.current.offsetHeight!==me){var be={width:G,height:ae,offsetWidth:ee,offsetHeight:me};Se.current=be;var Ee=ee===Math.round(oe)?oe:ee,ye=me===Math.round(se)?se:me,ue=(0,a.Z)((0,a.Z)({},be),{},{offsetWidth:Ee,offsetHeight:ye});H==null||H(ue,Ie,Re),Ne&&Promise.resolve().then(function(){Ne(ue,Ie)})}},[]);return m.useEffect(function(){var Ie=ke();return Ie&&!P&&p(Ie,Te),function(){return x(Ie,Te)}},[K.current,P]),m.createElement(E,{ref:$},He?m.cloneElement(ve,{ref:he}):ve)}var k=m.forwardRef(S),D=k,L="rc-observer-key";function z(U,J){var A=U.children,P=typeof A=="function"?[A]:(0,b.Z)(A);return P.map(function(K,$){var H=(K==null?void 0:K.key)||"".concat(L,"-").concat($);return m.createElement(D,(0,d.Z)({},U,{key:H,ref:$===0?J:void 0}),K)})}var j=m.forwardRef(z);j.Collection=s;var le=j},22711:function(Xe,O,o){"use strict";o.r(O),o.d(O,{ResizableTextArea:function(){return j},default:function(){return A}});var d=o(60499),m=o(18642),b=o(85899),_=o(77654),a=o(72190),f=o(42244),h=o(92310),r=o.n(h),n=o(36901),s=o(66003),e=o(30292),u=o(18929),t=o(59301),i=o(43749),l=o(29301),c=o(34280),p=o(16089),x=`
|
|
|
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;
|
|
|
`,v=["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"],y={},g;function w(P){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$=P.getAttribute("id")||P.getAttribute("data-reactid")||P.getAttribute("name");if(K&&y[$])return y[$];var H=window.getComputedStyle(P),ne=H.getPropertyValue("box-sizing")||H.getPropertyValue("-moz-box-sizing")||H.getPropertyValue("-webkit-box-sizing"),ve=parseFloat(H.getPropertyValue("padding-bottom"))+parseFloat(H.getPropertyValue("padding-top")),Se=parseFloat(H.getPropertyValue("border-bottom-width"))+parseFloat(H.getPropertyValue("border-top-width")),He=v.map(function(he){return"".concat(he,":").concat(H.getPropertyValue(he))}).join(";"),Me={sizingStyle:He,paddingSize:ve,borderSize:Se,boxSizing:ne};return K&&$&&(y[$]=Me),Me}function E(P){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;g||(g=document.createElement("textarea"),g.setAttribute("tab-index","-1"),g.setAttribute("aria-hidden","true"),g.setAttribute("name","hiddenTextarea"),document.body.appendChild(g)),P.getAttribute("wrap")?g.setAttribute("wrap",P.getAttribute("wrap")):g.removeAttribute("wrap");var ne=w(P,K),ve=ne.paddingSize,Se=ne.borderSize,He=ne.boxSizing,Me=ne.sizingStyle;g.setAttribute("style","".concat(Me,";").concat(x)),g.value=P.value||P.placeholder||"";var he=void 0,ke=void 0,Ke,Te=g.scrollHeight;if(He==="border-box"?Te+=Se:He==="content-box"&&(Te-=ve),$!==null||H!==null){g.value=" ";var Ie=g.scrollHeight-ve;$!==null&&(he=Ie*$,He==="border-box"&&(he=he+ve+Se),Te=Math.max(he,Te)),H!==null&&(ke=Ie*H,He==="border-box"&&(ke=ke+ve+Se),Ke=Te>ke?"":"hidden",Te=Math.min(ke,Te))}var De={height:Te,overflowY:Ke,resize:"none"};return he&&(De.minHeight=he),ke&&(De.maxHeight=ke),De}var S=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],k=0,D=1,L=2,z=t.forwardRef(function(P,K){var $=P,H=$.prefixCls,ne=$.defaultValue,ve=$.value,Se=$.autoSize,He=$.onResize,Me=$.className,he=$.style,ke=$.disabled,Ke=$.onChange,Te=$.onInternalAutoSize,Ie=(0,f.Z)($,S),De=(0,u.Z)(ne,{value:ve,postState:function(Z){return Z!=null?Z:""}}),Ne=(0,a.Z)(De,2),Re=Ne[0],Le=Ne[1],oe=function(Z){Le(Z.target.value),Ke==null||Ke(Z)},se=t.useRef();t.useImperativeHandle(K,function(){return{textArea:se.current}});var ee=t.useMemo(function(){return Se&&(0,i.Z)(Se)==="object"?[Se.minRows,Se.maxRows]:[]},[Se]),me=(0,a.Z)(ee,2),G=me[0],ae=me[1],be=!!Se,Ee=function(){try{if(document.activeElement===se.current){var Z=se.current,q=Z.selectionStart,B=Z.selectionEnd,te=Z.scrollTop;se.current.setSelectionRange(q,B),se.current.scrollTop=te}}catch(T){}},ye=t.useState(L),ue=(0,a.Z)(ye,2),fe=ue[0],Q=ue[1],R=t.useState(),X=(0,a.Z)(R,2),F=X[0],re=X[1],xe=function(){Q(k)};(0,c.Z)(function(){be&&xe()},[ve,G,ae,be]),(0,c.Z)(function(){if(fe===k)Q(D);else if(fe===D){var N=E(se.current,!1,G,ae);Q(L),re(N)}else Ee()},[fe]);var Ce=t.useRef(),Fe=function(){p.Z.cancel(Ce.current)},I=function(Z){fe===L&&(He==null||He(Z),Se&&(Fe(),Ce.current=(0,p.Z)(function(){xe()})))};t.useEffect(function(){return Fe},[]);var de=be?F:null,_e=(0,b.Z)((0,b.Z)({},he),de);return(fe===k||fe===D)&&(_e.overflowY="hidden",_e.overflowX="hidden"),t.createElement(l.Z,{onResize:I,disabled:!(Se||He)},t.createElement("textarea",(0,d.Z)({},Ie,{ref:se,style:_e,className:r()(H,Me,(0,m.Z)({},"".concat(H,"-disabled"),ke)),disabled:ke,value:Re,onChange:oe})))}),j=z,le=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],U=t.forwardRef(function(P,K){var $,H=P.defaultValue,ne=P.value,ve=P.onFocus,Se=P.onBlur,He=P.onChange,Me=P.allowClear,he=P.maxLength,ke=P.onCompositionStart,Ke=P.onCompositionEnd,Te=P.suffix,Ie=P.prefixCls,De=Ie===void 0?"rc-textarea":Ie,Ne=P.showCount,Re=P.count,Le=P.className,oe=P.style,se=P.disabled,ee=P.hidden,me=P.classNames,G=P.styles,ae=P.onResize,be=P.onClear,Ee=P.onPressEnter,ye=P.readOnly,ue=P.autoSize,fe=P.onKeyDown,Q=(0,f.Z)(P,le),R=(0,u.Z)(H,{value:ne,defaultValue:H}),X=(0,a.Z)(R,2),F=X[0],re=X[1],xe=F==null?"":String(F),Ce=t.useState(!1),Fe=(0,a.Z)(Ce,2),I=Fe[0],de=Fe[1],_e=t.useRef(!1),N=t.useState(null),Z=(0,a.Z)(N,2),q=Z[0],B=Z[1],te=(0,t.useRef)(null),T=(0,t.useRef)(null),ce=function(){var je;return(je=T.current)===null||je===void 0?void 0:je.textArea},pe=function(){ce().focus()};(0,t.useImperativeHandle)(K,function(){var Qe;return{resizableTextArea:T.current,focus:pe,blur:function(){ce().blur()},nativeElement:((Qe=te.current)===null||Qe===void 0?void 0:Qe.nativeElement)||ce()}}),(0,t.useEffect)(function(){de(function(Qe){return!se&&Qe})},[se]);var C=t.useState(null),ie=(0,a.Z)(C,2),V=ie[0],M=ie[1];t.useEffect(function(){if(V){var Qe;(Qe=ce()).setSelectionRange.apply(Qe,(0,_.Z)(V))}},[V]);var W=(0,s.Z)(Re,Ne),Y=($=W.max)!==null&&$!==void 0?$:he,Ae=Number(Y)>0,we=W.strategy(xe),ge=!!Y&&we>Y,Oe=function(je,rt){var at=rt;!_e.current&&W.exceedFormatter&&W.max&&W.strategy(rt)>W.max&&(at=W.exceedFormatter(rt,{max:W.max}),rt!==at&&M([ce().selectionStart||0,ce().selectionEnd||0])),re(at),(0,e.rJ)(je.currentTarget,je,He,at)},We=function(je){_e.current=!0,ke==null||ke(je)},Pe=function(je){_e.current=!1,Oe(je,je.currentTarget.value),Ke==null||Ke(je)},Be=function(je){Oe(je,je.target.value)},$e=function(je){je.key==="Enter"&&Ee&&Ee(je),fe==null||fe(je)},Ze=function(je){de(!0),ve==null||ve(je)},Ve=function(je){de(!1),Se==null||Se(je)},Je=function(je){re(""),pe(),(0,e.rJ)(ce(),je,He)},et=Te,Ue;W.show&&(W.showFormatter?Ue=W.showFormatter({value:xe,count:we,maxLength:Y}):Ue="".concat(we).concat(Ae?" / ".concat(Y):""),et=t.createElement(t.Fragment,null,et,t.createElement("span",{className:r()("".concat(De,"-data-count"),me==null?void 0:me.count),style:G==null?void 0:G.count},Ue)));var Ye=function(je){var rt;ae==null||ae(je),(rt=ce())!==null&&rt!==void 0&&rt.style.height&&B(!0)},qe=!ue&&!Ne&&!Me;return t.createElement(n.BaseInput,{ref:te,value:xe,allowClear:Me,handleReset:Je,suffix:et,prefixCls:De,classNames:(0,b.Z)((0,b.Z)({},me),{},{affixWrapper:r()(me==null?void 0:me.affixWrapper,(0,m.Z)((0,m.Z)({},"".concat(De,"-show-count"),Ne),"".concat(De,"-textarea-allow-clear"),Me))}),disabled:se,focused:I,className:r()(Le,ge&&"".concat(De,"-out-of-range")),style:(0,b.Z)((0,b.Z)({},oe),q&&!qe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ue=="string"?Ue:void 0}},hidden:ee,readOnly:ye,onClear:be},t.createElement(j,(0,d.Z)({},Q,{autoSize:ue,maxLength:he,onKeyDown:$e,onChange:Be,onFocus:Ze,onBlur:Ve,onCompositionStart:We,onCompositionEnd:Pe,className:r()(me==null?void 0:me.textarea),style:(0,b.Z)((0,b.Z)({},G==null?void 0:G.textarea),{},{resize:oe==null?void 0:oe.resize}),disabled:se,prefixCls:De,onResize:Ye,ref:T,readOnly:ye})))}),J=U,A=J},29125:function(Xe,O,o){"use strict";o.d(O,{G:function(){return _},Z:function(){return x}});var d=o(92310),m=o.n(d),b=o(59301);function _(v){var y=v.children,g=v.prefixCls,w=v.id,E=v.overlayInnerStyle,S=v.bodyClassName,k=v.className,D=v.style;return b.createElement("div",{className:m()("".concat(g,"-content"),k),style:D},b.createElement("div",{className:m()("".concat(g,"-inner"),S),id:w,role:"tooltip",style:E},typeof y=="function"?y():y))}var a=o(60499),f=o(85899),h=o(42244),r=o(68196),n={shiftX:64,adjustY:1},s={adjustX:1,shiftY:!0},e=[0,0],u={left:{points:["cr","cl"],overflow:s,offset:[-4,0],targetOffset:e},right:{points:["cl","cr"],overflow:s,offset:[4,0],targetOffset:e},top:{points:["bc","tc"],overflow:n,offset:[0,-4],targetOffset:e},bottom:{points:["tc","bc"],overflow:n,offset:[0,4],targetOffset:e},topLeft:{points:["bl","tl"],overflow:n,offset:[0,-4],targetOffset:e},leftTop:{points:["tr","tl"],overflow:s,offset:[-4,0],targetOffset:e},topRight:{points:["br","tr"],overflow:n,offset:[0,-4],targetOffset:e},rightTop:{points:["tl","tr"],overflow:s,offset:[4,0],targetOffset:e},bottomRight:{points:["tr","br"],overflow:n,offset:[0,4],targetOffset:e},rightBottom:{points:["bl","br"],overflow:s,offset:[4,0],targetOffset:e},bottomLeft:{points:["tl","bl"],overflow:n,offset:[0,4],targetOffset:e},leftBottom:{points:["br","bl"],overflow:s,offset:[-4,0],targetOffset:e}},t=null,i=o(80402),l=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],c=function(y,g){var w=y.overlayClassName,E=y.trigger,S=E===void 0?["hover"]:E,k=y.mouseEnterDelay,D=k===void 0?0:k,L=y.mouseLeaveDelay,z=L===void 0?.1:L,j=y.overlayStyle,le=y.prefixCls,U=le===void 0?"rc-tooltip":le,J=y.children,A=y.onVisibleChange,P=y.afterVisibleChange,K=y.transitionName,$=y.animation,H=y.motion,ne=y.placement,ve=ne===void 0?"right":ne,Se=y.align,He=Se===void 0?{}:Se,Me=y.destroyTooltipOnHide,he=Me===void 0?!1:Me,ke=y.defaultVisible,Ke=y.getTooltipContainer,Te=y.overlayInnerStyle,Ie=y.arrowContent,De=y.overlay,Ne=y.id,Re=y.showArrow,Le=Re===void 0?!0:Re,oe=y.classNames,se=y.styles,ee=(0,h.Z)(y,l),me=(0,i.Z)(Ne),G=(0,b.useRef)(null);(0,b.useImperativeHandle)(g,function(){return G.current});var ae=(0,f.Z)({},ee);"visible"in y&&(ae.popupVisible=y.visible);var be=function(){return b.createElement(_,{key:"content",prefixCls:U,id:me,bodyClassName:oe==null?void 0:oe.body,overlayInnerStyle:(0,f.Z)((0,f.Z)({},Te),se==null?void 0:se.body)},De)},Ee=function(){var ue=b.Children.only(J),fe=(ue==null?void 0:ue.props)||{},Q=(0,f.Z)((0,f.Z)({},fe),{},{"aria-describedby":De?me:null});return b.cloneElement(J,Q)};return b.createElement(r.Z,(0,a.Z)({popupClassName:m()(w,oe==null?void 0:oe.root),prefixCls:U,popup:be,action:S,builtinPlacements:u,popupPlacement:ve,ref:G,popupAlign:He,getPopupContainer:Ke,onPopupVisibleChange:A,afterPopupVisibleChange:P,popupTransitionName:K,popupAnimation:$,popupMotion:H,defaultPopupVisible:ke,autoDestroy:he,mouseLeaveDelay:z,popupStyle:(0,f.Z)((0,f.Z)({},j),se==null?void 0:se.root),mouseEnterDelay:D,arrow:Le},ae),Ee())},p=(0,b.forwardRef)(c),x=p},49658:function(Xe,O){"use strict";O.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var o=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(o)||/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(o==null?void 0:o.substr(0,4))}},76374:function(Xe,O,o){"use strict";var d=function(){if(typeof Map!="undefined")return Map;function le(U,J){var A=-1;return U.some(function(P,K){return P[0]===J?(A=K,!0):!1}),A}return function(){function U(){this.__entries__=[]}return Object.defineProperty(U.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),U.prototype.get=function(J){var A=le(this.__entries__,J),P=this.__entries__[A];return P&&P[1]},U.prototype.set=function(J,A){var P=le(this.__entries__,J);~P?this.__entries__[P][1]=A:this.__entries__.push([J,A])},U.prototype.delete=function(J){var A=this.__entries__,P=le(A,J);~P&&A.splice(P,1)},U.prototype.has=function(J){return!!~le(this.__entries__,J)},U.prototype.clear=function(){this.__entries__.splice(0)},U.prototype.forEach=function(J,A){A===void 0&&(A=null);for(var P=0,K=this.__entries__;P<K.length;P++){var $=K[P];J.call(A,$[1],$[0])}},U}()}(),m=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,b=function(){return typeof o.g!="undefined"&&o.g.Math===Math?o.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),_=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(b):function(le){return setTimeout(function(){return le(Date.now())},1e3/60)}}(),a=2;function f(le,U){var J=!1,A=!1,P=0;function K(){J&&(J=!1,le()),A&&H()}function $(){_(K)}function H(){var ne=Date.now();if(J){if(ne-P<a)return;A=!0}else J=!0,A=!1,setTimeout($,U);P=ne}return H}var h=20,r=["top","right","bottom","left","width","height","size","weight"],n=typeof MutationObserver!="undefined",s=function(){function le(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=f(this.refresh.bind(this),h)}return le.prototype.addObserver=function(U){~this.observers_.indexOf(U)||this.observers_.push(U),this.connected_||this.connect_()},le.prototype.removeObserver=function(U){var J=this.observers_,A=J.indexOf(U);~A&&J.splice(A,1),!J.length&&this.connected_&&this.disconnect_()},le.prototype.refresh=function(){var U=this.updateObservers_();U&&this.refresh()},le.prototype.updateObservers_=function(){var U=this.observers_.filter(function(J){return J.gatherActive(),J.hasActive()});return U.forEach(function(J){return J.broadcastActive()}),U.length>0},le.prototype.connect_=function(){!m||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)},le.prototype.disconnect_=function(){!m||!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)},le.prototype.onTransitionEnd_=function(U){var J=U.propertyName,A=J===void 0?"":J,P=r.some(function(K){return!!~A.indexOf(K)});P&&this.refresh()},le.getInstance=function(){return this.instance_||(this.instance_=new le),this.instance_},le.instance_=null,le}(),e=function(le,U){for(var J=0,A=Object.keys(U);J<A.length;J++){var P=A[J];Object.defineProperty(le,P,{value:U[P],enumerable:!1,writable:!1,configurable:!0})}return le},u=function(le){var U=le&&le.ownerDocument&&le.ownerDocument.defaultView;return U||b},t=E(0,0,0,0);function i(le){return parseFloat(le)||0}function l(le){for(var U=[],J=1;J<arguments.length;J++)U[J-1]=arguments[J];return U.reduce(function(A,P){var K=le["border-"+P+"-width"];return A+i(K)},0)}function c(le){for(var U=["top","right","bottom","left"],J={},A=0,P=U;A<P.length;A++){var K=P[A],$=le["padding-"+K];J[K]=i($)}return J}function p(le){var U=le.getBBox();return E(0,0,U.width,U.height)}function x(le){var U=le.clientWidth,J=le.clientHeight;if(!U&&!J)return t;var A=u(le).getComputedStyle(le),P=c(A),K=P.left+P.right,$=P.top+P.bottom,H=i(A.width),ne=i(A.height);if(A.boxSizing==="border-box"&&(Math.round(H+K)!==U&&(H-=l(A,"left","right")+K),Math.round(ne+$)!==J&&(ne-=l(A,"top","bottom")+$)),!y(le)){var ve=Math.round(H+K)-U,Se=Math.round(ne+$)-J;Math.abs(ve)!==1&&(H-=ve),Math.abs(Se)!==1&&(ne-=Se)}return E(P.left,P.top,H,ne)}var v=function(){return typeof SVGGraphicsElement!="undefined"?function(le){return le instanceof u(le).SVGGraphicsElement}:function(le){return le instanceof u(le).SVGElement&&typeof le.getBBox=="function"}}();function y(le){return le===u(le).document.documentElement}function g(le){return m?v(le)?p(le):x(le):t}function w(le){var U=le.x,J=le.y,A=le.width,P=le.height,K=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,$=Object.create(K.prototype);return e($,{x:U,y:J,width:A,height:P,top:J,right:U+A,bottom:P+J,left:U}),$}function E(le,U,J,A){return{x:le,y:U,width:J,height:A}}var S=function(){function le(U){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=E(0,0,0,0),this.target=U}return le.prototype.isActive=function(){var U=g(this.target);return this.contentRect_=U,U.width!==this.broadcastWidth||U.height!==this.broadcastHeight},le.prototype.broadcastRect=function(){var U=this.contentRect_;return this.broadcastWidth=U.width,this.broadcastHeight=U.height,U},le}(),k=function(){function le(U,J){var A=w(J);e(this,{target:U,contentRect:A})}return le}(),D=function(){function le(U,J,A){if(this.activeObservations_=[],this.observations_=new d,typeof U!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=U,this.controller_=J,this.callbackCtx_=A}return le.prototype.observe=function(U){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(U instanceof u(U).Element))throw new TypeError('parameter 1 is not of type "Element".');var J=this.observations_;J.has(U)||(J.set(U,new S(U)),this.controller_.addObserver(this),this.controller_.refresh())}},le.prototype.unobserve=function(U){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(U instanceof u(U).Element))throw new TypeError('parameter 1 is not of type "Element".');var J=this.observations_;J.has(U)&&(J.delete(U),J.size||this.controller_.removeObserver(this))}},le.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},le.prototype.gatherActive=function(){var U=this;this.clearActive(),this.observations_.forEach(function(J){J.isActive()&&U.activeObservations_.push(J)})},le.prototype.broadcastActive=function(){if(this.hasActive()){var U=this.callbackCtx_,J=this.activeObservations_.map(function(A){return new k(A.target,A.broadcastRect())});this.callback_.call(U,J,U),this.clearActive()}},le.prototype.clearActive=function(){this.activeObservations_.splice(0)},le.prototype.hasActive=function(){return this.activeObservations_.length>0},le}(),L=typeof WeakMap!="undefined"?new WeakMap:new d,z=function(){function le(U){if(!(this instanceof le))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var J=s.getInstance(),A=new D(U,J,this);L.set(this,A)}return le}();["observe","unobserve","disconnect"].forEach(function(le){z.prototype[le]=function(){var U;return(U=L.get(this))[le].apply(U,arguments)}});var j=function(){return typeof b.ResizeObserver!="undefined"?b.ResizeObserver:z}();O.Z=j},34376:function(Xe){(function(O,o){if(1)Xe.exports=o();else var d,m})(window,function(){return function(O){var o={};function d(m){if(o[m])return o[m].exports;var b=o[m]={i:m,l:!1,exports:{}};return O[m].call(b.exports,b,b.exports,d),b.l=!0,b.exports}return d.m=O,d.c=o,d.d=function(m,b,_){d.o(m,b)||Object.defineProperty(m,b,{enumerable:!0,get:_})},d.r=function(m){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},d.t=function(m,b){if(1&b&&(m=d(m)),8&b||4&b&&typeof m=="object"&&m&&m.__esModule)return m;var _=Object.create(null);if(d.r(_),Object.defineProperty(_,"default",{enumerable:!0,value:m}),2&b&&typeof m!="string")for(var a in m)d.d(_,a,function(f){return m[f]}.bind(null,a));return _},d.n=function(m){var b=m&&m.__esModule?function(){return m.default}:function(){return m};return d.d(b,"a",b),b},d.o=function(m,b){return Object.prototype.hasOwnProperty.call(m,b)},d.p="",d(d.s=34)}([function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.forwardEvent=o.EventEmitter=void 0;var m=function(){function b(){this._listeners=[],this._disposed=!1}return Object.defineProperty(b.prototype,"event",{get:function(){var _=this;return this._event||(this._event=function(a){return _._listeners.push(a),{dispose:function(){if(!_._disposed){for(var f=0;f<_._listeners.length;f++)if(_._listeners[f]===a)return void _._listeners.splice(f,1)}}}}),this._event},enumerable:!1,configurable:!0}),b.prototype.fire=function(_,a){for(var f=[],h=0;h<this._listeners.length;h++)f.push(this._listeners[h]);for(h=0;h<f.length;h++)f[h].call(void 0,_,a)},b.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},b}();o.EventEmitter=m,o.forwardEvent=function(b,_){return b(function(a){return _.fire(a)})}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.IUnicodeService=o.IOptionsService=o.ILogService=o.IInstantiationService=o.IDirtyRowService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;var m=d(14);o.IBufferService=m.createDecorator("BufferService"),o.ICoreMouseService=m.createDecorator("CoreMouseService"),o.ICoreService=m.createDecorator("CoreService"),o.ICharsetService=m.createDecorator("CharsetService"),o.IDirtyRowService=m.createDecorator("DirtyRowService"),o.IInstantiationService=m.createDecorator("InstantiationService"),o.ILogService=m.createDecorator("LogService"),o.IOptionsService=m.createDecorator("OptionsService"),o.IUnicodeService=m.createDecorator("UnicodeService")},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.Disposable=void 0;var m=function(){function _(){this._disposables=[],this._isDisposed=!1}return _.prototype.dispose=function(){this._isDisposed=!0;for(var a=0,f=this._disposables;a<f.length;a++)f[a].dispose();this._disposables.length=0},_.prototype.register=function(a){return this._disposables.push(a),a},_.prototype.unregister=function(a){var f=this._disposables.indexOf(a);f!==-1&&this._disposables.splice(f,1)},_}();function b(_){for(var a=0,f=_;a<f.length;a++)f[a].dispose();_.length=0}o.Disposable=m,o.disposeArray=b,o.getDisposeArrayDisposable=function(_){return{dispose:function(){return b(_)}}}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=256,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(r,n){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,e){s.__proto__=e}||function(s,e){for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u])})(r,n)},function(r,n){function s(){this.constructor=r}m(r,n),r.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)});Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;var _=d(8),a=d(3),f=d(6),h=function(r){function n(){var s=r!==null&&r.apply(this,arguments)||this;return s.content=0,s.fg=0,s.bg=0,s.extended=new f.ExtendedAttrs,s.combinedData="",s}return b(n,r),n.fromCharData=function(s){var e=new n;return e.setFromCharData(s),e},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?_.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(s){this.fg=s[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var e=!1;if(s[a.CHAR_DATA_CHAR_INDEX].length>2)e=!0;else if(s[a.CHAR_DATA_CHAR_INDEX].length===2){var u=s[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=u&&u<=56319){var t=s[a.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=t&&t<=57343?this.content=1024*(u-55296)+t-56320+65536|s[a.CHAR_DATA_WIDTH_INDEX]<<22:e=!0}else e=!0}else this.content=s[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[a.CHAR_DATA_WIDTH_INDEX]<<22;e&&(this.combinedData=s[a.CHAR_DATA_CHAR_INDEX],this.content=2097152|s[a.CHAR_DATA_WIDTH_INDEX]<<22)},n.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},n}(f.AttributeData);o.CellData=h},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ISoundService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;var m=d(14);o.ICharSizeService=m.createDecorator("CharSizeService"),o.ICoreBrowserService=m.createDecorator("CoreBrowserService"),o.IMouseService=m.createDecorator("MouseService"),o.IRenderService=m.createDecorator("RenderService"),o.ISelectionService=m.createDecorator("SelectionService"),o.ISoundService=m.createDecorator("SoundService")},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;var m=function(){function _(){this.fg=0,this.bg=0,this.extended=new b}return _.toColorRGB=function(a){return[a>>>16&255,a>>>8&255,255&a]},_.fromColorRGB=function(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]},_.prototype.clone=function(){var a=new _;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a},_.prototype.isInverse=function(){return 67108864&this.fg},_.prototype.isBold=function(){return 134217728&this.fg},_.prototype.isUnderline=function(){return 268435456&this.fg},_.prototype.isBlink=function(){return 536870912&this.fg},_.prototype.isInvisible=function(){return 1073741824&this.fg},_.prototype.isItalic=function(){return 67108864&this.bg},_.prototype.isDim=function(){return 134217728&this.bg},_.prototype.getFgColorMode=function(){return 50331648&this.fg},_.prototype.getBgColorMode=function(){return 50331648&this.bg},_.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},_.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},_.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},_.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},_.prototype.isFgDefault=function(){return(50331648&this.fg)==0},_.prototype.isBgDefault=function(){return(50331648&this.bg)==0},_.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},_.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},_.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},_.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},_.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},_.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},_.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},_.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},_.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},_.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},_.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},_}();o.AttributeData=m;var b=function(){function _(a,f){a===void 0&&(a=0),f===void 0&&(f=-1),this.underlineStyle=a,this.underlineColor=f}return _.prototype.clone=function(){return new _(this.underlineStyle,this.underlineColor)},_.prototype.isEmpty=function(){return this.underlineStyle===0},_}();o.ExtendedAttrs=b},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(m,b,_,a){m.addEventListener(b,_,a);var f=!1;return{dispose:function(){f||(f=!0,m.removeEventListener(b,_,a))}}}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(_){return _>65535?(_-=65536,String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):String.fromCharCode(_)},o.utf32ToString=function(_,a,f){a===void 0&&(a=0),f===void 0&&(f=_.length);for(var h="",r=a;r<f;++r){var n=_[r];n>65535?(n-=65536,h+=String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):h+=String.fromCharCode(n)}return h};var m=function(){function _(){this._interim=0}return _.prototype.clear=function(){this._interim=0},_.prototype.decode=function(a,f){var h=a.length;if(!h)return 0;var r=0,n=0;this._interim&&(56320<=(u=a.charCodeAt(n++))&&u<=57343?f[r++]=1024*(this._interim-55296)+u-56320+65536:(f[r++]=this._interim,f[r++]=u),this._interim=0);for(var s=n;s<h;++s){var e=a.charCodeAt(s);if(55296<=e&&e<=56319){if(++s>=h)return this._interim=e,r;var u;56320<=(u=a.charCodeAt(s))&&u<=57343?f[r++]=1024*(e-55296)+u-56320+65536:(f[r++]=e,f[r++]=u)}else f[r++]=e}return r},_}();o.StringToUtf32=m;var b=function(){function _(){this.interim=new Uint8Array(3)}return _.prototype.clear=function(){this.interim.fill(0)},_.prototype.decode=function(a,f){var h=a.length;if(!h)return 0;var r,n,s,e,u=0,t=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 p=0,x=void 0;(x=63&this.interim[++p])&&p<4;)c<<=6,c|=x;for(var v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,y=v-p;i<y;){if(i>=h)return 0;if((192&(x=a[i++]))!=128){i--,l=!0;break}this.interim[p++]=x,c<<=6,c|=63&x}l||(v===2?c<128?i--:f[u++]=c:v===3?c<2048||c>=55296&&c<=57343||(f[u++]=c):c<65536||c>1114111||(f[u++]=c)),this.interim.fill(0)}for(var g=h-4,w=i;w<h;){for(;!(!(w<g)||128&(r=a[w])||128&(n=a[w+1])||128&(s=a[w+2])||128&(e=a[w+3]));)f[u++]=r,f[u++]=n,f[u++]=s,f[u++]=e,w+=4;if((r=a[w++])<128)f[u++]=r;else if((224&r)==192){if(w>=h)return this.interim[0]=r,u;if((192&(n=a[w++]))!=128){w--;continue}if((t=(31&r)<<6|63&n)<128){w--;continue}f[u++]=t}else if((240&r)==224){if(w>=h)return this.interim[0]=r,u;if((192&(n=a[w++]))!=128){w--;continue}if(w>=h)return this.interim[0]=r,this.interim[1]=n,u;if((192&(s=a[w++]))!=128){w--;continue}if((t=(15&r)<<12|(63&n)<<6|63&s)<2048||t>=55296&&t<=57343)continue;f[u++]=t}else if((248&r)==240){if(w>=h)return this.interim[0]=r,u;if((192&(n=a[w++]))!=128){w--;continue}if(w>=h)return this.interim[0]=r,this.interim[1]=n,u;if((192&(s=a[w++]))!=128){w--;continue}if(w>=h)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=s,u;if((192&(e=a[w++]))!=128){w--;continue}if((t=(7&r)<<18|(63&n)<<12|(63&s)<<6|63&e)<65536||t>1114111)continue;f[u++]=t}}return u},_}();o.Utf8ToUtf32=b},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CHAR_ATLAS_CELL_SPACING=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0,o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.CHAR_ATLAS_CELL_SPACING=1},function(O,o,d){"use strict";var m,b,_,a;function f(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(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=void 0,function(r){r.toCss=function(n,s,e,u){return u!==void 0?"#"+f(n)+f(s)+f(e)+f(u):"#"+f(n)+f(s)+f(e)},r.toRgba=function(n,s,e,u){return u===void 0&&(u=255),(n<<24|s<<16|e<<8|u)>>>0}}(m=o.channels||(o.channels={})),(b=o.color||(o.color={})).blend=function(r,n){var s=(255&n.rgba)/255;if(s===1)return{css:n.css,rgba:n.rgba};var e=n.rgba>>24&255,u=n.rgba>>16&255,t=n.rgba>>8&255,i=r.rgba>>24&255,l=r.rgba>>16&255,c=r.rgba>>8&255,p=i+Math.round((e-i)*s),x=l+Math.round((u-l)*s),v=c+Math.round((t-c)*s);return{css:m.toCss(p,x,v),rgba:m.toRgba(p,x,v)}},b.isOpaque=function(r){return(255&r.rgba)==255},b.ensureContrastRatio=function(r,n,s){var e=a.ensureContrastRatio(r.rgba,n.rgba,s);if(e)return a.toColor(e>>24&255,e>>16&255,e>>8&255)},b.opaque=function(r){var n=(255|r.rgba)>>>0,s=a.toChannels(n),e=s[0],u=s[1],t=s[2];return{css:m.toCss(e,u,t),rgba:n}},b.opacity=function(r,n){var s=Math.round(255*n),e=a.toChannels(r.rgba),u=e[0],t=e[1],i=e[2];return{css:m.toCss(u,t,i,s),rgba:m.toRgba(u,t,i,s)}},(o.css||(o.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(s,e,u){var t=s/255,i=e/255,l=u/255;return .2126*(t<=.03928?t/12.92:Math.pow((t+.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(s){return n(s>>16&255,s>>8&255,255&s)},r.relativeLuminance2=n}(_=o.rgb||(o.rgb={})),function(r){function n(e,u,t){for(var i=e>>24&255,l=e>>16&255,c=e>>8&255,p=u>>24&255,x=u>>16&255,v=u>>8&255,y=h(_.relativeLuminance2(p,v,x),_.relativeLuminance2(i,l,c));y<t&&(p>0||x>0||v>0);)p-=Math.max(0,Math.ceil(.1*p)),x-=Math.max(0,Math.ceil(.1*x)),v-=Math.max(0,Math.ceil(.1*v)),y=h(_.relativeLuminance2(p,v,x),_.relativeLuminance2(i,l,c));return(p<<24|x<<16|v<<8|255)>>>0}function s(e,u,t){for(var i=e>>24&255,l=e>>16&255,c=e>>8&255,p=u>>24&255,x=u>>16&255,v=u>>8&255,y=h(_.relativeLuminance2(p,v,x),_.relativeLuminance2(i,l,c));y<t&&(p<255||x<255||v<255);)p=Math.min(255,p+Math.ceil(.1*(255-p))),x=Math.min(255,x+Math.ceil(.1*(255-x))),v=Math.min(255,v+Math.ceil(.1*(255-v))),y=h(_.relativeLuminance2(p,v,x),_.relativeLuminance2(i,l,c));return(p<<24|x<<16|v<<8|255)>>>0}r.ensureContrastRatio=function(e,u,t){var i=_.relativeLuminance(e>>8),l=_.relativeLuminance(u>>8);if(h(i,l)<t)return l<i?n(e,u,t):s(e,u,t)},r.reduceLuminance=n,r.increaseLuminance=s,r.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},r.toColor=function(e,u,t){return{css:m.toCss(e,u,t),rgba:m.toRgba(e,u,t)}}}(a=o.rgba||(o.rgba={})),o.toPaddedHex=f,o.contrastRatio=h},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.isSafari=o.isFirefox=void 0;var m=typeof navigator=="undefined",b=m?"node":navigator.userAgent,_=m?"node":navigator.platform;function a(f,h){return f.indexOf(h)>=0}o.isFirefox=!!~b.indexOf("Firefox"),o.isSafari=/^((?!chrome|android).)*safari/i.test(b),o.isMac=a(["Macintosh","MacIntel","MacPPC","Mac68K"],_),o.isIpad=_==="iPad",o.isIphone=_==="iPhone",o.isWindows=a(["Windows","Win16","Win32","WinCE"],_),o.isLinux=_.indexOf("Linux")>=0},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.C1=o.C0=void 0,function(m){m.NUL="\0",m.SOH="",m.STX="",m.ETX="",m.EOT="",m.ENQ="",m.ACK="",m.BEL="\x07",m.BS="\b",m.HT=" ",m.LF=`
|
|
|
`,m.VT="\v",m.FF="\f",m.CR="\r",m.SO="",m.SI="",m.DLE="",m.DC1="",m.DC2="",m.DC3="",m.DC4="",m.NAK="",m.SYN="",m.ETB="",m.CAN="",m.EM="",m.SUB="",m.ESC="\x1B",m.FS="",m.GS="",m.RS="",m.US="",m.SP=" ",m.DEL="\x7F"}(o.C0||(o.C0={})),function(m){m.PAD="\x80",m.HOP="\x81",m.BPH="\x82",m.NBH="\x83",m.IND="\x84",m.NEL="\x85",m.SSA="\x86",m.ESA="\x87",m.HTS="\x88",m.HTJ="\x89",m.VTS="\x8A",m.PLD="\x8B",m.PLU="\x8C",m.RI="\x8D",m.SS2="\x8E",m.SS3="\x8F",m.DCS="\x90",m.PU1="\x91",m.PU2="\x92",m.STS="\x93",m.CCH="\x94",m.MW="\x95",m.SPA="\x96",m.EPA="\x97",m.SOS="\x98",m.SGCI="\x99",m.SCI="\x9A",m.CSI="\x9B",m.ST="\x9C",m.OSC="\x9D",m.PM="\x9E",m.APC="\x9F"}(o.C1||(o.C1={}))},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BaseRenderLayer=void 0;var m=d(3),b=d(9),_=d(25),a=d(6),f=d(28),h=d(10),r=d(17),n=function(){function s(e,u,t,i,l,c,p,x){this._container=e,this._alpha=i,this._colors=l,this._rendererId=c,this._bufferService=p,this._optionsService=x,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-"+u+"-layer"),this._canvas.style.zIndex=t.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return s.prototype.dispose=function(){var e;r.removeElementFromParent(this._canvas),(e=this._charAtlas)===null||e===void 0||e.dispose()},s.prototype._initCanvas=function(){this._ctx=f.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},s.prototype.onOptionsChanged=function(){},s.prototype.onBlur=function(){},s.prototype.onFocus=function(){},s.prototype.onCursorMove=function(){},s.prototype.onGridChanged=function(e,u){},s.prototype.onSelectionChanged=function(e,u,t){t===void 0&&(t=!1)},s.prototype.setColors=function(e){this._refreshCharAtlas(e)},s.prototype._setTransparency=function(e){if(e!==this._alpha){var u=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,u),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},s.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=_.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},s.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},s.prototype._fillCells=function(e,u,t,i){this._ctx.fillRect(e*this._scaledCellWidth,u*this._scaledCellHeight,t*this._scaledCellWidth,i*this._scaledCellHeight)},s.prototype._fillBottomLineAtCells=function(e,u,t){t===void 0&&(t=1),this._ctx.fillRect(e*this._scaledCellWidth,(u+1)*this._scaledCellHeight-window.devicePixelRatio-1,t*this._scaledCellWidth,window.devicePixelRatio)},s.prototype._fillLeftLineAtCell=function(e,u,t){this._ctx.fillRect(e*this._scaledCellWidth,u*this._scaledCellHeight,window.devicePixelRatio*t,this._scaledCellHeight)},s.prototype._strokeRectAtCell=function(e,u,t,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,u*this._scaledCellHeight+window.devicePixelRatio/2,t*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},s.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},s.prototype._clearCells=function(e,u,t,i){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,u*this._scaledCellHeight,t*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,u*this._scaledCellHeight,t*this._scaledCellWidth,i*this._scaledCellHeight))},s.prototype._fillCharTrueColor=function(e,u,t){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(t),this._ctx.fillText(e.getChars(),u*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},s.prototype._drawChars=function(e,u,t){var i,l,c=this._getContrastColor(e);c||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,u,t,c):(e.isInverse()?(i=e.isBgDefault()?b.INVERTED_DEFAULT_COLOR:e.getBgColor(),l=e.isFgDefault()?b.INVERTED_DEFAULT_COLOR:e.getFgColor()):(l=e.isBgDefault()?m.DEFAULT_COLOR:e.getBgColor(),i=e.isFgDefault()?m.DEFAULT_COLOR:e.getFgColor()),i+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&i<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||m.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||m.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=l,this._currentGlyphIdentifier.fg=i,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,u*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,u,t))},s.prototype._drawUncachedChars=function(e,u,t,i){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse())if(i)this._ctx.fillStyle=i.css;else if(e.isBgDefault())this._ctx.fillStyle=h.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var l=e.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&l<8&&(l+=8),this._ctx.fillStyle=this._colors.ansi[l].css}else if(i)this._ctx.fillStyle=i.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var c=e.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}this._clipRow(t),e.isDim()&&(this._ctx.globalAlpha=b.DIM_OPACITY),this._ctx.fillText(e.getChars(),u*this._scaledCellWidth+this._scaledCharLeft,t*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},s.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},s.prototype._getFont=function(e,u){return(u?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},s.prototype._getContrastColor=function(e){if(this._optionsService.options.minimumContrastRatio!==1){var u=this._colors.contrastCache.getColor(e.bg,e.fg);if(u!==void 0)return u||void 0;var t=e.getFgColor(),i=e.getFgColorMode(),l=e.getBgColor(),c=e.getBgColorMode(),p=!!e.isInverse(),x=!!e.isInverse();if(p){var v=t;t=l,l=v;var y=i;i=c,c=y}var g=this._resolveBackgroundRgba(c,l,p),w=this._resolveForegroundRgba(i,t,p,x),E=h.rgba.ensureContrastRatio(g,w,this._optionsService.options.minimumContrastRatio);if(E){var S={css:h.channels.toCss(E>>24&255,E>>16&255,E>>8&255),rgba:E};return this._colors.contrastCache.setColor(e.bg,e.fg,S),S}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},s.prototype._resolveBackgroundRgba=function(e,u,t){switch(e){case 16777216:case 33554432:return this._colors.ansi[u].rgba;case 50331648:return u<<8;case 0:default:return t?this._colors.foreground.rgba:this._colors.background.rgba}},s.prototype._resolveForegroundRgba=function(e,u,t,i){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&i&&u<8&&(u+=8),this._colors.ansi[u].rgba;case 50331648:return u<<8;case 0:default:return t?this._colors.background.rgba:this._colors.foreground.rgba}},s}();o.BaseRenderLayer=n},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;function m(b,_,a){_.di$target===_?_.di$dependencies.push({id:b,index:a}):(_.di$dependencies=[{id:b,index:a}],_.di$target=_)}o.serviceRegistry=new Map,o.getServiceDependencies=function(b){return b.di$dependencies||[]},o.createDecorator=function(b){if(o.serviceRegistry.has(b))return o.serviceRegistry.get(b);var _=function(a,f,h){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");m(_,a,h)};return _.toString=function(){return b},o.serviceRegistry.set(b,_),_}},function(O,o,d){"use strict";function m(b,_,a,f){if(a===void 0&&(a=0),f===void 0&&(f=b.length),a>=b.length)return b;a=(b.length+a)%b.length,f=f>=b.length?b.length:(b.length+f)%b.length;for(var h=a;h<f;++h)b[h]=_;return b}Object.defineProperty(o,"__esModule",{value:!0}),o.concat=o.fillFallback=o.fill=void 0,o.fill=function(b,_,a,f){return b.fill?b.fill(_,a,f):m(b,_,a,f)},o.fillFallback=m,o.concat=function(b,_){var a=new b.constructor(b.length+_.length);return a.set(b),a.set(_,b.length),a}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;var m=d(8),b=d(3),_=d(4),a=d(6);o.DEFAULT_ATTR_DATA=Object.freeze(new a.AttributeData);var f=function(){function h(r,n,s){s===void 0&&(s=!1),this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);for(var e=n||_.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),u=0;u<r;++u)this.setCell(u,e);this.length=r}return h.prototype.get=function(r){var n=this._data[3*r+0],s=2097151&n;return[this._data[3*r+1],2097152&n?this._combined[r]:s?m.stringFromCodePoint(s):"",n>>22,2097152&n?this._combined[r].charCodeAt(this._combined[r].length-1):s]},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?m.stringFromCodePoint(2097151&n):""},h.prototype.loadCell=function(r,n){var s=3*r;return n.content=this._data[s+0],n.fg=this._data[s+1],n.bg=this._data[s+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,s,e,u,t){268435456&u&&(this._extendedAttrs[r]=t),this._data[3*r+0]=n|s<<22,this._data[3*r+1]=e,this._data[3*r+2]=u},h.prototype.addCodepointToCell=function(r,n){var s=this._data[3*r+0];2097152&s?this._combined[r]+=m.stringFromCodePoint(n):(2097151&s?(this._combined[r]=m.stringFromCodePoint(2097151&s)+m.stringFromCodePoint(n),s&=-2097152,s|=2097152):s=n|1<<22,this._data[3*r+0]=s)},h.prototype.insertCells=function(r,n,s,e){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new a.ExtendedAttrs),n<this.length-r){for(var u=new _.CellData,t=this.length-r-n-1;t>=0;--t)this.setCell(r+n+t,this.loadCell(r+t,u));for(t=0;t<n;++t)this.setCell(r+t,s)}else for(t=r;t<this.length;++t)this.setCell(t,s);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new a.ExtendedAttrs)},h.prototype.deleteCells=function(r,n,s,e){if(r%=this.length,n<this.length-r){for(var u=new _.CellData,t=0;t<this.length-r-n;++t)this.setCell(r+t,this.loadCell(r+n+t,u));for(t=this.length-n;t<this.length;++t)this.setCell(t,s)}else for(t=r;t<this.length;++t)this.setCell(t,s);r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new a.ExtendedAttrs),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodePoint(r,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new a.ExtendedAttrs)},h.prototype.replaceCells=function(r,n,s,e){for(r&&this.getWidth(r-1)===2&&this.setCellFromCodePoint(r-1,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new a.ExtendedAttrs),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n,0,1,(e==null?void 0:e.fg)||0,(e==null?void 0:e.bg)||0,(e==null?void 0:e.extended)||new a.ExtendedAttrs);r<n&&r<this.length;)this.setCell(r++,s)},h.prototype.resize=function(r,n){if(r!==this.length){if(r>this.length){var s=new Uint32Array(3*r);this.length&&(3*r<this._data.length?s.set(this._data.subarray(0,3*r)):s.set(this._data)),this._data=s;for(var e=this.length;e<r;++e)this.setCell(e,n)}else if(r){(s=new Uint32Array(3*r)).set(this._data.subarray(0,3*r)),this._data=s;var u=Object.keys(this._combined);for(e=0;e<u.length;e++){var t=parseInt(u[e],10);t>=r&&delete this._combined[t]}}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,s,e,u){var t=r._data;if(u)for(var i=e-1;i>=0;i--)for(var l=0;l<3;l++)this._data[3*(s+i)+l]=t[3*(n+i)+l];else for(i=0;i<e;i++)for(l=0;l<3;l++)this._data[3*(s+i)+l]=t[3*(n+i)+l];var c=Object.keys(r._combined);for(l=0;l<c.length;l++){var p=parseInt(c[l],10);p>=n&&(this._combined[p-n+s]=r._combined[p])}},h.prototype.translateToString=function(r,n,s){r===void 0&&(r=!1),n===void 0&&(n=0),s===void 0&&(s=this.length),r&&(s=Math.min(s,this.getTrimmedLength()));for(var e="";n<s;){var u=this._data[3*n+0],t=2097151&u;e+=2097152&u?this._combined[n]:t?m.stringFromCodePoint(t):b.WHITESPACE_CELL_CHAR,n+=u>>22||1}return e},h}();o.BufferLine=f},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.removeElementFromParent=void 0,o.removeElementFromParent=function(){for(var m,b=[],_=0;_<arguments.length;_++)b[_]=arguments[_];for(var a=0,f=b;a<f.length;a++){var h=f[a];(m=h==null?void 0:h.parentElement)===null||m===void 0||m.removeChild(h)}}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(w,E){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,k){S.__proto__=k}||function(S,k){for(var D in k)k.hasOwnProperty(D)&&(S[D]=k[D])})(w,E)},function(w,E){function S(){this.constructor=w}m(w,E),w.prototype=E===null?Object.create(E):(S.prototype=E.prototype,new S)});Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;var _,a=d(12),f=d(20),h=d(39),r=d(2),n=d(15),s=d(8),e=d(16),u=d(0),t=d(3),i=d(4),l=d(6),c=d(22),p=d(24),x={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function v(w,E){if(w>24)return E.setWinLines||!1;switch(w){case 1:return!!E.restoreWin;case 2:return!!E.minimizeWin;case 3:return!!E.setWinPosition;case 4:return!!E.setWinSizePixels;case 5:return!!E.raiseWin;case 6:return!!E.lowerWin;case 7:return!!E.refreshWin;case 8:return!!E.setWinSizeChars;case 9:return!!E.maximizeWin;case 10:return!!E.fullscreenWin;case 11:return!!E.getWinState;case 13:return!!E.getWinPosition;case 14:return!!E.getWinSizePixels;case 15:return!!E.getScreenSizePixels;case 16:return!!E.getCellSizePixels;case 18:return!!E.getWinSizeChars;case 19:return!!E.getScreenSizeChars;case 20:return!!E.getIconTitle;case 21:return!!E.getWinTitle;case 22:return!!E.pushTitle;case 23:return!!E.popTitle;case 24:return!!E.setWinLines}return!1}(function(w){w[w.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",w[w.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(_=o.WindowsOptionsReportType||(o.WindowsOptionsReportType={}));var y=function(){function w(E,S,k,D){this._bufferService=E,this._coreService=S,this._logService=k,this._optionsService=D,this._data=new Uint32Array(0)}return w.prototype.hook=function(E){this._data=new Uint32Array(0)},w.prototype.put=function(E,S,k){this._data=n.concat(this._data,E.subarray(S,k))},w.prototype.unhook=function(E){if(E){var S=s.utf32ToString(this._data);switch(this._data=new Uint32Array(0),S){case'"q':return this._coreService.triggerDataEvent(a.C0.ESC+'P1$r0"q'+a.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(a.C0.ESC+'P1$r61;1"p'+a.C0.ESC+"\\");case"r":var k=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(a.C0.ESC+"P1$r"+k+a.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(a.C0.ESC+"P1$r0m"+a.C0.ESC+"\\");case" q":var D={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return D-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(a.C0.ESC+"P1$r"+D+" q"+a.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",S),this._coreService.triggerDataEvent(a.C0.ESC+"P0$r"+a.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},w}(),g=function(w){function E(S,k,D,L,z,j,le,U,J){J===void 0&&(J=new h.EscapeSequenceParser);var A=w.call(this)||this;A._bufferService=S,A._charsetService=k,A._coreService=D,A._dirtyRowService=L,A._logService=z,A._optionsService=j,A._coreMouseService=le,A._unicodeService=U,A._parser=J,A._parseBuffer=new Uint32Array(4096),A._stringDecoder=new s.StringToUtf32,A._utf8Decoder=new s.Utf8ToUtf32,A._workCell=new i.CellData,A._windowTitle="",A._iconName="",A._windowTitleStack=[],A._iconNameStack=[],A._curAttrData=e.DEFAULT_ATTR_DATA.clone(),A._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone(),A._onRequestBell=new u.EventEmitter,A._onRequestRefreshRows=new u.EventEmitter,A._onRequestReset=new u.EventEmitter,A._onRequestScroll=new u.EventEmitter,A._onRequestSyncScrollBar=new u.EventEmitter,A._onRequestWindowsOptionsReport=new u.EventEmitter,A._onA11yChar=new u.EventEmitter,A._onA11yTab=new u.EventEmitter,A._onCursorMove=new u.EventEmitter,A._onLineFeed=new u.EventEmitter,A._onScroll=new u.EventEmitter,A._onTitleChange=new u.EventEmitter,A.register(A._parser),A._parser.setCsiHandlerFallback(function(H,ne){A._logService.debug("Unknown CSI code: ",{identifier:A._parser.identToString(H),params:ne.toArray()})}),A._parser.setEscHandlerFallback(function(H){A._logService.debug("Unknown ESC code: ",{identifier:A._parser.identToString(H)})}),A._parser.setExecuteHandlerFallback(function(H){A._logService.debug("Unknown EXECUTE code: ",{code:H})}),A._parser.setOscHandlerFallback(function(H,ne,ve){A._logService.debug("Unknown OSC code: ",{identifier:H,action:ne,data:ve})}),A._parser.setDcsHandlerFallback(function(H,ne,ve){ne==="HOOK"&&(ve=ve.toArray()),A._logService.debug("Unknown DCS code: ",{identifier:A._parser.identToString(H),action:ne,payload:ve})}),A._parser.setPrintHandler(function(H,ne,ve){return A.print(H,ne,ve)}),A._parser.setCsiHandler({final:"@"},function(H){return A.insertChars(H)}),A._parser.setCsiHandler({intermediates:" ",final:"@"},function(H){return A.scrollLeft(H)}),A._parser.setCsiHandler({final:"A"},function(H){return A.cursorUp(H)}),A._parser.setCsiHandler({intermediates:" ",final:"A"},function(H){return A.scrollRight(H)}),A._parser.setCsiHandler({final:"B"},function(H){return A.cursorDown(H)}),A._parser.setCsiHandler({final:"C"},function(H){return A.cursorForward(H)}),A._parser.setCsiHandler({final:"D"},function(H){return A.cursorBackward(H)}),A._parser.setCsiHandler({final:"E"},function(H){return A.cursorNextLine(H)}),A._parser.setCsiHandler({final:"F"},function(H){return A.cursorPrecedingLine(H)}),A._parser.setCsiHandler({final:"G"},function(H){return A.cursorCharAbsolute(H)}),A._parser.setCsiHandler({final:"H"},function(H){return A.cursorPosition(H)}),A._parser.setCsiHandler({final:"I"},function(H){return A.cursorForwardTab(H)}),A._parser.setCsiHandler({final:"J"},function(H){return A.eraseInDisplay(H)}),A._parser.setCsiHandler({prefix:"?",final:"J"},function(H){return A.eraseInDisplay(H)}),A._parser.setCsiHandler({final:"K"},function(H){return A.eraseInLine(H)}),A._parser.setCsiHandler({prefix:"?",final:"K"},function(H){return A.eraseInLine(H)}),A._parser.setCsiHandler({final:"L"},function(H){return A.insertLines(H)}),A._parser.setCsiHandler({final:"M"},function(H){return A.deleteLines(H)}),A._parser.setCsiHandler({final:"P"},function(H){return A.deleteChars(H)}),A._parser.setCsiHandler({final:"S"},function(H){return A.scrollUp(H)}),A._parser.setCsiHandler({final:"T"},function(H){return A.scrollDown(H)}),A._parser.setCsiHandler({final:"X"},function(H){return A.eraseChars(H)}),A._parser.setCsiHandler({final:"Z"},function(H){return A.cursorBackwardTab(H)}),A._parser.setCsiHandler({final:"`"},function(H){return A.charPosAbsolute(H)}),A._parser.setCsiHandler({final:"a"},function(H){return A.hPositionRelative(H)}),A._parser.setCsiHandler({final:"b"},function(H){return A.repeatPrecedingCharacter(H)}),A._parser.setCsiHandler({final:"c"},function(H){return A.sendDeviceAttributesPrimary(H)}),A._parser.setCsiHandler({prefix:">",final:"c"},function(H){return A.sendDeviceAttributesSecondary(H)}),A._parser.setCsiHandler({final:"d"},function(H){return A.linePosAbsolute(H)}),A._parser.setCsiHandler({final:"e"},function(H){return A.vPositionRelative(H)}),A._parser.setCsiHandler({final:"f"},function(H){return A.hVPosition(H)}),A._parser.setCsiHandler({final:"g"},function(H){return A.tabClear(H)}),A._parser.setCsiHandler({final:"h"},function(H){return A.setMode(H)}),A._parser.setCsiHandler({prefix:"?",final:"h"},function(H){return A.setModePrivate(H)}),A._parser.setCsiHandler({final:"l"},function(H){return A.resetMode(H)}),A._parser.setCsiHandler({prefix:"?",final:"l"},function(H){return A.resetModePrivate(H)}),A._parser.setCsiHandler({final:"m"},function(H){return A.charAttributes(H)}),A._parser.setCsiHandler({final:"n"},function(H){return A.deviceStatus(H)}),A._parser.setCsiHandler({prefix:"?",final:"n"},function(H){return A.deviceStatusPrivate(H)}),A._parser.setCsiHandler({intermediates:"!",final:"p"},function(H){return A.softReset(H)}),A._parser.setCsiHandler({intermediates:" ",final:"q"},function(H){return A.setCursorStyle(H)}),A._parser.setCsiHandler({final:"r"},function(H){return A.setScrollRegion(H)}),A._parser.setCsiHandler({final:"s"},function(H){return A.saveCursor(H)}),A._parser.setCsiHandler({final:"t"},function(H){return A.windowOptions(H)}),A._parser.setCsiHandler({final:"u"},function(H){return A.restoreCursor(H)}),A._parser.setCsiHandler({intermediates:"'",final:"}"},function(H){return A.insertColumns(H)}),A._parser.setCsiHandler({intermediates:"'",final:"~"},function(H){return A.deleteColumns(H)}),A._parser.setExecuteHandler(a.C0.BEL,function(){return A.bell()}),A._parser.setExecuteHandler(a.C0.LF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(a.C0.VT,function(){return A.lineFeed()}),A._parser.setExecuteHandler(a.C0.FF,function(){return A.lineFeed()}),A._parser.setExecuteHandler(a.C0.CR,function(){return A.carriageReturn()}),A._parser.setExecuteHandler(a.C0.BS,function(){return A.backspace()}),A._parser.setExecuteHandler(a.C0.HT,function(){return A.tab()}),A._parser.setExecuteHandler(a.C0.SO,function(){return A.shiftOut()}),A._parser.setExecuteHandler(a.C0.SI,function(){return A.shiftIn()}),A._parser.setExecuteHandler(a.C1.IND,function(){return A.index()}),A._parser.setExecuteHandler(a.C1.NEL,function(){return A.nextLine()}),A._parser.setExecuteHandler(a.C1.HTS,function(){return A.tabSet()}),A._parser.setOscHandler(0,new c.OscHandler(function(H){A.setTitle(H),A.setIconName(H)})),A._parser.setOscHandler(1,new c.OscHandler(function(H){return A.setIconName(H)})),A._parser.setOscHandler(2,new c.OscHandler(function(H){return A.setTitle(H)})),A._parser.setEscHandler({final:"7"},function(){return A.saveCursor()}),A._parser.setEscHandler({final:"8"},function(){return A.restoreCursor()}),A._parser.setEscHandler({final:"D"},function(){return A.index()}),A._parser.setEscHandler({final:"E"},function(){return A.nextLine()}),A._parser.setEscHandler({final:"H"},function(){return A.tabSet()}),A._parser.setEscHandler({final:"M"},function(){return A.reverseIndex()}),A._parser.setEscHandler({final:"="},function(){return A.keypadApplicationMode()}),A._parser.setEscHandler({final:">"},function(){return A.keypadNumericMode()}),A._parser.setEscHandler({final:"c"},function(){return A.fullReset()}),A._parser.setEscHandler({final:"n"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"o"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"|"},function(){return A.setgLevel(3)}),A._parser.setEscHandler({final:"}"},function(){return A.setgLevel(2)}),A._parser.setEscHandler({final:"~"},function(){return A.setgLevel(1)}),A._parser.setEscHandler({intermediates:"%",final:"@"},function(){return A.selectDefaultCharset()}),A._parser.setEscHandler({intermediates:"%",final:"G"},function(){return A.selectDefaultCharset()});var P=function(H){K._parser.setEscHandler({intermediates:"(",final:H},function(){return A.selectCharset("("+H)}),K._parser.setEscHandler({intermediates:")",final:H},function(){return A.selectCharset(")"+H)}),K._parser.setEscHandler({intermediates:"*",final:H},function(){return A.selectCharset("*"+H)}),K._parser.setEscHandler({intermediates:"+",final:H},function(){return A.selectCharset("+"+H)}),K._parser.setEscHandler({intermediates:"-",final:H},function(){return A.selectCharset("-"+H)}),K._parser.setEscHandler({intermediates:".",final:H},function(){return A.selectCharset("."+H)}),K._parser.setEscHandler({intermediates:"/",final:H},function(){return A.selectCharset("/"+H)})},K=this;for(var $ in f.CHARSETS)P($);return A._parser.setEscHandler({intermediates:"#",final:"8"},function(){return A.screenAlignmentPattern()}),A._parser.setErrorHandler(function(H){return A._logService.error("Parsing error: ",H),H}),A._parser.setDcsHandler({intermediates:"$",final:"q"},new y(A._bufferService,A._coreService,A._logService,A._optionsService)),A}return b(E,w),Object.defineProperty(E.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),E.prototype.dispose=function(){w.prototype.dispose.call(this)},E.prototype.parse=function(S){var k=this._bufferService.buffer,D=k.x,L=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 j=z+131072<S.length?z+131072:S.length,le=typeof S=="string"?this._stringDecoder.decode(S.substring(z,j),this._parseBuffer):this._utf8Decoder.decode(S.subarray(z,j),this._parseBuffer);this._parser.parse(this._parseBuffer,le)}else le=typeof S=="string"?this._stringDecoder.decode(S,this._parseBuffer):this._utf8Decoder.decode(S,this._parseBuffer),this._parser.parse(this._parseBuffer,le);(k=this._bufferService.buffer).x===D&&k.y===L||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},E.prototype.print=function(S,k,D){var L,z,j=this._bufferService.buffer,le=this._charsetService.charset,U=this._optionsService.options.screenReaderMode,J=this._bufferService.cols,A=this._coreService.decPrivateModes.wraparound,P=this._coreService.modes.insertMode,K=this._curAttrData,$=j.lines.get(j.ybase+j.y);this._dirtyRowService.markDirty(j.y),j.x&&D-k>0&&$.getWidth(j.x-1)===2&&$.setCellFromCodePoint(j.x-1,0,1,K.fg,K.bg,K.extended);for(var H=k;H<D;++H){if(L=S[H],z=this._unicodeService.wcwidth(L),L<127&&le){var ne=le[String.fromCharCode(L)];ne&&(L=ne.charCodeAt(0))}if(U&&this._onA11yChar.fire(s.stringFromCodePoint(L)),z||!j.x){if(j.x+z-1>=J){if(A){for(;j.x<J;)$.setCellFromCodePoint(j.x++,0,1,K.fg,K.bg,K.extended);j.x=0,j.y++,j.y===j.scrollBottom+1?(j.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(j.y>=this._bufferService.rows&&(j.y=this._bufferService.rows-1),j.lines.get(j.ybase+j.y).isWrapped=!0),$=j.lines.get(j.ybase+j.y)}else if(j.x=J-1,z===2)continue}if(P&&($.insertCells(j.x,z,j.getNullCell(K),K),$.getWidth(J-1)===2&&$.setCellFromCodePoint(J-1,t.NULL_CELL_CODE,t.NULL_CELL_WIDTH,K.fg,K.bg,K.extended)),$.setCellFromCodePoint(j.x++,L,z,K.fg,K.bg,K.extended),z>0)for(;--z;)$.setCellFromCodePoint(j.x++,0,0,K.fg,K.bg,K.extended)}else $.getWidth(j.x-1)?$.addCodepointToCell(j.x-1,L):$.addCodepointToCell(j.x-2,L)}D-k>0&&($.loadCell(j.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),j.x<J&&D-k>0&&$.getWidth(j.x)===0&&!$.hasContent(j.x)&&$.setCellFromCodePoint(j.x,0,1,K.fg,K.bg,K.extended),this._dirtyRowService.markDirty(j.y)},E.prototype.addCsiHandler=function(S,k){var D=this;return S.final!=="t"||S.prefix||S.intermediates?this._parser.addCsiHandler(S,k):this._parser.addCsiHandler(S,function(L){return!v(L.params[0],D._optionsService.options.windowOptions)||k(L)})},E.prototype.addDcsHandler=function(S,k){return this._parser.addDcsHandler(S,new p.DcsHandler(k))},E.prototype.addEscHandler=function(S,k){return this._parser.addEscHandler(S,k)},E.prototype.addOscHandler=function(S,k){return this._parser.addOscHandler(S,new c.OscHandler(k))},E.prototype.bell=function(){this._onRequestBell.fire()},E.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()},E.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},E.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 D=k.lines.get(k.ybase+k.y);D.hasWidth(k.x)&&!D.hasContent(k.x)&&k.x--}this._restrictCursor()},E.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)}},E.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},E.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},E.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)},E.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)},E.prototype._moveCursor=function(S,k){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+S,this._bufferService.buffer.y+k)},E.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))},E.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)},E.prototype.cursorForward=function(S){this._moveCursor(S.params[0]||1,0)},E.prototype.cursorBackward=function(S){this._moveCursor(-(S.params[0]||1),0)},E.prototype.cursorNextLine=function(S){this.cursorDown(S),this._bufferService.buffer.x=0},E.prototype.cursorPrecedingLine=function(S){this.cursorUp(S),this._bufferService.buffer.x=0},E.prototype.cursorCharAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},E.prototype.cursorPosition=function(S){this._setCursor(S.length>=2?(S.params[1]||1)-1:0,(S.params[0]||1)-1)},E.prototype.charPosAbsolute=function(S){this._setCursor((S.params[0]||1)-1,this._bufferService.buffer.y)},E.prototype.hPositionRelative=function(S){this._moveCursor(S.params[0]||1,0)},E.prototype.linePosAbsolute=function(S){this._setCursor(this._bufferService.buffer.x,(S.params[0]||1)-1)},E.prototype.vPositionRelative=function(S){this._moveCursor(0,S.params[0]||1)},E.prototype.hVPosition=function(S){this.cursorPosition(S)},E.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={})},E.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()},E.prototype.cursorBackwardTab=function(S){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var k=S.params[0]||1,D=this._bufferService.buffer;k--;)D.x=D.prevStop()},E.prototype._eraseInBufferLine=function(S,k,D,L){L===void 0&&(L=!1);var z=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+S);z.replaceCells(k,D,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),L&&(z.isWrapped=!1)},E.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},E.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 D=this._bufferService.buffer.lines.length-this._bufferService.rows;D>0&&(this._bufferService.buffer.lines.trimStart(D),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-D,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-D,0),this._onScroll.fire(0))}},E.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)},E.prototype.insertLines=function(S){this._restrictCursor();var k=S.params[0]||1,D=this._bufferService.buffer;if(!(D.y>D.scrollBottom||D.y<D.scrollTop)){for(var L=D.ybase+D.y,z=this._bufferService.rows-1-D.scrollBottom,j=this._bufferService.rows-1+D.ybase-z+1;k--;)D.lines.splice(j-1,1),D.lines.splice(L,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.y,D.scrollBottom),D.x=0}},E.prototype.deleteLines=function(S){this._restrictCursor();var k=S.params[0]||1,D=this._bufferService.buffer;if(!(D.y>D.scrollBottom||D.y<D.scrollTop)){var L,z=D.ybase+D.y;for(L=this._bufferService.rows-1-D.scrollBottom,L=this._bufferService.rows-1+D.ybase-L;k--;)D.lines.splice(z,1),D.lines.splice(L,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.y,D.scrollBottom),D.x=0}},E.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))},E.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))},E.prototype.scrollUp=function(S){for(var k=S.params[0]||1,D=this._bufferService.buffer;k--;)D.lines.splice(D.ybase+D.scrollTop,1),D.lines.splice(D.ybase+D.scrollBottom,0,D.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(D.scrollTop,D.scrollBottom)},E.prototype.scrollDown=function(S){for(var k=S.params[0]||1,D=this._bufferService.buffer;k--;)D.lines.splice(D.ybase+D.scrollBottom,1),D.lines.splice(D.ybase+D.scrollTop,0,D.getBlankLine(e.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(D.scrollTop,D.scrollBottom)},E.prototype.scrollLeft=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var D=S.params[0]||1,L=k.scrollTop;L<=k.scrollBottom;++L){var z=k.lines.get(k.ybase+L);z.deleteCells(0,D,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},E.prototype.scrollRight=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var D=S.params[0]||1,L=k.scrollTop;L<=k.scrollBottom;++L){var z=k.lines.get(k.ybase+L);z.insertCells(0,D,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},E.prototype.insertColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var D=S.params[0]||1,L=k.scrollTop;L<=k.scrollBottom;++L){var z=this._bufferService.buffer.lines.get(k.ybase+L);z.insertCells(k.x,D,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},E.prototype.deleteColumns=function(S){var k=this._bufferService.buffer;if(!(k.y>k.scrollBottom||k.y<k.scrollTop)){for(var D=S.params[0]||1,L=k.scrollTop;L<=k.scrollBottom;++L){var z=k.lines.get(k.ybase+L);z.deleteCells(k.x,D,k.getNullCell(this._eraseAttrData()),this._eraseAttrData()),z.isWrapped=!1}this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom)}},E.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))},E.prototype.repeatPrecedingCharacter=function(S){if(this._parser.precedingCodepoint){for(var k=S.params[0]||1,D=new Uint32Array(k),L=0;L<k;++L)D[L]=this._parser.precedingCodepoint;this.print(D,0,D.length)}},E.prototype.sendDeviceAttributesPrimary=function(S){S.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c"))},E.prototype.sendDeviceAttributesSecondary=function(S){S.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(S.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c"))},E.prototype._is=function(S){return(this._optionsService.options.termName+"").indexOf(S)===0},E.prototype.setMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!0}},E.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,f.DEFAULT_CHARSET),this._charsetService.setgCharset(1,f.DEFAULT_CHARSET),this._charsetService.setgCharset(2,f.DEFAULT_CHARSET),this._charsetService.setgCharset(3,f.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}},E.prototype.resetMode=function(S){for(var k=0;k<S.length;k++)switch(S.params[k]){case 4:this._coreService.modes.insertMode=!1}},E.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}},E.prototype._updateAttrColor=function(S,k,D,L,z){return k===2?(S|=50331648,S&=-16777216,S|=l.AttributeData.fromColorRGB([D,L,z])):k===5&&(S&=-50331904,S|=33554432|255&D),S},E.prototype._extractColor=function(S,k,D){var L=[0,0,-1,0,0,0],z=0,j=0;do{if(L[j+z]=S.params[k+j],S.hasSubParams(k+j)){var le=S.getSubParams(k+j),U=0;do L[1]===5&&(z=1),L[j+U+1+z]=le[U];while(++U<le.length&&U+j+1+z<L.length);break}if(L[1]===5&&j+z>=2||L[1]===2&&j+z>=5)break;L[1]&&(z=1)}while(++j+k<S.length&&j+z<L.length);for(U=2;U<L.length;++U)L[U]===-1&&(L[U]=0);switch(L[0]){case 38:D.fg=this._updateAttrColor(D.fg,L[1],L[3],L[4],L[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,L[1],L[3],L[4],L[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,L[1],L[3],L[4],L[5])}return j},E.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()},E.prototype.charAttributes=function(S){if(S.length===1&&S.params[0]===0)return this._curAttrData.fg=e.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=e.DEFAULT_ATTR_DATA.bg);for(var k,D=S.length,L=this._curAttrData,z=0;z<D;z++)(k=S.params[z])>=30&&k<=37?(L.fg&=-50331904,L.fg|=16777216|k-30):k>=40&&k<=47?(L.bg&=-50331904,L.bg|=16777216|k-40):k>=90&&k<=97?(L.fg&=-50331904,L.fg|=16777224|k-90):k>=100&&k<=107?(L.bg&=-50331904,L.bg|=16777224|k-100):k===0?(L.fg=e.DEFAULT_ATTR_DATA.fg,L.bg=e.DEFAULT_ATTR_DATA.bg):k===1?L.fg|=134217728:k===3?L.bg|=67108864:k===4?(L.fg|=268435456,this._processUnderline(S.hasSubParams(z)?S.getSubParams(z)[0]:1,L)):k===5?L.fg|=536870912:k===7?L.fg|=67108864:k===8?L.fg|=1073741824:k===2?L.bg|=134217728:k===21?this._processUnderline(2,L):k===22?(L.fg&=-134217729,L.bg&=-134217729):k===23?L.bg&=-67108865:k===24?L.fg&=-268435457:k===25?L.fg&=-536870913:k===27?L.fg&=-67108865:k===28?L.fg&=-1073741825:k===39?(L.fg&=-67108864,L.fg|=16777215&e.DEFAULT_ATTR_DATA.fg):k===49?(L.bg&=-67108864,L.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):k===38||k===48||k===58?z+=this._extractColor(S,z,L):k===59?(L.extended=L.extended.clone(),L.extended.underlineColor=-1,L.updateExtended()):k===100?(L.fg&=-67108864,L.fg|=16777215&e.DEFAULT_ATTR_DATA.fg,L.bg&=-67108864,L.bg|=16777215&e.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",k)},E.prototype.deviceStatus=function(S){switch(S.params[0]){case 5:this._coreService.triggerDataEvent(a.C0.ESC+"[0n");break;case 6:var k=this._bufferService.buffer.y+1,D=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(a.C0.ESC+"["+k+";"+D+"R")}},E.prototype.deviceStatusPrivate=function(S){switch(S.params[0]){case 6:var k=this._bufferService.buffer.y+1,D=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(a.C0.ESC+"[?"+k+";"+D+"R")}},E.prototype.softReset=function(S){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},E.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 D=k%2==1;this._optionsService.options.cursorBlink=D},E.prototype.setScrollRegion=function(S){var k,D=S.params[0]||1;(S.length<2||(k=S.params[1])>this._bufferService.rows||k===0)&&(k=this._bufferService.rows),k>D&&(this._bufferService.buffer.scrollTop=D-1,this._bufferService.buffer.scrollBottom=k-1,this._setCursor(0,0))},E.prototype.windowOptions=function(S){if(v(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(_.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(_.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(a.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22: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())}}},E.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},E.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()},E.prototype.setTitle=function(S){this._windowTitle=S,this._onTitleChange.fire(S)},E.prototype.setIconName=function(S){this._iconName=S},E.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},E.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},E.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},E.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,f.DEFAULT_CHARSET)},E.prototype.selectCharset=function(S){S.length===2?S[0]!=="/"&&this._charsetService.setgCharset(x[S[0]],f.CHARSETS[S[1]]||f.DEFAULT_CHARSET):this.selectDefaultCharset()},E.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()},E.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},E.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()},E.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},E.prototype.reset=function(){this._curAttrData=e.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=e.DEFAULT_ATTR_DATA.clone()},E.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},E.prototype.setgLevel=function(S){this._charsetService.setgLevel(S)},E.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 D=0;D<this._bufferService.rows;++D){var L=k.ybase+k.y+D,z=k.lines.get(L);z&&(z.fill(S),z.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},E}(r.Disposable);o.InputHandler=g},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.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"},o.CHARSETS.A={"#":"\xA3"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},o.CHARSETS.C=o.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},o.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},o.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},o.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},o.CHARSETS.E=o.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},o.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},o.CHARSETS.H=o.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},o.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;var m=function(){function b(_,a){if(_===void 0&&(_=32),a===void 0&&(a=32),this.maxLength=_,this.maxSubParamsLength=a,a>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(_),this.length=0,this._subParams=new Int32Array(a),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(_),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return b.fromArray=function(_){var a=new b;if(!_.length)return a;for(var f=_[0]instanceof Array?1:0;f<_.length;++f){var h=_[f];if(h instanceof Array)for(var r=0;r<h.length;++r)a.addSubParam(h[r]);else a.addParam(h)}return a},b.prototype.clone=function(){var _=new b(this.maxLength,this.maxSubParamsLength);return _.params.set(this.params),_.length=this.length,_._subParams.set(this._subParams),_._subParamsLength=this._subParamsLength,_._subParamsIdx.set(this._subParamsIdx),_._rejectDigits=this._rejectDigits,_._rejectSubDigits=this._rejectSubDigits,_._digitIsSub=this._digitIsSub,_},b.prototype.toArray=function(){for(var _=[],a=0;a<this.length;++a){_.push(this.params[a]);var f=this._subParamsIdx[a]>>8,h=255&this._subParamsIdx[a];h-f>0&&_.push(Array.prototype.slice.call(this._subParams,f,h))}return _},b.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},b.prototype.addParam=function(_){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=_>2147483647?2147483647:_}},b.prototype.addSubParam=function(_){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(_<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=_>2147483647?2147483647:_,this._subParamsIdx[this.length-1]++}},b.prototype.hasSubParams=function(_){return(255&this._subParamsIdx[_])-(this._subParamsIdx[_]>>8)>0},b.prototype.getSubParams=function(_){var a=this._subParamsIdx[_]>>8,f=255&this._subParamsIdx[_];return f-a>0?this._subParams.subarray(a,f):null},b.prototype.getSubParamsAll=function(){for(var _={},a=0;a<this.length;++a){var f=this._subParamsIdx[a]>>8,h=255&this._subParamsIdx[a];h-f>0&&(_[a]=this._subParams.slice(f,h))}return _},b.prototype.addDigit=function(_){var a;if(!(this._rejectDigits||!(a=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var f=this._digitIsSub?this._subParams:this.params,h=f[a-1];f[a-1]=~h?Math.min(10*h+_,2147483647):_}},b}();o.Params=m},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;var m=d(23),b=d(8),_=function(){function f(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return f.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 s=n.indexOf(r);s!==-1&&n.splice(s,1)}}},f.prototype.setHandler=function(h,r){this._handlers[h]=[r]},f.prototype.clearHandler=function(h){this._handlers[h]&&delete this._handlers[h]},f.prototype.setHandlerFallback=function(h){this._handlerFb=h},f.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},f.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},f.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")},f.prototype._put=function(h,r,n){var s=this._handlers[this._id];if(s)for(var e=s.length-1;e>=0;e--)s[e].put(h,r,n);else this._handlerFb(this._id,"PUT",b.utf32ToString(h,r,n))},f.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)},f.prototype.start=function(){this.reset(),this._id=-1,this._state=1},f.prototype.put=function(h,r,n){if(this._state!==3){if(this._state===1)for(;r<n;){var s=h[r++];if(s===59){this._state=2,this._start();break}if(s<48||57<s)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+s-48}this._state===2&&n-r>0&&this._put(h,r,n)}},f.prototype.end=function(h){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(h)),this._id=-1,this._state=0)},f}();o.OscParser=_;var a=function(){function f(h){this._handler=h,this._data="",this._hitLimit=!1}return f.prototype.start=function(){this._data="",this._hitLimit=!1},f.prototype.put=function(h,r,n){this._hitLimit||(this._data+=b.utf32ToString(h,r,n),this._data.length>m.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},f.prototype.end=function(h){var r;return this._hitLimit?r=!1:h&&(r=this._handler(this._data)),this._data="",this._hitLimit=!1,r},f}();o.OscHandler=a},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;var m=d(8),b=d(21),_=d(23),a=[],f=function(){function r(){this._handlers=Object.create(null),this._active=a,this._ident=0,this._handlerFb=function(){}}return r.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},r.prototype.addHandler=function(n,s){this._handlers[n]===void 0&&(this._handlers[n]=[]);var e=this._handlers[n];return e.push(s),{dispose:function(){var u=e.indexOf(s);u!==-1&&e.splice(u,1)}}},r.prototype.setHandler=function(n,s){this._handlers[n]=[s]},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=a,this._ident=0},r.prototype.hook=function(n,s){if(this.reset(),this._ident=n,this._active=this._handlers[n]||a,this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].hook(s);else this._handlerFb(this._ident,"HOOK",s)},r.prototype.put=function(n,s,e){if(this._active.length)for(var u=this._active.length-1;u>=0;u--)this._active[u].put(n,s,e);else this._handlerFb(this._ident,"PUT",m.utf32ToString(n,s,e))},r.prototype.unhook=function(n){if(this._active.length){for(var s=this._active.length-1;s>=0&&this._active[s].unhook(n)===!1;s--);for(s--;s>=0;s--)this._active[s].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",n);this._active=a,this._ident=0},r}();o.DcsParser=f;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,s,e){this._hitLimit||(this._data+=m.utf32ToString(n,s,e),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},r.prototype.unhook=function(n){var s;return this._hitLimit?s=!1:n&&(s=this._handler(this._data,this._params||new b.Params)),this._params=void 0,this._data="",this._hitLimit=!1,s},r}();o.DcsHandler=h},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.removeTerminalFromCache=o.acquireCharAtlas=void 0;var m=d(26),b=d(43),_=[];o.acquireCharAtlas=function(a,f,h,r,n){for(var s=m.generateConfig(r,n,a,h),e=0;e<_.length;e++){var u=(t=_[e]).ownedBy.indexOf(f);if(u>=0){if(m.configEquals(t.config,s))return t.atlas;t.ownedBy.length===1?(t.atlas.dispose(),_.splice(e,1)):t.ownedBy.splice(u,1);break}}for(e=0;e<_.length;e++){var t=_[e];if(m.configEquals(t.config,s))return t.ownedBy.push(f),t.atlas}var i={atlas:new b.DynamicCharAtlas(document,s),config:s,ownedBy:[f]};return _.push(i),i.atlas},o.removeTerminalFromCache=function(a){for(var f=0;f<_.length;f++){var h=_[f].ownedBy.indexOf(a);if(h!==-1){_[f].ownedBy.length===1?(_[f].atlas.dispose(),_.splice(f,1)):_[f].ownedBy.splice(h,1);break}}}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.is256Color=o.configEquals=o.generateConfig=void 0;var m=d(3);o.generateConfig=function(b,_,a,f){var h={foreground:f.foreground,background:f.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:f.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:b,scaledCharHeight:_,fontFamily:a.fontFamily,fontSize:a.fontSize,fontWeight:a.fontWeight,fontWeightBold:a.fontWeightBold,allowTransparency:a.allowTransparency,colors:h}},o.configEquals=function(b,_){for(var a=0;a<b.colors.ansi.length;a++)if(b.colors.ansi[a].rgba!==_.colors.ansi[a].rgba)return!1;return b.devicePixelRatio===_.devicePixelRatio&&b.fontFamily===_.fontFamily&&b.fontSize===_.fontSize&&b.fontWeight===_.fontWeight&&b.fontWeightBold===_.fontWeightBold&&b.allowTransparency===_.allowTransparency&&b.scaledCharWidth===_.scaledCharWidth&&b.scaledCharHeight===_.scaledCharHeight&&b.colors.foreground===_.colors.foreground&&b.colors.background===_.colors.background},o.is256Color=function(b){return b<m.DEFAULT_COLOR}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ColorManager=o.DEFAULT_ANSI_COLORS=void 0;var m=d(10),b=d(45),_=m.css.toColor("#ffffff"),a=m.css.toColor("#000000"),f=m.css.toColor("#ffffff"),h=m.css.toColor("#000000"),r={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=function(){for(var s=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],e=[0,95,135,175,215,255],u=0;u<216;u++){var t=e[u/36%6|0],i=e[u/6%6|0],l=e[u%6];s.push({css:m.channels.toCss(t,i,l),rgba:m.channels.toRgba(t,i,l)})}for(u=0;u<24;u++){var c=8+10*u;s.push({css:m.channels.toCss(c,c,c),rgba:m.channels.toRgba(c,c,c)})}return s}();var n=function(){function s(e,u){this.allowTransparency=u;var t=e.createElement("canvas");t.width=1,t.height=1;var i=t.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:_,background:a,cursor:f,cursorAccent:h,selectionTransparent:r,selectionOpaque:m.color.blend(a,r),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return s.prototype.onOptionsChange=function(e){e==="minimumContrastRatio"&&this._contrastCache.clear()},s.prototype.setTheme=function(e){e===void 0&&(e={}),this.colors.foreground=this._parseColor(e.foreground,_),this.colors.background=this._parseColor(e.background,a),this.colors.cursor=this._parseColor(e.cursor,f,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,h,!0),this.colors.selectionTransparent=this._parseColor(e.selection,r,!0),this.colors.selectionOpaque=m.color.blend(this.colors.background,this.colors.selectionTransparent),m.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=m.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(e.black,o.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,o.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,o.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,o.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,o.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,o.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,o.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,o.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,o.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,o.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,o.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,o.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,o.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,o.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,o.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},s.prototype._parseColor=function(e,u,t){if(t===void 0&&(t=this.allowTransparency),e===void 0)return u;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+e+" is invalid using fallback "+u.css),u;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(i[3]!==255){if(!t)return console.warn("Color: "+e+" is using transparency, but allowTransparency is false. Using fallback "+u.css+"."),u;var l=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(g){return Number(g)}),c=l[0],p=l[1],x=l[2],v=l[3],y=Math.round(255*v);return{rgba:m.channels.toRgba(c,p,x,y),css:e}}return{css:this._ctx.fillStyle,rgba:m.channels.toRgba(i[0],i[1],i[2],i[3])}},s}();o.ColorManager=n},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.throwIfFalsy=void 0,o.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m}},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(n,s){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,u){e.__proto__=u}||function(e,u){for(var t in u)u.hasOwnProperty(t)&&(e[t]=u[t])})(n,s)},function(n,s){function e(){this.constructor=n}m(n,s),n.prototype=s===null?Object.create(s):(e.prototype=s.prototype,new e)});Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerRegistry=o.JoinedCellData=void 0;var _=d(6),a=d(3),f=d(4),h=function(n){function s(e,u,t){var i=n.call(this)||this;return i.content=0,i.combinedData="",i.fg=e.fg,i.bg=e.bg,i.combinedData=u,i._width=t,i}return b(s,n),s.prototype.isCombined=function(){return 2097152},s.prototype.getWidth=function(){return this._width},s.prototype.getChars=function(){return this.combinedData},s.prototype.getCode=function(){return 2097151},s.prototype.setFromCharData=function(e){throw new Error("not implemented")},s.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},s}(_.AttributeData);o.JoinedCellData=h;var r=function(){function n(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new f.CellData}return n.prototype.registerCharacterJoiner=function(s){var e={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(e),e.id},n.prototype.deregisterCharacterJoiner=function(s){for(var e=0;e<this._characterJoiners.length;e++)if(this._characterJoiners[e].id===s)return this._characterJoiners.splice(e,1),!0;return!1},n.prototype.getJoinedCharacters=function(s){if(this._characterJoiners.length===0)return[];var e=this._bufferService.buffer.lines.get(s);if(!e||e.length===0)return[];for(var u=[],t=e.translateToString(!0),i=0,l=0,c=0,p=e.getFg(0),x=e.getBg(0),v=0;v<e.getTrimmedLength();v++)if(e.loadCell(v,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==p||this._workCell.bg!==x){if(v-i>1)for(var y=this._getJoinedRanges(t,c,l,e,i),g=0;g<y.length;g++)u.push(y[g]);i=v,c=l,p=this._workCell.fg,x=this._workCell.bg}l+=this._workCell.getChars().length||a.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-i>1)for(y=this._getJoinedRanges(t,c,l,e,i),g=0;g<y.length;g++)u.push(y[g]);return u},n.prototype._getJoinedRanges=function(s,e,u,t,i){for(var l=s.substring(e,u),c=this._characterJoiners[0].handler(l),p=1;p<this._characterJoiners.length;p++)for(var x=this._characterJoiners[p].handler(l),v=0;v<x.length;v++)n._mergeRanges(c,x[v]);return this._stringRangesToCellRanges(c,t,i),c},n.prototype._stringRangesToCellRanges=function(s,e,u){var t=0,i=!1,l=0,c=s[t];if(c){for(var p=u;p<this._bufferService.cols;p++){var x=e.getWidth(p),v=e.getString(p).length||a.WHITESPACE_CELL_CHAR.length;if(x!==0){if(!i&&c[0]<=l&&(c[0]=p,i=!0),c[1]<=l){if(c[1]=p,!(c=s[++t]))break;c[0]<=l?(c[0]=p,i=!0):i=!1}l+=v}}c&&(c[1]=this._bufferService.cols)}},n._mergeRanges=function(s,e){for(var u=!1,t=0;t<s.length;t++){var i=s[t];if(u){if(e[1]<=i[0])return s[t-1][1]=e[1],s;if(e[1]<=i[1])return s[t-1][1]=Math.max(e[1],i[1]),s.splice(t,1),s;s.splice(t,1),t--}else{if(e[1]<=i[0])return s.splice(t,0,e),s;if(e[1]<=i[1])return i[0]=Math.min(e[0],i[0]),s;e[0]<i[1]&&(i[0]=Math.min(e[0],i[0]),u=!0)}}return u?s[s.length-1][1]=e[1]:s.push(e),s},n}();o.CharacterJoinerRegistry=r},function(O,o,d){"use strict";function m(b,_){var a=_.getBoundingClientRect();return[b.clientX-a.left,b.clientY-a.top]}Object.defineProperty(o,"__esModule",{value:!0}),o.getRawByteCoords=o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=m,o.getCoords=function(b,_,a,f,h,r,n,s){if(h){var e=m(b,_);if(e)return e[0]=Math.ceil((e[0]+(s?r/2:0))/r),e[1]=Math.ceil(e[1]/n),e[0]=Math.min(Math.max(e[0],1),a+(s?1:0)),e[1]=Math.min(Math.max(e[1],1),f),e}},o.getRawByteCoords=function(b){if(b)return{x:b[0]+32,y:b[1]+32}}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0;var m=function(){function b(_){this._renderCallback=_}return b.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},b.prototype.refresh=function(_,a,f){var h=this;this._rowCount=f,_=_!==void 0?_:0,a=a!==void 0?a:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,_):_,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,a):a,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 _=Math.max(this._rowStart,0),a=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(_,a)}},b}();o.RenderDebouncer=m},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(a,f){return(m=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])})(a,f)},function(a,f){function h(){this.constructor=a}m(a,f),a.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)});Object.defineProperty(o,"__esModule",{value:!0}),o.ScreenDprMonitor=void 0;var _=function(a){function f(){var h=a!==null&&a.apply(this,arguments)||this;return h._currentDevicePixelRatio=window.devicePixelRatio,h}return b(f,a),f.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()},f.prototype.dispose=function(){a.prototype.dispose.call(this),this.clearListener()},f.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))},f.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)},f}(d(2).Disposable);o.ScreenDprMonitor=_},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function m(b,_){if(_===void 0&&(_=5),typeof b!="object")return b;var a=Array.isArray(b)?[]:{};for(var f in b)a[f]=_<=1?b[f]:b[f]?m(b[f],_-1):b[f];return a}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var m=d(4),b=d(35),_=d(18),a=d(0),f=d(83),h=function(){function t(i){this._core=new b.Terminal(i),this._addonManager=new f.AddonManager}return t.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(t.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new e(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"unicode",{get:function(){return this._checkProposedApi(),new u(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this._checkProposedApi(),new n(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),t.prototype.blur=function(){this._core.blur()},t.prototype.focus=function(){this._core.focus()},t.prototype.resize=function(i,l){this._verifyIntegers(i,l),this._core.resize(i,l)},t.prototype.open=function(i){this._core.open(i)},t.prototype.attachCustomKeyEventHandler=function(i){this._core.attachCustomKeyEventHandler(i)},t.prototype.registerLinkMatcher=function(i,l,c){return this._checkProposedApi(),this._core.registerLinkMatcher(i,l,c)},t.prototype.deregisterLinkMatcher=function(i){this._checkProposedApi(),this._core.deregisterLinkMatcher(i)},t.prototype.registerLinkProvider=function(i){return this._checkProposedApi(),this._core.registerLinkProvider(i)},t.prototype.registerCharacterJoiner=function(i){return this._checkProposedApi(),this._core.registerCharacterJoiner(i)},t.prototype.deregisterCharacterJoiner=function(i){this._checkProposedApi(),this._core.deregisterCharacterJoiner(i)},t.prototype.registerMarker=function(i){return this._checkProposedApi(),this._verifyIntegers(i),this._core.addMarker(i)},t.prototype.addMarker=function(i){return this.registerMarker(i)},t.prototype.hasSelection=function(){return this._core.hasSelection()},t.prototype.select=function(i,l,c){this._verifyIntegers(i,l,c),this._core.select(i,l,c)},t.prototype.getSelection=function(){return this._core.getSelection()},t.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},t.prototype.clearSelection=function(){this._core.clearSelection()},t.prototype.selectAll=function(){this._core.selectAll()},t.prototype.selectLines=function(i,l){this._verifyIntegers(i,l),this._core.selectLines(i,l)},t.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},t.prototype.scrollLines=function(i){this._verifyIntegers(i),this._core.scrollLines(i)},t.prototype.scrollPages=function(i){this._verifyIntegers(i),this._core.scrollPages(i)},t.prototype.scrollToTop=function(){this._core.scrollToTop()},t.prototype.scrollToBottom=function(){this._core.scrollToBottom()},t.prototype.scrollToLine=function(i){this._verifyIntegers(i),this._core.scrollToLine(i)},t.prototype.clear=function(){this._core.clear()},t.prototype.write=function(i,l){this._core.write(i,l)},t.prototype.writeUtf8=function(i,l){this._core.write(i,l)},t.prototype.writeln=function(i,l){this._core.write(i),this._core.write(`\r
|
|
|
`,l)},t.prototype.paste=function(i){this._core.paste(i)},t.prototype.getOption=function(i){return this._core.optionsService.getOption(i)},t.prototype.setOption=function(i,l){this._core.optionsService.setOption(i,l)},t.prototype.refresh=function(i,l){this._verifyIntegers(i,l),this._core.refresh(i,l)},t.prototype.reset=function(){this._core.reset()},t.prototype.loadAddon=function(i){return this._addonManager.loadAddon(this,i)},Object.defineProperty(t,"strings",{get:function(){return _},enumerable:!1,configurable:!0}),t.prototype._verifyIntegers=function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];for(var c=0,p=i;c<p.length;c++){var x=p[c];if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}},t}();o.Terminal=h;var r=function(){function t(i,l){this._buffer=i,this.type=l}return t.prototype.init=function(i){return this._buffer=i,this},Object.defineProperty(t.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),t.prototype.getLine=function(i){var l=this._buffer.lines.get(i);if(l)return new s(l)},t.prototype.getNullCell=function(){return new m.CellData},t}(),n=function(){function t(i){var l=this;this._buffers=i,this._onBufferChange=new a.EventEmitter,this._normal=new r(this._buffers.normal,"normal"),this._alternate=new r(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return l._onBufferChange.fire(l.active)})}return Object.defineProperty(t.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),t}(),s=function(){function t(i){this._line=i}return Object.defineProperty(t.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),t.prototype.getCell=function(i,l){if(!(i<0||i>=this._line.length))return l?(this._line.loadCell(i,l),l):this._line.loadCell(i,new m.CellData)},t.prototype.translateToString=function(i,l,c){return this._line.translateToString(i,l,c)},t}(),e=function(){function t(i){this._core=i}return t.prototype.registerCsiHandler=function(i,l){return this._core.addCsiHandler(i,function(c){return l(c.toArray())})},t.prototype.addCsiHandler=function(i,l){return this.registerCsiHandler(i,l)},t.prototype.registerDcsHandler=function(i,l){return this._core.addDcsHandler(i,function(c,p){return l(c,p.toArray())})},t.prototype.addDcsHandler=function(i,l){return this.registerDcsHandler(i,l)},t.prototype.registerEscHandler=function(i,l){return this._core.addEscHandler(i,l)},t.prototype.addEscHandler=function(i,l){return this.registerEscHandler(i,l)},t.prototype.registerOscHandler=function(i,l){return this._core.addOscHandler(i,l)},t.prototype.addOscHandler=function(i,l){return this.registerOscHandler(i,l)},t}(),u=function(){function t(i){this._core=i}return t.prototype.register=function(i){this._core.unicodeService.register(i)},Object.defineProperty(t.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(i){this._core.unicodeService.activeVersion=i},enumerable:!1,configurable:!0}),t}()},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(J,A){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,K){P.__proto__=K}||function(P,K){for(var $ in K)K.hasOwnProperty($)&&(P[$]=K[$])})(J,A)},function(J,A){function P(){this.constructor=J}m(J,A),J.prototype=A===null?Object.create(A):(P.prototype=A.prototype,new P)});Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;var _=d(36),a=d(37),f=d(38),h=d(12),r=d(19),n=d(40),s=d(50),e=d(51),u=d(11),t=d(7),i=d(18),l=d(54),c=d(55),p=d(56),x=d(57),v=d(59),y=d(0),g=d(16),w=d(27),E=d(60),S=d(5),k=d(61),D=d(62),L=d(63),z=d(64),j=d(65),le=typeof window!="undefined"?window.document:null,U=function(J){function A(P){P===void 0&&(P={});var K=J.call(this,P)||this;return K.browser=u,K._keyDownHandled=!1,K._onCursorMove=new y.EventEmitter,K._onKey=new y.EventEmitter,K._onRender=new y.EventEmitter,K._onSelectionChange=new y.EventEmitter,K._onTitleChange=new y.EventEmitter,K._onFocus=new y.EventEmitter,K._onBlur=new y.EventEmitter,K._onA11yCharEmitter=new y.EventEmitter,K._onA11yTabEmitter=new y.EventEmitter,K._setup(),K.linkifier=K._instantiationService.createInstance(s.Linkifier),K.linkifier2=K.register(K._instantiationService.createInstance(L.Linkifier2)),K.register(K._inputHandler.onRequestBell(function(){return K.bell()})),K.register(K._inputHandler.onRequestRefreshRows(function($,H){return K.refresh($,H)})),K.register(K._inputHandler.onRequestReset(function(){return K.reset()})),K.register(K._inputHandler.onRequestScroll(function($,H){return K.scroll($,H||void 0)})),K.register(K._inputHandler.onRequestWindowsOptionsReport(function($){return K._reportWindowsOptions($)})),K.register(y.forwardEvent(K._inputHandler.onCursorMove,K._onCursorMove)),K.register(y.forwardEvent(K._inputHandler.onTitleChange,K._onTitleChange)),K.register(y.forwardEvent(K._inputHandler.onA11yChar,K._onA11yCharEmitter)),K.register(y.forwardEvent(K._inputHandler.onA11yTab,K._onA11yTabEmitter)),K.register(K._bufferService.onResize(function($){return K._afterResize($.cols,$.rows)})),K}return b(A,J),Object.defineProperty(A.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),A.prototype.dispose=function(){var P,K,$;this._isDisposed||(J.prototype.dispose.call(this),(P=this._renderService)===null||P===void 0||P.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},($=(K=this.element)===null||K===void 0?void 0:K.parentNode)===null||$===void 0||$.removeChild(this.element))},A.prototype._setup=function(){J.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(A.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),A.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},A.prototype._updateOptions=function(P){var K,$,H,ne;switch(J.prototype._updateOptions.call(this,P),P){case"fontFamily":case"fontSize":(K=this._renderService)===null||K===void 0||K.clear(),($=this._charSizeService)===null||$===void 0||$.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":(H=this.viewport)===null||H===void 0||H.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new p.AccessibilityManager(this,this._renderService)):((ne=this._accessibilityManager)===null||ne===void 0||ne.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},A.prototype._onTextAreaFocus=function(P){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[I"),this.updateCursorStyle(P),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},A.prototype.blur=function(){var P;return(P=this.textarea)===null||P===void 0?void 0:P.blur()},A.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()},A.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var P=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),K=this._bufferService.buffer.y*P,$=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=$+"px",this.textarea.style.top=K+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=P+"px",this.textarea.style.lineHeight=P+"px",this.textarea.style.zIndex="-5"}},A.prototype._initGlobal=function(){var P=this;this._bindKeys(),this.register(t.addDisposableDomListener(this.element,"copy",function($){P.hasSelection()&&f.copyHandler($,P._selectionService)}));var K=function($){return f.handlePasteEvent($,P.textarea,P._coreService)};this.register(t.addDisposableDomListener(this.textarea,"paste",K)),this.register(t.addDisposableDomListener(this.element,"paste",K)),u.isFirefox?this.register(t.addDisposableDomListener(this.element,"mousedown",function($){$.button===2&&f.rightClickHandler($,P.textarea,P.screenElement,P._selectionService,P.options.rightClickSelectsWord)})):this.register(t.addDisposableDomListener(this.element,"contextmenu",function($){f.rightClickHandler($,P.textarea,P.screenElement,P._selectionService,P.options.rightClickSelectsWord)})),u.isLinux&&this.register(t.addDisposableDomListener(this.element,"auxclick",function($){$.button===1&&f.moveTextAreaUnderMouseCursor($,P.textarea,P.screenElement)}))},A.prototype._bindKeys=function(){var P=this;this.register(t.addDisposableDomListener(this.textarea,"keyup",function(K){return P._keyUp(K)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keydown",function(K){return P._keyDown(K)},!0)),this.register(t.addDisposableDomListener(this.textarea,"keypress",function(K){return P._keyPress(K)},!0)),this.register(t.addDisposableDomListener(this.textarea,"compositionstart",function(){return P._compositionHelper.compositionstart()})),this.register(t.addDisposableDomListener(this.textarea,"compositionupdate",function(K){return P._compositionHelper.compositionupdate(K)})),this.register(t.addDisposableDomListener(this.textarea,"compositionend",function(){return P._compositionHelper.compositionend()})),this.register(this.onRender(function(){return P._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(K){return P._queueLinkification(K.start,K.end)}))},A.prototype.open=function(P){var K=this;if(!P)throw new Error("Terminal requires a parent element.");le.body.contains(P)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=P.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"),P.appendChild(this.element);var $=le.createDocumentFragment();this._viewportElement=le.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.appendChild(this._viewportElement),this._viewportScrollArea=le.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=le.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=le.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$.appendChild(this.screenElement),this.textarea=le.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(t.addDisposableDomListener(this.textarea,"focus",function(ve){return K._onTextAreaFocus(ve)})),this.register(t.addDisposableDomListener(this.textarea,"blur",function(){return K._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var H=this._instantiationService.createInstance(z.CoreBrowserService,this.textarea);this._instantiationService.setService(S.ICoreBrowserService,H),this._charSizeService=this._instantiationService.createInstance(k.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(S.ICharSizeService,this._charSizeService),this._compositionView=le.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild($),this._theme=this.options.theme||this._theme,this._colorManager=new w.ColorManager(le,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(ve){return K._colorManager.onOptionsChange(ve)})),this._colorManager.setTheme(this._theme);var ne=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,ne,this.rows,this.screenElement)),this._instantiationService.setService(S.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(ve){return K._onRender.fire(ve)})),this.onResize(function(ve){return K._renderService.resize(ve.cols,ve.rows)}),this._soundService=this._instantiationService.createInstance(l.SoundService),this._instantiationService.setService(S.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(S.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,function(ve,Se){return K.scrollLines(ve,Se)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return K.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){K._renderService.onCursorMove(),K._syncTextArea()})),this.register(this.onResize(function(){return K._renderService.onResize(K.cols,K.rows)})),this.register(this.onBlur(function(){return K._renderService.onBlur()})),this.register(this.onFocus(function(){return K._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return K.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(e.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(S.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(ve){return K.scrollLines(ve.amount,ve.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return K._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(ve){return K._renderService.onSelectionChanged(ve.start,ve.end,ve.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(ve){K.textarea.value=ve,K.textarea.focus(),K.textarea.select()})),this.register(this.onScroll(function(){K.viewport.syncScrollArea(),K._selectionService.refresh()})),this.register(t.addDisposableDomListener(this._viewportElement,"scroll",function(){return K._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(c.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return K._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(t.addDisposableDomListener(this.element,"mousedown",function(ve){return K._selectionService.onMouseDown(ve)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new p.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},A.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(n.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(x.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},A.prototype._setTheme=function(P){var K,$,H;this._theme=P,(K=this._colorManager)===null||K===void 0||K.setTheme(P),($=this._renderService)===null||$===void 0||$.setColors(this._colorManager.colors),(H=this.viewport)===null||H===void 0||H.onThemeChange(this._colorManager.colors)},A.prototype.bindMouse=function(){var P=this,K=this,$=this.element;function H(he){var ke,Ke,Te=K._mouseService.getRawByteCoords(he,K.screenElement,K.cols,K.rows);if(!Te)return!1;switch(he.overrideType||he.type){case"mousemove":Ke=32,he.buttons===void 0?(ke=3,he.button!==void 0&&(ke=he.button<3?he.button:3)):ke=1&he.buttons?0:4&he.buttons?1:2&he.buttons?2:3;break;case"mouseup":Ke=0,ke=he.button<3?he.button:3;break;case"mousedown":Ke=1,ke=he.button<3?he.button:3;break;case"wheel":he.deltaY!==0&&(Ke=he.deltaY<0?0:1),ke=4;break;default:return!1}return!(Ke===void 0||ke===void 0||ke>4)&&K._coreMouseService.triggerMouseEvent({col:Te.x-33,row:Te.y-33,button:ke,action:Ke,ctrl:he.ctrlKey,alt:he.altKey,shift:he.shiftKey})}var ne={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve=function(he){return H(he),he.buttons||(P._document.removeEventListener("mouseup",ne.mouseup),ne.mousedrag&&P._document.removeEventListener("mousemove",ne.mousedrag)),P.cancel(he)},Se=function(he){return H(he),he.preventDefault(),P.cancel(he)},He=function(he){he.buttons&&H(he)},Me=function(he){he.buttons||H(he)};this.register(this._coreMouseService.onProtocolChange(function(he){he?(P.optionsService.options.logLevel==="debug"&&P._logService.debug("Binding to mouse events:",P._coreMouseService.explainEvents(he)),P.element.classList.add("enable-mouse-events"),P._selectionService.disable()):(P._logService.debug("Unbinding from mouse events."),P.element.classList.remove("enable-mouse-events"),P._selectionService.enable()),8&he?ne.mousemove||($.addEventListener("mousemove",Me),ne.mousemove=Me):($.removeEventListener("mousemove",ne.mousemove),ne.mousemove=null),16&he?ne.wheel||($.addEventListener("wheel",Se,{passive:!1}),ne.wheel=Se):($.removeEventListener("wheel",ne.wheel),ne.wheel=null),2&he?ne.mouseup||(ne.mouseup=ve):(P._document.removeEventListener("mouseup",ne.mouseup),ne.mouseup=null),4&he?ne.mousedrag||(ne.mousedrag=He):(P._document.removeEventListener("mousemove",ne.mousedrag),ne.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(t.addDisposableDomListener($,"mousedown",function(he){if(he.preventDefault(),P.focus(),P._coreMouseService.areMouseEventsActive&&!P._selectionService.shouldForceSelection(he))return H(he),ne.mouseup&&P._document.addEventListener("mouseup",ne.mouseup),ne.mousedrag&&P._document.addEventListener("mousemove",ne.mousedrag),P.cancel(he)})),this.register(t.addDisposableDomListener($,"wheel",function(he){if(!ne.wheel){if(!P.buffer.hasScrollback){var ke=P.viewport.getLinesScrolled(he);if(ke===0)return;for(var Ke=h.C0.ESC+(P._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(he.deltaY<0?"A":"B"),Te="",Ie=0;Ie<Math.abs(ke);Ie++)Te+=Ke;P._coreService.triggerDataEvent(Te,!0)}}},{passive:!0})),this.register(t.addDisposableDomListener($,"wheel",function(he){if(!ne.wheel)return P.viewport.onWheel(he)?void 0:P.cancel(he)},{passive:!1})),this.register(t.addDisposableDomListener($,"touchstart",function(he){if(!P._coreMouseService.areMouseEventsActive)return P.viewport.onTouchStart(he),P.cancel(he)},{passive:!0})),this.register(t.addDisposableDomListener($,"touchmove",function(he){if(!P._coreMouseService.areMouseEventsActive)return P.viewport.onTouchMove(he)?void 0:P.cancel(he)},{passive:!1}))},A.prototype.refresh=function(P,K){var $;($=this._renderService)===null||$===void 0||$.refreshRows(P,K)},A.prototype._queueLinkification=function(P,K){var $;($=this.linkifier)===null||$===void 0||$.linkifyRows(P,K)},A.prototype.updateCursorStyle=function(P){this._selectionService&&this._selectionService.shouldColumnSelect(P)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},A.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},A.prototype.scrollLines=function(P,K){J.prototype.scrollLines.call(this,P,K),this.refresh(0,this.rows-1)},A.prototype.paste=function(P){f.paste(P,this.textarea,this._coreService)},A.prototype.attachCustomKeyEventHandler=function(P){this._customKeyEventHandler=P},A.prototype.registerLinkMatcher=function(P,K,$){var H=this.linkifier.registerLinkMatcher(P,K,$);return this.refresh(0,this.rows-1),H},A.prototype.deregisterLinkMatcher=function(P){this.linkifier.deregisterLinkMatcher(P)&&this.refresh(0,this.rows-1)},A.prototype.registerLinkProvider=function(P){return this.linkifier2.registerLinkProvider(P)},A.prototype.registerCharacterJoiner=function(P){var K=this._renderService.registerCharacterJoiner(P);return this.refresh(0,this.rows-1),K},A.prototype.deregisterCharacterJoiner=function(P){this._renderService.deregisterCharacterJoiner(P)&&this.refresh(0,this.rows-1)},Object.defineProperty(A.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),A.prototype.addMarker=function(P){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+P)},A.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},A.prototype.select=function(P,K,$){this._selectionService.setSelection(P,K,$)},A.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},A.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},A.prototype.clearSelection=function(){var P;(P=this._selectionService)===null||P===void 0||P.clearSelection()},A.prototype.selectAll=function(){var P;(P=this._selectionService)===null||P===void 0||P.selectAll()},A.prototype.selectLines=function(P,K){var $;($=this._selectionService)===null||$===void 0||$.selectLines(P,K)},A.prototype._keyDown=function(P){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(P)===!1)return!1;if(!this._compositionHelper.keydown(P))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var K=v.evaluateKeyboardEvent(P,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(P),K.type===3||K.type===2){var $=this.rows-1;return this.scrollLines(K.type===2?-$:$),this.cancel(P,!0)}return K.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,P)||(K.cancel&&this.cancel(P,!0),!K.key||(K.key!==h.C0.ETX&&K.key!==h.C0.CR||(this.textarea.value=""),this._onKey.fire({key:K.key,domEvent:P}),this._showCursor(),this._coreService.triggerDataEvent(K.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(P,!0)))},A.prototype._isThirdLevelShift=function(P,K){var $=P.isMac&&!this.options.macOptionIsMeta&&K.altKey&&!K.ctrlKey&&!K.metaKey||P.isWindows&&K.altKey&&K.ctrlKey&&!K.metaKey;return K.type==="keypress"?$:$&&(!K.keyCode||K.keyCode>47)},A.prototype._keyUp=function(P){this._customKeyEventHandler&&this._customKeyEventHandler(P)===!1||(function(K){return K.keyCode===16||K.keyCode===17||K.keyCode===18}(P)||this.focus(),this.updateCursorStyle(P))},A.prototype._keyPress=function(P){var K;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(P)===!1)return!1;if(this.cancel(P),P.charCode)K=P.charCode;else if(P.which===null||P.which===void 0)K=P.keyCode;else{if(P.which===0||P.charCode===0)return!1;K=P.which}return!(!K||(P.altKey||P.ctrlKey||P.metaKey)&&!this._isThirdLevelShift(this.browser,P))&&(K=String.fromCharCode(K),this._onKey.fire({key:K,domEvent:P}),this._showCursor(),this._coreService.triggerDataEvent(K,!0),!0)},A.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},A.prototype.resize=function(P,K){P!==this.cols||K!==this.rows?J.prototype.resize.call(this,P,K):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},A.prototype._afterResize=function(P,K){var $,H;($=this._charSizeService)===null||$===void 0||$.measure(),(H=this.viewport)===null||H===void 0||H.syncScrollArea(!0)},A.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var P=1;P<this.rows;P++)this.buffer.lines.push(this.buffer.getBlankLine(g.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},A.prototype.reset=function(){var P,K;this.options.rows=this.rows,this.options.cols=this.cols;var $=this._customKeyEventHandler;this._setup(),J.prototype.reset.call(this),(P=this._selectionService)===null||P===void 0||P.reset(),this._customKeyEventHandler=$,this.refresh(0,this.rows-1),(K=this.viewport)===null||K===void 0||K.syncScrollArea()},A.prototype._reportWindowsOptions=function(P){if(this._renderService)switch(P){case r.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var K=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),$=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(h.C0.ESC+"[4;"+$+";"+K+"t");break;case r.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var H=this._renderService.dimensions.scaledCellWidth.toFixed(0),ne=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(h.C0.ESC+"[6;"+ne+";"+H+"t")}},A.prototype.cancel=function(P,K){if(this.options.cancelEvents||K)return P.preventDefault(),P.stopPropagation(),!1},A.prototype._visualBell=function(){return!1},A.prototype._soundBell=function(){return this.options.bellStyle==="sound"},A}(j.CoreTerminal);o.Terminal=U},function(O,o,d){"use strict";var m=this&&this.__decorate||function(h,r,n,s){var e,u=arguments.length,t=u<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,n):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,r,n,s);else for(var i=h.length-1;i>=0;i--)(e=h[i])&&(t=(u<3?e(t):u>3?e(r,n,t):e(r,n))||t);return u>3&&t&&Object.defineProperty(r,n,t),t},b=this&&this.__param||function(h,r){return function(n,s){r(n,s,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;var _=d(5),a=d(1),f=function(){function h(r,n,s,e,u,t){this._textarea=r,this._compositionView=n,this._bufferService=s,this._optionsService=e,this._charSizeService=u,this._coreService=t,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 s={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(n._isSendingComposition){n._isSendingComposition=!1;var u=void 0;u=n._isComposing?n._textarea.value.substring(s.start,s.end):n._textarea.value.substring(s.start),n._coreService.triggerDataEvent(u,!0)}},0)}else{this._isSendingComposition=!1;var e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}},h.prototype._handleAnyTextareaChanges=function(){var r=this,n=this._textarea.value;setTimeout(function(){if(!r._isComposing){var s=r._textarea.value.replace(n,"");s.length>0&&r._coreService.triggerDataEvent(s,!0)}},0)},h.prototype.updateCompositionElements=function(r){var n=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var s=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),e=this._bufferService.buffer.y*s,u=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=u+"px",this._compositionView.style.top=e+"px",this._compositionView.style.height=s+"px",this._compositionView.style.lineHeight=s+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var t=this._compositionView.getBoundingClientRect();this._textarea.style.left=u+"px",this._textarea.style.top=e+"px",this._textarea.style.width=t.width+"px",this._textarea.style.height=t.height+"px",this._textarea.style.lineHeight=t.height+"px"}r||setTimeout(function(){return n.updateCompositionElements(!0)},0)}},h=m([b(2,a.IBufferService),b(3,a.IOptionsService),b(4,_.ICharSizeService),b(5,a.ICoreService)],h)}();o.CompositionHelper=f},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(e,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var l in i)i.hasOwnProperty(l)&&(t[l]=i[l])})(e,u)},function(e,u){function t(){this.constructor=e}m(e,u),e.prototype=u===null?Object.create(u):(t.prototype=u.prototype,new t)}),_=this&&this.__decorate||function(e,u,t,i){var l,c=arguments.length,p=c<3?u:i===null?i=Object.getOwnPropertyDescriptor(u,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,u,t,i);else for(var x=e.length-1;x>=0;x--)(l=e[x])&&(p=(c<3?l(p):c>3?l(u,t,p):l(u,t))||p);return c>3&&p&&Object.defineProperty(u,t,p),p},a=this&&this.__param||function(e,u){return function(t,i){u(t,i,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;var f=d(2),h=d(7),r=d(5),n=d(1),s=function(e){function u(t,i,l,c,p,x,v){var y=e.call(this)||this;return y._scrollLines=t,y._viewportElement=i,y._scrollArea=l,y._bufferService=c,y._optionsService=p,y._charSizeService=x,y._renderService=v,y.scrollBarWidth=0,y._currentRowHeight=0,y._lastRecordedBufferLength=0,y._lastRecordedViewportHeight=0,y._lastRecordedBufferHeight=0,y._lastTouchY=0,y._lastScrollTop=0,y._wheelPartialScroll=0,y._refreshAnimationFrame=null,y._ignoreNextScrollEvent=!1,y.scrollBarWidth=y._viewportElement.offsetWidth-y._scrollArea.offsetWidth||15,y.register(h.addDisposableDomListener(y._viewportElement,"scroll",y._onScroll.bind(y))),setTimeout(function(){return y.syncScrollArea()},0),y}return b(u,e),u.prototype.onThemeChange=function(t){this._viewportElement.style.backgroundColor=t.background.css},u.prototype._refresh=function(t){var i=this;if(t)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return i._innerRefresh()}))},u.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var t=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==t&&(this._lastRecordedBufferHeight=t,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var i=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==i&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=i),this._refreshAnimationFrame=null},u.prototype.syncScrollArea=function(t){if(t===void 0&&(t=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(t);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var 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(t)}else this._refresh(t)},u.prototype._onScroll=function(t){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)}},u.prototype._bubbleScroll=function(t,i){var l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(i<0&&this._viewportElement.scrollTop!==0||i>0&&l<this._lastRecordedBufferHeight)||(t.cancelable&&t.preventDefault(),!1)},u.prototype.onWheel=function(t){var i=this._getPixelsScrolled(t);return i!==0&&(this._viewportElement.scrollTop+=i,this._bubbleScroll(t,i))},u.prototype._getPixelsScrolled=function(t){if(t.deltaY===0)return 0;var i=this._applyScrollModifier(t.deltaY,t);return t.deltaMode===WheelEvent.DOM_DELTA_LINE?i*=this._currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._currentRowHeight*this._bufferService.rows),i},u.prototype.getLinesScrolled=function(t){if(t.deltaY===0)return 0;var i=this._applyScrollModifier(t.deltaY,t);return t.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):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i},u.prototype._applyScrollModifier=function(t,i){var l=this._optionsService.options.fastScrollModifier;return l==="alt"&&i.altKey||l==="ctrl"&&i.ctrlKey||l==="shift"&&i.shiftKey?t*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:t*this._optionsService.options.scrollSensitivity},u.prototype.onTouchStart=function(t){this._lastTouchY=t.touches[0].pageY},u.prototype.onTouchMove=function(t){var i=this._lastTouchY-t.touches[0].pageY;return this._lastTouchY=t.touches[0].pageY,i!==0&&(this._viewportElement.scrollTop+=i,this._bubbleScroll(t,i))},u=_([a(3,n.IBufferService),a(4,n.IOptionsService),a(5,r.ICharSizeService),a(6,r.IRenderService)],u)}(f.Disposable);o.Viewport=s},function(O,o,d){"use strict";function m(f){return f.replace(/\r?\n/g,"\r")}function b(f,h){return h?"\x1B[200~"+f+"\x1B[201~":f}function _(f,h,r){f=b(f=m(f),r.decPrivateModes.bracketedPasteMode),r.triggerDataEvent(f,!0),h.value=""}function a(f,h,r){var n=r.getBoundingClientRect(),s=f.clientX-n.left-10,e=f.clientY-n.top-10;h.style.width="20px",h.style.height="20px",h.style.left=s+"px",h.style.top=e+"px",h.style.zIndex="1000",h.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=m,o.bracketTextForPaste=b,o.copyHandler=function(f,h){f.clipboardData&&f.clipboardData.setData("text/plain",h.selectionText),f.preventDefault()},o.handlePasteEvent=function(f,h,r){f.stopPropagation(),f.clipboardData&&_(f.clipboardData.getData("text/plain"),h,r)},o.paste=_,o.moveTextAreaUnderMouseCursor=a,o.rightClickHandler=function(f,h,r,n,s){a(f,h,r),s&&!n.isClickInSelection(f)&&n.selectWordAtCursor(f),h.value=n.selectionText,h.select()}},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(e,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var l in i)i.hasOwnProperty(l)&&(t[l]=i[l])})(e,u)},function(e,u){function t(){this.constructor=e}m(e,u),e.prototype=u===null?Object.create(u):(t.prototype=u.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;var _=d(2),a=d(15),f=d(21),h=d(22),r=d(24),n=function(){function e(u){this.table=new Uint8Array(u)}return e.prototype.setDefault=function(u,t){a.fill(this.table,u<<4|t)},e.prototype.add=function(u,t,i,l){this.table[t<<8|u]=i<<4|l},e.prototype.addMany=function(u,t,i,l){for(var c=0;c<u.length;c++)this.table[t<<8|u[c]]=i<<4|l},e}();o.TransitionTable=n,o.VT500_TRANSITION_TABLE=function(){var e=new n(4095),u=Array.apply(null,Array(256)).map(function(x,v){return v}),t=function(x,v){return u.slice(x,v)},i=t(32,127),l=t(0,24);l.push(25),l.push.apply(l,t(28,32));var c,p=t(0,14);for(c in e.setDefault(1,0),e.addMany(i,0,2,0),p)e.addMany([24,26,153,154],c,3,0),e.addMany(t(128,144),c,3,0),e.addMany(t(144,152),c,3,0),e.add(156,c,0,0),e.add(27,c,11,1),e.add(157,c,4,8),e.addMany([152,158,159],c,0,7),e.add(155,c,11,3),e.add(144,c,11,9);return e.addMany(l,0,3,0),e.addMany(l,1,3,1),e.add(127,1,0,1),e.addMany(l,8,0,8),e.addMany(l,3,3,3),e.add(127,3,0,3),e.addMany(l,4,3,4),e.add(127,4,0,4),e.addMany(l,6,3,6),e.addMany(l,5,3,5),e.add(127,5,0,5),e.addMany(l,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(i,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(t(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(i,7,0,7),e.addMany(l,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(t(64,127),3,7,0),e.addMany(t(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(t(48,60),4,8,4),e.addMany(t(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(t(32,64),6,0,6),e.add(127,6,0,6),e.addMany(t(64,127),6,0,0),e.addMany(t(32,48),3,9,5),e.addMany(t(32,48),5,9,5),e.addMany(t(48,64),5,0,6),e.addMany(t(64,127),5,7,0),e.addMany(t(32,48),4,9,5),e.addMany(t(32,48),1,9,2),e.addMany(t(32,48),2,9,2),e.addMany(t(48,127),2,10,0),e.addMany(t(48,80),1,10,0),e.addMany(t(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(t(96,127),1,10,0),e.add(80,1,11,9),e.addMany(l,9,0,9),e.add(127,9,0,9),e.addMany(t(28,32),9,0,9),e.addMany(t(32,48),9,9,12),e.addMany(t(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(l,11,0,11),e.addMany(t(32,128),11,0,11),e.addMany(t(28,32),11,0,11),e.addMany(l,10,0,10),e.add(127,10,0,10),e.addMany(t(28,32),10,0,10),e.addMany(t(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(t(32,48),10,9,12),e.addMany(l,12,0,12),e.add(127,12,0,12),e.addMany(t(28,32),12,0,12),e.addMany(t(32,48),12,9,12),e.addMany(t(48,64),12,0,11),e.addMany(t(64,127),12,12,13),e.addMany(t(64,127),10,12,13),e.addMany(t(64,127),9,12,13),e.addMany(l,13,13,13),e.addMany(i,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(160,0,2,0),e.add(160,8,5,8),e.add(160,6,0,6),e.add(160,11,0,11),e.add(160,13,13,13),e}();var s=function(e){function u(t){t===void 0&&(t=o.VT500_TRANSITION_TABLE);var i=e.call(this)||this;return i._transitions=t,i.initialState=0,i.currentState=i.initialState,i._params=new f.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(l,c,p){},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(u,e),u.prototype._identifier=function(t,i){i===void 0&&(i=[64,126]);var l=0;if(t.prefix){if(t.prefix.length>1)throw new Error("only one byte as prefix supported");if((l=t.prefix.charCodeAt(0))&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(t.intermediates){if(t.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var c=0;c<t.intermediates.length;++c){var p=t.intermediates.charCodeAt(c);if(32>p||p>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=p}}if(t.final.length!==1)throw new Error("final must be a single byte");var x=t.final.charCodeAt(0);if(i[0]>x||x>i[1])throw new Error("final must be in range "+i[0]+" .. "+i[1]);return l<<=8,l|=x},u.prototype.identToString=function(t){for(var i=[];t;)i.push(String.fromCharCode(255&t)),t>>=8;return i.reverse().join("")},u.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},u.prototype.setPrintHandler=function(t){this._printHandler=t},u.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},u.prototype.addEscHandler=function(t,i){var l=this._identifier(t,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);var c=this._escHandlers[l];return c.push(i),{dispose:function(){var p=c.indexOf(i);p!==-1&&c.splice(p,1)}}},u.prototype.setEscHandler=function(t,i){this._escHandlers[this._identifier(t,[48,126])]=[i]},u.prototype.clearEscHandler=function(t){this._escHandlers[this._identifier(t,[48,126])]&&delete this._escHandlers[this._identifier(t,[48,126])]},u.prototype.setEscHandlerFallback=function(t){this._escHandlerFb=t},u.prototype.setExecuteHandler=function(t,i){this._executeHandlers[t.charCodeAt(0)]=i},u.prototype.clearExecuteHandler=function(t){this._executeHandlers[t.charCodeAt(0)]&&delete this._executeHandlers[t.charCodeAt(0)]},u.prototype.setExecuteHandlerFallback=function(t){this._executeHandlerFb=t},u.prototype.addCsiHandler=function(t,i){var l=this._identifier(t);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);var c=this._csiHandlers[l];return c.push(i),{dispose:function(){var p=c.indexOf(i);p!==-1&&c.splice(p,1)}}},u.prototype.setCsiHandler=function(t,i){this._csiHandlers[this._identifier(t)]=[i]},u.prototype.clearCsiHandler=function(t){this._csiHandlers[this._identifier(t)]&&delete this._csiHandlers[this._identifier(t)]},u.prototype.setCsiHandlerFallback=function(t){this._csiHandlerFb=t},u.prototype.addDcsHandler=function(t,i){return this._dcsParser.addHandler(this._identifier(t),i)},u.prototype.setDcsHandler=function(t,i){this._dcsParser.setHandler(this._identifier(t),i)},u.prototype.clearDcsHandler=function(t){this._dcsParser.clearHandler(this._identifier(t))},u.prototype.setDcsHandlerFallback=function(t){this._dcsParser.setHandlerFallback(t)},u.prototype.addOscHandler=function(t,i){return this._oscParser.addHandler(t,i)},u.prototype.setOscHandler=function(t,i){this._oscParser.setHandler(t,i)},u.prototype.clearOscHandler=function(t){this._oscParser.clearHandler(t)},u.prototype.setOscHandlerFallback=function(t){this._oscParser.setHandlerFallback(t)},u.prototype.setErrorHandler=function(t){this._errorHandler=t},u.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},u.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},u.prototype.parse=function(t,i){for(var l=0,c=0,p=this.currentState,x=this._oscParser,v=this._dcsParser,y=this._collect,g=this._params,w=this._transitions.table,E=0;E<i;++E){switch((c=w[p<<8|((l=t[E])<160?l:160)])>>4){case 2:for(var S=E+1;;++S){if(S>=i||(l=t[S])<32||l>126&&l<160){this._printHandler(t,E,S),E=S-1;break}if(++S>=i||(l=t[S])<32||l>126&&l<160){this._printHandler(t,E,S),E=S-1;break}if(++S>=i||(l=t[S])<32||l>126&&l<160){this._printHandler(t,E,S),E=S-1;break}if(++S>=i||(l=t[S])<32||l>126&&l<160){this._printHandler(t,E,S),E=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:E,code:l,currentState:p,collect:y,params:g,abort:!1}).abort)return;break;case 7:for(var k=this._csiHandlers[y<<8|l],D=k?k.length-1:-1;D>=0&&k[D](g)===!1;D--);D<0&&this._csiHandlerFb(y<<8|l,g),this.precedingCodepoint=0;break;case 8:do switch(l){case 59:g.addParam(0);break;case 58:g.addSubParam(-1);break;default:g.addDigit(l-48)}while(++E<i&&(l=t[E])>47&&l<60);E--;break;case 9:y<<=8,y|=l;break;case 10:for(var L=this._escHandlers[y<<8|l],z=L?L.length-1:-1;z>=0&&L[z]()===!1;z--);z<0&&this._escHandlerFb(y<<8|l),this.precedingCodepoint=0;break;case 11:g.reset(),g.addParam(0),y=0;break;case 12:v.hook(y<<8|l,g);break;case 13:for(var j=E+1;;++j)if(j>=i||(l=t[j])===24||l===26||l===27||l>127&&l<160){v.put(t,E,j),E=j-1;break}break;case 14:v.unhook(l!==24&&l!==26),l===27&&(c|=1),g.reset(),g.addParam(0),y=0,this.precedingCodepoint=0;break;case 4:x.start();break;case 5:for(var le=E+1;;le++)if(le>=i||(l=t[le])<32||l>127&&l<=159){x.put(t,E,le),E=le-1;break}break;case 6:x.end(l!==24&&l!==26),l===27&&(c|=1),g.reset(),g.addParam(0),y=0,this.precedingCodepoint=0}p=15&c}this._collect=y,this.currentState=p},u}(_.Disposable);o.EscapeSequenceParser=s},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(x,v){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,g){y.__proto__=g}||function(y,g){for(var w in g)g.hasOwnProperty(w)&&(y[w]=g[w])})(x,v)},function(x,v){function y(){this.constructor=x}m(x,v),x.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}),_=this&&this.__decorate||function(x,v,y,g){var w,E=arguments.length,S=E<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,y):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(x,v,y,g);else for(var k=x.length-1;k>=0;k--)(w=x[k])&&(S=(E<3?w(S):E>3?w(v,y,S):w(v,y))||S);return E>3&&S&&Object.defineProperty(v,y,S),S},a=this&&this.__param||function(x,v){return function(y,g){v(y,g,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Renderer=void 0;var f=d(41),h=d(47),r=d(48),n=d(49),s=d(29),e=d(2),u=d(5),t=d(1),i=d(25),l=d(0),c=1,p=function(x){function v(y,g,w,E,S,k,D,L,z){var j=x.call(this)||this;j._colors=y,j._screenElement=g,j._bufferService=S,j._charSizeService=k,j._optionsService=D,j._id=c++,j._onRequestRedraw=new l.EventEmitter;var le=j._optionsService.options.allowTransparency;return j._characterJoinerRegistry=new s.CharacterJoinerRegistry(j._bufferService),j._renderLayers=[new f.TextRenderLayer(j._screenElement,0,j._colors,j._characterJoinerRegistry,le,j._id,j._bufferService,D),new h.SelectionRenderLayer(j._screenElement,1,j._colors,j._id,j._bufferService,D),new n.LinkRenderLayer(j._screenElement,2,j._colors,j._id,w,E,j._bufferService,D),new r.CursorRenderLayer(j._screenElement,3,j._colors,j._id,j._onRequestRedraw,j._bufferService,D,L,z)],j.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},j._devicePixelRatio=window.devicePixelRatio,j._updateDimensions(),j.onOptionsChanged(),j}return b(v,x),Object.defineProperty(v.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){for(var y=0,g=this._renderLayers;y<g.length;y++)g[y].dispose();x.prototype.dispose.call(this),i.removeTerminalFromCache(this._id)},v.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},v.prototype.setColors=function(y){this._colors=y;for(var g=0,w=this._renderLayers;g<w.length;g++){var E=w[g];E.setColors(this._colors),E.reset()}},v.prototype.onResize=function(y,g){this._updateDimensions();for(var w=0,E=this._renderLayers;w<E.length;w++)E[w].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},v.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},v.prototype.onBlur=function(){this._runOperation(function(y){return y.onBlur()})},v.prototype.onFocus=function(){this._runOperation(function(y){return y.onFocus()})},v.prototype.onSelectionChanged=function(y,g,w){w===void 0&&(w=!1),this._runOperation(function(E){return E.onSelectionChanged(y,g,w)})},v.prototype.onCursorMove=function(){this._runOperation(function(y){return y.onCursorMove()})},v.prototype.onOptionsChanged=function(){this._runOperation(function(y){return y.onOptionsChanged()})},v.prototype.clear=function(){this._runOperation(function(y){return y.reset()})},v.prototype._runOperation=function(y){for(var g=0,w=this._renderLayers;g<w.length;g++)y(w[g])},v.prototype.renderRows=function(y,g){for(var w=0,E=this._renderLayers;w<E.length;w++)E[w].onGridChanged(y,g)},v.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)},v.prototype.registerCharacterJoiner=function(y){return this._characterJoinerRegistry.registerCharacterJoiner(y)},v.prototype.deregisterCharacterJoiner=function(y){return this._characterJoinerRegistry.deregisterCharacterJoiner(y)},v=_([a(4,t.IBufferService),a(5,u.ICharSizeService),a(6,t.IOptionsService),a(7,t.ICoreService),a(8,u.ICoreBrowserService)],v)}(e.Disposable);o.Renderer=p},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(e,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var l in i)i.hasOwnProperty(l)&&(t[l]=i[l])})(e,u)},function(e,u){function t(){this.constructor=e}m(e,u),e.prototype=u===null?Object.create(u):(t.prototype=u.prototype,new t)});Object.defineProperty(o,"__esModule",{value:!0}),o.TextRenderLayer=void 0;var _=d(42),a=d(13),f=d(6),h=d(3),r=d(29),n=d(4),s=function(e){function u(t,i,l,c,p,x,v,y){var g=e.call(this,t,"text",i,p,l,x,v,y)||this;return g._characterWidth=0,g._characterFont="",g._characterOverlapCache={},g._workCell=new n.CellData,g._state=new _.GridCache,g._characterJoinerRegistry=c,g}return b(u,e),u.prototype.resize=function(t){e.prototype.resize.call(this,t);var i=this._getFont(!1,!1);this._characterWidth===t.scaledCharWidth&&this._characterFont===i||(this._characterWidth=t.scaledCharWidth,this._characterFont=i,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},u.prototype.reset=function(){this._state.clear(),this._clearAll()},u.prototype._forEachCell=function(t,i,l,c){for(var p=t;p<=i;p++)for(var x=p+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.lines.get(x),y=l?l.getJoinedCharacters(x):[],g=0;g<this._bufferService.cols;g++){v.loadCell(g,this._workCell);var w=this._workCell,E=!1,S=g;if(w.getWidth()!==0){if(y.length>0&&g===y[0][0]){E=!0;var k=y.shift();w=new r.JoinedCellData(this._workCell,v.translateToString(!0,k[0],k[1]),k[1]-k[0]),S=k[1]-1}!E&&this._isOverlapping(w)&&S<v.length-1&&v.getCodePoint(S+1)===h.NULL_CELL_CODE&&(w.content&=-12582913,w.content|=2<<22),c(w,g,p),g=S}}},u.prototype._drawBackground=function(t,i){var l=this,c=this._ctx,p=this._bufferService.cols,x=0,v=0,y=null;c.save(),this._forEachCell(t,i,null,function(g,w,E){var S=null;g.isInverse()?S=g.isFgDefault()?l._colors.foreground.css:g.isFgRGB()?"rgb("+f.AttributeData.toColorRGB(g.getFgColor()).join(",")+")":l._colors.ansi[g.getFgColor()].css:g.isBgRGB()?S="rgb("+f.AttributeData.toColorRGB(g.getBgColor()).join(",")+")":g.isBgPalette()&&(S=l._colors.ansi[g.getBgColor()].css),y===null&&(x=w,v=E),E!==v?(c.fillStyle=y||"",l._fillCells(x,v,p-x,1),x=w,v=E):y!==S&&(c.fillStyle=y||"",l._fillCells(x,v,w-x,1),x=w,v=E),y=S}),y!==null&&(c.fillStyle=y,this._fillCells(x,v,p-x,1)),c.restore()},u.prototype._drawForeground=function(t,i){var l=this;this._forEachCell(t,i,this._characterJoinerRegistry,function(c,p,x){if(!c.isInvisible()&&(l._drawChars(c,p,x),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("+f.AttributeData.toColorRGB(c.getBgColor()).join(",")+")";else{var v=c.getBgColor();l._optionsService.options.drawBoldTextInBrightColors&&c.isBold()&&v<8&&(v+=8),l._ctx.fillStyle=l._colors.ansi[v].css}else if(c.isFgDefault())l._ctx.fillStyle=l._colors.foreground.css;else if(c.isFgRGB())l._ctx.fillStyle="rgb("+f.AttributeData.toColorRGB(c.getFgColor()).join(",")+")";else{var y=c.getFgColor();l._optionsService.options.drawBoldTextInBrightColors&&c.isBold()&&y<8&&(y+=8),l._ctx.fillStyle=l._colors.ansi[y].css}l._fillBottomLineAtCells(p,x,c.getWidth()),l._ctx.restore()}})},u.prototype.onGridChanged=function(t,i){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,t,this._bufferService.cols,i-t+1),this._drawBackground(t,i),this._drawForeground(t,i))},u.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},u.prototype._isOverlapping=function(t){if(t.getWidth()!==1||t.getCode()<256)return!1;var i=t.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},u}(a.BaseRenderLayer);o.TextRenderLayer=s},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.GridCache=void 0;var m=function(){function b(){this.cache=[]}return b.prototype.resize=function(_,a){for(var f=0;f<_;f++){this.cache.length<=f&&this.cache.push([]);for(var h=this.cache[f].length;h<a;h++)this.cache[f].push(void 0);this.cache[f].length=a}this.cache.length=_},b.prototype.clear=function(){for(var _=0;_<this.cache.length;_++)for(var a=0;a<this.cache[_].length;a++)this.cache[_][a]=void 0},b}();o.GridCache=m},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(l,c){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,x){p.__proto__=x}||function(p,x){for(var v in x)x.hasOwnProperty(v)&&(p[v]=x[v])})(l,c)},function(l,c){function p(){this.constructor=l}m(l,c),l.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)});Object.defineProperty(o,"__esModule",{value:!0}),o.NoneCharAtlas=o.DynamicCharAtlas=o.getGlyphCacheKey=void 0;var _=d(9),a=d(44),f=d(27),h=d(46),r=d(11),n=d(28),s=d(10),e={css:"rgba(0, 0, 0, 0)",rgba:0};function u(l){return l.code<<21|l.bg<<12|l.fg<<3|(l.bold?0:4)+(l.dim?0:2)+(l.italic?0:1)}o.getGlyphCacheKey=u;var t=function(l){function c(p,x){var v=l.call(this)||this;v._config=x,v._drawToCacheCount=0,v._glyphsWaitingOnBitmap=[],v._bitmapCommitTimeout=null,v._bitmap=null,v._cacheCanvas=p.createElement("canvas"),v._cacheCanvas.width=1024,v._cacheCanvas.height=1024,v._cacheCtx=n.throwIfFalsy(v._cacheCanvas.getContext("2d",{alpha:!0}));var y=p.createElement("canvas");y.width=v._config.scaledCharWidth,y.height=v._config.scaledCharHeight,v._tmpCtx=n.throwIfFalsy(y.getContext("2d",{alpha:v._config.allowTransparency})),v._width=Math.floor(1024/v._config.scaledCharWidth),v._height=Math.floor(1024/v._config.scaledCharHeight);var g=v._width*v._height;return v._cacheMap=new h.LRUMap(g),v._cacheMap.prealloc(g),v}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(p,x,v,y){if(x.code===32)return!0;if(!this._canCache(x))return!1;var g=u(x),w=this._cacheMap.get(g);if(w!=null)return this._drawFromCache(p,w,v,y),!0;if(this._drawToCacheCount<100){var E=void 0;E=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var S=this._drawToCache(x,E);return this._cacheMap.set(g,S),this._drawFromCache(p,S,v,y),!0}return!1},c.prototype._canCache=function(p){return p.code<256},c.prototype._toCoordinateX=function(p){return p%this._width*this._config.scaledCharWidth},c.prototype._toCoordinateY=function(p){return Math.floor(p/this._width)*this._config.scaledCharHeight},c.prototype._drawFromCache=function(p,x,v,y){if(!x.isEmpty){var g=this._toCoordinateX(x.index),w=this._toCoordinateY(x.index);p.drawImage(x.inBitmap?this._bitmap:this._cacheCanvas,g,w,this._config.scaledCharWidth,this._config.scaledCharHeight,v,y,this._config.scaledCharWidth,this._config.scaledCharHeight)}},c.prototype._getColorFromAnsiIndex=function(p){return p<this._config.colors.ansi.length?this._config.colors.ansi[p]:f.DEFAULT_ANSI_COLORS[p]},c.prototype._getBackgroundColor=function(p){return this._config.allowTransparency?e:p.bg===_.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:p.bg<256?this._getColorFromAnsiIndex(p.bg):this._config.colors.background},c.prototype._getForegroundColor=function(p){return p.fg===_.INVERTED_DEFAULT_COLOR?s.color.opaque(this._config.colors.background):p.fg<256?this._getColorFromAnsiIndex(p.fg):this._config.colors.foreground},c.prototype._drawToCache=function(p,x){this._drawToCacheCount++,this._tmpCtx.save();var v=this._getBackgroundColor(p);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=v.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var y=p.bold?this._config.fontWeightBold:this._config.fontWeight,g=p.italic?"italic":"";this._tmpCtx.font=g+" "+y+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(p).css,p.dim&&(this._tmpCtx.globalAlpha=_.DIM_OPACITY),this._tmpCtx.fillText(p.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var w=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),E=!1;this._config.allowTransparency||(E=function(L,z){for(var j=!0,le=z.rgba>>>24,U=z.rgba>>>16&255,J=z.rgba>>>8&255,A=0;A<L.data.length;A+=4)L.data[A]===le&&L.data[A+1]===U&&L.data[A+2]===J?L.data[A+3]=0:j=!1;return j}(w,v));var S=this._toCoordinateX(x),k=this._toCoordinateY(x);this._cacheCtx.putImageData(w,S,k);var D={index:x,isEmpty:E,inBitmap:!1};return this._addGlyphToBitmap(D),D},c.prototype._addGlyphToBitmap=function(p){var x=this;!("createImageBitmap"in window)||r.isFirefox||r.isSafari||(this._glyphsWaitingOnBitmap.push(p),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return x._generateBitmap()},100)))},c.prototype._generateBitmap=function(){var p=this,x=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(v){p._bitmap=v;for(var y=0;y<x.length;y++)x[y].inBitmap=!0}),this._bitmapCommitTimeout=null},c}(a.BaseCharAtlas);o.DynamicCharAtlas=t;var i=function(l){function c(p,x){return l.call(this)||this}return b(c,l),c.prototype.draw=function(p,x,v,y){return!1},c}(a.BaseCharAtlas);o.NoneCharAtlas=i},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BaseCharAtlas=void 0;var m=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}();o.BaseCharAtlas=m},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;var m=function(){function b(){this._color={},this._rgba={}}return b.prototype.clear=function(){this._color={},this._rgba={}},b.prototype.setCss=function(_,a,f){this._rgba[_]||(this._rgba[_]={}),this._rgba[_][a]=f},b.prototype.getCss=function(_,a){return this._rgba[_]?this._rgba[_][a]:void 0},b.prototype.setColor=function(_,a,f){this._color[_]||(this._color[_]={}),this._color[_][a]=f},b.prototype.getColor=function(_,a){return this._color[_]?this._color[_][a]:void 0},b}();o.ColorContrastCache=m},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.LRUMap=void 0;var m=function(){function b(_){this.capacity=_,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return b.prototype._unlinkNode=function(_){var a=_.prev,f=_.next;_===this._head&&(this._head=f),_===this._tail&&(this._tail=a),a!==null&&(a.next=f),f!==null&&(f.prev=a)},b.prototype._appendNode=function(_){var a=this._tail;a!==null&&(a.next=_),_.prev=a,_.next=null,this._tail=_,this._head===null&&(this._head=_)},b.prototype.prealloc=function(_){for(var a=this._nodePool,f=0;f<_;f++)a.push({prev:null,next:null,key:null,value:null})},b.prototype.get=function(_){var a=this._map[_];return a!==void 0?(this._unlinkNode(a),this._appendNode(a),a.value):null},b.prototype.peekValue=function(_){var a=this._map[_];return a!==void 0?a.value:null},b.prototype.peek=function(){var _=this._head;return _===null?null:_.value},b.prototype.set=function(_,a){var f=this._map[_];if(f!==void 0)f=this._map[_],this._unlinkNode(f),f.value=a;else if(this.size>=this.capacity)f=this._head,this._unlinkNode(f),delete this._map[f.key],f.key=_,f.value=a,this._map[_]=f;else{var h=this._nodePool;h.length>0?((f=h.pop()).key=_,f.value=a):f={prev:null,next:null,key:_,value:a},this._map[_]=f,this.size++}this._appendNode(f)},b}();o.LRUMap=m},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(a,f){return(m=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])})(a,f)},function(a,f){function h(){this.constructor=a}m(a,f),a.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)});Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionRenderLayer=void 0;var _=function(a){function f(h,r,n,s,e,u){var t=a.call(this,h,"selection",r,!0,n,s,e,u)||this;return t._clearState(),t}return b(f,a),f.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},f.prototype.resize=function(h){a.prototype.resize.call(this,h),this._clearState()},f.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},f.prototype.onSelectionChanged=function(h,r,n){if(this._didStateChange(h,r,n,this._bufferService.buffer.ydisp))if(this._clearAll(),h&&r){var s=h[1]-this._bufferService.buffer.ydisp,e=r[1]-this._bufferService.buffer.ydisp,u=Math.max(s,0),t=Math.min(e,this._bufferService.rows-1);if(!(u>=this._bufferService.rows||t<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,n){var i=h[0],l=r[0]-i,c=t-u+1;this._fillCells(i,u,l,c)}else{i=s===u?h[0]:0;var p=u===t?r[0]:this._bufferService.cols;this._fillCells(i,u,p-i,1);var x=Math.max(t-u-1,0);if(this._fillCells(0,u+1,this._bufferService.cols,x),u!==t){var v=e===t?r[0]:this._bufferService.cols;this._fillCells(0,t,v,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()},f.prototype._didStateChange=function(h,r,n,s){return!this._areCoordinatesEqual(h,this._state.start)||!this._areCoordinatesEqual(r,this._state.end)||n!==this._state.columnSelectMode||s!==this._state.ydisp},f.prototype._areCoordinatesEqual=function(h,r){return!(!h||!r)&&h[0]===r[0]&&h[1]===r[1]},f}(d(13).BaseRenderLayer);o.SelectionRenderLayer=_},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(r,n){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,e){s.__proto__=e}||function(s,e){for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u])})(r,n)},function(r,n){function s(){this.constructor=r}m(r,n),r.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)});Object.defineProperty(o,"__esModule",{value:!0}),o.CursorRenderLayer=void 0;var _=d(13),a=d(4),f=function(r){function n(s,e,u,t,i,l,c,p,x){var v=r.call(this,s,"cursor",e,!0,u,t,l,c)||this;return v._onRequestRedraw=i,v._coreService=p,v._coreBrowserService=x,v._cell=new a.CellData,v._state={x:0,y:0,isFocused:!1,style:"",width:0},v._cursorRenderers={bar:v._renderBarCursor.bind(v),block:v._renderBlockCursor.bind(v),underline:v._renderUnderlineCursor.bind(v)},v}return b(n,r),n.prototype.resize=function(s){r.prototype.resize.call(this,s),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 s,e=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new h(this._coreBrowserService.isFocused,function(){e._render(!0)})):((s=this._cursorBlinkStateManager)===null||s===void 0||s.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype.onGridChanged=function(s,e){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype._render=function(s){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var e=this._bufferService.buffer.ybase+this._bufferService.buffer.y,u=e-this._bufferService.buffer.ydisp;if(u<0||u>=this._bufferService.rows)this._clearCursor();else{var t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(e).loadCell(t,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var i=this._optionsService.options.cursorStyle;return i&&i!=="block"?this._cursorRenderers[i](t,u,this._cell):this._renderBlurCursor(t,u,this._cell),this._ctx.restore(),this._state.x=t,this._state.y=u,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===t&&this._state.y===u&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](t,u,this._cell),this._ctx.restore(),this._state.x=t,this._state.y=u,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(s,e,u){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(s,e,this._optionsService.options.cursorWidth),this._ctx.restore()},n.prototype._renderBlockCursor=function(s,e,u){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(s,e,u.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(u,s,e),this._ctx.restore()},n.prototype._renderUnderlineCursor=function(s,e,u){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(s,e),this._ctx.restore()},n.prototype._renderBlurCursor=function(s,e,u){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(s,e,u.getWidth(),1),this._ctx.restore()},n}(_.BaseRenderLayer);o.CursorRenderLayer=f;var h=function(){function r(n,s){this._renderCallback=s,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 s=this;n===void 0&&(n=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(s._animationTimeRestarted){var e=600-(Date.now()-s._animationTimeRestarted);if(s._animationTimeRestarted=void 0,e>0)return void s._restartInterval(e)}s.isCursorVisible=!1,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0}),s._blinkInterval=window.setInterval(function(){if(s._animationTimeRestarted){var u=600-(Date.now()-s._animationTimeRestarted);return s._animationTimeRestarted=void 0,void s._restartInterval(u)}s.isCursorVisible=!s.isCursorVisible,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._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(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(r,n){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,e){s.__proto__=e}||function(s,e){for(var u in e)e.hasOwnProperty(u)&&(s[u]=e[u])})(r,n)},function(r,n){function s(){this.constructor=r}m(r,n),r.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)});Object.defineProperty(o,"__esModule",{value:!0}),o.LinkRenderLayer=void 0;var _=d(13),a=d(9),f=d(26),h=function(r){function n(s,e,u,t,i,l,c,p){var x=r.call(this,s,"link",e,!0,u,t,c,p)||this;return i.onShowLinkUnderline(function(v){return x._onShowLinkUnderline(v)}),i.onHideLinkUnderline(function(v){return x._onHideLinkUnderline(v)}),l.onShowLinkUnderline(function(v){return x._onShowLinkUnderline(v)}),l.onHideLinkUnderline(function(v){return x._onHideLinkUnderline(v)}),x}return b(n,r),n.prototype.resize=function(s){r.prototype.resize.call(this,s),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 s=this._state.y2-this._state.y1-1;s>0&&this._clearCells(0,this._state.y1+1,this._state.cols,s),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},n.prototype._onShowLinkUnderline=function(s){if(s.fg===a.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:s.fg&&f.is256Color(s.fg)?this._ctx.fillStyle=this._colors.ansi[s.fg].css:this._ctx.fillStyle=this._colors.foreground.css,s.y1===s.y2)this._fillBottomLineAtCells(s.x1,s.y1,s.x2-s.x1);else{this._fillBottomLineAtCells(s.x1,s.y1,s.cols-s.x1);for(var e=s.y1+1;e<s.y2;e++)this._fillBottomLineAtCells(0,e,s.cols);this._fillBottomLineAtCells(0,s.y2,s.x2)}this._state=s},n.prototype._onHideLinkUnderline=function(s){this._clearCurrentLink()},n}(_.BaseRenderLayer);o.LinkRenderLayer=h},function(O,o,d){"use strict";var m=this&&this.__decorate||function(r,n,s,e){var u,t=arguments.length,i=t<3?n:e===null?e=Object.getOwnPropertyDescriptor(n,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,n,s,e);else for(var l=r.length-1;l>=0;l--)(u=r[l])&&(i=(t<3?u(i):t>3?u(n,s,i):u(n,s))||i);return t>3&&i&&Object.defineProperty(n,s,i),i},b=this&&this.__param||function(r,n){return function(s,e){n(s,e,r)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZone=o.Linkifier=void 0;var _=d(0),a=d(1),f=function(){function r(n,s,e){this._bufferService=n,this._logService=s,this._unicodeService=e,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new _.EventEmitter,this._onHideLinkUnderline=new _.EventEmitter,this._onLinkTooltip=new _.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(r.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),r.prototype.attachToDom=function(n,s){this._element=n,this._mouseZoneManager=s},r.prototype.linkifyRows=function(n,s){var e=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=n,this._rowsToLinkify.end=s):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,n),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,s)),this._mouseZoneManager.clearAll(n,s),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return e._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 s=n.ydisp+this._rowsToLinkify.start;if(!(s>=n.lines.length)){for(var e=n.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,u=Math.ceil(2e3/this._bufferService.cols),t=this._bufferService.buffer.iterator(!1,s,e,u,u);t.hasNext();)for(var i=t.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,s,e){if(e===void 0&&(e={}),!s)throw new Error("handler must be defined");var u={id:this._nextLinkMatcherId++,regex:n,handler:s,matchIndex:e.matchIndex,validationCallback:e.validationCallback,hoverTooltipCallback:e.tooltipCallback,hoverLeaveCallback:e.leaveCallback,willLinkActivate:e.willLinkActivate,priority:e.priority||0};return this._addLinkMatcherToList(u),u.id},r.prototype._addLinkMatcherToList=function(n){if(this._linkMatchers.length!==0){for(var s=this._linkMatchers.length-1;s>=0;s--)if(n.priority<=this._linkMatchers[s].priority)return void this._linkMatchers.splice(s+1,0,n);this._linkMatchers.splice(0,0,n)}else this._linkMatchers.push(n)},r.prototype.deregisterLinkMatcher=function(n){for(var s=0;s<this._linkMatchers.length;s++)if(this._linkMatchers[s].id===n)return this._linkMatchers.splice(s,1),!0;return!1},r.prototype._doLinkifyRow=function(n,s,e){for(var u,t=this,i=new RegExp(e.regex.source,(e.regex.flags||"")+"g"),l=-1,c=function(){var x=u[typeof e.matchIndex!="number"?0:e.matchIndex];if(!x)return p._logService.debug("match found without corresponding matchIndex",u,e),"break";if(l=s.indexOf(x,l+1),i.lastIndex=l+x.length,l<0)return"break";var v=p._bufferService.buffer.stringIndexToBufferIndex(n,l);if(v[0]<0)return"break";var y=p._bufferService.buffer.lines.get(v[0]);if(!y)return"break";var g=y.getFg(v[1]),w=g?g>>9&511:void 0;e.validationCallback?e.validationCallback(x,function(E){t._rowsTimeoutId||E&&t._addLink(v[1],v[0]-t._bufferService.buffer.ydisp,x,e,w)}):p._addLink(v[1],v[0]-p._bufferService.buffer.ydisp,x,e,w)},p=this;(u=i.exec(s))!==null&&c()!=="break";);},r.prototype._addLink=function(n,s,e,u,t){var i=this;if(this._mouseZoneManager&&this._element){var l=this._unicodeService.getStringCellWidth(e),c=n%this._bufferService.cols,p=s+Math.floor(n/this._bufferService.cols),x=(c+l)%this._bufferService.cols,v=p+Math.floor((c+l)/this._bufferService.cols);x===0&&(x=this._bufferService.cols,v--),this._mouseZoneManager.add(new h(c+1,p+1,x+1,v+1,function(y){if(u.handler)return u.handler(y,e);var g=window.open();g?(g.opener=null,g.location.href=e):console.warn("Opening link blocked as opener could not be cleared")},function(){i._onShowLinkUnderline.fire(i._createLinkHoverEvent(c,p,x,v,t)),i._element.classList.add("xterm-cursor-pointer")},function(y){i._onLinkTooltip.fire(i._createLinkHoverEvent(c,p,x,v,t)),u.hoverTooltipCallback&&u.hoverTooltipCallback(y,e,{start:{x:c,y:p},end:{x,y:v}})},function(){i._onHideLinkUnderline.fire(i._createLinkHoverEvent(c,p,x,v,t)),i._element.classList.remove("xterm-cursor-pointer"),u.hoverLeaveCallback&&u.hoverLeaveCallback()},function(y){return!u.willLinkActivate||u.willLinkActivate(y,e)}))}},r.prototype._createLinkHoverEvent=function(n,s,e,u,t){return{x1:n,y1:s,x2:e,y2:u,cols:this._bufferService.cols,fg:t}},r._timeBeforeLatency=200,r=m([b(0,a.IBufferService),b(1,a.ILogService),b(2,a.IUnicodeService)],r)}();o.Linkifier=f;var h=function(r,n,s,e,u,t,i,l,c){this.x1=r,this.y1=n,this.x2=s,this.y2=e,this.clickCallback=u,this.hoverCallback=t,this.tooltipCallback=i,this.leaveCallback=l,this.willLinkActivate=c};o.MouseZone=h},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(x,v){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,g){y.__proto__=g}||function(y,g){for(var w in g)g.hasOwnProperty(w)&&(y[w]=g[w])})(x,v)},function(x,v){function y(){this.constructor=x}m(x,v),x.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}),_=this&&this.__decorate||function(x,v,y,g){var w,E=arguments.length,S=E<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,y):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(x,v,y,g);else for(var k=x.length-1;k>=0;k--)(w=x[k])&&(S=(E<3?w(S):E>3?w(v,y,S):w(v,y))||S);return E>3&&S&&Object.defineProperty(v,y,S),S},a=this&&this.__param||function(x,v){return function(y,g){v(y,g,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;var f=d(11),h=d(52),r=d(4),n=d(0),s=d(5),e=d(1),u=d(30),t=d(53),i=d(2),l="\xA0",c=new RegExp(l,"g"),p=function(x){function v(y,g,w,E,S,k,D){var L=x.call(this)||this;return L._element=y,L._screenElement=g,L._bufferService=w,L._coreService=E,L._mouseService=S,L._optionsService=k,L._renderService=D,L._dragScrollAmount=0,L._enabled=!0,L._workCell=new r.CellData,L._mouseDownTimeStamp=0,L._onLinuxMouseSelection=L.register(new n.EventEmitter),L._onRedrawRequest=L.register(new n.EventEmitter),L._onSelectionChange=L.register(new n.EventEmitter),L._onRequestScrollLines=L.register(new n.EventEmitter),L._mouseMoveListener=function(z){return L._onMouseMove(z)},L._mouseUpListener=function(z){return L._onMouseUp(z)},L._coreService.onUserInput(function(){L.hasSelection&&L.clearSelection()}),L._trimListener=L._bufferService.buffer.lines.onTrim(function(z){return L._onTrim(z)}),L.register(L._bufferService.buffers.onBufferActivate(function(z){return L._onBufferActivate(z)})),L.enable(),L._model=new h.SelectionModel(L._bufferService),L._activeSelectionMode=0,L}return b(v,x),Object.defineProperty(v.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),v.prototype.dispose=function(){this._removeMouseDownListeners()},v.prototype.reset=function(){this.clearSelection()},v.prototype.disable=function(){this.clearSelection(),this._enabled=!1},v.prototype.enable=function(){this._enabled=!0},Object.defineProperty(v.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"hasSelection",{get:function(){var y=this._model.finalSelectionStart,g=this._model.finalSelectionEnd;return!(!y||!g)&&(y[0]!==g[0]||y[1]!==g[1])},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"selectionText",{get:function(){var y=this._model.finalSelectionStart,g=this._model.finalSelectionEnd;if(!y||!g)return"";var w=this._bufferService.buffer,E=[];if(this._activeSelectionMode===3){if(y[0]===g[0])return"";for(var S=y[1];S<=g[1];S++){var k=w.translateBufferLineToString(S,!0,y[0],g[0]);E.push(k)}}else{var D=y[1]===g[1]?g[0]:void 0;for(E.push(w.translateBufferLineToString(y[1],!0,y[0],D)),S=y[1]+1;S<=g[1]-1;S++){var L=w.lines.get(S);k=w.translateBufferLineToString(S,!0),L&&L.isWrapped?E[E.length-1]+=k:E.push(k)}y[1]!==g[1]&&(L=w.lines.get(g[1]),k=w.translateBufferLineToString(g[1],!0,0,g[0]),L&&L.isWrapped?E[E.length-1]+=k:E.push(k))}return E.map(function(z){return z.replace(c," ")}).join(f.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),v.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},v.prototype.refresh=function(y){var g=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return g._refresh()})),f.isLinux&&y&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},v.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},v.prototype.isClickInSelection=function(y){var g=this._getMouseBufferCoords(y),w=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;return!!(w&&E&&g)&&this._areCoordsInSelection(g,w,E)},v.prototype._areCoordsInSelection=function(y,g,w){return y[1]>g[1]&&y[1]<w[1]||g[1]===w[1]&&y[1]===g[1]&&y[0]>=g[0]&&y[0]<w[0]||g[1]<w[1]&&y[1]===w[1]&&y[0]<w[0]||g[1]<w[1]&&y[1]===g[1]&&y[0]>=g[0]},v.prototype.selectWordAtCursor=function(y){var g=this._getMouseBufferCoords(y);g&&(this._selectWordAt(g,!1),this._model.selectionEnd=void 0,this.refresh(!0))},v.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},v.prototype.selectLines=function(y,g){this._model.clearSelection(),y=Math.max(y,0),g=Math.min(g,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,g],this.refresh(),this._onSelectionChange.fire()},v.prototype._onTrim=function(y){this._model.onTrim(y)&&this.refresh()},v.prototype._getMouseBufferCoords=function(y){var g=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(g)return g[0]--,g[1]--,g[1]+=this._bufferService.buffer.ydisp,g},v.prototype._getMouseEventScrollAmount=function(y){var g=u.getCoordsRelativeToElement(y,this._screenElement)[1],w=this._renderService.dimensions.canvasHeight;return g>=0&&g<=w?0:(g>w&&(g-=w),g=Math.min(Math.max(g,-50),50),(g/=50)/Math.abs(g)+Math.round(14*g))},v.prototype.shouldForceSelection=function(y){return f.isMac?y.altKey&&this._optionsService.options.macOptionClickForcesSelection:y.shiftKey},v.prototype.onMouseDown=function(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._onIncrementalClick(y):y.detail===1?this._onSingleClick(y):y.detail===2?this._onDoubleClick(y):y.detail===3&&this._onTripleClick(y),this._addMouseDownListeners(),this.refresh(!0)}},v.prototype._addMouseDownListeners=function(){var y=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return y._dragScroll()},50)},v.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},v.prototype._onIncrementalClick=function(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))},v.prototype._onSingleClick=function(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),this._model.selectionStart){this._model.selectionEnd=void 0;var g=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);g&&g.length!==this._model.selectionStart[0]&&g.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},v.prototype._onDoubleClick=function(y){var g=this._getMouseBufferCoords(y);g&&(this._activeSelectionMode=1,this._selectWordAt(g,!0))},v.prototype._onTripleClick=function(y){var g=this._getMouseBufferCoords(y);g&&(this._activeSelectionMode=2,this._selectLineAt(g[1]))},v.prototype.shouldColumnSelect=function(y){return y.altKey&&!(f.isMac&&this._optionsService.options.macOptionClickForcesSelection)},v.prototype._onMouseMove=function(y){if(y.stopImmediatePropagation(),this._model.selectionStart){var g=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),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(y),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var w=this._bufferService.buffer;if(this._model.selectionEnd[1]<w.lines.length){var E=w.lines.get(this._model.selectionEnd[1]);E&&E.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}g&&g[0]===this._model.selectionEnd[0]&&g[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},v.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}},v.prototype._onMouseUp=function(y){var g=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&g<500&&y.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var w=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(w&&w[0]!==void 0&&w[1]!==void 0){var E=t.moveToCellSequence(w[0]-1,w[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(E,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},v.prototype._onBufferActivate=function(y){var g=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim(function(w){return g._onTrim(w)})},v.prototype._convertViewportColToCharacterIndex=function(y,g){for(var w=g[0],E=0;g[0]>=E;E++){var S=y.loadCell(E,this._workCell).getChars().length;this._workCell.getWidth()===0?w--:S>1&&g[0]!==E&&(w+=S-1)}return w},v.prototype.setSelection=function(y,g,w){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,g],this._model.selectionStartLength=w,this.refresh()},v.prototype._getWordAt=function(y,g,w,E){if(w===void 0&&(w=!0),E===void 0&&(E=!0),!(y[0]>=this._bufferService.cols)){var S=this._bufferService.buffer,k=S.lines.get(y[1]);if(k){var D=S.translateBufferLineToString(y[1],!1),L=this._convertViewportColToCharacterIndex(k,y),z=L,j=y[0]-L,le=0,U=0,J=0,A=0;if(D.charAt(L)===" "){for(;L>0&&D.charAt(L-1)===" ";)L--;for(;z<D.length&&D.charAt(z+1)===" ";)z++}else{var P=y[0],K=y[0];k.getWidth(P)===0&&(le++,P--),k.getWidth(K)===2&&(U++,K++);var $=k.getString(K).length;for($>1&&(A+=$-1,z+=$-1);P>0&&L>0&&!this._isCharWordSeparator(k.loadCell(P-1,this._workCell));){k.loadCell(P-1,this._workCell);var H=this._workCell.getChars().length;this._workCell.getWidth()===0?(le++,P--):H>1&&(J+=H-1,L-=H-1),L--,P--}for(;K<k.length&&z+1<D.length&&!this._isCharWordSeparator(k.loadCell(K+1,this._workCell));){k.loadCell(K+1,this._workCell);var ne=this._workCell.getChars().length;this._workCell.getWidth()===2?(U++,K++):ne>1&&(A+=ne-1,z+=ne-1),z++,K++}}z++;var ve=L+j-le+J,Se=Math.min(this._bufferService.cols,z-L+le+U-J-A);if(g||D.slice(L,z).trim()!==""){if(w&&ve===0&&k.getCodePoint(0)!==32){var He=S.lines.get(y[1]-1);if(He&&k.isWrapped&&He.getCodePoint(this._bufferService.cols-1)!==32){var Me=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(Me){var he=this._bufferService.cols-Me.start;ve-=he,Se+=he}}}if(E&&ve+Se===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){var ke=S.lines.get(y[1]+1);if(ke&&ke.isWrapped&&ke.getCodePoint(0)!==32){var Ke=this._getWordAt([0,y[1]+1],!1,!1,!0);Ke&&(Se+=Ke.length)}}return{start:ve,length:Se}}}}},v.prototype._selectWordAt=function(y,g){var w=this._getWordAt(y,g);if(w){for(;w.start<0;)w.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[w.start,y[1]],this._model.selectionStartLength=w.length}},v.prototype._selectToWordAt=function(y){var g=this._getWordAt(y,!0);if(g){for(var w=y[1];g.start<0;)g.start+=this._bufferService.cols,w--;if(!this._model.areSelectionValuesReversed())for(;g.start+g.length>this._bufferService.cols;)g.length-=this._bufferService.cols,w++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?g.start:g.start+g.length,w]}},v.prototype._isCharWordSeparator=function(y){return y.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(y.getChars())>=0},v.prototype._selectLineAt=function(y){var g=this._bufferService.buffer.getWrappedRangeForLine(y);this._model.selectionStart=[0,g.first],this._model.selectionEnd=[this._bufferService.cols,g.last],this._model.selectionStartLength=0},v=_([a(2,e.IBufferService),a(3,e.ICoreService),a(4,s.IMouseService),a(5,e.IOptionsService),a(6,s.IRenderService)],v)}(i.Disposable);o.SelectionService=p},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0;var m=function(){function b(_){this._bufferService=_,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 _=this.selectionStart[0]+this.selectionStartLength;return _>this._bufferService.cols?[_%this._bufferService.cols,this.selectionStart[1]+Math.floor(_/this._bufferService.cols)]:[_,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),b.prototype.areSelectionValuesReversed=function(){var _=this.selectionStart,a=this.selectionEnd;return!(!_||!a)&&(_[1]>a[1]||_[1]===a[1]&&_[0]>a[0])},b.prototype.onTrim=function(_){return this.selectionStart&&(this.selectionStart[1]-=_),this.selectionEnd&&(this.selectionEnd[1]-=_),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},b}();o.SelectionModel=m},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;var m=d(12);function b(n,s,e,u){var t=n-_(e,n),i=s-_(e,s);return r(Math.abs(t-i)-function(l,c,p){for(var x=0,v=l-_(p,l),y=c-_(p,c),g=0;g<Math.abs(v-y);g++){var w=a(l,c)==="A"?-1:1,E=p.buffer.lines.get(v+w*g);E&&E.isWrapped&&x++}return x}(n,s,e),h(a(n,s),u))}function _(n,s){for(var e=0,u=n.buffer.lines.get(s),t=u&&u.isWrapped;t&&s>=0&&s<n.rows;)e++,t=(u=n.buffer.lines.get(--s))&&u.isWrapped;return e}function a(n,s){return n>s?"A":"B"}function f(n,s,e,u,t,i){for(var l=n,c=s,p="";l!==e||c!==u;)l+=t?1:-1,t&&l>i.cols-1?(p+=i.buffer.translateBufferLineToString(c,!1,n,l),l=0,n=0,c++):!t&&l<0&&(p+=i.buffer.translateBufferLineToString(c,!1,0,n+1),n=l=i.cols-1,c--);return p+i.buffer.translateBufferLineToString(c,!1,n,l)}function h(n,s){var e=s?"O":"[";return m.C0.ESC+e+n}function r(n,s){n=Math.floor(n);for(var e="",u=0;u<n;u++)e+=s;return e}o.moveToCellSequence=function(n,s,e,u){var t,i=e.buffer.x,l=e.buffer.y;if(!e.buffer.hasScrollback)return function(p,x,v,y,g,w){return b(x,y,g,w).length===0?"":r(f(p,x,p,x-_(g,x),!1,g).length,h("D",w))}(i,l,0,s,e,u)+b(l,s,e,u)+function(p,x,v,y,g,w){var E;E=b(x,y,g,w).length>0?y-_(g,y):x;var S=y,k=function(D,L,z,j,le,U){var J;return J=b(z,j,le,U).length>0?j-_(le,j):L,D<z&&J<=j||D>=z&&J<j?"C":"D"}(p,x,v,y,g,w);return r(f(p,E,v,S,k==="C",g).length,h(k,w))}(i,l,n,s,e,u);if(l===s)return t=i>n?"D":"C",r(Math.abs(i-n),h(t,u));t=l>s?"D":"C";var c=Math.abs(l-s);return r(function(p,x){return x.cols-p}(l>s?n:i,e)+(c-1)*e.cols+1+((l>s?i:n)-1),h(t,u))}},function(O,o,d){"use strict";var m=this&&this.__decorate||function(f,h,r,n){var s,e=arguments.length,u=e<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(f,h,r,n);else for(var t=f.length-1;t>=0;t--)(s=f[t])&&(u=(e<3?s(u):e>3?s(h,r,u):s(h,r))||u);return e>3&&u&&Object.defineProperty(h,r,u),u},b=this&&this.__param||function(f,h){return function(r,n){h(r,n,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SoundService=void 0;var _=d(1),a=function(){function f(h){this._optionsService=h}return Object.defineProperty(f,"audioContext",{get:function(){if(!f._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;f._audioContext=new h}return f._audioContext},enumerable:!1,configurable:!0}),f.prototype.playBellSound=function(){var h=f.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)})}},f.prototype._base64ToArrayBuffer=function(h){for(var r=window.atob(h),n=r.length,s=new Uint8Array(n),e=0;e<n;e++)s[e]=r.charCodeAt(e);return s.buffer},f.prototype._removeMimeType=function(h){return h.split(",")[1]},f=m([b(0,_.IOptionsService)],f)}();o.SoundService=a},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(e,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var l in i)i.hasOwnProperty(l)&&(t[l]=i[l])})(e,u)},function(e,u){function t(){this.constructor=e}m(e,u),e.prototype=u===null?Object.create(u):(t.prototype=u.prototype,new t)}),_=this&&this.__decorate||function(e,u,t,i){var l,c=arguments.length,p=c<3?u:i===null?i=Object.getOwnPropertyDescriptor(u,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,u,t,i);else for(var x=e.length-1;x>=0;x--)(l=e[x])&&(p=(c<3?l(p):c>3?l(u,t,p):l(u,t))||p);return c>3&&p&&Object.defineProperty(u,t,p),p},a=this&&this.__param||function(e,u){return function(t,i){u(t,i,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseZoneManager=void 0;var f=d(2),h=d(7),r=d(5),n=d(1),s=function(e){function u(t,i,l,c,p,x){var v=e.call(this)||this;return v._element=t,v._screenElement=i,v._bufferService=l,v._mouseService=c,v._selectionService=p,v._optionsService=x,v._zones=[],v._areZonesActive=!1,v._lastHoverCoords=[void 0,void 0],v._initialSelectionLength=0,v.register(h.addDisposableDomListener(v._element,"mousedown",function(y){return v._onMouseDown(y)})),v._mouseMoveListener=function(y){return v._onMouseMove(y)},v._mouseLeaveListener=function(y){return v._onMouseLeave(y)},v._clickListener=function(y){return v._onClick(y)},v}return b(u,e),u.prototype.dispose=function(){e.prototype.dispose.call(this),this._deactivate()},u.prototype.add=function(t){this._zones.push(t),this._zones.length===1&&this._activate()},u.prototype.clearAll=function(t,i){if(this._zones.length!==0){t&&i||(t=0,i=this._bufferService.rows-1);for(var l=0;l<this._zones.length;l++){var c=this._zones[l];(c.y1>t&&c.y1<=i+1||c.y2>t&&c.y2<=i+1||c.y1<t&&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()}},u.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))},u.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))},u.prototype._onMouseMove=function(t){this._lastHoverCoords[0]===t.pageX&&this._lastHoverCoords[1]===t.pageY||(this._onHover(t),this._lastHoverCoords=[t.pageX,t.pageY])},u.prototype._onHover=function(t){var i=this,l=this._findZoneEventAt(t);l!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),l&&(this._currentZone=l,l.hoverCallback&&l.hoverCallback(t),this._tooltipTimeout=window.setTimeout(function(){return i._onTooltip(t)},this._optionsService.options.linkTooltipHoverDuration)))},u.prototype._onTooltip=function(t){this._tooltipTimeout=void 0;var i=this._findZoneEventAt(t);i&&i.tooltipCallback&&i.tooltipCallback(t)},u.prototype._onMouseDown=function(t){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var i=this._findZoneEventAt(t);i!=null&&i.willLinkActivate(t)&&(t.preventDefault(),t.stopImmediatePropagation())}},u.prototype._onMouseLeave=function(t){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},u.prototype._onClick=function(t){var i=this._findZoneEventAt(t),l=this._getSelectionLength();i&&l===this._initialSelectionLength&&(i.clickCallback(t),t.preventDefault(),t.stopImmediatePropagation())},u.prototype._getSelectionLength=function(){var t=this._selectionService.selectionText;return t?t.length:0},u.prototype._findZoneEventAt=function(t){var i=this._mouseService.getCoords(t,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(i)for(var l=i[0],c=i[1],p=0;p<this._zones.length;p++){var x=this._zones[p];if(x.y1===x.y2){if(c===x.y1&&l>=x.x1&&l<x.x2)return x}else if(c===x.y1&&l>=x.x1||c===x.y2&&l<x.x2||c>x.y1&&c<x.y2)return x}},u=_([a(2,n.IBufferService),a(3,r.IMouseService),a(4,r.ISelectionService),a(5,n.IOptionsService)],u)}(f.Disposable);o.MouseZoneManager=s},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(u,t){return(m=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])})(u,t)},function(u,t){function i(){this.constructor=u}m(u,t),u.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;var _=d(18),a=d(11),f=d(31),h=d(7),r=d(2),n=d(32),s=d(17),e=function(u){function t(i,l){var c=u.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 p=0;p<c._terminal.rows;p++)c._rowElements[p]=c._createAccessibilityTreeNode(),c._rowContainer.appendChild(c._rowElements[p]);if(c._topBoundaryFocusListener=function(x){return c._onBoundaryFocus(x,0)},c._bottomBoundaryFocusListener=function(x){return c._onBoundaryFocus(x,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 f.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(x){return c._onResize(x.rows)})),c.register(c._terminal.onRender(function(x){return c._refreshRows(x.start,x.end)})),c.register(c._terminal.onScroll(function(){return c._refreshRows()})),c.register(c._terminal.onA11yChar(function(x){return c._onChar(x)})),c.register(c._terminal.onLineFeed(function(){return c._onChar(`
|
|
|
`)})),c.register(c._terminal.onA11yTab(function(x){return c._onTab(x)})),c.register(c._terminal.onKey(function(x){return c._onKey(x.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(t,u),t.prototype.dispose=function(){u.prototype.dispose.call(this),s.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(i,l){var c=i.target,p=this._rowElements[l===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")!==(l===0?"1":""+this._terminal.buffer.lines.length)&&i.relatedTarget===p){var x,v;if(l===0?(x=c,v=this._rowElements.pop(),this._rowContainer.removeChild(v)):(x=this._rowElements.shift(),v=c,this._rowContainer.removeChild(x)),x.removeEventListener("focus",this._topBoundaryFocusListener),v.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){var y=this._createAccessibilityTreeNode();this._rowElements.unshift(y),this._rowContainer.insertAdjacentElement("afterbegin",y)}else y=this._createAccessibilityTreeNode(),this._rowElements.push(y),this._rowContainer.appendChild(y);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()}},t.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()},t.prototype._createAccessibilityTreeNode=function(){var i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i},t.prototype._onTab=function(i){for(var l=0;l<i;l++)this._onChar(" ")},t.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+=_.tooMuchOutput)),a.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){l._accessibilityTreeRoot.appendChild(l._liveRegion)},0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,a.isMac&&s.removeElementFromParent(this._liveRegion)},t.prototype._onKey=function(i){this._clearLiveRegion(),this._charsToConsume.push(i)},t.prototype._refreshRows=function(i,l){this._renderRowsDebouncer.refresh(i,l,this._terminal.rows)},t.prototype._renderRows=function(i,l){for(var c=this._terminal.buffer,p=c.lines.length.toString(),x=i;x<=l;x++){var v=c.translateBufferLineToString(c.ydisp+x,!0),y=(c.ydisp+x+1).toString(),g=this._rowElements[x];g&&(v.length===0?g.innerHTML=" ":g.textContent=v,g.setAttribute("aria-posinset",y),g.setAttribute("aria-setsize",p))}this._announceCharacters()},t.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}},t.prototype._refreshRowDimensions=function(i){i.style.height=this._renderService.dimensions.actualCellHeight+"px"},t.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},t}(r.Disposable);o.AccessibilityManager=e},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(c,p){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,v){x.__proto__=v}||function(x,v){for(var y in v)v.hasOwnProperty(y)&&(x[y]=v[y])})(c,p)},function(c,p){function x(){this.constructor=c}m(c,p),c.prototype=p===null?Object.create(p):(x.prototype=p.prototype,new x)}),_=this&&this.__decorate||function(c,p,x,v){var y,g=arguments.length,w=g<3?p:v===null?v=Object.getOwnPropertyDescriptor(p,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,p,x,v);else for(var E=c.length-1;E>=0;E--)(y=c[E])&&(w=(g<3?y(w):g>3?y(p,x,w):y(p,x))||w);return g>3&&w&&Object.defineProperty(p,x,w),w},a=this&&this.__param||function(c,p){return function(x,v){p(x,v,c)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;var f=d(58),h=d(9),r=d(2),n=d(5),s=d(1),e=d(0),u=d(10),t=d(17),i=1,l=function(c){function p(x,v,y,g,w,E,S,k,D){var L=c.call(this)||this;return L._colors=x,L._element=v,L._screenElement=y,L._viewportElement=g,L._linkifier=w,L._linkifier2=E,L._charSizeService=S,L._optionsService=k,L._bufferService=D,L._terminalClass=i++,L._rowElements=[],L._rowContainer=document.createElement("div"),L._rowContainer.classList.add("xterm-rows"),L._rowContainer.style.lineHeight="normal",L._rowContainer.setAttribute("aria-hidden","true"),L._refreshRowElements(L._bufferService.cols,L._bufferService.rows),L._selectionContainer=document.createElement("div"),L._selectionContainer.classList.add("xterm-selection"),L._selectionContainer.setAttribute("aria-hidden","true"),L.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},L._updateDimensions(),L._injectCss(),L._rowFactory=new f.DomRendererRowFactory(document,L._optionsService,L._colors),L._element.classList.add("xterm-dom-renderer-owner-"+L._terminalClass),L._screenElement.appendChild(L._rowContainer),L._screenElement.appendChild(L._selectionContainer),L._linkifier.onShowLinkUnderline(function(z){return L._onLinkHover(z)}),L._linkifier.onHideLinkUnderline(function(z){return L._onLinkLeave(z)}),L._linkifier2.onShowLinkUnderline(function(z){return L._onLinkHover(z)}),L._linkifier2.onHideLinkUnderline(function(z){return L._onLinkLeave(z)}),L}return b(p,c),Object.defineProperty(p.prototype,"onRequestRedraw",{get:function(){return new e.EventEmitter().event},enumerable:!1,configurable:!0}),p.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),t.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),c.prototype.dispose.call(this)},p.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var x=0,v=this._rowElements;x<v.length;x++){var y=v[x];y.style.width=this.dimensions.canvasWidth+"px",y.style.height=this.dimensions.actualCellHeight+"px",y.style.lineHeight=this.dimensions.actualCellHeight+"px",y.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var g=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=g,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},p.prototype.setColors=function(x){this._colors=x,this._injectCss()},p.prototype._injectCss=function(){var x=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var v=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";v+=this._terminalSelector+" span:not(."+f.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+f.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+f.ITALIC_CLASS+" { font-style: italic;}",v+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",v+="@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+"; }}",v+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_BLINK_CLASS+":not(."+f.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_BLINK_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+f.CURSOR_CLASS+"."+f.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",v+=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(y,g){v+=x._terminalSelector+" .xterm-fg-"+g+" { color: "+y.css+"; }"+x._terminalSelector+" .xterm-bg-"+g+" { background-color: "+y.css+"; }"}),v+=this._terminalSelector+" .xterm-fg-"+h.INVERTED_DEFAULT_COLOR+" { color: "+u.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+h.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=v},p.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},p.prototype._refreshRowElements=function(x,v){for(var y=this._rowElements.length;y<=v;y++){var g=document.createElement("div");this._rowContainer.appendChild(g),this._rowElements.push(g)}for(;this._rowElements.length>v;)this._rowContainer.removeChild(this._rowElements.pop())},p.prototype.onResize=function(x,v){this._refreshRowElements(x,v),this._updateDimensions()},p.prototype.onCharSizeChanged=function(){this._updateDimensions()},p.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},p.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},p.prototype.onSelectionChanged=function(x,v,y){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(x&&v){var g=x[1]-this._bufferService.buffer.ydisp,w=v[1]-this._bufferService.buffer.ydisp,E=Math.max(g,0),S=Math.min(w,this._bufferService.rows-1);if(!(E>=this._bufferService.rows||S<0)){var k=document.createDocumentFragment();if(y)k.appendChild(this._createSelectionElement(E,x[0],v[0],S-E+1));else{var D=g===E?x[0]:0,L=E===S?v[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(E,D,L));var z=S-E-1;if(k.appendChild(this._createSelectionElement(E+1,0,this._bufferService.cols,z)),E!==S){var j=w===S?v[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(S,0,j))}}this._selectionContainer.appendChild(k)}}},p.prototype._createSelectionElement=function(x,v,y,g){g===void 0&&(g=1);var w=document.createElement("div");return w.style.height=g*this.dimensions.actualCellHeight+"px",w.style.top=x*this.dimensions.actualCellHeight+"px",w.style.left=v*this.dimensions.actualCellWidth+"px",w.style.width=this.dimensions.actualCellWidth*(y-v)+"px",w},p.prototype.onCursorMove=function(){},p.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},p.prototype.clear=function(){for(var x=0,v=this._rowElements;x<v.length;x++)v[x].innerHTML=""},p.prototype.renderRows=function(x,v){for(var y=this._bufferService.buffer.ybase+this._bufferService.buffer.y,g=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),w=this._optionsService.options.cursorBlink,E=x;E<=v;E++){var S=this._rowElements[E];S.innerHTML="";var k=E+this._bufferService.buffer.ydisp,D=this._bufferService.buffer.lines.get(k),L=this._optionsService.options.cursorStyle;S.appendChild(this._rowFactory.createRow(D,k===y,L,g,w,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(p.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),p.prototype.registerCharacterJoiner=function(x){return-1},p.prototype.deregisterCharacterJoiner=function(x){return!1},p.prototype._onLinkHover=function(x){this._setCellUnderline(x.x1,x.x2,x.y1,x.y2,x.cols,!0)},p.prototype._onLinkLeave=function(x){this._setCellUnderline(x.x1,x.x2,x.y1,x.y2,x.cols,!1)},p.prototype._setCellUnderline=function(x,v,y,g,w,E){for(;x!==v||y!==g;){var S=this._rowElements[y];if(!S)return;var k=S.children[x];k&&(k.style.textDecoration=E?"underline":"none"),++x>=w&&(x=0,y++)}},p=_([a(6,n.ICharSizeService),a(7,s.IOptionsService),a(8,s.IBufferService)],p)}(r.Disposable);o.DomRenderer=l},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=o.CURSOR_STYLE_UNDERLINE_CLASS=o.CURSOR_STYLE_BAR_CLASS=o.CURSOR_STYLE_BLOCK_CLASS=o.CURSOR_BLINK_CLASS=o.CURSOR_CLASS=o.UNDERLINE_CLASS=o.ITALIC_CLASS=o.DIM_CLASS=o.BOLD_CLASS=void 0;var m=d(9),b=d(3),_=d(4),a=d(10);o.BOLD_CLASS="xterm-bold",o.DIM_CLASS="xterm-dim",o.ITALIC_CLASS="xterm-italic",o.UNDERLINE_CLASS="xterm-underline",o.CURSOR_CLASS="xterm-cursor",o.CURSOR_BLINK_CLASS="xterm-cursor-blink",o.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",o.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",o.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var f=function(){function r(n,s,e){this._document=n,this._optionsService=s,this._colors=e,this._workCell=new _.CellData}return r.prototype.setColors=function(n){this._colors=n},r.prototype.createRow=function(n,s,e,u,t,i,l){for(var c=this._document.createDocumentFragment(),p=0,x=Math.min(n.length,l)-1;x>=0;x--)if(n.loadCell(x,this._workCell).getCode()!==b.NULL_CELL_CODE||s&&x===u){p=x+1;break}for(x=0;x<p;x++){n.loadCell(x,this._workCell);var v=this._workCell.getWidth();if(v!==0){var y=this._document.createElement("span");if(v>1&&(y.style.width=i*v+"px"),s&&x===u)switch(y.classList.add(o.CURSOR_CLASS),t&&y.classList.add(o.CURSOR_BLINK_CLASS),e){case"bar":y.classList.add(o.CURSOR_STYLE_BAR_CLASS);break;case"underline":y.classList.add(o.CURSOR_STYLE_UNDERLINE_CLASS);break;default:y.classList.add(o.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&y.classList.add(o.BOLD_CLASS),this._workCell.isItalic()&&y.classList.add(o.ITALIC_CLASS),this._workCell.isDim()&&y.classList.add(o.DIM_CLASS),this._workCell.isUnderline()&&y.classList.add(o.UNDERLINE_CLASS),this._workCell.isInvisible()?y.textContent=b.WHITESPACE_CELL_CHAR:y.textContent=this._workCell.getChars()||b.WHITESPACE_CELL_CHAR;var g=this._workCell.getFgColor(),w=this._workCell.getFgColorMode(),E=this._workCell.getBgColor(),S=this._workCell.getBgColorMode(),k=!!this._workCell.isInverse();if(k){var D=g;g=E,E=D;var L=w;w=S,S=L}switch(w){case 16777216:case 33554432:this._workCell.isBold()&&g<8&&this._optionsService.options.drawBoldTextInBrightColors&&(g+=8),this._applyMinimumContrast(y,this._colors.background,this._colors.ansi[g])||y.classList.add("xterm-fg-"+g);break;case 50331648:var z=a.rgba.toColor(g>>16&255,g>>8&255,255&g);this._applyMinimumContrast(y,this._colors.background,z)||this._addStyle(y,"color:#"+h(g.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(y,this._colors.background,this._colors.foreground)||k&&y.classList.add("xterm-fg-"+m.INVERTED_DEFAULT_COLOR)}switch(S){case 16777216:case 33554432:y.classList.add("xterm-bg-"+E);break;case 50331648:this._addStyle(y,"background-color:#"+h(E.toString(16),"0",6));break;case 0:default:k&&y.classList.add("xterm-bg-"+m.INVERTED_DEFAULT_COLOR)}c.appendChild(y)}}return c},r.prototype._applyMinimumContrast=function(n,s,e){if(this._optionsService.options.minimumContrastRatio===1)return!1;var u=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return u===void 0&&(u=a.color.ensureContrastRatio(s,e,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,u!=null?u:null)),!!u&&(this._addStyle(n,"color:"+u.css),!0)},r.prototype._addStyle=function(n,s){n.setAttribute("style",""+(n.getAttribute("style")||"")+s+";")},r}();function h(r,n,s){for(;r.length<s;)r=n+r;return r}o.DomRendererRowFactory=f},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;var m=d(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:["'",'"']};o.evaluateKeyboardEvent=function(_,a,f,h){var r={type:0,cancel:!1,key:void 0},n=(_.shiftKey?1:0)|(_.altKey?2:0)|(_.ctrlKey?4:0)|(_.metaKey?8:0);switch(_.keyCode){case 0:_.key==="UIKeyInputUpArrow"?r.key=a?m.C0.ESC+"OA":m.C0.ESC+"[A":_.key==="UIKeyInputLeftArrow"?r.key=a?m.C0.ESC+"OD":m.C0.ESC+"[D":_.key==="UIKeyInputRightArrow"?r.key=a?m.C0.ESC+"OC":m.C0.ESC+"[C":_.key==="UIKeyInputDownArrow"&&(r.key=a?m.C0.ESC+"OB":m.C0.ESC+"[B");break;case 8:if(_.shiftKey){r.key=m.C0.BS;break}if(_.altKey){r.key=m.C0.ESC+m.C0.DEL;break}r.key=m.C0.DEL;break;case 9:if(_.shiftKey){r.key=m.C0.ESC+"[Z";break}r.key=m.C0.HT,r.cancel=!0;break;case 13:r.key=_.altKey?m.C0.ESC+m.C0.CR:m.C0.CR,r.cancel=!0;break;case 27:r.key=m.C0.ESC,_.altKey&&(r.key=m.C0.ESC+m.C0.ESC),r.cancel=!0;break;case 37:if(_.metaKey)break;n?(r.key=m.C0.ESC+"[1;"+(n+1)+"D",r.key===m.C0.ESC+"[1;3D"&&(r.key=m.C0.ESC+(f?"b":"[1;5D"))):r.key=a?m.C0.ESC+"OD":m.C0.ESC+"[D";break;case 39:if(_.metaKey)break;n?(r.key=m.C0.ESC+"[1;"+(n+1)+"C",r.key===m.C0.ESC+"[1;3C"&&(r.key=m.C0.ESC+(f?"f":"[1;5C"))):r.key=a?m.C0.ESC+"OC":m.C0.ESC+"[C";break;case 38:if(_.metaKey)break;n?(r.key=m.C0.ESC+"[1;"+(n+1)+"A",f||r.key!==m.C0.ESC+"[1;3A"||(r.key=m.C0.ESC+"[1;5A")):r.key=a?m.C0.ESC+"OA":m.C0.ESC+"[A";break;case 40:if(_.metaKey)break;n?(r.key=m.C0.ESC+"[1;"+(n+1)+"B",f||r.key!==m.C0.ESC+"[1;3B"||(r.key=m.C0.ESC+"[1;5B")):r.key=a?m.C0.ESC+"OB":m.C0.ESC+"[B";break;case 45:_.shiftKey||_.ctrlKey||(r.key=m.C0.ESC+"[2~");break;case 46:r.key=n?m.C0.ESC+"[3;"+(n+1)+"~":m.C0.ESC+"[3~";break;case 36:r.key=n?m.C0.ESC+"[1;"+(n+1)+"H":a?m.C0.ESC+"OH":m.C0.ESC+"[H";break;case 35:r.key=n?m.C0.ESC+"[1;"+(n+1)+"F":a?m.C0.ESC+"OF":m.C0.ESC+"[F";break;case 33:_.shiftKey?r.type=2:r.key=m.C0.ESC+"[5~";break;case 34:_.shiftKey?r.type=3:r.key=m.C0.ESC+"[6~";break;case 112:r.key=n?m.C0.ESC+"[1;"+(n+1)+"P":m.C0.ESC+"OP";break;case 113:r.key=n?m.C0.ESC+"[1;"+(n+1)+"Q":m.C0.ESC+"OQ";break;case 114:r.key=n?m.C0.ESC+"[1;"+(n+1)+"R":m.C0.ESC+"OR";break;case 115:r.key=n?m.C0.ESC+"[1;"+(n+1)+"S":m.C0.ESC+"OS";break;case 116:r.key=n?m.C0.ESC+"[15;"+(n+1)+"~":m.C0.ESC+"[15~";break;case 117:r.key=n?m.C0.ESC+"[17;"+(n+1)+"~":m.C0.ESC+"[17~";break;case 118:r.key=n?m.C0.ESC+"[18;"+(n+1)+"~":m.C0.ESC+"[18~";break;case 119:r.key=n?m.C0.ESC+"[19;"+(n+1)+"~":m.C0.ESC+"[19~";break;case 120:r.key=n?m.C0.ESC+"[20;"+(n+1)+"~":m.C0.ESC+"[20~";break;case 121:r.key=n?m.C0.ESC+"[21;"+(n+1)+"~":m.C0.ESC+"[21~";break;case 122:r.key=n?m.C0.ESC+"[23;"+(n+1)+"~":m.C0.ESC+"[23~";break;case 123:r.key=n?m.C0.ESC+"[24;"+(n+1)+"~":m.C0.ESC+"[24~";break;default:if(!_.ctrlKey||_.shiftKey||_.altKey||_.metaKey)if(f&&!h||!_.altKey||_.metaKey)f&&!_.altKey&&!_.ctrlKey&&_.metaKey?_.keyCode===65&&(r.type=1):_.key&&!_.ctrlKey&&!_.altKey&&!_.metaKey&&_.keyCode>=48&&_.key.length===1?r.key=_.key:_.key&&_.ctrlKey&&_.key==="_"&&(r.key=m.C0.US);else{var s=b[_.keyCode],e=s&&s[_.shiftKey?1:0];if(e)r.key=m.C0.ESC+e;else if(_.keyCode>=65&&_.keyCode<=90){var u=_.ctrlKey?_.keyCode-64:_.keyCode+32;r.key=m.C0.ESC+String.fromCharCode(u)}}else _.keyCode>=65&&_.keyCode<=90?r.key=String.fromCharCode(_.keyCode-64):_.keyCode===32?r.key=m.C0.NUL:_.keyCode>=51&&_.keyCode<=55?r.key=String.fromCharCode(_.keyCode-51+27):_.keyCode===56?r.key=m.C0.DEL:_.keyCode===219?r.key=m.C0.ESC:_.keyCode===220?r.key=m.C0.FS:_.keyCode===221&&(r.key=m.C0.GS)}return r}},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(i,l){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var x in p)p.hasOwnProperty(x)&&(c[x]=p[x])})(i,l)},function(i,l){function c(){this.constructor=i}m(i,l),i.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}),_=this&&this.__decorate||function(i,l,c,p){var x,v=arguments.length,y=v<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(i,l,c,p);else for(var g=i.length-1;g>=0;g--)(x=i[g])&&(y=(v<3?x(y):v>3?x(l,c,y):x(l,c))||y);return v>3&&y&&Object.defineProperty(l,c,y),y},a=this&&this.__param||function(i,l){return function(c,p){l(c,p,i)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;var f=d(31),h=d(0),r=d(2),n=d(32),s=d(7),e=d(1),u=d(5),t=function(i){function l(c,p,x,v,y,g){var w=i.call(this)||this;if(w._renderer=c,w._rowCount=p,w._isPaused=!1,w._needsFullRefresh=!1,w._isNextRenderRedrawOnly=!0,w._needsSelectionRefresh=!1,w._canvasWidth=0,w._canvasHeight=0,w._selectionState={start:void 0,end:void 0,columnSelectMode:!1},w._onDimensionsChange=new h.EventEmitter,w._onRender=new h.EventEmitter,w._onRefreshRequest=new h.EventEmitter,w.register({dispose:function(){return w._renderer.dispose()}}),w._renderDebouncer=new f.RenderDebouncer(function(S,k){return w._renderRows(S,k)}),w.register(w._renderDebouncer),w._screenDprMonitor=new n.ScreenDprMonitor,w._screenDprMonitor.setListener(function(){return w.onDevicePixelRatioChange()}),w.register(w._screenDprMonitor),w.register(g.onResize(function(S){return w._fullRefresh()})),w.register(v.onOptionChange(function(){return w._renderer.onOptionsChanged()})),w.register(y.onCharSizeChange(function(){return w.onCharSizeChanged()})),w._renderer.onRequestRedraw(function(S){return w.refreshRows(S.start,S.end,!0)}),w.register(s.addDisposableDomListener(window,"resize",function(){return w.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var E=new IntersectionObserver(function(S){return w._onIntersectionChange(S[S.length-1])},{threshold:0});E.observe(x),w.register({dispose:function(){return E.disconnect()}})}return w}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,p,x){x===void 0&&(x=!1),this._isPaused?this._needsFullRefresh=!0:(x||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(c,p,this._rowCount))},l.prototype._renderRows=function(c,p){this._renderer.renderRows(c,p),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:p}),this._isNextRenderRedrawOnly=!0},l.prototype.resize=function(c,p){this._rowCount=p,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 p=this;this._renderer.dispose(),this._renderer=c,this._renderer.onRequestRedraw(function(x){return p.refreshRows(x.start,x.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,p){this._renderer.onResize(c,p),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,p,x){this._selectionState.start=c,this._selectionState.end=p,this._selectionState.columnSelectMode=x,this._renderer.onSelectionChanged(c,p,x)},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=_([a(3,e.IOptionsService),a(4,u.ICharSizeService),a(5,e.IBufferService)],l)}(r.Disposable);o.RenderService=t},function(O,o,d){"use strict";var m=this&&this.__decorate||function(r,n,s,e){var u,t=arguments.length,i=t<3?n:e===null?e=Object.getOwnPropertyDescriptor(n,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,n,s,e);else for(var l=r.length-1;l>=0;l--)(u=r[l])&&(i=(t<3?u(i):t>3?u(n,s,i):u(n,s))||i);return t>3&&i&&Object.defineProperty(n,s,i),i},b=this&&this.__param||function(r,n){return function(s,e){n(s,e,r)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;var _=d(1),a=d(0),f=function(){function r(n,s,e){this._optionsService=e,this.width=0,this.height=0,this._onCharSizeChange=new a.EventEmitter,this._measureStrategy=new h(n,s,this._optionsService)}return Object.defineProperty(r.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),r.prototype.measure=function(){var n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())},r=m([b(2,_.IOptionsService)],r)}();o.CharSizeService=f;var h=function(){function r(n,s,e){this._document=n,this._parentElement=s,this._optionsService=e,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return r.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var 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(O,o,d){"use strict";var m=this&&this.__decorate||function(h,r,n,s){var e,u=arguments.length,t=u<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,n):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,r,n,s);else for(var i=h.length-1;i>=0;i--)(e=h[i])&&(t=(u<3?e(t):u>3?e(r,n,t):e(r,n))||t);return u>3&&t&&Object.defineProperty(r,n,t),t},b=this&&this.__param||function(h,r){return function(n,s){r(n,s,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;var _=d(5),a=d(30),f=function(){function h(r,n){this._renderService=r,this._charSizeService=n}return h.prototype.getCoords=function(r,n,s,e,u){return a.getCoords(r,n,s,e,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,u)},h.prototype.getRawByteCoords=function(r,n,s,e){var u=this.getCoords(r,n,s,e);return a.getRawByteCoords(u)},h=m([b(0,_.IRenderService),b(1,_.ICharSizeService)],h)}();o.MouseService=f},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(e,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var l in i)i.hasOwnProperty(l)&&(t[l]=i[l])})(e,u)},function(e,u){function t(){this.constructor=e}m(e,u),e.prototype=u===null?Object.create(u):(t.prototype=u.prototype,new t)}),_=this&&this.__decorate||function(e,u,t,i){var l,c=arguments.length,p=c<3?u:i===null?i=Object.getOwnPropertyDescriptor(u,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,u,t,i);else for(var x=e.length-1;x>=0;x--)(l=e[x])&&(p=(c<3?l(p):c>3?l(u,t,p):l(u,t))||p);return c>3&&p&&Object.defineProperty(u,t,p),p},a=this&&this.__param||function(e,u){return function(t,i){u(t,i,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;var f=d(1),h=d(0),r=d(2),n=d(7),s=function(e){function u(t){var i=e.call(this)||this;return i._bufferService=t,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(u,e),Object.defineProperty(u.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),u.prototype.registerLinkProvider=function(t){var i=this;return this._linkProviders.push(t),{dispose:function(){var l=i._linkProviders.indexOf(t);l!==-1&&i._linkProviders.splice(l,1)}}},u.prototype.attachToDom=function(t,i,l){var c=this;this._element=t,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)))},u.prototype._onMouseMove=function(t){if(this._lastMouseEvent=t,this._element&&this._mouseService){var i=this._positionFromMouseEvent(t,this._element,this._mouseService);if(i){this._isMouseOut=!1;for(var l=t.composedPath(),c=0;c<l.length;c++){var p=l[c];if(p.classList.contains("xterm"))break;if(p.classList.contains("xterm-hover"))return}this._lastBufferCell&&i.x===this._lastBufferCell.x&&i.y===this._lastBufferCell.y||(this._onHover(i),this._lastBufferCell=i)}}},u.prototype._onHover=function(t){if(this._activeLine!==t.y)return this._clearCurrentLink(),void this._askForLink(t,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,t)||(this._clearCurrentLink(),this._askForLink(t,!0))},u.prototype._askForLink=function(t,i){var l=this;this._activeProviderReplies&&i||(this._activeProviderReplies=new Map,this._activeLine=t.y);var c=!1;this._linkProviders.forEach(function(p,x){var v;i?!((v=l._activeProviderReplies)===null||v===void 0)&&v.get(x)&&(c=l._checkLinkProviderResult(x,t,c)):p.provideLinks(t.y,function(y){var g,w;if(!l._isMouseOut){var E=y==null?void 0:y.map(function(S){return{link:S}});(g=l._activeProviderReplies)===null||g===void 0||g.set(x,E),c=l._checkLinkProviderResult(x,t,c),((w=l._activeProviderReplies)===null||w===void 0?void 0:w.size)===l._linkProviders.length&&l._removeIntersectingLinks(t.y,l._activeProviderReplies)}})})},u.prototype._removeIntersectingLinks=function(t,i){for(var l=new Set,c=0;c<i.size;c++){var p=i.get(c);if(p)for(var x=0;x<p.length;x++)for(var v=p[x],y=v.link.range.start.y<t?0:v.link.range.start.x,g=v.link.range.end.y>t?this._bufferService.cols:v.link.range.end.x,w=y;w<=g;w++){if(l.has(w)){p.splice(x--,1);break}l.add(w)}}},u.prototype._checkLinkProviderResult=function(t,i,l){var c,p=this;if(!this._activeProviderReplies)return l;for(var x=this._activeProviderReplies.get(t),v=!1,y=0;y<t;y++)this._activeProviderReplies.has(y)&&!this._activeProviderReplies.get(y)||(v=!0);if(!v&&x){var g=x.find(function(E){return p._linkAtPosition(E.link,i)});g&&(l=!0,this._handleNewLink(g))}if(this._activeProviderReplies.size===this._linkProviders.length&&!l)for(y=0;y<this._activeProviderReplies.size;y++){var w=(c=this._activeProviderReplies.get(y))===null||c===void 0?void 0:c.find(function(E){return p._linkAtPosition(E.link,i)});if(w){l=!0,this._handleNewLink(w);break}}return l},u.prototype._onClick=function(t){if(this._element&&this._mouseService&&this._currentLink){var i=this._positionFromMouseEvent(t,this._element,this._mouseService);i&&this._linkAtPosition(this._currentLink.link,i)&&this._currentLink.link.activate(t,this._currentLink.link.text)}},u.prototype._clearCurrentLink=function(t,i){this._element&&this._currentLink&&this._lastMouseEvent&&(!t||!i||this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=i)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,r.disposeArray(this._linkCacheDisposables))},u.prototype._handleNewLink=function(t){var i=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(t.link,l)&&(this._currentLink=t,this._currentLink.state={decorations:{underline:t.link.decorations===void 0||t.link.decorations.underline,pointerCursor:t.link.decorations===void 0||t.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,t.link,this._lastMouseEvent),t.link.decorations={},Object.defineProperties(t.link.decorations,{pointerCursor:{get:function(){var c,p;return(p=(c=i._currentLink)===null||c===void 0?void 0:c.state)===null||p===void 0?void 0:p.decorations.pointerCursor},set:function(c){var p,x;!((p=i._currentLink)===null||p===void 0)&&p.state&&i._currentLink.state.decorations.pointerCursor!==c&&(i._currentLink.state.decorations.pointerCursor=c,i._currentLink.state.isHovered&&((x=i._element)===null||x===void 0||x.classList.toggle("xterm-cursor-pointer",c)))}},underline:{get:function(){var c,p;return(p=(c=i._currentLink)===null||c===void 0?void 0:c.state)===null||p===void 0?void 0:p.decorations.underline},set:function(c){var p,x,v;!((p=i._currentLink)===null||p===void 0)&&p.state&&((v=(x=i._currentLink)===null||x===void 0?void 0:x.state)===null||v===void 0?void 0:v.decorations.underline)!==c&&(i._currentLink.state.decorations.underline=c,i._currentLink.state.isHovered&&i._fireUnderlineEvent(t.link,c))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(c){var p=c.start===0?0:c.start+1+i._bufferService.buffer.ydisp;i._clearCurrentLink(p,c.end+1+i._bufferService.buffer.ydisp)})))}},u.prototype._linkHover=function(t,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&&t.classList.add("xterm-cursor-pointer")),i.hover&&i.hover(l,i.text)},u.prototype._fireUnderlineEvent=function(t,i){var l=t.range,c=this._bufferService.buffer.ydisp,p=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(p)},u.prototype._linkLeave=function(t,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&&t.classList.remove("xterm-cursor-pointer")),i.leave&&i.leave(l,i.text)},u.prototype._linkAtPosition=function(t,i){var l=t.range.start.y===t.range.end.y,c=t.range.start.y<i.y,p=t.range.end.y>i.y;return(l&&t.range.start.x<=i.x&&t.range.end.x>=i.x||c&&t.range.end.x>=i.x||p&&t.range.start.x<=i.x||c&&p)&&t.range.start.y<=i.y&&t.range.end.y>=i.y},u.prototype._positionFromMouseEvent=function(t,i,l){var c=l.getCoords(t,i,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}},u.prototype._createLinkUnderlineEvent=function(t,i,l,c,p){return{x1:t,y1:i,x2:l,y2:c,cols:this._bufferService.cols,fg:p}},u=_([a(0,f.IBufferService)],u)}(r.Disposable);o.Linkifier2=s},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;var m=function(){function b(_){this._textarea=_}return Object.defineProperty(b.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),b}();o.CoreBrowserService=m},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(y,g){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,E){w.__proto__=E}||function(w,E){for(var S in E)E.hasOwnProperty(S)&&(w[S]=E[S])})(y,g)},function(y,g){function w(){this.constructor=y}m(y,g),y.prototype=g===null?Object.create(g):(w.prototype=g.prototype,new w)});Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;var _=d(2),a=d(1),f=d(66),h=d(67),r=d(68),n=d(74),s=d(75),e=d(0),u=d(76),t=d(77),i=d(78),l=d(80),c=d(81),p=d(19),x=d(82),v=function(y){function g(w){var E=y.call(this)||this;return E._onBinary=new e.EventEmitter,E._onData=new e.EventEmitter,E._onLineFeed=new e.EventEmitter,E._onResize=new e.EventEmitter,E._onScroll=new e.EventEmitter,E._instantiationService=new f.InstantiationService,E.optionsService=new n.OptionsService(w),E._instantiationService.setService(a.IOptionsService,E.optionsService),E._bufferService=E.register(E._instantiationService.createInstance(r.BufferService)),E._instantiationService.setService(a.IBufferService,E._bufferService),E._logService=E._instantiationService.createInstance(h.LogService),E._instantiationService.setService(a.ILogService,E._logService),E._coreService=E.register(E._instantiationService.createInstance(s.CoreService,function(){return E.scrollToBottom()})),E._instantiationService.setService(a.ICoreService,E._coreService),E._coreMouseService=E._instantiationService.createInstance(u.CoreMouseService),E._instantiationService.setService(a.ICoreMouseService,E._coreMouseService),E._dirtyRowService=E._instantiationService.createInstance(t.DirtyRowService),E._instantiationService.setService(a.IDirtyRowService,E._dirtyRowService),E.unicodeService=E._instantiationService.createInstance(i.UnicodeService),E._instantiationService.setService(a.IUnicodeService,E.unicodeService),E._charsetService=E._instantiationService.createInstance(l.CharsetService),E._instantiationService.setService(a.ICharsetService,E._charsetService),E._inputHandler=new p.InputHandler(E._bufferService,E._charsetService,E._coreService,E._dirtyRowService,E._logService,E.optionsService,E._coreMouseService,E.unicodeService),E.register(e.forwardEvent(E._inputHandler.onLineFeed,E._onLineFeed)),E.register(E._inputHandler),E.register(e.forwardEvent(E._bufferService.onResize,E._onResize)),E.register(e.forwardEvent(E._coreService.onData,E._onData)),E.register(e.forwardEvent(E._coreService.onBinary,E._onBinary)),E.register(E.optionsService.onOptionChange(function(S){return E._updateOptions(S)})),E._writeBuffer=new x.WriteBuffer(function(S){return E._inputHandler.parse(S)}),E}return b(g,y),Object.defineProperty(g.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),g.prototype.dispose=function(){var w;this._isDisposed||(y.prototype.dispose.call(this),(w=this._windowsMode)===null||w===void 0||w.dispose(),this._windowsMode=void 0)},g.prototype.write=function(w,E){this._writeBuffer.write(w,E)},g.prototype.writeSync=function(w){this._writeBuffer.writeSync(w)},g.prototype.resize=function(w,E){isNaN(w)||isNaN(E)||(w=Math.max(w,r.MINIMUM_COLS),E=Math.max(E,r.MINIMUM_ROWS),this._bufferService.resize(w,E))},g.prototype.scroll=function(w,E){E===void 0&&(E=!1);var S,k=this._bufferService.buffer;(S=this._cachedBlankLine)&&S.length===this.cols&&S.getFg(0)===w.fg&&S.getBg(0)===w.bg||(S=k.getBlankLine(w,E),this._cachedBlankLine=S),S.isWrapped=E;var D=k.ybase+k.scrollTop,L=k.ybase+k.scrollBottom;if(k.scrollTop===0){var z=k.lines.isFull;L===k.lines.length-1?z?k.lines.recycle().copyFrom(S):k.lines.push(S.clone()):k.lines.splice(L+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 j=L-D+1;k.lines.shiftElements(D+1,j-1,-1),k.lines.set(L,S.clone())}this._bufferService.isUserScrolling||(k.ydisp=k.ybase),this._dirtyRowService.markRangeDirty(k.scrollTop,k.scrollBottom),this._onScroll.fire(k.ydisp)},g.prototype.scrollLines=function(w,E){var S=this._bufferService.buffer;if(w<0){if(S.ydisp===0)return;this._bufferService.isUserScrolling=!0}else w+S.ydisp>=S.ybase&&(this._bufferService.isUserScrolling=!1);var k=S.ydisp;S.ydisp=Math.max(Math.min(S.ydisp+w,S.ybase),0),k!==S.ydisp&&(E||this._onScroll.fire(S.ydisp))},g.prototype.scrollPages=function(w){this.scrollLines(w*(this.rows-1))},g.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},g.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},g.prototype.scrollToLine=function(w){var E=w-this._bufferService.buffer.ydisp;E!==0&&this.scrollLines(E)},g.prototype.addEscHandler=function(w,E){return this._inputHandler.addEscHandler(w,E)},g.prototype.addDcsHandler=function(w,E){return this._inputHandler.addDcsHandler(w,E)},g.prototype.addCsiHandler=function(w,E){return this._inputHandler.addCsiHandler(w,E)},g.prototype.addOscHandler=function(w,E){return this._inputHandler.addOscHandler(w,E)},g.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},g.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},g.prototype._updateOptions=function(w){var E;switch(w){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((E=this._windowsMode)===null||E===void 0||E.dispose(),this._windowsMode=void 0)}},g.prototype._enableWindowsMode=function(){var w=this;if(!this._windowsMode){var E=[];E.push(this.onLineFeed(c.updateWindowsModeWrappedState.bind(null,this._bufferService))),E.push(this.addCsiHandler({final:"H"},function(){return c.updateWindowsModeWrappedState(w._bufferService),!1})),this._windowsMode={dispose:function(){for(var S=0,k=E;S<k.length;S++)k[S].dispose()}}}},g}(_.Disposable);o.CoreTerminal=v},function(O,o,d){"use strict";var m=this&&this.__spreadArrays||function(){for(var h=0,r=0,n=arguments.length;r<n;r++)h+=arguments[r].length;var s=Array(h),e=0;for(r=0;r<n;r++)for(var u=arguments[r],t=0,i=u.length;t<i;t++,e++)s[e]=u[t];return s};Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;var b=d(1),_=d(14),a=function(){function h(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this._entries=new Map;for(var s=0,e=r;s<e.length;s++){var u=e[s],t=u[0],i=u[1];this.set(t,i)}}return h.prototype.set=function(r,n){var s=this._entries.get(r);return this._entries.set(r,n),s},h.prototype.forEach=function(r){this._entries.forEach(function(n,s){return r(s,n)})},h.prototype.has=function(r){return this._entries.has(r)},h.prototype.get=function(r){return this._entries.get(r)},h}();o.ServiceCollection=a;var f=function(){function h(){this._services=new a,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=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];for(var e=_.getServiceDependencies(r).sort(function(x,v){return x.index-v.index}),u=[],t=0,i=e;t<i.length;t++){var l=i[t],c=this._services.get(l.id);if(!c)throw new Error("[createInstance] "+r.name+" depends on UNKNOWN service "+l.id+".");u.push(c)}var p=e.length>0?e[0].index:n.length;if(n.length!==p)throw new Error("[createInstance] First service dependency of "+r.name+" at position "+(p+1)+" conflicts with "+n.length+" static arguments");return new(r.bind.apply(r,m([void 0],m(n,u))))},h}();o.InstantiationService=f},function(O,o,d){"use strict";var m=this&&this.__decorate||function(n,s,e,u){var t,i=arguments.length,l=i<3?s:u===null?u=Object.getOwnPropertyDescriptor(s,e):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,s,e,u);else for(var c=n.length-1;c>=0;c--)(t=n[c])&&(l=(i<3?t(l):i>3?t(s,e,l):t(s,e))||l);return i>3&&l&&Object.defineProperty(s,e,l),l},b=this&&this.__param||function(n,s){return function(e,u){s(e,u,n)}},_=this&&this.__spreadArrays||function(){for(var n=0,s=0,e=arguments.length;s<e;s++)n+=arguments[s].length;var u=Array(n),t=0;for(s=0;s<e;s++)for(var i=arguments[s],l=0,c=i.length;l<c;l++,t++)u[t]=i[l];return u};Object.defineProperty(o,"__esModule",{value:!0}),o.LogService=o.LogLevel=void 0;var a,f=d(1);(function(n){n[n.DEBUG=0]="DEBUG",n[n.INFO=1]="INFO",n[n.WARN=2]="WARN",n[n.ERROR=3]="ERROR",n[n.OFF=4]="OFF"})(a=o.LogLevel||(o.LogLevel={}));var h={debug:a.DEBUG,info:a.INFO,warn:a.WARN,error:a.ERROR,off:a.OFF},r=function(){function n(s){var e=this;this._optionsService=s,this._updateLogLevel(),this._optionsService.onOptionChange(function(u){u==="logLevel"&&e._updateLogLevel()})}return n.prototype._updateLogLevel=function(){this._logLevel=h[this._optionsService.options.logLevel]},n.prototype._evalLazyOptionalParams=function(s){for(var e=0;e<s.length;e++)typeof s[e]=="function"&&(s[e]=s[e]())},n.prototype._log=function(s,e,u){this._evalLazyOptionalParams(u),s.call.apply(s,_([console,"xterm.js: "+e],u))},n.prototype.debug=function(s){for(var e=[],u=1;u<arguments.length;u++)e[u-1]=arguments[u];this._logLevel<=a.DEBUG&&this._log(console.log,s,e)},n.prototype.info=function(s){for(var e=[],u=1;u<arguments.length;u++)e[u-1]=arguments[u];this._logLevel<=a.INFO&&this._log(console.info,s,e)},n.prototype.warn=function(s){for(var e=[],u=1;u<arguments.length;u++)e[u-1]=arguments[u];this._logLevel<=a.WARN&&this._log(console.warn,s,e)},n.prototype.error=function(s){for(var e=[],u=1;u<arguments.length;u++)e[u-1]=arguments[u];this._logLevel<=a.ERROR&&this._log(console.error,s,e)},n=m([b(0,f.IOptionsService)],n)}();o.LogService=r},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(e,u){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var l in i)i.hasOwnProperty(l)&&(t[l]=i[l])})(e,u)},function(e,u){function t(){this.constructor=e}m(e,u),e.prototype=u===null?Object.create(u):(t.prototype=u.prototype,new t)}),_=this&&this.__decorate||function(e,u,t,i){var l,c=arguments.length,p=c<3?u:i===null?i=Object.getOwnPropertyDescriptor(u,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,u,t,i);else for(var x=e.length-1;x>=0;x--)(l=e[x])&&(p=(c<3?l(p):c>3?l(u,t,p):l(u,t))||p);return c>3&&p&&Object.defineProperty(u,t,p),p},a=this&&this.__param||function(e,u){return function(t,i){u(t,i,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;var f=d(1),h=d(69),r=d(0),n=d(2);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;var s=function(e){function u(t){var i=e.call(this)||this;return i._optionsService=t,i.isUserScrolling=!1,i._onResize=new r.EventEmitter,i.cols=Math.max(t.options.cols,o.MINIMUM_COLS),i.rows=Math.max(t.options.rows,o.MINIMUM_ROWS),i.buffers=new h.BufferSet(t,i),i}return b(u,e),Object.defineProperty(u.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),u.prototype.dispose=function(){e.prototype.dispose.call(this),this.buffers.dispose()},u.prototype.resize=function(t,i){this.cols=t,this.rows=i,this.buffers.resize(t,i),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:t,rows:i})},u.prototype.reset=function(){this.buffers.dispose(),this.buffers=new h.BufferSet(this._optionsService,this),this.isUserScrolling=!1},u=_([a(0,f.IOptionsService)],u)}(n.Disposable);o.BufferService=s},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(h,r){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var e in s)s.hasOwnProperty(e)&&(n[e]=s[e])})(h,r)},function(h,r){function n(){this.constructor=h}m(h,r),h.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)});Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;var _=d(70),a=d(0),f=function(h){function r(n,s){var e=h.call(this)||this;return e._onBufferActivate=e.register(new a.EventEmitter),e._normal=new _.Buffer(!0,n,s),e._normal.fillViewportRows(),e._alt=new _.Buffer(!1,n,s),e._activeBuffer=e._normal,e.setupTabStops(),e}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,s){this._normal.resize(n,s),this._alt.resize(n,s)},r.prototype.setupTabStops=function(n){this._normal.setupTabStops(n),this._alt.setupTabStops(n)},r}(d(2).Disposable);o.BufferSet=f},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.BufferStringIterator=o.Buffer=o.MAX_BUFFER_SIZE=void 0;var m=d(71),b=d(16),_=d(4),a=d(3),f=d(72),h=d(73),r=d(20),n=d(6);o.MAX_BUFFER_SIZE=4294967295;var s=function(){function u(t,i,l){this._hasScrollback=t,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=_.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),this._whitespaceCell=_.CellData.fromCharData([0,a.WHITESPACE_CELL_CHAR,a.WHITESPACE_CELL_WIDTH,a.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new m.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return u.prototype.getNullCell=function(t){return t?(this._nullCell.fg=t.fg,this._nullCell.bg=t.bg,this._nullCell.extended=t.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new n.ExtendedAttrs),this._nullCell},u.prototype.getWhitespaceCell=function(t){return t?(this._whitespaceCell.fg=t.fg,this._whitespaceCell.bg=t.bg,this._whitespaceCell.extended=t.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new n.ExtendedAttrs),this._whitespaceCell},u.prototype.getBlankLine=function(t,i){return new b.BufferLine(this._bufferService.cols,this.getNullCell(t),i)},Object.defineProperty(u.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isCursorInViewport",{get:function(){var t=this.ybase+this.y-this.ydisp;return t>=0&&t<this._rows},enumerable:!1,configurable:!0}),u.prototype._getCorrectBufferLength=function(t){if(!this._hasScrollback)return t;var i=t+this._optionsService.options.scrollback;return i>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:i},u.prototype.fillViewportRows=function(t){if(this.lines.length===0){t===void 0&&(t=b.DEFAULT_ATTR_DATA);for(var i=this._rows;i--;)this.lines.push(this.getBlankLine(t))}},u.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new m.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},u.prototype.resize=function(t,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<t)for(var p=0;p<this.lines.length;p++)this.lines.get(p).resize(t,l);var x=0;if(this._rows<i)for(var v=this._rows;v<i;v++)this.lines.length<i+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new b.BufferLine(t,l)):this.ybase>0&&this.lines.length<=this.ybase+this.y+x+1?(this.ybase--,x++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(t,l)));else for(v=this._rows;v>i;v--)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 y=this.lines.length-c;y>0&&(this.lines.trimStart(y),this.ybase=Math.max(this.ybase-y,0),this.ydisp=Math.max(this.ydisp-y,0),this.savedY=Math.max(this.savedY-y,0)),this.lines.maxLength=c}this.x=Math.min(this.x,t-1),this.y=Math.min(this.y,i-1),x&&(this.y+=x),this.savedX=Math.min(this.savedX,t-1),this.scrollTop=0}if(this.scrollBottom=i-1,this._isReflowEnabled&&(this._reflow(t,i),this._cols>t))for(p=0;p<this.lines.length;p++)this.lines.get(p).resize(t,l);this._cols=t,this._rows=i},Object.defineProperty(u.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),u.prototype._reflow=function(t,i){this._cols!==t&&(t>this._cols?this._reflowLarger(t,i):this._reflowSmaller(t,i))},u.prototype._reflowLarger=function(t,i){var l=f.reflowLargerGetLinesToRemove(this.lines,this._cols,t,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(l.length>0){var c=f.reflowLargerCreateNewLayout(this.lines,l);f.reflowLargerApplyNewLayout(this.lines,c.layout),this._reflowLargerAdjustViewport(t,i,c.countRemoved)}},u.prototype._reflowLargerAdjustViewport=function(t,i,l){for(var c=this.getNullCell(b.DEFAULT_ATTR_DATA),p=l;p-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<i&&this.lines.push(new b.BufferLine(t,c))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-l,0)},u.prototype._reflowSmaller=function(t,i){for(var l=this.getNullCell(b.DEFAULT_ATTR_DATA),c=[],p=0,x=this.lines.length-1;x>=0;x--){var v=this.lines.get(x);if(!(!v||!v.isWrapped&&v.getTrimmedLength()<=t)){for(var y=[v];v.isWrapped&&x>0;)v=this.lines.get(--x),y.unshift(v);var g=this.ybase+this.y;if(!(g>=x&&g<x+y.length)){var w=y[y.length-1].getTrimmedLength(),E=f.reflowSmallerGetNewLineLengths(y,this._cols,t),S=E.length-y.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 D=[],L=0;L<S;L++){var z=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);D.push(z)}D.length>0&&(c.push({start:x+y.length+p,newLines:D}),p+=D.length),y.push.apply(y,D);var j=E.length-1,le=E[j];le===0&&(le=E[--j]);for(var U=y.length-S-1,J=w;U>=0;){var A=Math.min(J,le);if(y[j].copyCellsFrom(y[U],J-A,le-A,A,!0),(le-=A)===0&&(le=E[--j]),(J-=A)===0){U--;var P=Math.max(U,0);J=f.getWrappedLineTrimmedLength(y,P,this._cols)}}for(L=0;L<y.length;L++)E[L]<t&&y[L].setCell(E[L],l);for(var K=S-k;K-- >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+p)-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 $=[],H=[];for(L=0;L<this.lines.length;L++)H.push(this.lines.get(L));var ne=this.lines.length,ve=ne-1,Se=0,He=c[Se];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+p);var Me=0;for(L=Math.min(this.lines.maxLength-1,ne+p-1);L>=0;L--)if(He&&He.start>ve+Me){for(var he=He.newLines.length-1;he>=0;he--)this.lines.set(L--,He.newLines[he]);L++,$.push({index:ve+1,amount:He.newLines.length}),Me+=He.newLines.length,He=c[++Se]}else this.lines.set(L,H[ve--]);var ke=0;for(L=$.length-1;L>=0;L--)$[L].index+=ke,this.lines.onInsertEmitter.fire($[L]),ke+=$[L].amount;var Ke=Math.max(0,ne+p-this.lines.maxLength);Ke>0&&this.lines.onTrimEmitter.fire(Ke)}},u.prototype.stringIndexToBufferIndex=function(t,i,l){for(l===void 0&&(l=!1);i;){var c=this.lines.get(t);if(!c)return[-1,-1];for(var p=l?c.getTrimmedLength():c.length,x=0;x<p;++x)if(c.get(x)[a.CHAR_DATA_WIDTH_INDEX]&&(i-=c.get(x)[a.CHAR_DATA_CHAR_INDEX].length||1),i<0)return[t,x];t++}return[t,0]},u.prototype.translateBufferLineToString=function(t,i,l,c){l===void 0&&(l=0);var p=this.lines.get(t);return p?p.translateToString(i,l,c):""},u.prototype.getWrappedRangeForLine=function(t){for(var i=t,l=t;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}},u.prototype.setupTabStops=function(t){for(t!=null?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this._cols;t+=this._optionsService.options.tabStopWidth)this.tabs[t]=!0},u.prototype.prevStop=function(t){for(t==null&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this._cols?this._cols-1:t<0?0:t},u.prototype.nextStop=function(t){for(t==null&&(t=this.x);!this.tabs[++t]&&t<this._cols;);return t>=this._cols?this._cols-1:t<0?0:t},u.prototype.addMarker=function(t){var i=this,l=new h.Marker(t);return this.markers.push(l),l.register(this.lines.onTrim(function(c){l.line-=c,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(function(c){l.line>=c.index&&(l.line+=c.amount)})),l.register(this.lines.onDelete(function(c){l.line>=c.index&&l.line<c.index+c.amount&&l.dispose(),l.line>c.index&&(l.line-=c.amount)})),l.register(l.onDispose(function(){return i._removeMarker(l)})),l},u.prototype._removeMarker=function(t){this.markers.splice(this.markers.indexOf(t),1)},u.prototype.iterator=function(t,i,l,c,p){return new e(this,t,i,l,c,p)},u}();o.Buffer=s;var e=function(){function u(t,i,l,c,p,x){l===void 0&&(l=0),c===void 0&&(c=t.lines.length),p===void 0&&(p=0),x===void 0&&(x=0),this._buffer=t,this._trimRight=i,this._startIndex=l,this._endIndex=c,this._startOverscan=p,this._endOverscan=x,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return u.prototype.hasNext=function(){return this._current<this._endIndex},u.prototype.next=function(){var t=this._buffer.getWrappedRangeForLine(this._current);t.first<this._startIndex-this._startOverscan&&(t.first=this._startIndex-this._startOverscan),t.last>this._endIndex+this._endOverscan&&(t.last=this._endIndex+this._endOverscan),t.first=Math.max(t.first,0),t.last=Math.min(t.last,this._buffer.lines.length);for(var i="",l=t.first;l<=t.last;++l)i+=this._buffer.translateBufferLineToString(l,this._trimRight);return this._current=t.last+1,{range:t,content:i}},u}();o.BufferStringIterator=e},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;var m=d(0),b=function(){function _(a){this._maxLength=a,this.onDeleteEmitter=new m.EventEmitter,this.onInsertEmitter=new m.EventEmitter,this.onTrimEmitter=new m.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(_.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"maxLength",{get:function(){return this._maxLength},set:function(a){if(this._maxLength!==a){for(var f=new Array(a),h=0;h<Math.min(a,this.length);h++)f[h]=this._array[this._getCyclicIndex(h)];this._array=f,this._maxLength=a,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"length",{get:function(){return this._length},set:function(a){if(a>this._length)for(var f=this._length;f<a;f++)this._array[f]=void 0;this._length=a},enumerable:!1,configurable:!0}),_.prototype.get=function(a){return this._array[this._getCyclicIndex(a)]},_.prototype.set=function(a,f){this._array[this._getCyclicIndex(a)]=f},_.prototype.push=function(a){this._array[this._getCyclicIndex(this._length)]=a,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},_.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(_.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),_.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},_.prototype.splice=function(a,f){for(var h=[],r=2;r<arguments.length;r++)h[r-2]=arguments[r];if(f){for(var n=a;n<this._length-f;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+f)];this._length-=f}for(n=this._length-1;n>=a;n--)this._array[this._getCyclicIndex(n+h.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<h.length;n++)this._array[this._getCyclicIndex(a+n)]=h[n];if(this._length+h.length>this._maxLength){var s=this._length+h.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=h.length},_.prototype.trimStart=function(a){a>this._length&&(a=this._length),this._startIndex+=a,this._length-=a,this.onTrimEmitter.fire(a)},_.prototype.shiftElements=function(a,f,h){if(!(f<=0)){if(a<0||a>=this._length)throw new Error("start argument out of range");if(a+h<0)throw new Error("Cannot shift elements in list beyond index 0");if(h>0){for(var r=f-1;r>=0;r--)this.set(a+r+h,this.get(a+r));var n=a+f+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<f;r++)this.set(a+r+h,this.get(a+r))}},_.prototype._getCyclicIndex=function(a){return(this._startIndex+a)%this._maxLength},_}();o.CircularList=b},function(O,o,d){"use strict";function m(b,_,a){if(_===b.length-1)return b[_].getTrimmedLength();var f=!b[_].hasContent(a-1)&&b[_].getWidth(a-1)===1,h=b[_+1].getWidth(0)===2;return f&&h?a-1:a}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(b,_,a,f,h){for(var r=[],n=0;n<b.length-1;n++){var s=n,e=b.get(++s);if(e.isWrapped){for(var u=[b.get(n)];s<b.length&&e.isWrapped;)u.push(e),e=b.get(++s);if(f>=n&&f<s)n+=u.length-1;else{for(var t=0,i=m(u,t,_),l=1,c=0;l<u.length;){var p=m(u,l,_),x=p-c,v=a-i,y=Math.min(x,v);u[t].copyCellsFrom(u[l],c,i,y,!1),(i+=y)===a&&(t++,i=0),(c+=y)===p&&(l++,c=0),i===0&&t!==0&&u[t-1].getWidth(a-1)===2&&(u[t].copyCellsFrom(u[t-1],a-1,i++,1,!1),u[t-1].setCell(a-1,h))}u[t].replaceCells(i,a,h);for(var g=0,w=u.length-1;w>0&&(w>t||u[w].getTrimmedLength()===0);w--)g++;g>0&&(r.push(n+u.length-g),r.push(g)),n+=u.length-1}}}return r},o.reflowLargerCreateNewLayout=function(b,_){for(var a=[],f=0,h=_[f],r=0,n=0;n<b.length;n++)if(h===n){var s=_[++f];b.onDeleteEmitter.fire({index:n-r,amount:s}),n+=s-1,r+=s,h=_[++f]}else a.push(n);return{layout:a,countRemoved:r}},o.reflowLargerApplyNewLayout=function(b,_){for(var a=[],f=0;f<_.length;f++)a.push(b.get(_[f]));for(f=0;f<a.length;f++)b.set(f,a[f]);b.length=_.length},o.reflowSmallerGetNewLineLengths=function(b,_,a){for(var f=[],h=b.map(function(i,l){return m(b,l,_)}).reduce(function(i,l){return i+l}),r=0,n=0,s=0;s<h;){if(h-s<a){f.push(h-s);break}r+=a;var e=m(b,n,_);r>e&&(r-=e,n++);var u=b[n].getWidth(r-1)===2;u&&r--;var t=u?a-1:a;f.push(t),s+=t}return f},o.getWrappedLineTrimmedLength=m},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(f,h){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)n.hasOwnProperty(s)&&(r[s]=n[s])})(f,h)},function(f,h){function r(){this.constructor=f}m(f,h),f.prototype=h===null?Object.create(h):(r.prototype=h.prototype,new r)});Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;var _=d(0),a=function(f){function h(r){var n=f.call(this)||this;return n.line=r,n._id=h._nextId++,n.isDisposed=!1,n._onDispose=new _.EventEmitter,n}return b(h,f),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}(d(2).Disposable);o.Marker=a},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=o.DEFAULT_BELL_SOUND=void 0;var m=d(0),b=d(11),_=d(33);o.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",o.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:o.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:b.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var a=["cols","rows"],f=function(){function h(r){this._onOptionChange=new m.EventEmitter,this.options=_.clone(o.DEFAULT_OPTIONS);for(var n=0,s=Object.keys(r);n<s.length;n++){var e=s[n];if(e in this.options){var u=r[e];this.options[e]=u}}}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 o.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');if(a.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=o.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 o.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');return this.options[r]},h}();o.OptionsService=f},function(O,o,d){"use strict";var m,b=this&&this.__extends||(m=function(t,i){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var p in c)c.hasOwnProperty(p)&&(l[p]=c[p])})(t,i)},function(t,i){function l(){this.constructor=t}m(t,i),t.prototype=i===null?Object.create(i):(l.prototype=i.prototype,new l)}),_=this&&this.__decorate||function(t,i,l,c){var p,x=arguments.length,v=x<3?i:c===null?c=Object.getOwnPropertyDescriptor(i,l):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(t,i,l,c);else for(var y=t.length-1;y>=0;y--)(p=t[y])&&(v=(x<3?p(v):x>3?p(i,l,v):p(i,l))||v);return x>3&&v&&Object.defineProperty(i,l,v),v},a=this&&this.__param||function(t,i){return function(l,c){i(l,c,t)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;var f=d(1),h=d(0),r=d(33),n=d(2),s=Object.freeze({insertMode:!1}),e=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),u=function(t){function i(l,c,p,x){var v=t.call(this)||this;return v._bufferService=c,v._logService=p,v._optionsService=x,v.isCursorInitialized=!1,v.isCursorHidden=!1,v._onData=v.register(new h.EventEmitter),v._onUserInput=v.register(new h.EventEmitter),v._onBinary=v.register(new h.EventEmitter),v._scrollToBottom=l,v.register({dispose:function(){return v._scrollToBottom=void 0}}),v.modes=r.clone(s),v.decPrivateModes=r.clone(e),v}return b(i,t),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(s),this.decPrivateModes=r.clone(e)},i.prototype.triggerDataEvent=function(l,c){if(c===void 0&&(c=!1),!this._optionsService.options.disableStdin){var p=this._bufferService.buffer;p.ybase!==p.ydisp&&this._scrollToBottom(),c&&this._onUserInput.fire(),this._logService.debug('sending data "'+l+'"',function(){return l.split("").map(function(x){return x.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=_([a(1,f.IBufferService),a(2,f.ILogService),a(3,f.IOptionsService)],i)}(n.Disposable);o.CoreService=u},function(O,o,d){"use strict";var m=this&&this.__decorate||function(e,u,t,i){var l,c=arguments.length,p=c<3?u:i===null?i=Object.getOwnPropertyDescriptor(u,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(e,u,t,i);else for(var x=e.length-1;x>=0;x--)(l=e[x])&&(p=(c<3?l(p):c>3?l(u,t,p):l(u,t))||p);return c>3&&p&&Object.defineProperty(u,t,p),p},b=this&&this.__param||function(e,u){return function(t,i){u(t,i,e)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;var _=d(1),a=d(0),f={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(e){return e.button!==4&&e.action===1&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)}},VT200:{events:19,restrict:function(e){return e.action!==32}},DRAG:{events:23,restrict:function(e){return e.action!==32||e.button!==3}},ANY:{events:31,restrict:function(e){return!0}}};function h(e,u){var t=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(t|=64,t|=e.action):(t|=3&e.button,4&e.button&&(t|=64),8&e.button&&(t|=128),e.action===32?t|=32:e.action!==0||u||(t|=3)),t}var r=String.fromCharCode,n={DEFAULT:function(e){var u=[h(e,!1)+32,e.col+32,e.row+32];return u[0]>255||u[1]>255||u[2]>255?"":"\x1B[M"+r(u[0])+r(u[1])+r(u[2])},SGR:function(e){var u=e.action===0&&e.button!==4?"m":"M";return"\x1B[<"+h(e,!0)+";"+e.col+";"+e.row+u}},s=function(){function e(u,t){this._bufferService=u,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new a.EventEmitter,this._lastEvent=null;for(var i=0,l=Object.keys(f);i<l.length;i++){var c=l[i];this.addProtocol(c,f[c])}for(var p=0,x=Object.keys(n);p<x.length;p++){var v=x[p];this.addEncoding(v,n[v])}this.reset()}return e.prototype.addProtocol=function(u,t){this._protocols[u]=t},e.prototype.addEncoding=function(u,t){this._encodings[u]=t},Object.defineProperty(e.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(u){if(!this._protocols[u])throw new Error('unknown protocol "'+u+'"');this._activeProtocol=u,this._onProtocolChange.fire(this._protocols[u].events)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(u){if(!this._encodings[u])throw new Error('unknown encoding "'+u+'"');this._activeEncoding=u},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(e.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),e.prototype.triggerMouseEvent=function(u){if(u.col<0||u.col>=this._bufferService.cols||u.row<0||u.row>=this._bufferService.rows||u.button===4&&u.action===32||u.button===3&&u.action!==32||u.button!==4&&(u.action===2||u.action===3)||(u.col++,u.row++,u.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,u))||!this._protocols[this._activeProtocol].restrict(u))return!1;var t=this._encodings[this._activeEncoding](u);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=u,!0},e.prototype.explainEvents=function(u){return{down:!!(1&u),up:!!(2&u),drag:!!(4&u),move:!!(8&u),wheel:!!(16&u)}},e.prototype._compareEvents=function(u,t){return u.col===t.col&&u.row===t.row&&u.button===t.button&&u.action===t.action&&u.ctrl===t.ctrl&&u.alt===t.alt&&u.shift===t.shift},e=m([b(0,_.IBufferService),b(1,_.ICoreService)],e)}();o.CoreMouseService=s},function(O,o,d){"use strict";var m=this&&this.__decorate||function(f,h,r,n){var s,e=arguments.length,u=e<3?h:n===null?n=Object.getOwnPropertyDescriptor(h,r):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(f,h,r,n);else for(var t=f.length-1;t>=0;t--)(s=f[t])&&(u=(e<3?s(u):e>3?s(h,r,u):s(h,r))||u);return e>3&&u&&Object.defineProperty(h,r,u),u},b=this&&this.__param||function(f,h){return function(r,n){h(r,n,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DirtyRowService=void 0;var _=d(1),a=function(){function f(h){this._bufferService=h,this.clearRange()}return Object.defineProperty(f.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(f.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),f.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},f.prototype.markDirty=function(h){h<this._start?this._start=h:h>this._end&&(this._end=h)},f.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)},f.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},f=m([b(0,_.IBufferService)],f)}();o.DirtyRowService=a},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;var m=d(0),b=d(79),_=function(){function a(){this._providers=Object.create(null),this._active="",this._onChange=new m.EventEmitter;var f=new b.UnicodeV6;this.register(f),this._active=f.version,this._activeProvider=f}return Object.defineProperty(a.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"activeVersion",{get:function(){return this._active},set:function(f){if(!this._providers[f])throw new Error('unknown Unicode version "'+f+'"');this._active=f,this._activeProvider=this._providers[f],this._onChange.fire(f)},enumerable:!1,configurable:!0}),a.prototype.register=function(f){this._providers[f.version]=f},a.prototype.wcwidth=function(f){return this._activeProvider.wcwidth(f)},a.prototype.getStringCellWidth=function(f){for(var h=0,r=f.length,n=0;n<r;++n){var s=f.charCodeAt(n);if(55296<=s&&s<=56319){if(++n>=r)return h+this.wcwidth(s);var e=f.charCodeAt(n);56320<=e&&e<=57343?s=1024*(s-55296)+e-56320+65536:h+=this.wcwidth(e)}h+=this.wcwidth(s)}return h},a}();o.UnicodeService=_},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;var m,b=d(15),_=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],a=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],f=function(){function h(){if(this.version="6",!m){m=new Uint8Array(65536),b.fill(m,1),m[0]=0,b.fill(m,0,1,32),b.fill(m,0,127,160),b.fill(m,2,4352,4448),m[9001]=2,m[9002]=2,b.fill(m,2,11904,42192),m[12351]=1,b.fill(m,2,44032,55204),b.fill(m,2,63744,64256),b.fill(m,2,65040,65050),b.fill(m,2,65072,65136),b.fill(m,2,65280,65377),b.fill(m,2,65504,65511);for(var r=0;r<_.length;++r)b.fill(m,0,_[r][0],_[r][1]+1)}}return h.prototype.wcwidth=function(r){return r<32?0:r<127?1:r<65536?m[r]:function(n,s){var e,u=0,t=s.length-1;if(n<s[0][0]||n>s[t][1])return!1;for(;t>=u;)if(n>s[e=u+t>>1][1])u=e+1;else{if(!(n<s[e][0]))return!0;t=e-1}return!1}(r,a)?0:r>=131072&&r<=196605||r>=196608&&r<=262141?2:1},h}();o.UnicodeV6=f},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0;var m=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(_){this.glevel=_,this.charset=this._charsets[_]},b.prototype.setgCharset=function(_,a){this._charsets[_]=a,this.glevel===_&&(this.charset=a)},b}();o.CharsetService=m},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;var m=d(3);o.updateWindowsModeWrappedState=function(b){var _=b.buffer.lines.get(b.buffer.ybase+b.buffer.y-1),a=_==null?void 0:_.get(b.cols-1),f=b.buffer.lines.get(b.buffer.ybase+b.buffer.y);f&&a&&(f.isWrapped=a[m.CHAR_DATA_CODE_INDEX]!==m.NULL_CELL_CODE&&a[m.CHAR_DATA_CODE_INDEX]!==m.WHITESPACE_CELL_CODE)}},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;var m=function(){function b(_){this._action=_,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return b.prototype.writeSync=function(_){if(this._writeBuffer.length){for(var a=this._bufferOffset;a<this._writeBuffer.length;++a){var f=this._writeBuffer[a],h=this._callbacks[a];this._action(f),h&&h()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(_)},b.prototype.write=function(_,a){var f=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 f._innerWrite()})),this._pendingData+=_.length,this._writeBuffer.push(_),this._callbacks.push(a)},b.prototype._innerWrite=function(){for(var _=this,a=Date.now();this._writeBuffer.length>this._bufferOffset;){var f=this._writeBuffer[this._bufferOffset],h=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(f),this._pendingData-=f.length,h&&h(),Date.now()-a>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return _._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},b}();o.WriteBuffer=m},function(O,o,d){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0;var m=function(){function b(){this._addons=[]}return b.prototype.dispose=function(){for(var _=this._addons.length-1;_>=0;_--)this._addons[_].instance.dispose()},b.prototype.loadAddon=function(_,a){var f=this,h={instance:a,dispose:a.dispose,isDisposed:!1};this._addons.push(h),a.dispose=function(){return f._wrappedAddonDispose(h)},a.activate(_)},b.prototype._wrappedAddonDispose=function(_){if(!_.isDisposed){for(var a=-1,f=0;f<this._addons.length;f++)if(this._addons[f]===_){a=f;break}if(a===-1)throw new Error("Could not dispose an addon that has not been loaded");_.isDisposed=!0,_.dispose.apply(_.instance),this._addons.splice(a,1)}},b}();o.AddonManager=m}])})}}]);
|