phirepass-widgets 0.0.111 → 0.0.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +33 -0
  2. package/dist/cjs/{index-B8w6l0VL.js → index-CurErEK7.js} +101 -30
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/phirepass-downloader_3.cjs.entry.js +3696 -0
  5. package/dist/cjs/phirepass-rdp.cjs.entry.js +18 -6
  6. package/dist/cjs/phirepass-terminal.cjs.entry.js +6 -5
  7. package/dist/cjs/phirepass-widgets.cjs.js +3 -3
  8. package/dist/cjs/{protocol-CCD7cbHu.js → protocol-DCBMfc2u.js} +557 -360
  9. package/dist/collection/collection-manifest.json +3 -1
  10. package/dist/collection/common/channel.js +21 -1
  11. package/dist/collection/common/fetch.js +40 -0
  12. package/dist/collection/components/phirepass-downloader/form.js +69 -0
  13. package/dist/collection/components/phirepass-downloader/format.js +105 -0
  14. package/dist/collection/components/phirepass-downloader/jobs.js +370 -0
  15. package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +1109 -0
  16. package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +1455 -0
  17. package/dist/collection/components/phirepass-downloader/source.js +106 -0
  18. package/dist/collection/components/phirepass-downloader/views/dialogs.js +34 -0
  19. package/dist/collection/components/phirepass-downloader/views/fetch-form.js +65 -0
  20. package/dist/collection/components/phirepass-downloader/views/icons.js +33 -0
  21. package/dist/collection/components/phirepass-downloader/views/job-row.js +91 -0
  22. package/dist/collection/components/phirepass-downloader/views/notices.js +15 -0
  23. package/dist/collection/components/phirepass-downloader/views/states.js +19 -0
  24. package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +216 -0
  25. package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +473 -0
  26. package/dist/collection/components/phirepass-media-player/player.js +94 -0
  27. package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +36 -13
  28. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +122 -0
  29. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +35 -0
  30. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +181 -31
  31. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
  32. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  33. package/dist/collection/testing/fixtures.js +219 -0
  34. package/dist/collection/testing/mock-channel.js +410 -0
  35. package/dist/components/index.js +1 -1
  36. package/dist/components/p-C4cmk3bS.js +1 -0
  37. package/dist/components/p-CsYQJXY2.js +1 -0
  38. package/dist/components/p-D6Geq8Rn.js +1 -0
  39. package/dist/components/phirepass-downloader.d.ts +11 -0
  40. package/dist/components/phirepass-downloader.js +1 -0
  41. package/dist/components/phirepass-media-player.d.ts +11 -0
  42. package/dist/components/phirepass-media-player.js +1 -0
  43. package/dist/components/phirepass-rdp.js +1 -1
  44. package/dist/components/phirepass-sftp-client.js +1 -1
  45. package/dist/components/phirepass-terminal.js +2 -2
  46. package/dist/esm/{index-DGq2b7rM.js → index-B9qUl6FW.js} +101 -30
  47. package/dist/esm/loader.js +3 -3
  48. package/dist/esm/phirepass-downloader_3.entry.js +3692 -0
  49. package/dist/esm/phirepass-rdp.entry.js +18 -6
  50. package/dist/esm/phirepass-terminal.entry.js +6 -5
  51. package/dist/esm/phirepass-widgets.js +4 -4
  52. package/dist/esm/{protocol-D4JeTIHt.js → protocol-CsYQJXY2.js} +556 -359
  53. package/dist/phirepass-widgets/p-1b84c526.entry.js +1 -0
  54. package/dist/phirepass-widgets/{p-9eebbf05.entry.js → p-41dd1ac9.entry.js} +2 -2
  55. package/dist/phirepass-widgets/p-614ab3de.entry.js +1 -0
  56. package/dist/phirepass-widgets/p-B9qUl6FW.js +3 -0
  57. package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
  58. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  59. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  60. package/dist/types/common/channel.d.ts +30 -0
  61. package/dist/types/common/fetch.d.ts +161 -0
  62. package/dist/types/components/phirepass-downloader/form.d.ts +54 -0
  63. package/dist/types/components/phirepass-downloader/format.d.ts +17 -0
  64. package/dist/types/components/phirepass-downloader/jobs.d.ts +115 -0
  65. package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +231 -0
  66. package/dist/types/components/phirepass-downloader/source.d.ts +61 -0
  67. package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +52 -0
  68. package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +31 -0
  69. package/dist/types/components/phirepass-downloader/views/icons.d.ts +5 -0
  70. package/dist/types/components/phirepass-downloader/views/job-row.d.ts +21 -0
  71. package/dist/types/components/phirepass-downloader/views/notices.d.ts +18 -0
  72. package/dist/types/components/phirepass-downloader/views/states.d.ts +38 -0
  73. package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +67 -0
  74. package/dist/types/components/phirepass-media-player/player.d.ts +43 -0
  75. package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +10 -0
  76. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +30 -0
  77. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +40 -0
  78. package/dist/types/components.d.ts +426 -34
  79. package/dist/types/stencil-public-runtime.d.ts +1 -1
  80. package/dist/types/testing/fixtures.d.ts +25 -0
  81. package/dist/types/testing/mock-channel.d.ts +132 -0
  82. package/package.json +26 -12
  83. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +0 -1469
  84. package/dist/components/p-D4JeTIHt.js +0 -1
  85. package/dist/esm/phirepass-sftp-client.entry.js +0 -1467
  86. package/dist/phirepass-widgets/p-401631af.entry.js +0 -1
  87. package/dist/phirepass-widgets/p-5f27300b.entry.js +0 -1
  88. package/dist/phirepass-widgets/p-D4JeTIHt.js +0 -1
  89. package/dist/phirepass-widgets/p-DGq2b7rM.js +0 -3
@@ -20,11 +20,19 @@ class Channel {
20
20
  * @param {number | null} [msg_id]
21
21
  */
22
22
  authenticate(token, node_id, msg_id) {
23
- const ptr0 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
24
- const len0 = WASM_VECTOR_LEN;
25
- const ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
26
- const len1 = WASM_VECTOR_LEN;
27
- wasm.channel_authenticate(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
23
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
24
+ let ptr0, len0, ptr1, len1;
25
+ try {
26
+ ptr0 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
27
+ len0 = WASM_VECTOR_LEN;
28
+ ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
29
+ len1 = WASM_VECTOR_LEN;
30
+ } catch (e) {
31
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
32
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
33
+ throw e;
34
+ }
35
+ wasm.channel_authenticate(this.__wbg_ptr, ptr0, len0, ptr1, len1, val3);
28
36
  }
29
37
  connect() {
30
38
  wasm.channel_connect(this.__wbg_ptr);
@@ -41,21 +49,35 @@ class Channel {
41
49
  * @param {number | null} [msg_id]
42
50
  */
43
51
  create_service(node_id, kind, name, host, port, username, password, scheme, msg_id) {
44
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
45
- const len0 = WASM_VECTOR_LEN;
46
- const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
47
- const len1 = WASM_VECTOR_LEN;
48
- var ptr2 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
49
- var len2 = WASM_VECTOR_LEN;
50
- const ptr3 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
51
- const len3 = WASM_VECTOR_LEN;
52
- var ptr4 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
53
- var len4 = WASM_VECTOR_LEN;
54
- var ptr5 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
55
- var len5 = WASM_VECTOR_LEN;
56
- var ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
57
- var len6 = 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, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
52
+ const val8 = +port;
53
+ const val9 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
54
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6;
55
+ try {
56
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
57
+ len0 = WASM_VECTOR_LEN;
58
+ ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
59
+ len1 = WASM_VECTOR_LEN;
60
+ ptr2 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
61
+ len2 = WASM_VECTOR_LEN;
62
+ ptr3 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
63
+ len3 = WASM_VECTOR_LEN;
64
+ ptr4 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
65
+ len4 = WASM_VECTOR_LEN;
66
+ ptr5 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
67
+ len5 = WASM_VECTOR_LEN;
68
+ ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
69
+ len6 = WASM_VECTOR_LEN;
70
+ } catch (e) {
71
+ if (ptr6) { wasm.__wbindgen_export3(ptr6, len6 * 1, 1); }
72
+ if (ptr5) { wasm.__wbindgen_export3(ptr5, len5 * 1, 1); }
73
+ if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
74
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
75
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
76
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
77
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
78
+ throw e;
79
+ }
80
+ wasm.channel_create_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val8, ptr4, len4, ptr5, len5, ptr6, len6, val9);
59
81
  }
60
82
  /**
61
83
  * @param {string} node_id
@@ -63,11 +85,19 @@ class Channel {
63
85
  * @param {number | null} [msg_id]
64
86
  */
65
87
  delete_service(node_id, id, msg_id) {
66
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
67
- const len0 = WASM_VECTOR_LEN;
68
- const ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
69
- const len1 = WASM_VECTOR_LEN;
70
- wasm.channel_delete_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
88
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
89
+ let ptr0, len0, ptr1, len1;
90
+ try {
91
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
92
+ len0 = WASM_VECTOR_LEN;
93
+ ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
94
+ len1 = WASM_VECTOR_LEN;
95
+ } catch (e) {
96
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
97
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
98
+ throw e;
99
+ }
100
+ wasm.channel_delete_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, val3);
71
101
  }
72
102
  disconnect() {
73
103
  wasm.channel_disconnect(this.__wbg_ptr);
@@ -92,12 +122,20 @@ class Channel {
92
122
  * @param {string | null} [server_id]
93
123
  */
94
124
  constructor(endpoint, node_id, server_id) {
95
- const ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_export, wasm.__wbindgen_export2);
96
- const len0 = WASM_VECTOR_LEN;
97
- const ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
98
- const len1 = WASM_VECTOR_LEN;
99
- var ptr2 = isLikeNone(server_id) ? 0 : passStringToWasm0(server_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
100
- var len2 = WASM_VECTOR_LEN;
125
+ let ptr0, len0, ptr1, len1, ptr2, len2;
126
+ try {
127
+ ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_export, wasm.__wbindgen_export2);
128
+ len0 = WASM_VECTOR_LEN;
129
+ ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
130
+ len1 = WASM_VECTOR_LEN;
131
+ ptr2 = isLikeNone(server_id) ? 0 : passStringToWasm0(server_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
132
+ len2 = WASM_VECTOR_LEN;
133
+ } catch (e) {
134
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
135
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
136
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
137
+ throw e;
138
+ }
101
139
  const ret = wasm.channel_new(ptr0, len0, ptr1, len1, ptr2, len2);
102
140
  this.__wbg_ptr = ret;
103
141
  ChannelFinalization.register(this, this.__wbg_ptr, this);
@@ -107,31 +145,31 @@ class Channel {
107
145
  * @param {Function | null} [cb]
108
146
  */
109
147
  on_connection_close(cb) {
110
- wasm.channel_on_connection_close(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
148
+ wasm.channel_on_connection_close(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
111
149
  }
112
150
  /**
113
151
  * @param {Function | null} [cb]
114
152
  */
115
153
  on_connection_error(cb) {
116
- wasm.channel_on_connection_error(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
154
+ wasm.channel_on_connection_error(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
117
155
  }
118
156
  /**
119
157
  * @param {Function | null} [cb]
120
158
  */
121
159
  on_connection_message(cb) {
122
- wasm.channel_on_connection_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
160
+ wasm.channel_on_connection_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
123
161
  }
124
162
  /**
125
163
  * @param {Function | null} [cb]
126
164
  */
127
165
  on_connection_open(cb) {
128
- wasm.channel_on_connection_open(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
166
+ wasm.channel_on_connection_open(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
129
167
  }
130
168
  /**
131
169
  * @param {Function | null} [cb]
132
170
  */
133
171
  on_protocol_message(cb) {
134
- wasm.channel_on_protocol_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
172
+ wasm.channel_on_protocol_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
135
173
  }
136
174
  /**
137
175
  * @param {string} frame_type
@@ -140,7 +178,7 @@ class Channel {
140
178
  on_protocol_message_type(frame_type, cb) {
141
179
  const ptr0 = passStringToWasm0(frame_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
142
180
  const len0 = WASM_VECTOR_LEN;
143
- wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 : addHeapObject(cb));
181
+ wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
144
182
  }
145
183
  /**
146
184
  * Requests an RDP tunnel. Credentials are validated by the agent but are
@@ -159,15 +197,25 @@ class Channel {
159
197
  * @param {number | null} [msg_id]
160
198
  */
161
199
  open_rdp_tunnel(node_id, service_id, username, password, msg_id) {
162
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
163
- const len0 = WASM_VECTOR_LEN;
164
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
165
- const len1 = WASM_VECTOR_LEN;
166
- var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
167
- var len2 = WASM_VECTOR_LEN;
168
- var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
169
- var len3 = WASM_VECTOR_LEN;
170
- wasm.channel_open_rdp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
200
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
201
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
202
+ try {
203
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
204
+ len0 = WASM_VECTOR_LEN;
205
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
206
+ len1 = WASM_VECTOR_LEN;
207
+ ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
208
+ len2 = WASM_VECTOR_LEN;
209
+ ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
210
+ len3 = WASM_VECTOR_LEN;
211
+ } catch (e) {
212
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
213
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
214
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
215
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
216
+ throw e;
217
+ }
218
+ wasm.channel_open_rdp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
171
219
  }
172
220
  /**
173
221
  * @param {string} node_id
@@ -177,15 +225,25 @@ class Channel {
177
225
  * @param {number | null} [msg_id]
178
226
  */
179
227
  open_sftp_tunnel(node_id, service_id, username, password, msg_id) {
180
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
181
- const len0 = WASM_VECTOR_LEN;
182
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
183
- const len1 = WASM_VECTOR_LEN;
184
- var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
185
- var len2 = WASM_VECTOR_LEN;
186
- var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
187
- var len3 = WASM_VECTOR_LEN;
188
- wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
228
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
229
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
230
+ try {
231
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
232
+ len0 = WASM_VECTOR_LEN;
233
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
234
+ len1 = WASM_VECTOR_LEN;
235
+ ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
236
+ len2 = WASM_VECTOR_LEN;
237
+ ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
238
+ len3 = WASM_VECTOR_LEN;
239
+ } catch (e) {
240
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
241
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
242
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
243
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
244
+ throw e;
245
+ }
246
+ wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
189
247
  }
190
248
  /**
191
249
  * @param {string} node_id
@@ -195,15 +253,25 @@ class Channel {
195
253
  * @param {number | null} [msg_id]
196
254
  */
197
255
  open_ssh_tunnel(node_id, service_id, username, password, msg_id) {
198
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
199
- const len0 = WASM_VECTOR_LEN;
200
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
201
- const len1 = WASM_VECTOR_LEN;
202
- var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
203
- var len2 = WASM_VECTOR_LEN;
204
- var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
205
- var len3 = WASM_VECTOR_LEN;
206
- wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
256
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
257
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
258
+ try {
259
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
260
+ len0 = WASM_VECTOR_LEN;
261
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
262
+ len1 = WASM_VECTOR_LEN;
263
+ ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
264
+ len2 = WASM_VECTOR_LEN;
265
+ ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
266
+ len3 = WASM_VECTOR_LEN;
267
+ } catch (e) {
268
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
269
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
270
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
271
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
272
+ throw e;
273
+ }
274
+ wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
207
275
  }
208
276
  /**
209
277
  * Set permission bits. The agent masks these to `0o7777`.
@@ -214,11 +282,21 @@ class Channel {
214
282
  * @param {number | null} [msg_id]
215
283
  */
216
284
  send_sftp_chmod(node_id, sid, path, permissions, msg_id) {
217
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
218
- const len0 = WASM_VECTOR_LEN;
219
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
220
- const len1 = WASM_VECTOR_LEN;
221
- wasm.channel_send_sftp_chmod(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, permissions, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
285
+ const val3 = +sid;
286
+ const val4 = +permissions;
287
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
288
+ let ptr0, len0, ptr1, len1;
289
+ try {
290
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
291
+ len0 = WASM_VECTOR_LEN;
292
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
293
+ len1 = WASM_VECTOR_LEN;
294
+ } catch (e) {
295
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
296
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
297
+ throw e;
298
+ }
299
+ wasm.channel_send_sftp_chmod(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4, val5);
222
300
  }
223
301
  /**
224
302
  * @param {string} node_id
@@ -228,13 +306,23 @@ class Channel {
228
306
  * @param {number | null} [msg_id]
229
307
  */
230
308
  send_sftp_delete(node_id, sid, path, filename, msg_id) {
231
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
232
- const len0 = WASM_VECTOR_LEN;
233
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
234
- const len1 = WASM_VECTOR_LEN;
235
- const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
236
- const len2 = WASM_VECTOR_LEN;
237
- wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
309
+ const val4 = +sid;
310
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
311
+ let ptr0, len0, ptr1, len1, ptr2, len2;
312
+ try {
313
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
314
+ len0 = WASM_VECTOR_LEN;
315
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
316
+ len1 = WASM_VECTOR_LEN;
317
+ ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
318
+ len2 = WASM_VECTOR_LEN;
319
+ } catch (e) {
320
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
321
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
322
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
323
+ throw e;
324
+ }
325
+ wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
238
326
  }
239
327
  /**
240
328
  * Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
@@ -246,9 +334,12 @@ class Channel {
246
334
  * @param {number} ack_up_to
247
335
  */
248
336
  send_sftp_download_ack(node_id, sid, download_id, ack_up_to) {
337
+ const val2 = +sid;
338
+ const val3 = +download_id;
339
+ const val4 = +ack_up_to;
249
340
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
250
341
  const len0 = WASM_VECTOR_LEN;
251
- wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0, sid, download_id, ack_up_to);
342
+ wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0, val2, val3, val4);
252
343
  }
253
344
  /**
254
345
  * @param {string} node_id
@@ -258,9 +349,13 @@ class Channel {
258
349
  * @param {number | null} [msg_id]
259
350
  */
260
351
  send_sftp_download_chunk(node_id, sid, download_id, chunk_index, msg_id) {
352
+ const val2 = +sid;
353
+ const val3 = +download_id;
354
+ const val4 = +chunk_index;
355
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
261
356
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
262
357
  const len0 = WASM_VECTOR_LEN;
263
- wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0, sid, download_id, chunk_index, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
358
+ wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0, val2, val3, val4, val5);
264
359
  }
265
360
  /**
266
361
  * @param {string} node_id
@@ -270,13 +365,23 @@ class Channel {
270
365
  * @param {number | null} [msg_id]
271
366
  */
272
367
  send_sftp_download_start(node_id, sid, path, filename, msg_id) {
273
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
274
- const len0 = WASM_VECTOR_LEN;
275
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
276
- const len1 = WASM_VECTOR_LEN;
277
- const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
278
- const len2 = WASM_VECTOR_LEN;
279
- wasm.channel_send_sftp_download_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
368
+ const val4 = +sid;
369
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
370
+ let ptr0, len0, ptr1, len1, ptr2, len2;
371
+ try {
372
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
373
+ len0 = WASM_VECTOR_LEN;
374
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
375
+ len1 = WASM_VECTOR_LEN;
376
+ ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
377
+ len2 = WASM_VECTOR_LEN;
378
+ } catch (e) {
379
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
380
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
381
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
382
+ throw e;
383
+ }
384
+ wasm.channel_send_sftp_download_start(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
280
385
  }
281
386
  /**
282
387
  * @param {string} node_id
@@ -285,11 +390,20 @@ class Channel {
285
390
  * @param {number | null} [msg_id]
286
391
  */
287
392
  send_sftp_list_data(node_id, sid, path, msg_id) {
288
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
289
- const len0 = WASM_VECTOR_LEN;
290
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
291
- const len1 = WASM_VECTOR_LEN;
292
- wasm.channel_send_sftp_list_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
393
+ const val3 = +sid;
394
+ const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
395
+ let ptr0, len0, ptr1, len1;
396
+ try {
397
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
398
+ len0 = WASM_VECTOR_LEN;
399
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
400
+ len1 = WASM_VECTOR_LEN;
401
+ } catch (e) {
402
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
403
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
404
+ throw e;
405
+ }
406
+ wasm.channel_send_sftp_list_data(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
293
407
  }
294
408
  /**
295
409
  * Create one directory. Parents must exist already, as with `mkdir`.
@@ -299,11 +413,20 @@ class Channel {
299
413
  * @param {number | null} [msg_id]
300
414
  */
301
415
  send_sftp_mkdir(node_id, sid, path, msg_id) {
302
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
303
- const len0 = WASM_VECTOR_LEN;
304
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
305
- const len1 = WASM_VECTOR_LEN;
306
- wasm.channel_send_sftp_mkdir(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
416
+ const val3 = +sid;
417
+ const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
418
+ let ptr0, len0, ptr1, len1;
419
+ try {
420
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
421
+ len0 = WASM_VECTOR_LEN;
422
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
423
+ len1 = WASM_VECTOR_LEN;
424
+ } catch (e) {
425
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
426
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
427
+ throw e;
428
+ }
429
+ wasm.channel_send_sftp_mkdir(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
307
430
  }
308
431
  /**
309
432
  * Read a whole file for the in-page editor. Answered with an
@@ -315,11 +438,20 @@ class Channel {
315
438
  * @param {number | null} [msg_id]
316
439
  */
317
440
  send_sftp_read_file(node_id, sid, path, msg_id) {
318
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
319
- const len0 = WASM_VECTOR_LEN;
320
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
321
- const len1 = WASM_VECTOR_LEN;
322
- wasm.channel_send_sftp_read_file(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
441
+ const val3 = +sid;
442
+ const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
443
+ let ptr0, len0, ptr1, len1;
444
+ try {
445
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
446
+ len0 = WASM_VECTOR_LEN;
447
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
448
+ len1 = WASM_VECTOR_LEN;
449
+ } catch (e) {
450
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
451
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
452
+ throw e;
453
+ }
454
+ wasm.channel_send_sftp_read_file(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
323
455
  }
324
456
  /**
325
457
  * Remove a file, a symlink, or a directory. Without `recursive` the remote
@@ -331,11 +463,21 @@ class Channel {
331
463
  * @param {number | null} [msg_id]
332
464
  */
333
465
  send_sftp_remove(node_id, sid, path, recursive, msg_id) {
334
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
335
- const len0 = WASM_VECTOR_LEN;
336
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
337
- const len1 = WASM_VECTOR_LEN;
338
- wasm.channel_send_sftp_remove(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, recursive, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
466
+ const val3 = +sid;
467
+ const val4 = +recursive;
468
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
469
+ let ptr0, len0, ptr1, len1;
470
+ try {
471
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
472
+ len0 = WASM_VECTOR_LEN;
473
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
474
+ len1 = WASM_VECTOR_LEN;
475
+ } catch (e) {
476
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
477
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
478
+ throw e;
479
+ }
480
+ wasm.channel_send_sftp_remove(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4, val5);
339
481
  }
340
482
  /**
341
483
  * Rename or move. `to` is a full path, so one call covers both.
@@ -346,13 +488,23 @@ class Channel {
346
488
  * @param {number | null} [msg_id]
347
489
  */
348
490
  send_sftp_rename(node_id, sid, from, to, msg_id) {
349
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
350
- const len0 = WASM_VECTOR_LEN;
351
- const ptr1 = passStringToWasm0(from, wasm.__wbindgen_export, wasm.__wbindgen_export2);
352
- const len1 = WASM_VECTOR_LEN;
353
- const ptr2 = passStringToWasm0(to, wasm.__wbindgen_export, wasm.__wbindgen_export2);
354
- const len2 = WASM_VECTOR_LEN;
355
- wasm.channel_send_sftp_rename(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
491
+ const val4 = +sid;
492
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
493
+ let ptr0, len0, ptr1, len1, ptr2, len2;
494
+ try {
495
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
496
+ len0 = WASM_VECTOR_LEN;
497
+ ptr1 = passStringToWasm0(from, wasm.__wbindgen_export, wasm.__wbindgen_export2);
498
+ len1 = WASM_VECTOR_LEN;
499
+ ptr2 = passStringToWasm0(to, wasm.__wbindgen_export, wasm.__wbindgen_export2);
500
+ len2 = WASM_VECTOR_LEN;
501
+ } catch (e) {
502
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
503
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
504
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
505
+ throw e;
506
+ }
507
+ wasm.channel_send_sftp_rename(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
356
508
  }
357
509
  /**
358
510
  * @param {string} node_id
@@ -360,15 +512,27 @@ class Channel {
360
512
  * @param {number} upload_id
361
513
  * @param {number} chunk_index
362
514
  * @param {number} chunk_size
363
- * @param {Uint8Array} data
515
+ * @param {Uint8Array | number[]} data
364
516
  * @param {number | null} [msg_id]
365
517
  */
366
518
  send_sftp_upload_chunk(node_id, sid, upload_id, chunk_index, chunk_size, data, msg_id) {
367
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
368
- const len0 = WASM_VECTOR_LEN;
369
- const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
370
- const len1 = WASM_VECTOR_LEN;
371
- wasm.channel_send_sftp_upload_chunk(this.__wbg_ptr, ptr0, len0, sid, upload_id, chunk_index, chunk_size, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
519
+ const val3 = +sid;
520
+ const val4 = +upload_id;
521
+ const val5 = +chunk_index;
522
+ const val6 = +chunk_size;
523
+ const val7 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
524
+ let ptr0, len0, ptr1, len1;
525
+ try {
526
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
527
+ len0 = WASM_VECTOR_LEN;
528
+ ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
529
+ len1 = WASM_VECTOR_LEN;
530
+ } catch (e) {
531
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
532
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
533
+ throw e;
534
+ }
535
+ wasm.channel_send_sftp_upload_chunk(this.__wbg_ptr, ptr0, len0, val3, val4, val5, val6, ptr1, len1, val7);
372
536
  }
373
537
  /**
374
538
  * @param {string} node_id
@@ -380,30 +544,52 @@ class Channel {
380
544
  * @param {number | null} [msg_id]
381
545
  */
382
546
  send_sftp_upload_start(node_id, sid, filename, remote_path, total_chunks, total_size, msg_id) {
383
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
384
- const len0 = WASM_VECTOR_LEN;
385
- const ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
386
- const len1 = WASM_VECTOR_LEN;
387
- const ptr2 = passStringToWasm0(remote_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
388
- const len2 = WASM_VECTOR_LEN;
389
- wasm.channel_send_sftp_upload_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, total_chunks, total_size, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
547
+ const val4 = +sid;
548
+ const val5 = +total_chunks;
549
+ const val6 = BigInt.asIntN(64, total_size);
550
+ const val7 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
551
+ let ptr0, len0, ptr1, len1, ptr2, len2;
552
+ try {
553
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
554
+ len0 = WASM_VECTOR_LEN;
555
+ ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
556
+ len1 = WASM_VECTOR_LEN;
557
+ ptr2 = passStringToWasm0(remote_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
558
+ len2 = WASM_VECTOR_LEN;
559
+ } catch (e) {
560
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
561
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
562
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
563
+ throw e;
564
+ }
565
+ wasm.channel_send_sftp_upload_start(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5, val6, val7);
390
566
  }
391
567
  /**
392
568
  * Write a whole file back, truncating whatever was there.
393
569
  * @param {string} node_id
394
570
  * @param {number} sid
395
571
  * @param {string} path
396
- * @param {Uint8Array} contents
572
+ * @param {Uint8Array | number[]} contents
397
573
  * @param {number | null} [msg_id]
398
574
  */
399
575
  send_sftp_write_file(node_id, sid, path, contents, msg_id) {
400
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
401
- const len0 = WASM_VECTOR_LEN;
402
- const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
403
- const len1 = WASM_VECTOR_LEN;
404
- const ptr2 = passArray8ToWasm0(contents, wasm.__wbindgen_export);
405
- const len2 = WASM_VECTOR_LEN;
406
- wasm.channel_send_sftp_write_file(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
576
+ const val4 = +sid;
577
+ const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
578
+ let ptr0, len0, ptr1, len1, ptr2, len2;
579
+ try {
580
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
581
+ len0 = WASM_VECTOR_LEN;
582
+ ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
583
+ len1 = WASM_VECTOR_LEN;
584
+ ptr2 = passArray8ToWasm0(contents, wasm.__wbindgen_export);
585
+ len2 = WASM_VECTOR_LEN;
586
+ } catch (e) {
587
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
588
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
589
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
590
+ throw e;
591
+ }
592
+ wasm.channel_send_sftp_write_file(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
407
593
  }
408
594
  /**
409
595
  * @param {string} node_id
@@ -414,9 +600,14 @@ class Channel {
414
600
  * @param {number} px_height
415
601
  */
416
602
  send_ssh_terminal_resize(node_id, sid, cols, rows, px_width, px_height) {
603
+ const val2 = +sid;
604
+ const val3 = +cols;
605
+ const val4 = +rows;
606
+ const val5 = +px_width;
607
+ const val6 = +px_height;
417
608
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
418
609
  const len0 = WASM_VECTOR_LEN;
419
- wasm.channel_send_ssh_terminal_resize(this.__wbg_ptr, ptr0, len0, sid, cols, rows, px_width, px_height);
610
+ wasm.channel_send_ssh_terminal_resize(this.__wbg_ptr, ptr0, len0, val2, val3, val4, val5, val6);
420
611
  }
421
612
  /**
422
613
  * @param {string} node_id
@@ -424,11 +615,19 @@ class Channel {
424
615
  * @param {string} data
425
616
  */
426
617
  send_ssh_tunnel_data(node_id, sid, data) {
427
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
428
- const len0 = WASM_VECTOR_LEN;
429
- const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
430
- const len1 = WASM_VECTOR_LEN;
431
- wasm.channel_send_ssh_tunnel_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1);
618
+ const val3 = +sid;
619
+ let ptr0, len0, ptr1, len1;
620
+ try {
621
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
622
+ len0 = WASM_VECTOR_LEN;
623
+ ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
624
+ len1 = WASM_VECTOR_LEN;
625
+ } catch (e) {
626
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
627
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
628
+ throw e;
629
+ }
630
+ wasm.channel_send_ssh_tunnel_data(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1);
432
631
  }
433
632
  /**
434
633
  * @param {number} interval_as_millis
@@ -452,23 +651,38 @@ class Channel {
452
651
  * @param {number | null} [msg_id]
453
652
  */
454
653
  update_service(node_id, service_id, kind, name, host, port, username, password, scheme, msg_id) {
455
- const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
456
- const len0 = WASM_VECTOR_LEN;
457
- const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
458
- const len1 = WASM_VECTOR_LEN;
459
- const ptr2 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
460
- const len2 = WASM_VECTOR_LEN;
461
- var ptr3 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
462
- var len3 = WASM_VECTOR_LEN;
463
- const ptr4 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
464
- const len4 = WASM_VECTOR_LEN;
465
- var ptr5 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
466
- var len5 = WASM_VECTOR_LEN;
467
- var ptr6 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
468
- var len6 = WASM_VECTOR_LEN;
469
- var ptr7 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
470
- var len7 = WASM_VECTOR_LEN;
471
- wasm.channel_update_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, port, ptr5, len5, ptr6, len6, ptr7, len7, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
654
+ const val9 = +port;
655
+ const val10 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
656
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7;
657
+ try {
658
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
659
+ len0 = WASM_VECTOR_LEN;
660
+ ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
661
+ len1 = WASM_VECTOR_LEN;
662
+ ptr2 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
663
+ len2 = WASM_VECTOR_LEN;
664
+ ptr3 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
665
+ len3 = WASM_VECTOR_LEN;
666
+ ptr4 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
667
+ len4 = WASM_VECTOR_LEN;
668
+ ptr5 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
669
+ len5 = WASM_VECTOR_LEN;
670
+ ptr6 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
671
+ len6 = WASM_VECTOR_LEN;
672
+ ptr7 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
673
+ len7 = WASM_VECTOR_LEN;
674
+ } catch (e) {
675
+ if (ptr7) { wasm.__wbindgen_export3(ptr7, len7 * 1, 1); }
676
+ if (ptr6) { wasm.__wbindgen_export3(ptr6, len6 * 1, 1); }
677
+ if (ptr5) { wasm.__wbindgen_export3(ptr5, len5 * 1, 1); }
678
+ if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
679
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
680
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
681
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
682
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
683
+ throw e;
684
+ }
685
+ wasm.channel_update_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, val9, ptr5, len5, ptr6, len6, ptr7, len7, val10);
472
686
  }
473
687
  }
474
688
  if (Symbol.dispose) Channel.prototype[Symbol.dispose] = Channel.prototype.free;
@@ -486,193 +700,194 @@ const ErrorType = Object.freeze({
486
700
  function __wbg_get_imports() {
487
701
  const import0 = {
488
702
  __proto__: null,
489
- __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
703
+ __wbg_Error_208446807d0d1e30: function(arg0, arg1) {
490
704
  const ret = Error(getStringFromWasm0(arg0, arg1));
491
- return addHeapObject(ret);
705
+ return ret;
492
706
  },
493
707
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
494
- const ret = String(getObject(arg1));
708
+ const ret = String(arg1);
495
709
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
496
710
  const len1 = WASM_VECTOR_LEN;
497
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
498
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
711
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
712
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
499
713
  },
500
- __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
501
- const ret = debugString(getObject(arg1));
714
+ __wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
715
+ const ret = debugString(arg1);
502
716
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
503
717
  const len1 = WASM_VECTOR_LEN;
504
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
505
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
718
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
719
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
506
720
  },
507
- __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
508
- const obj = getObject(arg1);
721
+ __wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
722
+ const obj = arg1;
509
723
  const ret = typeof(obj) === 'string' ? obj : undefined;
510
724
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
511
725
  var len1 = WASM_VECTOR_LEN;
512
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
513
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
726
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
727
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
514
728
  },
515
- __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
729
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
516
730
  throw new Error(getStringFromWasm0(arg0, arg1));
517
731
  },
518
- __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
519
- getObject(arg0)._wbg_cb_unref();
732
+ __wbg__wbg_cb_unref_09736879a3f67559: function(arg0) {
733
+ arg0._wbg_cb_unref();
520
734
  },
521
- __wbg_call_1875a20c43a36133: function() { return handleError(function (arg0, arg1, arg2, arg3) {
522
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
523
- return addHeapObject(ret);
735
+ __wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
736
+ const ret = arg0.call(arg1);
737
+ return ret;
524
738
  }, arguments); },
525
- __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
526
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
527
- return addHeapObject(ret);
739
+ __wbg_call_a410eb4b59ed5965: function() { return handleError(function (arg0, arg1, arg2) {
740
+ const ret = arg0.call(arg1, arg2);
741
+ return ret;
528
742
  }, arguments); },
529
- __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
530
- const ret = getObject(arg0).call(getObject(arg1));
531
- return addHeapObject(ret);
743
+ __wbg_call_fc92fee6137d452d: function() { return handleError(function (arg0, arg1, arg2, arg3) {
744
+ const ret = arg0.call(arg1, arg2, arg3);
745
+ return ret;
532
746
  }, arguments); },
533
747
  __wbg_clearInterval_26ba580547547579: function(arg0) {
534
- const ret = clearInterval(takeObject(arg0));
535
- return addHeapObject(ret);
748
+ const ret = clearInterval(arg0);
749
+ return ret;
536
750
  },
537
- __wbg_close_d3ed56b5763be5ae: function() { return handleError(function (arg0) {
538
- getObject(arg0).close();
751
+ __wbg_close_5ee9c5fe4e8754a4: function() { return handleError(function (arg0) {
752
+ arg0.close();
539
753
  }, arguments); },
540
- __wbg_data_522f7abc70721269: function(arg0) {
541
- const ret = getObject(arg0).data;
542
- return addHeapObject(ret);
754
+ __wbg_data_c7e5e8500f1bca2f: function(arg0) {
755
+ const ret = arg0.data;
756
+ return ret;
543
757
  },
544
- __wbg_from_296ca31f8d0f1c52: function(arg0) {
545
- const ret = Array.from(getObject(arg0));
546
- return addHeapObject(ret);
758
+ __wbg_from_eac91875c8a5ffa4: function(arg0) {
759
+ const ret = Array.from(arg0);
760
+ return ret;
547
761
  },
548
- __wbg_getRandomValues_a608c4436c19407a: function() { return handleError(function (arg0, arg1) {
762
+ __wbg_getRandomValues_5d8c030b527203a6: function() { return handleError(function (arg0, arg1) {
549
763
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
550
764
  }, arguments); },
551
- __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
552
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
553
- return addHeapObject(ret);
765
+ __wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
766
+ const ret = Reflect.get(arg0, arg1);
767
+ return ret;
554
768
  }, arguments); },
555
- __wbg_info_c2e816d395f9b883: function(arg0, arg1) {
769
+ __wbg_info_2b8ee6588e4c6072: function(arg0, arg1) {
556
770
  console.info(getStringFromWasm0(arg0, arg1));
557
771
  },
558
- __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
772
+ __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
559
773
  let result;
560
774
  try {
561
- result = getObject(arg0) instanceof ArrayBuffer;
775
+ result = arg0 instanceof ArrayBuffer;
562
776
  } catch (_) {
563
777
  result = false;
564
778
  }
565
779
  const ret = result;
566
780
  return ret;
567
781
  },
568
- __wbg_length_7f3c00c40364105e: function(arg0) {
569
- const ret = getObject(arg0).length;
782
+ __wbg_length_186163212ffe79c3: function(arg0) {
783
+ const ret = arg0.length;
570
784
  return ret;
571
785
  },
572
- __wbg_new_1dbf7428bba60a42: function(arg0) {
573
- const ret = new Uint8Array(getObject(arg0));
574
- return addHeapObject(ret);
575
- },
576
- __wbg_new_617a8cdb8bb1130e: function() {
577
- const ret = new Object();
578
- return addHeapObject(ret);
786
+ __wbg_new_13de428334042d26: function(arg0) {
787
+ const ret = new Uint8Array(arg0);
788
+ return ret;
579
789
  },
580
- __wbg_new_ee2291f50781bf1d: function() {
790
+ __wbg_new_37eb45aaf5eeb820: function() {
581
791
  const ret = new Array();
582
- return addHeapObject(ret);
792
+ return ret;
583
793
  },
584
- __wbg_new_with_str_sequence_f79e461d58fdeacc: function() { return handleError(function (arg0, arg1, arg2) {
585
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
586
- return addHeapObject(ret);
794
+ __wbg_new_cd4348290afae586: function() {
795
+ const ret = new Object();
796
+ return ret;
797
+ },
798
+ __wbg_new_with_str_sequence_75b26d88172889d0: function() { return handleError(function (arg0, arg1, arg2) {
799
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
800
+ return ret;
587
801
  }, arguments); },
588
- __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
589
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
802
+ __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
803
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
590
804
  },
591
- __wbg_push_2baf45db356cf468: function(arg0, arg1) {
592
- const ret = getObject(arg0).push(getObject(arg1));
805
+ __wbg_push_c9f4893fc209f768: function(arg0, arg1) {
806
+ const ret = arg0.push(arg1);
593
807
  return ret;
594
808
  },
595
- __wbg_readyState_d8514376867e415b: function(arg0) {
596
- const ret = getObject(arg0).readyState;
809
+ __wbg_readyState_039bc047141a5f6d: function(arg0) {
810
+ const ret = arg0.readyState;
597
811
  return ret;
598
812
  },
599
- __wbg_send_c1dad0ec2e52defb: function() { return handleError(function (arg0, arg1, arg2) {
600
- getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
813
+ __wbg_send_d83d0891cf698779: function() { return handleError(function (arg0, arg1, arg2) {
814
+ arg0.send(getArrayU8FromWasm0(arg1, arg2));
601
815
  }, arguments); },
602
- __wbg_setInterval_cbf1c35c6a692d37: function() { return handleError(function (arg0, arg1) {
603
- const ret = setInterval(getObject(arg0), arg1);
604
- return addHeapObject(ret);
816
+ __wbg_setInterval_d933acbf2578adfa: function() { return handleError(function (arg0, arg1) {
817
+ const ret = setInterval(arg0, arg1);
818
+ return ret;
605
819
  }, arguments); },
606
- __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
607
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
820
+ __wbg_set_binaryType_d5b4dafd0f127fb2: function(arg0, arg1) {
821
+ arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
608
822
  },
609
- __wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
610
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
823
+ __wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
824
+ arg0[arg1 >>> 0] = arg2;
611
825
  },
612
- __wbg_set_binaryType_21835bf0df8f70aa: function(arg0, arg1) {
613
- getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
826
+ __wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
827
+ arg0[arg1] = arg2;
614
828
  },
615
- __wbg_set_onclose_a84370531f3d2948: function(arg0, arg1) {
616
- getObject(arg0).onclose = getObject(arg1);
829
+ __wbg_set_onclose_078935cf8d0fb024: function(arg0, arg1) {
830
+ arg0.onclose = arg1;
617
831
  },
618
- __wbg_set_onerror_94ee307653399172: function(arg0, arg1) {
619
- getObject(arg0).onerror = getObject(arg1);
832
+ __wbg_set_onerror_f7f089f7f059501c: function(arg0, arg1) {
833
+ arg0.onerror = arg1;
620
834
  },
621
- __wbg_set_onmessage_cb6f77d2d8e0402a: function(arg0, arg1) {
622
- getObject(arg0).onmessage = getObject(arg1);
835
+ __wbg_set_onmessage_26abc49cfa5f9ffc: function(arg0, arg1) {
836
+ arg0.onmessage = arg1;
623
837
  },
624
- __wbg_set_onopen_c914147e8a2db4b0: function(arg0, arg1) {
625
- getObject(arg0).onopen = getObject(arg1);
838
+ __wbg_set_onopen_757be120cc7b1ea6: function(arg0, arg1) {
839
+ arg0.onopen = arg1;
626
840
  },
627
- __wbg_warn_ce1d5c8a41cfe303: function(arg0, arg1) {
841
+ __wbg_warn_b0df9a9e7105e74b: function(arg0, arg1) {
628
842
  console.warn(getStringFromWasm0(arg0, arg1));
629
843
  },
630
844
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
631
845
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
632
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_60);
633
- return addHeapObject(ret);
846
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63);
847
+ return ret;
634
848
  },
635
849
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
636
850
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
637
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_60_37);
638
- return addHeapObject(ret);
851
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_37);
852
+ return ret;
639
853
  },
640
854
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
641
855
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
642
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_60_38);
643
- return addHeapObject(ret);
856
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_38);
857
+ return ret;
644
858
  },
645
859
  __wbindgen_generic_0000000000000004: function(arg0, arg1) {
646
860
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
647
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_64);
648
- return addHeapObject(ret);
861
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_67);
862
+ return ret;
649
863
  },
650
864
  __wbindgen_generic_0000000000000005: function(arg0) {
651
865
  // Cast intrinsic for `F64 -> Externref`.
652
866
  const ret = arg0;
653
- return addHeapObject(ret);
867
+ return ret;
654
868
  },
655
869
  __wbindgen_generic_0000000000000006: function(arg0, arg1) {
656
870
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
657
871
  const ret = getArrayU8FromWasm0(arg0, arg1);
658
- return addHeapObject(ret);
872
+ return ret;
659
873
  },
660
874
  __wbindgen_generic_0000000000000007: function(arg0, arg1) {
661
875
  // Cast intrinsic for `Ref(String) -> Externref`.
662
876
  const ret = getStringFromWasm0(arg0, arg1);
663
- return addHeapObject(ret);
877
+ return ret;
664
878
  },
665
879
  __wbindgen_generic_0000000000000008: function(arg0) {
666
880
  // Cast intrinsic for `U64 -> Externref`.
667
881
  const ret = BigInt.asUintN(64, arg0);
668
- return addHeapObject(ret);
669
- },
670
- __wbindgen_object_clone_ref: function(arg0) {
671
- const ret = getObject(arg0);
672
- return addHeapObject(ret);
882
+ return ret;
673
883
  },
674
- __wbindgen_object_drop_ref: function(arg0) {
675
- takeObject(arg0);
884
+ __wbindgen_init_externref_table: function() {
885
+ const table = wasm.__wbindgen_externrefs;
886
+ table.set(0, undefined);
887
+ table.set(1024, undefined);
888
+ table.set(1025, null);
889
+ table.set(1026, true);
890
+ table.set(1027, false);
676
891
  },
677
892
  };
678
893
  return {
@@ -681,20 +896,20 @@ function __wbg_get_imports() {
681
896
  };
682
897
  }
683
898
 
684
- function __wasm_bindgen_func_elem_64(arg0, arg1) {
685
- wasm.__wasm_bindgen_func_elem_64(arg0, arg1);
899
+ function __wasm_bindgen_func_elem_67(arg0, arg1) {
900
+ wasm.__wasm_bindgen_func_elem_67(arg0, arg1);
686
901
  }
687
902
 
688
- function __wasm_bindgen_func_elem_60(arg0, arg1, arg2) {
689
- wasm.__wasm_bindgen_func_elem_60(arg0, arg1, addHeapObject(arg2));
903
+ function __wasm_bindgen_func_elem_63(arg0, arg1, arg2) {
904
+ wasm.__wasm_bindgen_func_elem_63(arg0, arg1, arg2);
690
905
  }
691
906
 
692
- function __wasm_bindgen_func_elem_60_37(arg0, arg1, arg2) {
693
- wasm.__wasm_bindgen_func_elem_60_37(arg0, arg1, addHeapObject(arg2));
907
+ function __wasm_bindgen_func_elem_63_37(arg0, arg1, arg2) {
908
+ wasm.__wasm_bindgen_func_elem_63_37(arg0, arg1, arg2);
694
909
  }
695
910
 
696
- function __wasm_bindgen_func_elem_60_38(arg0, arg1, arg2) {
697
- wasm.__wasm_bindgen_func_elem_60_38(arg0, arg1, addHeapObject(arg2));
911
+ function __wasm_bindgen_func_elem_63_38(arg0, arg1, arg2) {
912
+ wasm.__wasm_bindgen_func_elem_63_38(arg0, arg1, arg2);
698
913
  }
699
914
 
700
915
 
@@ -703,88 +918,72 @@ const ChannelFinalization = (typeof FinalizationRegistry === 'undefined')
703
918
  ? { register: () => {}, unregister: () => {} }
704
919
  : new FinalizationRegistry(ptr => wasm.__wbg_channel_free(ptr, 1));
705
920
 
706
- function addHeapObject(obj) {
707
- if (heap_next === heap.length) heap.push(heap.length + 1);
708
- const idx = heap_next;
709
- heap_next = heap[idx];
710
-
711
- heap[idx] = obj;
921
+ function addToExternrefTable0(obj) {
922
+ const idx = wasm.__wbindgen_export5();
923
+ wasm.__wbindgen_externrefs.set(idx, obj);
712
924
  return idx;
713
925
  }
714
926
 
715
927
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
716
928
  ? { register: () => {}, unregister: () => {} }
717
- : new FinalizationRegistry(state => wasm.__wbindgen_export4(state.a, state.b));
929
+ : new FinalizationRegistry(state => wasm.__wbindgen_export6(state.a, state.b));
718
930
 
719
931
  function debugString(val) {
720
- // primitive types
721
- const type = typeof val;
722
- if (type == 'number' || type == 'boolean' || val == null) {
723
- return `${val}`;
724
- }
725
- if (type == 'string') {
726
- return `"${val}"`;
727
- }
728
- if (type == 'symbol') {
729
- const description = val.description;
730
- if (description == null) {
731
- return 'Symbol';
732
- } else {
733
- return `Symbol(${description})`;
734
- }
735
- }
736
- if (type == 'function') {
737
- const name = val.name;
738
- if (typeof name == 'string' && name.length > 0) {
739
- return `Function(${name})`;
740
- } else {
741
- return 'Function';
742
- }
743
- }
744
- // objects
745
- if (Array.isArray(val)) {
746
- const length = val.length;
747
- let debug = '[';
748
- if (length > 0) {
749
- debug += debugString(val[0]);
750
- }
751
- for(let i = 1; i < length; i++) {
752
- debug += ', ' + debugString(val[i]);
753
- }
754
- debug += ']';
755
- return debug;
756
- }
757
- // Test for built-in
758
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
759
- let className;
760
- if (builtInMatches && builtInMatches.length > 1) {
761
- className = builtInMatches[1];
762
- } else {
763
- // Failed to match the standard '[object ClassName]'
764
- return toString.call(val);
765
- }
766
- if (className == 'Object') {
767
- // we're a user defined class or Object
768
- // JSON.stringify avoids problems with cycles, and is generally much
769
- // easier than looping through ownProperties of `val`.
770
- try {
771
- return 'Object(' + JSON.stringify(val) + ')';
772
- } catch (_) {
773
- return 'Object';
932
+ switch (typeof val) {
933
+ // primitive types
934
+ case 'number':
935
+ case 'boolean':
936
+ case 'undefined':
937
+ return `${val}`;
938
+ case 'string':
939
+ return JSON.stringify(val);
940
+ case 'bigint':
941
+ return `${val}n`;
942
+ case 'symbol':
943
+ return val.description !== undefined
944
+ ? `Symbol(${val.description})`
945
+ : 'Symbol';
946
+ case 'function':
947
+ return typeof val.name === 'string' && val.name !== ''
948
+ ? `Function(${val.name})`
949
+ : 'Function';
950
+ case 'object': {
951
+ if (val === null) {
952
+ return 'null';
953
+ }
954
+ // objects
955
+ if (Array.isArray(val)) {
956
+ return '[' + Array.from(val, debugString).join(', ') + ']';
957
+ }
958
+ // errors
959
+ if (val instanceof Error) {
960
+ return `${val.name}: ${val.message}\n${val.stack}`;
961
+ }
962
+
963
+ const toStringOutput = toString.call(val);
964
+ // Test for built-in
965
+ const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
966
+
967
+ // Failed to match the standard '[object ClassName]'
968
+ if (className === undefined) {
969
+ return toStringOutput;
970
+ }
971
+ if (className === 'Object') {
972
+ // we're a user defined class or Object
973
+ // JSON.stringify avoids problems with cycles, and is generally much
974
+ // easier than looping through ownProperties of `val`.
975
+ try {
976
+ return 'Object(' + JSON.stringify(val) + ')';
977
+ } catch (_) {
978
+ return 'Object';
979
+ }
980
+ }
981
+ // TODO we could test for more things here, like `Set`s and `Map`s.
982
+ return className;
774
983
  }
984
+ // Per MDN: 'This list of values is exhaustive.'
985
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
775
986
  }
776
- // errors
777
- if (val instanceof Error) {
778
- return `${val.name}: ${val.message}\n${val.stack}`;
779
- }
780
- // TODO we could test for more things here, like `Set`s and `Map`s.
781
- return className;
782
- }
783
-
784
- function dropObject(idx) {
785
- if (idx < 1028) return;
786
- heap[idx] = heap_next;
787
- heap_next = idx;
788
987
  }
789
988
 
790
989
  function getArrayU8FromWasm0(ptr, len) {
@@ -801,7 +1000,8 @@ function getDataViewMemory0() {
801
1000
  }
802
1001
 
803
1002
  function getStringFromWasm0(ptr, len) {
804
- return decodeText(ptr >>> 0, len);
1003
+ ptr = ptr >>> 0;
1004
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
805
1005
  }
806
1006
 
807
1007
  let cachedUint8ArrayMemory0 = null;
@@ -812,21 +1012,15 @@ function getUint8ArrayMemory0() {
812
1012
  return cachedUint8ArrayMemory0;
813
1013
  }
814
1014
 
815
- function getObject(idx) { return heap[idx]; }
816
-
817
1015
  function handleError(f, args) {
818
1016
  try {
819
1017
  return f.apply(this, args);
820
1018
  } catch (e) {
821
- wasm.__wbindgen_export3(addHeapObject(e));
1019
+ const idx = addToExternrefTable0(e);
1020
+ wasm.__wbindgen_export4(idx);
822
1021
  }
823
1022
  }
824
1023
 
825
- let heap = new Array(1024).fill(undefined);
826
- heap.push(undefined, null, true, false);
827
-
828
- let heap_next = heap.length;
829
-
830
1024
  function isLikeNone(x) {
831
1025
  return x === undefined || x === null;
832
1026
  }
@@ -850,7 +1044,7 @@ function makeMutClosure(arg0, arg1, f) {
850
1044
  };
851
1045
  real._wbg_cb_unref = () => {
852
1046
  if (--state.cnt === 0) {
853
- wasm.__wbindgen_export4(state.a, state.b);
1047
+ wasm.__wbindgen_export6(state.a, state.b);
854
1048
  state.a = 0;
855
1049
  CLOSURE_DTORS.unregister(state);
856
1050
  }
@@ -903,24 +1097,18 @@ function passStringToWasm0(arg, malloc, realloc) {
903
1097
  return ptr;
904
1098
  }
905
1099
 
906
- function takeObject(idx) {
907
- const ret = getObject(idx);
908
- dropObject(idx);
909
- return ret;
910
- }
911
-
912
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1100
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
913
1101
  cachedTextDecoder.decode();
914
1102
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
915
1103
  let numBytesDecoded = 0;
916
- function decodeText(ptr, len) {
917
- numBytesDecoded += len;
1104
+ function decodeText(bytes) {
1105
+ numBytesDecoded += bytes.length;
918
1106
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
919
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1107
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
920
1108
  cachedTextDecoder.decode();
921
- numBytesDecoded = len;
1109
+ numBytesDecoded = bytes.length;
922
1110
  }
923
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1111
+ return cachedTextDecoder.decode(bytes);
924
1112
  }
925
1113
 
926
1114
  const cachedTextEncoder = new TextEncoder();
@@ -943,6 +1131,7 @@ function __wbg_finalize_init(instance, module) {
943
1131
  wasm = instance.exports;
944
1132
  cachedDataViewMemory0 = null;
945
1133
  cachedUint8ArrayMemory0 = null;
1134
+ wasm.__wbindgen_start();
946
1135
  return wasm;
947
1136
  }
948
1137
 
@@ -985,9 +1174,17 @@ async function __wbg_load(module, imports) {
985
1174
  }
986
1175
  }
987
1176
 
1177
+ let __wbg_init_promise;
988
1178
  async function __wbg_init(module_or_path) {
989
1179
  if (wasm !== undefined) return wasm;
1180
+ if (__wbg_init_promise === undefined) {
1181
+ __wbg_init_promise = __wbg_init_once(module_or_path);
1182
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
1183
+ }
1184
+ return __wbg_init_promise;
1185
+ }
990
1186
 
1187
+ async function __wbg_init_once(module_or_path) {
991
1188
 
992
1189
  if (module_or_path !== undefined) {
993
1190
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
@@ -998,7 +1195,7 @@ async function __wbg_init(module_or_path) {
998
1195
  }
999
1196
 
1000
1197
  if (module_or_path === undefined) {
1001
- module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-CCD7cbHu.js', document.baseURI).href)));
1198
+ module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-DCBMfc2u.js', document.baseURI).href)));
1002
1199
  }
1003
1200
  const imports = __wbg_get_imports();
1004
1201