phirepass-widgets 0.0.68 → 0.0.70
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-fwpRbIt9.js → protocol-CApagg_b.js} +75 -45
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/components/p-DAIyU3gM.js +1 -0
- 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-B8StPogC.js → protocol-DAIyU3gM.js} +74 -44
- package/dist/phirepass-widgets/p-DAIyU3gM.js +1 -0
- package/dist/phirepass-widgets/{p-565fcc56.entry.js → p-a3e56764.entry.js} +5 -5
- package/dist/phirepass-widgets/{p-510830d6.entry.js → p-fb59aa0f.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 +2 -2
- package/dist/components/p-B8StPogC.js +0 -1
- package/dist/phirepass-widgets/p-B8StPogC.js +0 -1
|
@@ -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-DAIyU3gM.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-DAIyU3gM.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -29,55 +29,48 @@ class Channel {
|
|
|
29
29
|
/**
|
|
30
30
|
* @param {string} node_id
|
|
31
31
|
* @param {string} kind
|
|
32
|
+
* @param {string | null | undefined} name
|
|
32
33
|
* @param {string} host
|
|
33
34
|
* @param {number} port
|
|
34
35
|
* @param {string | null} [username]
|
|
35
36
|
* @param {string | null} [password]
|
|
37
|
+
* @param {string | null} [visibility]
|
|
38
|
+
* @param {string | null} [scheme]
|
|
36
39
|
* @param {number | null} [msg_id]
|
|
37
40
|
*/
|
|
38
|
-
|
|
41
|
+
create_service(node_id, kind, name, host, port, username, password, visibility, scheme, msg_id) {
|
|
39
42
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
40
43
|
const len0 = WASM_VECTOR_LEN;
|
|
41
44
|
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
42
45
|
const len1 = WASM_VECTOR_LEN;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var ptr4 = isLikeNone(
|
|
46
|
+
var ptr2 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
47
|
+
var len2 = WASM_VECTOR_LEN;
|
|
48
|
+
const ptr3 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
49
|
+
const len3 = WASM_VECTOR_LEN;
|
|
50
|
+
var ptr4 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
48
51
|
var len4 = WASM_VECTOR_LEN;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
var ptr5 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
53
|
+
var len5 = WASM_VECTOR_LEN;
|
|
54
|
+
var ptr6 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
55
|
+
var len6 = WASM_VECTOR_LEN;
|
|
56
|
+
var ptr7 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
57
|
+
var len7 = WASM_VECTOR_LEN;
|
|
58
|
+
wasm.channel_create_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, port, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
53
59
|
}
|
|
54
60
|
/**
|
|
55
61
|
* @param {string} node_id
|
|
56
|
-
* @param {string}
|
|
57
|
-
* @param {string} host
|
|
58
|
-
* @param {number} port
|
|
59
|
-
* @param {string | null} [username]
|
|
60
|
-
* @param {string | null} [password]
|
|
61
|
-
* @param {string | null} [visibility]
|
|
62
|
-
* @param {string | null} [scheme]
|
|
62
|
+
* @param {string} id
|
|
63
63
|
* @param {number | null} [msg_id]
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
delete_service(node_id, id, msg_id) {
|
|
66
66
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
67
67
|
const len0 = WASM_VECTOR_LEN;
|
|
68
|
-
const ptr1 = passStringToWasm0(
|
|
68
|
+
const ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
69
69
|
const len1 = WASM_VECTOR_LEN;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
75
|
-
var len4 = WASM_VECTOR_LEN;
|
|
76
|
-
var ptr5 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
77
|
-
var len5 = WASM_VECTOR_LEN;
|
|
78
|
-
var ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
79
|
-
var len6 = WASM_VECTOR_LEN;
|
|
80
|
-
wasm.channel_enable_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, port, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
70
|
+
wasm.channel_delete_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
71
|
+
}
|
|
72
|
+
disconnect() {
|
|
73
|
+
wasm.channel_disconnect(this.__wbg_ptr);
|
|
81
74
|
}
|
|
82
75
|
/**
|
|
83
76
|
* @returns {boolean}
|
|
@@ -318,6 +311,40 @@ class Channel {
|
|
|
318
311
|
stop_heartbeat() {
|
|
319
312
|
wasm.channel_stop_heartbeat(this.__wbg_ptr);
|
|
320
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* @param {string} node_id
|
|
316
|
+
* @param {string} id
|
|
317
|
+
* @param {string} kind
|
|
318
|
+
* @param {string | null | undefined} name
|
|
319
|
+
* @param {string} host
|
|
320
|
+
* @param {number} port
|
|
321
|
+
* @param {string | null} [username]
|
|
322
|
+
* @param {string | null} [password]
|
|
323
|
+
* @param {string | null} [visibility]
|
|
324
|
+
* @param {string | null} [scheme]
|
|
325
|
+
* @param {number | null} [msg_id]
|
|
326
|
+
*/
|
|
327
|
+
update_service(node_id, id, kind, name, host, port, username, password, visibility, scheme, msg_id) {
|
|
328
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
329
|
+
const len0 = WASM_VECTOR_LEN;
|
|
330
|
+
const ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
331
|
+
const len1 = WASM_VECTOR_LEN;
|
|
332
|
+
const ptr2 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
333
|
+
const len2 = WASM_VECTOR_LEN;
|
|
334
|
+
var ptr3 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
335
|
+
var len3 = WASM_VECTOR_LEN;
|
|
336
|
+
const ptr4 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
337
|
+
const len4 = WASM_VECTOR_LEN;
|
|
338
|
+
var ptr5 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
339
|
+
var len5 = WASM_VECTOR_LEN;
|
|
340
|
+
var ptr6 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
341
|
+
var len6 = WASM_VECTOR_LEN;
|
|
342
|
+
var ptr7 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
343
|
+
var len7 = WASM_VECTOR_LEN;
|
|
344
|
+
var ptr8 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
345
|
+
var len8 = WASM_VECTOR_LEN;
|
|
346
|
+
wasm.channel_update_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, port, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
347
|
+
}
|
|
321
348
|
}
|
|
322
349
|
if (Symbol.dispose) Channel.prototype[Symbol.dispose] = Channel.prototype.free;
|
|
323
350
|
|
|
@@ -393,11 +420,14 @@ function __wbg_get_imports() {
|
|
|
393
420
|
const ret = Array.from(getObject(arg0));
|
|
394
421
|
return addHeapObject(ret);
|
|
395
422
|
},
|
|
423
|
+
__wbg_getRandomValues_a697888e9ba1eee3: function() { return handleError(function (arg0, arg1) {
|
|
424
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
425
|
+
}, arguments); },
|
|
396
426
|
__wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
|
|
397
427
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
398
428
|
return addHeapObject(ret);
|
|
399
429
|
}, arguments); },
|
|
400
|
-
|
|
430
|
+
__wbg_info_ab46ef99b3cad323: function(arg0, arg1) {
|
|
401
431
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
402
432
|
},
|
|
403
433
|
__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
|
|
@@ -469,27 +499,27 @@ function __wbg_get_imports() {
|
|
|
469
499
|
__wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
|
|
470
500
|
getObject(arg0).onopen = getObject(arg1);
|
|
471
501
|
},
|
|
472
|
-
|
|
502
|
+
__wbg_warn_badc1c53b8d95dbd: function(arg0, arg1) {
|
|
473
503
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
474
504
|
},
|
|
475
505
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
476
506
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
477
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
507
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43);
|
|
478
508
|
return addHeapObject(ret);
|
|
479
509
|
},
|
|
480
510
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
481
511
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
482
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
512
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43_1);
|
|
483
513
|
return addHeapObject(ret);
|
|
484
514
|
},
|
|
485
515
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
486
516
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
487
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
517
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43_2);
|
|
488
518
|
return addHeapObject(ret);
|
|
489
519
|
},
|
|
490
520
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
491
521
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
492
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
522
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_45);
|
|
493
523
|
return addHeapObject(ret);
|
|
494
524
|
},
|
|
495
525
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -526,20 +556,20 @@ function __wbg_get_imports() {
|
|
|
526
556
|
};
|
|
527
557
|
}
|
|
528
558
|
|
|
529
|
-
function
|
|
530
|
-
wasm.
|
|
559
|
+
function __wasm_bindgen_func_elem_45(arg0, arg1) {
|
|
560
|
+
wasm.__wasm_bindgen_func_elem_45(arg0, arg1);
|
|
531
561
|
}
|
|
532
562
|
|
|
533
|
-
function
|
|
534
|
-
wasm.
|
|
563
|
+
function __wasm_bindgen_func_elem_43(arg0, arg1, arg2) {
|
|
564
|
+
wasm.__wasm_bindgen_func_elem_43(arg0, arg1, addHeapObject(arg2));
|
|
535
565
|
}
|
|
536
566
|
|
|
537
|
-
function
|
|
538
|
-
wasm.
|
|
567
|
+
function __wasm_bindgen_func_elem_43_1(arg0, arg1, arg2) {
|
|
568
|
+
wasm.__wasm_bindgen_func_elem_43_1(arg0, arg1, addHeapObject(arg2));
|
|
539
569
|
}
|
|
540
570
|
|
|
541
|
-
function
|
|
542
|
-
wasm.
|
|
571
|
+
function __wasm_bindgen_func_elem_43_2(arg0, arg1, arg2) {
|
|
572
|
+
wasm.__wasm_bindgen_func_elem_43_2(arg0, arg1, addHeapObject(arg2));
|
|
543
573
|
}
|
|
544
574
|
|
|
545
575
|
|
|
@@ -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),T=P,N=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,T,N,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_sftp_tunnel(n,t,e,r){const o=S(n,O.__wbindgen_export,O.__wbindgen_export2),c=P;var i=R(t)?0:S(t,O.__wbindgen_export,O.__wbindgen_export2),s=P,_=R(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_sftp_tunnel(this.__wbg_ptr,o,c,i,s,_,P,R(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=R(t)?0:S(t,O.__wbindgen_export,O.__wbindgen_export2),s=P,_=R(e)?0:S(e,O.__wbindgen_export,O.__wbindgen_export2);O.channel_open_ssh_tunnel(this.__wbg_ptr,o,c,i,s,_,P,R(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,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,T=R(s)?0:S(s,O.__wbindgen_export,O.__wbindgen_export2),N=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,T,N,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_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=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_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_getRandomValues_a697888e9ba1eee3:function(){return y((function(n,t){globalThis.crypto.getRandomValues(b(n,t))}),arguments)},__wbg_get_dddb90ff5d27a080:function(){return y((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_ab46ef99b3cad323: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_badc1c53b8d95dbd: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){T(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){O.__wasm_bindgen_func_elem_45(n,t)}function o(n,t,e){O.__wasm_bindgen_func_elem_43(n,t,u(e))}function c(n,t,e){O.__wasm_bindgen_func_elem_43_1(n,t,u(e))}function i(n,t,e){O.__wasm_bindgen_func_elem_43_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&&(N=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),N.decode(),j=t),N.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 T(n){const t=p(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let N=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});N.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.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}
|