@open-amt-cloud-toolkit/ui-toolkit-react 2.0.6 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ /*! For license information please see sol.bundle.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports["ui-toolkit/reactjs/sol"]=t(require("react")):e["ui-toolkit/reactjs/sol"]=t(e.React)}(self,(__WEBPACK_EXTERNAL_MODULE__639__=>(()=>{var __webpack_modules__={68:(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});var s=i(42),r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;const o=(0,s.Z)((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))},42:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const s=function(e){var t=Object.create(null);return function(i){return void 0===t[i]&&(t[i]=e(i)),t[i]}}},285:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const s=function(e){function t(e,s,h,l,u){for(var _,f,p,v,b,y=0,w=0,E=0,k=0,A=0,T=0,M=p=_=0,P=0,H=0,F=0,N=0,U=h.length,W=U-1,$="",j="",K="",z="";P<U;){if(f=h.charCodeAt(P),P===W&&0!==w+k+E+y&&(0!==w&&(f=47===w?10:47),k=E=y=0,U++,W++),0===w+k+E+y){if(P===W&&(0<H&&($=$.replace(d,"")),0<$.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:$+=h.charAt(P)}f=59}switch(f){case 123:for(_=($=$.trim()).charCodeAt(0),p=1,N=++P;P<U;){switch(f=h.charCodeAt(P)){case 123:p++;break;case 125:p--;break;case 47:switch(f=h.charCodeAt(P+1)){case 42:case 47:e:{for(M=P+1;M<W;++M)switch(h.charCodeAt(M)){case 47:if(42===f&&42===h.charCodeAt(M-1)&&P+2!==M){P=M+1;break e}break;case 10:if(47===f){P=M+1;break e}}P=M}}break;case 91:f++;case 40:f++;case 34:case 39:for(;P++<W&&h.charCodeAt(P)!==f;);}if(0===p)break;P++}if(p=h.substring(N,P),0===_&&(_=($=$.replace(c,"").trim()).charCodeAt(0)),64===_){switch(0<H&&($=$.replace(d,"")),f=$.charCodeAt(1)){case 100:case 109:case 115:case 45:H=s;break;default:H=B}if(N=(p=t(s,H,p,f,u+1)).length,0<I&&(b=a(3,p,H=i(B,$,F),s,R,x,N,f,u,l),$=H.join(""),void 0!==b&&0===(N=(p=b.trim()).length)&&(f=0,p="")),0<N)switch(f){case 115:$=$.replace(C,n);case 100:case 109:case 45:p=$+"{"+p+"}";break;case 107:p=($=$.replace(g,"$1 $2"))+"{"+p+"}",p=1===D||2===D&&o("@"+p,3)?"@-webkit-"+p+"@"+p:"@"+p;break;default:p=$+p,112===l&&(j+=p,p="")}else p=""}else p=t(s,i(s,$,F),p,l,u+1);K+=p,p=F=H=M=_=0,$="",f=h.charCodeAt(++P);break;case 125:case 59:if(1<(N=($=(0<H?$.replace(d,""):$).trim()).length))switch(0===M&&(_=$.charCodeAt(0),45===_||96<_&&123>_)&&(N=($=$.replace(" ",":")).length),0<I&&void 0!==(b=a(1,$,s,e,R,x,j.length,l,u,l))&&0===(N=($=b.trim()).length)&&($="\0\0"),_=$.charCodeAt(0),f=$.charCodeAt(1),_){case 0:break;case 64:if(105===f||99===f){z+=$+h.charAt(P);break}default:58!==$.charCodeAt(N-1)&&(j+=r($,_,f,$.charCodeAt(2)))}F=H=M=_=0,$="",f=h.charCodeAt(++P)}}switch(f){case 13:case 10:47===w?w=0:0===1+_&&107!==l&&0<$.length&&(H=1,$+="\0"),0<I*O&&a(0,$,s,e,R,x,j.length,l,u,l),x=1,R++;break;case 59:case 125:if(0===w+k+E+y){x++;break}default:switch(x++,v=h.charAt(P),f){case 9:case 32:if(0===k+y+w)switch(A){case 44:case 58:case 9:case 32:v="";break;default:32!==f&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===k+w+y&&(H=F=1,v="\f"+v);break;case 108:if(0===k+w+y+L&&0<M)switch(P-M){case 2:112===A&&58===h.charCodeAt(P-3)&&(L=A);case 8:111===T&&(L=T)}break;case 58:0===k+w+y&&(M=P);break;case 44:0===w+E+k+y&&(H=1,v+="\r");break;case 34:case 39:0===w&&(k=k===f?0:0===k?f:k);break;case 91:0===k+w+E&&y++;break;case 93:0===k+w+E&&y--;break;case 41:0===k+w+y&&E--;break;case 40:0===k+w+y&&(0===_&&(2*A+3*T==533||(_=1)),E++);break;case 64:0===w+E+k+y+M+p&&(p=1);break;case 42:case 47:if(!(0<k+y+E))switch(w){case 0:switch(2*f+3*h.charCodeAt(P+1)){case 235:w=47;break;case 220:N=P,w=42}break;case 42:47===f&&42===A&&N+2!==P&&(33===h.charCodeAt(N+2)&&(j+=h.substring(N,P+1)),v="",w=0)}}0===w&&($+=v)}T=A,A=f,P++}if(0<(N=j.length)){if(H=s,0<I&&void 0!==(b=a(2,j,H,e,R,x,N,l,u,l))&&0===(j=b).length)return z+j+K;if(j=H.join(",")+"{"+j+"}",0!=D*L){switch(2!==D||o(j,2)||(L=0),L){case 111:j=j.replace(S,":-moz-$1")+j;break;case 112:j=j.replace(m,"::-webkit-input-$1")+j.replace(m,"::-moz-$1")+j.replace(m,":-ms-input-$1")+j}L=0}}return z+j+K}function i(e,t,i){var r=t.trim().split(p);t=r;var o=r.length,n=e.length;switch(n){case 0:case 1:var a=0;for(e=0===n?"":e[0]+" ";a<o;++a)t[a]=s(e,t[a],i).trim();break;default:var h=a=0;for(t=[];a<o;++a)for(var l=0;l<n;++l)t[h++]=s(e[l]+" ",r[a],i).trim()}return t}function s(e,t,i){var s=t.charCodeAt(0);switch(33>s&&(s=(t=t.trim()).charCodeAt(0)),s){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,i,s){var n=e+";",a=2*t+3*i+4*s;if(944===a){e=n.indexOf(":",9)+1;var h=n.substring(e,n.length-1).trim();return h=n.substring(0,e).trim()+h+";",1===D||2===D&&o(h,1)?"-webkit-"+h+h:h}if(0===D||2===D&&!o(n,1))return n;switch(a){case 1015:return 97===n.charCodeAt(10)?"-webkit-"+n+n:n;case 951:return 116===n.charCodeAt(3)?"-webkit-"+n+n:n;case 963:return 110===n.charCodeAt(5)?"-webkit-"+n+n:n;case 1009:if(100!==n.charCodeAt(4))break;case 969:case 942:return"-webkit-"+n+n;case 978:return"-webkit-"+n+"-moz-"+n+n;case 1019:case 983:return"-webkit-"+n+"-moz-"+n+"-ms-"+n+n;case 883:if(45===n.charCodeAt(8))return"-webkit-"+n+n;if(0<n.indexOf("image-set(",11))return n.replace(A,"$1-webkit-$2")+n;break;case 932:if(45===n.charCodeAt(4))switch(n.charCodeAt(5)){case 103:return"-webkit-box-"+n.replace("-grow","")+"-webkit-"+n+"-ms-"+n.replace("grow","positive")+n;case 115:return"-webkit-"+n+"-ms-"+n.replace("shrink","negative")+n;case 98:return"-webkit-"+n+"-ms-"+n.replace("basis","preferred-size")+n}return"-webkit-"+n+"-ms-"+n+n;case 964:return"-webkit-"+n+"-ms-flex-"+n+n;case 1023:if(99!==n.charCodeAt(8))break;return"-webkit-box-pack"+(h=n.substring(n.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+n+"-ms-flex-pack"+h+n;case 1005:return _.test(n)?n.replace(u,":-webkit-")+n.replace(u,":-moz-")+n:n;case 1e3:switch(t=(h=n.substring(13).trim()).indexOf("-")+1,h.charCodeAt(0)+h.charCodeAt(t)){case 226:h=n.replace(b,"tb");break;case 232:h=n.replace(b,"tb-rl");break;case 220:h=n.replace(b,"lr");break;default:return n}return"-webkit-"+n+"-ms-"+h+n;case 1017:if(-1===n.indexOf("sticky",9))break;case 975:switch(t=(n=e).length-10,a=(h=(33===n.charCodeAt(t)?n.substring(0,t):n).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|h.charCodeAt(7))){case 203:if(111>h.charCodeAt(8))break;case 115:n=n.replace(h,"-webkit-"+h)+";"+n;break;case 207:case 102:n=n.replace(h,"-webkit-"+(102<a?"inline-":"")+"box")+";"+n.replace(h,"-webkit-"+h)+";"+n.replace(h,"-ms-"+h+"box")+";"+n}return n+";";case 938:if(45===n.charCodeAt(5))switch(n.charCodeAt(6)){case 105:return h=n.replace("-items",""),"-webkit-"+n+"-webkit-box-"+h+"-ms-flex-"+h+n;case 115:return"-webkit-"+n+"-ms-flex-item-"+n.replace(w,"")+n;default:return"-webkit-"+n+"-ms-flex-line-pack"+n.replace("align-content","").replace(w,"")+n}break;case 973:case 989:if(45!==n.charCodeAt(3)||122===n.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(h=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,i,s).replace(":fill-available",":stretch"):n.replace(h,"-webkit-"+h)+n.replace(h,"-moz-"+h.replace("fill-",""))+n;break;case 962:if(n="-webkit-"+n+(102===n.charCodeAt(5)?"-ms-"+n:"")+n,211===i+s&&105===n.charCodeAt(13)&&0<n.indexOf("transform",10))return n.substring(0,n.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+n}return n}function o(e,t){var i=e.indexOf(1===t?":":"{"),s=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),M(2!==t?s:s.replace(E,"$1"),i,t)}function n(e,t){var i=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(y," or ($1)").substring(4):"("+t+")"}function a(e,t,i,s,r,o,n,a,h,c){for(var d,u=0,_=t;u<I;++u)switch(d=T[u].call(l,e,_,i,s,r,o,n,a,h,c)){case void 0:case!1:case!0:case null:break;default:_=d}if(_!==t)return _}function h(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!=typeof e?D=1:(D=2,M=e):D=0),h}function l(e,i){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<I){var r=a(-1,i,s,s,R,x,0,0,0,0);void 0!==r&&"string"==typeof r&&(i=r)}var o=t(B,s,i,0,0);return 0<I&&void 0!==(r=a(-2,o,s,s,R,x,o.length,0,0,0))&&(o=r),L=0,x=R=1,o}var c=/^\0+/g,d=/[\0\r\f]/g,u=/: */g,_=/zoo|gra/,f=/([,: ])(transform)/g,p=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,S=/:(read-only)/g,b=/[svh]\w+-[tblr]{2}/,C=/\(\s*(.*)\s*\)/g,y=/([\s\S]*?);/g,w=/-self|flex-/g,E=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,x=1,R=1,L=0,D=1,B=[],T=[],I=0,M=null,O=0;return l.use=function e(t){switch(t){case void 0:case null:I=T.length=0;break;default:if("function"==typeof t)T[I++]=t;else if("object"==typeof t)for(var i=0,s=t.length;i<s;++i)e(t[i]);else O=0|!!t}return e},l.set=h,void 0!==e&&h(e),l}},351:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const s={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1}},869:module=>{var e;self,e=()=>(()=>{var __webpack_modules__={487:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],i=0;i<e.length;i++)t.push(255&e.charCodeAt(i));return t},bytesToString:function(e){for(var t=[],i=0;i<e.length;i++)t.push(String.fromCharCode(e[i]));return t.join("")}}};e.exports=t},12:e=>{var t,i;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&i.rotl(e,8)|4278255360&i.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=i.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],i=0,s=0;i<e.length;i++,s+=8)t[s>>>5]|=e[i]<<24-s%32;return t},wordsToBytes:function(e){for(var t=[],i=0;i<32*e.length;i+=8)t.push(e[i>>>5]>>>24-i%32&255);return t},bytesToHex:function(e){for(var t=[],i=0;i<e.length;i++)t.push((e[i]>>>4).toString(16)),t.push((15&e[i]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},bytesToBase64:function(e){for(var i=[],s=0;s<e.length;s+=3)for(var r=e[s]<<16|e[s+1]<<8|e[s+2],o=0;o<4;o++)8*s+6*o<=8*e.length?i.push(t.charAt(r>>>6*(3-o)&63)):i.push("=");return i.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var i=[],s=0,r=0;s<e.length;r=++s%4)0!=r&&i.push((t.indexOf(e.charAt(s-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(s))>>>6-2*r);return i}},e.exports=i},738:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:(e,t,i)=>{var s,r,o,n,a;s=i(12),r=i(487).utf8,o=i(738),n=i(487).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?n.stringToBytes(e):r.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var i=s.bytesToWords(e),h=8*e.length,l=1732584193,c=-271733879,d=-1732584194,u=271733878,_=0;_<i.length;_++)i[_]=16711935&(i[_]<<8|i[_]>>>24)|4278255360&(i[_]<<24|i[_]>>>8);i[h>>>5]|=128<<h%32,i[14+(h+64>>>9<<4)]=h;var f=a._ff,p=a._gg,v=a._hh,g=a._ii;for(_=0;_<i.length;_+=16){var m=l,S=c,b=d,C=u;l=f(l,c,d,u,i[_+0],7,-680876936),u=f(u,l,c,d,i[_+1],12,-389564586),d=f(d,u,l,c,i[_+2],17,606105819),c=f(c,d,u,l,i[_+3],22,-1044525330),l=f(l,c,d,u,i[_+4],7,-176418897),u=f(u,l,c,d,i[_+5],12,1200080426),d=f(d,u,l,c,i[_+6],17,-1473231341),c=f(c,d,u,l,i[_+7],22,-45705983),l=f(l,c,d,u,i[_+8],7,1770035416),u=f(u,l,c,d,i[_+9],12,-1958414417),d=f(d,u,l,c,i[_+10],17,-42063),c=f(c,d,u,l,i[_+11],22,-1990404162),l=f(l,c,d,u,i[_+12],7,1804603682),u=f(u,l,c,d,i[_+13],12,-40341101),d=f(d,u,l,c,i[_+14],17,-1502002290),l=p(l,c=f(c,d,u,l,i[_+15],22,1236535329),d,u,i[_+1],5,-165796510),u=p(u,l,c,d,i[_+6],9,-1069501632),d=p(d,u,l,c,i[_+11],14,643717713),c=p(c,d,u,l,i[_+0],20,-373897302),l=p(l,c,d,u,i[_+5],5,-701558691),u=p(u,l,c,d,i[_+10],9,38016083),d=p(d,u,l,c,i[_+15],14,-660478335),c=p(c,d,u,l,i[_+4],20,-405537848),l=p(l,c,d,u,i[_+9],5,568446438),u=p(u,l,c,d,i[_+14],9,-1019803690),d=p(d,u,l,c,i[_+3],14,-187363961),c=p(c,d,u,l,i[_+8],20,1163531501),l=p(l,c,d,u,i[_+13],5,-1444681467),u=p(u,l,c,d,i[_+2],9,-51403784),d=p(d,u,l,c,i[_+7],14,1735328473),l=v(l,c=p(c,d,u,l,i[_+12],20,-1926607734),d,u,i[_+5],4,-378558),u=v(u,l,c,d,i[_+8],11,-2022574463),d=v(d,u,l,c,i[_+11],16,1839030562),c=v(c,d,u,l,i[_+14],23,-35309556),l=v(l,c,d,u,i[_+1],4,-1530992060),u=v(u,l,c,d,i[_+4],11,1272893353),d=v(d,u,l,c,i[_+7],16,-155497632),c=v(c,d,u,l,i[_+10],23,-1094730640),l=v(l,c,d,u,i[_+13],4,681279174),u=v(u,l,c,d,i[_+0],11,-358537222),d=v(d,u,l,c,i[_+3],16,-722521979),c=v(c,d,u,l,i[_+6],23,76029189),l=v(l,c,d,u,i[_+9],4,-640364487),u=v(u,l,c,d,i[_+12],11,-421815835),d=v(d,u,l,c,i[_+15],16,530742520),l=g(l,c=v(c,d,u,l,i[_+2],23,-995338651),d,u,i[_+0],6,-198630844),u=g(u,l,c,d,i[_+7],10,1126891415),d=g(d,u,l,c,i[_+14],15,-1416354905),c=g(c,d,u,l,i[_+5],21,-57434055),l=g(l,c,d,u,i[_+12],6,1700485571),u=g(u,l,c,d,i[_+3],10,-1894986606),d=g(d,u,l,c,i[_+10],15,-1051523),c=g(c,d,u,l,i[_+1],21,-2054922799),l=g(l,c,d,u,i[_+8],6,1873313359),u=g(u,l,c,d,i[_+15],10,-30611744),d=g(d,u,l,c,i[_+6],15,-1560198380),c=g(c,d,u,l,i[_+13],21,1309151649),l=g(l,c,d,u,i[_+4],6,-145523070),u=g(u,l,c,d,i[_+11],10,-1120210379),d=g(d,u,l,c,i[_+2],15,718787259),c=g(c,d,u,l,i[_+9],21,-343485551),l=l+m>>>0,c=c+S>>>0,d=d+b>>>0,u=u+C>>>0}return s.endian([l,c,d,u])})._ff=function(e,t,i,s,r,o,n){var a=e+(t&i|~t&s)+(r>>>0)+n;return(a<<o|a>>>32-o)+t},a._gg=function(e,t,i,s,r,o,n){var a=e+(t&s|i&~s)+(r>>>0)+n;return(a<<o|a>>>32-o)+t},a._hh=function(e,t,i,s,r,o,n){var a=e+(t^i^s)+(r>>>0)+n;return(a<<o|a>>>32-o)+t},a._ii=function(e,t,i,s,r,o,n){var a=e+(i^(t|~s))+(r>>>0)+n;return(a<<o|a>>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var i=s.wordsToBytes(a(e,t));return t&&t.asBytes?i:t&&t.asString?n.bytesToString(i):s.bytesToHex(i)}},166:(e,t,i)=>{"use strict";i.d(t,{r:()=>h});var s=i(46),r=i(565),o=i(611),n=i(305),a=i.n(n);class h extends s.H{constructor(e,t){super(),this.protocol=2,this.inflate=a().inflateInit(15),this.bpp=1,this.state=0,this.focusMode=0,this.useZRLE=!0,this.frameRateDelay=2,this.canvasCtx=t,this.sparecache={},this.buttonmask=0,this.canvasControl=this.canvasCtx.canvas,this.lastMouseMoveTime=(new Date).getTime(),this.logger=e,this.setDeskFocus=(e,t)=>{},this.getDeskFocus=e=>{}}processData(e){this.onProcessData(e)}onStateChange(e){this.logger.verbose(`state change in AMTDesktop: ${e}`),0===e&&(this.canvasCtx.fillStyle="#FFFFFF",this.canvasCtx.fillRect(0,0,this.canvasCtx.canvas.width,this.canvasCtx.canvas.width))}start(){this.logger.verbose("Starting desktop here"),this.state=0,this.inflate.inflateReset(),this.onKvmDataPending=[],this.onKvmDataAck=-1,this.kvmDataSupported=!1;for(const e in this.sparecache)delete this.sparecache[e]}onSendKvmData(e){!0!==this.onKvmDataAck?this.onKvmDataPending.push(e):((0,o.f)(this.urlvars)&&(0,o.f)(this.urlvars.kvmdatatrace)&&console.log(`KVM-Send (${e.length}) data`),e="\0KvmDataChannel\0"+e,this.onSend(String.fromCharCode(6,0,0,0)+r.r.IntToStr(e.length)+e),this.onKvmDataAck=!1)}}},59:(e,t,i)=>{"use strict";i.d(t,{N:()=>r});var s=i(503);class r extends s.K{constructor(e,t,i,s,r,o,n,a,h,l,c){super(e,t,i,s,r,o,n,a,h,l,c)}}},503:(e,t,i)=>{"use strict";i.d(t,{K:()=>h,b:()=>s});var s,r=i(565),o=i(568),n=i.n(o),a=i(611);!function(e){e[e.SOL=1]="SOL",e[e.KVM=2]="KVM",e[e.IDER=3]="IDER"}(s||(s={}));class h{constructor(e,t,i,s,r,o,n,a,h,l,c){this.fileReader=i,this.fileReaderInUse=!1,this.fileReaderAcc=[],this.randomNonceChars="abcdef0123456789",this.host=s,this.port=r,this.user=o,this.pass=n,this.tls=a,this.tlsv1only=h,this.protocol=t,this.RedirectStartSol=String.fromCharCode(16,0,0,0,83,79,76,32),this.RedirectStartKvm=String.fromCharCode(16,1,0,0,75,86,77,82),this.RedirectStartIder=String.fromCharCode(16,0,0,0,73,68,69,82),this.urlvars={},this.server=c,this.amtAccumulator="",this.authUri="",this.logger=e,this.authToken=l}getWsLocation(){return this.isBrowser()&&!(0,a.f)(this.server)?`${window.location.protocol.replace("http","ws")}//\n ${window.location.host}\n ${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}\n /webrelay.ashx?p=2&host=${this.host}&port=${this.port}&tls=${this.tls}${"*"===this.user?"&serverauth=1":""}${void 0===this.pass?"&serverauth=1&user="+this.user:""}&tls1only=${this.tlsv1only}`:`${String(this.server)}/webrelay.ashx?p=2&host=${this.host}&port=${this.port}&tls=${this.tls}${"*"===this.user?"&serverauth=1":""}${void 0===this.pass?"&serverauth=1&user="+this.user:""}&tls1only=${this.tlsv1only}`}isBrowser(){try{const e="undefined"!=typeof window;return e&&this.logger.debug("!!!!!BROWSER!!!!!"),e}catch(e){return!1}}start(e){this.connectState=0,this.socket=new e(this.getWsLocation(),this.authToken),this.socket.onopen=this.onSocketConnected.bind(this),this.socket.onmessage=this.onMessage.bind(this),this.socket.onclose=this.onSocketClosed.bind(this),(0,a.f)(this.fileReader)&&(0,a.f)(this.fileReader.readAsBinaryString)?this.fileReader.onload=(e=>{this.onSocketData(e.target.result),0===this.fileReaderAcc.length?this.fileReaderInUse=!1:this.fileReader.readAsBinaryString(new Blob([this.fileReaderAcc.shift()]))}).bind(this):(0,a.f)(this.fileReader)&&(0,a.f)(this.fileReader.readAsArrayBuffer)&&(this.fileReader.onloadend=(e=>{this.onSocketData(e.target.result),0===this.fileReaderAcc.length?this.fileReaderInUse=!1:this.fileReader.readAsArrayBuffer(this.fileReaderAcc.shift())}).bind(this)),this.logger.verbose("Connecting to websocket"),this.onStateChange(1)}onSocketConnected(){(0,a.f)(this.urlvars)&&(0,a.f)(this.urlvars.redirtrace)&&console.log("REDIR-CONNECT"),this.onStateChange(2),this.logger.verbose(`Connected to websocket server. With protocol ${this.protocol} (2 = KVM)`),this.logger.info(`Start Redirect Session for protocol. ${this.protocol}`),this.protocol===s.SOL&&this.socketSend(this.RedirectStartSol),this.protocol===s.KVM&&this.socketSend(this.RedirectStartKvm),this.protocol===s.IDER&&this.socketSend(this.RedirectStartIder)}onMessage(e){try{if(this.inDataCount++,"object"==typeof e.data){if(this.fileReaderInUse)return void this.fileReaderAcc.push(e.data);if(null!=this.fileReader.readAsBinaryString)this.fileReaderInUse=!0,this.fileReader.readAsBinaryString(new Blob([e.data]));else if(null!=this.fileReader.readAsArrayBuffer)this.fileReaderInUse=!0,this.fileReader.readAsArrayBuffer(e.data);else{let t="";const i=new Uint8Array(e.data),s=i.byteLength;for(let e=0;e<s;e++)t+=String.fromCharCode(i[e]);this.onSocketData(t)}}else this.onSocketData(e.data)}catch(e){this.logger.error(e),this.stop(),this.onError()}}onSocketData(e){if((0,a.f)(e)&&-1!==this.connectState){if("object"==typeof e){let t="";const i=new Uint8Array(e),s=i.byteLength;for(let e=0;e<s;e++)t+=String.fromCharCode(i[e]);e=t}else if("string"!=typeof e)return;if((this.protocol===s.KVM||this.protocol===s.IDER)&&1===this.connectState)return this.onProcessData(e);for(this.amtAccumulator+=e;this.amtAccumulator.length>=1;){let e=0;switch(this.amtAccumulator.charCodeAt(0)){case 17:if(this.logger.verbose(`Start Redirection Session reply received for ${this.protocol}`),this.amtAccumulator.length<4)return;switch(this.amtAccumulator.charCodeAt(1)){case 0:{if(this.logger.verbose("Session status success. Start handshake"),this.amtAccumulator.length<13)return;const t=this.amtAccumulator.charCodeAt(12);if(this.amtAccumulator.length<13+t)return;this.logger.verbose("Query for available authentication"),this.socketSend(String.fromCharCode(19,0,0,0,0,0,0,0,0)),e=13+t;break}default:this.stop()}break;case 20:{if(this.logger.verbose("Available Authentications reply received."),this.amtAccumulator.length<9)return;const t=r.r.ReadIntX(this.amtAccumulator,5);if(this.amtAccumulator.length<9+t)return;const i=this.amtAccumulator.charCodeAt(1),s=this.amtAccumulator.charCodeAt(4),o=[];for(let e=0;e<t;e++)o.push(this.amtAccumulator.charCodeAt(9+e));const n=this.amtAccumulator.substring(9,9+t);if(e=9+t,0===s)(0,a.f)(o.includes(4))?(this.logger.verbose("Good Digest Auth (With cnonce and all)"),this.socketSend(String.fromCharCode(19,0,0,0,4)+r.r.IntToStrX(this.user.length+this.authUri.length+8)+String.fromCharCode(this.user.length)+this.user+String.fromCharCode(0,0)+String.fromCharCode(this.authUri.length)+this.authUri+String.fromCharCode(0,0,0,0))):(0,a.f)(o.includes(3))?(this.logger.warn("Bad Digest Auth"),this.socketSend(String.fromCharCode(19,0,0,0,3)+r.r.IntToStrX(this.user.length+this.authUri.length+7)+String.fromCharCode(this.user.length)+this.user+String.fromCharCode(0,0)+String.fromCharCode(this.authUri.length)+this.authUri+String.fromCharCode(0,0,0))):(0,a.f)(o.includes(1))?(this.logger.verbose("Basic Auth"),this.socketSend(String.fromCharCode(19,0,0,0,1)+r.r.IntToStrX(this.user.length+this.pass.length+2)+String.fromCharCode(this.user.length)+this.user+String.fromCharCode(this.pass.length)+this.pass)):(this.logger.error("Auth Type not recognized. Stopping."),this.stop());else if(3!==s&&4!==s||1!==i)if(0===i){if(1===this.protocol){const e=1e4,t=100,i=0,s=1e4,o=100,n=0;this.socketSend(String.fromCharCode(32,0,0,0)+r.r.IntToStrX(this.amtSequence++)+r.r.ShortToStrX(e)+r.r.ShortToStrX(t)+r.r.ShortToStrX(i)+r.r.ShortToStrX(s)+r.r.ShortToStrX(o)+r.r.ShortToStrX(n)+r.r.IntToStrX(0))}2===this.protocol&&this.socketSend(String.fromCharCode(64,0,0,0,0,0,0,0)),3===this.protocol&&(this.connectState=1,this.onStateChange(3))}else this.stop();else{let e=0;const t=n.charCodeAt(e),i=n.substring(e+1,e+1+t);e+=t+1;const o=n.charCodeAt(e),a=n.substring(e+1,e+1+o);e+=o+1;let h=0,l=null;const c=this.generateRandomNonce(32),d="00000002";let u="";4===s&&(h=n.charCodeAt(e),l=n.substring(e+1,e+1+h),e+=h+1,u=`${d}:${c}:${String(l)} :`);const _=this.hex_md5(this.hex_md5(this.user+":"+i+":"+this.pass)+":"+a+":"+u+this.hex_md5("POST:"+this.authUri));let f=this.user.length+i.length+a.length+this.authUri.length+c.length+d.length+_.length+7;4===s&&(f+=parseInt(l.length)+1);let p=String.fromCharCode(19,0,0,0,s)+r.r.IntToStrX(f)+String.fromCharCode(this.user.length)+this.user+String.fromCharCode(i.length)+i+String.fromCharCode(a.length)+a+String.fromCharCode(this.authUri.length)+this.authUri+String.fromCharCode(c.length)+c+String.fromCharCode(d.length)+d+String.fromCharCode(_.length)+_;4===s&&(p=String(p)+(String.fromCharCode(l.length)+String(l))),this.socketSend(p)}break}case 33:if(this.amtAccumulator.length<23)break;this.logger.verbose("Response to settings"),e=23,this.socketSend(String.fromCharCode(39,0,0,0)+r.r.IntToStrX(this.amtSequence++)+String.fromCharCode(0,0,27,0,0,0)),1===this.protocol&&(this.amtKeepAliveTimer=setInterval(this.sendAmtKeepAlive.bind(this),2e3)),this.connectState=1,this.onStateChange(3);break;case 41:if(this.amtAccumulator.length<10)break;this.logger.verbose("Serial Settings"),e=10;break;case 42:{if(this.amtAccumulator.length<10)break;this.logger.verbose("Incoming display data");const t=10+((255&this.amtAccumulator.charCodeAt(9))<<8)+(255&this.amtAccumulator.charCodeAt(8));if(this.amtAccumulator.length<t)break;this.onProcessData(this.amtAccumulator.substring(10,t)),e=t;break}case 43:if(this.amtAccumulator.length<8)break;this.logger.verbose("Keep Alve message"),e=8;break;case 65:if(this.amtAccumulator.length<8)break;this.logger.verbose("KVM traffic. Call onStart handler. And forward rest of acc directly."),this.connectState=1,this.onStart(),this.amtAccumulator.length>8&&this.onProcessData(this.amtAccumulator.substring(8)),e=this.amtAccumulator.length;break;default:return this.logger.error(`Unknown Intel AMT command: ${this.amtAccumulator.charCodeAt(0)} acclen=${this.amtAccumulator.length}`),void this.stop()}if(0===e)return;this.amtAccumulator=this.amtAccumulator.substring(e)}}}hex_md5(e){return this.logger.verbose("MD5 the string"),n()(e)}socketSend(e){(0,a.f)(this.urlvars)&&(0,a.f)(this.urlvars.redirtrace)&&this.logger.verbose(`REDIR-SEND(${e.length}): ${r.r.rstr2hex(e)}`);try{if(null!=this.socket&&1===this.socket.readyState){const t=new Uint8Array(e.length);this.logger.verbose(`Redir Send( ${e.length}): ${r.r.rstr2hex(e)}`);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);this.socket.send(t.buffer)}}catch(e){this.logger.error(`Socket send error: ${String(e)}`)}}send(e){this.logger.verbose("Send called "+e),null!=this.socket&&1===this.connectState&&(this.protocol===s.SOL?this.socketSend(String.fromCharCode(40,0,0,0)+r.r.IntToStrX(this.amtSequence++)+r.r.ShortToStrX(e.length)+e):this.socketSend(e))}sendAmtKeepAlive(){null!=this.socket&&this.socketSend(String.fromCharCode(43,0,0,0)+r.r.IntToStrX(this.amtSequence++))}generateRandomNonce(e){let t="";for(let i=0;i<e;i++)t+=this.randomNonceChars.charAt(Math.floor(Math.random()*this.randomNonceChars.length));return t}onSocketClosed(e){(0,a.f)(this.urlvars)&&(0,a.f)(this.urlvars.redirtrace)&&console.log("REDIR-CLOSED"),this.logger.warn("Redir Socket Closed"),this.stop()}onStateChange(e){console.info("onstatechange",e),this.state!==e&&(this.state=e,this.onNewState(this.state),null!=this.onStateChanged&&this.onStateChanged(this,this.state))}stop(){this.logger.warn("Stop called on Redirector. Change state to 0 and close Socket."),this.onStateChange(0),this.connectState=-1,this.amtAccumulator="",null!=this.socket&&(this.socket.close(),this.socket=null),null!=this.amtKeepAliveTimer&&(clearInterval(this.amtKeepAliveTimer),this.amtKeepAliveTimer=null)}}},277:(e,t,i)=>{"use strict";i.d(t,{r:()=>s});class s{constructor(){this.terminalEmulation=1,this.fxEmulation=0,this.fxLineBreak=0,this.AsciiToUnicode=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],this.AsciiToUnicodeIntel=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],this.StateChange=e=>{},this.TermSendKeys=e=>this.onSend(e)}}},237:(e,t,i)=>{"use strict";i.d(t,{k:()=>r});var s=i(201);class r{constructor(e){this.minLevel=e}log(e,t){switch(e){case s.i.VERBOSE:this.verbose(t);break;case s.i.INFO:this.info(t);break;case s.i.DEBUG:this.debug(t);break;case s.i.WARNING:this.warn(t);break;case s.i.ERROR:this.error(t)}}debug(e){this.minLevel>=s.i.DEBUG&&console.debug(e)}info(e){this.minLevel>=s.i.INFO&&console.info(e)}error(e){this.minLevel>=s.i.ERROR&&console.error(e)}warn(e){this.minLevel>=s.i.WARNING&&console.warn(e)}verbose(e){this.minLevel>=s.i.VERBOSE&&console.log(e)}}},565:(e,t,i)=>{"use strict";i.d(t,{r:()=>r});var s=i(611);const r={ReadShort:(e,t)=>(e.charCodeAt(t)<<8)+e.charCodeAt(t+1),ReadShortX:(e,t)=>(e.charCodeAt(t+1)<<8)+e.charCodeAt(t),ReadInt:(e,t)=>16777216*e.charCodeAt(t)+(e.charCodeAt(t+1)<<16)+(e.charCodeAt(t+2)<<8)+e.charCodeAt(t+3),ReadSInt:(e,t)=>(e.charCodeAt(t)<<24)+(e.charCodeAt(t+1)<<16)+(e.charCodeAt(t+2)<<8)+e.charCodeAt(t+3),ReadIntX:(e,t)=>16777216*e.charCodeAt(t+3)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+1)<<8)+e.charCodeAt(t),ShortToStr:e=>String.fromCharCode(e>>8&255,255&e),ShortToStrX:e=>String.fromCharCode(255&e,e>>8&255),IntToStr:e=>String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e),IntToStrX:e=>String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255),SplitArray:e=>e.split(","),Clone:e=>JSON.parse(JSON.stringify(e)),EscapeHtml:e=>"string"==typeof e?e.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):"boolean"==typeof e||"number"==typeof e?e:void 0,ArrayElementMove(e,t,i){e.splice(i,0,e.splice(t,1)[0])},ObjectToStringEx(e,t){let i="";if(0!==e&&(!(0,s.f)(e)||null==e))return"(Null)";if(e instanceof Array)for(const s in e)i=i+"<br />"+String(this.gap(t))+"Item #"+String(s)+": "+String(this.ObjectToStringEx(e[s],t+1));else if(e instanceof Object)for(const s in e)i=i+"<br />"+String(this.gap(t))+String(s)+" = "+String(this.ObjectToStringEx(e[s],t+1));else i+=String(this.EscapeHtml(e));return i},ObjectToStringEx2(e,t){let i="";if(0!==e&&(!(0,s.f)(e)||null==e))return"(Null)";if(e instanceof Array)for(const s in e)i=i+"\r\n"+String(this.gap2(t))+"Item #"+String(s)+": "+String(this.ObjectToStringEx2(e[s],t+1));else if(e instanceof Object)for(const s in e)i=i+"\r\n"+String(this.gap2(t))+String(s)+" = "+String(this.ObjectToStringEx2(e[s],t+1));else i+=String(this.EscapeHtml(e));return i},gap(e){let t="";for(let i=0;i<4*e;i++)t+="&nbsp;";return t},gap2(e){let t="";for(let i=0;i<4*e;i++)t+=" ";return t},ObjectToString(e){return this.ObjectToStringEx(e,0)},ObjectToString2(e){return this.ObjectToStringEx2(e,0)},char2hex:e=>(e+256).toString(16).substr(-2).toUpperCase(),rstr2hex(e){let t,i="";for(t=0;t<e.length;t++)i+=String(this.char2hex(e.charCodeAt(t)));return i},encode_utf8:e=>unescape(encodeURIComponent(e)),decode_utf8:e=>decodeURIComponent(escape(e)),data2blob(e){const t=new Array(e.length);for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return new Blob([new Uint8Array(t)])},random:e=>Math.floor(Math.random()*e),trademarks:e=>e.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}},46:(e,t,i)=>{"use strict";i.d(t,{H:()=>s});class s{processData(e){}onStateChange(e){}start(){}onSendKvmData(e){}}},784:(e,t,i)=>{"use strict";i.d(t,{$:()=>o});var s=i(989),r=i(611);class o{constructor(e,t,i){this.acc="",this.stateProcessorFac=new s.v(t,i,this.updateRFBState.bind(this)),this.parent=i,this.logger=e}processData(e){if(!(0,r.f)(e))return;this.acc+=e;let t=0;for(this.logger.verbose(`Process Data ACC length: ${this.acc.length}`);this.acc.length>0;){const e=this.stateProcessorFac.getProcessor(this.parent.state),i=this.parent.state;if(t=e.processState(this.acc),this.logger.verbose(`State ${i} Processed. cmdSize returned ${t}`),0===t)return;this.acc=this.acc.substring(t),this.logger.verbose(`remaining acc ${this.acc.length} command size: ${t} new parent state: ${this.parent.state}`)}}updateRFBState(e){this.parent.state=e}}},679:(e,t,i)=>{"use strict";i.d(t,{X:()=>r});var s=i(644);class r{constructor(e){this.parent=e}Decode(e,t,i,r,o,n,a,h){const l=e.charCodeAt(t++);let c,d,u;const _={};let f,p=0,v=0;if(0===l){for(this.parent.logger.verbose("Raw encoding"),f=0;f<a;f++)s.j.setPixel(this.parent,e.charCodeAt(t++)+(2===this.parent.bpp?e.charCodeAt(t++)<<8:0),f);s.j.putImage(this.parent,i,r)}else if(1===l){d=e.charCodeAt(t++)+(2===this.parent.bpp?e.charCodeAt(t++)<<8:0),this.parent.canvasCtx.fillStyle="rgb("+(1===this.parent.bpp?`${224&d}, ${(28&d)<<3}, ${s.j.fixColor((3&d)<<6)}`:`${d>>8&248}, ${d>>3&252},${(31&d)<<3}`)+")",this.parent.logger.verbose("fillstyle: "+this.parent.canvasCtx.fillStyle);const a=s.j.rotX(this.parent,i,r);r=s.j.rotY(this.parent,i,r),i=a,this.parent.canvasCtx.fillRect(i,r,o,n)}else if(l>1&&l<17){this.parent.logger.verbose("Read the packed palette");let o=4,n=15;for(f=0;f<l;f++)_[f]=e.charCodeAt(t++)+(2===this.parent.bpp?e.charCodeAt(t++)<<8:0);for(2===l?(o=1,n=1):l<=4&&(o=2,n=3);p<a&&t<e.length;)for(d=e.charCodeAt(t++),f=8-o;f>=0;f-=o)s.j.setPixel(this.parent,_[d>>f&n],p++);s.j.putImage(this.parent,i,r)}else if(128===l){for(this.parent.logger.verbose("RLE encoded tile");p<a&&t<e.length;){d=e.charCodeAt(t++)+(2===this.parent.bpp?e.charCodeAt(t++)<<8:0),v=1;do{v+=u=e.charCodeAt(t++)}while(255===u);for(;--v>=0;)s.j.setPixel(this.parent,d,p++)}s.j.putImage(this.parent,i,r)}else if(l>129){for(this.parent.logger.verbose("Read the RLE palette"),f=0;f<l-128;f++)_[f]=e.charCodeAt(t++)+(2===this.parent.bpp?e.charCodeAt(t++)<<8:0);for(this.parent.logger.verbose("Decode RLE on palette");p<a&&t<e.length;){if(v=1,c=e.charCodeAt(t++),d=_[c%128],c>127)do{v+=u=e.charCodeAt(t++)}while(255===u);for(;--v>=0;)s.j.setPixel(this.parent,d,p++)}s.j.putImage(this.parent,i,r)}}}},646:(e,t,i)=>{"use strict";i.d(t,{$:()=>s.$,X:()=>r.X});var s=i(784),r=i(679)},663:(e,t,i)=>{"use strict";var s;i.d(t,{i:()=>s}),function(e){e[e.VERBOSE=5]="VERBOSE",e[e.INFO=4]="INFO",e[e.DEBUG=3]="DEBUG",e[e.WARNING=2]="WARNING",e[e.ERROR=1]="ERROR"}(s||(s={}))},201:(e,t,i)=>{"use strict";i.d(t,{i:()=>s.i});var s=i(663)},725:(e,t,i)=>{"use strict";i.d(t,{e:()=>o});var s=i(565),r=i(8);class o{constructor(e,t,i,s){this.wsSocket=e,this.parent=t,this.rleDecoder=i,this.updateRFBState=s}processState(e){let t=0;if(e.length>=12){const i=s.r.ReadShort(e,0),o=s.r.ReadShort(e,2),n=s.r.ReadShort(e,4),a=s.r.ReadShort(e,6),h=n*a,l=s.r.ReadInt(e,8);if(l<17){if(n<1||n>64||a<1||a>64)throw this.parent.logger.error(`Invalid tile size (${n},${a}), disconnecting.`),new Error("Invalid tile size");if(this.parent.sparew!==n||this.parent.spareh!==a){this.parent.sparew=this.parent.sparew2=n,this.parent.spareh=this.parent.spareh2=a,1!==this.parent.rotation&&3!==this.parent.rotation||(this.parent.sparew2=a,this.parent.spareh2=n);const e=`${this.parent.sparew2}x${this.parent.spareh2}`;this.parent.spare=this.parent.sparecache[e],(0,r.fQ)(this.parent.spare)||(this.parent.sparecache[e]=this.parent.spare=this.parent.canvasCtx.createImageData(this.parent.sparew2,this.parent.spareh2))}}if(4294967073===l)this.parent.logger.verbose("Desktop size"),this.parent.canvasCtx.canvas.width=this.parent.ScreenWidth=this.parent.rwidth=this.parent.width=n,this.parent.canvasCtx.canvas.height=this.parent.ScreenHeight=this.parent.rheight=this.parent.height=a,this.wsSocket.send(String.fromCharCode(3,0,0,0,0,0)+s.r.ShortToStr(this.parent.width)+s.r.ShortToStr(this.parent.height)),t=12,null!=this.parent.onScreenSizeChange&&this.parent.onScreenSizeChange(this.parent.ScreenWidth,this.parent.ScreenHeight);else if(0===l){let s=12;const n=12+h*this.parent.bpp;if(e.length<n)return 0;t=n;for(let t=0;t<h;t++)r.jw.setPixel(this.parent,e.charCodeAt(s++)+(2===this.parent.bpp?e.charCodeAt(s++)<<8:0),t);r.jw.putImage(this.parent,i,o)}else{if(16!==l)throw this.parent.logger.error(`Unknown Encoding: ${l} , HEX: ${s.r.rstr2hex(e)}`),new Error(`Unknown Encoding: ${l}`);{if(e.length<16)return 0;const r=s.r.ReadInt(e,12);if(e.length<16+r)return 0;const l=16,c=5,d=0;if(r>5&&0===e.charCodeAt(l)&&s.r.ReadShortX(e,l+1)===r-c)this.rleDecoder.Decode(e,l+5,i,o,n,a,h,r);else{const t=e.substring(l,l+r-d),s=this.parent.inflate.inflate(t);if(!(s.length>0))throw this.parent.logger.error("Invalid deflate data."),new Error("invalid deflate data");this.rleDecoder.Decode(s,0,i,o,n,a,h,s.length)}t=16+r}}if(100==--this.parent.state){this.parent.logger.debug("Frame completed. Update state and request new frame"),this.updateRFBState(4);const e=()=>r.Xn.sendRefresh(this.parent,this.wsSocket);0===this.parent.frameRateDelay?r.Xn.sendRefresh(this.parent,this.wsSocket):setTimeout(e,this.parent.frameRateDelay)}}return t}}},70:(e,t,i)=>{"use strict";i.d(t,{U:()=>r});var s=i(565);class r{constructor(e,t,i){this.wsSocket=e,this.serverCutTextHandler=t,this.updateRFBState=i}processState(e){let t=0,i=0;switch(e.charCodeAt(0)){case 0:if(e.length<4)return 0;this.updateRFBState(100+s.r.ReadShort(e,2)),t=4;break;case 2:t=1;break;case 3:if(e.length<8)return 0;if(i=s.r.ReadInt(e,4)+8,e.length<i)return 0;t=this.serverCutTextHandler.handleServerCutText(e)}return t}}},212:(e,t,i)=>{"use strict";i.d(t,{w:()=>s});class s{constructor(e,t){this.wsSocket=e,this.updateRFBState=t}processState(e){let t=0;return e.length>=12?(t=12,this.updateRFBState(1),this.wsSocket.send("RFB 003.008\n"),t):0}}},26:(e,t,i)=>{"use strict";i.d(t,{l:()=>s});class s{constructor(e,t){this.wsSocket=e,this.updateRFBState=t}processState(e){let t=0;return e.length>=1?(t=e.charCodeAt(0)+1,this.wsSocket.send(String.fromCharCode(1)),this.updateRFBState(2),t):0}}},724:(e,t,i)=>{"use strict";i.d(t,{m:()=>r});var s=i(565);class r{constructor(e,t){this.wsSocket=e,this.updateRFBState=t}processState(e){let t=0;if(e.length>=4){if(t=4,0!==s.r.ReadInt(e,0))throw new Error("Error. Stopping. Security response not None.");return this.wsSocket.send(String.fromCharCode(1)),this.updateRFBState(3),t}return 0}}},256:(e,t,i)=>{"use strict";i.d(t,{I:()=>o});var s=i(565),r=i(611);class o{constructor(e,t){this.wsSocket=e,this.parent=t}handleServerCutText(e){if(e.length<8)return 0;const t=s.r.ReadInt(e,4)+8;if(e.length<t)return 0;if(null!=this.parent.onKvmData){const i=e.substring(8,t);i.length>=16&&"\0KvmDataChannel"===i.substring(0,15)&&(this.parent.kvmDataSupported||(this.parent.kvmDataSupported=!0,console.log("KVM Data Channel Supported.")),(-1===this.parent.onKvmDataAck&&16===i.length||0!==i.charCodeAt(15))&&(this.parent.onKvmDataAck=!0),(0,r.f)(this.parent.urlvars)&&(0,r.f)(this.parent.urlvars.kvmdatatrace)&&console.log(`KVM-Recv((${i.length-16})): ${i.substring(16)}`),i.length>16&&this.parent.onKvmData(i.substring(16)),!0===this.parent.onKvmDataAck&&this.parent.onKvmDataPending.length>0&&this.wsSocket.onSendKvmData(this.parent.onKvmDataPending.shift()))}return t}}},946:(e,t,i)=>{"use strict";i.d(t,{C:()=>o});var s=i(565),r=i(173);class o{constructor(e,t,i){this.wsSocket=e,this.parent=t,this.updateRFBState=i}processState(e){let t=0;if(e.length>=24){this.parent.rotation=0;const i=s.r.ReadInt(e,20);if(e.length<24+i)return 0;t=24+i,null!=this.parent.updateScreenDimensions&&this.parent.updateScreenDimensions(s.r.ReadShort(e,0),s.r.ReadShort(e,2)),this.parent.canvasCtx.canvas.width=this.parent.ScreenWidth=this.parent.rwidth=this.parent.width=s.r.ReadShort(e,0),this.parent.canvasCtx.canvas.height=this.parent.ScreenHeight=this.parent.rheight=this.parent.height=s.r.ReadShort(e,2);let o="";return this.parent.useZRLE&&(o+=s.r.IntToStr(16)),o+=s.r.IntToStr(0),o+=s.r.IntToStr(1092),this.parent.logger.verbose("Send supported encodings"),this.wsSocket.send(String.fromCharCode(2,0)+s.r.ShortToStr(o.length/4+1)+o+s.r.IntToStr(-223)),1===this.parent.bpp&&this.wsSocket.send(String.fromCharCode(0,0,0,0,8,8,0,1)+s.r.ShortToStr(7)+s.r.ShortToStr(7)+s.r.ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)),this.updateRFBState(4),this.parent.onStateChange(3),this.parent.logger.info("Start new frame."),r.X.sendRefresh(this.parent,this.wsSocket),this.parent.oldMouseX=-1,t}return 0}}},389:(e,t,i)=>{"use strict";i.d(t,{Cu:()=>h.C,Ut:()=>o.U,ez:()=>s.e,ll:()=>n.l,mC:()=>a.m,wW:()=>r.w});var s=i(725),r=i(212),o=i(70),n=i(26),a=i(724),h=i(946)},989:(e,t,i)=>{"use strict";i.d(t,{v:()=>n});var s=i(389),r=i(256),o=i(679);class n{constructor(e,t,i){this.stateProcessors={},this.stateProcessors[0]=new s.wW(e,i),this.stateProcessors[1]=new s.ll(e,i),this.stateProcessors[2]=new s.mC(e,i),this.stateProcessors[3]=new s.Cu(e,t,i);const n=new r.I(e,t);this.stateProcessors[4]=new s.Ut(e,n,i),this.stateProcessors["100plus"]=new s.ez(e,t,new o.X(t),i)}getProcessor(e){return e<=100?this.stateProcessors[e]:this.stateProcessors["100plus"]}}},155:(e,t,i)=>{"use strict";i.d(t,{Q:()=>s});class s{constructor(e){this.processData=e=>{null!=this.terminal.capture&&(this.terminal.capture=String(this.terminal.capture)+e);let t="";for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);"J"===e[i]?this.clearTerminal():t+=0!=(128&s)?String.fromCharCode(this.terminal.AsciiToUnicode[127&s]):`${e[i]}`}this.processDataToXterm(t)},this.terminal=e}}},38:(e,t,i)=>{"use strict";i.d(t,{q:()=>o});var s=i(923),r=i(611);const o={convertAMTKeyCode:e=>(0,r.f)(e.code.startsWith("Key"))&&4===e.code.length?e.code.charCodeAt(3)+(!1===e.shiftKey?32:0):(0,r.f)(e.code.startsWith("Digit"))&&6===e.code.length?e.code.charCodeAt(5):(0,r.f)(e.code.startsWith("Numpad"))&&7===e.code.length?e.code.charCodeAt(6):s.Z[e.code]}},923:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const s={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512}},173:(e,t,i)=>{"use strict";i.d(t,{X:()=>o});var s=i(565),r=i(611);const o={sendRefresh(e,t){if(!e.holding)if(e.focusMode>0){const i=2*e.focusMode;t.send(String.fromCharCode(3,1)+s.r.ShortToStr(Math.max(Math.min(e.oldMouseX,e.lastMouseX)-e.focusMode,0))+s.r.ShortToStr(Math.max(Math.min(e.oldMouseY,e.lastMouseY)-e.focusMode,0))+s.r.ShortToStr(i+Math.abs(e.oldMouseX-e.lastMouseX))+s.r.ShortToStr(i+Math.abs(e.oldMouseY-e.lastMouseY))),e.oldMouseX=e.lastMouseX,e.oldMouseY=e.lastMouseY}else t.send(String.fromCharCode(3,1,0,0,0,0)+s.r.ShortToStr(e.rwidth)+s.r.ShortToStr(e.rheight))},sendKey(e,t,i){if("object"==typeof t)for(const i in t)this.sendKey(e,t[i][0],t[i][1]);else e.send(String.fromCharCode(4,i,0,0)+s.r.IntToStr(t))},sendKvmData(e,t,i){!0!==e.onKvmDataAck?e.onKvmDataPending.push(i):((0,r.f)(e.urlvars)&&(0,r.f)(e.urlvars.kvmdatatrace)&&console.log(`KVM-Send(${String(i.length)}): ${String(i)}`),i="\0KvmDataChannel\0"+String(i),t.send(`${String.fromCharCode(6,0,0,0)}${s.r.IntToStr(i.length)}${String(i)}`),e.onKvmDataAck=!1)},sendKeepAlive(e,t){e.lastKeepAlive<Date.now()-5e3&&(e.lastKeepAlive=Date.now(),t.send(String.fromCharCode(6,0,0,0)+s.r.IntToStr(16)+"\0KvmDataChannel\0"))},sendCtrlAltDelMsg(e){this.sendCad(e)},sendCad(e){this.sendKey(e,65507,1),this.sendKey(e,65513,1),this.sendKey(e,65535,1),this.sendKey(e,65535,0),this.sendKey(e,65513,0),this.sendKey(e,65507,0)}}},644:(e,t,i)=>{"use strict";i.d(t,{j:()=>s});const s={putImage(e,t,i){if(e.holding)return;const r=s.arotX(e,t,i);i=s.arotY(e,t,i),t=r,e.canvasCtx.putImageData(e.spare,t,i)},setPixel(e,t,i){let r,o,n=4*i;e.rotation>0&&(1===e.rotation?(r=i%e.sparew,o=Math.floor(i/e.sparew),n=4*(i=r*e.sparew2+(e.sparew2-1-o))):2===e.rotation?n=e.sparew*e.spareh*4-4-n:3===e.rotation&&(r=i%e.sparew,o=Math.floor(i/e.sparew),n=4*(i=(e.sparew2-1-r)*e.sparew2+o))),1===e.bpp?(e.spare.data[n++]=224&t,e.spare.data[n++]=(28&t)<<3,e.spare.data[n++]=s.fixColor((3&t)<<6)):(e.spare.data[n++]=t>>8&248,e.spare.data[n++]=t>>3&252,e.spare.data[n++]=(31&t)<<3),e.spare.data[n]=255},arotX:(e,t,i)=>0===e.rotation?t:1===e.rotation?e.canvasCtx.canvas.width-e.sparew2-i:2===e.rotation?e.canvasCtx.canvas.width-e.sparew2-t:3===e.rotation?i:0,arotY:(e,t,i)=>0===e.rotation?i:1===e.rotation?t:2===e.rotation?e.canvasCtx.canvas.height-e.spareh2-i:3===e.rotation?e.canvasCtx.canvas.height-e.spareh-t:0,crotX:(e,t,i)=>0===e.rotation?t:1===e.rotation?i:2===e.rotation?e.canvasCtx.canvas.width-t:3===e.rotation?e.canvasCtx.canvas.height-i:0,crotY:(e,t,i)=>0===e.rotation?i:1===e.rotation?e.canvasCtx.canvas.width-t:2===e.rotation?e.canvasCtx.canvas.height-i:3===e.rotation?t:0,rotX:(e,t,i)=>0===e.rotation||1===e.rotation?t:2===e.rotation?t-e.canvasCtx.canvas.width:3===e.rotation?t-e.canvasCtx.canvas.height:0,rotY:(e,t,i)=>0===e.rotation?i:1===e.rotation?i-e.canvasCtx.canvas.width:2===e.rotation?i-e.canvasCtx.canvas.height:3===e.rotation?i:0,setRotation(e,t){for(;t<0;)t+=4;const i=t%4;if(e.holding)return e.rotation=i,!1;if(i===e.rotation)return!0;let r=e.canvasCtx.canvas.width,o=e.canvasCtx.canvas.height;1!==e.rotation&&3!==e.rotation||(r=e.canvasCtx.canvas.height,o=e.canvasCtx.canvas.width),null==e.tcanvas&&(e.tcanvas=document.createElement("canvas"));const n=e.tcanvas.getContext("2d");return n.setTransform(1,0,0,1,0,0),n.canvas.width=r,n.canvas.height=o,n.rotate(-90*e.rotation*Math.PI/180),0===e.rotation&&n.drawImage(e.canvasCtx.canvas,0,0),1===e.rotation&&n.drawImage(e.canvasCtx.canvas,-e.canvasCtx.canvas.width,0),2===e.rotation&&n.drawImage(e.canvasCtx.canvas,-e.canvasCtx.canvas.width,-e.canvasCtx.canvas.height),3===e.rotation&&n.drawImage(e.canvasCtx.canvas,0,-e.canvasCtx.canvas.height),0!==e.rotation&&2!==e.rotation||(e.canvasCtx.canvas.height=r,e.canvasCtx.canvas.width=o),1!==e.rotation&&3!==e.rotation||(e.canvasCtx.canvas.height=o,e.canvasCtx.canvas.width=r),e.canvasCtx.setTransform(1,0,0,1,0,0),e.canvasCtx.rotate(90*i*Math.PI/180),e.rotation=i,e.canvasCtx.drawImage(e.tcanvas,s.rotX(e,0,0),s.rotY(e,0,0)),e.width=e.canvasCtx.canvas.width,e.height=e.canvasCtx.canvas.height,null!=e.onScreenResize&&e.onScreenResize(e.width,e.height,e.canvasId),!0},fixColor:e=>e>127?e+32:e}},717:(e,t,i)=>{"use strict";i.d(t,{E:()=>a});var s,r=i(38),o=i(173),n=i(611);!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(s||(s={}));class a{constructor(e,t){this.Comms=t,this.parent=e}GrabKeyInput(){this.KeyInputGrab||(document.onkeyup=this.handleKeyUp.bind(this),document.onkeydown=this.handleKeyDown.bind(this),document.onkeypress=this.handleKeys.bind(this),this.KeyInputGrab=!0)}UnGrabKeyInput(){this.KeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,this.KeyInputGrab=!1)}handleKeys(e){return this.haltEvent(e)}haltEvent(e){return(0,n.f)(e.preventDefault)&&e.preventDefault(),(0,n.f)(e.stopPropagation)&&e.stopPropagation(),!1}handleKeyUp(e){return this.handleKeyEvent(s.Up,e)}handleKeyDown(e){return this.handleKeyEvent(s.Down,e)}handleKeyEvent(e,t){let i=t;if((0,n.f)(i)||(i=window.event),(0,n.f)(i.code)){const t=r.q.convertAMTKeyCode(i);this.parent.logger.verbose(`Key ${e} : ${String(t)}`),null!=t&&o.X.sendKey(this.Comms,t,e)}else{let t=i.keyCode;173===t&&(t=189),61===t&&(t=187);let s=t;!1===i.shiftKey&&t>=65&&t<=90&&(s=t+32),t>=112&&t<=124&&(s=t+65358),8===t&&(s=65288),9===t&&(s=65289),13===t&&(s=65293),16===t&&(s=65505),17===t&&(s=65507),18===t&&(s=65513),27===t&&(s=65307),33===t&&(s=65365),34===t&&(s=65366),35===t&&(s=65367),36===t&&(s=65360),37===t&&(s=65361),38===t&&(s=65362),39===t&&(s=65363),40===t&&(s=65364),45===t&&(s=65379),46===t&&(s=65535),t>=96&&t<=105&&(s=t-48),106===t&&(s=42),107===t&&(s=43),109===t&&(s=45),110===t&&(s=46),111===t&&(s=47),186===t&&(s=59),187===t&&(s=61),188===t&&(s=44),189===t&&(s=45),190===t&&(s=46),191===t&&(s=47),192===t&&(s=96),219===t&&(s=91),220===t&&(s=92),221===t&&(s=93),222===t&&(s=39),this.parent.logger.verbose(`Key ${e}: ${t} = ${s}`),o.X.sendKey(this.Comms,s,e)}return this.haltEvent(i)}}},33:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});var s=i(565),r=i(644),o=i(611);class n{constructor(e,t,i){this.topposition=0,this.leftposition=0,this.parent=e,this.comm=t,this.debounceTime=i,this.mouseClickCompleted=!0,this.lastEvent=null}GrabMouseInput(){this.MouseInputGrab||(this.MouseInputGrab=!0)}UnGrabMouseInput(){if(!this.MouseInputGrab)return;const e=this.parent.canvasCtx.canvas;e.onmousemove=null,e.onmouseup=null,e.onmousedown=null,this.MouseInputGrab=!1}mousedown(e){return this.parent.buttonmask|=1<<e.button,this.mousemove(e)}mouseup(e){return this.parent.buttonmask&=65535-(1<<e.button),this.mousemove(e)}mousemove(e){if(4!==this.parent.state)return!0;const t=this.getPositionOfControl(this.parent.canvasControl),i=this.parent.canvasControl.getBoundingClientRect();(0===this.topposition||i.top>this.topposition)&&(this.topposition=i.top),(0===this.leftposition||i.left>this.leftposition)&&(this.leftposition=i.left);const n=this.topposition-i.top,a=this.leftposition-i.left;if(this.parent.lastMouseX=(e.pageX-t[0]+a)*(this.parent.canvasControl.height/this.parent.canvasControl.offsetHeight),this.parent.lastMouseY=(e.pageY-t[1]+n)*(this.parent.canvasControl.width/this.parent.canvasControl.offsetWidth),(0,o.f)(this.parent.noMouseRotate)||(this.parent.lastMouseX2=r.j.crotX(this.parent,this.parent.lastMouseX,this.parent.lastMouseY),this.parent.lastMouseY=r.j.crotY(this.parent,this.parent.lastMouseX,this.parent.lastMouseY),this.parent.lastMouseX=this.parent.lastMouseX2),this.comm.send(String.fromCharCode(5,this.parent.buttonmask)+s.r.ShortToStr(this.parent.lastMouseX)+s.r.ShortToStr(this.parent.lastMouseY)),this.parent.setDeskFocus("DeskFocus",this.parent.focusMode),0!==this.parent.focusMode){const e=Math.min(this.parent.lastMouseX,this.parent.canvasControl.width-this.parent.focusMode),i=Math.min(this.parent.lastMouseY,this.parent.canvasControl.height-this.parent.focusMode),s=2*this.parent.focusMode,r=this.parent.canvasControl,o=r.offsetHeight/this.parent.canvasControl.height,n=r.offsetWidth/this.parent.canvasControl.width,a=this.parent.getDeskFocus("DeskFocus"),h=this.getPositionOfControl(this.parent.canvasControl.parentElement);a.left=`${Math.max((e-this.parent.focusMode)*o,0)+(t[0]-h[0])}px`,a.top=`${Math.max((i-this.parent.focusMode)*n,0)+(t[1]-h[1])}px`,a.width=s*o-6+"px",a.height=s*o-6+"px"}return this.haltEvent(e)}haltEvent(e){return(0,o.f)(e.preventDefault)&&e.preventDefault(),(0,o.f)(e.stopPropagation)&&e.stopPropagation(),!1}getPositionOfControl(e){const t=[0,0];let i=e;for(;null!=i;)t[0]=Number(t[0])+Number(i.offsetLeft),t[1]=Number(t[1])+Number(i.offsetTop),i=i.offsetParent;return t}}},611:(e,t,i)=>{"use strict";i.d(t,{f:()=>s});const s=e=>null!=e&&""!==e&&!1!==e&&0!==e},8:(e,t,i)=>{"use strict";i.d(t,{EB:()=>n.E,Xn:()=>r.X,fQ:()=>h.f,jw:()=>o.j,qD:()=>s.q,xx:()=>a.x});var s=i(38),r=i(173),o=i(644),n=i(717),a=i(33),h=i(611)},305:module=>{var ZLIB=ZLIB||{},BASE,NMAX;void 0===ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.next_in=0,this.avail_in=0,this.total_in=0,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=null,this.state=null,this.data_type=0,this.adler=0,this.input_data="",this.output_data="",this.error=0,this.checksum_function=null},ZLIB.gz_header=function(){this.text=0,this.time=0,this.xflags=0,this.os=255,this.extra=null,this.extra_len=0,this.extra_max=0,this.name=null,this.name_max=0,this.comment=null,this.comm_max=0,this.hcrc=0,this.done=0},ZLIB.common_initialized=!0),void 0===ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js"),function(){var DEF_WBITS=15,HEAD=0,FLAGS=1,TIME=2,OS=3,EXLEN=4,EXTRA=5,NAME=6,COMMENT=7,HCRC=8,DICTID=9,DICT=10,TYPE=11,TYPEDO=12,STORED=13,COPY_=14,COPY=15,TABLE=16,LENLENS=17,CODELENS=18,LEN_=19,LEN=20,LENEXT=21,DIST=22,DISTEXT=23,MATCH=24,LIT=25,CHECK=26,LENGTH=27,DONE=28,BAD=29,MEM=30,SYNC=31,ENOUGH_LENS=852,ENOUGH_DISTS=592,ENOUGH=ENOUGH_LENS+ENOUGH_DISTS,CODES=0,LENS=1,DISTS=2,inflate_table_lbase=[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],inflate_table_lext=[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,203,69],inflate_table_dbase=[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],inflate_table_dext=[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 inflate_table(e,t){var i,s,r,o,n,a,h,l,c,d,u,_,f,p,v,g,m,S,b,C,y,w,E=e.next,k=t==DISTS?e.distbits:e.lenbits,A=e.work,x=e.lens,R=t==DISTS?e.nlen:0,L=e.codes;i=t==LENS?e.nlen:t==DISTS?e.ndist:19;var D=new Array(16),B=new Array(16);for(s=0;s<=15;s++)D[s]=0;for(r=0;r<i;r++)D[x[R+r]]++;for(a=k,n=15;n>=1&&0==D[n];n--);if(a>n&&(a=n),0==n)return g={op:64,bits:1,val:0},L[E++]=g,L[E++]=g,t==DISTS?e.distbits=1:e.lenbits=1,e.next=E,0;for(o=1;o<n&&0==D[o];o++);for(a<o&&(a=o),c=1,s=1;s<=15;s++)if(c<<=1,(c-=D[s])<0)return-1;if(c>0&&(t==CODES||1!=n))return e.next=E,-1;for(B[1]=0,s=1;s<15;s++)B[s+1]=B[s]+D[s];for(r=0;r<i;r++)0!=x[R+r]&&(A[B[x[R+r]]++]=r);switch(t){case CODES:S=C=A,b=0,y=0,w=19;break;case LENS:S=inflate_table_lbase,b=-257,C=inflate_table_lext,y=-257,w=256;break;default:S=inflate_table_dbase,C=inflate_table_dext,b=0,y=0,w=-1}if(u=0,r=0,s=o,m=E,h=a,l=0,p=-1,v=(d=1<<a)-1,t==LENS&&d>=ENOUGH_LENS||t==DISTS&&d>=ENOUGH_DISTS)return e.next=E,1;for(;;){g={op:0,bits:s-l,val:0},A[r]<w?g.val=A[r]:A[r]>w?(g.op=C[y+A[r]],g.val=S[b+A[r]]):g.op=96,_=1<<s-l,o=f=1<<h;do{L[m+(u>>>l)+(f-=_)]=g}while(0!=f);for(_=1<<s-1;u&_;)_>>>=1;if(0!=_?(u&=_-1,u+=_):u=0,r++,0==--D[s]){if(s==n)break;s=x[R+A[r]]}if(s>a&&(u&v)!=p){for(0==l&&(l=a),m+=o,c=1<<(h=s-l);h+l<n&&!((c-=D[h+l])<=0);)h++,c<<=1;if(d+=1<<h,t==LENS&&d>=ENOUGH_LENS||t==DISTS&&d>=ENOUGH_DISTS)return e.next=E,1;L[E+(p=u&v)]={op:h,bits:a,val:m-E}}}return 0!=u&&(L[m+u]={op:64,bits:s-l,val:0}),e.next=E+d,t==DISTS?e.distbits=a:e.lenbits=a,0}function inflate_fast(e,t){var i,s,r,o,n,a,h,l,c,d,u,_,f,p,v,g,m,S,b,C,y,w,E=-1,k=-1;i=e.state,s=e.input_data,o=(r=e.next_in)+e.avail_in-5,a=(n=e.next_out)-(t-e.avail_out),h=n+(e.avail_out-257),l=i.wsize,c=i.whave,d=i.wnext,u=i.window,_=i.hold,f=i.bits,p=i.codes,v=i.lencode,g=i.distcode,m=(1<<i.lenbits)-1,S=(1<<i.distbits)-1;e:do{f<15&&(_+=(255&s.charCodeAt(r++))<<f,f+=8,_+=(255&s.charCodeAt(r++))<<f,f+=8),b=p[v+(_&m)];t:for(;;){if(_>>>=C=b.bits,f-=C,0==(C=b.op))e.output_data+=String.fromCharCode(b.val),n++;else{if(!(16&C)){if(0==(64&C)){b=p[v+(b.val+(_&(1<<C)-1))];continue t}if(32&C){i.mode=TYPE;break e}e.msg="invalid literal/length code",i.mode=BAD;break e}y=b.val,(C&=15)&&(f<C&&(_+=(255&s.charCodeAt(r++))<<f,f+=8),y+=_&(1<<C)-1,_>>>=C,f-=C),f<15&&(_+=(255&s.charCodeAt(r++))<<f,f+=8,_+=(255&s.charCodeAt(r++))<<f,f+=8),b=p[g+(_&S)];i:for(;;){if(_>>>=C=b.bits,f-=C,!(16&(C=b.op))){if(0==(64&C)){b=p[g+(b.val+(_&(1<<C)-1))];continue i}e.msg="invalid distance code",i.mode=BAD;break e}if(w=b.val,f<(C&=15)&&(_+=(255&s.charCodeAt(r++))<<f,(f+=8)<C&&(_+=(255&s.charCodeAt(r++))<<f,f+=8)),w+=_&(1<<C)-1,_>>>=C,f-=C,w>(C=n-a)){if((C=w-C)>c&&i.sane){e.msg="invalid distance too far back",i.mode=BAD;break e}E=0,k=-1,0==d?(E+=l-C,C<y&&(y-=C,e.output_data+=u.substring(E,E+C),n+=C,C=0,E=-1,k=n-w)):(E+=d-C,C<y&&(y-=C,e.output_data+=u.substring(E,E+C),E=-1,k=(n+=C)-w))}else E=-1,k=n-w;if(E>=0)e.output_data+=u.substring(E,E+y),n+=y,E+=y;else{var A=y;for(A>n-k&&(A=n-k),e.output_data+=e.output_data.substring(k,k+A),n+=A,k+=A,n+=y-=A;y>2;)e.output_data+=e.output_data.charAt(k++),e.output_data+=e.output_data.charAt(k++),e.output_data+=e.output_data.charAt(k++),y-=3;y&&(e.output_data+=e.output_data.charAt(k++),y>1&&(e.output_data+=e.output_data.charAt(k++)))}break i}}break t}}while(r<o&&n<h);r-=y=f>>>3,_&=(1<<(f-=y<<3))-1,e.next_in=r,e.next_out=n,e.avail_in=r<o?o-r+5:5-(r-o),e.avail_out=n<h?h-n+257:257-(n-h),i.hold=_,i.bits=f}function new_array(e){var t,i=new Array(e);for(t=0;t<e;t++)i[t]=0;return i}function getarg(e,t,i){return e&&t in e?e[t]:i}function checksum_none(){return 0}function inflate_state(){var e;this.mode=0,this.last=0,this.wrap=0,this.havedict=0,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=0,this.distcode=0,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=0,this.lens=new_array(320),this.work=new_array(288),this.codes=new Array(ENOUGH);var t={op:0,bits:0,val:0};for(e=0;e<ENOUGH;e++)this.codes[e]=t;this.sane=0,this.back=0,this.was=0}ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ",ZLIB.inflateResetKeep=function(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=null,t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=0,t.distcode=0,t.next=0,t.sane=1,t.back=-1,ZLIB.Z_OK):ZLIB.Z_STREAM_ERROR},ZLIB.inflateReset=function(e,t){var i,s;return e&&e.state?(s=e.state,void 0===t&&(t=DEF_WBITS),t<0?(i=0,t=-t):(i=1+(t>>>4),t<48&&(t&=15)),1==i&&"function"==typeof ZLIB.adler32?e.checksum_function=ZLIB.adler32:2==i&&"function"==typeof ZLIB.crc32?e.checksum_function=ZLIB.crc32:e.checksum_function=checksum_none,t&&(t<8||t>15)?ZLIB.Z_STREAM_ERROR:(s.window&&s.wbits!=t&&(s.window=null),s.wrap=i,s.wbits=t,s.wsize=0,s.whave=0,s.wnext=0,ZLIB.inflateResetKeep(e))):ZLIB.Z_STREAM_ERROR},ZLIB.inflateInit=function(e){var t=new ZLIB.z_stream;return t.state=new inflate_state,ZLIB.inflateReset(t,e),t},ZLIB.inflatePrime=function(e,t,i){var s;return e&&e.state?(s=e.state,t<0?(s.hold=0,s.bits=0,ZLIB.Z_OK):t>16||s.bits+t>32?ZLIB.Z_STREAM_ERROR:(i&=(1<<t)-1,s.hold+=i<<s.bits,s.bits+=t,ZLIB.Z_OK)):ZLIB.Z_STREAM_ERROR};var lenfix_ary=null,lenfix_def="([ {op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48}, {op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128}, {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59}, {op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176}, {op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20}, {op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100}, {op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8}, {op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216}, {op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76}, {op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114}, {op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2}, {op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148}, {op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:212},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42}, {op:0,bits:9,val:180},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:244},{op:16,bits:7,val:5},{op:0,bits:8,val:86}, {op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:204},{op:17,bits:7,val:15}, {op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:172},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:236}, {op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:156},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62}, {op:0,bits:9,val:220},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:188},{op:0,bits:8,val:14},{op:0,bits:8,val:142}, {op:0,bits:8,val:78},{op:0,bits:9,val:252},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31}, {op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:194},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:162}, {op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:226},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25}, {op:0,bits:9,val:146},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:210},{op:17,bits:7,val:17},{op:0,bits:8,val:105}, {op:0,bits:8,val:41},{op:0,bits:9,val:178},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:242},{op:16,bits:7,val:4}, {op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:202}, {op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:170},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69}, {op:0,bits:9,val:234},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:154},{op:20,bits:7,val:83},{op:0,bits:8,val:125}, {op:0,bits:8,val:61},{op:0,bits:9,val:218},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:186},{op:0,bits:8,val:13}, {op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:250},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195}, {op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:198},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35}, {op:0,bits:9,val:166},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:230},{op:16,bits:7,val:7},{op:0,bits:8,val:91}, {op:0,bits:8,val:27},{op:0,bits:9,val:150},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:214},{op:18,bits:7,val:19}, {op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:182},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:246}, {op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55}, {op:0,bits:9,val:206},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:174},{op:0,bits:8,val:7},{op:0,bits:8,val:135}, {op:0,bits:8,val:71},{op:0,bits:9,val:238},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:158},{op:20,bits:7,val:99}, {op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:222},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:190}, {op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:254},{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16}, {op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:193},{op:16,bits:7,val:10},{op:0,bits:8,val:96}, {op:0,bits:8,val:32},{op:0,bits:9,val:161},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:225},{op:16,bits:7,val:6}, {op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:145},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:209}, {op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:177},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72}, {op:0,bits:9,val:241},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116}, {op:0,bits:8,val:52},{op:0,bits:9,val:201},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:169},{op:0,bits:8,val:4}, {op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:233},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:153}, {op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:217},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44}, {op:0,bits:9,val:185},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:249},{op:16,bits:7,val:3},{op:0,bits:8,val:82}, {op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:197},{op:17,bits:7,val:11}, {op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:165},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:229}, {op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:149},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58}, {op:0,bits:9,val:213},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:181},{op:0,bits:8,val:10},{op:0,bits:8,val:138}, {op:0,bits:8,val:74},{op:0,bits:9,val:245},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51}, {op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:205},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:173}, {op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:237},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30}, {op:0,bits:9,val:157},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:221},{op:18,bits:7,val:27},{op:0,bits:8,val:110}, {op:0,bits:8,val:46},{op:0,bits:9,val:189},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:253},{op:96,bits:7,val:0}, {op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:195}, {op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:163},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65}, {op:0,bits:9,val:227},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:147},{op:19,bits:7,val:59},{op:0,bits:8,val:121}, {op:0,bits:8,val:57},{op:0,bits:9,val:211},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:179},{op:0,bits:8,val:9}, {op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:243},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258}, {op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:203},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37}, {op:0,bits:9,val:171},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:235},{op:16,bits:7,val:8},{op:0,bits:8,val:93}, {op:0,bits:8,val:29},{op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23}, {op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251}, {op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51}, {op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131}, {op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67}, {op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183}, {op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23}, {op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103}, {op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9}, {op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223}, {op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79}, {op:0,bits:9,val:255}])",distfix_ary=null,distfix_def="([ {op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025}, {op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193}, {op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385}, {op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577}, {op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073}, {op:22,bits:5,val:193},{op:64,bits:5,val:0}])";function fixedtables(state){var i;for(lenfix_ary||(lenfix_ary=eval(lenfix_def)),distfix_ary||(distfix_ary=eval(distfix_def)),state.lencode=0,state.distcode=512,i=0;i<512;i++)state.codes[i]=lenfix_ary[i];for(i=0;i<32;i++)state.codes[i+512]=distfix_ary[i];state.lenbits=9,state.distbits=5}function updatewindow(e){var t=e.state,i=e.output_data.length;return null===t.window&&(t.window=""),0==t.wsize&&(t.wsize=1<<t.wbits),i>=t.wsize?t.window=e.output_data.substring(i-t.wsize):t.whave+i<t.wsize?t.window+=e.output_data:t.window=t.window.substring(t.whave-(t.wsize-i))+e.output_data,t.whave=t.window.length,t.whave<t.wsize?t.wnext=t.whave:t.wnext=0,0}function CRC2(e,t){var i=[255&t,t>>>8&255];e.state.check=e.checksum_function(e.state.check,i,0,2)}function CRC4(e,t){var i=[255&t,t>>>8&255,t>>>16&255,t>>>24&255];e.state.check=e.checksum_function(e.state.check,i,0,4)}function LOAD(e,t){return t.strm=e,t.left=e.avail_out,t.next=e.next_in,t.have=e.avail_in,t.hold=e.state.hold,t.bits=e.state.bits,t}function RESTORE(e){var t=e.strm;t.next_in=e.next,t.avail_out=e.left,t.avail_in=e.have,t.state.hold=e.hold,t.state.bits=e.bits}function INITBITS(e){e.hold=0,e.bits=0}function PULLBYTE(e){return 0!=e.have&&(e.have--,e.hold+=(255&e.strm.input_data.charCodeAt(e.next++))<<e.bits,e.bits+=8,!0)}function NEEDBITS(e,t){for(;e.bits<t;)if(!PULLBYTE(e))return!1;return!0}function BITS(e,t){return e.hold&(1<<t)-1}function DROPBITS(e,t){e.hold>>>=t,e.bits-=t}function BYTEBITS(e){e.hold>>>=7&e.bits,e.bits-=7&e.bits}function REVERSE(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}var inflate_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(e,t){var i,s,r,o,n,a,h,l,c,d=-1,u=-1;if(!e||!e.state||!e.input_data&&0!=e.avail_in)return ZLIB.Z_STREAM_ERROR;(i=e.state).mode==TYPE&&(i.mode=TYPEDO),LOAD(e,s={}),r=s.have,o=s.left,c=ZLIB.Z_OK;e:for(;;)switch(i.mode){case HEAD:if(0==i.wrap){i.mode=TYPEDO;break}if(!NEEDBITS(s,16))break e;if(2&i.wrap&&35615==s.hold){i.check=e.checksum_function(0,null,0,0),CRC2(e,s.hold),INITBITS(s),i.mode=FLAGS;break}if(i.flags=0,null!==i.head&&(i.head.done=-1),!(1&i.wrap)||((BITS(s,8)<<8)+(s.hold>>>8))%31){e.msg="incorrect header check",i.mode=BAD;break}if(BITS(s,4)!=ZLIB.Z_DEFLATED){e.msg="unknown compression method",i.mode=BAD;break}if(DROPBITS(s,4),l=BITS(s,4)+8,0==i.wbits)i.wbits=l;else if(l>i.wbits){e.msg="invalid window size",i.mode=BAD;break}i.dmax=1<<l,e.adler=i.check=e.checksum_function(0,null,0,0),i.mode=512&s.hold?DICTID:TYPE,INITBITS(s);break;case FLAGS:if(!NEEDBITS(s,16))break e;if(i.flags=s.hold,(255&i.flags)!=ZLIB.Z_DEFLATED){e.msg="unknown compression method",i.mode=BAD;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=BAD;break}null!==i.head&&(i.head.text=s.hold>>>8&1),512&i.flags&&CRC2(e,s.hold),INITBITS(s),i.mode=TIME;case TIME:if(!NEEDBITS(s,32))break e;null!==i.head&&(i.head.time=s.hold),512&i.flags&&CRC4(e,s.hold),INITBITS(s),i.mode=OS;case OS:if(!NEEDBITS(s,16))break e;null!==i.head&&(i.head.xflags=255&s.hold,i.head.os=s.hold>>>8),512&i.flags&&CRC2(e,s.hold),INITBITS(s),i.mode=EXLEN;case EXLEN:if(1024&i.flags){if(!NEEDBITS(s,16))break e;i.length=s.hold,null!==i.head&&(i.head.extra_len=s.hold),512&i.flags&&CRC2(e,s.hold),INITBITS(s),i.head.extra=""}else null!==i.head&&(i.head.extra=null);i.mode=EXTRA;case EXTRA:if(1024&i.flags&&((n=i.length)>s.have&&(n=s.have),n&&(null!==i.head&&null!==i.head.extra&&(l=i.head.extra_len-i.length,i.head.extra+=e.input_data.substring(s.next,s.next+(l+n>i.head.extra_max?i.head.extra_max-l:n))),512&i.flags&&(i.check=e.checksum_function(i.check,e.input_data,s.next,n)),s.have-=n,s.next+=n,i.length-=n),i.length))break e;i.length=0,i.mode=NAME;case NAME:if(2048&i.flags){if(0==s.have)break e;null!==i.head&&null===i.head.name&&(i.head.name=""),n=0;do{if(l=e.input_data.charAt(s.next+n),n++,"\0"===l)break;null!==i.head&&i.length<i.head.name_max&&(i.head.name+=l,i.length++)}while(n<s.have);if(512&i.flags&&(i.check=e.checksum_function(i.check,e.input_data,s.next,n)),s.have-=n,s.next+=n,"\0"!==l)break e}else null!==i.head&&(i.head.name=null);i.length=0,i.mode=COMMENT;case COMMENT:if(4096&i.flags){if(0==s.have)break e;n=0,null!==i.head&&null===i.head.comment&&(i.head.comment="");do{if(l=e.input_data.charAt(s.next+n),n++,"\0"===l)break;null!==i.head&&i.length<i.head.comm_max&&(i.head.comment+=l,i.length++)}while(n<s.have);if(512&i.flags&&(i.check=e.checksum_function(i.check,e.input_data,s.next,n)),s.have-=n,s.next+=n,"\0"!==l)break e}else null!==i.head&&(i.head.comment=null);i.mode=HCRC;case HCRC:if(512&i.flags){if(!NEEDBITS(s,16))break e;if(s.hold!=(65535&i.check)){e.msg="header crc mismatch",i.mode=BAD;break}INITBITS(s)}null!==i.head&&(i.head.hcrc=i.flags>>>9&1,i.head.done=1),e.adler=i.check=e.checksum_function(0,null,0,0),i.mode=TYPE;break;case DICTID:if(!NEEDBITS(s,32))break e;e.adler=i.check=REVERSE(s.hold),INITBITS(s),i.mode=DICT;case DICT:if(0==i.havedict)return RESTORE(s),ZLIB.Z_NEED_DICT;e.adler=i.check=e.checksum_function(0,null,0,0),i.mode=TYPE;case TYPE:if(t==ZLIB.Z_BLOCK||t==ZLIB.Z_TREES)break e;case TYPEDO:if(i.last){BYTEBITS(s),i.mode=CHECK;break}if(!NEEDBITS(s,3))break e;switch(i.last=BITS(s,1),DROPBITS(s,1),BITS(s,2)){case 0:i.mode=STORED;break;case 1:if(fixedtables(i),i.mode=LEN_,t==ZLIB.Z_TREES){DROPBITS(s,2);break e}break;case 2:i.mode=TABLE;break;case 3:e.msg="invalid block type",i.mode=BAD}DROPBITS(s,2);break;case STORED:if(BYTEBITS(s),!NEEDBITS(s,32))break e;if((65535&s.hold)!=(s.hold>>>16&65535^65535)){e.msg="invalid stored block lengths",i.mode=BAD;break}if(i.length=65535&s.hold,INITBITS(s),i.mode=COPY_,t==ZLIB.Z_TREES)break e;case COPY_:i.mode=COPY;case COPY:if(n=i.length){if(n>s.have&&(n=s.have),n>s.left&&(n=s.left),0==n)break e;e.output_data+=e.input_data.substring(s.next,s.next+n),e.next_out+=n,s.have-=n,s.next+=n,s.left-=n,i.length-=n;break}i.mode=TYPE;break;case TABLE:if(!NEEDBITS(s,14))break e;if(i.nlen=BITS(s,5)+257,DROPBITS(s,5),i.ndist=BITS(s,5)+1,DROPBITS(s,5),i.ncode=BITS(s,4)+4,DROPBITS(s,4),i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=BAD;break}i.have=0,i.mode=LENLENS;case LENLENS:for(;i.have<i.ncode;){if(!NEEDBITS(s,3))break e;var _=BITS(s,3);i.lens[inflate_order[i.have++]]=_,DROPBITS(s,3)}for(;i.have<19;)i.lens[inflate_order[i.have++]]=0;if(i.next=0,i.lencode=0,i.lenbits=7,c=inflate_table(i,CODES)){e.msg="invalid code lengths set",i.mode=BAD;break}i.have=0,i.mode=CODELENS;case CODELENS:for(;i.have<i.nlen+i.ndist;){for(;!((a=i.codes[i.lencode+BITS(s,i.lenbits)]).bits<=s.bits);)if(!PULLBYTE(s))break e;if(a.val<16)DROPBITS(s,a.bits),i.lens[i.have++]=a.val;else{if(16==a.val){if(!NEEDBITS(s,a.bits+2))break e;if(DROPBITS(s,a.bits),0==i.have){e.msg="invalid bit length repeat",i.mode=BAD;break}l=i.lens[i.have-1],n=3+BITS(s,2),DROPBITS(s,2)}else if(17==a.val){if(!NEEDBITS(s,a.bits+3))break e;DROPBITS(s,a.bits),l=0,n=3+BITS(s,3),DROPBITS(s,3)}else{if(!NEEDBITS(s,a.bits+7))break e;DROPBITS(s,a.bits),l=0,n=11+BITS(s,7),DROPBITS(s,7)}if(i.have+n>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=BAD;break}for(;n--;)i.lens[i.have++]=l}}if(i.mode==BAD)break;if(0==i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=BAD;break}if(i.next=0,i.lencode=i.next,i.lenbits=9,c=inflate_table(i,LENS)){e.msg="invalid literal/lengths set",i.mode=BAD;break}if(i.distcode=i.next,i.distbits=6,c=inflate_table(i,DISTS)){e.msg="invalid distances set",i.mode=BAD;break}if(i.mode=LEN_,t==ZLIB.Z_TREES)break e;case LEN_:i.mode=LEN;case LEN:if(s.have>=6&&s.left>=258){RESTORE(s),inflate_fast(e,o),LOAD(e,s),i.mode==TYPE&&(i.back=-1);break}for(i.back=0;!((a=i.codes[i.lencode+BITS(s,i.lenbits)]).bits<=s.bits);)if(!PULLBYTE(s))break e;if(a.op&&0==(240&a.op)){for(h=a;a=i.codes[i.lencode+h.val+(BITS(s,h.bits+h.op)>>>h.bits)],!(h.bits+a.bits<=s.bits);)if(!PULLBYTE(s))break e;DROPBITS(s,h.bits),i.back+=h.bits}if(DROPBITS(s,a.bits),i.back+=a.bits,i.length=a.val,0==a.op){i.mode=LIT;break}if(32&a.op){i.back=-1,i.mode=TYPE;break}if(64&a.op){e.msg="invalid literal/length code",i.mode=BAD;break}i.extra=15&a.op,i.mode=LENEXT;case LENEXT:if(i.extra){if(!NEEDBITS(s,i.extra))break e;i.length+=BITS(s,i.extra),DROPBITS(s,i.extra),i.back+=i.extra}i.was=i.length,i.mode=DIST;case DIST:for(;!((a=i.codes[i.distcode+BITS(s,i.distbits)]).bits<=s.bits);)if(!PULLBYTE(s))break e;if(0==(240&a.op)){for(h=a;a=i.codes[i.distcode+h.val+(BITS(s,h.bits+h.op)>>>h.bits)],!(h.bits+a.bits<=s.bits);)if(!PULLBYTE(s))break e;DROPBITS(s,h.bits),i.back+=h.bits}if(DROPBITS(s,a.bits),i.back+=a.bits,64&a.op){e.msg="invalid distance code",i.mode=BAD;break}i.offset=a.val,i.extra=15&a.op,i.mode=DISTEXT;case DISTEXT:if(i.extra){if(!NEEDBITS(s,i.extra))break e;i.offset+=BITS(s,i.extra),DROPBITS(s,i.extra),i.back+=i.extra}i.mode=MATCH;case MATCH:if(0==s.left)break e;if(n=o-s.left,i.offset>n){if((n=i.offset-n)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=BAD;break}n>i.wnext?(n-=i.wnext,d=i.wsize-n,u=-1):(d=i.wnext-n,u=-1),n>i.length&&(n=i.length)}else d=-1,u=e.next_out-i.offset,n=i.length;if(n>s.left&&(n=s.left),s.left-=n,i.length-=n,d>=0)e.output_data+=i.window.substring(d,d+n),e.next_out+=n,n=0;else{e.next_out+=n;do{e.output_data+=e.output_data.charAt(u++)}while(--n)}0==i.length&&(i.mode=LEN);break;case LIT:if(0==s.left)break e;e.output_data+=String.fromCharCode(i.length),e.next_out++,s.left--,i.mode=LEN;break;case CHECK:if(i.wrap){if(!NEEDBITS(s,32))break e;if(o-=s.left,e.total_out+=o,i.total+=o,o&&(e.adler=i.check=e.checksum_function(i.check,e.output_data,e.output_data.length-o,o)),o=s.left,(i.flags?s.hold:REVERSE(s.hold))!=i.check){e.msg="incorrect data check",i.mode=BAD;break}INITBITS(s)}i.mode=LENGTH;case LENGTH:if(i.wrap&&i.flags){if(!NEEDBITS(s,32))break e;if(s.hold!=(4294967295&i.total)){e.msg="incorrect length check",i.mode=BAD;break}INITBITS(s)}i.mode=DONE;case DONE:c=ZLIB.Z_STREAM_END;break e;case BAD:c=ZLIB.Z_DATA_ERROR;break e;case MEM:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}return RESTORE(s),(i.wsize||o!=e.avail_out&&i.mode<BAD&&(i.mode<CHECK||t!=ZLIB.Z_FINISH))&&updatewindow(e)?(i.mode=MEM,ZLIB.Z_MEM_ERROR):(r-=e.avail_in,o-=e.avail_out,e.total_in+=r,e.total_out+=o,i.total+=o,i.wrap&&o&&(e.adler=i.check=e.checksum_function(i.check,e.output_data,0,e.output_data.length)),e.data_type=i.bits+(i.last?64:0)+(i.mode==TYPE?128:0)+(i.mode==LEN_||i.mode==COPY_?256:0),(0==r&&0==o||t==ZLIB.Z_FINISH)&&c==ZLIB.Z_OK&&(c=ZLIB.Z_BUF_ERROR),c)},ZLIB.inflateEnd=function(e){return e&&e.state?(e.state.window=null,e.state=null,ZLIB.Z_OK):ZLIB.Z_STREAM_ERROR},ZLIB.z_stream.prototype.inflate=function(e,t){var i,s;this.input_data=e,this.next_in=getarg(t,"next_in",0),this.avail_in=getarg(t,"avail_in",e.length-this.next_in),i=getarg(t,"flush",ZLIB.Z_SYNC_FLUSH),s=getarg(t,"avail_out",-1);var r="";do{if(this.avail_out=s>=0?s:16384,this.output_data="",this.next_out=0,this.error=ZLIB.inflate(this,i),0!=this.error&&console.log("zlib error",this.error),s>=0)return this.output_data;if(r+=this.output_data,this.avail_out>0)break}while(this.error==ZLIB.Z_OK);return r},ZLIB.z_stream.prototype.inflateReset=function(e){return ZLIB.inflateReset(this,e)}}(),void 0===ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js"),BASE=65521,NMAX=5552,ZLIB.adler32=function(e,t,i,s){return"string"==typeof t?function(e,t,i,s){var r,o;if(r=e>>>16&65535,e&=65535,1==s)return(e+=255&t.charCodeAt(i))>=BASE&&(e-=BASE),(r+=e)>=BASE&&(r-=BASE),e|r<<16;if(null===t)return 1;if(s<16){for(;s--;)r+=e+=255&t.charCodeAt(i++);return e>=BASE&&(e-=BASE),e|(r%=BASE)<<16}for(;s>=NMAX;){s-=NMAX,o=347;do{r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++)}while(--o);e%=BASE,r%=BASE}if(s){for(;s>=16;)s-=16,r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++),r+=e+=255&t.charCodeAt(i++);for(;s--;)r+=e+=255&t.charCodeAt(i++);e%=BASE,r%=BASE}return e|r<<16}(e,t,i,s):function(e,t,i,s){var r,o;if(r=e>>>16&65535,e&=65535,1==s)return(e+=t[i])>=BASE&&(e-=BASE),(r+=e)>=BASE&&(r-=BASE),e|r<<16;if(null===t)return 1;if(s<16){for(;s--;)r+=e+=t[i++];return e>=BASE&&(e-=BASE),e|(r%=BASE)<<16}for(;s>=NMAX;){s-=NMAX,o=347;do{r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++]}while(--o);e%=BASE,r%=BASE}if(s){for(;s>=16;)s-=16,r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++],r+=e+=t[i++];for(;s--;)r+=e+=t[i++];e%=BASE,r%=BASE}return e|r<<16}(e,t,i,s)},ZLIB.adler32_combine=function(e,t,i){var s,r,o;return i<0?4294967295:(r=(o=i%=BASE)*(s=65535&e),r%=BASE,(s+=(65535&t)+BASE-1)>=BASE&&(s-=BASE),s>=BASE&&(s-=BASE),(r+=(e>>16&65535)+(t>>16&65535)+BASE-o)>=131042&&(r-=131042),r>=BASE&&(r-=BASE),s|r<<16)},void 0===ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js"),function(){var e=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function t(e,t){var i,s=0;for(i=0;t;)1&t&&(i^=e[s]),t>>=1,s++;return i}function i(e,i){var s;for(s=0;s<32;s++)e[s]=t(i,i[s])}ZLIB.crc32=function(t,i,s,r){return"string"==typeof i?function(t,i,s,r){if(null==i)return 0;for(t^=4294967295;r>=8;)t=e[255&(t^i.charCodeAt(s++))]^t>>>8,t=e[255&(t^i.charCodeAt(s++))]^t>>>8,t=e[255&(t^i.charCodeAt(s++))]^t>>>8,t=e[255&(t^i.charCodeAt(s++))]^t>>>8,t=e[255&(t^i.charCodeAt(s++))]^t>>>8,t=e[255&(t^i.charCodeAt(s++))]^t>>>8,t=e[255&(t^i.charCodeAt(s++))]^t>>>8,t=e[255&(t^i.charCodeAt(s++))]^t>>>8,r-=8;if(r)do{t=e[255&(t^i.charCodeAt(s++))]^t>>>8}while(--r);return 4294967295^t}(t,i,s,r):function(t,i,s,r){if(null==i)return 0;for(t^=4294967295;r>=8;)t=e[255&(t^i[s++])]^t>>>8,t=e[255&(t^i[s++])]^t>>>8,t=e[255&(t^i[s++])]^t>>>8,t=e[255&(t^i[s++])]^t>>>8,t=e[255&(t^i[s++])]^t>>>8,t=e[255&(t^i[s++])]^t>>>8,t=e[255&(t^i[s++])]^t>>>8,t=e[255&(t^i[s++])]^t>>>8,r-=8;if(r)do{t=e[255&(t^i[s++])]^t>>>8}while(--r);return 4294967295^t}(t,i,s,r)},ZLIB.crc32_combine=function(e,s,r){var o,n,a,h;if(r<=0)return e;for(a=new Array(32),(h=new Array(32))[0]=3988292384,n=1,o=1;o<32;o++)h[o]=n,n<<=1;i(a,h),i(h,a);do{if(i(a,h),1&r&&(e=t(a,e)),0==(r>>=1))break;i(h,a),1&r&&(e=t(h,e)),r>>=1}while(0!=r);return e^s}}(),module.exports=ZLIB}},__webpack_module_cache__={};function __nested_webpack_require_78642__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](i,i.exports,__nested_webpack_require_78642__),i.exports}__nested_webpack_require_78642__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __nested_webpack_require_78642__.d(t,{a:t}),t},__nested_webpack_require_78642__.d=(e,t)=>{for(var i in t)__nested_webpack_require_78642__.o(t,i)&&!__nested_webpack_require_78642__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__nested_webpack_require_78642__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__nested_webpack_require_78642__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__nested_webpack_require_78642__.r(__webpack_exports__),__nested_webpack_require_78642__.d(__webpack_exports__,{AMTDesktop:()=>e.r,AMTKeyCodeConverter:()=>u.qD,AMTKvmDataRedirector:()=>t.N,AMTRedirector:()=>i.K,AmtTerminal:()=>s.r,CommsHelper:()=>u.Xn,ConsoleLogger:()=>r.k,DataProcessor:()=>c.$,Desktop:()=>n.H,Encoding:()=>d.ez,FrameBufferBellServerCutText:()=>d.Ut,HandshakeState:()=>d.wW,ImageHelper:()=>u.jw,KeyBoardHelper:()=>u.EB,LogLevel:()=>l.i,MouseHelper:()=>u.xx,Protocol:()=>i.b,RLEDecoder:()=>c.X,SecurityOptions:()=>d.ll,SecurityResponse:()=>d.mC,ServerInit:()=>d.Cu,StateProcessorFactory:()=>a.v,TerminalDataProcessor:()=>h.Q,TypeConverter:()=>o.r,isTruthy:()=>u.fQ});var e=__nested_webpack_require_78642__(166),t=__nested_webpack_require_78642__(59),i=__nested_webpack_require_78642__(503),s=__nested_webpack_require_78642__(277),r=__nested_webpack_require_78642__(237),o=__nested_webpack_require_78642__(565),n=__nested_webpack_require_78642__(46),a=__nested_webpack_require_78642__(989),h=__nested_webpack_require_78642__(155),l=__nested_webpack_require_78642__(201),c=__nested_webpack_require_78642__(646),d=__nested_webpack_require_78642__(389),u=__nested_webpack_require_78642__(8)})(),__webpack_exports__})(),module.exports=e()},14:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var s=i(213),r=i.n(s),o=i(645),n=i.n(o)()(r());n.push([e.id,".xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:rgba(0,0,0,0)}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:.5}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-decoration-overview-ruler{z-index:7;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}",""]);const a=n},20:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var s=i(213),r=i.n(s),o=i(645),n=i.n(o)()(r());n.push([e.id,".sol-header{display:flex}.power-options{display:block;position:absolute;right:1%}.terminal{text-align:left;display:block}.terminal_xterm{display:inline-block}",""]);const a=n},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",s=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),s&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),s&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,s,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var n={};if(s)for(var a=0;a<this.length;a++){var h=this[a][0];null!=h&&(n[h]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);s&&n[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),r&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=r):c[4]="".concat(r)),t.push(c))}},t}},213:e=>{"use strict";e.exports=function(e){return e[1]}},679:(e,t,i)=>{"use strict";var s=i(296),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function h(e){return s.isMemo(e)?n:a[e.$$typeof]||r}a[s.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[s.Memo]=n;var l=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,_=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,i,s){if("string"!=typeof i){if(f){var r=_(i);r&&r!==f&&e(t,r,s)}var n=c(i);d&&(n=n.concat(d(i)));for(var a=h(t),p=h(i),v=0;v<n.length;++v){var g=n[v];if(!(o[g]||s&&s[g]||p&&p[g]||a&&a[g])){var m=u(i,g);try{l(t,g,m)}catch(e){}}}}return t}},103:(e,t)=>{"use strict";var i="function"==typeof Symbol&&Symbol.for,s=i?Symbol.for("react.element"):60103,r=i?Symbol.for("react.portal"):60106,o=i?Symbol.for("react.fragment"):60107,n=i?Symbol.for("react.strict_mode"):60108,a=i?Symbol.for("react.profiler"):60114,h=i?Symbol.for("react.provider"):60109,l=i?Symbol.for("react.context"):60110,c=i?Symbol.for("react.async_mode"):60111,d=i?Symbol.for("react.concurrent_mode"):60111,u=i?Symbol.for("react.forward_ref"):60112,_=i?Symbol.for("react.suspense"):60113,f=i?Symbol.for("react.suspense_list"):60120,p=i?Symbol.for("react.memo"):60115,v=i?Symbol.for("react.lazy"):60116,g=i?Symbol.for("react.block"):60121,m=i?Symbol.for("react.fundamental"):60117,S=i?Symbol.for("react.responder"):60118,b=i?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case s:switch(e=e.type){case c:case d:case o:case a:case n:case _:return e;default:switch(e=e&&e.$$typeof){case l:case u:case v:case p:case h:return e;default:return t}}case r:return t}}}function y(e){return C(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=h,t.Element=s,t.ForwardRef=u,t.Fragment=o,t.Lazy=v,t.Memo=p,t.Portal=r,t.Profiler=a,t.StrictMode=n,t.Suspense=_,t.isAsyncMode=function(e){return y(e)||C(e)===c},t.isConcurrentMode=y,t.isContextConsumer=function(e){return C(e)===l},t.isContextProvider=function(e){return C(e)===h},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===s},t.isForwardRef=function(e){return C(e)===u},t.isFragment=function(e){return C(e)===o},t.isLazy=function(e){return C(e)===v},t.isMemo=function(e){return C(e)===p},t.isPortal=function(e){return C(e)===r},t.isProfiler=function(e){return C(e)===a},t.isStrictMode=function(e){return C(e)===n},t.isSuspense=function(e){return C(e)===_},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===a||e===n||e===_||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===p||e.$$typeof===h||e.$$typeof===l||e.$$typeof===u||e.$$typeof===m||e.$$typeof===S||e.$$typeof===b||e.$$typeof===g)},t.typeOf=C},296:(e,t,i)=>{"use strict";e.exports=i(103)},921:(e,t)=>{"use strict";var i,s=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen");i=Symbol.for("react.module.reference"),t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===n||e===u||e===_||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===h||e.$$typeof===l||e.$$typeof===d||e.$$typeof===i||void 0!==e.getModuleId)},t.typeOf=function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case s:switch(e=e.type){case o:case a:case n:case u:case _:return e;default:switch(e=e&&e.$$typeof){case c:case l:case d:case p:case f:case h:return e;default:return t}}case r:return t}}}},864:(e,t,i)=>{"use strict";e.exports=i(921)},774:e=>{e.exports=function(e,t,i,s){var r=i?i.call(s,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),h=0;h<o.length;h++){var l=o[h];if(!a(l))return!1;var c=e[l],d=t[l];if(!1===(r=i?i.call(s,c,d,l):void 0)||void 0===r&&c!==d)return!1}return!0}},54:(e,t,i)=>{"use strict";var s=i(379),r=i.n(s),o=i(795),n=i.n(o),a=i(569),h=i.n(a),l=i(565),c=i.n(l),d=i(216),u=i.n(d),_=i(589),f=i.n(_),p=i(14),v={};v.styleTagTransform=f(),v.setAttributes=c(),v.insert=h().bind(null,"head"),v.domAPI=n(),v.insertStyleElement=u(),r()(p.Z,v),p.Z&&p.Z.locals&&p.Z.locals},670:(e,t,i)=>{"use strict";var s=i(379),r=i.n(s),o=i(795),n=i.n(o),a=i(569),h=i.n(a),l=i(565),c=i.n(l),d=i(216),u=i.n(d),_=i(589),f=i.n(_),p=i(20),v={};v.styleTagTransform=f(),v.setAttributes=c(),v.insert=h().bind(null,"head"),v.domAPI=n(),v.insertStyleElement=u(),r()(p.Z,v),p.Z&&p.Z.locals&&p.Z.locals},379:e=>{"use strict";var t=[];function i(e){for(var i=-1,s=0;s<t.length;s++)if(t[s].identifier===e){i=s;break}return i}function s(e,s){for(var o={},n=[],a=0;a<e.length;a++){var h=e[a],l=s.base?h[0]+s.base:h[0],c=o[l]||0,d="".concat(l," ").concat(c);o[l]=c+1;var u=i(d),_={css:h[1],media:h[2],sourceMap:h[3],supports:h[4],layer:h[5]};if(-1!==u)t[u].references++,t[u].updater(_);else{var f=r(_,s);s.byIndex=a,t.splice(a,0,{identifier:d,updater:f,references:1})}n.push(d)}return n}function r(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,r){var o=s(e=e||[],r=r||{});return function(e){e=e||[];for(var n=0;n<o.length;n++){var a=i(o[n]);t[a].references--}for(var h=s(e,r),l=0;l<o.length;l++){var c=i(o[l]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=h}}},569:e=>{"use strict";var t={};e.exports=function(e,i){var s=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(i)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,i)=>{"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var s="";i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(s,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},893:(e,t,i)=>{"use strict";i.d(t,{ZP:()=>De});var s=i(864),r=i(639),o=i.n(r),n=i(774),a=i.n(n),h=i(285),l=i(351),c=i(68),d=i(679),u=i.n(d);function _(){return(_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(this,arguments)}var f=function(e,t){for(var i=[e[0]],s=0,r=t.length;s<r;s+=1)i.push(t[s],e[s+1]);return i},p=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,s.typeOf)(e)},v=Object.freeze([]),g=Object.freeze({});function m(e){return"function"==typeof e}function S(e){return e.displayName||e.name||"Component"}function b(e){return e&&"string"==typeof e.styledComponentId}var C="undefined"!=typeof process&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",y="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY);function E(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(i.length>0?" Args: "+i.join(", "):""))}var k=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,i=0;i<e;i++)t+=this.groupSizes[i];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var i=this.groupSizes,s=i.length,r=s;e>=r;)(r<<=1)<0&&E(16,""+e);this.groupSizes=new Uint32Array(r),this.groupSizes.set(i),this.length=r;for(var o=s;o<r;o++)this.groupSizes[o]=0}for(var n=this.indexOfGroup(e+1),a=0,h=t.length;a<h;a++)this.tag.insertRule(n,t[a])&&(this.groupSizes[e]++,n++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],i=this.indexOfGroup(e),s=i+t;this.groupSizes[e]=0;for(var r=i;r<s;r++)this.tag.deleteRule(i)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var i=this.groupSizes[e],s=this.indexOfGroup(e),r=s+i,o=s;o<r;o++)t+=this.tag.getRule(o)+"/*!sc*/\n";return t},e}(),A=new Map,x=new Map,R=1,L=function(e){if(A.has(e))return A.get(e);for(;x.has(R);)R++;var t=R++;return A.set(e,t),x.set(t,e),t},D=function(e){return x.get(e)},B=function(e,t){t>=R&&(R=t+1),A.set(e,t),x.set(t,e)},T="style["+C+'][data-styled-version="5.3.6"]',I=new RegExp("^"+C+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),M=function(e,t,i){for(var s,r=i.split(","),o=0,n=r.length;o<n;o++)(s=r[o])&&e.registerName(t,s)},O=function(e,t){for(var i=(t.textContent||"").split("/*!sc*/\n"),s=[],r=0,o=i.length;r<o;r++){var n=i[r].trim();if(n){var a=n.match(I);if(a){var h=0|parseInt(a[1],10),l=a[2];0!==h&&(B(l,h),M(e,l,a[3]),e.getTag().insertRules(h,s)),s.length=0}else s.push(n)}}},P=function(){return i.nc},H=function(e){var t=document.head,i=e||t,s=document.createElement("style"),r=function(e){for(var t=e.childNodes,i=t.length;i>=0;i--){var s=t[i];if(s&&1===s.nodeType&&s.hasAttribute(C))return s}}(i),o=void 0!==r?r.nextSibling:null;s.setAttribute(C,"active"),s.setAttribute("data-styled-version","5.3.6");var n=P();return n&&s.setAttribute("nonce",n),i.insertBefore(s,o),s},F=function(){function e(e){var t=this.element=H(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,i=0,s=t.length;i<s;i++){var r=t[i];if(r.ownerNode===e)return r}E(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),N=function(){function e(e){var t=this.element=H(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var i=document.createTextNode(t),s=this.nodes[e];return this.element.insertBefore(i,s||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),U=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),W=y,$={isServer:!y,useCSSOMInjection:!w},j=function(){function e(e,t,i){void 0===e&&(e=g),void 0===t&&(t={}),this.options=_({},$,{},e),this.gs=t,this.names=new Map(i),this.server=!!e.isServer,!this.server&&y&&W&&(W=!1,function(e){for(var t=document.querySelectorAll(T),i=0,s=t.length;i<s;i++){var r=t[i];r&&"active"!==r.getAttribute(C)&&(O(e,r),r.parentNode&&r.parentNode.removeChild(r))}}(this))}e.registerId=function(e){return L(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,i){return void 0===i&&(i=!0),new e(_({},this.options,{},t),this.gs,i&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(i=(t=this.options).isServer,s=t.useCSSOMInjection,r=t.target,e=i?new U(r):s?new F(r):new N(r),new k(e)));var e,t,i,s,r},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(L(e),this.names.has(e))this.names.get(e).add(t);else{var i=new Set;i.add(t),this.names.set(e,i)}},t.insertRules=function(e,t,i){this.registerName(e,t),this.getTag().insertRules(L(e),i)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(L(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),i=t.length,s="",r=0;r<i;r++){var o=D(r);if(void 0!==o){var n=e.names.get(o),a=t.getGroup(r);if(n&&a&&n.size){var h=C+".g"+r+'[id="'+o+'"]',l="";void 0!==n&&n.forEach((function(e){e.length>0&&(l+=e+",")})),s+=""+a+h+'{content:"'+l+'"}/*!sc*/\n'}}}return s}(this)},e}(),K=/(a)(d)/gi,z=function(e){return String.fromCharCode(e+(e>25?39:97))};function Z(e){var t,i="";for(t=Math.abs(e);t>52;t=t/52|0)i=z(t%52)+i;return(z(t%52)+i).replace(K,"$1-$2")}var q=function(e,t){for(var i=t.length;i;)e=33*e^t.charCodeAt(--i);return e},X=function(e){return q(5381,e)};function G(e){for(var t=0;t<e.length;t+=1){var i=e[t];if(m(i)&&!b(i))return!1}return!0}var Y=X("5.3.6"),V=function(){function e(e,t,i){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===i||i.isStatic)&&G(e),this.componentId=t,this.baseHash=q(Y,t),this.baseStyle=i,j.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,i){var s=this.componentId,r=[];if(this.baseStyle&&r.push(this.baseStyle.generateAndInjectStyles(e,t,i)),this.isStatic&&!i.hash)if(this.staticRulesId&&t.hasNameForId(s,this.staticRulesId))r.push(this.staticRulesId);else{var o=fe(this.rules,e,t,i).join(""),n=Z(q(this.baseHash,o)>>>0);if(!t.hasNameForId(s,n)){var a=i(o,"."+n,void 0,s);t.insertRules(s,n,a)}r.push(n),this.staticRulesId=n}else{for(var h=this.rules.length,l=q(this.baseHash,i.hash),c="",d=0;d<h;d++){var u=this.rules[d];if("string"==typeof u)c+=u;else if(u){var _=fe(u,e,t,i),f=Array.isArray(_)?_.join(""):_;l=q(l,f+d),c+=f}}if(c){var p=Z(l>>>0);if(!t.hasNameForId(s,p)){var v=i(c,"."+p,void 0,s);t.insertRules(s,p,v)}r.push(p)}}return r.join(" ")},e}(),J=/^\s*\/\/.*$/gm,Q=[":","[",".","#"];function ee(e){var t,i,s,r,o=void 0===e?g:e,n=o.options,a=void 0===n?g:n,l=o.plugins,c=void 0===l?v:l,d=new h.Z(a),u=[],_=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(i,s,r,o,n,a,h,l,c,d){switch(i){case 1:if(0===c&&64===s.charCodeAt(0))return e(s+";"),"";break;case 2:if(0===l)return s+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(r[0]+s),"";default:return s+(0===d?"/*|*/":"")}case-2:s.split("/*|*/}").forEach(t)}}}((function(e){u.push(e)})),f=function(e,s,o){return 0===s&&-1!==Q.indexOf(o[i.length])||o.match(r)?e:"."+t};function p(e,o,n,a){void 0===a&&(a="&");var h=e.replace(J,""),l=o&&n?n+" "+o+" { "+h+" }":h;return t=a,i=o,s=new RegExp("\\"+i+"\\b","g"),r=new RegExp("(\\"+i+"\\b){2,}"),d(n||!o?"":o,l)}return d.use([].concat(c,[function(e,t,r){2===e&&r.length&&r[0].lastIndexOf(i)>0&&(r[0]=r[0].replace(s,f))},_,function(e){if(-2===e){var t=u;return u=[],t}}])),p.hash=c.length?c.reduce((function(e,t){return t.name||E(15),q(e,t.name)}),5381).toString():"",p}var te=o().createContext(),ie=(te.Consumer,o().createContext()),se=(ie.Consumer,new j),re=ee();function oe(){return(0,r.useContext)(te)||se}function ne(e){var t=(0,r.useState)(e.stylisPlugins),i=t[0],s=t[1],n=oe(),h=(0,r.useMemo)((function(){var t=n;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,r.useMemo)((function(){return ee({options:{prefix:!e.disableVendorPrefixes},plugins:i})}),[e.disableVendorPrefixes,i]);return(0,r.useEffect)((function(){a()(i,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),o().createElement(te.Provider,{value:h},o().createElement(ie.Provider,{value:l},e.children))}var ae=function(){function e(e,t){var i=this;this.inject=function(e,t){void 0===t&&(t=re);var s=i.name+t.hash;e.hasNameForId(i.id,s)||e.insertRules(i.id,s,t(i.rules,s,"@keyframes"))},this.toString=function(){return E(12,String(i.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=re),this.name+e.hash},e}(),he=/([A-Z])/,le=/([A-Z])/g,ce=/^ms-/,de=function(e){return"-"+e.toLowerCase()};function ue(e){return he.test(e)?e.replace(le,de).replace(ce,"-ms-"):e}var _e=function(e){return null==e||!1===e||""===e};function fe(e,t,i,s){if(Array.isArray(e)){for(var r,o=[],n=0,a=e.length;n<a;n+=1)""!==(r=fe(e[n],t,i,s))&&(Array.isArray(r)?o.push.apply(o,r):o.push(r));return o}return _e(e)?"":b(e)?"."+e.styledComponentId:m(e)?"function"!=typeof(h=e)||h.prototype&&h.prototype.isReactComponent||!t?e:fe(e(t),t,i,s):e instanceof ae?i?(e.inject(i,s),e.getName(s)):e:p(e)?function e(t,i){var s,r,o=[];for(var n in t)t.hasOwnProperty(n)&&!_e(t[n])&&(Array.isArray(t[n])&&t[n].isCss||m(t[n])?o.push(ue(n)+":",t[n],";"):p(t[n])?o.push.apply(o,e(t[n],n)):o.push(ue(n)+": "+(s=n,(null==(r=t[n])||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||s in l.Z?String(r).trim():r+"px")+";")));return i?[i+" {"].concat(o,["}"]):o}(e):e.toString();var h}var pe=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function ve(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];return m(e)||p(e)?pe(fe(f(v,[e].concat(i)))):0===i.length&&1===e.length&&"string"==typeof e[0]?e:pe(fe(f(e,i)))}new Set;var ge=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,me=/(^-|-$)/g;function Se(e){return e.replace(ge,"-").replace(me,"")}function be(e){return"string"==typeof e&&!0}var Ce=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},ye=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function we(e,t,i){var s=e[i];Ce(t)&&Ce(s)?Ee(s,t):e[i]=t}function Ee(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];for(var r=0,o=i;r<o.length;r++){var n=o[r];if(Ce(n))for(var a in n)ye(a)&&we(e,n[a],a)}return e}var ke=o().createContext();ke.Consumer;var Ae={};function xe(e,t,i){var s=b(e),n=!be(e),a=t.attrs,h=void 0===a?v:a,l=t.componentId,d=void 0===l?function(e,t){var i="string"!=typeof e?"sc":Se(e);Ae[i]=(Ae[i]||0)+1;var s=i+"-"+function(e){return Z(X(e)>>>0)}("5.3.6"+i+Ae[i]);return t?t+"-"+s:s}(t.displayName,t.parentComponentId):l,f=t.displayName,p=void 0===f?function(e){return be(e)?"styled."+e:"Styled("+S(e)+")"}(e):f,C=t.displayName&&t.componentId?Se(t.displayName)+"-"+t.componentId:t.componentId||d,y=s&&e.attrs?Array.prototype.concat(e.attrs,h).filter(Boolean):h,w=t.shouldForwardProp;s&&e.shouldForwardProp&&(w=t.shouldForwardProp?function(i,s,r){return e.shouldForwardProp(i,s,r)&&t.shouldForwardProp(i,s,r)}:e.shouldForwardProp);var E,k=new V(i,C,s?e.componentStyle:void 0),A=k.isStatic&&0===h.length,x=function(e,t){return function(e,t,i,s){var o=e.attrs,n=e.componentStyle,a=e.defaultProps,h=e.foldedComponentIds,l=e.shouldForwardProp,d=e.styledComponentId,u=e.target,f=function(e,t,i){void 0===e&&(e=g);var s=_({},t,{theme:e}),r={};return i.forEach((function(e){var t,i,o,n=e;for(t in m(n)&&(n=n(s)),n)s[t]=r[t]="className"===t?(i=r[t],o=n[t],i&&o?i+" "+o:i||o):n[t]})),[s,r]}(function(e,t,i){return void 0===i&&(i=g),e.theme!==i.theme&&e.theme||t||i.theme}(t,(0,r.useContext)(ke),a)||g,t,o),p=f[0],v=f[1],S=function(e,t,i,s){var o=oe(),n=(0,r.useContext)(ie)||re;return t?e.generateAndInjectStyles(g,o,n):e.generateAndInjectStyles(i,o,n)}(n,s,p),b=i,C=v.$as||t.$as||v.as||t.as||u,y=be(C),w=v!==t?_({},t,{},v):t,E={};for(var k in w)"$"!==k[0]&&"as"!==k&&("forwardedAs"===k?E.as=w[k]:(l?l(k,c.Z,C):!y||(0,c.Z)(k))&&(E[k]=w[k]));return t.style&&v.style!==t.style&&(E.style=_({},t.style,{},v.style)),E.className=Array.prototype.concat(h,d,S!==d?S:null,t.className,v.className).filter(Boolean).join(" "),E.ref=b,(0,r.createElement)(C,E)}(E,e,t,A)};return x.displayName=p,(E=o().forwardRef(x)).attrs=y,E.componentStyle=k,E.displayName=p,E.shouldForwardProp=w,E.foldedComponentIds=s?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):v,E.styledComponentId=C,E.target=s?e.target:e,E.withComponent=function(e){var s=t.componentId,r=function(e,t){if(null==e)return{};var i,s,r={},o=Object.keys(e);for(s=0;s<o.length;s++)i=o[s],t.indexOf(i)>=0||(r[i]=e[i]);return r}(t,["componentId"]),o=s&&s+"-"+(be(e)?e:Se(S(e)));return xe(e,_({},r,{attrs:y,componentId:o}),i)},Object.defineProperty(E,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=s?Ee({},e.defaultProps,t):t}}),E.toString=function(){return"."+E.styledComponentId},n&&u()(E,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),E}var Re,Le=function(e){return function e(t,i,r){if(void 0===r&&(r=g),!(0,s.isValidElementType)(i))return E(1,String(i));var o=function(){return t(i,r,ve.apply(void 0,arguments))};return o.withConfig=function(s){return e(t,i,_({},r,{},s))},o.attrs=function(s){return e(t,i,_({},r,{attrs:Array.prototype.concat(r.attrs,s).filter(Boolean)}))},o}(xe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Le[e]=Le(e)})),(Re=function(e,t){this.rules=e,this.componentId=t,this.isStatic=G(e),j.registerId(this.componentId+1)}.prototype).createStyles=function(e,t,i,s){var r=s(fe(this.rules,t,i,s).join(""),""),o=this.componentId+e;i.insertRules(o,o,r)},Re.removeStyles=function(e,t){t.clearRules(this.componentId+e)},Re.renderStyles=function(e,t,i,s){e>2&&j.registerId(this.componentId+e),this.removeStyles(e,i),this.createStyles(e,t,i,s)},function(){var e=function(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var i=P();return"<style "+[i&&'nonce="'+i+'"',C+'="true"','data-styled-version="5.3.6"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?E(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return E(2);var i=((t={})[C]="",t["data-styled-version"]="5.3.6",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),s=P();return s&&(i.nonce=s),[o().createElement("style",_({},i,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new j({isServer:!0}),this.sealed=!1}.prototype;e.collectStyles=function(e){return this.sealed?E(2):o().createElement(ne,{sheet:this.instance},e)},e.interleaveWithNodeStream=function(e){return E(3)}}();const De=Le},509:(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});var s=i(639),r=i.n(s),o=i(893),n=i(518);o.ZP.div`
3
+ display:block;
4
+ text-align:center;
5
+ `,o.ZP.div`
6
+ display:inline-block;
7
+ `;class a extends r().Component{componentDidMount(){var e;if(this.mountedWorkaround)return;this.mountedWorkaround=!0;const t=null!==(e=document.getElementById("xterm"))&&void 0!==e?e:"",{xterm:i,handleKeyPress:s}=this.props;(0,n.X0)(t)&&(i.open(t),i.onData((e=>s(e))),i.attachCustomKeyEventHandler((e=>(e.stopPropagation(),e.preventDefault(),(0,n.X0)(e.ctrlKey)&&(0,n.X0)(e.shiftKey)&&67===e.keyCode?navigator.clipboard.writeText(i.getSelection()):(0,n.X0)(e.ctrlKey)&&(0,n.X0)(e.shiftKey)&&86===e.keyCode?navigator.clipboard.readText().then((e=>s(e))):"Space"===e.code?s(e.key):void 0))))}render(){return r().createElement("div",{className:"terminal"},r().createElement("div",{className:"terminal_xterm",id:"xterm"}))}}const h=a},518:(e,t,i)=>{"use strict";i.d(t,{X0:()=>s});const s=e=>null!=e&&""!==e&&!1!==e&&0!==e},320:e=>{self,e.exports=(()=>{"use strict";var e={4567:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;const s=i(9042),r=i(6114),o=i(9924),n=i(3656),a=i(844),h=i(5596),l=i(9631);class c extends a.Disposable{constructor(e,t){super(),this._terminal=e,this._renderService=t,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityTreeRoot=document.createElement("div"),this._accessibilityTreeRoot.classList.add("xterm-accessibility"),this._accessibilityTreeRoot.tabIndex=0,this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let e=0;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);if(this._topBoundaryFocusListener=e=>this._onBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._onBoundaryFocus(e,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityTreeRoot.appendChild(this._rowContainer),this._renderRowsDebouncer=new o.TimeBasedDebouncer(this._renderRows.bind(this)),this._refreshRows(),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityTreeRoot.appendChild(this._liveRegion),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityTreeRoot),this.register(this._renderRowsDebouncer),this.register(this._terminal.onResize((e=>this._onResize(e.rows)))),this.register(this._terminal.onRender((e=>this._refreshRows(e.start,e.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((e=>this._onChar(e)))),this.register(this._terminal.onLineFeed((()=>this._onChar("\n")))),this.register(this._terminal.onA11yTab((e=>this._onTab(e)))),this.register(this._terminal.onKey((e=>this._onKey(e.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new h.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener((()=>this._refreshRowsDimensions())),this.register((0,n.addDisposableDomListener)(window,"resize",(()=>this._refreshRowsDimensions())))}dispose(){super.dispose(),(0,l.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0}_onBoundaryFocus(e,t){const i=e.target,s=this._rowElements[0===t?1:this._rowElements.length-2];if(i.getAttribute("aria-posinset")===(0===t?"1":`${this._terminal.buffer.lines.length}`))return;if(e.relatedTarget!==s)return;let r,o;if(0===t?(r=i,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(r=this._rowElements.shift(),o=i,this._rowContainer.removeChild(r)),r.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),0===t){const e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement("afterbegin",e)}else{const e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===t?-1:1),this._rowElements[0===t?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_onResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_onTab(e){for(let t=0;t<e;t++)this._onChar(" ")}_onChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,"\n"===e&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=s.tooMuchOutput)),r.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((()=>{this._accessibilityTreeRoot.appendChild(this._liveRegion)}),0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,r.isMac&&(0,l.removeElementFromParent)(this._liveRegion)}_onKey(e){this._clearLiveRegion(),this._charsToConsume.push(e)}_refreshRows(e,t){this._renderRowsDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const i=this._terminal.buffer,s=i.lines.length.toString();for(let r=e;r<=t;r++){const e=i.translateBufferLineToString(i.ydisp+r,!0),t=(i.ydisp+r+1).toString(),o=this._rowElements[r];o&&(0===e.length?o.innerText=" ":o.textContent=e,o.setAttribute("aria-posinset",t),o.setAttribute("aria-setsize",s))}this._announceCharacters()}_refreshRowsDimensions(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.actualCellHeight}px`}_announceCharacters(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}}t.AccessibilityManager=c},3614:(e,t)=>{function i(e){return e.replace(/\r?\n/g,"\r")}function s(e,t){return t?"[200~"+e+"[201~":e}function r(e,t,r){e=s(e=i(e),r.decPrivateModes.bracketedPasteMode),r.triggerDataEvent(e,!0),t.value=""}function o(e,t,i){const s=i.getBoundingClientRect(),r=e.clientX-s.left-10,o=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${o}px`,t.style.zIndex="1000",t.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=i,t.bracketTextForPaste=s,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,i){e.stopPropagation(),e.clipboardData&&r(e.clipboardData.getData("text/plain"),t,i)},t.paste=r,t.moveTextAreaUnderMouseCursor=o,t.rightClickHandler=function(e,t,i,s,r){o(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}},7239:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;const s=i(1505);t.ColorContrastCache=class{constructor(){this._color=new s.TwoKeyMap,this._css=new s.TwoKeyMap}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}}},5680:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorManager=t.DEFAULT_ANSI_COLORS=void 0;const s=i(8055),r=i(7239),o=s.css.toColor("#ffffff"),n=s.css.toColor("#000000"),a=s.css.toColor("#ffffff"),h=s.css.toColor("#000000"),l={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const e=[s.css.toColor("#2e3436"),s.css.toColor("#cc0000"),s.css.toColor("#4e9a06"),s.css.toColor("#c4a000"),s.css.toColor("#3465a4"),s.css.toColor("#75507b"),s.css.toColor("#06989a"),s.css.toColor("#d3d7cf"),s.css.toColor("#555753"),s.css.toColor("#ef2929"),s.css.toColor("#8ae234"),s.css.toColor("#fce94f"),s.css.toColor("#729fcf"),s.css.toColor("#ad7fa8"),s.css.toColor("#34e2e2"),s.css.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){const r=t[i/36%6|0],o=t[i/6%6|0],n=t[i%6];e.push({css:s.channels.toCss(r,o,n),rgba:s.channels.toRgba(r,o,n)})}for(let t=0;t<24;t++){const i=8+10*t;e.push({css:s.channels.toCss(i,i,i),rgba:s.channels.toRgba(i,i,i)})}return e})()),t.ColorManager=class{constructor(e,i){this.allowTransparency=i;const c=e.createElement("canvas");c.width=1,c.height=1;const d=c.getContext("2d");if(!d)throw new Error("Could not get rendering context");this._ctx=d,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new r.ColorContrastCache,this.colors={foreground:o,background:n,cursor:a,cursorAccent:h,selectionForeground:void 0,selectionBackgroundTransparent:l,selectionBackgroundOpaque:s.color.blend(n,l),selectionInactiveBackgroundTransparent:l,selectionInactiveBackgroundOpaque:s.color.blend(n,l),ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}onOptionsChange(e,t){switch(e){case"minimumContrastRatio":this._contrastCache.clear();break;case"allowTransparency":this.allowTransparency=t}}setTheme(e={}){this.colors.foreground=this._parseColor(e.foreground,o),this.colors.background=this._parseColor(e.background,n),this.colors.cursor=this._parseColor(e.cursor,a,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,h,!0),this.colors.selectionBackgroundTransparent=this._parseColor(e.selectionBackground,l,!0),this.colors.selectionBackgroundOpaque=s.color.blend(this.colors.background,this.colors.selectionBackgroundTransparent),this.colors.selectionInactiveBackgroundTransparent=this._parseColor(e.selectionInactiveBackground,this.colors.selectionBackgroundTransparent,!0),this.colors.selectionInactiveBackgroundOpaque=s.color.blend(this.colors.background,this.colors.selectionInactiveBackgroundTransparent);const i={css:"",rgba:0};if(this.colors.selectionForeground=e.selectionForeground?this._parseColor(e.selectionForeground,i):void 0,this.colors.selectionForeground===i&&(this.colors.selectionForeground=void 0),s.color.isOpaque(this.colors.selectionBackgroundTransparent)){const e=.3;this.colors.selectionBackgroundTransparent=s.color.opacity(this.colors.selectionBackgroundTransparent,e)}if(s.color.isOpaque(this.colors.selectionInactiveBackgroundTransparent)){const e=.3;this.colors.selectionInactiveBackgroundTransparent=s.color.opacity(this.colors.selectionInactiveBackgroundTransparent,e)}if(this.colors.ansi=t.DEFAULT_ANSI_COLORS.slice(),this.colors.ansi[0]=this._parseColor(e.black,t.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,t.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,t.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,t.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,t.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,t.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,t.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,t.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),e.extendedAnsi){const i=Math.min(this.colors.ansi.length-16,e.extendedAnsi.length);for(let s=0;s<i;s++)this.colors.ansi[s+16]=this._parseColor(e.extendedAnsi[s],t.DEFAULT_ANSI_COLORS[s+16])}this._contrastCache.clear(),this._updateRestoreColors()}restoreColor(e){if(void 0!==e)switch(e){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[e]=this._restoreColors.ansi[e]}else for(let e=0;e<this._restoreColors.ansi.length;++e)this.colors.ansi[e]=this._restoreColors.ansi[e]}_updateRestoreColors(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}}_parseColor(e,t,i=this.allowTransparency){if(void 0===e)return t;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,"string"!=typeof this._ctx.fillStyle)return console.warn(`Color: ${e} is invalid using fallback ${t.css}`),t;this._ctx.fillRect(0,0,1,1);const r=this._ctx.getImageData(0,0,1,1).data;if(255!==r[3]){if(!i)return console.warn(`Color: ${e} is using transparency, but allowTransparency is false. Using fallback ${t.css}.`),t;const[r,o,n,a]=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map((e=>Number(e))),h=Math.round(255*a);return{rgba:s.channels.toRgba(r,o,n,h),css:e}}return{css:this._ctx.fillStyle,rgba:s.channels.toRgba(r[0],r[1],r[2],r[3])}}}},9631:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementFromParent=void 0,t.removeElementFromParent=function(...e){var t;for(const i of e)null===(t=null==i?void 0:i.parentElement)||void 0===t||t.removeChild(i)}},3656:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,i,s){e.addEventListener(t,i,s);let r=!1;return{dispose:()=>{r||(r=!0,e.removeEventListener(t,i,s))}}}},6465:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier2=void 0;const o=i(2585),n=i(8460),a=i(844),h=i(3656);let l=class extends a.Disposable{constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._activeLine=-1,this._onShowLinkUnderline=this.register(new n.EventEmitter),this._onHideLinkUnderline=this.register(new n.EventEmitter),this.register((0,a.getDisposeArrayDisposable)(this._linkCacheDisposables))}get currentLink(){return this._currentLink}get onShowLinkUnderline(){return this._onShowLinkUnderline.event}get onHideLinkUnderline(){return this._onHideLinkUnderline.event}dispose(){super.dispose(),this._lastMouseEvent=void 0}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const t=this._linkProviders.indexOf(e);-1!==t&&this._linkProviders.splice(t,1)}}}attachToDom(e,t,i){this._element=e,this._mouseService=t,this._renderService=i,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_onMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;const i=e.composedPath();for(let e=0;e<i.length;e++){const t=i[e];if(t.classList.contains("xterm"))break;if(t.classList.contains("xterm-hover"))return}this._lastBufferCell&&t.x===this._lastBufferCell.x&&t.y===this._lastBufferCell.y||(this._onHover(t),this._lastBufferCell=t)}_onHover(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var i,s;this._activeProviderReplies&&t||(null===(i=this._activeProviderReplies)||void 0===i||i.forEach((e=>{null==e||e.forEach((e=>{e.link.dispose&&e.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(const[i,o]of this._linkProviders.entries())t?(null===(s=this._activeProviderReplies)||void 0===s?void 0:s.get(i))&&(r=this._checkLinkProviderResult(i,e,r)):o.provideLinks(e.y,(t=>{var s,o;if(this._isMouseOut)return;const n=null==t?void 0:t.map((e=>({link:e})));null===(s=this._activeProviderReplies)||void 0===s||s.set(i,n),r=this._checkLinkProviderResult(i,e,r),(null===(o=this._activeProviderReplies)||void 0===o?void 0:o.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)}))}_removeIntersectingLinks(e,t){const i=new Set;for(let s=0;s<t.size;s++){const r=t.get(s);if(r)for(let t=0;t<r.length;t++){const s=r[t],o=s.link.range.start.y<e?0:s.link.range.start.x,n=s.link.range.end.y>e?this._bufferService.cols:s.link.range.end.x;for(let e=o;e<=n;e++){if(i.has(e)){r.splice(t--,1);break}i.add(e)}}}}_checkLinkProviderResult(e,t,i){var s;if(!this._activeProviderReplies)return i;const r=this._activeProviderReplies.get(e);let o=!1;for(let t=0;t<e;t++)this._activeProviderReplies.has(t)&&!this._activeProviderReplies.get(t)||(o=!0);if(!o&&r){const e=r.find((e=>this._linkAtPosition(e.link,t)));e&&(i=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviders.length&&!i)for(let e=0;e<this._activeProviderReplies.size;e++){const r=null===(s=this._activeProviderReplies.get(e))||void 0===s?void 0:s.find((e=>this._linkAtPosition(e.link,t)));if(r){i=!0,this._handleNewLink(r);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,a.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var e,t;return null===(t=null===(e=this._currentLink)||void 0===e?void 0:e.state)||void 0===t?void 0:t.decorations.pointerCursor},set:e=>{var t,i;(null===(t=this._currentLink)||void 0===t?void 0:t.state)&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&(null===(i=this._element)||void 0===i||i.classList.toggle("xterm-cursor-pointer",e)))}},underline:{get:()=>{var e,t;return null===(t=null===(e=this._currentLink)||void 0===e?void 0:e.state)||void 0===t?void 0:t.decorations.underline},set:t=>{var i,s,r;(null===(i=this._currentLink)||void 0===i?void 0:i.state)&&(null===(r=null===(s=this._currentLink)||void 0===s?void 0:s.state)||void 0===r?void 0:r.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((e=>{const t=0===e.start?0:e.start+1+this._bufferService.buffer.ydisp;this._clearCurrentLink(t,e.end+1+this._bufferService.buffer.ydisp)}))))}_linkHover(e,t,i){var s;(null===(s=this._currentLink)||void 0===s?void 0:s.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){const i=e.range,s=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-s-1,i.end.x,i.end.y-s-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,t,i){var s;(null===(s=this._currentLink)||void 0===s?void 0:s.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){const i=e.range.start.y===e.range.end.y,s=e.range.start.y<t.y,r=e.range.end.y>t.y;return(i&&e.range.start.x<=t.x&&e.range.end.x>=t.x||s&&e.range.end.x>=t.x||r&&e.range.start.x<=t.x||s&&r)&&e.range.start.y<=t.y&&e.range.end.y>=t.y}_positionFromMouseEvent(e,t,i){const s=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(s)return{x:s[0],y:s[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,s,r){return{x1:e,y1:t,x2:i,y2:s,cols:this._bufferService.cols,fg:r}}};l=s([r(0,o.IBufferService)],l),t.Linkifier2=l},9042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},2962:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkProvider=void 0;const o=i(511),n=i(2585);let a=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){var i;const s=this._bufferService.buffer.lines.get(e-1);if(!s)return void t(void 0);const r=[],n=this._optionsService.rawOptions.linkHandler,a=new o.CellData,l=s.getTrimmedLength();let c=-1,d=-1,u=!1;for(let t=0;t<l;t++)if(-1!==d||s.hasContent(t)){if(s.loadCell(t,a),a.hasExtendedAttrs()&&a.extended.urlId){if(-1===d){d=t,c=a.extended.urlId;continue}u=a.extended.urlId!==c}else-1!==d&&(u=!0);if(u||-1!==d&&t===l-1){const s=null===(i=this._oscLinkService.getLinkData(c))||void 0===i?void 0:i.uri;if(s){const i={start:{x:d+1,y:e},end:{x:t+(u||t!==l-1?0:1),y:e}};r.push({text:s,range:i,activate:(e,t)=>n?n.activate(e,t,i):h(0,t),hover:(e,t)=>{var s;return null===(s=null==n?void 0:n.hover)||void 0===s?void 0:s.call(n,e,t,i)},leave:(e,t)=>{var s;return null===(s=null==n?void 0:n.leave)||void 0===s?void 0:s.call(n,e,t,i)}})}u=!1,a.hasExtendedAttrs()&&a.extended.urlId?(d=t,c=a.extended.urlId):(d=-1,c=-1)}}t(r)}};function h(e,t){if(confirm(`Do you want to navigate to ${t}?`)){const i=window.open();if(i){try{i.opener=null}catch(e){}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}a=s([r(0,n.IBufferService),r(1,n.IOptionsService),r(2,n.IOscLinkService)],a),t.OscLinkProvider=a},6193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0,t.RenderDebouncer=class{constructor(e,t){this._parentWindow=e,this._renderCallback=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return void this._runRefreshCallbacks();const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}}},5596:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenDprMonitor=void 0;const s=i(844);class r extends s.Disposable{constructor(e){super(),this._parentWindow=e,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio}setListener(e){this._listener&&this.clearListener(),this._listener=e,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}dispose(){super.dispose(),this.clearListener()}_updateDpr(){var e;this._outerListener&&(null===(e=this._resolutionMediaMatchList)||void 0===e||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}t.ScreenDprMonitor=r},3236:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;const s=i(2950),r=i(1680),o=i(3614),n=i(2584),a=i(5435),h=i(9312),l=i(6114),c=i(3656),d=i(9042),u=i(4567),_=i(1296),f=i(7399),p=i(8460),v=i(8437),g=i(5680),m=i(3230),S=i(4725),b=i(428),C=i(8934),y=i(6465),w=i(5114),E=i(8969),k=i(8055),A=i(4269),x=i(5941),R=i(3107),L=i(5744),D=i(9074),B=i(2585),T=i(2962),I="undefined"!=typeof window?window.document:null;class M extends E.CoreTerminal{constructor(e={}){super(e),this.browser=l,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._onCursorMove=new p.EventEmitter,this._onKey=new p.EventEmitter,this._onRender=new p.EventEmitter,this._onSelectionChange=new p.EventEmitter,this._onTitleChange=new p.EventEmitter,this._onBell=new p.EventEmitter,this._onFocus=new p.EventEmitter,this._onBlur=new p.EventEmitter,this._onA11yCharEmitter=new p.EventEmitter,this._onA11yTabEmitter=new p.EventEmitter,this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(y.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(T.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(D.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((e,t)=>this.refresh(e,t)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((e=>this._reportWindowsOptions(e)))),this.register(this._inputHandler.onColor((e=>this._handleColorEvent(e)))),this.register((0,p.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,p.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,p.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,p.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((e=>this._afterResize(e.cols,e.rows))))}get onCursorMove(){return this._onCursorMove.event}get onKey(){return this._onKey.event}get onRender(){return this._onRender.event}get onSelectionChange(){return this._onSelectionChange.event}get onTitleChange(){return this._onTitleChange.event}get onBell(){return this._onBell.event}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}_handleColorEvent(e){var t,i;if(this._colorManager){for(const t of e){let e,i="";switch(t.index){case 256:e="foreground",i="10";break;case 257:e="background",i="11";break;case 258:e="cursor",i="12";break;default:e="ansi",i="4;"+t.index}switch(t.type){case 0:const s=k.color.toColorRGB("ansi"===e?this._colorManager.colors.ansi[t.index]:this._colorManager.colors[e]);this.coreService.triggerDataEvent(`${n.C0.ESC}]${i};${(0,x.toRgbString)(s)}${n.C1_ESCAPED.ST}`);break;case 1:"ansi"===e?this._colorManager.colors.ansi[t.index]=k.rgba.toColor(...t.color):this._colorManager.colors[e]=k.rgba.toColor(...t.color);break;case 2:this._colorManager.restoreColor(t.index)}}null===(t=this._renderService)||void 0===t||t.setColors(this._colorManager.colors),null===(i=this.viewport)||void 0===i||i.onThemeChange(this._colorManager.colors)}}dispose(){var e,t,i;this._isDisposed||(super.dispose(),null===(e=this._renderService)||void 0===e||e.dispose(),this._customKeyEventHandler=void 0,this.write=()=>{},null===(i=null===(t=this.element)||void 0===t?void 0:t.parentNode)||void 0===i||i.removeChild(this.element))}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_updateOptions(e){var t,i,s,r;switch(super._updateOptions(e),e){case"fontFamily":case"fontSize":null===(t=this._renderService)||void 0===t||t.clear(),null===(i=this._charSizeService)||void 0===i||i.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":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"scrollback":null===(s=this.viewport)||void 0===s||s.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new u.AccessibilityManager(this,this._renderService)):(null===(r=this._accessibilityManager)||void 0===r||r.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}}_onTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(n.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return null===(e=this.textarea)||void 0===e?void 0:e.blur()}_onTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(n.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;const i=Math.min(this.buffer.x,this.cols-1),s=this._renderService.dimensions.actualCellHeight,r=t.getWidth(i),o=this._renderService.dimensions.actualCellWidth*r,n=this.buffer.y*this._renderService.dimensions.actualCellHeight,a=i*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=a+"px",this.textarea.style.top=n+"px",this.textarea.style.width=o+"px",this.textarea.style.height=s+"px",this.textarea.style.lineHeight=s+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,c.addDisposableDomListener)(this.element,"copy",(e=>{this.hasSelection()&&(0,o.copyHandler)(e,this._selectionService)})));const e=e=>(0,o.handlePasteEvent)(e,this.textarea,this.coreService);this.register((0,c.addDisposableDomListener)(this.textarea,"paste",e)),this.register((0,c.addDisposableDomListener)(this.element,"paste",e)),l.isFirefox?this.register((0,c.addDisposableDomListener)(this.element,"mousedown",(e=>{2===e.button&&(0,o.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,c.addDisposableDomListener)(this.element,"contextmenu",(e=>{(0,o.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),l.isLinux&&this.register((0,c.addDisposableDomListener)(this.element,"auxclick",(e=>{1===e.button&&(0,o.moveTextAreaUnderMouseCursor)(e,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,c.addDisposableDomListener)(this.textarea,"keyup",(e=>this._keyUp(e)),!0)),this.register((0,c.addDisposableDomListener)(this.textarea,"keydown",(e=>this._keyDown(e)),!0)),this.register((0,c.addDisposableDomListener)(this.textarea,"keypress",(e=>this._keyPress(e)),!0)),this.register((0,c.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,c.addDisposableDomListener)(this.textarea,"compositionupdate",(e=>this._compositionHelper.compositionupdate(e)))),this.register((0,c.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,c.addDisposableDomListener)(this.textarea,"input",(e=>this._inputEvent(e)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(e){var t;if(!e)throw new Error("Terminal requires a parent element.");e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.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"),e.appendChild(this.element);const i=I.createDocumentFragment();this._viewportElement=I.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),i.appendChild(this._viewportElement),this._viewportScrollArea=I.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=I.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=I.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),i.appendChild(this.screenElement),this.textarea=I.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",d.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((0,c.addDisposableDomListener)(this.textarea,"focus",(e=>this._onTextAreaFocus(e)))),this.register((0,c.addDisposableDomListener)(this.textarea,"blur",(()=>this._onTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._coreBrowserService=this._instantiationService.createInstance(w.CoreBrowserService,this.textarea,null!==(t=this._document.defaultView)&&void 0!==t?t:window),this._instantiationService.setService(S.ICoreBrowserService,this._coreBrowserService),this._charSizeService=this._instantiationService.createInstance(b.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(S.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new g.ColorManager(I,this.options.allowTransparency),this.register(this.optionsService.onOptionChange((e=>this._colorManager.onOptionsChange(e,this.optionsService.rawOptions[e])))),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(A.CharacterJoinerService),this._instantiationService.setService(S.ICharacterJoinerService,this._characterJoinerService);const o=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(m.RenderService,o,this.rows,this.screenElement)),this._instantiationService.setService(S.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((e=>this._onRender.fire(e)))),this.onResize((e=>this._renderService.resize(e.cols,e.rows))),this._compositionView=I.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(s.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(i),this._mouseService=this._instantiationService.createInstance(C.MouseService),this._instantiationService.setService(S.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(r.Viewport,(e=>this.scrollLines(e,!0,1)),this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.onCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.onResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.onBlur()))),this.register(this.onFocus((()=>this._renderService.onFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(h.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(S.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((e=>this.scrollLines(e.amount,e.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((e=>this._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((e=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,c.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(R.BufferDecorationRenderer,this.screenElement)),this.register((0,c.addDisposableDomListener)(this.element,"mousedown",(e=>this._selectionService.onMouseDown(e)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new u.AccessibilityManager(this,this._renderService)),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(L.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onOptionChange((()=>{!this._overviewRulerRenderer&&this.options.overviewRulerWidth&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(L.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(_.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier2)}_setTheme(e){var t,i,s;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(i=this._renderService)||void 0===i||i.setColors(this._colorManager.colors),null===(s=this.viewport)||void 0===s||s.onThemeChange(this._colorManager.colors)}bindMouse(){const e=this,t=this.element;function i(t){const i=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!i)return!1;let s,r;switch(t.overrideType||t.type){case"mousemove":r=32,void 0===t.buttons?(s=3,void 0!==t.button&&(s=t.button<3?t.button:3)):s=1&t.buttons?0:4&t.buttons?1:2&t.buttons?2:3;break;case"mouseup":r=0,s=t.button<3?t.button:3;break;case"mousedown":r=1,s=t.button<3?t.button:3;break;case"wheel":if(0===e.viewport.getLinesScrolled(t))return!1;r=t.deltaY<0?0:1,s=4;break;default:return!1}return!(void 0===r||void 0===s||s>4)&&e.coreMouseService.triggerMouseEvent({col:i.col,row:i.row,x:i.x,y:i.y,button:s,action:r,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}const s={mouseup:null,wheel:null,mousedrag:null,mousemove:null},r={mouseup:e=>(i(e),e.buttons||(this._document.removeEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.removeEventListener("mousemove",s.mousedrag)),this.cancel(e)),wheel:e=>(i(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&i(e)},mousemove:e=>{e.buttons||i(e)}};this.register(this.coreMouseService.onProtocolChange((e=>{e?("debug"===this.optionsService.rawOptions.logLevel&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(e)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&e?s.mousemove||(t.addEventListener("mousemove",r.mousemove),s.mousemove=r.mousemove):(t.removeEventListener("mousemove",s.mousemove),s.mousemove=null),16&e?s.wheel||(t.addEventListener("wheel",r.wheel,{passive:!1}),s.wheel=r.wheel):(t.removeEventListener("wheel",s.wheel),s.wheel=null),2&e?s.mouseup||(s.mouseup=r.mouseup):(this._document.removeEventListener("mouseup",s.mouseup),s.mouseup=null),4&e?s.mousedrag||(s.mousedrag=r.mousedrag):(this._document.removeEventListener("mousemove",s.mousedrag),s.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,c.addDisposableDomListener)(t,"mousedown",(e=>{if(e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(e))return i(e),s.mouseup&&this._document.addEventListener("mouseup",s.mouseup),s.mousedrag&&this._document.addEventListener("mousemove",s.mousedrag),this.cancel(e)}))),this.register((0,c.addDisposableDomListener)(t,"wheel",(e=>{if(!s.wheel){if(!this.buffer.hasScrollback){const t=this.viewport.getLinesScrolled(e);if(0===t)return;const i=n.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(e.deltaY<0?"A":"B");let s="";for(let e=0;e<Math.abs(t);e++)s+=i;return this.coreService.triggerDataEvent(s,!0),this.cancel(e,!0)}return this.viewport.onWheel(e)?this.cancel(e):void 0}}),{passive:!1})),this.register((0,c.addDisposableDomListener)(t,"touchstart",(e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.onTouchStart(e),this.cancel(e)}),{passive:!0})),this.register((0,c.addDisposableDomListener)(t,"touchmove",(e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.onTouchMove(e)?void 0:this.cancel(e)}),{passive:!1}))}refresh(e,t){var i;null===(i=this._renderService)||void 0===i||i.refreshRows(e,t)}updateCursorStyle(e){var t;(null===(t=this._selectionService)||void 0===t?void 0:t.shouldColumnSelect(e))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t,i=0){super.scrollLines(e,t,i),this.refresh(0,this.rows-1)}paste(e){(0,o.paste)(e,this.textarea,this.coreService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}registerLinkProvider(e){return this.linkifier2.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}addMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(e,t,i){this._selectionService.setSelection(e,t,i)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()}selectAll(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()}selectLines(e,t){var i;null===(i=this._selectionService)||void 0===i||i.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;const t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;t||"Dead"!==e.key&&"AltGraph"!==e.key||(this._unprocessedDeadKey=!0);const i=(0,f.evaluateKeyboardEvent)(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===i.type||2===i.type){const t=this.rows-1;return this.scrollLines(2===i.type?-t:t),this.cancel(e,!0)}return 1===i.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key||!!(e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&1===e.key.length&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(i.key!==n.C0.ETX&&i.key!==n.C0.CR||(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0))))}_isThirdLevelShift(e,t){const i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return"keypress"===t.type?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null===e.which||void 0===e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(e){if(e.data&&"insertText"===e.inputType&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){e!==this.cols||t!==this.rows?super.resize(e,t):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(e,t){var i,s;null===(i=this._charSizeService)||void 0===i||i.measure(),null===(s=this.viewport)||void 0===s||s.syncScrollArea(!0)}clear(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.clearAllMarkers(),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(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(v.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}}reset(){var e,t;this.options.rows=this.rows,this.options.cols=this.cols;const i=this._customKeyEventHandler;this._setup(),super.reset(),null===(e=this._selectionService)||void 0===e||e.reset(),this._decorationService.reset(),this._customKeyEventHandler=i,this.refresh(0,this.rows-1),null===(t=this.viewport)||void 0===t||t.syncScrollArea()}clearTextureAtlas(){var e;null===(e=this._renderService)||void 0===e||e.clearTextureAtlas()}_reportFocus(){var e;(null===(e=this.element)||void 0===e?void 0:e.classList.contains("focus"))?this.coreService.triggerDataEvent(n.C0.ESC+"[I"):this.coreService.triggerDataEvent(n.C0.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case a.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const e=this._renderService.dimensions.canvasWidth.toFixed(0),t=this._renderService.dimensions.canvasHeight.toFixed(0);this.coreService.triggerDataEvent(`${n.C0.ESC}[4;${t};${e}t`);break;case a.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const i=this._renderService.dimensions.actualCellWidth.toFixed(0),s=this._renderService.dimensions.actualCellHeight.toFixed(0);this.coreService.triggerDataEvent(`${n.C0.ESC}[6;${s};${i}t`)}}cancel(e,t){if(this.options.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1}}t.Terminal=M},9924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBasedDebouncer=void 0,t.TimeBasedDebouncer=class{constructor(e,t=1e3){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t;const s=Date.now();if(s-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=s,this._innerRefresh();else if(!this._additionalRefreshRequested){const e=s-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),t)}}_innerRefresh(){if(void 0===this._rowStart||void 0===this._rowEnd||void 0===this._rowCount)return;const e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}}},1680:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;const o=i(844),n=i(3656),a=i(4725),h=i(2585);let l=class extends o.Disposable{constructor(e,t,i,s,r,o,a,h,l){super(),this._scrollLines=e,this._viewportElement=t,this._scrollArea=i,this._element=s,this._bufferService=r,this._optionsService=o,this._charSizeService=a,this._renderService=h,this._coreBrowserService=l,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentScaledCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,n.addDisposableDomListener)(this._viewportElement,"scroll",this._onScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((e=>this._activeBuffer=e.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((e=>this._renderDimensions=e))),setTimeout((()=>this.syncScrollArea()),0)}onThemeChange(e){this._viewportElement.style.backgroundColor=e.background.css}_refresh(e){if(e)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/this._coreBrowserService.dpr,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const e=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==e&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=e),this._refreshAnimationFrame=null}syncScrollArea(e=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight||this._refresh(e)}_onScroll(e){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);const t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}_smoothScroll(){if(this._isDisposed||-1===this._smoothScrollState.origin||-1===this._smoothScrollState.target)return;const e=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(e*(this._smoothScrollState.target-this._smoothScrollState.origin)),e<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(e,t){const i=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&0!==this._viewportElement.scrollTop||t>0&&i<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)}onWheel(e){const t=this._getPixelsScrolled(e);return 0!==t&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,-1===this._smoothScrollState.target?this._smoothScrollState.target=this._viewportElement.scrollTop+t:this._smoothScrollState.target+=t,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}_getPixelsScrolled(e){if(0===e.deltaY||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t}getLinesScrolled(e){if(0===e.deltaY||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t}_applyScrollModifier(e,t){const i=this._optionsService.rawOptions.fastScrollModifier;return"alt"===i&&t.altKey||"ctrl"===i&&t.ctrlKey||"shift"===i&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}onTouchStart(e){this._lastTouchY=e.touches[0].pageY}onTouchMove(e){const t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}};l=s([r(4,h.IBufferService),r(5,h.IOptionsService),r(6,a.ICharSizeService),r(7,a.IRenderService),r(8,a.ICoreBrowserService)],l),t.Viewport=l},3107:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferDecorationRenderer=void 0;const o=i(3656),n=i(4725),a=i(844),h=i(2585);let l=class extends a.Disposable{constructor(e,t,i,s){super(),this._screenElement=e,this._bufferService=t,this._decorationService=i,this._renderService=s,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register((0,o.addDisposableDomListener)(window,"resize",(()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((e=>this._removeDecoration(e))))}dispose(){this._container.remove(),this._decorationElements.clear(),super.dispose()}_queueRefresh(){void 0===this._animationFrame&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this.refreshDecorations(),this._animationFrame=void 0})))}refreshDecorations(){for(const e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var t;const i=document.createElement("div");i.classList.add("xterm-decoration"),i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.actualCellWidth)}px`,i.style.height=(e.options.height||1)*this._renderService.dimensions.actualCellHeight+"px",i.style.top=(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.actualCellHeight+"px",i.style.lineHeight=`${this._renderService.dimensions.actualCellHeight}px`;const s=null!==(t=e.options.x)&&void 0!==t?t:0;return s&&s>this._bufferService.cols&&(i.style.display="none"),this._refreshXPosition(e,i),i}_refreshStyle(e){const t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(e.onDispose((()=>this._removeDecoration(e))),i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i)),i.style.top=t*this._renderService.dimensions.actualCellHeight+"px",i.style.display=this._altBufferIsActive?"none":"block",e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){var i;if(!t)return;const s=null!==(i=e.options.x)&&void 0!==i?i:0;"right"===(e.options.anchor||"left")?t.style.right=s?s*this._renderService.dimensions.actualCellWidth+"px":"":t.style.left=s?s*this._renderService.dimensions.actualCellWidth+"px":""}_removeDecoration(e){var t;null===(t=this._decorationElements.get(e))||void 0===t||t.remove(),this._decorationElements.delete(e)}};l=s([r(1,h.IBufferService),r(2,h.IDecorationService),r(3,n.IRenderService)],l),t.BufferDecorationRenderer=l},5871:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorZoneStore=void 0,t.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(const t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position))return void this._addLineToZone(t,e.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||"full"]&&t<=e.endBufferLine+this._linePadding[i||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}}},5744:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerRenderer=void 0;const o=i(5871),n=i(3656),a=i(4725),h=i(844),l=i(2585),c={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0};let _=class extends h.Disposable{constructor(e,t,i,s,r,n,a){var h;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=s,this._renderService=r,this._optionsService=n,this._coreBrowseService=a,this._colorZoneStore=new o.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),null===(h=this._viewportElement.parentElement)||void 0===h||h.insertBefore(this._canvas,this._viewportElement);const l=this._canvas.getContext("2d");if(!l)throw new Error("Ctx cannot be null");this._ctx=l,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners()}get _width(){return this._optionsService.options.overviewRulerWidth||0}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onOptionChange((e=>{"overviewRulerWidth"===e&&this._queueRefresh(!0)}))),this.register((0,n.addDisposableDomListener)(this._coreBrowseService.window,"resize",(()=>{this._queueRefresh(!0)}))),this._queueRefresh(!0)}dispose(){var e;null===(e=this._canvas)||void 0===e||e.remove(),super.dispose()}_refreshDrawConstants(){const e=Math.floor(this._canvas.width/3),t=Math.ceil(this._canvas.width/3);d.full=this._canvas.width,d.left=e,d.center=t,d.right=e,this._refreshDrawHeightConstants(),u.full=0,u.left=0,u.center=d.left,u.right=d.left+d.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowseService.dpr);const e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowseService.dpr);c.left=t,c.center=t,c.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1;const e=this._colorZoneStore.zones;for(const t of e)"full"!==t.position&&this._renderColorZone(t);for(const t of e)"full"===t.position&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(u[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-c[e.position||"full"]/2),d[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,void 0===this._animationFrame&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};_=s([r(2,l.IBufferService),r(3,l.IDecorationService),r(4,a.IRenderService),r(5,l.IOptionsService),r(6,a.ICoreBrowserService)],_),t.OverviewRulerRenderer=_},2950:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;const o=i(4725),n=i(2585),a=i(2584);let h=class{constructor(e,t,i,s,r,o){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=s,this._coreService=r,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this._finalizeComposition(!1)}return 229!==e.keyCode||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){const e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let t;this._isSendingComposition=!1,e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,e.end):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}}),0)}else{this._isSendingComposition=!1;const e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){const e=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${a.C0.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}}),0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.actualCellHeight,i=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,s=e*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=s+"px",this._compositionView.style.top=i+"px",this._compositionView.style.height=t+"px",this._compositionView.style.lineHeight=t+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const r=this._compositionView.getBoundingClientRect();this._textarea.style.left=s+"px",this._textarea.style.top=i+"px",this._textarea.style.width=Math.max(r.width,1)+"px",this._textarea.style.height=Math.max(r.height,1)+"px",this._textarea.style.lineHeight=r.height+"px"}e||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};h=s([r(2,n.IBufferService),r(3,n.IOptionsService),r(4,n.ICoreService),r(5,o.IRenderService)],h),t.CompositionHelper=h},9806:(e,t)=>{function i(e,t,i){const s=i.getBoundingClientRect(),r=e.getComputedStyle(i),o=parseInt(r.getPropertyValue("padding-left")),n=parseInt(r.getPropertyValue("padding-top"));return[t.clientX-s.left-o,t.clientY-s.top-n]}Object.defineProperty(t,"__esModule",{value:!0}),t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=i,t.getCoords=function(e,t,s,r,o,n,a,h,l){if(!n)return;const c=i(e,t,s);return c?(c[0]=Math.ceil((c[0]+(l?a/2:0))/a),c[1]=Math.ceil(c[1]/h),c[0]=Math.min(Math.max(c[0],1),r+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),o),c):void 0}},9504:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;const s=i(2584);function r(e,t,i,s){const r=e-o(i,e),a=t-o(i,t),c=Math.abs(r-a)-function(e,t,i){let s=0;const r=e-o(i,e),a=t-o(i,t);for(let o=0;o<Math.abs(r-a);o++){const a="A"===n(e,t)?-1:1,h=i.buffer.lines.get(r+a*o);(null==h?void 0:h.isWrapped)&&s++}return s}(e,t,i);return l(c,h(n(e,t),s))}function o(e,t){let i=0,s=e.buffer.lines.get(t),r=null==s?void 0:s.isWrapped;for(;r&&t>=0&&t<e.rows;)i++,s=e.buffer.lines.get(--t),r=null==s?void 0:s.isWrapped;return i}function n(e,t){return e>t?"A":"B"}function a(e,t,i,s,r,o){let n=e,a=t,h="";for(;n!==i||a!==s;)n+=r?1:-1,r&&n>o.cols-1?(h+=o.buffer.translateBufferLineToString(a,!1,e,n),n=0,e=0,a++):!r&&n<0&&(h+=o.buffer.translateBufferLineToString(a,!1,0,e+1),n=o.cols-1,e=n,a--);return h+o.buffer.translateBufferLineToString(a,!1,e,n)}function h(e,t){const i=t?"O":"[";return s.C0.ESC+i+e}function l(e,t){e=Math.floor(e);let i="";for(let s=0;s<e;s++)i+=t;return i}t.moveToCellSequence=function(e,t,i,s){const n=i.buffer.x,c=i.buffer.y;if(!i.buffer.hasScrollback)return function(e,t,i,s,n,c){return 0===r(t,s,n,c).length?"":l(a(e,t,e,t-o(n,t),!1,n).length,h("D",c))}(n,c,0,t,i,s)+r(c,t,i,s)+function(e,t,i,s,n,c){let d;d=r(t,s,n,c).length>0?s-o(n,s):t;const u=s,_=function(e,t,i,s,n,a){let h;return h=r(i,s,n,a).length>0?s-o(n,s):t,e<i&&h<=s||e>=i&&h<s?"C":"D"}(e,t,i,s,n,c);return l(a(e,d,i,u,"C"===_,n).length,h(_,c))}(n,c,e,t,i,s);let d;if(c===t)return d=n>e?"D":"C",l(Math.abs(n-e),h(d,s));d=c>t?"D":"C";const u=Math.abs(c-t);return l(function(e,t){return t.cols-e}(c>t?e:n,i)+(u-1)*i.cols+1+((c>t?n:e)-1),h(d,s))}},8036:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;const s=i(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=s.isFirefox||s.isLegacyEdge?"bottom":"ideographic"},1752:(e,t)=>{function i(e){return 57508<=e&&e<=57558}Object.defineProperty(t,"__esModule",{value:!0}),t.excludeFromContrastRatioDemands=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e},t.isPowerlineGlyph=i,t.isRestrictedPowerlineGlyph=function(e){return 57520<=e&&e<=57527},t.excludeFromContrastRatioDemands=function(e){return i(e)||function(e){return 9472<=e&&e<=9631}(e)}},1296:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;const o=i(3787),n=i(8036),a=i(844),h=i(4725),l=i(2585),c=i(8460),d=i(8055),u=i(9631),_="xterm-dom-renderer-owner-",f="xterm-focus";let p=1,v=class extends a.Disposable{constructor(e,t,i,s,r,n,a,h,l,c){super(),this._colors=e,this._element=t,this._screenElement=i,this._viewportElement=s,this._linkifier2=r,this._charSizeService=a,this._optionsService=h,this._bufferService=l,this._coreBrowserService=c,this._terminalClass=p++,this._rowElements=[],this._rowContainer=document.createElement("div"),this._rowContainer.classList.add("xterm-rows"),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add("xterm-selection"),this._selectionContainer.setAttribute("aria-hidden","true"),this.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},this._updateDimensions(),this._injectCss(),this._rowFactory=n.createInstance(o.DomRendererRowFactory,document,this._colors),this._element.classList.add(_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((e=>this._onLinkHover(e)))),this.register(this._linkifier2.onHideLinkUnderline((e=>this._onLinkLeave(e))))}get onRequestRedraw(){return(new c.EventEmitter).event}dispose(){this._element.classList.remove(_+this._terminalClass),(0,u.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),super.dispose()}_updateDimensions(){const e=this._coreBrowserService.dpr;this.dimensions.scaledCharWidth=this._charSizeService.width*e,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*e),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.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/e),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/e),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(const e of this._rowElements)e.style.width=`${this.dimensions.canvasWidth}px`,e.style.height=`${this.dimensions.actualCellHeight}px`,e.style.lineHeight=`${this.dimensions.actualCellHeight}px`,e.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const t=`${this._terminalSelector} .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: ${this.dimensions.actualCellWidth}px}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.canvasWidth}px`,this._screenElement.style.height=`${this.dimensions.canvasHeight}px`}setColors(e){this._colors=e,this._injectCss()}_injectCss(){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let e=`${this._terminalSelector} .xterm-rows { color: ${this._colors.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px;}`;e+=`${this._terminalSelector} span:not(.${o.BOLD_CLASS}) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.${o.BOLD_CLASS} { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.${o.ITALIC_CLASS} { font-style: italic;}`,e+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",e+="@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}; }}`,e+=`${this._terminalSelector} .xterm-rows:not(.xterm-focus) .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_BLOCK_CLASS} { outline: 1px solid ${this._colors.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .xterm-rows.xterm-focus .${o.CURSOR_CLASS}.${o.CURSOR_BLINK_CLASS}:not(.${o.CURSOR_STYLE_BLOCK_CLASS}) { animation: blink_box_shadow_`+this._terminalClass+" 1s step-end infinite;}"+`${this._terminalSelector} .xterm-rows.xterm-focus .${o.CURSOR_CLASS}.${o.CURSOR_BLINK_CLASS}.${o.CURSOR_STYLE_BLOCK_CLASS} { animation: blink_block_`+this._terminalClass+" 1s step-end infinite;}"+`${this._terminalSelector} .xterm-rows.xterm-focus .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_BLOCK_CLASS} {`+` background-color: ${this._colors.cursor.css};`+` color: ${this._colors.cursorAccent.css};}`+`${this._terminalSelector} .xterm-rows .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_BAR_CLASS} {`+` box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${this._colors.cursor.css} inset;}`+`${this._terminalSelector} .xterm-rows .${o.CURSOR_CLASS}.${o.CURSOR_STYLE_UNDERLINE_CLASS} {`+` box-shadow: 0 -1px 0 ${this._colors.cursor.css} inset;}`,e+=`${this._terminalSelector} .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .xterm-selection div { position: absolute; background-color: ${this._colors.selectionBackgroundOpaque.css};}${this._terminalSelector} .xterm-selection div { position: absolute; background-color: ${this._colors.selectionInactiveBackgroundOpaque.css};}`,this._colors.ansi.forEach(((t,i)=>{e+=`${this._terminalSelector} .xterm-fg-${i} { color: ${t.css}; }${this._terminalSelector} .xterm-bg-${i} { background-color: ${t.css}; }`})),e+=`${this._terminalSelector} .xterm-fg-${n.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(this._colors.background).css}; }${this._terminalSelector} .xterm-bg-${n.INVERTED_DEFAULT_COLOR} { background-color: ${this._colors.foreground.css}; }`,this._themeStyleElement.textContent=e}onDevicePixelRatioChange(){this._updateDimensions()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){const e=document.createElement("div");this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}onResize(e,t){this._refreshRowElements(e,t),this._updateDimensions()}onCharSizeChanged(){this._updateDimensions()}onBlur(){this._rowContainer.classList.remove(f)}onFocus(){this._rowContainer.classList.add(f)}onSelectionChanged(e,t,i){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(this._rowFactory.onSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t)return;const s=e[1]-this._bufferService.buffer.ydisp,r=t[1]-this._bufferService.buffer.ydisp,o=Math.max(s,0),n=Math.min(r,this._bufferService.rows-1);if(o>=this._bufferService.rows||n<0)return;const a=document.createDocumentFragment();if(i){const i=e[0]>t[0];a.appendChild(this._createSelectionElement(o,i?t[0]:e[0],i?e[0]:t[0],n-o+1))}else{const i=s===o?e[0]:0,h=o===r?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,i,h));const l=n-o-1;if(a.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,l)),o!==n){const e=r===n?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(n,0,e))}}this._selectionContainer.appendChild(a)}_createSelectionElement(e,t,i,s=1){const r=document.createElement("div");return r.style.height=s*this.dimensions.actualCellHeight+"px",r.style.top=e*this.dimensions.actualCellHeight+"px",r.style.left=t*this.dimensions.actualCellWidth+"px",r.style.width=this.dimensions.actualCellWidth*(i-t)+"px",r}onCursorMove(){}onOptionsChanged(){this._updateDimensions(),this._injectCss()}clear(){for(const e of this._rowElements)e.innerText=""}renderRows(e,t){const i=this._bufferService.buffer.ybase+this._bufferService.buffer.y,s=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._optionsService.rawOptions.cursorBlink;for(let o=e;o<=t;o++){const e=this._rowElements[o];e.innerText="";const t=o+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.lines.get(t),a=this._optionsService.rawOptions.cursorStyle;e.appendChild(this._rowFactory.createRow(n,t,t===i,a,s,r,this.dimensions.actualCellWidth,this._bufferService.cols))}}get _terminalSelector(){return`.${_}${this._terminalClass}`}_onLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_onLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,s,r,o){for(;e!==t||i!==s;){const t=this._rowElements[i];if(!t)return;const s=t.children[e];s&&(s.style.textDecoration=o?"underline":"none"),++e>=r&&(e=0,i++)}}};v=s([r(5,l.IInstantiationService),r(6,h.ICharSizeService),r(7,l.IOptionsService),r(8,l.IBufferService),r(9,h.ICoreBrowserService)],v),t.DomRenderer=v},3787:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=t.CURSOR_STYLE_UNDERLINE_CLASS=t.CURSOR_STYLE_BAR_CLASS=t.CURSOR_STYLE_BLOCK_CLASS=t.CURSOR_BLINK_CLASS=t.CURSOR_CLASS=t.STRIKETHROUGH_CLASS=t.UNDERLINE_CLASS=t.ITALIC_CLASS=t.DIM_CLASS=t.BOLD_CLASS=void 0;const o=i(8036),n=i(643),a=i(511),h=i(2585),l=i(8055),c=i(4725),d=i(4269),u=i(1752),_=i(3734);t.BOLD_CLASS="xterm-bold",t.DIM_CLASS="xterm-dim",t.ITALIC_CLASS="xterm-italic",t.UNDERLINE_CLASS="xterm-underline",t.STRIKETHROUGH_CLASS="xterm-strikethrough",t.CURSOR_CLASS="xterm-cursor",t.CURSOR_BLINK_CLASS="xterm-cursor-blink",t.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",t.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",t.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";let f=class{constructor(e,t,i,s,r,o,n){this._document=e,this._colors=t,this._characterJoinerService=i,this._optionsService=s,this._coreBrowserService=r,this._coreService=o,this._decorationService=n,this._workCell=new a.CellData,this._columnSelectMode=!1}setColors(e){this._colors=e}onSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,i,s,r,a,h,c,u){const f=this._document.createDocumentFragment(),v=this._characterJoinerService.getJoinedCharacters(i);let g=0;for(let t=Math.min(e.length,u)-1;t>=0;t--)if(e.loadCell(t,this._workCell).getCode()!==n.NULL_CELL_CODE||s&&t===a){g=t+1;break}for(let u=0;u<g;u++){e.loadCell(u,this._workCell);let g=this._workCell.getWidth();if(0===g)continue;let m=!1,S=u,b=this._workCell;if(v.length>0&&u===v[0][0]){m=!0;const t=v.shift();b=new d.JoinedCellData(this._workCell,e.translateToString(!0,t[0],t[1]),t[1]-t[0]),S=t[1]-1,g=b.getWidth()}const C=this._document.createElement("span");if(g>1&&(C.style.width=c*g+"px"),m&&(C.style.display="inline",a>=u&&a<=S&&(a=u)),!this._coreService.isCursorHidden&&s&&u===a)switch(C.classList.add(t.CURSOR_CLASS),h&&C.classList.add(t.CURSOR_BLINK_CLASS),r){case"bar":C.classList.add(t.CURSOR_STYLE_BAR_CLASS);break;case"underline":C.classList.add(t.CURSOR_STYLE_UNDERLINE_CLASS);break;default:C.classList.add(t.CURSOR_STYLE_BLOCK_CLASS)}if(b.isBold()&&C.classList.add(t.BOLD_CLASS),b.isItalic()&&C.classList.add(t.ITALIC_CLASS),b.isDim()&&C.classList.add(t.DIM_CLASS),b.isInvisible()?C.textContent=n.WHITESPACE_CELL_CHAR:C.textContent=b.getChars()||n.WHITESPACE_CELL_CHAR,b.isUnderline()&&(C.classList.add(`${t.UNDERLINE_CLASS}-${b.extended.underlineStyle}`)," "===C.textContent&&(C.innerHTML="&nbsp;"),!b.isUnderlineColorDefault()))if(b.isUnderlineColorRGB())C.style.textDecorationColor=`rgb(${_.AttributeData.toColorRGB(b.getUnderlineColor()).join(",")})`;else{let e=b.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&b.isBold()&&e<8&&(e+=8),C.style.textDecorationColor=this._colors.ansi[e].css}b.isStrikethrough()&&C.classList.add(t.STRIKETHROUGH_CLASS);let y=b.getFgColor(),w=b.getFgColorMode(),E=b.getBgColor(),k=b.getBgColorMode();const A=!!b.isInverse();if(A){const e=y;y=E,E=e;const t=w;w=k,k=t}let x,R,L=!1;this._decorationService.forEachDecorationAtCell(u,i,void 0,(e=>{"top"!==e.options.layer&&L||(e.backgroundColorRGB&&(k=50331648,E=e.backgroundColorRGB.rgba>>8&16777215,x=e.backgroundColorRGB),e.foregroundColorRGB&&(w=50331648,y=e.foregroundColorRGB.rgba>>8&16777215,R=e.foregroundColorRGB),L="top"===e.options.layer)}));const D=this._isCellInSelection(u,i);let B;switch(L||this._colors.selectionForeground&&D&&(w=50331648,y=this._colors.selectionForeground.rgba>>8&16777215,R=this._colors.selectionForeground),D&&(x=this._coreBrowserService.isFocused?this._colors.selectionBackgroundOpaque:this._colors.selectionInactiveBackgroundOpaque,L=!0),L&&C.classList.add("xterm-decoration-top"),k){case 16777216:case 33554432:B=this._colors.ansi[E],C.classList.add(`xterm-bg-${E}`);break;case 50331648:B=l.rgba.toColor(E>>16,E>>8&255,255&E),this._addStyle(C,`background-color:#${p((E>>>0).toString(16),"0",6)}`);break;default:A?(B=this._colors.foreground,C.classList.add(`xterm-bg-${o.INVERTED_DEFAULT_COLOR}`)):B=this._colors.background}switch(x||b.isDim()&&(x=l.color.multiplyOpacity(B,.5)),w){case 16777216:case 33554432:b.isBold()&&y<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(y+=8),this._applyMinimumContrast(C,B,this._colors.ansi[y],b,x,void 0)||C.classList.add(`xterm-fg-${y}`);break;case 50331648:const e=l.rgba.toColor(y>>16&255,y>>8&255,255&y);this._applyMinimumContrast(C,B,e,b,x,R)||this._addStyle(C,`color:#${p(y.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(C,B,this._colors.foreground,b,x,void 0)||A&&C.classList.add(`xterm-fg-${o.INVERTED_DEFAULT_COLOR}`)}f.appendChild(C),u=S}return f}_applyMinimumContrast(e,t,i,s,r,o){if(1===this._optionsService.rawOptions.minimumContrastRatio||(0,u.excludeFromContrastRatioDemands)(s.getCode()))return!1;let n;return r||o||(n=this._colors.contrastCache.getColor(t.rgba,i.rgba)),void 0===n&&(n=l.color.ensureContrastRatio(r||t,o||i,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor((r||t).rgba,(o||i).rgba,null!=n?n:null)),!!n&&(this._addStyle(e,`color:${n.css}`),!0)}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){const i=this._selectionStart,s=this._selectionEnd;return!(!i||!s)&&(this._columnSelectMode?i[0]<=s[0]?e>=i[0]&&t>=i[1]&&e<s[0]&&t<=s[1]:e<i[0]&&t>=i[1]&&e>=s[0]&&t<=s[1]:t>i[1]&&t<s[1]||i[1]===s[1]&&t===i[1]&&e>=i[0]&&e<s[0]||i[1]<s[1]&&t===s[1]&&e<s[0]||i[1]<s[1]&&t===i[1]&&e>=i[0])}};function p(e,t,i){for(;e.length<i;)e=t+e;return e}f=s([r(2,c.ICharacterJoinerService),r(3,h.IOptionsService),r(4,c.ICoreBrowserService),r(5,h.ICoreService),r(6,h.IDecorationService)],f),t.DomRendererRowFactory=f},456:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0,t.SelectionModel=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])}onTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;const o=i(2585),n=i(8460);let a=class{constructor(e,t,i){this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=new n.EventEmitter,this._measureStrategy=new h(e,t,this._optionsService)}get hasValidSize(){return this.width>0&&this.height>0}get onCharSizeChange(){return this._onCharSizeChange.event}measure(){const e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};a=s([r(2,o.IOptionsService)],a),t.CharSizeService=a;class h{constructor(e,t,i){this._document=e,this._parentElement=t,this._optionsService=i,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)}measure(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const e=this._measureElement.getBoundingClientRect();return 0!==e.width&&0!==e.height&&(this._result.width=e.width,this._result.height=Math.ceil(e.height)),this._result}}},4269:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;const o=i(3734),n=i(643),a=i(511),h=i(2585);class l extends o.AttributeData{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=l;let c=class e{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new a.CellData}register(e){const t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(0===this._characterJoiners.length)return[];const t=this._bufferService.buffer.lines.get(e);if(!t||0===t.length)return[];const i=[],s=t.translateToString(!0);let r=0,o=0,a=0,h=t.getFg(0),l=t.getBg(0);for(let e=0;e<t.getTrimmedLength();e++)if(t.loadCell(e,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==h||this._workCell.bg!==l){if(e-r>1){const e=this._getJoinedRanges(s,a,o,t,r);for(let t=0;t<e.length;t++)i.push(e[t])}r=e,a=o,h=this._workCell.fg,l=this._workCell.bg}o+=this._workCell.getChars().length||n.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-r>1){const e=this._getJoinedRanges(s,a,o,t,r);for(let t=0;t<e.length;t++)i.push(e[t])}return i}_getJoinedRanges(t,i,s,r,o){const n=t.substring(i,s);let a=[];try{a=this._characterJoiners[0].handler(n)}catch(e){console.error(e)}for(let t=1;t<this._characterJoiners.length;t++)try{const i=this._characterJoiners[t].handler(n);for(let t=0;t<i.length;t++)e._mergeRanges(a,i[t])}catch(e){console.error(e)}return this._stringRangesToCellRanges(a,r,o),a}_stringRangesToCellRanges(e,t,i){let s=0,r=!1,o=0,a=e[s];if(a){for(let h=i;h<this._bufferService.cols;h++){const i=t.getWidth(h),l=t.getString(h).length||n.WHITESPACE_CELL_CHAR.length;if(0!==i){if(!r&&a[0]<=o&&(a[0]=h,r=!0),a[1]<=o){if(a[1]=h,a=e[++s],!a)break;a[0]<=o?(a[0]=h,r=!0):r=!1}o+=l}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let s=0;s<e.length;s++){const r=e[s];if(i){if(t[1]<=r[0])return e[s-1][1]=t[1],e;if(t[1]<=r[1])return e[s-1][1]=Math.max(t[1],r[1]),e.splice(s,1),e;e.splice(s,1),s--}else{if(t[1]<=r[0])return e.splice(s,0,t),e;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),e;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0)}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};c=s([r(0,h.IBufferService)],c),t.CharacterJoinerService=c},5114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0,t.CoreBrowserService=class{constructor(e,t){this._textarea=e,this.window=t}get dpr(){return this.window.devicePixelRatio}get isFocused(){return(this._textarea.getRootNode?this._textarea.getRootNode():this._textarea.ownerDocument).activeElement===this._textarea&&this._textarea.ownerDocument.hasFocus()}}},8934:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;const o=i(4725),n=i(9806);let a=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,s,r){return(0,n.getCoords)(window,e,t,i,s,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,r)}getMouseReportCoords(e,t){const i=(0,n.getCoordsRelativeToElement)(window,e,t);if(!(!this._charSizeService.hasValidSize||i[0]<0||i[1]<0||i[0]>=this._renderService.dimensions.canvasWidth||i[1]>=this._renderService.dimensions.canvasHeight))return{col:Math.floor(i[0]/this._renderService.dimensions.actualCellWidth),row:Math.floor(i[1]/this._renderService.dimensions.actualCellHeight),x:Math.floor(i[0]),y:Math.floor(i[1])}}};a=s([r(0,o.IRenderService),r(1,o.ICharSizeService)],a),t.MouseService=a},3230:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;const o=i(6193),n=i(8460),a=i(844),h=i(5596),l=i(3656),c=i(2585),d=i(4725);let u=class extends a.Disposable{constructor(e,t,i,s,r,a,c,d){if(super(),this._renderer=e,this._rowCount=t,this._charSizeService=r,this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=new n.EventEmitter,this._onRenderedViewportChange=new n.EventEmitter,this._onRender=new n.EventEmitter,this._onRefreshRequest=new n.EventEmitter,this.register({dispose:()=>this._renderer.dispose()}),this._renderDebouncer=new o.RenderDebouncer(d.window,((e,t)=>this._renderRows(e,t))),this.register(this._renderDebouncer),this._screenDprMonitor=new h.ScreenDprMonitor(d.window),this._screenDprMonitor.setListener((()=>this.onDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(c.onResize((()=>this._fullRefresh()))),this.register(c.buffers.onBufferActivate((()=>{var e;return null===(e=this._renderer)||void 0===e?void 0:e.clear()}))),this.register(s.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.onCharSizeChanged()))),this.register(a.onDecorationRegistered((()=>this._fullRefresh()))),this.register(a.onDecorationRemoved((()=>this._fullRefresh()))),this._renderer.onRequestRedraw((e=>this.refreshRows(e.start,e.end,!0))),this.register((0,l.addDisposableDomListener)(d.window,"resize",(()=>this.onDevicePixelRatioChange()))),"IntersectionObserver"in d.window){const e=new d.window.IntersectionObserver((e=>this._onIntersectionChange(e[e.length-1])),{threshold:0});e.observe(i),this.register({dispose:()=>e.disconnect()})}}get onDimensionsChange(){return this._onDimensionsChange.event}get onRenderedViewportChange(){return this._onRenderedViewportChange.event}get onRender(){return this._onRender.event}get onRefreshRequest(){return this._onRefreshRequest.event}get dimensions(){return this._renderer.dimensions}_onIntersectionChange(e){this._isPaused=void 0===e.isIntersecting?0===e.intersectionRatio:!e.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,i=!1){this._isPaused?this._needsFullRefresh=!0:(i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))}_renderRows(e,t){this._renderer.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()}_fireOnCanvasResize(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)}dispose(){super.dispose()}setRenderer(e){this._renderer.dispose(),this._renderer=e,this._renderer.onRequestRedraw((e=>this.refreshRows(e.start,e.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;null===(t=null===(e=this._renderer)||void 0===e?void 0:e.clearTextureAtlas)||void 0===t||t.call(e),this._fullRefresh()}setColors(e){this._renderer.setColors(e),this._fullRefresh()}onDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)}onResize(e,t){this._renderer.onResize(e,t),this._fullRefresh()}onCharSizeChanged(){this._renderer.onCharSizeChanged()}onBlur(){this._renderer.onBlur()}onFocus(){this._renderer.onFocus()}onSelectionChanged(e,t,i){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,this._renderer.onSelectionChanged(e,t,i)}onCursorMove(){this._renderer.onCursorMove()}clear(){this._renderer.clear()}};u=s([r(3,c.IOptionsService),r(4,d.ICharSizeService),r(5,c.IDecorationService),r(6,c.IBufferService),r(7,d.ICoreBrowserService)],u),t.RenderService=u},9312:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;const o=i(6114),n=i(456),a=i(511),h=i(8460),l=i(4725),c=i(2585),d=i(9806),u=i(9504),_=i(844),f=i(4841),p=String.fromCharCode(160),v=new RegExp(p,"g");let g=class extends _.Disposable{constructor(e,t,i,s,r,o,l,c,d){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=s,this._coreService=r,this._mouseService=o,this._optionsService=l,this._renderService=c,this._coreBrowserService=d,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new a.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new h.EventEmitter),this._onRedrawRequest=this.register(new h.EventEmitter),this._onSelectionChange=this.register(new h.EventEmitter),this._onRequestScrollLines=this.register(new h.EventEmitter),this._mouseMoveListener=e=>this._onMouseMove(e),this._mouseUpListener=e=>this._onMouseUp(e),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((e=>this._onTrim(e))),this.register(this._bufferService.buffers.onBufferActivate((e=>this._onBufferActivate(e)))),this.enable(),this._model=new n.SelectionModel(this._bufferService),this._activeSelectionMode=0}get onLinuxMouseSelection(){return this._onLinuxMouseSelection.event}get onRequestRedraw(){return this._onRedrawRequest.event}get onSelectionChange(){return this._onSelectionChange.event}get onRequestScrollLines(){return this._onRequestScrollLines.event}dispose(){this._removeMouseDownListeners()}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])}get selectionText(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";const i=this._bufferService.buffer,s=[];if(3===this._activeSelectionMode){if(e[0]===t[0])return"";const r=e[0]<t[0]?e[0]:t[0],o=e[0]<t[0]?t[0]:e[0];for(let n=e[1];n<=t[1];n++){const e=i.translateBufferLineToString(n,!0,r,o);s.push(e)}}else{const r=e[1]===t[1]?t[0]:void 0;s.push(i.translateBufferLineToString(e[1],!0,e[0],r));for(let r=e[1]+1;r<=t[1]-1;r++){const e=i.lines.get(r),t=i.translateBufferLineToString(r,!0);(null==e?void 0:e.isWrapped)?s[s.length-1]+=t:s.push(t)}if(e[1]!==t[1]){const e=i.lines.get(t[1]),r=i.translateBufferLineToString(t[1],!0,0,t[0]);e&&e.isWrapped?s[s.length-1]+=r:s.push(r)}}return s.map((e=>e.replace(v," "))).join(o.isWindows?"\r\n":"\n")}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),o.isLinux&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})}_isClickInSelection(e){const t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!!(i&&s&&t)&&this._areCoordsInSelection(t,i,s)}isCellInSelection(e,t){const i=this._model.finalSelectionStart,s=this._model.finalSelectionEnd;return!(!i||!s)&&this._areCoordsInSelection([e,t],i,s)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]<i[1]||t[1]===i[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<i[0]||t[1]<i[1]&&e[1]===i[1]&&e[0]<i[0]||t[1]<i[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var i,s;const r=null===(s=null===(i=this._linkifier.currentLink)||void 0===i?void 0:i.link)||void 0===s?void 0:s.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=(0,f.getRangeLength)(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const o=this._getMouseBufferCoords(e);return!!o&&(this._selectWordAt(o,t),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_onTrim(e){this._model.onTrim(e)&&this.refresh()}_getMouseBufferCoords(e){const t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,e,this._screenElement)[1];const i=this._renderService.dimensions.canvasHeight;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-50),50),t/=50,t/Math.abs(t)+Math.round(14*t))}shouldForceSelection(e){return o.isMac?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}onMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,(2!==e.button||!this.hasSelection)&&0===e.button){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._onIncrementalClick(e):1===e.detail?this._onSingleClick(e):2===e.detail?this._onDoubleClick(e):3===e.detail&&this._onTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_onIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_onSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&0===t.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}_onDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_onTripleClick(e){const t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(o.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_onMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;const t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd)return void this.refresh(!0);2===this._activeSelectionMode?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:1===this._activeSelectionMode&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),3!==this._activeSelectionMode&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const i=this._bufferService.buffer;if(this._model.selectionEnd[1]<i.lines.length){const e=i.lines.get(this._model.selectionEnd[1]);e&&0===e.hasWidth(this._model.selectionEnd[0])&&this._model.selectionEnd[0]++}t&&t[0]===this._model.selectionEnd[0]&&t[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const e=this._bufferService.buffer;this._dragScrollAmount>0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_onMouseUp(e){const t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const t=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(t&&void 0!==t[0]&&void 0!==t[1]){const e=(0,u.moveToCellSequence)(t[0]-1,t[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(e,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!(!e||!t||e[0]===t[0]&&e[1]===t[1]);i?e&&t&&(this._oldSelectionStart&&this._oldSelectionEnd&&e[0]===this._oldSelectionStart[0]&&e[1]===this._oldSelectionStart[1]&&t[0]===this._oldSelectionEnd[0]&&t[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(e,t,i)):this._oldHasSelection&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_onBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim((e=>this._onTrim(e)))}_convertViewportColToCharacterIndex(e,t){let i=t[0];for(let s=0;t[0]>=s;s++){const r=e.loadCell(s,this._workCell).getChars().length;0===this._workCell.getWidth()?i--:r>1&&t[0]!==s&&(i+=r-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,s=!0){if(e[0]>=this._bufferService.cols)return;const r=this._bufferService.buffer,o=r.lines.get(e[1]);if(!o)return;const n=r.translateBufferLineToString(e[1],!1);let a=this._convertViewportColToCharacterIndex(o,e),h=a;const l=e[0]-a;let c=0,d=0,u=0,_=0;if(" "===n.charAt(a)){for(;a>0&&" "===n.charAt(a-1);)a--;for(;h<n.length&&" "===n.charAt(h+1);)h++}else{let t=e[0],i=e[0];0===o.getWidth(t)&&(c++,t--),2===o.getWidth(i)&&(d++,i++);const s=o.getString(i).length;for(s>1&&(_+=s-1,h+=s-1);t>0&&a>0&&!this._isCharWordSeparator(o.loadCell(t-1,this._workCell));){o.loadCell(t-1,this._workCell);const e=this._workCell.getChars().length;0===this._workCell.getWidth()?(c++,t--):e>1&&(u+=e-1,a-=e-1),a--,t--}for(;i<o.length&&h+1<n.length&&!this._isCharWordSeparator(o.loadCell(i+1,this._workCell));){o.loadCell(i+1,this._workCell);const e=this._workCell.getChars().length;2===this._workCell.getWidth()?(d++,i++):e>1&&(_+=e-1,h+=e-1),h++,i++}}h++;let f=a+l-c+u,p=Math.min(this._bufferService.cols,h-a+c+d-u-_);if(t||""!==n.slice(a,h).trim()){if(i&&0===f&&32!==o.getCodePoint(0)){const t=r.lines.get(e[1]-1);if(t&&o.isWrapped&&32!==t.getCodePoint(this._bufferService.cols-1)){const t=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(t){const e=this._bufferService.cols-t.start;f-=e,p+=e}}}if(s&&f+p===this._bufferService.cols&&32!==o.getCodePoint(this._bufferService.cols-1)){const t=r.lines.get(e[1]+1);if((null==t?void 0:t.isWrapped)&&32!==t.getCodePoint(0)){const t=this._getWordAt([0,e[1]+1],!1,!1,!0);t&&(p+=t.length)}}return{start:f,length:p}}}_selectWordAt(e,t){const i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){const t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return 0!==e.getWidth()&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){const t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,f.getRangeLength)(i,this._bufferService.cols)}};g=s([r(3,c.IBufferService),r(4,c.ICoreService),r(5,l.IMouseService),r(6,c.IOptionsService),r(7,l.IRenderService),r(8,l.ICoreBrowserService)],g),t.SelectionService=g},4725:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ICharacterJoinerService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;const s=i(8343);t.ICharSizeService=(0,s.createDecorator)("CharSizeService"),t.ICoreBrowserService=(0,s.createDecorator)("CoreBrowserService"),t.IMouseService=(0,s.createDecorator)("MouseService"),t.IRenderService=(0,s.createDecorator)("RenderService"),t.ISelectionService=(0,s.createDecorator)("SelectionService"),t.ICharacterJoinerService=(0,s.createDecorator)("CharacterJoinerService")},6349:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CircularList=void 0;const s=i(8460);t.CircularList=class{constructor(e){this._maxLength=e,this.onDeleteEmitter=new s.EventEmitter,this.onInsertEmitter=new s.EventEmitter,this.onTrimEmitter=new s.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get onDelete(){return this.onDeleteEmitter.event}get onInsert(){return this.onInsertEmitter.event}get onTrim(){return this.onTrimEmitter.event}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;const t=new Array(e);for(let i=0;i<Math.min(e,this.length);i++)t[i]=this._array[this._getCyclicIndex(i)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){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)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...i){if(t){for(let i=e;i<this._length-t;i++)this._array[this._getCyclicIndex(i)]=this._array[this._getCyclicIndex(i+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let t=this._length-1;t>=e;t--)this._array[this._getCyclicIndex(t+i.length)]=this._array[this._getCyclicIndex(t)];for(let t=0;t<i.length;t++)this._array[this._getCyclicIndex(e+t)]=i[t];if(i.length&&this.onInsertEmitter.fire({index:e,amount:i.length}),this._length+i.length>this._maxLength){const e=this._length+i.length-this._maxLength;this._startIndex+=e,this._length=this._maxLength,this.onTrimEmitter.fire(e)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(let s=t-1;s>=0;s--)this.set(e+s+i,this.get(e+s));const s=e+t+i-this._length;if(s>0)for(this._length+=s;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let s=0;s<t;s++)this.set(e+s+i,this.get(e+s))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}}},1439:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t,i=5){if("object"!=typeof t)return t;const s=Array.isArray(t)?[]:{};for(const r in t)s[r]=i<=1?t[r]:t[r]&&e(t[r],i-1);return s}},8055:(e,t)=>{var i,s,r;function o(e){const t=e.toString(16);return t.length<2?"0"+t:t}function n(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=void 0,function(e){e.toCss=function(e,t,i,s){return void 0!==s?`#${o(e)}${o(t)}${o(i)}${o(s)}`:`#${o(e)}${o(t)}${o(i)}`},e.toRgba=function(e,t,i,s=255){return(e<<24|t<<16|i<<8|s)>>>0}}(i=t.channels||(t.channels={})),function(e){function t(e,t){const s=Math.round(255*t),[o,n,a]=r.toChannels(e.rgba);return{css:i.toCss(o,n,a,s),rgba:i.toRgba(o,n,a,s)}}e.blend=function(e,t){const s=(255&t.rgba)/255;if(1===s)return{css:t.css,rgba:t.rgba};const r=t.rgba>>24&255,o=t.rgba>>16&255,n=t.rgba>>8&255,a=e.rgba>>24&255,h=e.rgba>>16&255,l=e.rgba>>8&255,c=a+Math.round((r-a)*s),d=h+Math.round((o-h)*s),u=l+Math.round((n-l)*s);return{css:i.toCss(c,d,u),rgba:i.toRgba(c,d,u)}},e.isOpaque=function(e){return 255==(255&e.rgba)},e.ensureContrastRatio=function(e,t,i){const s=r.ensureContrastRatio(e.rgba,t.rgba,i);if(s)return r.toColor(s>>24&255,s>>16&255,s>>8&255)},e.opaque=function(e){const t=(255|e.rgba)>>>0,[s,o,n]=r.toChannels(t);return{css:i.toCss(s,o,n),rgba:t}},e.opacity=t,e.multiplyOpacity=function(e,i){return t(e,(255&e.rgba)*i/255)},e.toColorRGB=function(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}}(t.color||(t.color={})),(t.css||(t.css={})).toColor=function(e){if(e.match(/#[0-9a-f]{3,8}/i))switch(e.length){case 4:{const t=parseInt(e.slice(1,2).repeat(2),16),i=parseInt(e.slice(2,3).repeat(2),16),s=parseInt(e.slice(3,4).repeat(2),16);return r.toColor(t,i,s)}case 5:{const t=parseInt(e.slice(1,2).repeat(2),16),i=parseInt(e.slice(2,3).repeat(2),16),s=parseInt(e.slice(3,4).repeat(2),16),o=parseInt(e.slice(4,5).repeat(2),16);return r.toColor(t,i,s,o)}case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}const t=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(t){const e=parseInt(t[1]),i=parseInt(t[2]),s=parseInt(t[3]),o=Math.round(255*(void 0===t[5]?1:parseFloat(t[5])));return r.toColor(e,i,s,o)}throw new Error("css.toColor: Unsupported css format")},function(e){function t(e,t,i){const s=e/255,r=t/255,o=i/255;return.2126*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(s=t.rgb||(t.rgb={})),function(e){function t(e,t,i){const r=e>>24&255,o=e>>16&255,a=e>>8&255;let h=t>>24&255,l=t>>16&255,c=t>>8&255,d=n(s.relativeLuminance2(h,l,c),s.relativeLuminance2(r,o,a));for(;d<i&&(h>0||l>0||c>0);)h-=Math.max(0,Math.ceil(.1*h)),l-=Math.max(0,Math.ceil(.1*l)),c-=Math.max(0,Math.ceil(.1*c)),d=n(s.relativeLuminance2(h,l,c),s.relativeLuminance2(r,o,a));return(h<<24|l<<16|c<<8|255)>>>0}function r(e,t,i){const r=e>>24&255,o=e>>16&255,a=e>>8&255;let h=t>>24&255,l=t>>16&255,c=t>>8&255,d=n(s.relativeLuminance2(h,l,c),s.relativeLuminance2(r,o,a));for(;d<i&&(h<255||l<255||c<255);)h=Math.min(255,h+Math.ceil(.1*(255-h))),l=Math.min(255,l+Math.ceil(.1*(255-l))),c=Math.min(255,c+Math.ceil(.1*(255-c))),d=n(s.relativeLuminance2(h,l,c),s.relativeLuminance2(r,o,a));return(h<<24|l<<16|c<<8|255)>>>0}e.ensureContrastRatio=function(e,i,o){const a=s.relativeLuminance(e>>8),h=s.relativeLuminance(i>>8);if(n(a,h)<o){if(h<a){const h=t(e,i,o),l=n(a,s.relativeLuminance(h>>8));if(l<o){const t=r(e,i,o);return l>n(a,s.relativeLuminance(t>>8))?h:t}return h}const l=r(e,i,o),c=n(a,s.relativeLuminance(l>>8));if(c<o){const r=t(e,i,o);return c>n(a,s.relativeLuminance(r>>8))?l:r}return l}},e.reduceLuminance=t,e.increaseLuminance=r,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},e.toColor=function(e,t,s,r){return{css:i.toCss(e,t,s,r),rgba:i.toRgba(e,t,s,r)}}}(r=t.rgba||(t.rgba={})),t.toPaddedHex=o,t.contrastRatio=n},8969:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreTerminal=void 0;const s=i(844),r=i(2585),o=i(4348),n=i(7866),a=i(744),h=i(7302),l=i(6975),c=i(8460),d=i(1753),u=i(3730),_=i(1480),f=i(7994),p=i(9282),v=i(5435),g=i(5981),m=i(2660);let S=!1;class b extends s.Disposable{constructor(e){super(),this._onBinary=new c.EventEmitter,this._onData=new c.EventEmitter,this._onLineFeed=new c.EventEmitter,this._onResize=new c.EventEmitter,this._onScroll=new c.EventEmitter,this._onWriteParsed=new c.EventEmitter,this._instantiationService=new o.InstantiationService,this.optionsService=new h.OptionsService(e),this._instantiationService.setService(r.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(a.BufferService)),this._instantiationService.setService(r.IBufferService,this._bufferService),this._logService=this._instantiationService.createInstance(n.LogService),this._instantiationService.setService(r.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(l.CoreService,(()=>this.scrollToBottom()))),this._instantiationService.setService(r.ICoreService,this.coreService),this.coreMouseService=this._instantiationService.createInstance(d.CoreMouseService),this._instantiationService.setService(r.ICoreMouseService,this.coreMouseService),this._dirtyRowService=this._instantiationService.createInstance(u.DirtyRowService),this._instantiationService.setService(r.IDirtyRowService,this._dirtyRowService),this.unicodeService=this._instantiationService.createInstance(_.UnicodeService),this._instantiationService.setService(r.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(f.CharsetService),this._instantiationService.setService(r.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(m.OscLinkService),this._instantiationService.setService(r.IOscLinkService,this._oscLinkService),this._inputHandler=new v.InputHandler(this._bufferService,this._charsetService,this.coreService,this._dirtyRowService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService),this.register((0,c.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,c.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,c.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,c.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.optionsService.onOptionChange((e=>this._updateOptions(e)))),this.register(this._bufferService.onScroll((e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._dirtyRowService.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((e=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._dirtyRowService.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=new g.WriteBuffer(((e,t)=>this._inputHandler.parse(e,t))),this.register((0,c.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onBinary(){return this._onBinary.event}get onData(){return this._onData.event}get onLineFeed(){return this._onLineFeed.event}get onResize(){return this._onResize.event}get onWriteParsed(){return this._onWriteParsed.event}get onScroll(){return this._onScrollApi||(this._onScrollApi=new c.EventEmitter,this.register(this._onScroll.event((e=>{var t;null===(t=this._onScrollApi)||void 0===t||t.fire(e.position)})))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(const t in e)this.optionsService.options[t]=e[t]}dispose(){var e;this._isDisposed||(super.dispose(),null===(e=this._windowsMode)||void 0===e||e.dispose(),this._windowsMode=void 0)}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=r.LogLevelEnum.WARN&&!S&&(this._logService.warn("writeSync is unreliable and will be removed soon."),S=!0),this._writeBuffer.writeSync(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,a.MINIMUM_COLS),t=Math.max(t,a.MINIMUM_ROWS),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t,i){this._bufferService.scrollLines(e,t,i)}scrollPages(e){this._bufferService.scrollPages(e)}scrollToTop(){this._bufferService.scrollToTop()}scrollToBottom(){this._bufferService.scrollToBottom()}scrollToLine(e){this._bufferService.scrollToLine(e)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_updateOptions(e){var t;switch(e){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():(null===(t=this._windowsMode)||void 0===t||t.dispose(),this._windowsMode=void 0)}}_enableWindowsMode(){if(!this._windowsMode){const e=[];e.push(this.onLineFeed(p.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},(()=>((0,p.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsMode={dispose:()=>{for(const t of e)t.dispose()}}}}}t.CoreTerminal=b},8460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forwardEvent=t.EventEmitter=void 0,t.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=e=>(this._listeners.push(e),{dispose:()=>{if(!this._disposed)for(let t=0;t<this._listeners.length;t++)if(this._listeners[t]===e)return void this._listeners.splice(t,1)}})),this._event}fire(e,t){const i=[];for(let e=0;e<this._listeners.length;e++)i.push(this._listeners[e]);for(let s=0;s<i.length;s++)i[s].call(void 0,e,t)}dispose(){this._listeners&&(this._listeners.length=0),this._disposed=!0}},t.forwardEvent=function(e,t){return e((e=>t.fire(e)))}},5435:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;const s=i(2584),r=i(7116),o=i(2015),n=i(844),a=i(482),h=i(8437),l=i(8460),c=i(643),d=i(511),u=i(3734),_=i(2585),f=i(6242),p=i(6351),v=i(5941),g={"(":0,")":1,"*":2,"+":3,"-":1,".":2},m=131072;function S(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var b;!function(e){e[e.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",e[e.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(b=t.WindowsOptionsReportType||(t.WindowsOptionsReportType={}));class C extends n.Disposable{constructor(e,t,i,n,c,u,_,v,g,m=new o.EscapeSequenceParser){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._dirtyRowService=n,this._logService=c,this._optionsService=u,this._oscLinkService=_,this._coreMouseService=v,this._unicodeService=g,this._parser=m,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new a.StringToUtf32,this._utf8Decoder=new a.Utf8ToUtf32,this._workCell=new d.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=new l.EventEmitter,this._onRequestRefreshRows=new l.EventEmitter,this._onRequestReset=new l.EventEmitter,this._onRequestSendFocus=new l.EventEmitter,this._onRequestSyncScrollBar=new l.EventEmitter,this._onRequestWindowsOptionsReport=new l.EventEmitter,this._onA11yChar=new l.EventEmitter,this._onA11yTab=new l.EventEmitter,this._onCursorMove=new l.EventEmitter,this._onLineFeed=new l.EventEmitter,this._onScroll=new l.EventEmitter,this._onTitleChange=new l.EventEmitter,this._onColor=new l.EventEmitter,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((e=>this._activeBuffer=e.activeBuffer))),this._parser.setCsiHandlerFallback(((e,t)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(e),params:t.toArray()})})),this._parser.setEscHandlerFallback((e=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(e)})})),this._parser.setExecuteHandlerFallback((e=>{this._logService.debug("Unknown EXECUTE code: ",{code:e})})),this._parser.setOscHandlerFallback(((e,t,i)=>{this._logService.debug("Unknown OSC code: ",{identifier:e,action:t,data:i})})),this._parser.setDcsHandlerFallback(((e,t,i)=>{"HOOK"===t&&(i=i.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(e),action:t,payload:i})})),this._parser.setPrintHandler(((e,t,i)=>this.print(e,t,i))),this._parser.registerCsiHandler({final:"@"},(e=>this.insertChars(e))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(e=>this.scrollLeft(e))),this._parser.registerCsiHandler({final:"A"},(e=>this.cursorUp(e))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(e=>this.scrollRight(e))),this._parser.registerCsiHandler({final:"B"},(e=>this.cursorDown(e))),this._parser.registerCsiHandler({final:"C"},(e=>this.cursorForward(e))),this._parser.registerCsiHandler({final:"D"},(e=>this.cursorBackward(e))),this._parser.registerCsiHandler({final:"E"},(e=>this.cursorNextLine(e))),this._parser.registerCsiHandler({final:"F"},(e=>this.cursorPrecedingLine(e))),this._parser.registerCsiHandler({final:"G"},(e=>this.cursorCharAbsolute(e))),this._parser.registerCsiHandler({final:"H"},(e=>this.cursorPosition(e))),this._parser.registerCsiHandler({final:"I"},(e=>this.cursorForwardTab(e))),this._parser.registerCsiHandler({final:"J"},(e=>this.eraseInDisplay(e,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(e=>this.eraseInDisplay(e,!0))),this._parser.registerCsiHandler({final:"K"},(e=>this.eraseInLine(e,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(e=>this.eraseInLine(e,!0))),this._parser.registerCsiHandler({final:"L"},(e=>this.insertLines(e))),this._parser.registerCsiHandler({final:"M"},(e=>this.deleteLines(e))),this._parser.registerCsiHandler({final:"P"},(e=>this.deleteChars(e))),this._parser.registerCsiHandler({final:"S"},(e=>this.scrollUp(e))),this._parser.registerCsiHandler({final:"T"},(e=>this.scrollDown(e))),this._parser.registerCsiHandler({final:"X"},(e=>this.eraseChars(e))),this._parser.registerCsiHandler({final:"Z"},(e=>this.cursorBackwardTab(e))),this._parser.registerCsiHandler({final:"`"},(e=>this.charPosAbsolute(e))),this._parser.registerCsiHandler({final:"a"},(e=>this.hPositionRelative(e))),this._parser.registerCsiHandler({final:"b"},(e=>this.repeatPrecedingCharacter(e))),this._parser.registerCsiHandler({final:"c"},(e=>this.sendDeviceAttributesPrimary(e))),this._parser.registerCsiHandler({prefix:">",final:"c"},(e=>this.sendDeviceAttributesSecondary(e))),this._parser.registerCsiHandler({final:"d"},(e=>this.linePosAbsolute(e))),this._parser.registerCsiHandler({final:"e"},(e=>this.vPositionRelative(e))),this._parser.registerCsiHandler({final:"f"},(e=>this.hVPosition(e))),this._parser.registerCsiHandler({final:"g"},(e=>this.tabClear(e))),this._parser.registerCsiHandler({final:"h"},(e=>this.setMode(e))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(e=>this.setModePrivate(e))),this._parser.registerCsiHandler({final:"l"},(e=>this.resetMode(e))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(e=>this.resetModePrivate(e))),this._parser.registerCsiHandler({final:"m"},(e=>this.charAttributes(e))),this._parser.registerCsiHandler({final:"n"},(e=>this.deviceStatus(e))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(e=>this.deviceStatusPrivate(e))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(e=>this.softReset(e))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(e=>this.setCursorStyle(e))),this._parser.registerCsiHandler({final:"r"},(e=>this.setScrollRegion(e))),this._parser.registerCsiHandler({final:"s"},(e=>this.saveCursor(e))),this._parser.registerCsiHandler({final:"t"},(e=>this.windowOptions(e))),this._parser.registerCsiHandler({final:"u"},(e=>this.restoreCursor(e))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(e=>this.insertColumns(e))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(e=>this.deleteColumns(e))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(e=>this.selectProtected(e))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(e=>this.requestMode(e,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(e=>this.requestMode(e,!1))),this._parser.setExecuteHandler(s.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(s.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(s.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(s.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(s.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(s.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(s.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(s.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(s.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(s.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(s.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(s.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new f.OscHandler((e=>(this.setTitle(e),this.setIconName(e),!0)))),this._parser.registerOscHandler(1,new f.OscHandler((e=>this.setIconName(e)))),this._parser.registerOscHandler(2,new f.OscHandler((e=>this.setTitle(e)))),this._parser.registerOscHandler(4,new f.OscHandler((e=>this.setOrReportIndexedColor(e)))),this._parser.registerOscHandler(8,new f.OscHandler((e=>this.setHyperlink(e)))),this._parser.registerOscHandler(10,new f.OscHandler((e=>this.setOrReportFgColor(e)))),this._parser.registerOscHandler(11,new f.OscHandler((e=>this.setOrReportBgColor(e)))),this._parser.registerOscHandler(12,new f.OscHandler((e=>this.setOrReportCursorColor(e)))),this._parser.registerOscHandler(104,new f.OscHandler((e=>this.restoreIndexedColor(e)))),this._parser.registerOscHandler(110,new f.OscHandler((e=>this.restoreFgColor(e)))),this._parser.registerOscHandler(111,new f.OscHandler((e=>this.restoreBgColor(e)))),this._parser.registerOscHandler(112,new f.OscHandler((e=>this.restoreCursorColor(e)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const e in r.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:e},(()=>this.selectCharset("("+e))),this._parser.registerEscHandler({intermediates:")",final:e},(()=>this.selectCharset(")"+e))),this._parser.registerEscHandler({intermediates:"*",final:e},(()=>this.selectCharset("*"+e))),this._parser.registerEscHandler({intermediates:"+",final:e},(()=>this.selectCharset("+"+e))),this._parser.registerEscHandler({intermediates:"-",final:e},(()=>this.selectCharset("-"+e))),this._parser.registerEscHandler({intermediates:".",final:e},(()=>this.selectCharset("."+e))),this._parser.registerEscHandler({intermediates:"/",final:e},(()=>this.selectCharset("/"+e)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((e=>(this._logService.error("Parsing error: ",e),e))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((e,t)=>this.requestStatusString(e,t))))}getAttrData(){return this._curAttrData}get onRequestBell(){return this._onRequestBell.event}get onRequestRefreshRows(){return this._onRequestRefreshRows.event}get onRequestReset(){return this._onRequestReset.event}get onRequestSendFocus(){return this._onRequestSendFocus.event}get onRequestSyncScrollBar(){return this._onRequestSyncScrollBar.event}get onRequestWindowsOptionsReport(){return this._onRequestWindowsOptionsReport.event}get onA11yChar(){return this._onA11yChar.event}get onA11yTab(){return this._onA11yTab.event}get onCursorMove(){return this._onCursorMove.event}get onLineFeed(){return this._onLineFeed.event}get onScroll(){return this._onScroll.event}get onTitleChange(){return this._onTitleChange.event}get onColor(){return this._onColor.event}dispose(){super.dispose()}_preserveStack(e,t,i,s){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=s}_logSlowResolvingAsync(e){this._logService.logLevel<=_.LogLevelEnum.WARN&&Promise.race([e,new Promise(((e,t)=>setTimeout((()=>t("#SLOW_TIMEOUT")),5e3)))]).catch((e=>{if("#SLOW_TIMEOUT"!==e)throw e;console.warn("async parser handler taking longer than 5000 ms")}))}parse(e,t){let i,s=this._activeBuffer.x,r=this._activeBuffer.y,o=0;const n=this._parseStack.paused;if(n){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;s=this._parseStack.cursorStartX,r=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>m&&(o=this._parseStack.position+m)}if(this._logService.logLevel<=_.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+("string"==typeof e?` "${e}"`:` "${Array.prototype.map.call(e,(e=>String.fromCharCode(e))).join("")}"`),"string"==typeof e?e.split("").map((e=>e.charCodeAt(0))):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<m&&(this._parseBuffer=new Uint32Array(Math.min(e.length,m))),n||this._dirtyRowService.clearRange(),e.length>m)for(let t=o;t<e.length;t+=m){const o=t+m<e.length?t+m:e.length,n="string"==typeof e?this._stringDecoder.decode(e.substring(t,o),this._parseBuffer):this._utf8Decoder.decode(e.subarray(t,o),this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,n))return this._preserveStack(s,r,n,t),this._logSlowResolvingAsync(i),i}else if(!n){const t="string"==typeof e?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,t))return this._preserveStack(s,r,t,0),this._logSlowResolvingAsync(i),i}this._activeBuffer.x===s&&this._activeBuffer.y===r||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)}print(e,t,i){let s,r;const o=this._charsetService.charset,n=this._optionsService.rawOptions.screenReaderMode,h=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,d=this._coreService.modes.insertMode,u=this._curAttrData;let _=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&i-t>0&&2===_.getWidth(this._activeBuffer.x-1)&&_.setCellFromCodePoint(this._activeBuffer.x-1,0,1,u.fg,u.bg,u.extended);for(let f=t;f<i;++f){if(s=e[f],r=this._unicodeService.wcwidth(s),s<127&&o){const e=o[String.fromCharCode(s)];e&&(s=e.charCodeAt(0))}if(n&&this._onA11yChar.fire((0,a.stringFromCodePoint)(s)),void 0!==this._currentLinkId&&this._oscLinkService.addLineToLink(this._currentLinkId,this._activeBuffer.ybase+this._activeBuffer.y),r||!this._activeBuffer.x){if(this._activeBuffer.x+r-1>=h)if(l){for(;this._activeBuffer.x<h;)_.setCellFromCodePoint(this._activeBuffer.x++,0,1,u.fg,u.bg,u.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),_=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=h-1,2===r)continue;if(d&&(_.insertCells(this._activeBuffer.x,r,this._activeBuffer.getNullCell(u),u),2===_.getWidth(h-1)&&_.setCellFromCodePoint(h-1,c.NULL_CELL_CODE,c.NULL_CELL_WIDTH,u.fg,u.bg,u.extended)),_.setCellFromCodePoint(this._activeBuffer.x++,s,r,u.fg,u.bg,u.extended),r>0)for(;--r;)_.setCellFromCodePoint(this._activeBuffer.x++,0,0,u.fg,u.bg,u.extended)}else _.getWidth(this._activeBuffer.x-1)?_.addCodepointToCell(this._activeBuffer.x-1,s):_.addCodepointToCell(this._activeBuffer.x-2,s)}i-t>0&&(_.loadCell(this._activeBuffer.x-1,this._workCell),2===this._workCell.getWidth()||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),this._activeBuffer.x<h&&i-t>0&&0===_.getWidth(this._activeBuffer.x)&&!_.hasContent(this._activeBuffer.x)&&_.setCellFromCodePoint(this._activeBuffer.x,0,1,u.fg,u.bg,u.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return"t"!==e.final||e.prefix||e.intermediates?this._parser.registerCsiHandler(e,t):this._parser.registerCsiHandler(e,(e=>!S(e.params[0],this._optionsService.rawOptions.windowOptions)||t(e)))}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new p.DcsHandler(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new f.OscHandler(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(0===this._activeBuffer.x&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(null===(e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))||void 0===e?void 0:e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){const t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){const t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){const t=e.params[0];return 0===t?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===t&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){const t=e.params[0];return 1===t&&(this._curAttrData.bg|=536870912),2!==t&&0!==t||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,s=!1,r=!1){const o=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);o.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),r),s&&(o.isWrapped=!1)}_resetBufferLine(e,t=!1){const i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1}eraseInDisplay(e,t=!1){let i;switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowService.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,t);i<this._bufferService.rows;i++)this._resetBufferLine(i,t);this._dirtyRowService.markDirty(i);break;case 1:for(i=this._activeBuffer.y,this._dirtyRowService.markDirty(i),this._eraseInBufferLine(i,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowService.markDirty(0);break;case 2:for(i=this._bufferService.rows,this._dirtyRowService.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowService.markDirty(0);break;case 3:const e=this._activeBuffer.lines.length-this._bufferService.rows;e>0&&(this._activeBuffer.lines.trimStart(e),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-e,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-e,0),this._onScroll.fire(0))}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const i=this._activeBuffer.ybase+this._activeBuffer.y,s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-s+1;for(;t--;)this._activeBuffer.lines.splice(r-1,1),this._activeBuffer.lines.splice(i,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const i=this._activeBuffer.ybase+this._activeBuffer.y;let s;for(s=this._bufferService.rows-1-this._activeBuffer.scrollBottom,s=this._bufferService.rows-1+this._activeBuffer.ybase-s;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(s,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();const t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();const t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(h.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){const i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){const i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){const i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const t=e.params[0]||1;for(let e=this._activeBuffer.scrollTop;e<=this._activeBuffer.scrollBottom;++e){const i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();const t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){if(!this._parser.precedingCodepoint)return!0;const t=e.params[0]||1,i=new Uint32Array(t);for(let e=0;e<t;++e)i[e]=this._parser.precedingCodepoint;return this.print(i,0,i.length),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(s.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(s.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(s.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(s.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(s.C0.ESC+"[>83;40003;0c")),!0}_is(e){return 0===(this._optionsService.rawOptions.termName+"").indexOf(e)}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,r.DEFAULT_CHARSET),this._charsetService.setgCharset(1,r.DEFAULT_CHARSET),this._charsetService.setgCharset(2,r.DEFAULT_CHARSET),this._charsetService.setgCharset(3,r.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.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:this._optionsService.options.cursorBlink=!0;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,this._onRequestSendFocus.fire();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 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";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}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.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:this._optionsService.options.cursorBlink=!1;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:case 1016: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(),1049===e.params[t]&&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}return!0}requestMode(e,t){const i=this._coreService.decPrivateModes,{activeProtocol:r,activeEncoding:o}=this._coreMouseService,n=this._coreService,{buffers:a,cols:h}=this._bufferService,{active:l,alt:c}=a,d=this._optionsService.rawOptions,u=e=>e?1:2,_=e.params[0];return f=_,p=t?2===_?3:4===_?u(n.modes.insertMode):12===_?4:20===_?u(d.convertEol):0:1===_?u(i.applicationCursorKeys):3===_?d.windowOptions.setWinLines?80===h?2:132===h?1:0:0:6===_?u(i.origin):7===_?u(i.wraparound):8===_?3:9===_?u("X10"===r):12===_?u(d.cursorBlink):25===_?u(!n.isCursorHidden):45===_?u(i.reverseWraparound):66===_?u(i.applicationKeypad):1e3===_?u("VT200"===r):1002===_?u("DRAG"===r):1003===_?u("ANY"===r):1004===_?u(i.sendFocus):1005===_?4:1006===_?u("SGR"===o):1015===_?4:1016===_?u("SGR_PIXELS"===o):1048===_?1:47===_||1047===_||1049===_?u(l===c):2004===_?u(i.bracketedPasteMode):0,n.triggerDataEvent(`${s.C0.ESC}[${t?"":"?"}${f};${p}$y`),!0;var f,p}_updateAttrColor(e,t,i,s,r){return 2===t?(e|=50331648,e&=-16777216,e|=u.AttributeData.fromColorRGB([i,s,r])):5===t&&(e&=-50331904,e|=33554432|255&i),e}_extractColor(e,t,i){const s=[0,0,-1,0,0,0];let r=0,o=0;do{if(s[o+r]=e.params[t+o],e.hasSubParams(t+o)){const i=e.getSubParams(t+o);let n=0;do{5===s[1]&&(r=1),s[o+n+1+r]=i[n]}while(++n<i.length&&n+o+1+r<s.length);break}if(5===s[1]&&o+r>=2||2===s[1]&&o+r>=5)break;s[1]&&(r=1)}while(++o+t<e.length&&o+r<s.length);for(let e=2;e<s.length;++e)-1===s[e]&&(s[e]=0);switch(s[0]){case 38:i.fg=this._updateAttrColor(i.fg,s[1],s[3],s[4],s[5]);break;case 48:i.bg=this._updateAttrColor(i.bg,s[1],s[3],s[4],s[5]);break;case 58:i.extended=i.extended.clone(),i.extended.underlineColor=this._updateAttrColor(i.extended.underlineColor,s[1],s[3],s[4],s[5])}return o}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,0===e&&(t.fg&=-268435457),t.updateExtended()}charAttributes(e){if(1===e.length&&0===e.params[0])return this._curAttrData.fg=h.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=h.DEFAULT_ATTR_DATA.bg,!0;const t=e.length;let i;const s=this._curAttrData;for(let r=0;r<t;r++)i=e.params[r],i>=30&&i<=37?(s.fg&=-50331904,s.fg|=16777216|i-30):i>=40&&i<=47?(s.bg&=-50331904,s.bg|=16777216|i-40):i>=90&&i<=97?(s.fg&=-50331904,s.fg|=16777224|i-90):i>=100&&i<=107?(s.bg&=-50331904,s.bg|=16777224|i-100):0===i?(s.fg=h.DEFAULT_ATTR_DATA.fg,s.bg=h.DEFAULT_ATTR_DATA.bg):1===i?s.fg|=134217728:3===i?s.bg|=67108864:4===i?(s.fg|=268435456,this._processUnderline(e.hasSubParams(r)?e.getSubParams(r)[0]:1,s)):5===i?s.fg|=536870912:7===i?s.fg|=67108864:8===i?s.fg|=1073741824:9===i?s.fg|=2147483648:2===i?s.bg|=134217728:21===i?this._processUnderline(2,s):22===i?(s.fg&=-134217729,s.bg&=-134217729):23===i?s.bg&=-67108865:24===i?(s.fg&=-268435457,this._processUnderline(0,s)):25===i?s.fg&=-536870913:27===i?s.fg&=-67108865:28===i?s.fg&=-1073741825:29===i?s.fg&=2147483647:39===i?(s.fg&=-67108864,s.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):49===i?(s.bg&=-67108864,s.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):38===i||48===i||58===i?r+=this._extractColor(e,r,s):59===i?(s.extended=s.extended.clone(),s.extended.underlineColor=-1,s.updateExtended()):100===i?(s.fg&=-67108864,s.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,s.bg&=-67108864,s.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${s.C0.ESC}[0n`);break;case 6:const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${s.C0.ESC}[${e};${t}R`)}return!0}deviceStatusPrivate(e){if(6===e.params[0]){const e=this._activeBuffer.y+1,t=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${s.C0.ESC}[?${e};${t}R`)}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){const t=e.params[0]||1;switch(t){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"}const i=t%2==1;return this._optionsService.options.cursorBlink=i,!0}setScrollRegion(e){const t=e.params[0]||1;let i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||0===i)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!S(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;const t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:2!==t&&this._onRequestWindowsOptionsReport.fire(b.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(b.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${s.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:0!==t&&2!==t||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==t&&1!==t||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==t&&2!==t||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==t&&1!==t||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){const t=[],i=e.split(";");for(;i.length>1;){const e=i.shift(),s=i.shift();if(/^\d+$/.exec(e)){const i=parseInt(e);if(0<=i&&i<256)if("?"===s)t.push({type:0,index:i});else{const e=(0,v.parseColor)(s);e&&t.push({type:1,index:i,color:e})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){const t=e.split(";");return!(t.length<2)&&(t[1]?this._createHyperlink(t[0],t[1]):!t[0]&&this._finishHyperlink())}_createHyperlink(e,t){void 0!==this._currentLinkId&&this._finishHyperlink();const i=e.split(":");let s;const r=i.findIndex((e=>e.startsWith("id=")));return-1!==r&&(s=i[r].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._currentLinkId=this._oscLinkService.registerLink({id:s,uri:t}),this._curAttrData.extended.urlId=this._currentLinkId,this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),this._currentLinkId=void 0,!0}_setOrReportSpecialColor(e,t){const i=e.split(";");for(let e=0;e<i.length&&!(t>=this._specialColors.length);++e,++t)if("?"===i[e])this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{const s=(0,v.parseColor)(i[e]);s&&this._onColor.fire([{type:1,index:this._specialColors[t],color:s}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;const t=[],i=e.split(";");for(let e=0;e<i.length;++e)if(/^\d+$/.exec(i[e])){const s=parseInt(i[e]);0<=s&&s<256&&t.push({type:2,index:s})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,r.DEFAULT_CHARSET),!0}selectCharset(e){return 2!==e.length?(this.selectDefaultCharset(),!0):("/"===e[0]||this._charsetService.setgCharset(g[e[0]],r.CHARSETS[e[1]]||r.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){const e=new d.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){const i=this._activeBuffer.ybase+this._activeBuffer.y+t,s=this._activeBuffer.lines.get(i);s&&(s.fill(e),s.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){const i=this._bufferService.buffer,r=this._optionsService.rawOptions;return(e=>(this._coreService.triggerDataEvent(`${s.C0.ESC}${e}${s.C0.ESC}\\`),!0))('"q'===e?`P1$r${this._curAttrData.isProtected()?1:0}"q`:'"p'===e?'P1$r61;1"p':"r"===e?`P1$r${i.scrollTop+1};${i.scrollBottom+1}r`:"m"===e?"P1$r0m":" q"===e?`P1$r${{block:2,underline:4,bar:6}[r.cursorStyle]-(r.cursorBlink?1:0)} q`:"P0$r")}}t.InputHandler=C},844:(e,t)=>{function i(e){for(const t of e)t.dispose();e.length=0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.toDisposable=t.Disposable=void 0,t.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const e of this._disposables)e.dispose();this._disposables.length=0}register(e){return this._disposables.push(e),e}unregister(e){const t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)}},t.toDisposable=function(e){return{dispose:e}},t.disposeArray=i,t.getDisposeArrayDisposable=function(e){return{dispose:()=>i(e)}}},1505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FourKeyMap=t.TwoKeyMap=void 0;class i{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}}t.TwoKeyMap=i,t.FourKeyMap=class{constructor(){this._data=new i}set(e,t,s,r,o){this._data.get(e,t)||this._data.set(e,t,new i),this._data.get(e,t).set(s,r,o)}get(e,t,i,s){var r;return null===(r=this._data.get(e,t))||void 0===r?void 0:r.get(i,s)}clear(){this._data.clear()}}},6114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.isSafari=t.isLegacyEdge=t.isFirefox=void 0;const i="undefined"==typeof navigator,s=i?"node":navigator.userAgent,r=i?"node":navigator.platform;t.isFirefox=s.includes("Firefox"),t.isLegacyEdge=s.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(s),t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(r),t.isIpad="iPad"===r,t.isIphone="iPhone"===r,t.isWindows=["Windows","Win16","Win32","WinCE"].includes(r),t.isLinux=r.indexOf("Linux")>=0},6106:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SortedList=void 0;let i=0;t.SortedList=class{constructor(e){this._getKey=e,this._array=[]}clear(){this._array.length=0}insert(e){0!==this._array.length?(i=this._search(this._getKey(e),0,this._array.length-1),this._array.splice(i,0,e)):this._array.push(e)}delete(e){if(0===this._array.length)return!1;const t=this._getKey(e);if(void 0===t)return!1;if(i=this._search(t,0,this._array.length-1),-1===i)return!1;if(this._getKey(this._array[i])!==t)return!1;do{if(this._array[i]===e)return this._array.splice(i,1),!0}while(++i<this._array.length&&this._getKey(this._array[i])===t);return!1}*getKeyIterator(e){if(0!==this._array.length&&(i=this._search(e,0,this._array.length-1),!(i<0||i>=this._array.length)&&this._getKey(this._array[i])===e))do{yield this._array[i]}while(++i<this._array.length&&this._getKey(this._array[i])===e)}forEachByKey(e,t){if(0!==this._array.length&&(i=this._search(e,0,this._array.length-1),!(i<0||i>=this._array.length)&&this._getKey(this._array[i])===e))do{t(this._array[i])}while(++i<this._array.length&&this._getKey(this._array[i])===e)}values(){return this._array.values()}_search(e,t,i){if(i<t)return t;let s=Math.floor((t+i)/2);const r=this._getKey(this._array[s]);if(r>e)return this._search(e,t,s-1);if(r<e)return this._search(e,s+1,i);for(;s>0&&this._getKey(this._array[s-1])===e;)s--;return s}}},8273:(e,t)=>{function i(e,t,i=0,s=e.length){if(i>=e.length)return e;i=(e.length+i)%e.length,s=s>=e.length?e.length:(e.length+s)%e.length;for(let r=i;r<s;++r)e[r]=t;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=t.fillFallback=t.fill=void 0,t.fill=function(e,t,s,r){return e.fill?e.fill(t,s,r):i(e,t,s,r)},t.fillFallback=i,t.concat=function(e,t){const i=new e.constructor(e.length+t.length);return i.set(e),i.set(t,e.length),i}},9282:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateWindowsModeWrappedState=void 0;const s=i(643);t.updateWindowsModeWrappedState=function(e){const t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1),i=null==t?void 0:t.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&i&&(r.isWrapped=i[s.CHAR_DATA_CODE_INDEX]!==s.NULL_CELL_CODE&&i[s.CHAR_DATA_CODE_INDEX]!==s.WHITESPACE_CELL_CODE)}},3734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;class i{constructor(){this.fg=0,this.bg=0,this.extended=new s}static toColorRGB(e){return[e>>>16&255,e>>>8&255,255&e]}static fromColorRGB(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]}clone(){const e=new i;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&0!==this.extended.underlineStyle?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return 50331648==(50331648&this.fg)}isBgRGB(){return 50331648==(50331648&this.bg)}isFgPalette(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)}isBgPalette(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)}isFgDefault(){return 0==(50331648&this.fg)}isBgDefault(){return 0==(50331648&this.bg)}isAttributeDefault(){return 0===this.fg&&0===this.bg}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){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()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}t.AttributeData=i;class s{constructor(e=0,t=0){this._ext=0,this._urlId=0,this._ext=e,this._urlId=t}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(e){this._ext=e}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(e){this._ext&=-469762049,this._ext|=e<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(e){this._ext&=-67108864,this._ext|=67108863&e}get urlId(){return this._urlId}set urlId(e){this._urlId=e}clone(){return new s(this._ext,this._urlId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId}}t.ExtendedAttrs=s},9092:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferStringIterator=t.Buffer=t.MAX_BUFFER_SIZE=void 0;const s=i(6349),r=i(8437),o=i(511),n=i(643),a=i(4634),h=i(4863),l=i(7116),c=i(3734);t.MAX_BUFFER_SIZE=4294967295,t.Buffer=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=r.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=o.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]),this._whitespaceCell=o.CellData.fromCharData([0,n.WHITESPACE_CELL_CHAR,n.WHITESPACE_CELL_WIDTH,n.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new s.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(e,t){return new r.BufferLine(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;const i=e+this._optionsService.rawOptions.scrollback;return i>t.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:i}fillViewportRows(e){if(0===this.lines.length){void 0===e&&(e=r.DEFAULT_ATTR_DATA);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new s.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){const i=this.getNullCell(r.DEFAULT_ATTR_DATA),s=this._getCorrectBufferLength(t);if(s>this.lines.maxLength&&(this.lines.maxLength=s),this.lines.length>0){if(this._cols<e)for(let t=0;t<this.lines.length;t++)this.lines.get(t).resize(e,i);let o=0;if(this._rows<t)for(let s=this._rows;s<t;s++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new r.BufferLine(e,i)):this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new r.BufferLine(e,i)));else for(let e=this._rows;e>t;e--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(s<this.lines.maxLength){const e=this.lines.length-s;e>0&&(this.lines.trimStart(e),this.ybase=Math.max(this.ybase-e,0),this.ydisp=Math.max(this.ydisp-e,0),this.savedY=Math.max(this.savedY-e,0)),this.lines.maxLength=s}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let t=0;t<this.lines.length;t++)this.lines.get(t).resize(e,i);this._cols=e,this._rows=t}get _isReflowEnabled(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){const i=(0,a.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(r.DEFAULT_ATTR_DATA));if(i.length>0){const s=(0,a.reflowLargerCreateNewLayout)(this.lines,i);(0,a.reflowLargerApplyNewLayout)(this.lines,s.layout),this._reflowLargerAdjustViewport(e,t,s.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){const s=this.getNullCell(r.DEFAULT_ATTR_DATA);let o=i;for(;o-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new r.BufferLine(e,s))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-i,0)}_reflowSmaller(e,t){const i=this.getNullCell(r.DEFAULT_ATTR_DATA),s=[];let o=0;for(let n=this.lines.length-1;n>=0;n--){let h=this.lines.get(n);if(!h||!h.isWrapped&&h.getTrimmedLength()<=e)continue;const l=[h];for(;h.isWrapped&&n>0;)h=this.lines.get(--n),l.unshift(h);const c=this.ybase+this.y;if(c>=n&&c<n+l.length)continue;const d=l[l.length-1].getTrimmedLength(),u=(0,a.reflowSmallerGetNewLineLengths)(l,this._cols,e),_=u.length-l.length;let f;f=0===this.ybase&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+_):Math.max(0,this.lines.length-this.lines.maxLength+_);const p=[];for(let e=0;e<_;e++){const e=this.getBlankLine(r.DEFAULT_ATTR_DATA,!0);p.push(e)}p.length>0&&(s.push({start:n+l.length+o,newLines:p}),o+=p.length),l.push(...p);let v=u.length-1,g=u[v];0===g&&(v--,g=u[v]);let m=l.length-_-1,S=d;for(;m>=0;){const e=Math.min(S,g);if(void 0===l[v])break;if(l[v].copyCellsFrom(l[m],S-e,g-e,e,!0),g-=e,0===g&&(v--,g=u[v]),S-=e,0===S){m--;const e=Math.max(m,0);S=(0,a.getWrappedLineTrimmedLength)(l,e,this._cols)}}for(let t=0;t<l.length;t++)u[t]<e&&l[t].setCell(u[t],i);let b=_-f;for(;b-- >0;)0===this.ybase?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+o)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+_,this.ybase+t-1)}if(s.length>0){const e=[],t=[];for(let e=0;e<this.lines.length;e++)t.push(this.lines.get(e));const i=this.lines.length;let r=i-1,n=0,a=s[n];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+o);let h=0;for(let l=Math.min(this.lines.maxLength-1,i+o-1);l>=0;l--)if(a&&a.start>r+h){for(let e=a.newLines.length-1;e>=0;e--)this.lines.set(l--,a.newLines[e]);l++,e.push({index:r+1,amount:a.newLines.length}),h+=a.newLines.length,a=s[++n]}else this.lines.set(l,t[r--]);let l=0;for(let t=e.length-1;t>=0;t--)e[t].index+=l,this.lines.onInsertEmitter.fire(e[t]),l+=e[t].amount;const c=Math.max(0,i+o-this.lines.maxLength);c>0&&this.lines.onTrimEmitter.fire(c)}}stringIndexToBufferIndex(e,t,i=!1){for(;t;){const s=this.lines.get(e);if(!s)return[-1,-1];const r=i?s.getTrimmedLength():s.length;for(let i=0;i<r;++i)if(s.get(i)[n.CHAR_DATA_WIDTH_INDEX]&&(t-=s.get(i)[n.CHAR_DATA_CHAR_INDEX].length||1),t<0)return[e,i];e++}return[e,0]}translateBufferLineToString(e,t,i=0,s){const r=this.lines.get(e);return r?r.translateToString(t,i,s):""}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+1<this.lines.length&&this.lines.get(i+1).isWrapped;)i++;return{first:t,last:i}}setupTabStops(e){for(null!=e?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(null==e&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose(),this.markers.splice(e--,1);this._isClearing=!1}addMarker(e){const t=new h.Marker(e);return this.markers.push(t),t.register(this.lines.onTrim((e=>{t.line-=e,t.line<0&&t.dispose()}))),t.register(this.lines.onInsert((e=>{t.line>=e.index&&(t.line+=e.amount)}))),t.register(this.lines.onDelete((e=>{t.line>=e.index&&t.line<e.index+e.amount&&t.dispose(),t.line>e.index&&(t.line-=e.amount)}))),t.register(t.onDispose((()=>this._removeMarker(t)))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}iterator(e,t,i,s,r){return new d(this,e,t,i,s,r)}};class d{constructor(e,t,i=0,s=e.lines.length,r=0,o=0){this._buffer=e,this._trimRight=t,this._startIndex=i,this._endIndex=s,this._startOverscan=r,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}hasNext(){return this._current<this._endIndex}next(){const e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);let t="";for(let i=e.first;i<=e.last;++i)t+=this._buffer.translateBufferLineToString(i,this._trimRight);return this._current=e.last+1,{range:e,content:t}}}t.BufferStringIterator=d},8437:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;const s=i(482),r=i(643),o=i(511),n=i(3734);t.DEFAULT_ATTR_DATA=Object.freeze(new n.AttributeData);const a={startIndex:0};class h{constructor(e,t,i=!1){this.isWrapped=i,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);const s=t||o.CellData.fromCharData([0,r.NULL_CELL_CHAR,r.NULL_CELL_WIDTH,r.NULL_CELL_CODE]);for(let t=0;t<e;++t)this.setCell(t,s);this.length=e}get(e){const t=this._data[3*e+0],i=2097151&t;return[this._data[3*e+1],2097152&t?this._combined[e]:i?(0,s.stringFromCodePoint)(i):"",t>>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):i]}set(e,t){this._data[3*e+1]=t[r.CHAR_DATA_ATTR_INDEX],t[r.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[r.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[r.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(e){return this._data[3*e+0]>>22}hasWidth(e){return 12582912&this._data[3*e+0]}getFg(e){return this._data[3*e+1]}getBg(e){return this._data[3*e+2]}hasContent(e){return 4194303&this._data[3*e+0]}getCodePoint(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t}isCombined(e){return 2097152&this._data[3*e+0]}getString(e){const t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?(0,s.stringFromCodePoint)(2097151&t):""}isProtected(e){return 536870912&this._data[3*e+2]}loadCell(e,t){return a.startIndex=3*e,t.content=this._data[a.startIndex+0],t.fg=this._data[a.startIndex+1],t.bg=this._data[a.startIndex+2],2097152&t.content&&(t.combinedData=this._combined[e]),268435456&t.bg&&(t.extended=this._extendedAttrs[e]),t}setCell(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),268435456&t.bg&&(this._extendedAttrs[e]=t.extended),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg}setCellFromCodePoint(e,t,i,s,r,o){268435456&r&&(this._extendedAttrs[e]=o),this._data[3*e+0]=t|i<<22,this._data[3*e+1]=s,this._data[3*e+2]=r}addCodepointToCell(e,t){let i=this._data[3*e+0];2097152&i?this._combined[e]+=(0,s.stringFromCodePoint)(t):(2097151&i?(this._combined[e]=(0,s.stringFromCodePoint)(2097151&i)+(0,s.stringFromCodePoint)(t),i&=-2097152,i|=2097152):i=t|1<<22,this._data[3*e+0]=i)}insertCells(e,t,i,s){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs),t<this.length-e){const s=new o.CellData;for(let i=this.length-e-t-1;i>=0;--i)this.setCell(e+t+i,this.loadCell(e+i,s));for(let s=0;s<t;++s)this.setCell(e+s,i)}else for(let t=e;t<this.length;++t)this.setCell(t,i);2===this.getWidth(this.length-1)&&this.setCellFromCodePoint(this.length-1,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs)}deleteCells(e,t,i,s){if(e%=this.length,t<this.length-e){const s=new o.CellData;for(let i=0;i<this.length-e-t;++i)this.setCell(e+i,this.loadCell(e+t+i,s));for(let e=this.length-t;e<this.length;++e)this.setCell(e,i)}else for(let t=e;t<this.length;++t)this.setCell(t,i);e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs),0!==this.getWidth(e)||this.hasContent(e)||this.setCellFromCodePoint(e,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs)}replaceCells(e,t,i,s,r=!1){if(r)for(e&&2===this.getWidth(e-1)&&!this.isProtected(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs),t<this.length&&2===this.getWidth(t-1)&&!this.isProtected(t)&&this.setCellFromCodePoint(t,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs);e<t&&e<this.length;)this.isProtected(e)||this.setCell(e,i),e++;else for(e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs),t<this.length&&2===this.getWidth(t-1)&&this.setCellFromCodePoint(t,0,1,(null==s?void 0:s.fg)||0,(null==s?void 0:s.bg)||0,(null==s?void 0:s.extended)||new n.ExtendedAttrs);e<t&&e<this.length;)this.setCell(e++,i)}resize(e,t){if(e!==this.length){if(e>this.length){const i=new Uint32Array(3*e);this.length&&(3*e<this._data.length?i.set(this._data.subarray(0,3*e)):i.set(this._data)),this._data=i;for(let i=this.length;i<e;++i)this.setCell(i,t)}else if(e){const t=new Uint32Array(3*e);t.set(this._data.subarray(0,3*e)),this._data=t;const i=Object.keys(this._combined);for(let t=0;t<i.length;t++){const s=parseInt(i[t],10);s>=e&&delete this._combined[s]}}else this._data=new Uint32Array(0),this._combined={};this.length=e}}fill(e,t=!1){if(t)for(let t=0;t<this.length;++t)this.isProtected(t)||this.setCell(t,e);else{this._combined={},this._extendedAttrs={};for(let t=0;t<this.length;++t)this.setCell(t,e)}}copyFrom(e){this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={};for(const t in e._combined)this._combined[t]=e._combined[t];this._extendedAttrs={};for(const t in e._extendedAttrs)this._extendedAttrs[t]=e._extendedAttrs[t];this.isWrapped=e.isWrapped}clone(){const e=new h(0);e._data=new Uint32Array(this._data),e.length=this.length;for(const t in this._combined)e._combined[t]=this._combined[t];for(const t in this._extendedAttrs)e._extendedAttrs[t]=this._extendedAttrs[t];return e.isWrapped=this.isWrapped,e}getTrimmedLength(){for(let e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0}copyCellsFrom(e,t,i,s,r){const o=e._data;if(r)for(let r=s-1;r>=0;r--){for(let e=0;e<3;e++)this._data[3*(i+r)+e]=o[3*(t+r)+e];268435456&o[3*(t+r)+2]&&(this._extendedAttrs[i+r]=e._extendedAttrs[t+r])}else for(let r=0;r<s;r++){for(let e=0;e<3;e++)this._data[3*(i+r)+e]=o[3*(t+r)+e];268435456&o[3*(t+r)+2]&&(this._extendedAttrs[i+r]=e._extendedAttrs[t+r])}const n=Object.keys(e._combined);for(let s=0;s<n.length;s++){const r=parseInt(n[s],10);r>=t&&(this._combined[r-t+i]=e._combined[r])}}translateToString(e=!1,t=0,i=this.length){e&&(i=Math.min(i,this.getTrimmedLength()));let o="";for(;t<i;){const e=this._data[3*t+0],i=2097151&e;o+=2097152&e?this._combined[t]:i?(0,s.stringFromCodePoint)(i):r.WHITESPACE_CELL_CHAR,t+=e>>22||1}return o}}t.BufferLine=h},4841:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRangeLength=void 0,t.getRangeLength=function(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}},4634:(e,t)=>{function i(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();const s=!e[t].hasContent(i-1)&&1===e[t].getWidth(i-1),r=2===e[t+1].getWidth(0);return s&&r?i-1:i}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(e,t,s,r,o){const n=[];for(let a=0;a<e.length-1;a++){let h=a,l=e.get(++h);if(!l.isWrapped)continue;const c=[e.get(a)];for(;h<e.length&&l.isWrapped;)c.push(l),l=e.get(++h);if(r>=a&&r<h){a+=c.length-1;continue}let d=0,u=i(c,d,t),_=1,f=0;for(;_<c.length;){const e=i(c,_,t),r=e-f,n=s-u,a=Math.min(r,n);c[d].copyCellsFrom(c[_],f,u,a,!1),u+=a,u===s&&(d++,u=0),f+=a,f===e&&(_++,f=0),0===u&&0!==d&&2===c[d-1].getWidth(s-1)&&(c[d].copyCellsFrom(c[d-1],s-1,u++,1,!1),c[d-1].setCell(s-1,o))}c[d].replaceCells(u,s,o);let p=0;for(let e=c.length-1;e>0&&(e>d||0===c[e].getTrimmedLength());e--)p++;p>0&&(n.push(a+c.length-p),n.push(p)),a+=c.length-1}return n},t.reflowLargerCreateNewLayout=function(e,t){const i=[];let s=0,r=t[s],o=0;for(let n=0;n<e.length;n++)if(r===n){const i=t[++s];e.onDeleteEmitter.fire({index:n-o,amount:i}),n+=i-1,o+=i,r=t[++s]}else i.push(n);return{layout:i,countRemoved:o}},t.reflowLargerApplyNewLayout=function(e,t){const i=[];for(let s=0;s<t.length;s++)i.push(e.get(t[s]));for(let t=0;t<i.length;t++)e.set(t,i[t]);e.length=t.length},t.reflowSmallerGetNewLineLengths=function(e,t,s){const r=[],o=e.map(((s,r)=>i(e,r,t))).reduce(((e,t)=>e+t));let n=0,a=0,h=0;for(;h<o;){if(o-h<s){r.push(o-h);break}n+=s;const l=i(e,a,t);n>l&&(n-=l,a++);const c=2===e[a].getWidth(n-1);c&&n--;const d=c?s-1:s;r.push(d),h+=d}return r},t.getWrappedLineTrimmedLength=i},5295:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSet=void 0;const s=i(9092),r=i(8460),o=i(844);class n extends o.Disposable{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this.register(new r.EventEmitter),this.reset()}get onBufferActivate(){return this._onBufferActivate.event}reset(){this._normal=new s.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new s.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),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}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}}t.BufferSet=n},511:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;const s=i(482),r=i(643),o=i(3734);class n extends o.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new o.ExtendedAttrs,this.combinedData=""}static fromCharData(e){const t=new n;return t.setFromCharData(e),t}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,s.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(e){this.fg=e[r.CHAR_DATA_ATTR_INDEX],this.bg=0;let t=!1;if(e[r.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[r.CHAR_DATA_CHAR_INDEX].length){const i=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){const s=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=s&&s<=57343?this.content=1024*(i-55296)+s-56320+65536|e[r.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[r.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[r.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[r.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[r.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.CellData=n},643:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_EXT=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=256,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.DEFAULT_EXT=0,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},4863:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;const s=i(8460),r=i(844);class o extends r.Disposable{constructor(e){super(),this.line=e,this._id=o._nextId++,this.isDisposed=!1,this._onDispose=new s.EventEmitter}get id(){return this._id}get onDispose(){return this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),super.dispose())}}t.Marker=o,o._nextId=1},7116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},t.CHARSETS.A={"#":"£"},t.CHARSETS.B=void 0,t.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},t.CHARSETS.C=t.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},t.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},t.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},t.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},t.CHARSETS.E=t.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},t.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},t.CHARSETS.H=t.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(e,t)=>{var i,s;Object.defineProperty(t,"__esModule",{value:!0}),t.C1_ESCAPED=t.C1=t.C0=void 0,function(e){e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="",e.BS="\b",e.HT="\t",e.LF="\n",e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""}(i=t.C0||(t.C0={})),(s=t.C1||(t.C1={})).PAD="€",s.HOP="",s.BPH="‚",s.NBH="ƒ",s.IND="„",s.NEL="…",s.SSA="†",s.ESA="‡",s.HTS="ˆ",s.HTJ="‰",s.VTS="Š",s.PLD="‹",s.PLU="Œ",s.RI="",s.SS2="Ž",s.SS3="",s.DCS="",s.PU1="‘",s.PU2="’",s.STS="“",s.CCH="”",s.MW="•",s.SPA="–",s.EPA="—",s.SOS="˜",s.SGCI="™",s.SCI="š",s.CSI="›",s.ST="œ",s.OSC="",s.PM="ž",s.APC="Ÿ",(t.C1_ESCAPED||(t.C1_ESCAPED={})).ST=`${i.ESC}\\`},7399:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateKeyboardEvent=void 0;const s=i(2584),r={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:["'",'"']};t.evaluateKeyboardEvent=function(e,t,i,o){const n={type:0,cancel:!1,key:void 0},a=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?n.key=t?s.C0.ESC+"OA":s.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?n.key=t?s.C0.ESC+"OD":s.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?n.key=t?s.C0.ESC+"OC":s.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(n.key=t?s.C0.ESC+"OB":s.C0.ESC+"[B");break;case 8:if(e.altKey){n.key=s.C0.ESC+s.C0.DEL;break}n.key=s.C0.DEL;break;case 9:if(e.shiftKey){n.key=s.C0.ESC+"[Z";break}n.key=s.C0.HT,n.cancel=!0;break;case 13:n.key=e.altKey?s.C0.ESC+s.C0.CR:s.C0.CR,n.cancel=!0;break;case 27:n.key=s.C0.ESC,e.altKey&&(n.key=s.C0.ESC+s.C0.ESC),n.cancel=!0;break;case 37:if(e.metaKey)break;a?(n.key=s.C0.ESC+"[1;"+(a+1)+"D",n.key===s.C0.ESC+"[1;3D"&&(n.key=s.C0.ESC+(i?"b":"[1;5D"))):n.key=t?s.C0.ESC+"OD":s.C0.ESC+"[D";break;case 39:if(e.metaKey)break;a?(n.key=s.C0.ESC+"[1;"+(a+1)+"C",n.key===s.C0.ESC+"[1;3C"&&(n.key=s.C0.ESC+(i?"f":"[1;5C"))):n.key=t?s.C0.ESC+"OC":s.C0.ESC+"[C";break;case 38:if(e.metaKey)break;a?(n.key=s.C0.ESC+"[1;"+(a+1)+"A",i||n.key!==s.C0.ESC+"[1;3A"||(n.key=s.C0.ESC+"[1;5A")):n.key=t?s.C0.ESC+"OA":s.C0.ESC+"[A";break;case 40:if(e.metaKey)break;a?(n.key=s.C0.ESC+"[1;"+(a+1)+"B",i||n.key!==s.C0.ESC+"[1;3B"||(n.key=s.C0.ESC+"[1;5B")):n.key=t?s.C0.ESC+"OB":s.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(n.key=s.C0.ESC+"[2~");break;case 46:n.key=a?s.C0.ESC+"[3;"+(a+1)+"~":s.C0.ESC+"[3~";break;case 36:n.key=a?s.C0.ESC+"[1;"+(a+1)+"H":t?s.C0.ESC+"OH":s.C0.ESC+"[H";break;case 35:n.key=a?s.C0.ESC+"[1;"+(a+1)+"F":t?s.C0.ESC+"OF":s.C0.ESC+"[F";break;case 33:e.shiftKey?n.type=2:e.ctrlKey?n.key=s.C0.ESC+"[5;"+(a+1)+"~":n.key=s.C0.ESC+"[5~";break;case 34:e.shiftKey?n.type=3:e.ctrlKey?n.key=s.C0.ESC+"[6;"+(a+1)+"~":n.key=s.C0.ESC+"[6~";break;case 112:n.key=a?s.C0.ESC+"[1;"+(a+1)+"P":s.C0.ESC+"OP";break;case 113:n.key=a?s.C0.ESC+"[1;"+(a+1)+"Q":s.C0.ESC+"OQ";break;case 114:n.key=a?s.C0.ESC+"[1;"+(a+1)+"R":s.C0.ESC+"OR";break;case 115:n.key=a?s.C0.ESC+"[1;"+(a+1)+"S":s.C0.ESC+"OS";break;case 116:n.key=a?s.C0.ESC+"[15;"+(a+1)+"~":s.C0.ESC+"[15~";break;case 117:n.key=a?s.C0.ESC+"[17;"+(a+1)+"~":s.C0.ESC+"[17~";break;case 118:n.key=a?s.C0.ESC+"[18;"+(a+1)+"~":s.C0.ESC+"[18~";break;case 119:n.key=a?s.C0.ESC+"[19;"+(a+1)+"~":s.C0.ESC+"[19~";break;case 120:n.key=a?s.C0.ESC+"[20;"+(a+1)+"~":s.C0.ESC+"[20~";break;case 121:n.key=a?s.C0.ESC+"[21;"+(a+1)+"~":s.C0.ESC+"[21~";break;case 122:n.key=a?s.C0.ESC+"[23;"+(a+1)+"~":s.C0.ESC+"[23~";break;case 123:n.key=a?s.C0.ESC+"[24;"+(a+1)+"~":s.C0.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(i&&!o||!e.altKey||e.metaKey)!i||e.altKey||e.ctrlKey||e.shiftKey||!e.metaKey?e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&1===e.key.length?n.key=e.key:e.key&&e.ctrlKey&&("_"===e.key&&(n.key=s.C0.US),"@"===e.key&&(n.key=s.C0.NUL)):65===e.keyCode&&(n.type=1);else{const t=r[e.keyCode],i=null==t?void 0:t[e.shiftKey?1:0];if(i)n.key=s.C0.ESC+i;else if(e.keyCode>=65&&e.keyCode<=90){const t=e.ctrlKey?e.keyCode-64:e.keyCode+32;let i=String.fromCharCode(t);e.shiftKey&&(i=i.toUpperCase()),n.key=s.C0.ESC+i}else if("Dead"===e.key&&e.code.startsWith("Key")){let t=e.code.slice(3,4);e.shiftKey||(t=t.toLowerCase()),n.key=s.C0.ESC+t,n.cancel=!0}}else e.keyCode>=65&&e.keyCode<=90?n.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?n.key=s.C0.NUL:e.keyCode>=51&&e.keyCode<=55?n.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?n.key=s.C0.DEL:219===e.keyCode?n.key=s.C0.ESC:220===e.keyCode?n.key=s.C0.FS:221===e.keyCode&&(n.key=s.C0.GS)}return n}},482:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let t=e[r];t>65535?(t-=65536,s+=String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):s+=String.fromCharCode(t)}return s},t.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){const i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){const i=e.charCodeAt(r++);56320<=i&&i<=57343?t[s++]=1024*(this._interim-55296)+i-56320+65536:(t[s++]=this._interim,t[s++]=i),this._interim=0}for(let o=r;o<i;++o){const r=e.charCodeAt(o);if(55296<=r&&r<=56319){if(++o>=i)return this._interim=r,s;const n=e.charCodeAt(o);56320<=n&&n<=57343?t[s++]=1024*(r-55296)+n-56320+65536:(t[s++]=r,t[s++]=n)}else 65279!==r&&(t[s++]=r)}return s}},t.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){const i=e.length;if(!i)return 0;let s,r,o,n,a=0,h=0,l=0;if(this.interim[0]){let s=!1,r=this.interim[0];r&=192==(224&r)?31:224==(240&r)?15:7;let o,n=0;for(;(o=63&this.interim[++n])&&n<4;)r<<=6,r|=o;const h=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,c=h-n;for(;l<c;){if(l>=i)return 0;if(o=e[l++],128!=(192&o)){l--,s=!0;break}this.interim[n++]=o,r<<=6,r|=63&o}s||(2===h?r<128?l--:t[a++]=r:3===h?r<2048||r>=55296&&r<=57343||65279===r||(t[a++]=r):r<65536||r>1114111||(t[a++]=r)),this.interim.fill(0)}const c=i-4;let d=l;for(;d<i;){for(;!(!(d<c)||128&(s=e[d])||128&(r=e[d+1])||128&(o=e[d+2])||128&(n=e[d+3]));)t[a++]=s,t[a++]=r,t[a++]=o,t[a++]=n,d+=4;if(s=e[d++],s<128)t[a++]=s;else if(192==(224&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(h=(31&s)<<6|63&r,h<128){d--;continue}t[a++]=h}else if(224==(240&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,a;if(o=e[d++],128!=(192&o)){d--;continue}if(h=(15&s)<<12|(63&r)<<6|63&o,h<2048||h>=55296&&h<=57343||65279===h)continue;t[a++]=h}else if(240==(248&s)){if(d>=i)return this.interim[0]=s,a;if(r=e[d++],128!=(192&r)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,a;if(o=e[d++],128!=(192&o)){d--;continue}if(d>=i)return this.interim[0]=s,this.interim[1]=r,this.interim[2]=o,a;if(n=e[d++],128!=(192&n)){d--;continue}if(h=(7&s)<<18|(63&r)<<12|(63&o)<<6|63&n,h<65536||h>1114111)continue;t[a++]=h}}return a}}},225:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;const s=i(8273),r=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],o=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let n;t.UnicodeV6=class{constructor(){if(this.version="6",!n){n=new Uint8Array(65536),(0,s.fill)(n,1),n[0]=0,(0,s.fill)(n,0,1,32),(0,s.fill)(n,0,127,160),(0,s.fill)(n,2,4352,4448),n[9001]=2,n[9002]=2,(0,s.fill)(n,2,11904,42192),n[12351]=1,(0,s.fill)(n,2,44032,55204),(0,s.fill)(n,2,63744,64256),(0,s.fill)(n,2,65040,65050),(0,s.fill)(n,2,65072,65136),(0,s.fill)(n,2,65280,65377),(0,s.fill)(n,2,65504,65511);for(let e=0;e<r.length;++e)(0,s.fill)(n,0,r[e][0],r[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?n[e]:function(e,t){let i,s=0,r=t.length-1;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=s;)if(i=s+r>>1,e>t[i][1])s=i+1;else{if(!(e<t[i][0]))return!0;r=i-1}return!1}(e,o)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}}},5981:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteBuffer=void 0;const s=i(8460),r="undefined"==typeof queueMicrotask?e=>{Promise.resolve().then(e)}:queueMicrotask;t.WriteBuffer=class{constructor(e){this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._onWriteParsed=new s.EventEmitter}get onWriteParsed(){return this._onWriteParsed.event}writeSync(e,t){if(void 0!==t&&this._syncCalls>t)return void(this._syncCalls=0);if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let i;for(this._isSyncWriting=!0;i=this._writeBuffer.shift();){this._action(i);const e=this._callbacks.shift();e&&e()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout((()=>this._innerWrite()))),this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){const i=e||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const e=this._writeBuffer[this._bufferOffset],s=this._action(e,t);if(s){const e=e=>Date.now()-i>=12?setTimeout((()=>this._innerWrite(0,e))):this._innerWrite(i,e);return void s.catch((e=>(r((()=>{throw e})),Promise.resolve(!1)))).then(e)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=e.length,Date.now()-i>=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((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}},5941:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRgbString=t.parseColor=void 0;const i=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,s=/^[\da-f]+$/;function r(e,t){const i=e.toString(16),s=i.length<2?"0"+i:i;switch(t){case 4:return i[0];case 8:return s;case 12:return(s+s).slice(0,3);default:return s+s}}t.parseColor=function(e){if(!e)return;let t=e.toLowerCase();if(0===t.indexOf("rgb:")){t=t.slice(4);const e=i.exec(t);if(e){const t=e[1]?15:e[4]?255:e[7]?4095:65535;return[Math.round(parseInt(e[1]||e[4]||e[7]||e[10],16)/t*255),Math.round(parseInt(e[2]||e[5]||e[8]||e[11],16)/t*255),Math.round(parseInt(e[3]||e[6]||e[9]||e[12],16)/t*255)]}}else if(0===t.indexOf("#")&&(t=t.slice(1),s.exec(t)&&[3,6,9,12].includes(t.length))){const e=t.length/3,i=[0,0,0];for(let s=0;s<3;++s){const r=parseInt(t.slice(e*s,e*s+e),16);i[s]=1===e?r<<4:2===e?r:3===e?r>>4:r>>8}return i}},t.toRgbString=function(e,t=16){const[i,s,o]=e;return`rgb:${r(i,t)}/${r(s,t)}/${r(o,t)}`}},5770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},6351:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DcsHandler=t.DcsParser=void 0;const s=i(482),r=i(8742),o=i(5770),n=[];t.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=n,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=n}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const i=this._handlers[e];return i.push(t),{dispose:()=>{const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=n,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||n,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].hook(t);else this._handlerFb(this._ident,"HOOK",t)}put(e,t,i){if(this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i);else this._handlerFb(this._ident,"PUT",(0,s.utf32ToString)(e,t,i))}unhook(e,t=!0){if(this._active.length){let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&!1===i){for(;s>=0&&(i=this._active[s].unhook(e),!0!==i);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}else this._handlerFb(this._ident,"UNHOOK",e);this._active=n,this._ident=0}};const a=new r.Params;a.addParam(0),t.DcsHandler=class{constructor(e){this._handler=e,this._data="",this._params=a,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():a,this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=(0,s.utf32ToString)(e,t,i),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then((e=>(this._params=a,this._data="",this._hitLimit=!1,e)));return this._params=a,this._data="",this._hitLimit=!1,t}}},2015:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;const s=i(844),r=i(8273),o=i(8742),n=i(6242),a=i(6351);class h{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){(0,r.fill)(this.table,e<<4|t)}add(e,t,i,s){this.table[t<<8|e]=i<<4|s}addMany(e,t,i,s){for(let r=0;r<e.length;r++)this.table[t<<8|e[r]]=i<<4|s}}t.TransitionTable=h;const l=160;t.VT500_TRANSITION_TABLE=function(){const e=new h(4095),t=Array.apply(null,Array(256)).map(((e,t)=>t)),i=(e,i)=>t.slice(e,i),s=i(32,127),r=i(0,24);r.push(25),r.push.apply(r,i(28,32));const o=i(0,14);let n;for(n in e.setDefault(1,0),e.addMany(s,0,2,0),o)e.addMany([24,26,153,154],n,3,0),e.addMany(i(128,144),n,3,0),e.addMany(i(144,152),n,3,0),e.add(156,n,0,0),e.add(27,n,11,1),e.add(157,n,4,8),e.addMany([152,158,159],n,0,7),e.add(155,n,11,3),e.add(144,n,11,9);return e.addMany(r,0,3,0),e.addMany(r,1,3,1),e.add(127,1,0,1),e.addMany(r,8,0,8),e.addMany(r,3,3,3),e.add(127,3,0,3),e.addMany(r,4,3,4),e.add(127,4,0,4),e.addMany(r,6,3,6),e.addMany(r,5,3,5),e.add(127,5,0,5),e.addMany(r,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(s,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(s,7,0,7),e.addMany(r,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(r,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(r,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(r,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(r,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(r,13,13,13),e.addMany(s,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(l,0,2,0),e.add(l,8,5,8),e.add(l,6,0,6),e.add(l,11,0,11),e.add(l,13,13,13),e}();class c extends s.Disposable{constructor(e=t.VT500_TRANSITION_TABLE){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new o.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(e,t,i)=>{},this._executeHandlerFb=e=>{},this._csiHandlerFb=(e,t)=>{},this._escHandlerFb=e=>{},this._errorHandlerFb=e=>e,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser=new n.OscParser,this._dcsParser=new a.DcsParser,this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let t=0;t<e.intermediates.length;++t){const s=e.intermediates.charCodeAt(t);if(32>s||s>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=s}}if(1!==e.final.length)throw new Error("final must be a single byte");const s=e.final.charCodeAt(0);if(t[0]>s||s>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=s,i}identToString(e){const t=[];for(;e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")}dispose(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){const i=this._identifier(e,[48,126]);void 0===this._escHandlers[i]&&(this._escHandlers[i]=[]);const s=this._escHandlers[i];return s.push(t),{dispose:()=>{const e=s.indexOf(t);-1!==e&&s.splice(e,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){const i=this._identifier(e);void 0===this._csiHandlers[i]&&(this._csiHandlers[i]=[]);const s=this._csiHandlers[i];return s.push(t),{dispose:()=>{const e=s.indexOf(t);-1!==e&&s.splice(e,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,0!==this._parseStack.state&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,i,s,r){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=s,this._parseStack.chunkPos=r}parse(e,t,i){let s,r=0,o=0,n=0;if(this._parseStack.state)if(2===this._parseStack.state)this._parseStack.state=0,n=this._parseStack.chunkPos+1;else{if(void 0===i||1===this._parseStack.state)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const t=this._parseStack.handlers;let o=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(!1===i&&o>-1)for(;o>=0&&(s=t[o](this._params),!0!==s);o--)if(s instanceof Promise)return this._parseStack.handlerPos=o,s;this._parseStack.handlers=[];break;case 4:if(!1===i&&o>-1)for(;o>=0&&(s=t[o](),!0!==s);o--)if(s instanceof Promise)return this._parseStack.handlerPos=o,s;this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],s=this._dcsParser.unhook(24!==r&&26!==r,i),s)return s;27===r&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],s=this._oscParser.end(24!==r&&26!==r,i),s)return s;27===r&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,n=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let i=n;i<t;++i){switch(r=e[i],o=this._transitions.table[this.currentState<<8|(r<160?r:l)],o>>4){case 2:for(let s=i+1;;++s){if(s>=t||(r=e[s])<32||r>126&&r<l){this._printHandler(e,i,s),i=s-1;break}if(++s>=t||(r=e[s])<32||r>126&&r<l){this._printHandler(e,i,s),i=s-1;break}if(++s>=t||(r=e[s])<32||r>126&&r<l){this._printHandler(e,i,s),i=s-1;break}if(++s>=t||(r=e[s])<32||r>126&&r<l){this._printHandler(e,i,s),i=s-1;break}}break;case 3:this._executeHandlers[r]?this._executeHandlers[r]():this._executeHandlerFb(r),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:i,code:r,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const n=this._csiHandlers[this._collect<<8|r];let a=n?n.length-1:-1;for(;a>=0&&(s=n[a](this._params),!0!==s);a--)if(s instanceof Promise)return this._preserveStack(3,n,a,o,i),s;a<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingCodepoint=0;break;case 8:do{switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}}while(++i<t&&(r=e[i])>47&&r<60);i--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:const h=this._escHandlers[this._collect<<8|r];let c=h?h.length-1:-1;for(;c>=0&&(s=h[c](),!0!==s);c--)if(s instanceof Promise)return this._preserveStack(4,h,c,o,i),s;c<0&&this._escHandlerFb(this._collect<<8|r),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let s=i+1;;++s)if(s>=t||24===(r=e[s])||26===r||27===r||r>127&&r<l){this._dcsParser.put(e,i,s),i=s-1;break}break;case 14:if(s=this._dcsParser.unhook(24!==r&&26!==r),s)return this._preserveStack(6,[],0,o,i),s;27===r&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let s=i+1;;s++)if(s>=t||(r=e[s])<32||r>127&&r<l){this._oscParser.put(e,i,s),i=s-1;break}break;case 6:if(s=this._oscParser.end(24!==r&&26!==r),s)return this._preserveStack(5,[],0,o,i),s;27===r&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&o}}}t.EscapeSequenceParser=c},6242:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OscHandler=t.OscParser=void 0;const s=i(5770),r=i(482),o=[];t.OscParser=class{constructor(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);const i=this._handlers[e];return i.push(t),{dispose:()=>{const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=o}reset(){if(2===this._state)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||o,this._active.length)for(let e=this._active.length-1;e>=0;e--)this._active[e].start();else this._handlerFb(this._id,"START")}_put(e,t,i){if(this._active.length)for(let s=this._active.length-1;s>=0;s--)this._active[s].put(e,t,i);else this._handlerFb(this._id,"PUT",(0,r.utf32ToString)(e,t,i))}start(){this.reset(),this._state=1}put(e,t,i){if(3!==this._state){if(1===this._state)for(;t<i;){const i=e[t++];if(59===i){this._state=2,this._start();break}if(i<48||57<i)return void(this._state=3);-1===this._id&&(this._id=0),this._id=10*this._id+i-48}2===this._state&&i-t>0&&this._put(e,t,i)}}end(e,t=!0){if(0!==this._state){if(3!==this._state)if(1===this._state&&this._start(),this._active.length){let i=!1,s=this._active.length-1,r=!1;if(this._stack.paused&&(s=this._stack.loopPosition-1,i=t,r=this._stack.fallThrough,this._stack.paused=!1),!r&&!1===i){for(;s>=0&&(i=this._active[s].end(e),!0!==i);s--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!1,i;s--}for(;s>=0;s--)if(i=this._active[s].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=s,this._stack.fallThrough=!0,i}else this._handlerFb(this._id,"END",e);this._active=o,this._id=-1,this._state=0}}},t.OscHandler=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=(0,r.utf32ToString)(e,t,i),this._data.length>s.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then((e=>(this._data="",this._hitLimit=!1,e)));return this._data="",this._hitLimit=!1,t}}},8742:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;const i=2147483647;class s{constructor(e=32,t=32){if(this.maxLength=e,this.maxSubParamsLength=t,t>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(e){const t=new s;if(!e.length)return t;for(let i=Array.isArray(e[0])?1:0;i<e.length;++i){const s=e[i];if(Array.isArray(s))for(let e=0;e<s.length;++e)t.addSubParam(s[e]);else t.addParam(s)}return t}clone(){const e=new s(this.maxLength,this.maxSubParamsLength);return e.params.set(this.params),e.length=this.length,e._subParams.set(this._subParams),e._subParamsLength=this._subParamsLength,e._subParamsIdx.set(this._subParamsIdx),e._rejectDigits=this._rejectDigits,e._rejectSubDigits=this._rejectSubDigits,e._digitIsSub=this._digitIsSub,e}toArray(){const e=[];for(let t=0;t<this.length;++t){e.push(this.params[t]);const i=this._subParamsIdx[t]>>8,s=255&this._subParamsIdx[t];s-i>0&&e.push(Array.prototype.slice.call(this._subParams,i,s))}return e}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>i?i:e}}addSubParam(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=e>i?i:e,this._subParamsIdx[this.length-1]++}}hasSubParams(e){return(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)>0}getSubParams(e){const t=this._subParamsIdx[e]>>8,i=255&this._subParamsIdx[e];return i-t>0?this._subParams.subarray(t,i):null}getSubParamsAll(){const e={};for(let t=0;t<this.length;++t){const i=this._subParamsIdx[t]>>8,s=255&this._subParamsIdx[t];s-i>0&&(e[t]=this._subParams.slice(i,s))}return e}addDigit(e){let t;if(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const s=this._digitIsSub?this._subParams:this.params,r=s[t-1];s[t-1]=~r?Math.min(10*r+e,i):e}}t.Params=s},5741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddonManager=void 0,t.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){const i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(-1===t)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}}},8771:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferApiView=void 0;const s=i(3785),r=i(511);t.BufferApiView=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){const t=this._buffer.lines.get(e);if(t)return new s.BufferLineApiView(t)}getNullCell(){return new r.CellData}}},3785:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLineApiView=void 0;const s=i(511);t.BufferLineApiView=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new s.CellData)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}}},8285:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferNamespaceApi=void 0;const s=i(8771),r=i(8460);t.BufferNamespaceApi=class{constructor(e){this._core=e,this._onBufferChange=new r.EventEmitter,this._normal=new s.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new s.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get onBufferChange(){return this._onBufferChange.event}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}},7975:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserApi=void 0,t.ParserApi=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,(e=>t(e.toArray())))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,((e,i)=>t(e,i.toArray())))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}}},7090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeApi=void 0,t.UnicodeApi=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}}},744:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;const o=i(2585),n=i(5295),a=i(8460),h=i(844);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;let l=class extends h.Disposable{constructor(e){super(),this.isUserScrolling=!1,this._onResize=new a.EventEmitter,this._onScroll=new a.EventEmitter,this.cols=Math.max(e.rawOptions.cols||0,t.MINIMUM_COLS),this.rows=Math.max(e.rawOptions.rows||0,t.MINIMUM_ROWS),this.buffers=new n.BufferSet(e,this)}get onResize(){return this._onResize.event}get onScroll(){return this._onScroll.event}get buffer(){return this.buffers.active}dispose(){super.dispose(),this.buffers.dispose()}resize(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){const i=this.buffer;let s;s=this._cachedBlankLine,s&&s.length===this.cols&&s.getFg(0)===e.fg&&s.getBg(0)===e.bg||(s=i.getBlankLine(e,t),this._cachedBlankLine=s),s.isWrapped=t;const r=i.ybase+i.scrollTop,o=i.ybase+i.scrollBottom;if(0===i.scrollTop){const e=i.lines.isFull;o===i.lines.length-1?e?i.lines.recycle().copyFrom(s):i.lines.push(s.clone()):i.lines.splice(o+1,0,s.clone()),e?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{const e=o-r+1;i.lines.shiftElements(r+1,e-1,-1),i.lines.set(o,s.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t,i){const s=this.buffer;if(e<0){if(0===s.ydisp)return;this.isUserScrolling=!0}else e+s.ydisp>=s.ybase&&(this.isUserScrolling=!1);const r=s.ydisp;s.ydisp=Math.max(Math.min(s.ydisp+e,s.ybase),0),r!==s.ydisp&&(t||this._onScroll.fire(s.ydisp))}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this.buffer.ydisp)}scrollToBottom(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)}scrollToLine(e){const t=e-this.buffer.ydisp;0!==t&&this.scrollLines(t)}};l=s([r(0,o.IOptionsService)],l),t.BufferService=l},7994:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharsetService=void 0,t.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}}},1753:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreMouseService=void 0;const o=i(2585),n=i(8460),a={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>4!==e.button&&1===e.action&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>32!==e.action},DRAG:{events:23,restrict:e=>32!==e.action||3!==e.button},ANY:{events:31,restrict:e=>!0}};function h(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return 4===e.button?(i|=64,i|=e.action):(i|=3&e.button,4&e.button&&(i|=64),8&e.button&&(i|=128),32===e.action?i|=32:0!==e.action||t||(i|=3)),i}const l=String.fromCharCode,c={DEFAULT:e=>{const t=[h(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`${l(t[0])}${l(t[1])}${l(t[2])}`},SGR:e=>{const t=0===e.action&&4!==e.button?"m":"M";return`[<${h(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{const t=0===e.action&&4!==e.button?"m":"M";return`[<${h(e,!0)};${e.x};${e.y}${t}`}};let d=class{constructor(e,t){this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new n.EventEmitter,this._lastEvent=null;for(const e of Object.keys(a))this.addProtocol(e,a[e]);for(const e of Object.keys(c))this.addEncoding(e,c[e]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return 0!==this._protocols[this._activeProtocol].events}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}get onProtocolChange(){return this._onProtocolChange.event}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._equalEvents(this._lastEvent,e,"SGR_PIXELS"===this._activeEncoding))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;const t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x)return!1;if(e.y!==t.y)return!1}else{if(e.col!==t.col)return!1;if(e.row!==t.row)return!1}return e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift}};d=s([r(0,o.IBufferService),r(1,o.ICoreService)],d),t.CoreMouseService=d},6975:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreService=void 0;const o=i(2585),n=i(8460),a=i(1439),h=i(844),l=Object.freeze({insertMode:!1}),c=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let d=class extends h.Disposable{constructor(e,t,i,s){super(),this._bufferService=t,this._logService=i,this._optionsService=s,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new n.EventEmitter),this._onUserInput=this.register(new n.EventEmitter),this._onBinary=this.register(new n.EventEmitter),this._scrollToBottom=e,this.register({dispose:()=>this._scrollToBottom=void 0}),this.modes=(0,a.clone)(l),this.decPrivateModes=(0,a.clone)(c)}get onData(){return this._onData.event}get onUserInput(){return this._onUserInput.event}get onBinary(){return this._onBinary.event}reset(){this.modes=(0,a.clone)(l),this.decPrivateModes=(0,a.clone)(c)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;const i=this._bufferService.buffer;i.ybase!==i.ydisp&&this._scrollToBottom(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`,(()=>e.split("").map((e=>e.charCodeAt(0))))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`,(()=>e.split("").map((e=>e.charCodeAt(0))))),this._onBinary.fire(e))}};d=s([r(1,o.IBufferService),r(2,o.ILogService),r(3,o.IOptionsService)],d),t.CoreService=d},9074:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationService=void 0;const s=i(8055),r=i(8460),o=i(844),n=i(6106),a={xmin:0,xmax:0};class h extends o.Disposable{constructor(){super(...arguments),this._decorations=new n.SortedList((e=>null==e?void 0:e.marker.line)),this._onDecorationRegistered=this.register(new r.EventEmitter),this._onDecorationRemoved=this.register(new r.EventEmitter)}get onDecorationRegistered(){return this._onDecorationRegistered.event}get onDecorationRemoved(){return this._onDecorationRemoved.event}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;const t=new l(e);if(t){const e=t.marker.onDispose((()=>t.dispose()));t.onDispose((()=>{t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),e.dispose())})),this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(const e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){var s,r,o;let n=0,a=0;for(const h of this._decorations.getKeyIterator(t))n=null!==(s=h.options.x)&&void 0!==s?s:0,a=n+(null!==(r=h.options.width)&&void 0!==r?r:1),e>=n&&e<a&&(!i||(null!==(o=h.options.layer)&&void 0!==o?o:"bottom")===i)&&(yield h)}forEachDecorationAtCell(e,t,i,s){this._decorations.forEachByKey(t,(t=>{var r,o,n;a.xmin=null!==(r=t.options.x)&&void 0!==r?r:0,a.xmax=a.xmin+(null!==(o=t.options.width)&&void 0!==o?o:1),e>=a.xmin&&e<a.xmax&&(!i||(null!==(n=t.options.layer)&&void 0!==n?n:"bottom")===i)&&s(t)}))}dispose(){for(const e of this._decorations.values())this._onDecorationRemoved.fire(e);this.reset()}}t.DecorationService=h;class l extends o.Disposable{constructor(e){super(),this.options=e,this.isDisposed=!1,this.onRenderEmitter=this.register(new r.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new r.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return null===this._cachedBg&&(this.options.backgroundColor?this._cachedBg=s.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return null===this._cachedFg&&(this.options.foregroundColor?this._cachedFg=s.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._isDisposed||(this._isDisposed=!0,this._onDispose.fire(),super.dispose())}}},3730:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DirtyRowService=void 0;const o=i(2585);let n=class{constructor(e){this._bufferService=e,this.clearRange()}get start(){return this._start}get end(){return this._end}clearRange(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y}markDirty(e){e<this._start?this._start=e:e>this._end&&(this._end=e)}markRangeDirty(e,t){if(e>t){const i=e;e=t,t=i}e<this._start&&(this._start=e),t>this._end&&(this._end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};n=s([r(0,o.IBufferService)],n),t.DirtyRowService=n},4348:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;const s=i(2585),r=i(8343);class o{constructor(...e){this._entries=new Map;for(const[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){this._entries.forEach(((t,i)=>e(i,t)))}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}t.ServiceCollection=o,t.InstantiationService=class{constructor(){this._services=new o,this._services.set(s.IInstantiationService,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){const i=(0,r.getServiceDependencies)(e).sort(((e,t)=>e.index-t.index)),s=[];for(const t of i){const i=this._services.get(t.id);if(!i)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);s.push(i)}const o=i.length>0?i[0].index:t.length;if(t.length!==o)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);return new e(...[...t,...s])}}},7866:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;const o=i(2585),n={debug:o.LogLevelEnum.DEBUG,info:o.LogLevelEnum.INFO,warn:o.LogLevelEnum.WARN,error:o.LogLevelEnum.ERROR,off:o.LogLevelEnum.OFF};let a=class{constructor(e){this._optionsService=e,this.logLevel=o.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange((e=>{"logLevel"===e&&this._updateLogLevel()}))}_updateLogLevel(){this.logLevel=n[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,"xterm.js: "+t,...i)}debug(e,...t){this.logLevel<=o.LogLevelEnum.DEBUG&&this._log(console.log,e,t)}info(e,...t){this.logLevel<=o.LogLevelEnum.INFO&&this._log(console.info,e,t)}warn(e,...t){this.logLevel<=o.LogLevelEnum.WARN&&this._log(console.warn,e,t)}error(e,...t){this.logLevel<=o.LogLevelEnum.ERROR&&this._log(console.error,e,t)}};a=s([r(0,o.IOptionsService)],a),t.LogService=a},7302:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=void 0;const s=i(8460),r=i(6114);t.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:r.isMac,windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const o=["normal","bold","100","200","300","400","500","600","700","800","900"];t.OptionsService=class{constructor(e){this._onOptionChange=new s.EventEmitter;const i=Object.assign({},t.DEFAULT_OPTIONS);for(const t in e)if(t in i)try{const s=e[t];i[t]=this._sanitizeAndValidateOption(t,s)}catch(e){console.error(e)}this.rawOptions=i,this.options=Object.assign({},i),this._setupOptions()}get onOptionChange(){return this._onOptionChange.event}_setupOptions(){const e=e=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error(`No option with key "${e}"`);return this.rawOptions[e]},i=(e,i)=>{if(!(e in t.DEFAULT_OPTIONS))throw new Error(`No option with key "${e}"`);i=this._sanitizeAndValidateOption(e,i),this.rawOptions[e]!==i&&(this.rawOptions[e]=i,this._onOptionChange.fire(e))};for(const t in this.rawOptions){const s={get:e.bind(this,t),set:i.bind(this,t)};Object.defineProperty(this.options,t,s)}}_sanitizeAndValidateOption(e,i){switch(e){case"cursorStyle":if(i||(i=t.DEFAULT_OPTIONS[e]),!function(e){return"block"===e||"underline"===e||"bar"===e}(i))throw new Error(`"${i}" is not a valid value for ${e}`);break;case"wordSeparator":i||(i=t.DEFAULT_OPTIONS[e]);break;case"fontWeight":case"fontWeightBold":if("number"==typeof i&&1<=i&&i<=1e3)break;i=o.includes(i)?i:t.DEFAULT_OPTIONS[e];break;case"cursorWidth":i=Math.floor(i);case"lineHeight":case"tabStopWidth":if(i<1)throw new Error(`${e} cannot be less than 1, value: ${i}`);break;case"minimumContrastRatio":i=Math.max(1,Math.min(21,Math.round(10*i)/10));break;case"scrollback":if((i=Math.min(i,4294967295))<0)throw new Error(`${e} cannot be less than 0, value: ${i}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(i<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${i}`);case"rows":case"cols":if(!i&&0!==i)throw new Error(`${e} must be numeric, value: ${i}`)}return i}}},2660:function(e,t,i){var s=this&&this.__decorate||function(e,t,i,s){var r,o=arguments.length,n=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(n=(o<3?r(n):o>3?r(t,i,n):r(t,i))||n);return o>3&&n&&Object.defineProperty(t,i,n),n},r=this&&this.__param||function(e,t){return function(i,s){t(i,s,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkService=void 0;const o=i(2585);let n=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){const t=this._bufferService.buffer;if(void 0===e.id){const i=t.addMarker(t.ybase+t.y),s={data:e,id:this._nextId++,lines:[i]};return i.onDispose((()=>this._removeMarkerFromLink(s,i))),this._dataByLinkId.set(s.id,s),s.id}const i=e,s=this._getEntryIdKey(i),r=this._entriesWithId.get(s);if(r)return this.addLineToLink(r.id,t.ybase+t.y),r.id;const o=t.addMarker(t.ybase+t.y),n={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(n,o))),this._entriesWithId.set(n.key,n),this._dataByLinkId.set(n.id,n),n.id}addLineToLink(e,t){const i=this._dataByLinkId.get(e);if(i&&i.lines.every((e=>e.line!==t))){const e=this._bufferService.buffer.addMarker(t);i.lines.push(e),e.onDispose((()=>this._removeMarkerFromLink(i,e)))}}getLinkData(e){var t;return null===(t=this._dataByLinkId.get(e))||void 0===t?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){const i=e.lines.indexOf(t);-1!==i&&(e.lines.splice(i,1),0===e.lines.length&&(void 0!==e.data.id&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};n=s([r(0,o.IBufferService)],n),t.OscLinkService=n},8343:(e,t)=>{function i(e,t,i){t.di$target===t?t.di$dependencies.push({id:e,index:i}):(t.di$dependencies=[{id:e,index:i}],t.di$target=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0,t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e.di$dependencies||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);const s=function(e,t,r){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");i(s,e,r)};return s.toString=()=>e,t.serviceRegistry.set(e,s),s}},2585:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOscLinkService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.IDirtyRowService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;const s=i(8343);var r;t.IBufferService=(0,s.createDecorator)("BufferService"),t.ICoreMouseService=(0,s.createDecorator)("CoreMouseService"),t.ICoreService=(0,s.createDecorator)("CoreService"),t.ICharsetService=(0,s.createDecorator)("CharsetService"),t.IDirtyRowService=(0,s.createDecorator)("DirtyRowService"),t.IInstantiationService=(0,s.createDecorator)("InstantiationService"),(r=t.LogLevelEnum||(t.LogLevelEnum={}))[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.WARN=2]="WARN",r[r.ERROR=3]="ERROR",r[r.OFF=4]="OFF",t.ILogService=(0,s.createDecorator)("LogService"),t.IOptionsService=(0,s.createDecorator)("OptionsService"),t.IOscLinkService=(0,s.createDecorator)("OscLinkService"),t.IUnicodeService=(0,s.createDecorator)("UnicodeService"),t.IDecorationService=(0,s.createDecorator)("DecorationService")},1480:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;const s=i(8460),r=i(225);t.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new s.EventEmitter;const e=new r.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}get onChange(){return this._onChange.event}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(e){if(!this._providers[e])throw new Error(`unknown Unicode version "${e}"`);this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)}register(e){this._providers[e.version]=e}wcwidth(e){return this._activeProvider.wcwidth(e)}getStringCellWidth(e){let t=0;const i=e.length;for(let s=0;s<i;++s){let r=e.charCodeAt(s);if(55296<=r&&r<=56319){if(++s>=i)return t+this.wcwidth(r);const o=e.charCodeAt(s);56320<=o&&o<=57343?r=1024*(r-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(r)}return t}}}},t={};function i(s){var r=t[s];if(void 0!==r)return r.exports;var o=t[s]={exports:{}};return e[s].call(o.exports,o,o.exports,i),o.exports}var s={};return(()=>{var e=s;Object.defineProperty(e,"__esModule",{value:!0}),e.Terminal=void 0;const t=i(3236),r=i(9042),o=i(7975),n=i(7090),a=i(5741),h=i(8285),l=["cols","rows"];e.Terminal=class{constructor(e){this._core=new t.Terminal(e),this._addonManager=new a.AddonManager,this._publicOptions=Object.assign({},this._core.options);const i=e=>this._core.options[e],s=(e,t)=>{this._checkReadonlyOptions(e),this._core.options[e]=t};for(const e in this._core.options){const t={get:i.bind(this,e),set:s.bind(this,e)};Object.defineProperty(this._publicOptions,e,t)}}_checkReadonlyOptions(e){if(l.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._checkProposedApi(),this._parser||(this._parser=new o.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new n.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._checkProposedApi(),this._buffer||(this._buffer=new h.BufferNamespaceApi(this._core)),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const e=this._core.coreService.decPrivateModes;let t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(const t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}registerLinkProvider(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.addMarker(e)}registerDecoration(e){var t,i,s;return this._checkProposedApi(),this._verifyPositiveIntegers(null!==(t=e.x)&&void 0!==t?t:0,null!==(i=e.width)&&void 0!==i?i:0,null!==(s=e.height)&&void 0!==s?s:0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){this._addonManager.dispose(),this._core.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write("\r\n",t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){return this._addonManager.loadAddon(this,e)}static get strings(){return r}_verifyIntegers(...e){for(const t of e)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(const t of e)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}})(),s})()},639:e=>{"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__639__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e](i,i.exports,__webpack_require__),i.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nc=void 0;var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Sol:()=>n});var e=__webpack_require__(639),t=__webpack_require__.n(e),i=__webpack_require__(869),s=__webpack_require__(893),r=__webpack_require__(320),o=__webpack_require__(509);__webpack_require__(54),__webpack_require__(670),s.ZP.div`
8
+ display : inline-block;
9
+ padding : 0px 5px;
10
+ `,s.ZP.div`
11
+ background-color: darkgray;
12
+ padding: 5px;
13
+ font-size: 13px;
14
+ text-align: center;
15
+ `;class n extends t().Component{constructor(e){super(e),this.init=()=>{const e=null!=this.props.mpsServer?this.props.mpsServer.replace("http","ws"):"",t=null!=this.props.deviceId?this.props.deviceId:"";this.terminal=new i.AmtTerminal,this.redirector=new i.AMTRedirector(this.logger,i.Protocol.SOL,new FileReader,t,16994,"","",0,0,this.props.authToken,`${e}/relay`),this.dataProcessor=new i.TerminalDataProcessor(this.terminal),this.terminal.onSend=this.redirector.send.bind(this.redirector),this.redirector.onNewState=this.terminal.StateChange.bind(this.terminal),this.redirector.onStateChanged=this.onTerminalStateChange.bind(this),this.redirector.onProcessData=this.dataProcessor.processData.bind(this.dataProcessor),this.dataProcessor.processDataToXterm=this.handleWriteToXterm.bind(this),this.dataProcessor.clearTerminal=this.handleClearTerminal.bind(this),this.term=new r.Terminal({cursorStyle:"block",fontWeight:"bold",rows:30,cols:100})},this.cleanUp=()=>{this.terminal=null,this.redirector=null,this.dataProcessor=null,this.term=null},this.handleWriteToXterm=e=>this.term.write(e),this.handleClearTerminal=()=>this.term.reset(),this.handleKeyPress=e=>this.terminal.TermSendKeys(e),this.handleKeyDownPress=e=>this.terminal.handleKeyDownEvents(e),this.startSOL=()=>{void 0!==this.redirector&&this.redirector.start(WebSocket)},this.stopSOL=()=>{void 0!==this.redirector&&this.redirector.stop(),this.handleClearTerminal(),this.cleanUp(),this.init()},this.handleSOLConnect=e=>{e.persist(),0===this.state.SOLstate?this.startSOL():this.stopSOL()},this.onTerminalStateChange=(e,t)=>this.setState({SOLstate:t}),this.handleFeatureStatus=e=>{this.setState({solNotEnabled:e})},this.getSOLState=()=>3===this.state.SOLstate?2:0,this.logger=new i.ConsoleLogger(i.LogLevel.ERROR),this.state={isConnected:!1,SOLstate:0,powerState:0,showSuccess:!1,message:"",isSelected:!0,type:"",solNotEnabled:"",deviceOnSleep:"",isPowerStateLoaded:!1}}componentDidMount(){this.init()}render(){const{SOLstate:e}=this.state;return t().createElement(t().Fragment,null,t().createElement("button",{onClick:this.handleSOLConnect},3===e?"Disconnect":"Connect"),3===e&&this.term&&t().createElement(o.Z,{handleKeyPress:this.handleKeyPress,handleKeyDownPress:this.handleKeyDownPress,xterm:this.term}))}}})(),__webpack_exports__})()));