phirepass-widgets 0.0.78 → 0.0.80

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.
Files changed (36) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/phirepass-rdp.cjs.entry.js +308 -0
  3. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +17 -17
  4. package/dist/cjs/phirepass-terminal.cjs.entry.js +2 -2
  5. package/dist/cjs/phirepass-widgets.cjs.js +1 -1
  6. package/dist/cjs/{protocol-D5iIwePe.js → protocol-DfRfif9I.js} +31 -3
  7. package/dist/collection/collection-manifest.json +1 -0
  8. package/dist/collection/common/protocol.js +1 -0
  9. package/dist/collection/components/phirepass-rdp/phirepass-rdp.css +80 -0
  10. package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +589 -0
  11. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +16 -16
  12. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +1 -1
  13. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  14. package/dist/components/p-y9WE2vrP.js +1 -0
  15. package/dist/components/phirepass-rdp.d.ts +11 -0
  16. package/dist/components/phirepass-rdp.js +1 -0
  17. package/dist/components/phirepass-sftp-client.js +1 -1
  18. package/dist/components/phirepass-terminal.js +2 -2
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/phirepass-rdp.entry.js +306 -0
  21. package/dist/esm/phirepass-sftp-client.entry.js +17 -17
  22. package/dist/esm/phirepass-terminal.entry.js +2 -2
  23. package/dist/esm/phirepass-widgets.js +1 -1
  24. package/dist/esm/{protocol-DV8elohf.js → protocol-y9WE2vrP.js} +30 -2
  25. package/dist/phirepass-widgets/p-3cc5c346.entry.js +1 -0
  26. package/dist/phirepass-widgets/{p-7227a0f6.entry.js → p-53672ba5.entry.js} +1 -1
  27. package/dist/phirepass-widgets/{p-e6c56b50.entry.js → p-a9c02bf1.entry.js} +2 -2
  28. package/dist/phirepass-widgets/p-y9WE2vrP.js +1 -0
  29. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  30. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  31. package/dist/types/common/protocol.d.ts +17 -1
  32. package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +90 -0
  33. package/dist/types/components.d.ts +147 -0
  34. package/package.json +4 -2
  35. package/dist/components/p-DV8elohf.js +0 -1
  36. package/dist/phirepass-widgets/p-DV8elohf.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as t,c as i,g as s,h as e,H as h}from"./p-DovZQ7sb.js";import{I as r,_ as n,C as o,a as l,P as a,E as u}from"./p-DV8elohf.js";
1
+ import{r as t,c as i,g as s,h as e,H as h}from"./p-DovZQ7sb.js";import{I as r,_ as n,C as o,a as l,P as a,E as u}from"./p-y9WE2vrP.js";
2
2
  /**
3
3
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
4
4
  * @license MIT
@@ -46,4 +46,4 @@ import{r as t,c as i,g as s,h as e,H as h}from"./p-DovZQ7sb.js";import{I as r,_
46
46
  * Fabrice Bellard's javascript vt100 for jslinux:
47
47
  * http://bellard.org/jslinux/
48
48
  * Copyright (c) 2011 Fabrice Bellard
49
- */function eu(t,i){let s,e=this,h=!1;return function(){return h||(h=!0,i||(s=t.apply(e,arguments))),s}}(t=>{t.isLessThan=function(t){return t<0},t.isLessThanOrEqual=function(t){return t<=0},t.isGreaterThan=function(t){return t>0},t.isNeitherLessOrGreaterThan=function(t){return 0===t},t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Ha||={}),(t=>{function i(t){return t&&"object"==typeof t&&"function"==typeof t[Symbol.iterator]}t.is=i;let s=Object.freeze([]);function*e(t){yield t}t.empty=function(){return s},t.single=e,t.wrap=function(t){return i(t)?t:e(t)},t.from=function(t){return t||s},t.reverse=function*(t){for(let i=t.length-1;i>=0;i--)yield t[i]},t.isEmpty=function(t){return!t||!0===t[Symbol.iterator]().next().done},t.first=function(t){return t[Symbol.iterator]().next().value},t.some=function(t,i){let s=0;for(let e of t)if(i(e,s++))return!0;return!1},t.find=function(t,i){for(let s of t)if(i(s))return s},t.filter=function*(t,i){for(let s of t)i(s)&&(yield s)},t.map=function*(t,i){let s=0;for(let e of t)yield i(e,s++)},t.flatMap=function*(t,i){let s=0;for(let e of t)yield*i(e,s++)},t.concat=function*(...t){for(let i of t)yield*i},t.reduce=function(t,i,s){let e=s;for(let s of t)e=i(e,s);return e},t.slice=function*(t,i,s=t.length){for(i<0&&(i+=t.length),s<0?s+=t.length:s>t.length&&(s=t.length);i<s;i++)yield t[i]},t.consume=function(i,s=Number.POSITIVE_INFINITY){let e=[];if(0===s)return[e,i];let h=i[Symbol.iterator]();for(let i=0;i<s;i++){let i=h.next();if(i.done)return[e,t.empty()];e.push(i.value)}return[e,{[Symbol.iterator]:()=>h}]},t.asyncToArray=async function(t){let i=[];for await(let s of t)i.push(s);return Promise.resolve(i)}})(Ta||={});var hu=class t{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{!function(t){if(Ta.is(t)){let i=[];for(let s of t)if(s)try{s.dispose()}catch(t){i.push(t)}if(1===i.length)throw i[0];if(i.length>1)throw new AggregateError(i,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}t&&t.dispose()}(this._toDispose)}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(i),i}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&this._toDispose.delete(t)}};hu.DISABLE_DISPOSED_WARNING=!1;var ru=hu,nu=class{constructor(){this._store=new ru}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};nu.None=Object.freeze({dispose(){}});var ou=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(t){this._isDisposed||t===this._value||(this._value?.dispose(),this._value=t)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let t=this._value;return this._value=void 0,t}},lu=class t extends nu{constructor(t){super(),this._terminal=t,this._optionsRefresh=this._register(new ou),this._oldOpen=this._terminal._core.open,this._terminal._core.open=t=>{this._oldOpen?.call(this._terminal._core,t),this._open()},this._terminal._core.screenElement&&this._open(),this._optionsRefresh.value=this._terminal._core.optionsService.onOptionChange((t=>{"fontSize"===t&&(this.rescaleCanvas(),this._renderService?.refreshRows(0,this._terminal.rows))})),this._register(function(t){return{dispose:eu((()=>{t()}))}}((()=>{this.removeLayerFromDom(),this._terminal._core&&this._oldOpen&&(this._terminal._core.open=this._oldOpen,this._oldOpen=void 0),this._renderService&&this._oldSetRenderer&&(this._renderService.setRenderer=this._oldSetRenderer,this._oldSetRenderer=void 0),this._renderService=void 0,this.canvas=void 0,this._ctx=void 0,this._placeholderBitmap?.close(),this._placeholderBitmap=void 0,this._placeholder=void 0})))}static createCanvas(t,i,s){let e=(t||document).createElement("canvas");return e.width=0|i,e.height=0|s,e}static createImageData(t,i,s,e){if("function"!=typeof ImageData){let h=t.createImageData(i,s);return e&&h.data.set(new Uint8ClampedArray(e,0,i*s*4)),h}return e?new ImageData(new Uint8ClampedArray(e,0,i*s*4),i,s):new ImageData(i,s)}static createImageBitmap(t){return"function"!=typeof createImageBitmap?Promise.resolve(void 0):createImageBitmap(t)}showPlaceholder(t){t?!this._placeholder&&-1!==this.cellSize.height&&this._createPlaceHolder(Math.max(this.cellSize.height+1,24)):(this._placeholderBitmap?.close(),this._placeholderBitmap=void 0,this._placeholder=void 0),this._renderService?.refreshRows(0,this._terminal.rows)}get dimensions(){return this._renderService?.dimensions}get cellSize(){return{width:this.dimensions?.css.cell.width||-1,height:this.dimensions?.css.cell.height||-1}}clearLines(t,i){this._ctx?.clearRect(0,t*(this.dimensions?.css.cell.height||0),this.dimensions?.css.canvas.width||0,(++i-t)*(this.dimensions?.css.cell.height||0))}clearAll(){this._ctx?.clearRect(0,0,this.canvas?.width||0,this.canvas?.height||0)}draw(t,i,s,e,h=1){if(!this._ctx)return;let{width:r,height:n}=this.cellSize;if(-1===r||-1===n)return;this._rescaleImage(t,r,n);let o=t.actual,l=Math.ceil(o.width/r),a=i%l*r,u=Math.floor(i/l)*n,c=s*r,A=e*n,f=h*r+a>o.width?o.width-a:h*r,d=u+n>o.height?o.height-u:n;this._ctx.drawImage(o,Math.floor(a),Math.floor(u),Math.ceil(f),Math.ceil(d),Math.floor(c),Math.floor(A),Math.ceil(f),Math.ceil(d))}extractTile(i,s){let{width:e,height:h}=this.cellSize;if(-1===e||-1===h)return;this._rescaleImage(i,e,h);let r=i.actual,n=Math.ceil(r.width/e),o=s%n*e,l=Math.floor(s/n)*h,a=e+o>r.width?r.width-o:e,u=l+h>r.height?r.height-l:h,c=t.createCanvas(this.document,a,u),A=c.getContext("2d");return A?(A.drawImage(r,Math.floor(o),Math.floor(l),Math.floor(a),Math.floor(u),0,0,Math.floor(a),Math.floor(u)),c):void 0}drawPlaceholder(t,i,s=1){if(this._ctx){let{width:e,height:h}=this.cellSize;if(-1===e||-1===h||(this._placeholder?h>=this._placeholder.height&&this._createPlaceHolder(h+1):this._createPlaceHolder(Math.max(h+1,24)),!this._placeholder))return;this._ctx.drawImage(this._placeholderBitmap||this._placeholder,t*e,i*h%2?0:1,e*s,h,t*e,i*h,e*s,h)}}rescaleCanvas(){this.canvas&&(this.canvas.width!==this.dimensions.css.canvas.width||this.canvas.height!==this.dimensions.css.canvas.height)&&(this.canvas.width=this.dimensions.css.canvas.width||0,this.canvas.height=this.dimensions.css.canvas.height||0)}_rescaleImage(i,s,e){if(s===i.actualCellSize.width&&e===i.actualCellSize.height)return;let{width:h,height:r}=i.origCellSize;if(s===h&&e===r)return i.actual=i.orig,i.actualCellSize.width=h,void(i.actualCellSize.height=r);let n=t.createCanvas(this.document,Math.ceil(i.orig.width*s/h),Math.ceil(i.orig.height*e/r)),o=n.getContext("2d");o&&(o.drawImage(i.orig,0,0,n.width,n.height),i.actual=n,i.actualCellSize.width=s,i.actualCellSize.height=e)}_open(){this._renderService=this._terminal._core._renderService,this._oldSetRenderer=this._renderService.setRenderer.bind(this._renderService),this._renderService.setRenderer=t=>{this.removeLayerFromDom(),this._oldSetRenderer?.call(this._renderService,t)}}insertLayerToDom(){this.document&&this._terminal._core.screenElement?this.canvas||(this.canvas=t.createCanvas(this.document,this.dimensions?.css.canvas.width||0,this.dimensions?.css.canvas.height||0),this.canvas.classList.add("xterm-image-layer"),this._terminal._core.screenElement.appendChild(this.canvas),this._ctx=this.canvas.getContext("2d",{alpha:!0,desynchronized:!0}),this.clearAll()):console.warn("image addon: cannot insert output canvas to DOM, missing document or screenElement")}removeLayerFromDom(){this.canvas&&(this._ctx=void 0,this.canvas.remove(),this.canvas=void 0)}_createPlaceHolder(i=24){this._placeholderBitmap?.close(),this._placeholderBitmap=void 0;let s=32,e=t.createCanvas(this.document,s,i),h=e.getContext("2d",{alpha:!1});if(!h)return;let r=t.createImageData(h,s,i),n=new Uint32Array(r.data.buffer),o=(0,su.toRGBA8888)(0,0,0),l=(0,su.toRGBA8888)(255,255,255);n.fill(o);for(let t=0;t<i;++t){let i=t%2,e=t*s;for(let t=0;t<s;t+=2)n[e+t+i]=l}h.putImageData(r,0,0);let a=screen.width+s-1&-32||4096;this._placeholder=t.createCanvas(this.document,a,i);let u=this._placeholder.getContext("2d",{alpha:!1});if(u){for(let t=0;t<a;t+=s)u.drawImage(e,t,0);t.createImageBitmap(this._placeholder).then((t=>this._placeholderBitmap=t))}else this._placeholder=void 0}get document(){return this._terminal._core._coreBrowserService?.window.document}},au={width:7,height:14},uu=class t{constructor(t=0,i=0,s=-1,e=-1){this.imageId=s,this.tileId=e,this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(t){this._ext&=-67108864,this._ext|=67108863&t}get underlineVariantOffset(){let t=(3758096384&this._ext)>>29;return t<0?4294967288^t:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}get urlId(){return this._urlId}set urlId(t){this._urlId=t}clone(){return new t(this._ext,this._urlId,this.imageId,this.tileId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId&&-1===this.imageId}},cu=new uu,Au=class{constructor(t,i,s){this._terminal=t,this._renderer=i,this._opts=s,this._images=new Map,this._lastId=0,this._lowestId=0,this._fullyCleared=!1,this._needsFullClear=!1,this._pixelLimit=25e5;try{this.setLimit(this._opts.storageLimit)}catch(t){console.error(t.message),console.warn(`storageLimit is set to ${this.getLimit()} MB`)}this._viewportMetrics={cols:this._terminal.cols,rows:this._terminal.rows}}dispose(){this.reset()}reset(){for(let t of this._images.values())t.marker?.dispose();this._images.clear(),this._renderer.clearAll()}getLimit(){return 4*this._pixelLimit/1e6}setLimit(t){if(t<.5||t>1e3)throw RangeError("invalid storageLimit, should be at least 0.5 MB and not exceed 1G");this._pixelLimit=t/4*1e6>>>0,this._evictOldest(0)}getUsage(){return 4*this._getStoredPixels()/1e6}_getStoredPixels(){let t=0;for(let i of this._images.values())i.orig&&(t+=i.orig.width*i.orig.height,i.actual&&i.actual!==i.orig&&(t+=i.actual.width*i.actual.height));return t}_delImg(t){let i=this._images.get(t);this._images.delete(t),i&&window.ImageBitmap&&i.orig instanceof ImageBitmap&&i.orig.close()}wipeAlternate(){let t=[];for(let[i,s]of this._images.entries())"alternate"===s.bufferType&&(s.marker?.dispose(),t.push(i));for(let i of t)this._delImg(i);this._needsFullClear=!0,this._fullyCleared=!1}advanceCursor(t){if(this._opts.sixelScrolling){let i=this._renderer.cellSize;(-1===i.width||-1===i.height)&&(i=au);let s=Math.ceil(t/i.height);for(let t=1;t<s;++t)this._terminal._core._inputHandler.lineFeed()}}addImage(t){this._evictOldest(t.width*t.height);let i=this._renderer.cellSize;(-1===i.width||-1===i.height)&&(i=au);let s=Math.ceil(t.width/i.width),e=Math.ceil(t.height/i.height),h=++this._lastId,r=this._terminal._core.buffer,n=this._terminal.cols,o=this._terminal.rows,l=r.x,a=r.y,u=l,c=0;this._opts.sixelScrolling||(r.x=0,r.y=0,u=0),this._terminal._core._inputHandler._dirtyRowTracker.markDirty(r.y);for(let t=0;t<e;++t){let i=r.lines.get(r.y+r.ybase);for(let e=0;e<s&&!(u+e>=n);++e)this._writeToCell(i,u+e,h,t*s+e),c++;if(this._opts.sixelScrolling)t<e-1&&this._terminal._core._inputHandler.lineFeed();else if(++r.y>=o)break;r.x=u}this._terminal._core._inputHandler._dirtyRowTracker.markDirty(r.y),this._opts.sixelScrolling?r.x=u:(r.x=l,r.y=a);let A=[];for(let[t,i]of this._images.entries())i.tileCount<1&&(i.marker?.dispose(),A.push(t));for(let t of A)this._delImg(t);let f=this._terminal.registerMarker(0);f?.onDispose((()=>{this._images.get(h)&&this._delImg(h)})),"alternate"===this._terminal.buffer.active.type&&this._evictOnAlternate();let d={orig:t,origCellSize:i,actual:t,actualCellSize:{...i},marker:f||void 0,tileCount:c,bufferType:this._terminal.buffer.active.type};this._images.set(h,d)}render(t){if(!this._renderer.canvas&&this._images.size&&(this._renderer.insertLayerToDom(),!this._renderer.canvas))return;if(this._renderer.rescaleCanvas(),!this._images.size)return this._fullyCleared||(this._renderer.clearAll(),this._fullyCleared=!0,this._needsFullClear=!1),void(this._renderer.canvas&&this._renderer.removeLayerFromDom());this._needsFullClear&&(this._renderer.clearAll(),this._fullyCleared=!0,this._needsFullClear=!1);let{start:i,end:s}=t,e=this._terminal._core.buffer,h=this._terminal._core.cols;this._renderer.clearLines(i,s);for(let t=i;t<=s;++t){let i=e.lines.get(t+e.ydisp);if(!i)return;for(let s=0;s<h;++s)if(268435456&i.getBg(s)){let e=i._extendedAttrs[s]||cu,r=e.imageId;if(void 0===r||-1===r)continue;let n=this._images.get(r);if(-1!==e.tileId){let o=e.tileId,l=s,a=1;for(;++s<h&&268435456&i.getBg(s)&&(e=i._extendedAttrs[s]||cu)&&e.imageId===r&&e.tileId===o+a;)a++;s--,n?n.actual&&this._renderer.draw(n,o,l,t,a):this._opts.showPlaceholder&&this._renderer.drawPlaceholder(l,t,a),this._fullyCleared=!1}}}}viewportResize(t){if(!this._images.size)return void(this._viewportMetrics=t);if(this._viewportMetrics.cols>=t.cols)return void(this._viewportMetrics=t);let i=this._terminal._core.buffer,s=i.lines.length,e=this._viewportMetrics.cols-1;for(let h=0;h<s;++h){let s=i.lines.get(h);if(268435456&s.getBg(e)){let i=s._extendedAttrs[e]||cu,h=i.imageId;if(void 0===h||-1===h)continue;let r=this._images.get(h);if(!r)continue;let n=Math.ceil((r.actual?.width||0)/r.actualCellSize.width);if(i.tileId%n+1>=n)continue;let o=!1;for(let i=e+1;i>t.cols;++i)if(4194303&s._data[3*i+0]){o=!0;break}if(o)continue;let l=Math.min(t.cols,n-i.tileId%n+e),a=i.tileId;for(let t=e+1;t<l;++t)this._writeToCell(s,t,h,++a),r.tileCount++}}this._viewportMetrics=t}getImageAtBufferCell(t,i){let s=this._terminal._core.buffer.lines.get(i);if(s&&268435456&s.getBg(t)){let i=s._extendedAttrs[t]||cu;if(i.imageId&&-1!==i.imageId){let t=this._images.get(i.imageId)?.orig;if(window.ImageBitmap&&t instanceof ImageBitmap){let i=lu.createCanvas(window.document,t.width,t.height);return i.getContext("2d")?.drawImage(t,0,0,t.width,t.height),i}return t}}}extractTileAtBufferCell(t,i){let s=this._terminal._core.buffer.lines.get(i);if(s&&268435456&s.getBg(t)){let i=s._extendedAttrs[t]||cu;if(i.imageId&&-1!==i.imageId&&-1!==i.tileId){let t=this._images.get(i.imageId);if(t)return this._renderer.extractTile(t,i.tileId)}}}_evictOldest(t){let i=this._getStoredPixels(),s=i;for(;this._pixelLimit<s+t&&this._images.size;){let t=this._images.get(++this._lowestId);t&&t.orig&&(s-=t.orig.width*t.orig.height,t.actual&&t.orig!==t.actual&&(s-=t.actual.width*t.actual.height),t.marker?.dispose(),this._delImg(this._lowestId))}return i-s}_writeToCell(t,i,s,e){if(268435456&t._data[3*i+2]){let h=t._extendedAttrs[i];if(h){if(void 0!==h.imageId){let t=this._images.get(h.imageId);return t&&t.tileCount--,h.imageId=s,void(h.tileId=e)}return void(t._extendedAttrs[i]=new uu(h.ext,h.urlId,s,e))}}t._data[3*i+2]|=268435456,t._extendedAttrs[i]=new uu(0,0,s,e)}_evictOnAlternate(){for(let t of this._images.values())"alternate"===t.bufferType&&(t.tileCount=0);let t=this._terminal._core.buffer;for(let i=0;i<this._terminal.rows;++i){let s=t.lines.get(i);if(s)for(let t=0;t<this._terminal.cols;++t)if(268435456&s._data[3*t+2]){let i=s._extendedAttrs[t]?.imageId;if(i){let t=this._images.get(i);t&&t.tileCount++}}}let i=[];for(let[t,s]of this._images.entries())"alternate"===s.bufferType&&!s.tileCount&&(s.marker?.dispose(),i.push(t));for(let t of i)this._delImg(t)}},fu=Ya(Va());function du(t){let i="";for(let s=0;s<t.length;++s)i+=String.fromCharCode(t[s]);return i}function gu(t){let i=0;for(let s=0;s<t.length;++s){if(t[s]<48||t[s]>57)throw new Error("illegal char");i=10*i+t[s]-48}return i}function wu(t){let i=du(t);if(!i.match(/^((auto)|(\d+?((px)|(%)){0,1}))$/))throw new Error("illegal size");return i}var pu={inline:gu,size:gu,name:function(t){if(typeof Buffer<"u")return Buffer.from(du(t),"base64").toString();let i=atob(du(t)),s=new Uint8Array(i.length);for(let t=0;t<s.length;++t)s[t]=i.charCodeAt(t);return(new TextDecoder).decode(s)},width:wu,height:wu,preserveAspectRatio:gu},Cu=[70,105,108,101],mu=1024,Iu=class{constructor(){this.state=0,this._buffer=new Uint32Array(mu),this._position=0,this._key="",this.fields={}}reset(){this._buffer.fill(0),this.state=0,this._position=0,this.fields={},this._key=""}parse(t,i,s){let e=this.state,h=this._position,r=this._buffer;if(1===e||4===e||0===e&&h>6)return-1;for(let n=i;n<s;++n){let i=t[n];switch(i){case 59:if(!this._storeValue(h))return this._a();e=2,h=0;break;case 61:if(0===e){for(let t=0;t<Cu.length;++t)if(r[t]!==Cu[t])return this._a();e=2,h=0}else if(2===e){if(!this._storeKey(h))return this._a();e=3,h=0}else if(3===e){if(h>=mu)return this._a();r[h++]=i}break;case 58:return 3!==e||this._storeValue(h)?(this.state=4,n+1):this._a();default:if(h>=mu)return this._a();r[h++]=i}}return this.state=e,this._position=h,-2}_a(){return this.state=1,-1}_storeKey(t){let i=du(this._buffer.subarray(0,t));return!!i&&(this._key=i,this.fields[i]=null,!0)}_storeValue(t){if(this._key){try{let i=this._buffer.slice(0,t);this.fields[this._key]=pu[this._key]?pu[this._key](i):i}catch{return!1}return!0}return!1}},vu={mime:"unsupported",width:0,height:0},Bu={name:"Unnamed file",size:0,width:"auto",height:"auto",preserveAspectRatio:1,inline:0},Mu=class{constructor(t,i,s,e){this._opts=t,this._renderer=i,this._storage=s,this._coreTerminal=e,this._aborted=!1,this._hp=new Iu,this._header=Bu,this._dec=new fu.default(4194304),this._metrics=vu}reset(){}start(){this._aborted=!1,this._header=Bu,this._metrics=vu,this._hp.reset()}put(t,i,s){if(!this._aborted)if(4===this._hp.state)this._dec.put(t,i,s)&&(this._dec.release(),this._aborted=!0);else{let e=this._hp.parse(t,i,s);if(-1===e)return void(this._aborted=!0);if(e>0){if(this._header=Object.assign({},Bu,this._hp.fields),!this._header.inline||!this._header.size||this._header.size>this._opts.iipSizeLimit)return void(this._aborted=!0);this._dec.init(this._header.size),this._dec.put(t,e,s)&&(this._dec.release(),this._aborted=!0)}}}end(t){if(this._aborted)return!0;let i=0,s=0,e=!0;if((e=t)&&(e=!this._dec.end())&&(this._metrics=function(t){if(t.length<24)return vu;let i=new Uint32Array(t.buffer,t.byteOffset,6);if(1196314761===i[0]&&169478669===i[1]&&1380206665===i[3])return{mime:"image/png",width:t[16]<<24|t[17]<<16|t[18]<<8|t[19],height:t[20]<<24|t[21]<<16|t[22]<<8|t[23]};if(255===t[0]&&216===t[1]&&255===t[2]){let[i,s]=function(t){let i=t.length,s=4,e=t[s]<<8|t[s+1];for(;;){if(s+=e,s>=i)return[0,0];if(255!==t[s])return[0,0];if(192===t[s+1]||194===t[s+1])return s+8<i?[t[s+7]<<8|t[s+8],t[s+5]<<8|t[s+6]]:[0,0];s+=2,e=t[s]<<8|t[s+1]}}(t);return{mime:"image/jpeg",width:i,height:s}}return 944130375!==i[0]||55!==t[4]&&57!==t[4]||97!==t[5]?vu:{mime:"image/gif",width:t[7]<<8|t[6],height:t[9]<<8|t[8]}}(this._dec.data8),(e="unsupported"!==this._metrics.mime)&&(i=this._metrics.width,s=this._metrics.height,(e=i&&s&&i*s<this._opts.pixelLimit)&&([i,s]=this._resize(i,s).map(Math.floor),e=i&&s&&i*s<this._opts.pixelLimit))),!e)return this._dec.release(),!0;let h=new Blob([this._dec.data8],{type:this._metrics.mime});if(this._dec.release(),!window.createImageBitmap){let t=URL.createObjectURL(h),e=new Image;return new Promise((h=>{e.addEventListener("load",(()=>{URL.revokeObjectURL(t);let r=lu.createCanvas(window.document,i,s);r.getContext("2d")?.drawImage(e,0,0,i,s),this._storage.addImage(r),h(!0)})),e.src=t,setTimeout((()=>h(!0)),1e3)}))}return createImageBitmap(h,{resizeWidth:i,resizeHeight:s}).then((t=>(this._storage.addImage(t),!0)))}_resize(t,i){let s=this._renderer.dimensions?.css.cell.width||au.width,e=this._renderer.dimensions?.css.cell.height||au.height,h=this._renderer.dimensions?.css.canvas.width||s*this._coreTerminal.cols,r=this._renderer.dimensions?.css.canvas.height||e*this._coreTerminal.rows,n=this._dim(this._header.width,h,s),o=this._dim(this._header.height,r,e);if(!n&&!o){let s=Math.min(h/t,(r-e)/i);return s<1?[t*s,i*s]:[t,i]}return n?!this._header.preserveAspectRatio&&n&&o?[n,o]:[n,i*n/t]:[t*o/i,o]}_dim(t,i,s){return"auto"===t?0:t.endsWith("%")?parseInt(t.slice(0,-1))*i/100:t.endsWith("px")?parseInt(t.slice(0,-2)):parseInt(t)*s}},yu=Ya(Za()),Qu=Ya(iu()),Eu=yu.PALETTE_ANSI_256;Eu.set(yu.PALETTE_VT340_COLOR);var bu=class{constructor(t,i,s){this._opts=t,this._storage=i,this._coreTerminal=s,this._size=0,this._aborted=!1,(0,Qu.DecoderAsync)({memoryLimit:4*this._opts.pixelLimit,palette:Eu,paletteLimit:this._opts.sixelPaletteLimit}).then((t=>this._dec=t))}reset(){this._dec&&(this._dec.release(),this._dec._palette.fill(0),this._dec.init(0,Eu,this._opts.sixelPaletteLimit))}hook(t){if(this._size=0,this._aborted=!1,this._dec){let i=1===t.params[1]?0:function(t,i){let s=0;if(!i)return s;if(t.isInverse())if(t.isFgDefault())s=ku(i.foreground.rgba);else if(t.isFgRGB()){let i=t.constructor.toColorRGB(t.getFgColor());s=(0,yu.toRGBA8888)(...i)}else s=ku(i.ansi[t.getFgColor()].rgba);else if(t.isBgDefault())s=ku(i.background.rgba);else if(t.isBgRGB()){let i=t.constructor.toColorRGB(t.getBgColor());s=(0,yu.toRGBA8888)(...i)}else s=ku(i.ansi[t.getBgColor()].rgba);return s}(this._coreTerminal._core._inputHandler._curAttrData,this._coreTerminal._core._themeService?.colors);this._dec.init(i,null,this._opts.sixelPaletteLimit)}}put(t,i,s){if(!this._aborted&&this._dec){if(this._size+=s-i,this._size>this._opts.sixelSizeLimit)return console.warn("SIXEL: too much data, aborting"),this._aborted=!0,void this._dec.release();try{this._dec.decode(t,i,s)}catch(t){console.warn(`SIXEL: error while decoding image - ${t}`),this._aborted=!0,this._dec.release()}}}unhook(t){if(this._aborted||!t||!this._dec)return!0;let i=this._dec.width,s=this._dec.height;if(!i||!s)return s&&this._storage.advanceCursor(s),!0;let e=lu.createCanvas(void 0,i,s);return e.getContext("2d")?.putImageData(new ImageData(this._dec.data8,i,s),0,0),this._dec.memoryUsage>4194304&&this._dec.release(),this._storage.addImage(e),!0}};function ku(t){return yu.BIG_ENDIAN?t:(255&t)<<24|(t>>>8&255)<<16|(t>>>16&255)<<8|t>>>24&255}var xu={enableSizeReports:!0,pixelLimit:16777216,sixelSupport:!0,sixelScrolling:!0,sixelPaletteLimit:256,sixelSizeLimit:25e6,storageLimit:128,showPlaceholder:!0,iipSupport:!0,iipSizeLimit:2e7},Du=class{constructor(t){this._disposables=[],this._handlers=new Map,this._opts=Object.assign({},xu,t),this._defaultOpts=Object.assign({},xu,t)}dispose(){for(let t of this._disposables)t.dispose();this._disposables.length=0,this._handlers.clear()}_disposeLater(...t){for(let i of t)this._disposables.push(i)}activate(t){if(this._terminal=t,this._renderer=new lu(t),this._storage=new Au(t,this._renderer,this._opts),this._opts.enableSizeReports){let i=t.options.windowOptions||{};i.getWinSizePixels=!0,i.getCellSizePixels=!0,i.getWinSizeChars=!0,t.options.windowOptions=i}if(this._disposeLater(this._renderer,this._storage,t.parser.registerCsiHandler({prefix:"?",final:"h"},(t=>this._decset(t))),t.parser.registerCsiHandler({prefix:"?",final:"l"},(t=>this._decrst(t))),t.parser.registerCsiHandler({final:"c"},(t=>this._da1(t))),t.parser.registerCsiHandler({prefix:"?",final:"S"},(t=>this._xtermGraphicsAttributes(t))),t.onRender((t=>this._storage?.render(t))),t.parser.registerCsiHandler({intermediates:"!",final:"p"},(()=>this.reset())),t.parser.registerEscHandler({final:"c"},(()=>this.reset())),t._core._inputHandler.onRequestReset((()=>this.reset())),t.buffer.onBufferChange((()=>this._storage?.wipeAlternate())),t.onResize((t=>this._storage?.viewportResize(t)))),this._opts.sixelSupport){let i=new bu(this._opts,this._storage,t);this._handlers.set("sixel",i),this._disposeLater(t._core._inputHandler._parser.registerDcsHandler({final:"q"},i))}if(this._opts.iipSupport){let i=new Mu(this._opts,this._renderer,this._storage,t);this._handlers.set("iip",i),this._disposeLater(t._core._inputHandler._parser.registerOscHandler(1337,i))}}reset(){this._opts.sixelScrolling=this._defaultOpts.sixelScrolling,this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,this._storage?.reset();for(let t of this._handlers.values())t.reset();return!1}get storageLimit(){return this._storage?.getLimit()||-1}set storageLimit(t){this._storage?.setLimit(t),this._opts.storageLimit=t}get storageUsage(){return this._storage?this._storage.getUsage():-1}get showPlaceholder(){return this._opts.showPlaceholder}set showPlaceholder(t){this._opts.showPlaceholder=t,this._renderer?.showPlaceholder(t)}getImageAtBufferCell(t,i){return this._storage?.getImageAtBufferCell(t,i)}extractTileAtBufferCell(t,i){return this._storage?.extractTileAtBufferCell(t,i)}_report(t){this._terminal?._core.coreService.triggerDataEvent(t)}_decset(t){for(let i=0;i<t.length;++i)80===t[i]&&(this._opts.sixelScrolling=!1);return!1}_decrst(t){for(let i=0;i<t.length;++i)80===t[i]&&(this._opts.sixelScrolling=!0);return!1}_da1(t){return!!t[0]||!!this._opts.sixelSupport&&(this._report("[?62;4;9;22c"),!0)}_xtermGraphicsAttributes(t){if(t.length<2)return!0;if(1===t[0])switch(t[1]){case 1:return this._report(`[?${t[0]};0;${this._opts.sixelPaletteLimit}S`),!0;case 2:this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,this._report(`[?${t[0]};0;${this._opts.sixelPaletteLimit}S`);for(let t of this._handlers.values())t.reset();return!0;case 3:return t.length>2&&!(t[2]instanceof Array)&&t[2]<=4096?(this._opts.sixelPaletteLimit=t[2],this._report(`[?${t[0]};0;${this._opts.sixelPaletteLimit}S`)):this._report(`[?${t[0]};2S`),!0;case 4:return this._report(`[?${t[0]};0;4096S`),!0;default:return this._report(`[?${t[0]};2S`),!0}if(2===t[0])switch(t[1]){case 1:let i=this._renderer?.dimensions?.css.canvas.width,s=this._renderer?.dimensions?.css.canvas.height;if(!i||!s){let t=au;i=(this._terminal?.cols||80)*t.width,s=(this._terminal?.rows||24)*t.height}if(i*s<this._opts.pixelLimit)this._report(`[?${t[0]};0;${i.toFixed(0)};${s.toFixed(0)}S`);else{let i=Math.floor(Math.sqrt(this._opts.pixelLimit));this._report(`[?${t[0]};0;${i};${i}S`)}return!0;case 4:let e=Math.floor(Math.sqrt(this._opts.pixelLimit));return this._report(`[?${t[0]};0;${e};${e}S`),!0;default:return this._report(`[?${t[0]};2S`),!0}return this._report(`[?${t[0]};1S`),!0}};const Lu=class{constructor(s){t(this,s),this.connectionStateChanged=i(this,"connectionStateChanged")}terminal;fitAddon;webLinksAddon;searchAddon;webglAddon;serializeAddon;imageAddon;channel;containerEl;domReady=!1;runtimeReady=!1;connected=!1;inputMode=r.Default;resizeObserver;resizeDebounceHandle;session_id;usernameBuffer="";passwordBuffer="";xtermImageSettings={enableSizeReports:!0,pixelLimit:16777216,sixelSupport:!0,sixelScrolling:!0,sixelPaletteLimit:256,sixelSizeLimit:25e6,storageLimit:128,showPlaceholder:!0,iipSupport:!0,iipSizeLimit:2e7};get el(){return s(this)}terminalOptions={termName:"xterm-256color",rendererType:"canvas",allowTransparency:!1,fontFamily:'"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace',fontSize:12,letterSpacing:0,lineHeight:1,allowProposedApi:!0,cursorBlink:!0,cursorWidth:1,theme:{background:"#0b1021",foreground:"#e2e8f0",cursor:"#67e8f9"},scrollback:1e4,fastScrollModifier:"shift",fastScrollSensitivity:5,bellStyle:"sound",convertEol:!1,disableStdin:!1,rightClickSelectsWord:!0,drawBoldTextInBrightColors:!0,minimumContrastRatio:1,windowsMode:!1,macOptionIsMeta:!1,altClickMovesCursor:!0};serverHost="phirepass.com";serverPort=443;allowInsecure=!1;heartbeatInterval=3e4;nodeId;serviceId;token;onNodeIdChange(t,i){this.reset_session_state(),this.terminal.reset(),this.channel&&this.channel.is_connected()&&this.close_comms(),t&&(this.open_comms(),this.channel.connect())}serverId;onServerIdChange(t,i){this.onNodeIdChange(this.nodeId,this.nodeId)}connectionStateChanged;create_web_socket_endpoint(){const t=this.allowInsecure?"ws":"wss";return this.allowInsecure||443!==this.serverPort?this.allowInsecure&&80===this.serverPort?`${t}://${this.serverHost}`:`${t}://${this.serverHost}:${this.serverPort}`:`${t}://${this.serverHost}`}async connectedCallback(){await n(),this.setup_terminal(),this.open_comms(),this.runtimeReady=!0,this.nodeId?this.try_connect():console.warn("Prop node_id is not set. Cannot connect to terminal.")}componentDidLoad(){this.domReady=!0,this.try_connect()}async disconnectedCallback(){this.resizeDebounceHandle&&(clearTimeout(this.resizeDebounceHandle),this.resizeDebounceHandle=void 0),this.resizeObserver&&this.resizeObserver.disconnect(),this.connected=!1,this.domReady=!1,this.runtimeReady=!1,this.close_comms(),this.destroy_terminal()}is_terminal_open(){return Boolean(this.connected&&this.containerEl&&this.terminal.element)}fit_terminal_safely(){if(this.fitAddon&&this.is_terminal_open())try{this.fitAddon.fit()}catch(t){console.warn("Skipping terminal fit before renderer is ready:",t)}}try_connect(){!this.connected&&this.domReady&&this.runtimeReady&&this.containerEl&&this.terminal&&this.channel&&this.connect()}setup_terminal(){this.terminal=new Mr(this.terminalOptions),this.fitAddon=new yr,this.terminal.loadAddon(this.fitAddon),this.webLinksAddon=new Dr,this.terminal.loadAddon(this.webLinksAddon),this.searchAddon=new Ln,this.terminal.loadAddon(this.searchAddon),this.serializeAddon=new Ga,this.terminal.loadAddon(this.serializeAddon),this.imageAddon=new Du(this.xtermImageSettings),this.terminal.loadAddon(this.imageAddon);try{this.webglAddon=new Qa,this.terminal.loadAddon(this.webglAddon)}catch(t){console.warn("WebGL addon not available or failed to load:",t)}"function"==typeof this.terminal.onResize&&this.terminal.onResize((()=>{this.send_ssh_terminal_resize()}))}destroy_terminal(){this.terminal&&(this.terminal.reset(),"function"==typeof this.terminal.dispose&&this.terminal.dispose())}open_comms(){this.channel=this.serverId?new o(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId,this.serverId):new o(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId),this.channel.on_connection_open((()=>{this.connectionStateChanged.emit([l.Connected]),this.channel.authenticate(this.token,this.nodeId)})),this.channel.on_connection_close((()=>{this.connectionStateChanged.emit([l.Disconnected]),this.terminal.reset()})),this.channel.on_connection_error((t=>{this.connectionStateChanged.emit([l.Error,t])})),this.channel.on_connection_message((()=>{})),this.channel.on_protocol_message((t=>{const{web:i}=t.data;switch(i.type){case a.Error:this.handle_error(i);break;case a.AuthSuccess:this.handle_auth_success(i);break;case a.TunnelOpened:this.handle_tunnel_opened(i);break;case a.TunnelClosed:this.handle_tunnel_closed(i);break;case a.TunnelData:this.handle_tunnel_data(i);break;default:console.warn("Unknown protocol message type:",i)}}))}send_ssh_terminal_resize(){if(!this.containerEl)return void console.warn("Cannot send terminal resize: container element not available");if(!this.nodeId)return void console.warn("Cannot send terminal resize: node_id is missing");if(!this.channel)return void console.warn("Cannot send terminal resize: channel is not initialized");if(!this.channel.is_connected())return void console.warn("Cannot send terminal resize: channel not connected");if(!this.session_id)return void console.warn("Cannot send terminal resize: session_id is missing");this.fit_terminal_safely();const t=this.terminal?.cols??0,i=this.terminal?.rows??0,s=this.containerEl.clientWidth??0,e=this.containerEl.clientHeight??0;if(t<=0||i<=0||s<=0||e<=0)console.warn(`Cannot send terminal resize: invalid terminal dimensions cols=${t}, rows=${i}, px_width=${s}, px_height=${e}`);else try{console.log(`Sending terminal resize: cols=${t}, rows=${i}, px_width=${s}, px_height=${e}`),this.channel.send_ssh_terminal_resize(this.nodeId,this.session_id,t,i,s,e)}catch(t){console.error("Failed to send terminal resize:",t)}}send_ssh_data(t){this.channel.is_connected()&&this.session_id&&this.channel.send_ssh_tunnel_data(this.nodeId,this.session_id,t)}handle_error(t){switch(t.kind){case u.Generic:case u.Authentication:this.terminal.reset(),this.terminal.write(t.message+"\r\n"),this.terminal.focus(),this.usernameBuffer="",this.passwordBuffer="";break;case u.RequiresUsernamePassword:case u.RequiresUsername:this.terminal.reset(),this.inputMode=r.Username,this.usernameBuffer="",this.terminal.write("Enter your username: "),this.terminal.focus();break;case u.RequiresPassword:this.terminal.reset(),this.inputMode=r.Password,this.passwordBuffer="",this.terminal.write("Enter your password: "),this.terminal.focus();break;default:console.warn("Unknown error kind:",t)}}close_comms(){this.channel.stop_heartbeat(),this.channel.disconnect()}cancel_credential_entry(){this.inputMode=r.Default,this.clear_creds_buffer(),this.terminal.writeln("Authentication cancelled."),this.terminal.reset(),this.close_comms()}clear_creds_buffer(){this.usernameBuffer="",this.passwordBuffer=""}reset_session_state(){this.session_id=void 0,this.inputMode=r.Default,this.clear_creds_buffer()}handle_auth_success(t){this.clear_creds_buffer(),this.channel.start_heartbeat(this.heartbeatInterval<=15e3?3e4:this.heartbeatInterval),this.channel.open_ssh_tunnel(this.nodeId,this.serviceId)}handle_tunnel_opened(t){this.session_id=t.sid,this.terminal.reset(),this.fit_terminal_safely(),this.send_ssh_terminal_resize()}handle_tunnel_data(t){this.terminal.write(new Uint8Array(t.data))}handle_tunnel_closed(t){this.session_id=void 0,this.inputMode=r.Default,this.clear_creds_buffer(),this.terminal.reset(),this.terminal.writeln("Connection closed."),this.close_comms()}connect(){const t=this.containerEl;console.log("Attempting to connect terminal to container:",t),t&&(this.terminal.open(t),console.log("Terminal opened in container"),this.connected=!0,this.fit_terminal_safely(),this.terminal.focus(),this.terminal.onData(this.handle_terminal_data.bind(this)),this.channel.connect(),this.setup_resize_observer(),console.log("Terminal connected and ready"))}setup_resize_observer(){this.resizeObserver=new ResizeObserver((()=>{console.log("Container resized, fitting terminal"),this.resizeDebounceHandle&&clearTimeout(this.resizeDebounceHandle),this.resizeDebounceHandle=setTimeout((()=>{this.fit_terminal_safely(),this.send_ssh_terminal_resize()}),100)})),this.resizeObserver.observe(this.containerEl??this.el)}handle_terminal_data(t){switch(this.inputMode){case r.Username:this.handle_username_input(t);break;case r.Password:this.handle_password_input(t);break;case r.Default:this.send_ssh_data(t)}}handle_username_input(t){return"\r"===t||"\n"===t?(this.terminal.write("\r\n"),void this.submit_username()):""===t?(this.terminal.write("^C\r\n"),void this.cancel_credential_entry()):void(""!==t?t>=" "&&t<="~"&&(this.usernameBuffer+=t,this.terminal.write(t)):this.usernameBuffer.length&&(this.usernameBuffer=this.usernameBuffer.slice(0,-1),this.terminal.write("\b \b")))}submit_username(){if(!this.channel.is_connected())return;const t=this.usernameBuffer.trim();if(!t)return this.terminal.writeln(""),this.terminal.write("Enter your username: "),void(this.usernameBuffer="");this.inputMode=r.Default,this.channel.open_ssh_tunnel(this.nodeId,this.serviceId,t)}handle_password_input(t){return"\r"===t||"\n"===t?(this.terminal.write("\r\n"),void this.submit_password()):""===t?(this.terminal.write("^C\r\n"),void this.cancel_credential_entry()):void(""!==t?t>=" "&&t<="~"&&(this.passwordBuffer+=t,this.terminal.write("*")):this.passwordBuffer.length&&(this.passwordBuffer=this.passwordBuffer.slice(0,-1),this.terminal.write("\b \b")))}submit_password(){if(!this.channel.is_connected())return;const t=this.passwordBuffer;if(!t)return this.terminal.writeln(""),this.terminal.write("Enter your password: "),void(this.passwordBuffer="");this.inputMode=r.Default,this.channel.open_ssh_tunnel(this.nodeId,this.serviceId,this.usernameBuffer.trim(),t),this.passwordBuffer="",this.usernameBuffer=""}render(){return e(h,{key:"8bc2181d5ca26f6e6552591b7d399f81bece3efa"},e("div",{key:"4c7085ba44cebb23f7712fbfe4ea52a9e8bde6d7",id:"ccc",ref:t=>this.containerEl=t}))}static get watchers(){return{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}}};Lu.style=".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-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:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1 !important}.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-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px !important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:rgba(0,0,0,0);transition:opacity 100ms linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity 800ms linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:host{display:block;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}:host #ccc{width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}";export{Lu as phirepass_terminal}
49
+ */function eu(t,i){let s,e=this,h=!1;return function(){return h||(h=!0,i||(s=t.apply(e,arguments))),s}}(t=>{t.isLessThan=function(t){return t<0},t.isLessThanOrEqual=function(t){return t<=0},t.isGreaterThan=function(t){return t>0},t.isNeitherLessOrGreaterThan=function(t){return 0===t},t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(Ha||={}),(t=>{function i(t){return t&&"object"==typeof t&&"function"==typeof t[Symbol.iterator]}t.is=i;let s=Object.freeze([]);function*e(t){yield t}t.empty=function(){return s},t.single=e,t.wrap=function(t){return i(t)?t:e(t)},t.from=function(t){return t||s},t.reverse=function*(t){for(let i=t.length-1;i>=0;i--)yield t[i]},t.isEmpty=function(t){return!t||!0===t[Symbol.iterator]().next().done},t.first=function(t){return t[Symbol.iterator]().next().value},t.some=function(t,i){let s=0;for(let e of t)if(i(e,s++))return!0;return!1},t.find=function(t,i){for(let s of t)if(i(s))return s},t.filter=function*(t,i){for(let s of t)i(s)&&(yield s)},t.map=function*(t,i){let s=0;for(let e of t)yield i(e,s++)},t.flatMap=function*(t,i){let s=0;for(let e of t)yield*i(e,s++)},t.concat=function*(...t){for(let i of t)yield*i},t.reduce=function(t,i,s){let e=s;for(let s of t)e=i(e,s);return e},t.slice=function*(t,i,s=t.length){for(i<0&&(i+=t.length),s<0?s+=t.length:s>t.length&&(s=t.length);i<s;i++)yield t[i]},t.consume=function(i,s=Number.POSITIVE_INFINITY){let e=[];if(0===s)return[e,i];let h=i[Symbol.iterator]();for(let i=0;i<s;i++){let i=h.next();if(i.done)return[e,t.empty()];e.push(i.value)}return[e,{[Symbol.iterator]:()=>h}]},t.asyncToArray=async function(t){let i=[];for await(let s of t)i.push(s);return Promise.resolve(i)}})(Ta||={});var hu=class t{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(0!==this._toDispose.size)try{!function(t){if(Ta.is(t)){let i=[];for(let s of t)if(s)try{s.dispose()}catch(t){i.push(t)}if(1===i.length)throw i[0];if(i.length>1)throw new AggregateError(i,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}t&&t.dispose()}(this._toDispose)}finally{this._toDispose.clear()}}add(i){if(!i)return i;if(i===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?t.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(i),i}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&this._toDispose.delete(t)}};hu.DISABLE_DISPOSED_WARNING=!1;var ru=hu,nu=class{constructor(){this._store=new ru}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};nu.None=Object.freeze({dispose(){}});var ou=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(t){this._isDisposed||t===this._value||(this._value?.dispose(),this._value=t)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}clearAndLeak(){let t=this._value;return this._value=void 0,t}},lu=class t extends nu{constructor(t){super(),this._terminal=t,this._optionsRefresh=this._register(new ou),this._oldOpen=this._terminal._core.open,this._terminal._core.open=t=>{this._oldOpen?.call(this._terminal._core,t),this._open()},this._terminal._core.screenElement&&this._open(),this._optionsRefresh.value=this._terminal._core.optionsService.onOptionChange((t=>{"fontSize"===t&&(this.rescaleCanvas(),this._renderService?.refreshRows(0,this._terminal.rows))})),this._register(function(t){return{dispose:eu((()=>{t()}))}}((()=>{this.removeLayerFromDom(),this._terminal._core&&this._oldOpen&&(this._terminal._core.open=this._oldOpen,this._oldOpen=void 0),this._renderService&&this._oldSetRenderer&&(this._renderService.setRenderer=this._oldSetRenderer,this._oldSetRenderer=void 0),this._renderService=void 0,this.canvas=void 0,this._ctx=void 0,this._placeholderBitmap?.close(),this._placeholderBitmap=void 0,this._placeholder=void 0})))}static createCanvas(t,i,s){let e=(t||document).createElement("canvas");return e.width=0|i,e.height=0|s,e}static createImageData(t,i,s,e){if("function"!=typeof ImageData){let h=t.createImageData(i,s);return e&&h.data.set(new Uint8ClampedArray(e,0,i*s*4)),h}return e?new ImageData(new Uint8ClampedArray(e,0,i*s*4),i,s):new ImageData(i,s)}static createImageBitmap(t){return"function"!=typeof createImageBitmap?Promise.resolve(void 0):createImageBitmap(t)}showPlaceholder(t){t?!this._placeholder&&-1!==this.cellSize.height&&this._createPlaceHolder(Math.max(this.cellSize.height+1,24)):(this._placeholderBitmap?.close(),this._placeholderBitmap=void 0,this._placeholder=void 0),this._renderService?.refreshRows(0,this._terminal.rows)}get dimensions(){return this._renderService?.dimensions}get cellSize(){return{width:this.dimensions?.css.cell.width||-1,height:this.dimensions?.css.cell.height||-1}}clearLines(t,i){this._ctx?.clearRect(0,t*(this.dimensions?.css.cell.height||0),this.dimensions?.css.canvas.width||0,(++i-t)*(this.dimensions?.css.cell.height||0))}clearAll(){this._ctx?.clearRect(0,0,this.canvas?.width||0,this.canvas?.height||0)}draw(t,i,s,e,h=1){if(!this._ctx)return;let{width:r,height:n}=this.cellSize;if(-1===r||-1===n)return;this._rescaleImage(t,r,n);let o=t.actual,l=Math.ceil(o.width/r),a=i%l*r,u=Math.floor(i/l)*n,c=s*r,A=e*n,f=h*r+a>o.width?o.width-a:h*r,d=u+n>o.height?o.height-u:n;this._ctx.drawImage(o,Math.floor(a),Math.floor(u),Math.ceil(f),Math.ceil(d),Math.floor(c),Math.floor(A),Math.ceil(f),Math.ceil(d))}extractTile(i,s){let{width:e,height:h}=this.cellSize;if(-1===e||-1===h)return;this._rescaleImage(i,e,h);let r=i.actual,n=Math.ceil(r.width/e),o=s%n*e,l=Math.floor(s/n)*h,a=e+o>r.width?r.width-o:e,u=l+h>r.height?r.height-l:h,c=t.createCanvas(this.document,a,u),A=c.getContext("2d");return A?(A.drawImage(r,Math.floor(o),Math.floor(l),Math.floor(a),Math.floor(u),0,0,Math.floor(a),Math.floor(u)),c):void 0}drawPlaceholder(t,i,s=1){if(this._ctx){let{width:e,height:h}=this.cellSize;if(-1===e||-1===h||(this._placeholder?h>=this._placeholder.height&&this._createPlaceHolder(h+1):this._createPlaceHolder(Math.max(h+1,24)),!this._placeholder))return;this._ctx.drawImage(this._placeholderBitmap||this._placeholder,t*e,i*h%2?0:1,e*s,h,t*e,i*h,e*s,h)}}rescaleCanvas(){this.canvas&&(this.canvas.width!==this.dimensions.css.canvas.width||this.canvas.height!==this.dimensions.css.canvas.height)&&(this.canvas.width=this.dimensions.css.canvas.width||0,this.canvas.height=this.dimensions.css.canvas.height||0)}_rescaleImage(i,s,e){if(s===i.actualCellSize.width&&e===i.actualCellSize.height)return;let{width:h,height:r}=i.origCellSize;if(s===h&&e===r)return i.actual=i.orig,i.actualCellSize.width=h,void(i.actualCellSize.height=r);let n=t.createCanvas(this.document,Math.ceil(i.orig.width*s/h),Math.ceil(i.orig.height*e/r)),o=n.getContext("2d");o&&(o.drawImage(i.orig,0,0,n.width,n.height),i.actual=n,i.actualCellSize.width=s,i.actualCellSize.height=e)}_open(){this._renderService=this._terminal._core._renderService,this._oldSetRenderer=this._renderService.setRenderer.bind(this._renderService),this._renderService.setRenderer=t=>{this.removeLayerFromDom(),this._oldSetRenderer?.call(this._renderService,t)}}insertLayerToDom(){this.document&&this._terminal._core.screenElement?this.canvas||(this.canvas=t.createCanvas(this.document,this.dimensions?.css.canvas.width||0,this.dimensions?.css.canvas.height||0),this.canvas.classList.add("xterm-image-layer"),this._terminal._core.screenElement.appendChild(this.canvas),this._ctx=this.canvas.getContext("2d",{alpha:!0,desynchronized:!0}),this.clearAll()):console.warn("image addon: cannot insert output canvas to DOM, missing document or screenElement")}removeLayerFromDom(){this.canvas&&(this._ctx=void 0,this.canvas.remove(),this.canvas=void 0)}_createPlaceHolder(i=24){this._placeholderBitmap?.close(),this._placeholderBitmap=void 0;let s=32,e=t.createCanvas(this.document,s,i),h=e.getContext("2d",{alpha:!1});if(!h)return;let r=t.createImageData(h,s,i),n=new Uint32Array(r.data.buffer),o=(0,su.toRGBA8888)(0,0,0),l=(0,su.toRGBA8888)(255,255,255);n.fill(o);for(let t=0;t<i;++t){let i=t%2,e=t*s;for(let t=0;t<s;t+=2)n[e+t+i]=l}h.putImageData(r,0,0);let a=screen.width+s-1&-32||4096;this._placeholder=t.createCanvas(this.document,a,i);let u=this._placeholder.getContext("2d",{alpha:!1});if(u){for(let t=0;t<a;t+=s)u.drawImage(e,t,0);t.createImageBitmap(this._placeholder).then((t=>this._placeholderBitmap=t))}else this._placeholder=void 0}get document(){return this._terminal._core._coreBrowserService?.window.document}},au={width:7,height:14},uu=class t{constructor(t=0,i=0,s=-1,e=-1){this.imageId=s,this.tileId=e,this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(t){this._ext&=-67108864,this._ext|=67108863&t}get underlineVariantOffset(){let t=(3758096384&this._ext)>>29;return t<0?4294967288^t:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}get urlId(){return this._urlId}set urlId(t){this._urlId=t}clone(){return new t(this._ext,this._urlId,this.imageId,this.tileId)}isEmpty(){return 0===this.underlineStyle&&0===this._urlId&&-1===this.imageId}},cu=new uu,Au=class{constructor(t,i,s){this._terminal=t,this._renderer=i,this._opts=s,this._images=new Map,this._lastId=0,this._lowestId=0,this._fullyCleared=!1,this._needsFullClear=!1,this._pixelLimit=25e5;try{this.setLimit(this._opts.storageLimit)}catch(t){console.error(t.message),console.warn(`storageLimit is set to ${this.getLimit()} MB`)}this._viewportMetrics={cols:this._terminal.cols,rows:this._terminal.rows}}dispose(){this.reset()}reset(){for(let t of this._images.values())t.marker?.dispose();this._images.clear(),this._renderer.clearAll()}getLimit(){return 4*this._pixelLimit/1e6}setLimit(t){if(t<.5||t>1e3)throw RangeError("invalid storageLimit, should be at least 0.5 MB and not exceed 1G");this._pixelLimit=t/4*1e6>>>0,this._evictOldest(0)}getUsage(){return 4*this._getStoredPixels()/1e6}_getStoredPixels(){let t=0;for(let i of this._images.values())i.orig&&(t+=i.orig.width*i.orig.height,i.actual&&i.actual!==i.orig&&(t+=i.actual.width*i.actual.height));return t}_delImg(t){let i=this._images.get(t);this._images.delete(t),i&&window.ImageBitmap&&i.orig instanceof ImageBitmap&&i.orig.close()}wipeAlternate(){let t=[];for(let[i,s]of this._images.entries())"alternate"===s.bufferType&&(s.marker?.dispose(),t.push(i));for(let i of t)this._delImg(i);this._needsFullClear=!0,this._fullyCleared=!1}advanceCursor(t){if(this._opts.sixelScrolling){let i=this._renderer.cellSize;(-1===i.width||-1===i.height)&&(i=au);let s=Math.ceil(t/i.height);for(let t=1;t<s;++t)this._terminal._core._inputHandler.lineFeed()}}addImage(t){this._evictOldest(t.width*t.height);let i=this._renderer.cellSize;(-1===i.width||-1===i.height)&&(i=au);let s=Math.ceil(t.width/i.width),e=Math.ceil(t.height/i.height),h=++this._lastId,r=this._terminal._core.buffer,n=this._terminal.cols,o=this._terminal.rows,l=r.x,a=r.y,u=l,c=0;this._opts.sixelScrolling||(r.x=0,r.y=0,u=0),this._terminal._core._inputHandler._dirtyRowTracker.markDirty(r.y);for(let t=0;t<e;++t){let i=r.lines.get(r.y+r.ybase);for(let e=0;e<s&&!(u+e>=n);++e)this._writeToCell(i,u+e,h,t*s+e),c++;if(this._opts.sixelScrolling)t<e-1&&this._terminal._core._inputHandler.lineFeed();else if(++r.y>=o)break;r.x=u}this._terminal._core._inputHandler._dirtyRowTracker.markDirty(r.y),this._opts.sixelScrolling?r.x=u:(r.x=l,r.y=a);let A=[];for(let[t,i]of this._images.entries())i.tileCount<1&&(i.marker?.dispose(),A.push(t));for(let t of A)this._delImg(t);let f=this._terminal.registerMarker(0);f?.onDispose((()=>{this._images.get(h)&&this._delImg(h)})),"alternate"===this._terminal.buffer.active.type&&this._evictOnAlternate();let d={orig:t,origCellSize:i,actual:t,actualCellSize:{...i},marker:f||void 0,tileCount:c,bufferType:this._terminal.buffer.active.type};this._images.set(h,d)}render(t){if(!this._renderer.canvas&&this._images.size&&(this._renderer.insertLayerToDom(),!this._renderer.canvas))return;if(this._renderer.rescaleCanvas(),!this._images.size)return this._fullyCleared||(this._renderer.clearAll(),this._fullyCleared=!0,this._needsFullClear=!1),void(this._renderer.canvas&&this._renderer.removeLayerFromDom());this._needsFullClear&&(this._renderer.clearAll(),this._fullyCleared=!0,this._needsFullClear=!1);let{start:i,end:s}=t,e=this._terminal._core.buffer,h=this._terminal._core.cols;this._renderer.clearLines(i,s);for(let t=i;t<=s;++t){let i=e.lines.get(t+e.ydisp);if(!i)return;for(let s=0;s<h;++s)if(268435456&i.getBg(s)){let e=i._extendedAttrs[s]||cu,r=e.imageId;if(void 0===r||-1===r)continue;let n=this._images.get(r);if(-1!==e.tileId){let o=e.tileId,l=s,a=1;for(;++s<h&&268435456&i.getBg(s)&&(e=i._extendedAttrs[s]||cu)&&e.imageId===r&&e.tileId===o+a;)a++;s--,n?n.actual&&this._renderer.draw(n,o,l,t,a):this._opts.showPlaceholder&&this._renderer.drawPlaceholder(l,t,a),this._fullyCleared=!1}}}}viewportResize(t){if(!this._images.size)return void(this._viewportMetrics=t);if(this._viewportMetrics.cols>=t.cols)return void(this._viewportMetrics=t);let i=this._terminal._core.buffer,s=i.lines.length,e=this._viewportMetrics.cols-1;for(let h=0;h<s;++h){let s=i.lines.get(h);if(268435456&s.getBg(e)){let i=s._extendedAttrs[e]||cu,h=i.imageId;if(void 0===h||-1===h)continue;let r=this._images.get(h);if(!r)continue;let n=Math.ceil((r.actual?.width||0)/r.actualCellSize.width);if(i.tileId%n+1>=n)continue;let o=!1;for(let i=e+1;i>t.cols;++i)if(4194303&s._data[3*i+0]){o=!0;break}if(o)continue;let l=Math.min(t.cols,n-i.tileId%n+e),a=i.tileId;for(let t=e+1;t<l;++t)this._writeToCell(s,t,h,++a),r.tileCount++}}this._viewportMetrics=t}getImageAtBufferCell(t,i){let s=this._terminal._core.buffer.lines.get(i);if(s&&268435456&s.getBg(t)){let i=s._extendedAttrs[t]||cu;if(i.imageId&&-1!==i.imageId){let t=this._images.get(i.imageId)?.orig;if(window.ImageBitmap&&t instanceof ImageBitmap){let i=lu.createCanvas(window.document,t.width,t.height);return i.getContext("2d")?.drawImage(t,0,0,t.width,t.height),i}return t}}}extractTileAtBufferCell(t,i){let s=this._terminal._core.buffer.lines.get(i);if(s&&268435456&s.getBg(t)){let i=s._extendedAttrs[t]||cu;if(i.imageId&&-1!==i.imageId&&-1!==i.tileId){let t=this._images.get(i.imageId);if(t)return this._renderer.extractTile(t,i.tileId)}}}_evictOldest(t){let i=this._getStoredPixels(),s=i;for(;this._pixelLimit<s+t&&this._images.size;){let t=this._images.get(++this._lowestId);t&&t.orig&&(s-=t.orig.width*t.orig.height,t.actual&&t.orig!==t.actual&&(s-=t.actual.width*t.actual.height),t.marker?.dispose(),this._delImg(this._lowestId))}return i-s}_writeToCell(t,i,s,e){if(268435456&t._data[3*i+2]){let h=t._extendedAttrs[i];if(h){if(void 0!==h.imageId){let t=this._images.get(h.imageId);return t&&t.tileCount--,h.imageId=s,void(h.tileId=e)}return void(t._extendedAttrs[i]=new uu(h.ext,h.urlId,s,e))}}t._data[3*i+2]|=268435456,t._extendedAttrs[i]=new uu(0,0,s,e)}_evictOnAlternate(){for(let t of this._images.values())"alternate"===t.bufferType&&(t.tileCount=0);let t=this._terminal._core.buffer;for(let i=0;i<this._terminal.rows;++i){let s=t.lines.get(i);if(s)for(let t=0;t<this._terminal.cols;++t)if(268435456&s._data[3*t+2]){let i=s._extendedAttrs[t]?.imageId;if(i){let t=this._images.get(i);t&&t.tileCount++}}}let i=[];for(let[t,s]of this._images.entries())"alternate"===s.bufferType&&!s.tileCount&&(s.marker?.dispose(),i.push(t));for(let t of i)this._delImg(t)}},fu=Ya(Va());function du(t){let i="";for(let s=0;s<t.length;++s)i+=String.fromCharCode(t[s]);return i}function gu(t){let i=0;for(let s=0;s<t.length;++s){if(t[s]<48||t[s]>57)throw new Error("illegal char");i=10*i+t[s]-48}return i}function wu(t){let i=du(t);if(!i.match(/^((auto)|(\d+?((px)|(%)){0,1}))$/))throw new Error("illegal size");return i}var pu={inline:gu,size:gu,name:function(t){if(typeof Buffer<"u")return Buffer.from(du(t),"base64").toString();let i=atob(du(t)),s=new Uint8Array(i.length);for(let t=0;t<s.length;++t)s[t]=i.charCodeAt(t);return(new TextDecoder).decode(s)},width:wu,height:wu,preserveAspectRatio:gu},Cu=[70,105,108,101],mu=1024,Iu=class{constructor(){this.state=0,this._buffer=new Uint32Array(mu),this._position=0,this._key="",this.fields={}}reset(){this._buffer.fill(0),this.state=0,this._position=0,this.fields={},this._key=""}parse(t,i,s){let e=this.state,h=this._position,r=this._buffer;if(1===e||4===e||0===e&&h>6)return-1;for(let n=i;n<s;++n){let i=t[n];switch(i){case 59:if(!this._storeValue(h))return this._a();e=2,h=0;break;case 61:if(0===e){for(let t=0;t<Cu.length;++t)if(r[t]!==Cu[t])return this._a();e=2,h=0}else if(2===e){if(!this._storeKey(h))return this._a();e=3,h=0}else if(3===e){if(h>=mu)return this._a();r[h++]=i}break;case 58:return 3!==e||this._storeValue(h)?(this.state=4,n+1):this._a();default:if(h>=mu)return this._a();r[h++]=i}}return this.state=e,this._position=h,-2}_a(){return this.state=1,-1}_storeKey(t){let i=du(this._buffer.subarray(0,t));return!!i&&(this._key=i,this.fields[i]=null,!0)}_storeValue(t){if(this._key){try{let i=this._buffer.slice(0,t);this.fields[this._key]=pu[this._key]?pu[this._key](i):i}catch{return!1}return!0}return!1}},vu={mime:"unsupported",width:0,height:0},Bu={name:"Unnamed file",size:0,width:"auto",height:"auto",preserveAspectRatio:1,inline:0},Mu=class{constructor(t,i,s,e){this._opts=t,this._renderer=i,this._storage=s,this._coreTerminal=e,this._aborted=!1,this._hp=new Iu,this._header=Bu,this._dec=new fu.default(4194304),this._metrics=vu}reset(){}start(){this._aborted=!1,this._header=Bu,this._metrics=vu,this._hp.reset()}put(t,i,s){if(!this._aborted)if(4===this._hp.state)this._dec.put(t,i,s)&&(this._dec.release(),this._aborted=!0);else{let e=this._hp.parse(t,i,s);if(-1===e)return void(this._aborted=!0);if(e>0){if(this._header=Object.assign({},Bu,this._hp.fields),!this._header.inline||!this._header.size||this._header.size>this._opts.iipSizeLimit)return void(this._aborted=!0);this._dec.init(this._header.size),this._dec.put(t,e,s)&&(this._dec.release(),this._aborted=!0)}}}end(t){if(this._aborted)return!0;let i=0,s=0,e=!0;if((e=t)&&(e=!this._dec.end())&&(this._metrics=function(t){if(t.length<24)return vu;let i=new Uint32Array(t.buffer,t.byteOffset,6);if(1196314761===i[0]&&169478669===i[1]&&1380206665===i[3])return{mime:"image/png",width:t[16]<<24|t[17]<<16|t[18]<<8|t[19],height:t[20]<<24|t[21]<<16|t[22]<<8|t[23]};if(255===t[0]&&216===t[1]&&255===t[2]){let[i,s]=function(t){let i=t.length,s=4,e=t[s]<<8|t[s+1];for(;;){if(s+=e,s>=i)return[0,0];if(255!==t[s])return[0,0];if(192===t[s+1]||194===t[s+1])return s+8<i?[t[s+7]<<8|t[s+8],t[s+5]<<8|t[s+6]]:[0,0];s+=2,e=t[s]<<8|t[s+1]}}(t);return{mime:"image/jpeg",width:i,height:s}}return 944130375!==i[0]||55!==t[4]&&57!==t[4]||97!==t[5]?vu:{mime:"image/gif",width:t[7]<<8|t[6],height:t[9]<<8|t[8]}}(this._dec.data8),(e="unsupported"!==this._metrics.mime)&&(i=this._metrics.width,s=this._metrics.height,(e=i&&s&&i*s<this._opts.pixelLimit)&&([i,s]=this._resize(i,s).map(Math.floor),e=i&&s&&i*s<this._opts.pixelLimit))),!e)return this._dec.release(),!0;let h=new Blob([this._dec.data8],{type:this._metrics.mime});if(this._dec.release(),!window.createImageBitmap){let t=URL.createObjectURL(h),e=new Image;return new Promise((h=>{e.addEventListener("load",(()=>{URL.revokeObjectURL(t);let r=lu.createCanvas(window.document,i,s);r.getContext("2d")?.drawImage(e,0,0,i,s),this._storage.addImage(r),h(!0)})),e.src=t,setTimeout((()=>h(!0)),1e3)}))}return createImageBitmap(h,{resizeWidth:i,resizeHeight:s}).then((t=>(this._storage.addImage(t),!0)))}_resize(t,i){let s=this._renderer.dimensions?.css.cell.width||au.width,e=this._renderer.dimensions?.css.cell.height||au.height,h=this._renderer.dimensions?.css.canvas.width||s*this._coreTerminal.cols,r=this._renderer.dimensions?.css.canvas.height||e*this._coreTerminal.rows,n=this._dim(this._header.width,h,s),o=this._dim(this._header.height,r,e);if(!n&&!o){let s=Math.min(h/t,(r-e)/i);return s<1?[t*s,i*s]:[t,i]}return n?!this._header.preserveAspectRatio&&n&&o?[n,o]:[n,i*n/t]:[t*o/i,o]}_dim(t,i,s){return"auto"===t?0:t.endsWith("%")?parseInt(t.slice(0,-1))*i/100:t.endsWith("px")?parseInt(t.slice(0,-2)):parseInt(t)*s}},yu=Ya(Za()),Qu=Ya(iu()),Eu=yu.PALETTE_ANSI_256;Eu.set(yu.PALETTE_VT340_COLOR);var bu=class{constructor(t,i,s){this._opts=t,this._storage=i,this._coreTerminal=s,this._size=0,this._aborted=!1,(0,Qu.DecoderAsync)({memoryLimit:4*this._opts.pixelLimit,palette:Eu,paletteLimit:this._opts.sixelPaletteLimit}).then((t=>this._dec=t))}reset(){this._dec&&(this._dec.release(),this._dec._palette.fill(0),this._dec.init(0,Eu,this._opts.sixelPaletteLimit))}hook(t){if(this._size=0,this._aborted=!1,this._dec){let i=1===t.params[1]?0:function(t,i){let s=0;if(!i)return s;if(t.isInverse())if(t.isFgDefault())s=ku(i.foreground.rgba);else if(t.isFgRGB()){let i=t.constructor.toColorRGB(t.getFgColor());s=(0,yu.toRGBA8888)(...i)}else s=ku(i.ansi[t.getFgColor()].rgba);else if(t.isBgDefault())s=ku(i.background.rgba);else if(t.isBgRGB()){let i=t.constructor.toColorRGB(t.getBgColor());s=(0,yu.toRGBA8888)(...i)}else s=ku(i.ansi[t.getBgColor()].rgba);return s}(this._coreTerminal._core._inputHandler._curAttrData,this._coreTerminal._core._themeService?.colors);this._dec.init(i,null,this._opts.sixelPaletteLimit)}}put(t,i,s){if(!this._aborted&&this._dec){if(this._size+=s-i,this._size>this._opts.sixelSizeLimit)return console.warn("SIXEL: too much data, aborting"),this._aborted=!0,void this._dec.release();try{this._dec.decode(t,i,s)}catch(t){console.warn(`SIXEL: error while decoding image - ${t}`),this._aborted=!0,this._dec.release()}}}unhook(t){if(this._aborted||!t||!this._dec)return!0;let i=this._dec.width,s=this._dec.height;if(!i||!s)return s&&this._storage.advanceCursor(s),!0;let e=lu.createCanvas(void 0,i,s);return e.getContext("2d")?.putImageData(new ImageData(this._dec.data8,i,s),0,0),this._dec.memoryUsage>4194304&&this._dec.release(),this._storage.addImage(e),!0}};function ku(t){return yu.BIG_ENDIAN?t:(255&t)<<24|(t>>>8&255)<<16|(t>>>16&255)<<8|t>>>24&255}var xu={enableSizeReports:!0,pixelLimit:16777216,sixelSupport:!0,sixelScrolling:!0,sixelPaletteLimit:256,sixelSizeLimit:25e6,storageLimit:128,showPlaceholder:!0,iipSupport:!0,iipSizeLimit:2e7},Du=class{constructor(t){this._disposables=[],this._handlers=new Map,this._opts=Object.assign({},xu,t),this._defaultOpts=Object.assign({},xu,t)}dispose(){for(let t of this._disposables)t.dispose();this._disposables.length=0,this._handlers.clear()}_disposeLater(...t){for(let i of t)this._disposables.push(i)}activate(t){if(this._terminal=t,this._renderer=new lu(t),this._storage=new Au(t,this._renderer,this._opts),this._opts.enableSizeReports){let i=t.options.windowOptions||{};i.getWinSizePixels=!0,i.getCellSizePixels=!0,i.getWinSizeChars=!0,t.options.windowOptions=i}if(this._disposeLater(this._renderer,this._storage,t.parser.registerCsiHandler({prefix:"?",final:"h"},(t=>this._decset(t))),t.parser.registerCsiHandler({prefix:"?",final:"l"},(t=>this._decrst(t))),t.parser.registerCsiHandler({final:"c"},(t=>this._da1(t))),t.parser.registerCsiHandler({prefix:"?",final:"S"},(t=>this._xtermGraphicsAttributes(t))),t.onRender((t=>this._storage?.render(t))),t.parser.registerCsiHandler({intermediates:"!",final:"p"},(()=>this.reset())),t.parser.registerEscHandler({final:"c"},(()=>this.reset())),t._core._inputHandler.onRequestReset((()=>this.reset())),t.buffer.onBufferChange((()=>this._storage?.wipeAlternate())),t.onResize((t=>this._storage?.viewportResize(t)))),this._opts.sixelSupport){let i=new bu(this._opts,this._storage,t);this._handlers.set("sixel",i),this._disposeLater(t._core._inputHandler._parser.registerDcsHandler({final:"q"},i))}if(this._opts.iipSupport){let i=new Mu(this._opts,this._renderer,this._storage,t);this._handlers.set("iip",i),this._disposeLater(t._core._inputHandler._parser.registerOscHandler(1337,i))}}reset(){this._opts.sixelScrolling=this._defaultOpts.sixelScrolling,this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,this._storage?.reset();for(let t of this._handlers.values())t.reset();return!1}get storageLimit(){return this._storage?.getLimit()||-1}set storageLimit(t){this._storage?.setLimit(t),this._opts.storageLimit=t}get storageUsage(){return this._storage?this._storage.getUsage():-1}get showPlaceholder(){return this._opts.showPlaceholder}set showPlaceholder(t){this._opts.showPlaceholder=t,this._renderer?.showPlaceholder(t)}getImageAtBufferCell(t,i){return this._storage?.getImageAtBufferCell(t,i)}extractTileAtBufferCell(t,i){return this._storage?.extractTileAtBufferCell(t,i)}_report(t){this._terminal?._core.coreService.triggerDataEvent(t)}_decset(t){for(let i=0;i<t.length;++i)80===t[i]&&(this._opts.sixelScrolling=!1);return!1}_decrst(t){for(let i=0;i<t.length;++i)80===t[i]&&(this._opts.sixelScrolling=!0);return!1}_da1(t){return!!t[0]||!!this._opts.sixelSupport&&(this._report("[?62;4;9;22c"),!0)}_xtermGraphicsAttributes(t){if(t.length<2)return!0;if(1===t[0])switch(t[1]){case 1:return this._report(`[?${t[0]};0;${this._opts.sixelPaletteLimit}S`),!0;case 2:this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,this._report(`[?${t[0]};0;${this._opts.sixelPaletteLimit}S`);for(let t of this._handlers.values())t.reset();return!0;case 3:return t.length>2&&!(t[2]instanceof Array)&&t[2]<=4096?(this._opts.sixelPaletteLimit=t[2],this._report(`[?${t[0]};0;${this._opts.sixelPaletteLimit}S`)):this._report(`[?${t[0]};2S`),!0;case 4:return this._report(`[?${t[0]};0;4096S`),!0;default:return this._report(`[?${t[0]};2S`),!0}if(2===t[0])switch(t[1]){case 1:let i=this._renderer?.dimensions?.css.canvas.width,s=this._renderer?.dimensions?.css.canvas.height;if(!i||!s){let t=au;i=(this._terminal?.cols||80)*t.width,s=(this._terminal?.rows||24)*t.height}if(i*s<this._opts.pixelLimit)this._report(`[?${t[0]};0;${i.toFixed(0)};${s.toFixed(0)}S`);else{let i=Math.floor(Math.sqrt(this._opts.pixelLimit));this._report(`[?${t[0]};0;${i};${i}S`)}return!0;case 4:let e=Math.floor(Math.sqrt(this._opts.pixelLimit));return this._report(`[?${t[0]};0;${e};${e}S`),!0;default:return this._report(`[?${t[0]};2S`),!0}return this._report(`[?${t[0]};1S`),!0}};const Lu=class{constructor(s){t(this,s),this.connectionStateChanged=i(this,"connectionStateChanged")}terminal;fitAddon;webLinksAddon;searchAddon;webglAddon;serializeAddon;imageAddon;channel;containerEl;domReady=!1;runtimeReady=!1;connected=!1;inputMode=r.Default;resizeObserver;resizeDebounceHandle;session_id;usernameBuffer="";passwordBuffer="";xtermImageSettings={enableSizeReports:!0,pixelLimit:16777216,sixelSupport:!0,sixelScrolling:!0,sixelPaletteLimit:256,sixelSizeLimit:25e6,storageLimit:128,showPlaceholder:!0,iipSupport:!0,iipSizeLimit:2e7};get el(){return s(this)}terminalOptions={termName:"xterm-256color",rendererType:"canvas",allowTransparency:!1,fontFamily:'"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace',fontSize:12,letterSpacing:0,lineHeight:1,allowProposedApi:!0,cursorBlink:!0,cursorWidth:1,theme:{background:"#0b1021",foreground:"#e2e8f0",cursor:"#67e8f9"},scrollback:1e4,fastScrollModifier:"shift",fastScrollSensitivity:5,bellStyle:"sound",convertEol:!1,disableStdin:!1,rightClickSelectsWord:!0,drawBoldTextInBrightColors:!0,minimumContrastRatio:1,windowsMode:!1,macOptionIsMeta:!1,altClickMovesCursor:!0};serverHost="phirepass.com";serverPort=443;allowInsecure=!1;heartbeatInterval=3e4;nodeId;serviceId;token;onNodeIdChange(t,i){this.reset_session_state(),this.terminal.reset(),this.channel&&this.channel.is_connected()&&this.close_comms(),t&&(this.open_comms(),this.channel.connect())}serverId;onServerIdChange(t,i){this.onNodeIdChange(this.nodeId,this.nodeId)}connectionStateChanged;create_web_socket_endpoint(){const t=this.allowInsecure?"ws":"wss";return this.allowInsecure||443!==this.serverPort?this.allowInsecure&&80===this.serverPort?`${t}://${this.serverHost}`:`${t}://${this.serverHost}:${this.serverPort}`:`${t}://${this.serverHost}`}async connectedCallback(){await n(),this.setup_terminal(),this.open_comms(),this.runtimeReady=!0,this.nodeId?this.try_connect():console.warn("Prop node_id is not set. Cannot connect to terminal.")}componentDidLoad(){this.domReady=!0,this.try_connect()}async disconnectedCallback(){this.resizeDebounceHandle&&(clearTimeout(this.resizeDebounceHandle),this.resizeDebounceHandle=void 0),this.resizeObserver&&this.resizeObserver.disconnect(),this.connected=!1,this.domReady=!1,this.runtimeReady=!1,this.close_comms(),this.destroy_terminal()}is_terminal_open(){return Boolean(this.connected&&this.containerEl&&this.terminal.element)}fit_terminal_safely(){if(this.fitAddon&&this.is_terminal_open())try{this.fitAddon.fit()}catch(t){console.warn("Skipping terminal fit before renderer is ready:",t)}}try_connect(){!this.connected&&this.domReady&&this.runtimeReady&&this.containerEl&&this.terminal&&this.channel&&this.connect()}setup_terminal(){this.terminal=new Mr(this.terminalOptions),this.fitAddon=new yr,this.terminal.loadAddon(this.fitAddon),this.webLinksAddon=new Dr,this.terminal.loadAddon(this.webLinksAddon),this.searchAddon=new Ln,this.terminal.loadAddon(this.searchAddon),this.serializeAddon=new Ga,this.terminal.loadAddon(this.serializeAddon),this.imageAddon=new Du(this.xtermImageSettings),this.terminal.loadAddon(this.imageAddon);try{this.webglAddon=new Qa,this.terminal.loadAddon(this.webglAddon)}catch(t){console.warn("WebGL addon not available or failed to load:",t)}"function"==typeof this.terminal.onResize&&this.terminal.onResize((()=>{this.send_ssh_terminal_resize()}))}destroy_terminal(){this.terminal&&(this.terminal.reset(),"function"==typeof this.terminal.dispose&&this.terminal.dispose())}open_comms(){this.channel=this.serverId?new o(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId,this.serverId):new o(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId),this.channel.on_connection_open((()=>{this.connectionStateChanged.emit([l.Connected]),this.channel.authenticate(this.token,this.nodeId)})),this.channel.on_connection_close((()=>{this.connectionStateChanged.emit([l.Disconnected]),this.terminal.reset()})),this.channel.on_connection_error((t=>{this.connectionStateChanged.emit([l.Error,t])})),this.channel.on_connection_message((()=>{})),this.channel.on_protocol_message((t=>{const{web:i}=t.data;switch(i.type){case a.Error:this.handle_error(i);break;case a.AuthSuccess:this.handle_auth_success(i);break;case a.TunnelOpened:this.handle_tunnel_opened(i);break;case a.TunnelClosed:this.handle_tunnel_closed(i);break;case a.TunnelData:this.handle_tunnel_data(i);break;default:console.warn("Unknown protocol message type:",i)}}))}send_ssh_terminal_resize(){if(!this.containerEl)return void console.warn("Cannot send terminal resize: container element not available");if(!this.nodeId)return void console.warn("Cannot send terminal resize: node_id is missing");if(!this.channel)return void console.warn("Cannot send terminal resize: channel is not initialized");if(!this.channel.is_connected())return void console.warn("Cannot send terminal resize: channel not connected");if(!this.session_id)return void console.warn("Cannot send terminal resize: session_id is missing");this.fit_terminal_safely();const t=this.terminal?.cols??0,i=this.terminal?.rows??0,s=this.containerEl.clientWidth??0,e=this.containerEl.clientHeight??0;if(t<=0||i<=0||s<=0||e<=0)console.warn(`Cannot send terminal resize: invalid terminal dimensions cols=${t}, rows=${i}, px_width=${s}, px_height=${e}`);else try{console.log(`Sending terminal resize: cols=${t}, rows=${i}, px_width=${s}, px_height=${e}`),this.channel.send_ssh_terminal_resize(this.nodeId,this.session_id,t,i,s,e)}catch(t){console.error("Failed to send terminal resize:",t)}}send_ssh_data(t){this.channel.is_connected()&&this.session_id&&this.channel.send_ssh_tunnel_data(this.nodeId,this.session_id,t)}handle_error(t){switch(t.kind){case u.Generic:case u.Authentication:this.terminal.reset(),this.terminal.write(t.message+"\r\n"),this.terminal.focus(),this.usernameBuffer="",this.passwordBuffer="";break;case u.RequiresUsernamePassword:case u.RequiresUsername:this.terminal.reset(),this.inputMode=r.Username,this.usernameBuffer="",this.terminal.write("Enter your username: "),this.terminal.focus();break;case u.RequiresPassword:this.terminal.reset(),this.inputMode=r.Password,this.passwordBuffer="",this.terminal.write("Enter your password: "),this.terminal.focus();break;default:console.warn("Unknown error kind:",t)}}close_comms(){this.channel.stop_heartbeat(),this.channel.disconnect()}cancel_credential_entry(){this.inputMode=r.Default,this.clear_creds_buffer(),this.terminal.writeln("Authentication cancelled."),this.terminal.reset(),this.close_comms()}clear_creds_buffer(){this.usernameBuffer="",this.passwordBuffer=""}reset_session_state(){this.session_id=void 0,this.inputMode=r.Default,this.clear_creds_buffer()}handle_auth_success(t){this.clear_creds_buffer(),this.channel.start_heartbeat(this.heartbeatInterval<=15e3?3e4:this.heartbeatInterval),this.channel.open_ssh_tunnel(this.nodeId,this.serviceId)}handle_tunnel_opened(t){this.session_id=t.sid,this.terminal.reset(),this.fit_terminal_safely(),this.send_ssh_terminal_resize()}handle_tunnel_data(t){this.terminal.write(new Uint8Array(t.data))}handle_tunnel_closed(t){this.session_id=void 0,this.inputMode=r.Default,this.clear_creds_buffer(),this.terminal.reset(),this.terminal.writeln("Connection closed."),this.close_comms()}connect(){const t=this.containerEl;console.log("Attempting to connect terminal to container:",t),t&&(this.terminal.open(t),console.log("Terminal opened in container"),this.connected=!0,this.fit_terminal_safely(),this.terminal.focus(),this.terminal.onData(this.handle_terminal_data.bind(this)),this.channel.connect(),this.setup_resize_observer(),console.log("Terminal connected and ready"))}setup_resize_observer(){this.resizeObserver=new ResizeObserver((()=>{console.log("Container resized, fitting terminal"),this.resizeDebounceHandle&&clearTimeout(this.resizeDebounceHandle),this.resizeDebounceHandle=setTimeout((()=>{this.fit_terminal_safely(),this.send_ssh_terminal_resize()}),100)})),this.resizeObserver.observe(this.containerEl??this.el)}handle_terminal_data(t){switch(this.inputMode){case r.Username:this.handle_username_input(t);break;case r.Password:this.handle_password_input(t);break;case r.Default:this.send_ssh_data(t)}}handle_username_input(t){return"\r"===t||"\n"===t?(this.terminal.write("\r\n"),void this.submit_username()):""===t?(this.terminal.write("^C\r\n"),void this.cancel_credential_entry()):void(""!==t?t>=" "&&t<="~"&&(this.usernameBuffer+=t,this.terminal.write(t)):this.usernameBuffer.length&&(this.usernameBuffer=this.usernameBuffer.slice(0,-1),this.terminal.write("\b \b")))}submit_username(){if(!this.channel.is_connected())return;const t=this.usernameBuffer.trim();if(!t)return this.terminal.writeln(""),this.terminal.write("Enter your username: "),void(this.usernameBuffer="");this.inputMode=r.Default,this.channel.open_ssh_tunnel(this.nodeId,this.serviceId,t)}handle_password_input(t){return"\r"===t||"\n"===t?(this.terminal.write("\r\n"),void this.submit_password()):""===t?(this.terminal.write("^C\r\n"),void this.cancel_credential_entry()):void(""!==t?t>=" "&&t<="~"&&(this.passwordBuffer+=t,this.terminal.write("*")):this.passwordBuffer.length&&(this.passwordBuffer=this.passwordBuffer.slice(0,-1),this.terminal.write("\b \b")))}submit_password(){if(!this.channel.is_connected())return;const t=this.passwordBuffer;if(!t)return this.terminal.writeln(""),this.terminal.write("Enter your password: "),void(this.passwordBuffer="");this.inputMode=r.Default,this.channel.open_ssh_tunnel(this.nodeId,this.serviceId,this.usernameBuffer.trim(),t),this.passwordBuffer="",this.usernameBuffer=""}render(){return e(h,{key:"502a46c25541e7b9eea5b716f3806f6045b19049"},e("div",{key:"fae18cfb592bcc346e9203f2491fc661bd7bff5a",id:"ccc",ref:t=>this.containerEl=t}))}static get watchers(){return{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}}};Lu.style=".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-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:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1 !important}.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-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px !important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:rgba(0,0,0,0);transition:opacity 100ms linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity 800ms linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:host{display:block;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}:host #ccc{width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}";export{Lu as phirepass_terminal}
@@ -0,0 +1 @@
1
+ class n{__destroy_into_raw(){const n=this.__wbg_ptr;return this.__wbg_ptr=0,_.unregister(this),n}free(){const n=this.__destroy_into_raw();O.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2);O.channel_authenticate(this.__wbg_ptr,r,o,c,P,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){O.channel_connect(this.__wbg_ptr)}create_service(n,t,e,r,o,c,i,s,_,u){const a=S(n,O.__wbindgen_export,O.__wbindgen_export2),f=P,b=S(t,O.__wbindgen_export,O.__wbindgen_export2),l=P;var d=R(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),w=P;const g=S(r,O.__wbindgen_export,O.__wbindgen_export2),h=P;var p=R(c)?0:S(c,O.__wbindgen_export,O.__wbindgen_export2),y=P,m=R(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),v=P,A=R(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2),N=P,T=R(_)?0:S(_,O.__wbindgen_export,O.__wbindgen_export2);O.channel_create_service(this.__wbg_ptr,a,f,b,l,d,w,g,h,o,p,y,m,v,A,N,T,P,R(u)?Number.MAX_SAFE_INTEGER:u>>>0)}delete_service(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2);O.channel_delete_service(this.__wbg_ptr,r,o,c,P,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}disconnect(){O.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==O.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==O.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(t,O.__wbindgen_export,O.__wbindgen_export2),i=P;var s=R(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);const u=O.channel_new(r,o,c,i,s,P);return this.__wbg_ptr=u,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){O.channel_on_connection_close(this.__wbg_ptr,R(n)?0:u(n))}on_connection_error(n){O.channel_on_connection_error(this.__wbg_ptr,R(n)?0:u(n))}on_connection_message(n){O.channel_on_connection_message(this.__wbg_ptr,R(n)?0:u(n))}on_connection_open(n){O.channel_on_connection_open(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message(n){O.channel_on_protocol_message(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message_type(n,t){const e=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_on_protocol_message_type(this.__wbg_ptr,e,P,R(t)?0:u(t))}open_rdp_tunnel(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(t,O.__wbindgen_export,O.__wbindgen_export2),_=P;var u=R(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=R(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_rdp_tunnel(this.__wbg_ptr,c,i,s,_,u,a,f,P,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_sftp_tunnel(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(t,O.__wbindgen_export,O.__wbindgen_export2),_=P;var u=R(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=R(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_sftp_tunnel(this.__wbg_ptr,c,i,s,_,u,a,f,P,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_ssh_tunnel(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(t,O.__wbindgen_export,O.__wbindgen_export2),_=P;var u=R(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=R(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_ssh_tunnel(this.__wbg_ptr,c,i,s,_,u,a,f,P,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_delete(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(e,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_delete(this.__wbg_ptr,c,i,t,s,_,u,P,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_ack(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_ack(this.__wbg_ptr,o,P,t,e,r)}send_sftp_download_chunk(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_chunk(this.__wbg_ptr,c,P,t,e,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_start(n,t,e,r,o){const c=S(n,O.__wbindgen_export,O.__wbindgen_export2),i=P,s=S(e,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_download_start(this.__wbg_ptr,c,i,t,s,_,u,P,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_list_data(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P,i=S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_list_data(this.__wbg_ptr,o,c,t,i,P,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_upload_chunk(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=function(n){const t=(0,O.__wbindgen_export)(1*n.length,1)>>>0;return h().set(n,t/1),P=n.length,t}(c);O.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,P,R(i)?Number.MAX_SAFE_INTEGER:i>>>0)}send_sftp_upload_start(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(e,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=S(r,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,P,o,c,R(i)?Number.MAX_SAFE_INTEGER:i>>>0)}send_ssh_terminal_resize(n,t,e,r,o,c){const i=S(n,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_ssh_terminal_resize(this.__wbg_ptr,i,P,t,e,r,o,c)}send_ssh_tunnel_data(n,t,e){const r=S(n,O.__wbindgen_export,O.__wbindgen_export2),o=P,c=S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,c,P)}start_heartbeat(n){O.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){O.channel_stop_heartbeat(this.__wbg_ptr)}update_service(n,t,e,r,o,c,i,s,_,u,a){const f=S(n,O.__wbindgen_export,O.__wbindgen_export2),b=P,l=S(t,O.__wbindgen_export,O.__wbindgen_export2),d=P,w=S(e,O.__wbindgen_export,O.__wbindgen_export2),g=P;var h=R(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2),p=P;const y=S(o,O.__wbindgen_export,O.__wbindgen_export2),m=P;var v=R(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),A=P,N=R(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2),T=P,U=R(_)?0:S(_,O.__wbindgen_export,O.__wbindgen_export2),j=P,F=R(u)?0:S(u,O.__wbindgen_export,O.__wbindgen_export2);O.channel_update_service(this.__wbg_ptr,f,b,l,d,w,g,h,p,y,m,c,v,A,N,T,U,j,F,P,R(a)?Number.MAX_SAFE_INTEGER:a>>>0)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);const t=Object.freeze({Generic:0,0:"Generic",Authentication:10,10:"Authentication",RequiresUsername:100,100:"RequiresUsername",RequiresPassword:110,110:"RequiresPassword",RequiresUsernamePassword:120,120:"RequiresUsernamePassword"});function e(){const n={__proto__:null,__wbg_Error_92b29b0548f8b746:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=S(String(p(t)),O.__wbindgen_export,O.__wbindgen_export2),r=P;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_c25d447a39f5578f:function(n,t){const e=S(f(p(t)),O.__wbindgen_export,O.__wbindgen_export2),r=P;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_b0ca35b86a603356:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=R(r)?0:S(r,O.__wbindgen_export,O.__wbindgen_export2),c=P;d().setInt32(n+4,c,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_344f42d3211c4765:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_fffb441def202758:function(n){p(n)._wbg_cb_unref()},__wbg_call_8a2dd23819f8a60a:function(){return y((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_call_a6e5c5dce5018821:function(){return y((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_call_e3b662382210db98:function(){return y((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(N(n)))},__wbg_close_c65ca0257e895318:function(){return y((function(n){p(n).close()}),arguments)},__wbg_data_328de4280640da92:function(n){return u(p(n).data)},__wbg_from_13e323c65fc8f464:function(n){return u(Array.from(p(n)))},__wbg_getRandomValues_3f44b700395062e5:function(){return y((function(n,t){globalThis.crypto.getRandomValues(b(n,t))}),arguments)},__wbg_get_78f252d074a84d0b:function(){return y((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_9b9ea1f18c57361f:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_1f0964f4a5e2c6d8:function(n){return p(n).length},__wbg_new_32b398fb48b6d94a:function(){return u(new Array)},__wbg_new_cd45aabdf6073e84:function(n){return u(new Uint8Array(p(n)))},__wbg_new_da52cf8fe3429cb2:function(){return u(new Object)},__wbg_new_with_str_sequence_2de2f569c29910ad:function(){return y((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_4770620bbe4688a0:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_d2ae3af0c1217ae6:function(n,t){return p(n).push(p(t))},__wbg_readyState_50bc38c2a9e83db6:function(n){return p(n).readyState},__wbg_send_a321b376d40ec867:function(){return y((function(n,t,e){p(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return y((function(n,t){return u(setInterval(p(n),t))}),arguments)},__wbg_set_6be42768c690e380:function(n,t,e){p(n)[N(t)]=N(e)},__wbg_set_8a16b38e4805b298:function(n,t,e){p(n)[t>>>0]=N(e)},__wbg_set_binaryType_a37b086c78ca7c29:function(n,t){p(n).binaryType=s[t]},__wbg_set_onclose_f706475385ecce07:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_9f5773fd31512333:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_836d2f72130b4706:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_4f65470ae522a61a:function(n,t){p(n).onopen=p(t)},__wbg_warn_79b294b9866d9034:function(n,t){console.warn(w(n,t))},__wbindgen_cast_0000000000000001:function(n,t){return u(A(n,t,o))},__wbindgen_cast_0000000000000002:function(n,t){return u(A(n,t,c))},__wbindgen_cast_0000000000000003:function(n,t){return u(A(n,t,i))},__wbindgen_cast_0000000000000004:function(n,t){return u(A(n,t,r))},__wbindgen_cast_0000000000000005:function(n){return u(n)},__wbindgen_cast_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_cast_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_cast_0000000000000008:function(n){return u(BigInt.asUintN(64,n))},__wbindgen_object_clone_ref:function(n){return u(p(n))},__wbindgen_object_drop_ref:function(n){N(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){O.__wasm_bindgen_func_elem_63(n,t)}function o(n,t,e){O.__wasm_bindgen_func_elem_59(n,t,u(e))}function c(n,t,e){O.__wasm_bindgen_func_elem_59_1(n,t,u(e))}function i(n,t,e){O.__wasm_bindgen_func_elem_59_2(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>O.__wbg_channel_free(n,1)));function u(n){v===m.length&&m.push(m.length+1);const t=v;return v=m[t],m[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>O.__wbindgen_export4(n.a,n.b)));function f(n){const t=typeof n;if("number"==t||"boolean"==t||null==n)return`${n}`;if("string"==t)return`"${n}"`;if("symbol"==t){const t=n.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=n.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(n)){const t=n.length;let e="[";t>0&&(e+=f(n[0]));for(let r=1;r<t;r++)e+=", "+f(n[r]);return e+="]",e}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(!(e&&e.length>1))return toString.call(n);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}function b(n,t){return n>>>=0,h().subarray(n/1,n/1+t)}let l=null;function d(){return(null===l||!0===l.buffer.detached||void 0===l.buffer.detached&&l.buffer!==O.memory.buffer)&&(l=new DataView(O.memory.buffer)),l}function w(n,t){return function(n,t){return j+=t,j>=U&&(T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),T.decode(),j=t),T.decode(h().subarray(n,n+t))}(n>>>0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(O.memory.buffer)),g}function p(n){return m[n]}function y(n,t){try{return n.apply(this,t)}catch(n){O.__wbindgen_export3(u(n))}}let m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);let v=m.length;function R(n){return null==n}function A(n,t,e){const r={a:n,b:t,cnt:1},o=(...n)=>{r.cnt++;const t=r.a;r.a=0;try{return e(t,r.b,...n)}finally{r.a=t,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{0==--r.cnt&&(O.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t,e){if(void 0===e){const e=F.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),P=e.length,r}let r=n.length,o=t(r,1)>>>0;const c=h();let i=0;for(;i<r;i++){const t=n.charCodeAt(i);if(t>127)break;c[o+i]=t}if(i!==r){0!==i&&(n=n.slice(i)),o=e(o,r,r=i+3*n.length,1)>>>0;const t=h().subarray(o+i,o+r);i+=F.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return P=i,o}function N(n){const t=p(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let T=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});T.decode();const U=2146435072;let j=0;const F=new TextEncoder;"encodeInto"in F||(F.encodeInto=function(n,t){const e=F.encode(n);return t.set(e),{read:n.length,written:e.length}});let O,P=0;async function k(n){if(void 0!==O)return O;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module_or_path:n}=n):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===n&&(n=new URL("phirepass-channel_bg.wasm",import.meta.url));const t=e();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:r}=await async function(n,t){if("function"==typeof Response&&n instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!n.ok||!function(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}(n.type)||"application/wasm"===n.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}(await n,t);return function(n){return O=n.exports,l=null,g=null,O}(r)}var q,I,W;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.RDPAuthorized="RDPAuthorized",n.SFTPListItems="SFTPListItems",n.SFTPDownloadStartResponse="SFTPDownloadStartResponse",n.SFTPDownloadChunk="SFTPDownloadChunk",n.SFTPUploadStartResponse="SFTPUploadStartResponse",n.SFTPUploadChunkAck="SFTPUploadChunkAck"}(q||(q={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(I||(I={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}(W||(W={}));export{n as C,t as E,I,q as P,k as _,W as a}
@@ -1 +1 @@
1
- import{p as e,b as r}from"./p-DovZQ7sb.js";export{s as setNonce}from"./p-DovZQ7sb.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const r=import.meta.url,o={};return""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)})().then((async e=>(await o(),r([["p-7227a0f6",[[513,"phirepass-sftp-client",{name:[1],description:[1],hideHeader:[4,"hide-header"],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],serverId:[1,"server-id"],max:[32],show_login_screen:[32],show_login_screen_username:[32],show_error:[32],error_message:[32],show_login_screen_password:[32],show_navigation:[32],breadcrumbs:[32],current_dir:[32],listing:[32],show_content:[32],show_loader:[32],version:[32],status:[32],selected_item:[32],show_upload_modal:[32],upload_progress:[32],upload_file_name:[32],upload_speed:[32],upload_finished:[32],show_download_modal:[32],download_progress:[32],download_file_name:[32],download_speed:[32],download_finished:[32],show_delete_modal:[32],delete_file_name:[32],delete_loading:[32],maximize:[64],minimize:[64]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]],["p-e6c56b50",[[513,"phirepass-terminal",{terminalOptions:[16],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],serverId:[1,"server-id"]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]]],e))));
1
+ import{p as e,b as r}from"./p-DovZQ7sb.js";export{s as setNonce}from"./p-DovZQ7sb.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const r=import.meta.url,s={};return""!==r&&(s.resourcesUrl=new URL(".",r).href),e(s)})().then((async e=>(await o(),r([["p-3cc5c346",[[513,"phirepass-rdp",{serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],username:[1],password:[1],destination:[1],scale:[1],serverId:[1,"server-id"],credentialsPrompt:[32],statusMessage:[32]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]],["p-53672ba5",[[513,"phirepass-sftp-client",{name:[1],description:[1],hideHeader:[4,"hide-header"],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],serverId:[1,"server-id"],max:[32],show_login_screen:[32],show_login_screen_username:[32],show_error:[32],error_message:[32],show_login_screen_password:[32],show_navigation:[32],breadcrumbs:[32],current_dir:[32],listing:[32],show_content:[32],show_loader:[32],version:[32],status:[32],selected_item:[32],show_upload_modal:[32],upload_progress:[32],upload_file_name:[32],upload_speed:[32],upload_finished:[32],show_download_modal:[32],download_progress:[32],download_file_name:[32],download_speed:[32],download_finished:[32],show_delete_modal:[32],delete_file_name:[32],delete_loading:[32],maximize:[64],minimize:[64]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]],["p-a9c02bf1",[[513,"phirepass-terminal",{terminalOptions:[16],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],serverId:[1,"server-id"]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]]],e))));
@@ -27,6 +27,21 @@ export type ProtocolMessageWebTunnelData = {
27
27
  data: Uint8Array;
28
28
  type: 'TunnelData';
29
29
  };
30
+ /**
31
+ * Answer to `open_rdp_tunnel`, in place of `TunnelOpened`.
32
+ *
33
+ * RDP bytes never cross the control socket: the browser's RDP client opens its
34
+ * own WebSocket at `/api/web/rdp/{node_id}` and presents `ticket` inside its
35
+ * RDCleanPath request, which is the only authorisation channel that client has.
36
+ * The ticket is single-use and expires after 60s, so it has to be handed to the
37
+ * client promptly.
38
+ */
39
+ export type ProtocolMessageWebRDPAuthorized = {
40
+ sid: number;
41
+ ticket: string;
42
+ msg_id?: number;
43
+ type: 'RDPAuthorized';
44
+ };
30
45
  export type SFTPListItem = {
31
46
  name: string;
32
47
  path: string;
@@ -85,7 +100,7 @@ export type ProtocolMessage = {
85
100
  version: number;
86
101
  encoding: 'MessagePack' | 'JSON';
87
102
  data: {
88
- web: ProtocolMessageWebError | ProtocolMessageWebAuthSuccess | ProtocolMessageWebTunnelOpened | ProtocolMessageWebTunnelData | ProtocolMessageWebTunnelClosed | ProtocolMessageWebSFTPListItems | ProtocolMessageWebSFTPDownloadStartResponse | ProtocolMessageWebSFTPDownloadChunk | ProtocolMessageWebSFTPUploadStartResponse | ProtocolMessageWebSFTPUploadChunkAck;
103
+ web: ProtocolMessageWebError | ProtocolMessageWebAuthSuccess | ProtocolMessageWebTunnelOpened | ProtocolMessageWebTunnelData | ProtocolMessageWebTunnelClosed | ProtocolMessageWebRDPAuthorized | ProtocolMessageWebSFTPListItems | ProtocolMessageWebSFTPDownloadStartResponse | ProtocolMessageWebSFTPDownloadChunk | ProtocolMessageWebSFTPUploadStartResponse | ProtocolMessageWebSFTPUploadChunkAck;
89
104
  };
90
105
  };
91
106
  export declare enum ProtocolMessageType {
@@ -94,6 +109,7 @@ export declare enum ProtocolMessageType {
94
109
  TunnelOpened = "TunnelOpened",
95
110
  TunnelClosed = "TunnelClosed",
96
111
  TunnelData = "TunnelData",
112
+ RDPAuthorized = "RDPAuthorized",
97
113
  SFTPListItems = "SFTPListItems",
98
114
  SFTPDownloadStartResponse = "SFTPDownloadStartResponse",
99
115
  SFTPDownloadChunk = "SFTPDownloadChunk",
@@ -0,0 +1,90 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { ConnectionState } from '../../common/protocol';
3
+ /**
4
+ * Remote desktop over RDP.
5
+ *
6
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
7
+ * through the phirepass channel. The channel is used only to authorise the
8
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
9
+ * own client, because that client speaks RDCleanPath and can set neither
10
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
11
+ * `phirepass-rs` for why the session is split across two sockets.
12
+ */
13
+ export declare class PhirepassRdp {
14
+ private channel;
15
+ private containerEl?;
16
+ private ironEl?;
17
+ private userInteraction?;
18
+ private domReady;
19
+ private runtimeReady;
20
+ private connected;
21
+ private session_id?;
22
+ /** Credentials in force for this session, from props or from the prompt. */
23
+ private credentials?;
24
+ private credentialsPrompt;
25
+ private statusMessage?;
26
+ private usernameBuffer;
27
+ private passwordBuffer;
28
+ el: HTMLElement;
29
+ serverHost: string;
30
+ serverPort: number;
31
+ allowInsecure: boolean;
32
+ heartbeatInterval: number;
33
+ nodeId: string;
34
+ serviceId: string;
35
+ token: string;
36
+ /**
37
+ * Credentials for the remote host. When either is missing the widget
38
+ * prompts for both.
39
+ *
40
+ * They serve two purposes at once: the agent checks them before it
41
+ * authorises the tunnel, and the browser uses them for CredSSP. The agent
42
+ * never logs in with them — it discards them once the tunnel is authorised.
43
+ */
44
+ username?: string;
45
+ password?: string;
46
+ /**
47
+ * What to name the host in the CredSSP service principal (`TERMSRV/...`).
48
+ *
49
+ * The agent dials whatever the node's service settings say, so this is
50
+ * never used for routing. It matters only because some hosts check the SPN,
51
+ * and the browser has no other way to learn the host's real address.
52
+ */
53
+ destination?: string;
54
+ /** `fit` scales the desktop to the widget, `real` keeps 1:1 pixels. */
55
+ scale: 'fit' | 'full' | 'real';
56
+ onNodeIdChange(newValue?: string, _oldValue?: string): void;
57
+ serverId?: string;
58
+ onServerIdChange(_newValue?: string, _oldValue?: string): void;
59
+ connectionStateChanged: EventEmitter<[ConnectionState, unknown?]>;
60
+ private create_web_socket_endpoint;
61
+ connectedCallback(): Promise<void>;
62
+ componentDidLoad(): void;
63
+ disconnectedCallback(): Promise<void>;
64
+ private try_connect;
65
+ private connect;
66
+ private open_comms;
67
+ private close_comms;
68
+ private reset_session_state;
69
+ /**
70
+ * The channel stays open for the whole session even though no RDP byte ever
71
+ * travels over it: it is what keeps the tunnel registered server-side, and
72
+ * it is where `TunnelClosed` and `Error` arrive.
73
+ */
74
+ private handle_auth_success;
75
+ private request_tunnel;
76
+ /**
77
+ * The tunnel is authorised but nothing has been dialled yet: the agent only
78
+ * reserves `sid`. Handing the ticket to the RDP client is what triggers the
79
+ * TCP + x224 + TLS hop, and the ticket expires 60s from now.
80
+ */
81
+ private handle_rdp_authorized;
82
+ private start_session;
83
+ /** IronRDP rejects with its own error shape rather than an `Error`. */
84
+ private describe_error;
85
+ private handle_tunnel_closed;
86
+ private handle_error;
87
+ private teardown_client;
88
+ private submit_credentials;
89
+ render(): any;
90
+ }
@@ -8,6 +8,51 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { ConnectionState } from "./common/protocol";
9
9
  export { ConnectionState } from "./common/protocol";
10
10
  export namespace Components {
11
+ /**
12
+ * Remote desktop over RDP.
13
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
14
+ * through the phirepass channel. The channel is used only to authorise the
15
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
16
+ * own client, because that client speaks RDCleanPath and can set neither
17
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
18
+ * `phirepass-rs` for why the session is split across two sockets.
19
+ */
20
+ interface PhirepassRdp {
21
+ /**
22
+ * @default false
23
+ */
24
+ "allowInsecure": boolean;
25
+ /**
26
+ * What to name the host in the CredSSP service principal (`TERMSRV/...`). The agent dials whatever the node's service settings say, so this is never used for routing. It matters only because some hosts check the SPN, and the browser has no other way to learn the host's real address.
27
+ */
28
+ "destination"?: string;
29
+ /**
30
+ * @default 30_000
31
+ */
32
+ "heartbeatInterval": number;
33
+ "nodeId": string;
34
+ "password"?: string;
35
+ /**
36
+ * `fit` scales the desktop to the widget, `real` keeps 1:1 pixels.
37
+ * @default 'fit'
38
+ */
39
+ "scale": 'fit' | 'full' | 'real';
40
+ /**
41
+ * @default "phirepass.com"
42
+ */
43
+ "serverHost": string;
44
+ "serverId"?: string;
45
+ /**
46
+ * @default 443
47
+ */
48
+ "serverPort": number;
49
+ "serviceId": string;
50
+ "token": string;
51
+ /**
52
+ * Credentials for the remote host. When either is missing the widget prompts for both. They serve two purposes at once: the agent checks them before it authorises the tunnel, and the browser uses them for CredSSP. The agent never logs in with them — it discards them once the tunnel is authorised.
53
+ */
54
+ "username"?: string;
55
+ }
11
56
  interface PhirepassSftpClient {
12
57
  /**
13
58
  * @default false
@@ -71,6 +116,10 @@ export namespace Components {
71
116
  "token": string;
72
117
  }
73
118
  }
119
+ export interface PhirepassRdpCustomEvent<T> extends CustomEvent<T> {
120
+ detail: T;
121
+ target: HTMLPhirepassRdpElement;
122
+ }
74
123
  export interface PhirepassSftpClientCustomEvent<T> extends CustomEvent<T> {
75
124
  detail: T;
76
125
  target: HTMLPhirepassSftpClientElement;
@@ -80,6 +129,32 @@ export interface PhirepassTerminalCustomEvent<T> extends CustomEvent<T> {
80
129
  target: HTMLPhirepassTerminalElement;
81
130
  }
82
131
  declare global {
132
+ interface HTMLPhirepassRdpElementEventMap {
133
+ "connectionStateChanged": [ConnectionState, unknown?];
134
+ }
135
+ /**
136
+ * Remote desktop over RDP.
137
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
138
+ * through the phirepass channel. The channel is used only to authorise the
139
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
140
+ * own client, because that client speaks RDCleanPath and can set neither
141
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
142
+ * `phirepass-rs` for why the session is split across two sockets.
143
+ */
144
+ interface HTMLPhirepassRdpElement extends Components.PhirepassRdp, HTMLStencilElement {
145
+ addEventListener<K extends keyof HTMLPhirepassRdpElementEventMap>(type: K, listener: (this: HTMLPhirepassRdpElement, ev: PhirepassRdpCustomEvent<HTMLPhirepassRdpElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
146
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
147
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
148
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
149
+ removeEventListener<K extends keyof HTMLPhirepassRdpElementEventMap>(type: K, listener: (this: HTMLPhirepassRdpElement, ev: PhirepassRdpCustomEvent<HTMLPhirepassRdpElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
150
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
151
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
152
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
153
+ }
154
+ var HTMLPhirepassRdpElement: {
155
+ prototype: HTMLPhirepassRdpElement;
156
+ new (): HTMLPhirepassRdpElement;
157
+ };
83
158
  interface HTMLPhirepassSftpClientElementEventMap {
84
159
  "maximize": any;
85
160
  "connectionStateChanged": [ConnectionState, unknown?];
@@ -116,6 +191,7 @@ declare global {
116
191
  new (): HTMLPhirepassTerminalElement;
117
192
  };
118
193
  interface HTMLElementTagNameMap {
194
+ "phirepass-rdp": HTMLPhirepassRdpElement;
119
195
  "phirepass-sftp-client": HTMLPhirepassSftpClientElement;
120
196
  "phirepass-terminal": HTMLPhirepassTerminalElement;
121
197
  }
@@ -123,6 +199,52 @@ declare global {
123
199
  declare namespace LocalJSX {
124
200
  type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
125
201
 
202
+ /**
203
+ * Remote desktop over RDP.
204
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
205
+ * through the phirepass channel. The channel is used only to authorise the
206
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
207
+ * own client, because that client speaks RDCleanPath and can set neither
208
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
209
+ * `phirepass-rs` for why the session is split across two sockets.
210
+ */
211
+ interface PhirepassRdp {
212
+ /**
213
+ * @default false
214
+ */
215
+ "allowInsecure"?: boolean;
216
+ /**
217
+ * What to name the host in the CredSSP service principal (`TERMSRV/...`). The agent dials whatever the node's service settings say, so this is never used for routing. It matters only because some hosts check the SPN, and the browser has no other way to learn the host's real address.
218
+ */
219
+ "destination"?: string;
220
+ /**
221
+ * @default 30_000
222
+ */
223
+ "heartbeatInterval"?: number;
224
+ "nodeId": string;
225
+ "onConnectionStateChanged"?: (event: PhirepassRdpCustomEvent<[ConnectionState, unknown?]>) => void;
226
+ "password"?: string;
227
+ /**
228
+ * `fit` scales the desktop to the widget, `real` keeps 1:1 pixels.
229
+ * @default 'fit'
230
+ */
231
+ "scale"?: 'fit' | 'full' | 'real';
232
+ /**
233
+ * @default "phirepass.com"
234
+ */
235
+ "serverHost"?: string;
236
+ "serverId"?: string;
237
+ /**
238
+ * @default 443
239
+ */
240
+ "serverPort"?: number;
241
+ "serviceId": string;
242
+ "token": string;
243
+ /**
244
+ * Credentials for the remote host. When either is missing the widget prompts for both. They serve two purposes at once: the agent checks them before it authorises the tunnel, and the browser uses them for CredSSP. The agent never logs in with them — it discards them once the tunnel is authorised.
245
+ */
246
+ "username"?: string;
247
+ }
126
248
  interface PhirepassSftpClient {
127
249
  /**
128
250
  * @default false
@@ -187,6 +309,20 @@ declare namespace LocalJSX {
187
309
  "token": string;
188
310
  }
189
311
 
312
+ interface PhirepassRdpAttributes {
313
+ "serverHost": string;
314
+ "serverPort": number;
315
+ "allowInsecure": boolean;
316
+ "heartbeatInterval": number;
317
+ "nodeId": string;
318
+ "serviceId": string;
319
+ "token": string;
320
+ "username": string;
321
+ "password": string;
322
+ "destination": string;
323
+ "scale": 'fit' | 'full' | 'real';
324
+ "serverId": string;
325
+ }
190
326
  interface PhirepassSftpClientAttributes {
191
327
  "name": string;
192
328
  "description": string;
@@ -212,6 +348,7 @@ declare namespace LocalJSX {
212
348
  }
213
349
 
214
350
  interface IntrinsicElements {
351
+ "phirepass-rdp": Omit<PhirepassRdp, keyof PhirepassRdpAttributes> & { [K in keyof PhirepassRdp & keyof PhirepassRdpAttributes]?: PhirepassRdp[K] } & { [K in keyof PhirepassRdp & keyof PhirepassRdpAttributes as `attr:${K}`]?: PhirepassRdpAttributes[K] } & { [K in keyof PhirepassRdp & keyof PhirepassRdpAttributes as `prop:${K}`]?: PhirepassRdp[K] } & OneOf<"nodeId", PhirepassRdp["nodeId"], PhirepassRdpAttributes["nodeId"]> & OneOf<"serviceId", PhirepassRdp["serviceId"], PhirepassRdpAttributes["serviceId"]> & OneOf<"token", PhirepassRdp["token"], PhirepassRdpAttributes["token"]>;
215
352
  "phirepass-sftp-client": Omit<PhirepassSftpClient, keyof PhirepassSftpClientAttributes> & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes]?: PhirepassSftpClient[K] } & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes as `attr:${K}`]?: PhirepassSftpClientAttributes[K] } & { [K in keyof PhirepassSftpClient & keyof PhirepassSftpClientAttributes as `prop:${K}`]?: PhirepassSftpClient[K] } & OneOf<"nodeId", PhirepassSftpClient["nodeId"], PhirepassSftpClientAttributes["nodeId"]> & OneOf<"serviceId", PhirepassSftpClient["serviceId"], PhirepassSftpClientAttributes["serviceId"]> & OneOf<"token", PhirepassSftpClient["token"], PhirepassSftpClientAttributes["token"]>;
216
353
  "phirepass-terminal": Omit<PhirepassTerminal, keyof PhirepassTerminalAttributes> & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes]?: PhirepassTerminal[K] } & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes as `attr:${K}`]?: PhirepassTerminalAttributes[K] } & { [K in keyof PhirepassTerminal & keyof PhirepassTerminalAttributes as `prop:${K}`]?: PhirepassTerminal[K] } & OneOf<"nodeId", PhirepassTerminal["nodeId"], PhirepassTerminalAttributes["nodeId"]> & OneOf<"serviceId", PhirepassTerminal["serviceId"], PhirepassTerminalAttributes["serviceId"]> & OneOf<"token", PhirepassTerminal["token"], PhirepassTerminalAttributes["token"]>;
217
354
  }
@@ -220,6 +357,16 @@ export { LocalJSX as JSX };
220
357
  declare module "@stencil/core" {
221
358
  export namespace JSX {
222
359
  interface IntrinsicElements {
360
+ /**
361
+ * Remote desktop over RDP.
362
+ * Unlike the terminal and SFTP widgets this one does not pipe protocol bytes
363
+ * through the phirepass channel. The channel is used only to authorise the
364
+ * session; the actual RDP stream runs on a second WebSocket opened by IronRDP's
365
+ * own client, because that client speaks RDCleanPath and can set neither
366
+ * headers nor a subprotocol on the socket it opens. See `RDP.md` in
367
+ * `phirepass-rs` for why the session is split across two sockets.
368
+ */
369
+ "phirepass-rdp": LocalJSX.IntrinsicElements["phirepass-rdp"] & JSXBase.HTMLAttributes<HTMLPhirepassRdpElement>;
223
370
  "phirepass-sftp-client": LocalJSX.IntrinsicElements["phirepass-sftp-client"] & JSXBase.HTMLAttributes<HTMLPhirepassSftpClientElement>;
224
371
  "phirepass-terminal": LocalJSX.IntrinsicElements["phirepass-terminal"] & JSXBase.HTMLAttributes<HTMLPhirepassTerminalElement>;
225
372
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phirepass-widgets",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "description": "Phirepass widgets for the web application",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -48,6 +48,8 @@
48
48
  },
49
49
  "license": "AGPL-3.0-or-later",
50
50
  "dependencies": {
51
+ "@devolutions/iron-remote-desktop": "^0.11.0",
52
+ "@devolutions/iron-remote-desktop-rdp": "^0.7.0",
51
53
  "@xterm/addon-fit": "^0.11.0",
52
54
  "@xterm/addon-image": "^0.9.0",
53
55
  "@xterm/addon-search": "^0.16.0",
@@ -55,6 +57,6 @@
55
57
  "@xterm/addon-web-links": "^0.12.0",
56
58
  "@xterm/addon-webgl": "^0.19.0",
57
59
  "@xterm/xterm": "^6.0.0",
58
- "phirepass-channel": "^0.1.294"
60
+ "phirepass-channel": "^0.1.296"
59
61
  }
60
62
  }