phirepass-widgets 0.0.50 → 0.0.51

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.
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-jdexunMF.js';
2
- import { _ as __wbg_init, E as ErrorType, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-BcIhGXR0.js';
2
+ import { _ as __wbg_init, E as ErrorType, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-1UO2RO2i.js';
3
3
 
4
4
  const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, g as getElement, h as h$1, H as Host } from './index-jdexunMF.js';
2
- import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-BcIhGXR0.js';
2
+ import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-1UO2RO2i.js';
3
3
 
4
4
  /**
5
5
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
@@ -316,7 +316,7 @@ function __wbg_get_imports() {
316
316
  const ret = Array.from(getObject(arg0));
317
317
  return addHeapObject(ret);
318
318
  },
319
- __wbg_info_4f09735f023f7fae: function(arg0, arg1) {
319
+ __wbg_info_6806dea58e7a86f5: function(arg0, arg1) {
320
320
  console.info(getStringFromWasm0(arg0, arg1));
321
321
  },
322
322
  __wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
@@ -388,27 +388,27 @@ function __wbg_get_imports() {
388
388
  __wbg_set_onopen_cd47b8fb1d92dee9: function(arg0, arg1) {
389
389
  getObject(arg0).onopen = getObject(arg1);
390
390
  },
391
- __wbg_warn_938671953d9be936: function(arg0, arg1) {
391
+ __wbg_warn_78650a5595aeb96b: function(arg0, arg1) {
392
392
  console.warn(getStringFromWasm0(arg0, arg1));
393
393
  },
394
394
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
395
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
396
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_41);
395
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
396
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_40);
397
397
  return addHeapObject(ret);
398
398
  },
399
399
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
400
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
401
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_41_1);
400
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
401
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_40_1);
402
402
  return addHeapObject(ret);
403
403
  },
404
404
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
405
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
406
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_41_2);
405
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
406
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_40_2);
407
407
  return addHeapObject(ret);
408
408
  },
409
409
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
410
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
411
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_39);
410
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
411
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43);
412
412
  return addHeapObject(ret);
413
413
  },
414
414
  __wbindgen_cast_0000000000000005: function(arg0) {
@@ -445,20 +445,20 @@ function __wbg_get_imports() {
445
445
  };
446
446
  }
447
447
 
448
- function __wasm_bindgen_func_elem_39(arg0, arg1) {
449
- wasm.__wasm_bindgen_func_elem_39(arg0, arg1);
448
+ function __wasm_bindgen_func_elem_43(arg0, arg1) {
449
+ wasm.__wasm_bindgen_func_elem_43(arg0, arg1);
450
450
  }
451
451
 
452
- function __wasm_bindgen_func_elem_41(arg0, arg1, arg2) {
453
- wasm.__wasm_bindgen_func_elem_41(arg0, arg1, addHeapObject(arg2));
452
+ function __wasm_bindgen_func_elem_40(arg0, arg1, arg2) {
453
+ wasm.__wasm_bindgen_func_elem_40(arg0, arg1, addHeapObject(arg2));
454
454
  }
455
455
 
456
- function __wasm_bindgen_func_elem_41_1(arg0, arg1, arg2) {
457
- wasm.__wasm_bindgen_func_elem_41_1(arg0, arg1, addHeapObject(arg2));
456
+ function __wasm_bindgen_func_elem_40_1(arg0, arg1, arg2) {
457
+ wasm.__wasm_bindgen_func_elem_40_1(arg0, arg1, addHeapObject(arg2));
458
458
  }
459
459
 
460
- function __wasm_bindgen_func_elem_41_2(arg0, arg1, arg2) {
461
- wasm.__wasm_bindgen_func_elem_41_2(arg0, arg1, addHeapObject(arg2));
460
+ function __wasm_bindgen_func_elem_40_2(arg0, arg1, arg2) {
461
+ wasm.__wasm_bindgen_func_elem_40_2(arg0, arg1, addHeapObject(arg2));
462
462
  }
463
463
 
464
464
 
@@ -1 +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();T.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(t,T.__wbindgen_export,T.__wbindgen_export2);T.channel_authenticate(this.__wbg_ptr,r,o,c,W,A(e)?4294967297:e>>>0)}connect(){T.channel_connect(this.__wbg_ptr)}disconnect(){T.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==T.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==T.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(t,T.__wbindgen_export,T.__wbindgen_export2),i=W;var s=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);const u=T.channel_new(r,o,c,i,s,W);return this.__wbg_ptr=u>>>0,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){T.channel_on_connection_close(this.__wbg_ptr,A(n)?0:u(n))}on_connection_error(n){T.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){T.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){T.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){T.channel_on_protocol_message(this.__wbg_ptr,A(n)?0:u(n))}open_sftp_tunnel(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W;var i=A(t)?0:S(t,T.__wbindgen_export,T.__wbindgen_export2),s=W,_=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_open_sftp_tunnel(this.__wbg_ptr,o,c,i,s,_,W,A(r)?4294967297:r>>>0)}open_ssh_tunnel(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W;var i=A(t)?0:S(t,T.__wbindgen_export,T.__wbindgen_export2),s=W,_=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_open_ssh_tunnel(this.__wbg_ptr,o,c,i,s,_,W,A(r)?4294967297:r>>>0)}send_sftp_delete(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2),i=W,s=S(e,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_delete(this.__wbg_ptr,c,i,t,s,_,u,W,A(o)?4294967297:o>>>0)}send_sftp_download_chunk(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_chunk(this.__wbg_ptr,c,W,t,e,r,A(o)?4294967297:o>>>0)}send_sftp_download_start(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2),i=W,s=S(e,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_start(this.__wbg_ptr,c,i,t,s,_,u,W,A(o)?4294967297:o>>>0)}send_sftp_list_data(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W,i=S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_list_data(this.__wbg_ptr,o,c,t,i,W,A(r)?4294967297:r>>>0)}send_sftp_upload_chunk(n,t,e,r,o,c,i){const s=S(n,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=function(n){const t=(0,T.__wbindgen_export)(1*n.length,1)>>>0;return h().set(n,t/1),W=n.length,t}(c);T.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,W,A(i)?4294967297:i>>>0)}send_sftp_upload_start(n,t,e,r,o,c,i){const s=S(n,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(e,T.__wbindgen_export,T.__wbindgen_export2),a=W,f=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,W,o,c,A(i)?4294967297:i>>>0)}send_ssh_terminal_resize(n,t,e,r,o,c){const i=S(n,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_ssh_terminal_resize(this.__wbg_ptr,i,W,t,e,r,o,c)}send_ssh_tunnel_data(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,c,W)}start_heartbeat(n){T.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){T.channel_stop_heartbeat(this.__wbg_ptr)}}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_960c155d3d49e4c2:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=S(String(y(t)),T.__wbindgen_export,T.__wbindgen_export2),r=W;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(n,t){const e=S(f(y(t)),T.__wbindgen_export,T.__wbindgen_export2),r=W;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(n,t){const e=y(t),r="string"==typeof e?e:void 0;var o=A(r)?0:S(r,T.__wbindgen_export,T.__wbindgen_export2),c=W;d().setInt32(n+4,c,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(n){y(n)._wbg_cb_unref()},__wbg_call_14b169f759b26747:function(){return p((function(n,t){return u(y(n).call(y(t)))}),arguments)},__wbg_call_a24592a6f349a97e:function(){return p((function(n,t,e){return u(y(n).call(y(t),y(e)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(j(n)))},__wbg_close_88106990eea7f544:function(){return p((function(n){y(n).close()}),arguments)},__wbg_data_bb9dffdd1e99cf2d:function(n){return u(y(n).data)},__wbg_from_0dbf29f09e7fb200:function(n){return u(Array.from(y(n)))},__wbg_info_4f09735f023f7fae:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(n){let t;try{t=y(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_9f1775224cf1d815:function(n){return y(n).length},__wbg_new_0c7403db6e782f19:function(n){return u(new Uint8Array(y(n)))},__wbg_new_682678e2f47e32bc:function(){return u(new Array)},__wbg_new_aa8d0fa9762c29bd:function(){return u(new Object)},__wbg_new_with_str_sequence_6453b755acdcc2e7:function(){return p((function(n,t,e){return u(new WebSocket(w(n,t),y(e)))}),arguments)},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),y(e))},__wbg_push_471a5b068a5295f6:function(n,t){return y(n).push(y(t))},__wbg_readyState_c78e609c7de3b381:function(n){return y(n).readyState},__wbg_send_186c85704c7f2d00:function(){return p((function(n,t,e){y(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return p((function(n,t){return u(setInterval(y(n),t))}),arguments)},__wbg_set_3bf1de9fab0cd644:function(n,t,e){y(n)[t>>>0]=j(e)},__wbg_set_6be42768c690e380:function(n,t,e){y(n)[j(t)]=j(e)},__wbg_set_binaryType_770e68648ca5e83d:function(n,t){y(n).binaryType=s[t]},__wbg_set_onclose_17fa3bbcc4ba3541:function(n,t){y(n).onclose=y(t)},__wbg_set_onerror_da99c4232662a084:function(n,t){y(n).onerror=y(t)},__wbg_set_onmessage_c1db358b9c38e3f1:function(n,t){y(n).onmessage=y(t)},__wbg_set_onopen_cd47b8fb1d92dee9:function(n,t){y(n).onopen=y(t)},__wbg_warn_938671953d9be936:function(n,t){console.warn(w(n,t))},__wbindgen_cast_0000000000000001:function(n,t){return u(R(n,t,o))},__wbindgen_cast_0000000000000002:function(n,t){return u(R(n,t,c))},__wbindgen_cast_0000000000000003:function(n,t){return u(R(n,t,i))},__wbindgen_cast_0000000000000004:function(n,t){return u(R(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(y(n))},__wbindgen_object_drop_ref:function(n){j(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){T.__wasm_bindgen_func_elem_39(n,t)}function o(n,t,e){T.__wasm_bindgen_func_elem_41(n,t,u(e))}function c(n,t,e){T.__wasm_bindgen_func_elem_41_1(n,t,u(e))}function i(n,t,e){T.__wasm_bindgen_func_elem_41_2(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>T.__wbg_channel_free(n>>>0,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=>T.__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!==T.memory.buffer)&&(l=new DataView(T.memory.buffer)),l}function w(n,t){return function(n,t){return q+=t,q>=U&&(O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),O.decode(),q=t),O.decode(h().subarray(n,n+t))}(n>>>=0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(T.memory.buffer)),g}function y(n){return m[n]}function p(n,t){try{return n.apply(this,t)}catch(n){T.__wbindgen_export3(u(n))}}let m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);let v=m.length;function A(n){return null==n}function R(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&&(T.__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=I.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),W=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+=I.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return W=i,o}function j(n){const t=y(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});O.decode();const U=2146435072;let q=0;const I=new TextEncoder;"encodeInto"in I||(I.encodeInto=function(n,t){const e=I.encode(n);return t.set(e),{read:n.length,written:e.length}});let T,W=0;async function E(n){if(void 0!==T)return T;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 T=n.exports,l=null,g=null,T}(r)}var F,P,$;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.SFTPListItems="SFTPListItems"}(F||(F={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(P||(P={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}($||($={}));export{n as C,t as E,P as I,F as P,E as _,$ as a}
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();T.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(t,T.__wbindgen_export,T.__wbindgen_export2);T.channel_authenticate(this.__wbg_ptr,r,o,c,W,A(e)?4294967297:e>>>0)}connect(){T.channel_connect(this.__wbg_ptr)}disconnect(){T.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==T.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==T.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(t,T.__wbindgen_export,T.__wbindgen_export2),i=W;var s=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);const u=T.channel_new(r,o,c,i,s,W);return this.__wbg_ptr=u>>>0,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){T.channel_on_connection_close(this.__wbg_ptr,A(n)?0:u(n))}on_connection_error(n){T.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){T.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){T.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){T.channel_on_protocol_message(this.__wbg_ptr,A(n)?0:u(n))}open_sftp_tunnel(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W;var i=A(t)?0:S(t,T.__wbindgen_export,T.__wbindgen_export2),s=W,_=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_open_sftp_tunnel(this.__wbg_ptr,o,c,i,s,_,W,A(r)?4294967297:r>>>0)}open_ssh_tunnel(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W;var i=A(t)?0:S(t,T.__wbindgen_export,T.__wbindgen_export2),s=W,_=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_open_ssh_tunnel(this.__wbg_ptr,o,c,i,s,_,W,A(r)?4294967297:r>>>0)}send_sftp_delete(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2),i=W,s=S(e,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_delete(this.__wbg_ptr,c,i,t,s,_,u,W,A(o)?4294967297:o>>>0)}send_sftp_download_chunk(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_chunk(this.__wbg_ptr,c,W,t,e,r,A(o)?4294967297:o>>>0)}send_sftp_download_start(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2),i=W,s=S(e,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_start(this.__wbg_ptr,c,i,t,s,_,u,W,A(o)?4294967297:o>>>0)}send_sftp_list_data(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W,i=S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_list_data(this.__wbg_ptr,o,c,t,i,W,A(r)?4294967297:r>>>0)}send_sftp_upload_chunk(n,t,e,r,o,c,i){const s=S(n,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=function(n){const t=(0,T.__wbindgen_export)(1*n.length,1)>>>0;return h().set(n,t/1),W=n.length,t}(c);T.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,W,A(i)?4294967297:i>>>0)}send_sftp_upload_start(n,t,e,r,o,c,i){const s=S(n,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(e,T.__wbindgen_export,T.__wbindgen_export2),a=W,f=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,W,o,c,A(i)?4294967297:i>>>0)}send_ssh_terminal_resize(n,t,e,r,o,c){const i=S(n,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_ssh_terminal_resize(this.__wbg_ptr,i,W,t,e,r,o,c)}send_ssh_tunnel_data(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,c,W)}start_heartbeat(n){T.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){T.channel_stop_heartbeat(this.__wbg_ptr)}}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_960c155d3d49e4c2:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=S(String(y(t)),T.__wbindgen_export,T.__wbindgen_export2),r=W;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(n,t){const e=S(f(y(t)),T.__wbindgen_export,T.__wbindgen_export2),r=W;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(n,t){const e=y(t),r="string"==typeof e?e:void 0;var o=A(r)?0:S(r,T.__wbindgen_export,T.__wbindgen_export2),c=W;d().setInt32(n+4,c,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(n){y(n)._wbg_cb_unref()},__wbg_call_14b169f759b26747:function(){return p((function(n,t){return u(y(n).call(y(t)))}),arguments)},__wbg_call_a24592a6f349a97e:function(){return p((function(n,t,e){return u(y(n).call(y(t),y(e)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(j(n)))},__wbg_close_88106990eea7f544:function(){return p((function(n){y(n).close()}),arguments)},__wbg_data_bb9dffdd1e99cf2d:function(n){return u(y(n).data)},__wbg_from_0dbf29f09e7fb200:function(n){return u(Array.from(y(n)))},__wbg_info_6806dea58e7a86f5:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(n){let t;try{t=y(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_9f1775224cf1d815:function(n){return y(n).length},__wbg_new_0c7403db6e782f19:function(n){return u(new Uint8Array(y(n)))},__wbg_new_682678e2f47e32bc:function(){return u(new Array)},__wbg_new_aa8d0fa9762c29bd:function(){return u(new Object)},__wbg_new_with_str_sequence_6453b755acdcc2e7:function(){return p((function(n,t,e){return u(new WebSocket(w(n,t),y(e)))}),arguments)},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),y(e))},__wbg_push_471a5b068a5295f6:function(n,t){return y(n).push(y(t))},__wbg_readyState_c78e609c7de3b381:function(n){return y(n).readyState},__wbg_send_186c85704c7f2d00:function(){return p((function(n,t,e){y(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return p((function(n,t){return u(setInterval(y(n),t))}),arguments)},__wbg_set_3bf1de9fab0cd644:function(n,t,e){y(n)[t>>>0]=j(e)},__wbg_set_6be42768c690e380:function(n,t,e){y(n)[j(t)]=j(e)},__wbg_set_binaryType_770e68648ca5e83d:function(n,t){y(n).binaryType=s[t]},__wbg_set_onclose_17fa3bbcc4ba3541:function(n,t){y(n).onclose=y(t)},__wbg_set_onerror_da99c4232662a084:function(n,t){y(n).onerror=y(t)},__wbg_set_onmessage_c1db358b9c38e3f1:function(n,t){y(n).onmessage=y(t)},__wbg_set_onopen_cd47b8fb1d92dee9:function(n,t){y(n).onopen=y(t)},__wbg_warn_78650a5595aeb96b:function(n,t){console.warn(w(n,t))},__wbindgen_cast_0000000000000001:function(n,t){return u(R(n,t,o))},__wbindgen_cast_0000000000000002:function(n,t){return u(R(n,t,c))},__wbindgen_cast_0000000000000003:function(n,t){return u(R(n,t,i))},__wbindgen_cast_0000000000000004:function(n,t){return u(R(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(y(n))},__wbindgen_object_drop_ref:function(n){j(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){T.__wasm_bindgen_func_elem_43(n,t)}function o(n,t,e){T.__wasm_bindgen_func_elem_40(n,t,u(e))}function c(n,t,e){T.__wasm_bindgen_func_elem_40_1(n,t,u(e))}function i(n,t,e){T.__wasm_bindgen_func_elem_40_2(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>T.__wbg_channel_free(n>>>0,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=>T.__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!==T.memory.buffer)&&(l=new DataView(T.memory.buffer)),l}function w(n,t){return function(n,t){return q+=t,q>=U&&(O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),O.decode(),q=t),O.decode(h().subarray(n,n+t))}(n>>>=0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(T.memory.buffer)),g}function y(n){return m[n]}function p(n,t){try{return n.apply(this,t)}catch(n){T.__wbindgen_export3(u(n))}}let m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);let v=m.length;function A(n){return null==n}function R(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&&(T.__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=I.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),W=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+=I.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return W=i,o}function j(n){const t=y(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});O.decode();const U=2146435072;let q=0;const I=new TextEncoder;"encodeInto"in I||(I.encodeInto=function(n,t){const e=I.encode(n);return t.set(e),{read:n.length,written:e.length}});let T,W=0;async function E(n){if(void 0!==T)return T;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 T=n.exports,l=null,g=null,T}(r)}var F,P,$;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.SFTPListItems="SFTPListItems"}(F||(F={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(P||(P={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}($||($={}));export{n as C,t as E,P as I,F as P,E as _,$ as a}