phirepass-widgets 0.0.65 → 0.0.67
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.
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +1 -1
- package/dist/cjs/phirepass-terminal.cjs.entry.js +1 -1
- package/dist/cjs/{protocol-BOZOABT1.js → protocol-B06teJpB.js} +36 -36
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/{phirepass-widgets/p-B9sL8OFy.js → components/p-CH-qUK6p.js} +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +4 -4
- package/dist/esm/phirepass-sftp-client.entry.js +1 -1
- package/dist/esm/phirepass-terminal.entry.js +1 -1
- package/dist/esm/{protocol-B9sL8OFy.js → protocol-CH-qUK6p.js} +35 -35
- package/dist/{components/p-B9sL8OFy.js → phirepass-widgets/p-CH-qUK6p.js} +1 -1
- package/dist/phirepass-widgets/{p-06c5a828.entry.js → p-d2657a46.entry.js} +5 -5
- package/dist/phirepass-widgets/{p-4be33ef0.entry.js → p-fe815c76.entry.js} +1 -1
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-DovZQ7sb.js';
|
|
2
|
-
import { _ as __wbg_init, E as ErrorType, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-
|
|
2
|
+
import { _ as __wbg_init, E as ErrorType, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-CH-qUK6p.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-DovZQ7sb.js';
|
|
2
|
-
import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-
|
|
2
|
+
import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-CH-qUK6p.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -334,7 +334,7 @@ const ErrorType = Object.freeze({
|
|
|
334
334
|
function __wbg_get_imports() {
|
|
335
335
|
const import0 = {
|
|
336
336
|
__proto__: null,
|
|
337
|
-
|
|
337
|
+
__wbg_Error_fdd633d4bb5dd76a: function(arg0, arg1) {
|
|
338
338
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
339
339
|
return addHeapObject(ret);
|
|
340
340
|
},
|
|
@@ -345,14 +345,14 @@ function __wbg_get_imports() {
|
|
|
345
345
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
346
346
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
347
347
|
},
|
|
348
|
-
|
|
348
|
+
__wbg___wbindgen_debug_string_8a447059637473e2: function(arg0, arg1) {
|
|
349
349
|
const ret = debugString(getObject(arg1));
|
|
350
350
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
351
351
|
const len1 = WASM_VECTOR_LEN;
|
|
352
352
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
353
353
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
354
354
|
},
|
|
355
|
-
|
|
355
|
+
__wbg___wbindgen_string_get_71bb4348194e31f0: function(arg0, arg1) {
|
|
356
356
|
const obj = getObject(arg1);
|
|
357
357
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
358
358
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -360,47 +360,47 @@ function __wbg_get_imports() {
|
|
|
360
360
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
361
361
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
362
362
|
},
|
|
363
|
-
|
|
363
|
+
__wbg___wbindgen_throw_ea4887a5f8f9a9db: function(arg0, arg1) {
|
|
364
364
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
365
365
|
},
|
|
366
|
-
|
|
366
|
+
__wbg__wbg_cb_unref_33c39e13d73b25f6: function(arg0) {
|
|
367
367
|
getObject(arg0)._wbg_cb_unref();
|
|
368
368
|
},
|
|
369
|
-
|
|
369
|
+
__wbg_call_0e855b388e315e17: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
370
370
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
371
371
|
return addHeapObject(ret);
|
|
372
372
|
}, arguments); },
|
|
373
|
-
|
|
374
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
373
|
+
__wbg_call_5575218572ead796: function() { return handleError(function (arg0, arg1, arg2) {
|
|
374
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
375
375
|
return addHeapObject(ret);
|
|
376
376
|
}, arguments); },
|
|
377
|
-
|
|
378
|
-
const ret = getObject(arg0).call(getObject(arg1)
|
|
377
|
+
__wbg_call_8e98ed2f3c86c4b5: function() { return handleError(function (arg0, arg1) {
|
|
378
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
379
379
|
return addHeapObject(ret);
|
|
380
380
|
}, arguments); },
|
|
381
381
|
__wbg_clearInterval_26ba580547547579: function(arg0) {
|
|
382
382
|
const ret = clearInterval(takeObject(arg0));
|
|
383
383
|
return addHeapObject(ret);
|
|
384
384
|
},
|
|
385
|
-
|
|
385
|
+
__wbg_close_26aa343c0d729303: function() { return handleError(function (arg0) {
|
|
386
386
|
getObject(arg0).close();
|
|
387
387
|
}, arguments); },
|
|
388
|
-
|
|
388
|
+
__wbg_data_4a7f1308dbd33a21: function(arg0) {
|
|
389
389
|
const ret = getObject(arg0).data;
|
|
390
390
|
return addHeapObject(ret);
|
|
391
391
|
},
|
|
392
|
-
|
|
392
|
+
__wbg_from_50138b2ca136f50c: function(arg0) {
|
|
393
393
|
const ret = Array.from(getObject(arg0));
|
|
394
394
|
return addHeapObject(ret);
|
|
395
395
|
},
|
|
396
|
-
|
|
396
|
+
__wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
|
|
397
397
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
398
398
|
return addHeapObject(ret);
|
|
399
399
|
}, arguments); },
|
|
400
|
-
|
|
400
|
+
__wbg_info_cdc46cf7d03097ce: function(arg0, arg1) {
|
|
401
401
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
402
402
|
},
|
|
403
|
-
|
|
403
|
+
__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
|
|
404
404
|
let result;
|
|
405
405
|
try {
|
|
406
406
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -410,38 +410,38 @@ function __wbg_get_imports() {
|
|
|
410
410
|
const ret = result;
|
|
411
411
|
return ret;
|
|
412
412
|
},
|
|
413
|
-
|
|
413
|
+
__wbg_length_589238bdcf171f0e: function(arg0) {
|
|
414
414
|
const ret = getObject(arg0).length;
|
|
415
415
|
return ret;
|
|
416
416
|
},
|
|
417
|
-
|
|
418
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
419
|
-
return addHeapObject(ret);
|
|
420
|
-
},
|
|
421
|
-
__wbg_new_ce1ab61c1c2b300d: function() {
|
|
417
|
+
__wbg_new_2e117a478906f062: function() {
|
|
422
418
|
const ret = new Object();
|
|
423
419
|
return addHeapObject(ret);
|
|
424
420
|
},
|
|
425
|
-
|
|
421
|
+
__wbg_new_36e147a8ced3c6e0: function() {
|
|
426
422
|
const ret = new Array();
|
|
427
423
|
return addHeapObject(ret);
|
|
428
424
|
},
|
|
429
|
-
|
|
425
|
+
__wbg_new_81880fb5002cb255: function(arg0) {
|
|
426
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
427
|
+
return addHeapObject(ret);
|
|
428
|
+
},
|
|
429
|
+
__wbg_new_with_str_sequence_dfdb072344bf2999: function() { return handleError(function (arg0, arg1, arg2) {
|
|
430
430
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
431
431
|
return addHeapObject(ret);
|
|
432
432
|
}, arguments); },
|
|
433
|
-
|
|
433
|
+
__wbg_prototypesetcall_d721637c7ca66eb8: function(arg0, arg1, arg2) {
|
|
434
434
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
435
435
|
},
|
|
436
|
-
|
|
436
|
+
__wbg_push_f724b5db8acf89d2: function(arg0, arg1) {
|
|
437
437
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
438
438
|
return ret;
|
|
439
439
|
},
|
|
440
|
-
|
|
440
|
+
__wbg_readyState_97951098f8995393: function(arg0) {
|
|
441
441
|
const ret = getObject(arg0).readyState;
|
|
442
442
|
return ret;
|
|
443
443
|
},
|
|
444
|
-
|
|
444
|
+
__wbg_send_982c819b9a1b34a5: function() { return handleError(function (arg0, arg1, arg2) {
|
|
445
445
|
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
|
|
446
446
|
}, arguments); },
|
|
447
447
|
__wbg_setInterval_cbf1c35c6a692d37: function() { return handleError(function (arg0, arg1) {
|
|
@@ -451,25 +451,25 @@ function __wbg_get_imports() {
|
|
|
451
451
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
452
452
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
453
453
|
},
|
|
454
|
-
|
|
454
|
+
__wbg_set_binaryType_148427b11a8e6551: function(arg0, arg1) {
|
|
455
455
|
getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
456
456
|
},
|
|
457
|
-
|
|
457
|
+
__wbg_set_dc601f4a69da0bc2: function(arg0, arg1, arg2) {
|
|
458
458
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
459
459
|
},
|
|
460
|
-
|
|
460
|
+
__wbg_set_onclose_8134952b2a9ec104: function(arg0, arg1) {
|
|
461
461
|
getObject(arg0).onclose = getObject(arg1);
|
|
462
462
|
},
|
|
463
|
-
|
|
463
|
+
__wbg_set_onerror_3f68563f77d362f1: function(arg0, arg1) {
|
|
464
464
|
getObject(arg0).onerror = getObject(arg1);
|
|
465
465
|
},
|
|
466
|
-
|
|
466
|
+
__wbg_set_onmessage_397a79f643011142: function(arg0, arg1) {
|
|
467
467
|
getObject(arg0).onmessage = getObject(arg1);
|
|
468
468
|
},
|
|
469
|
-
|
|
469
|
+
__wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
|
|
470
470
|
getObject(arg0).onopen = getObject(arg1);
|
|
471
471
|
},
|
|
472
|
-
|
|
472
|
+
__wbg_warn_b081ac6a7578a4db: function(arg0, arg1) {
|
|
473
473
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
474
474
|
},
|
|
475
475
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
@@ -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();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,A(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){O.channel_connect(this.__wbg_ptr)}disable_service(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(t,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=S(e,O.__wbindgen_export,O.__wbindgen_export2),b=P;var l=A(o)?0:S(o,O.__wbindgen_export,O.__wbindgen_export2),d=P,w=A(c)?0:S(c,O.__wbindgen_export,O.__wbindgen_export2);O.channel_disable_service(this.__wbg_ptr,s,_,u,a,f,b,r,l,d,w,P,A(i)?Number.MAX_SAFE_INTEGER:i>>>0)}disconnect(){O.channel_disconnect(this.__wbg_ptr)}enable_service(n,t,e,r,o,c,i,s,_){const u=S(n,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=S(t,O.__wbindgen_export,O.__wbindgen_export2),b=P,l=S(e,O.__wbindgen_export,O.__wbindgen_export2),d=P;var w=A(o)?0:S(o,O.__wbindgen_export,O.__wbindgen_export2),g=P,h=A(c)?0:S(c,O.__wbindgen_export,O.__wbindgen_export2),p=P,y=A(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),m=P,v=A(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2);O.channel_enable_service(this.__wbg_ptr,u,a,f,b,l,d,r,w,g,h,p,y,m,v,P,A(_)?Number.MAX_SAFE_INTEGER:_>>>0)}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=A(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,A(n)?0:u(n))}on_connection_error(n){O.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){O.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){O.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){O.channel_on_protocol_message(this.__wbg_ptr,A(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,A(t)?0:u(t))}open_sftp_tunnel(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P;var i=A(t)?0:S(t,O.__wbindgen_export,O.__wbindgen_export2),s=P,_=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_sftp_tunnel(this.__wbg_ptr,o,c,i,s,_,P,A(r)?Number.MAX_SAFE_INTEGER:r>>>0)}open_ssh_tunnel(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P;var i=A(t)?0:S(t,O.__wbindgen_export,O.__wbindgen_export2),s=P,_=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_ssh_tunnel(this.__wbg_ptr,o,c,i,s,_,P,A(r)?Number.MAX_SAFE_INTEGER:r>>>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,A(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,A(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,A(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,A(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,A(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,A(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)}}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_ef53bc310eb298a0: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_0accd80f45e5faa2: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_72bdf95d3ae505b1:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=A(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_1506f2235d1bdba0:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_61db23ac97f16c31:function(n){p(n)._wbg_cb_unref()},__wbg_call_40e4174f169eaca7:function(){return y((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_call_8a89609d89f6608a:function(){return y((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_call_9c758de292015997:function(){return y((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(T(n)))},__wbg_close_9acc00cbca310439:function(){return y((function(n){p(n).close()}),arguments)},__wbg_data_bd354b70c783c66e:function(n){return u(p(n).data)},__wbg_from_d300fe49deab18f5:function(n){return u(Array.from(p(n)))},__wbg_get_de6a0f7d4d18a304:function(){return y((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_2ae4c2f2fc4b5f9c:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_8f49811467741499:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_4a591ecaa01354d9:function(n){return p(n).length},__wbg_new_578aeef4b6b94378:function(n){return u(new Uint8Array(p(n)))},__wbg_new_ce1ab61c1c2b300d:function(){return u(new Object)},__wbg_new_d90091b82fdf5b91:function(){return u(new Array)},__wbg_new_with_str_sequence_9ed2327430efed8d:function(){return y((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_3249fc62a0fafa30:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_a6822215aa43e71c:function(n,t){return p(n).push(p(t))},__wbg_readyState_490503c1fa8f8dd6:function(n){return p(n).readyState},__wbg_send_4a773f523104d75e: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)[T(t)]=T(e)},__wbg_set_binaryType_41994c453b95bdd2:function(n,t){p(n).binaryType=s[t]},__wbg_set_dca99999bba88a9a:function(n,t,e){p(n)[t>>>0]=T(e)},__wbg_set_onclose_13787fb31ae8aefd:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_5a45265839edf1b1:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_9c6b4cb14e244b7f:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_db452f4233e99d7d:function(n,t){p(n).onopen=p(t)},__wbg_warn_09a978a4ed0bc803: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(p(n))},__wbindgen_object_drop_ref:function(n){T(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){O.__wasm_bindgen_func_elem_42(n,t)}function o(n,t,e){O.__wasm_bindgen_func_elem_44(n,t,u(e))}function c(n,t,e){O.__wasm_bindgen_func_elem_44_1(n,t,u(e))}function i(n,t,e){O.__wasm_bindgen_func_elem_44_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 F+=t,F>=j&&(U=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),U.decode(),F=t),U.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 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&&(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=N.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+=N.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return P=i,o}function T(n){const t=p(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let U=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});U.decode();const j=2146435072;let F=0;const N=new TextEncoder;"encodeInto"in N||(N.encodeInto=function(n,t){const e=N.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.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
|
+
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,A(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){O.channel_connect(this.__wbg_ptr)}disable_service(n,t,e,r,o,c,i){const s=S(n,O.__wbindgen_export,O.__wbindgen_export2),_=P,u=S(t,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=S(e,O.__wbindgen_export,O.__wbindgen_export2),b=P;var l=A(o)?0:S(o,O.__wbindgen_export,O.__wbindgen_export2),d=P,w=A(c)?0:S(c,O.__wbindgen_export,O.__wbindgen_export2);O.channel_disable_service(this.__wbg_ptr,s,_,u,a,f,b,r,l,d,w,P,A(i)?Number.MAX_SAFE_INTEGER:i>>>0)}disconnect(){O.channel_disconnect(this.__wbg_ptr)}enable_service(n,t,e,r,o,c,i,s,_){const u=S(n,O.__wbindgen_export,O.__wbindgen_export2),a=P,f=S(t,O.__wbindgen_export,O.__wbindgen_export2),b=P,l=S(e,O.__wbindgen_export,O.__wbindgen_export2),d=P;var w=A(o)?0:S(o,O.__wbindgen_export,O.__wbindgen_export2),g=P,h=A(c)?0:S(c,O.__wbindgen_export,O.__wbindgen_export2),p=P,y=A(i)?0:S(i,O.__wbindgen_export,O.__wbindgen_export2),m=P,v=A(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2);O.channel_enable_service(this.__wbg_ptr,u,a,f,b,l,d,r,w,g,h,p,y,m,v,P,A(_)?Number.MAX_SAFE_INTEGER:_>>>0)}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=A(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,A(n)?0:u(n))}on_connection_error(n){O.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){O.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){O.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){O.channel_on_protocol_message(this.__wbg_ptr,A(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,A(t)?0:u(t))}open_sftp_tunnel(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P;var i=A(t)?0:S(t,O.__wbindgen_export,O.__wbindgen_export2),s=P,_=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_sftp_tunnel(this.__wbg_ptr,o,c,i,s,_,P,A(r)?Number.MAX_SAFE_INTEGER:r>>>0)}open_ssh_tunnel(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P;var i=A(t)?0:S(t,O.__wbindgen_export,O.__wbindgen_export2),s=P,_=A(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_ssh_tunnel(this.__wbg_ptr,o,c,i,s,_,P,A(r)?Number.MAX_SAFE_INTEGER:r>>>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,A(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,A(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,A(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,A(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,A(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,A(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)}}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_fdd633d4bb5dd76a: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_8a447059637473e2: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_71bb4348194e31f0:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=A(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_ea4887a5f8f9a9db:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_33c39e13d73b25f6:function(n){p(n)._wbg_cb_unref()},__wbg_call_0e855b388e315e17:function(){return y((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_call_5575218572ead796:function(){return y((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_call_8e98ed2f3c86c4b5:function(){return y((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(T(n)))},__wbg_close_26aa343c0d729303:function(){return y((function(n){p(n).close()}),arguments)},__wbg_data_4a7f1308dbd33a21:function(n){return u(p(n).data)},__wbg_from_50138b2ca136f50c:function(n){return u(Array.from(p(n)))},__wbg_get_dddb90ff5d27a080:function(){return y((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_cdc46cf7d03097ce:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_589238bdcf171f0e:function(n){return p(n).length},__wbg_new_2e117a478906f062:function(){return u(new Object)},__wbg_new_36e147a8ced3c6e0:function(){return u(new Array)},__wbg_new_81880fb5002cb255:function(n){return u(new Uint8Array(p(n)))},__wbg_new_with_str_sequence_dfdb072344bf2999:function(){return y((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_d721637c7ca66eb8:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_f724b5db8acf89d2:function(n,t){return p(n).push(p(t))},__wbg_readyState_97951098f8995393:function(n){return p(n).readyState},__wbg_send_982c819b9a1b34a5: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)[T(t)]=T(e)},__wbg_set_binaryType_148427b11a8e6551:function(n,t){p(n).binaryType=s[t]},__wbg_set_dc601f4a69da0bc2:function(n,t,e){p(n)[t>>>0]=T(e)},__wbg_set_onclose_8134952b2a9ec104:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_3f68563f77d362f1:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_397a79f643011142:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_ca8d311fe5282041:function(n,t){p(n).onopen=p(t)},__wbg_warn_b081ac6a7578a4db: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(p(n))},__wbindgen_object_drop_ref:function(n){T(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){O.__wasm_bindgen_func_elem_42(n,t)}function o(n,t,e){O.__wasm_bindgen_func_elem_44(n,t,u(e))}function c(n,t,e){O.__wasm_bindgen_func_elem_44_1(n,t,u(e))}function i(n,t,e){O.__wasm_bindgen_func_elem_44_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 F+=t,F>=j&&(U=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),U.decode(),F=t),U.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 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&&(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=N.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+=N.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return P=i,o}function T(n){const t=p(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let U=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});U.decode();const j=2146435072;let F=0;const N=new TextEncoder;"encodeInto"in N||(N.encodeInto=function(n,t){const e=N.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.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}
|