mqtt5-wasm 0.2.0 → 0.2.3

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/mqtt5_wasm.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export enum WasmBridgeDirection {
4
- In = 0,
5
- Out = 1,
6
- Both = 2,
7
- }
3
+
8
4
  export class WasmBridgeConfig {
9
5
  free(): void;
10
6
  [Symbol.dispose](): void;
@@ -17,6 +13,13 @@ export class WasmBridgeConfig {
17
13
  set username(value: string | null | undefined);
18
14
  set password(value: string | null | undefined);
19
15
  }
16
+
17
+ export enum WasmBridgeDirection {
18
+ In = 0,
19
+ Out = 1,
20
+ Both = 2,
21
+ }
22
+
20
23
  export class WasmBroker {
21
24
  free(): void;
22
25
  [Symbol.dispose](): void;
@@ -35,6 +38,7 @@ export class WasmBroker {
35
38
  list_bridges(): string[];
36
39
  stop_all_bridges(): Promise<void>;
37
40
  }
41
+
38
42
  export class WasmBrokerConfig {
39
43
  free(): void;
40
44
  [Symbol.dispose](): void;
@@ -50,6 +54,7 @@ export class WasmBrokerConfig {
50
54
  set shared_subscription_available(value: boolean);
51
55
  set server_keep_alive_secs(value: number | null | undefined);
52
56
  }
57
+
53
58
  export class WasmConnectOptions {
54
59
  free(): void;
55
60
  [Symbol.dispose](): void;
@@ -79,6 +84,7 @@ export class WasmConnectOptions {
79
84
  set authenticationMethod(value: string | null | undefined);
80
85
  set authenticationData(value: Uint8Array);
81
86
  }
87
+
82
88
  export class WasmMqttClient {
83
89
  free(): void;
84
90
  [Symbol.dispose](): void;
@@ -86,6 +92,7 @@ export class WasmMqttClient {
86
92
  connect(url: string): Promise<void>;
87
93
  connect_with_options(url: string, config: WasmConnectOptions): Promise<void>;
88
94
  connect_message_port(port: MessagePort): Promise<void>;
95
+ connect_message_port_with_options(port: MessagePort, config: WasmConnectOptions): Promise<void>;
89
96
  connect_broadcast_channel(channel_name: string): Promise<void>;
90
97
  publish(topic: string, payload: Uint8Array): Promise<void>;
91
98
  publish_with_options(topic: string, payload: Uint8Array, options: WasmPublishOptions): Promise<void>;
@@ -103,6 +110,7 @@ export class WasmMqttClient {
103
110
  on_auth_challenge(callback: Function): void;
104
111
  respond_auth(auth_data: Uint8Array): Promise<void>;
105
112
  }
113
+
106
114
  export class WasmPublishOptions {
107
115
  free(): void;
108
116
  [Symbol.dispose](): void;
@@ -123,6 +131,7 @@ export class WasmPublishOptions {
123
131
  get contentType(): string | undefined;
124
132
  set contentType(value: string | null | undefined);
125
133
  }
134
+
126
135
  export class WasmSubscribeOptions {
127
136
  free(): void;
128
137
  [Symbol.dispose](): void;
@@ -134,6 +143,7 @@ export class WasmSubscribeOptions {
134
143
  get subscriptionIdentifier(): number | undefined;
135
144
  set subscriptionIdentifier(value: number | null | undefined);
136
145
  }
146
+
137
147
  export class WasmTopicMapping {
138
148
  free(): void;
139
149
  [Symbol.dispose](): void;
@@ -142,6 +152,7 @@ export class WasmTopicMapping {
142
152
  set local_prefix(value: string | null | undefined);
143
153
  set remote_prefix(value: string | null | undefined);
144
154
  }
155
+
145
156
  export class WasmWillMessage {
146
157
  free(): void;
147
158
  [Symbol.dispose](): void;
@@ -209,6 +220,7 @@ export interface InitOutput {
209
220
  readonly wasmmqttclient_connect: (a: number, b: number, c: number) => any;
210
221
  readonly wasmmqttclient_connect_with_options: (a: number, b: number, c: number, d: number) => any;
211
222
  readonly wasmmqttclient_connect_message_port: (a: number, b: any) => any;
223
+ readonly wasmmqttclient_connect_message_port_with_options: (a: number, b: any, c: number) => any;
212
224
  readonly wasmmqttclient_connect_broadcast_channel: (a: number, b: number, c: number) => any;
213
225
  readonly wasmmqttclient_publish: (a: number, b: number, c: number, d: number, e: number) => any;
214
226
  readonly wasmmqttclient_publish_with_options: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
@@ -300,13 +312,13 @@ export interface InitOutput {
300
312
  readonly wasmwillmessage_willDelayInterval: (a: number) => number;
301
313
  readonly wasmwillmessage_messageExpiryInterval: (a: number) => number;
302
314
  readonly wasmwillmessage_set_messageExpiryInterval: (a: number, b: number) => void;
303
- readonly wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333: (a: number, b: number, c: any) => void;
304
- readonly wasm_bindgen__closure__destroy__h0abe416ead11a3f0: (a: number, b: number) => void;
305
- readonly wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed: (a: number, b: number) => void;
306
- readonly wasm_bindgen__closure__destroy__he3a6d52737a61d69: (a: number, b: number) => void;
307
- readonly wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0: (a: number, b: number, c: any) => void;
308
- readonly wasm_bindgen__closure__destroy__h2a5cb8478cd1adb0: (a: number, b: number) => void;
309
- readonly wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e: (a: number, b: number, c: any, d: any) => void;
315
+ readonly wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4: (a: number, b: number, c: any) => void;
316
+ readonly wasm_bindgen__closure__destroy__h60ca8c1f3f61ef16: (a: number, b: number) => void;
317
+ readonly wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd: (a: number, b: number, c: any) => void;
318
+ readonly wasm_bindgen__closure__destroy__h8e3161c754fbc99b: (a: number, b: number) => void;
319
+ readonly wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368: (a: number, b: number) => void;
320
+ readonly wasm_bindgen__closure__destroy__h41d50b86eff9c0fb: (a: number, b: number) => void;
321
+ readonly wasm_bindgen__convert__closures_____invoke__h22971f3c49e1e8f1: (a: number, b: number, c: any, d: any) => void;
310
322
  readonly __wbindgen_malloc: (a: number, b: number) => number;
311
323
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
312
324
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -319,6 +331,7 @@ export interface InitOutput {
319
331
  }
320
332
 
321
333
  export type SyncInitInput = BufferSource | WebAssembly.Module;
334
+
322
335
  /**
323
336
  * Instantiates the given `module`, which can either be bytes or
324
337
  * a precompiled `WebAssembly.Module`.
package/mqtt5_wasm.js CHANGED
@@ -1,5 +1,21 @@
1
1
  let wasm;
2
2
 
3
+ function addToExternrefTable0(obj) {
4
+ const idx = wasm.__externref_table_alloc();
5
+ wasm.__wbindgen_externrefs.set(idx, obj);
6
+ return idx;
7
+ }
8
+
9
+ function _assertClass(instance, klass) {
10
+ if (!(instance instanceof klass)) {
11
+ throw new Error(`expected instance of ${klass.name}`);
12
+ }
13
+ }
14
+
15
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
16
+ ? { register: () => {}, unregister: () => {} }
17
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
18
+
3
19
  function debugString(val) {
4
20
  // primitive types
5
21
  const type = typeof val;
@@ -65,71 +81,23 @@ function debugString(val) {
65
81
  return className;
66
82
  }
67
83
 
68
- let WASM_VECTOR_LEN = 0;
69
-
70
- let cachedUint8ArrayMemory0 = null;
71
-
72
- function getUint8ArrayMemory0() {
73
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
74
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
75
- }
76
- return cachedUint8ArrayMemory0;
77
- }
78
-
79
- const cachedTextEncoder = new TextEncoder();
80
-
81
- if (!('encodeInto' in cachedTextEncoder)) {
82
- cachedTextEncoder.encodeInto = function (arg, view) {
83
- const buf = cachedTextEncoder.encode(arg);
84
- view.set(buf);
85
- return {
86
- read: arg.length,
87
- written: buf.length
88
- };
84
+ function getArrayJsValueFromWasm0(ptr, len) {
85
+ ptr = ptr >>> 0;
86
+ const mem = getDataViewMemory0();
87
+ const result = [];
88
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
89
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
89
90
  }
91
+ wasm.__externref_drop_slice(ptr, len);
92
+ return result;
90
93
  }
91
94
 
92
- function passStringToWasm0(arg, malloc, realloc) {
93
-
94
- if (realloc === undefined) {
95
- const buf = cachedTextEncoder.encode(arg);
96
- const ptr = malloc(buf.length, 1) >>> 0;
97
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
98
- WASM_VECTOR_LEN = buf.length;
99
- return ptr;
100
- }
101
-
102
- let len = arg.length;
103
- let ptr = malloc(len, 1) >>> 0;
104
-
105
- const mem = getUint8ArrayMemory0();
106
-
107
- let offset = 0;
108
-
109
- for (; offset < len; offset++) {
110
- const code = arg.charCodeAt(offset);
111
- if (code > 0x7F) break;
112
- mem[ptr + offset] = code;
113
- }
114
-
115
- if (offset !== len) {
116
- if (offset !== 0) {
117
- arg = arg.slice(offset);
118
- }
119
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
120
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
121
- const ret = cachedTextEncoder.encodeInto(arg, view);
122
-
123
- offset += ret.written;
124
- ptr = realloc(ptr, len, offset, 1) >>> 0;
125
- }
126
-
127
- WASM_VECTOR_LEN = offset;
128
- return ptr;
95
+ function getArrayU8FromWasm0(ptr, len) {
96
+ ptr = ptr >>> 0;
97
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
129
98
  }
130
99
 
131
100
  let cachedDataViewMemory0 = null;
132
-
133
101
  function getDataViewMemory0() {
134
102
  if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
135
103
  cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
@@ -137,31 +105,17 @@ function getDataViewMemory0() {
137
105
  return cachedDataViewMemory0;
138
106
  }
139
107
 
140
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
141
-
142
- cachedTextDecoder.decode();
143
-
144
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
145
- let numBytesDecoded = 0;
146
- function decodeText(ptr, len) {
147
- numBytesDecoded += len;
148
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
149
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
150
- cachedTextDecoder.decode();
151
- numBytesDecoded = len;
152
- }
153
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
154
- }
155
-
156
108
  function getStringFromWasm0(ptr, len) {
157
109
  ptr = ptr >>> 0;
158
110
  return decodeText(ptr, len);
159
111
  }
160
112
 
161
- function addToExternrefTable0(obj) {
162
- const idx = wasm.__externref_table_alloc();
163
- wasm.__wbindgen_externrefs.set(idx, obj);
164
- return idx;
113
+ let cachedUint8ArrayMemory0 = null;
114
+ function getUint8ArrayMemory0() {
115
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
116
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
117
+ }
118
+ return cachedUint8ArrayMemory0;
165
119
  }
166
120
 
167
121
  function handleError(f, args) {
@@ -173,19 +127,10 @@ function handleError(f, args) {
173
127
  }
174
128
  }
175
129
 
176
- function getArrayU8FromWasm0(ptr, len) {
177
- ptr = ptr >>> 0;
178
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
179
- }
180
-
181
130
  function isLikeNone(x) {
182
131
  return x === undefined || x === null;
183
132
  }
184
133
 
185
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
186
- ? { register: () => {}, unregister: () => {} }
187
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
188
-
189
134
  function makeMutClosure(arg0, arg1, dtor, f) {
190
135
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
191
136
  const real = (...args) => {
@@ -214,10 +159,48 @@ function makeMutClosure(arg0, arg1, dtor, f) {
214
159
  return real;
215
160
  }
216
161
 
217
- function _assertClass(instance, klass) {
218
- if (!(instance instanceof klass)) {
219
- throw new Error(`expected instance of ${klass.name}`);
162
+ function passArray8ToWasm0(arg, malloc) {
163
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
164
+ getUint8ArrayMemory0().set(arg, ptr / 1);
165
+ WASM_VECTOR_LEN = arg.length;
166
+ return ptr;
167
+ }
168
+
169
+ function passStringToWasm0(arg, malloc, realloc) {
170
+ if (realloc === undefined) {
171
+ const buf = cachedTextEncoder.encode(arg);
172
+ const ptr = malloc(buf.length, 1) >>> 0;
173
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
174
+ WASM_VECTOR_LEN = buf.length;
175
+ return ptr;
220
176
  }
177
+
178
+ let len = arg.length;
179
+ let ptr = malloc(len, 1) >>> 0;
180
+
181
+ const mem = getUint8ArrayMemory0();
182
+
183
+ let offset = 0;
184
+
185
+ for (; offset < len; offset++) {
186
+ const code = arg.charCodeAt(offset);
187
+ if (code > 0x7F) break;
188
+ mem[ptr + offset] = code;
189
+ }
190
+ if (offset !== len) {
191
+ if (offset !== 0) {
192
+ arg = arg.slice(offset);
193
+ }
194
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
195
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
196
+ const ret = cachedTextEncoder.encodeInto(arg, view);
197
+
198
+ offset += ret.written;
199
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
200
+ }
201
+
202
+ WASM_VECTOR_LEN = offset;
203
+ return ptr;
221
204
  }
222
205
 
223
206
  function takeFromExternrefTable0(idx) {
@@ -226,47 +209,50 @@ function takeFromExternrefTable0(idx) {
226
209
  return value;
227
210
  }
228
211
 
229
- function getArrayJsValueFromWasm0(ptr, len) {
230
- ptr = ptr >>> 0;
231
- const mem = getDataViewMemory0();
232
- const result = [];
233
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
234
- result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
212
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
213
+ cachedTextDecoder.decode();
214
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
215
+ let numBytesDecoded = 0;
216
+ function decodeText(ptr, len) {
217
+ numBytesDecoded += len;
218
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
219
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
220
+ cachedTextDecoder.decode();
221
+ numBytesDecoded = len;
235
222
  }
236
- wasm.__externref_drop_slice(ptr, len);
237
- return result;
223
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
238
224
  }
239
225
 
240
- function passArray8ToWasm0(arg, malloc) {
241
- const ptr = malloc(arg.length * 1, 1) >>> 0;
242
- getUint8ArrayMemory0().set(arg, ptr / 1);
243
- WASM_VECTOR_LEN = arg.length;
244
- return ptr;
245
- }
246
- function wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333(arg0, arg1, arg2) {
247
- wasm.wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333(arg0, arg1, arg2);
226
+ const cachedTextEncoder = new TextEncoder();
227
+
228
+ if (!('encodeInto' in cachedTextEncoder)) {
229
+ cachedTextEncoder.encodeInto = function (arg, view) {
230
+ const buf = cachedTextEncoder.encode(arg);
231
+ view.set(buf);
232
+ return {
233
+ read: arg.length,
234
+ written: buf.length
235
+ };
236
+ }
248
237
  }
249
238
 
250
- function wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed(arg0, arg1) {
251
- wasm.wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed(arg0, arg1);
239
+ let WASM_VECTOR_LEN = 0;
240
+
241
+ function wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4(arg0, arg1, arg2) {
242
+ wasm.wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4(arg0, arg1, arg2);
252
243
  }
253
244
 
254
- function wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0(arg0, arg1, arg2) {
255
- wasm.wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0(arg0, arg1, arg2);
245
+ function wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd(arg0, arg1, arg2) {
246
+ wasm.wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd(arg0, arg1, arg2);
256
247
  }
257
248
 
258
- function wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e(arg0, arg1, arg2, arg3) {
259
- wasm.wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e(arg0, arg1, arg2, arg3);
249
+ function wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368(arg0, arg1) {
250
+ wasm.wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368(arg0, arg1);
260
251
  }
261
252
 
262
- /**
263
- * @enum {0 | 1 | 2}
264
- */
265
- export const WasmBridgeDirection = Object.freeze({
266
- In: 0, "0": "In",
267
- Out: 1, "1": "Out",
268
- Both: 2, "2": "Both",
269
- });
253
+ function wasm_bindgen__convert__closures_____invoke__h22971f3c49e1e8f1(arg0, arg1, arg2, arg3) {
254
+ wasm.wasm_bindgen__convert__closures_____invoke__h22971f3c49e1e8f1(arg0, arg1, arg2, arg3);
255
+ }
270
256
 
271
257
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
272
258
 
@@ -274,15 +260,45 @@ const WasmBridgeConfigFinalization = (typeof FinalizationRegistry === 'undefined
274
260
  ? { register: () => {}, unregister: () => {} }
275
261
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmbridgeconfig_free(ptr >>> 0, 1));
276
262
 
277
- export class WasmBridgeConfig {
263
+ const WasmBrokerFinalization = (typeof FinalizationRegistry === 'undefined')
264
+ ? { register: () => {}, unregister: () => {} }
265
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmbroker_free(ptr >>> 0, 1));
266
+
267
+ const WasmBrokerConfigFinalization = (typeof FinalizationRegistry === 'undefined')
268
+ ? { register: () => {}, unregister: () => {} }
269
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmbrokerconfig_free(ptr >>> 0, 1));
270
+
271
+ const WasmConnectOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
272
+ ? { register: () => {}, unregister: () => {} }
273
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmconnectoptions_free(ptr >>> 0, 1));
274
+
275
+ const WasmMqttClientFinalization = (typeof FinalizationRegistry === 'undefined')
276
+ ? { register: () => {}, unregister: () => {} }
277
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmmqttclient_free(ptr >>> 0, 1));
278
+
279
+ const WasmPublishOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
280
+ ? { register: () => {}, unregister: () => {} }
281
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmpublishoptions_free(ptr >>> 0, 1));
282
+
283
+ const WasmSubscribeOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
284
+ ? { register: () => {}, unregister: () => {} }
285
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmsubscribeoptions_free(ptr >>> 0, 1));
286
+
287
+ const WasmTopicMappingFinalization = (typeof FinalizationRegistry === 'undefined')
288
+ ? { register: () => {}, unregister: () => {} }
289
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmtopicmapping_free(ptr >>> 0, 1));
278
290
 
291
+ const WasmWillMessageFinalization = (typeof FinalizationRegistry === 'undefined')
292
+ ? { register: () => {}, unregister: () => {} }
293
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmwillmessage_free(ptr >>> 0, 1));
294
+
295
+ export class WasmBridgeConfig {
279
296
  __destroy_into_raw() {
280
297
  const ptr = this.__wbg_ptr;
281
298
  this.__wbg_ptr = 0;
282
299
  WasmBridgeConfigFinalization.unregister(this);
283
300
  return ptr;
284
301
  }
285
-
286
302
  free() {
287
303
  const ptr = this.__destroy_into_raw();
288
304
  wasm.__wbg_wasmbridgeconfig_free(ptr, 0);
@@ -351,12 +367,16 @@ export class WasmBridgeConfig {
351
367
  }
352
368
  if (Symbol.dispose) WasmBridgeConfig.prototype[Symbol.dispose] = WasmBridgeConfig.prototype.free;
353
369
 
354
- const WasmBrokerFinalization = (typeof FinalizationRegistry === 'undefined')
355
- ? { register: () => {}, unregister: () => {} }
356
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmbroker_free(ptr >>> 0, 1));
370
+ /**
371
+ * @enum {0 | 1 | 2}
372
+ */
373
+ export const WasmBridgeDirection = Object.freeze({
374
+ In: 0, "0": "In",
375
+ Out: 1, "1": "Out",
376
+ Both: 2, "2": "Both",
377
+ });
357
378
 
358
379
  export class WasmBroker {
359
-
360
380
  static __wrap(ptr) {
361
381
  ptr = ptr >>> 0;
362
382
  const obj = Object.create(WasmBroker.prototype);
@@ -364,14 +384,12 @@ export class WasmBroker {
364
384
  WasmBrokerFinalization.register(obj, obj.__wbg_ptr, obj);
365
385
  return obj;
366
386
  }
367
-
368
387
  __destroy_into_raw() {
369
388
  const ptr = this.__wbg_ptr;
370
389
  this.__wbg_ptr = 0;
371
390
  WasmBrokerFinalization.unregister(this);
372
391
  return ptr;
373
392
  }
374
-
375
393
  free() {
376
394
  const ptr = this.__destroy_into_raw();
377
395
  wasm.__wbg_wasmbroker_free(ptr, 0);
@@ -531,19 +549,13 @@ export class WasmBroker {
531
549
  }
532
550
  if (Symbol.dispose) WasmBroker.prototype[Symbol.dispose] = WasmBroker.prototype.free;
533
551
 
534
- const WasmBrokerConfigFinalization = (typeof FinalizationRegistry === 'undefined')
535
- ? { register: () => {}, unregister: () => {} }
536
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmbrokerconfig_free(ptr >>> 0, 1));
537
-
538
552
  export class WasmBrokerConfig {
539
-
540
553
  __destroy_into_raw() {
541
554
  const ptr = this.__wbg_ptr;
542
555
  this.__wbg_ptr = 0;
543
556
  WasmBrokerConfigFinalization.unregister(this);
544
557
  return ptr;
545
558
  }
546
-
547
559
  free() {
548
560
  const ptr = this.__destroy_into_raw();
549
561
  wasm.__wbg_wasmbrokerconfig_free(ptr, 0);
@@ -617,19 +629,13 @@ export class WasmBrokerConfig {
617
629
  }
618
630
  if (Symbol.dispose) WasmBrokerConfig.prototype[Symbol.dispose] = WasmBrokerConfig.prototype.free;
619
631
 
620
- const WasmConnectOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
621
- ? { register: () => {}, unregister: () => {} }
622
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmconnectoptions_free(ptr >>> 0, 1));
623
-
624
632
  export class WasmConnectOptions {
625
-
626
633
  __destroy_into_raw() {
627
634
  const ptr = this.__wbg_ptr;
628
635
  this.__wbg_ptr = 0;
629
636
  WasmConnectOptionsFinalization.unregister(this);
630
637
  return ptr;
631
638
  }
632
-
633
639
  free() {
634
640
  const ptr = this.__destroy_into_raw();
635
641
  wasm.__wbg_wasmconnectoptions_free(ptr, 0);
@@ -828,19 +834,13 @@ export class WasmConnectOptions {
828
834
  }
829
835
  if (Symbol.dispose) WasmConnectOptions.prototype[Symbol.dispose] = WasmConnectOptions.prototype.free;
830
836
 
831
- const WasmMqttClientFinalization = (typeof FinalizationRegistry === 'undefined')
832
- ? { register: () => {}, unregister: () => {} }
833
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmmqttclient_free(ptr >>> 0, 1));
834
-
835
837
  export class WasmMqttClient {
836
-
837
838
  __destroy_into_raw() {
838
839
  const ptr = this.__wbg_ptr;
839
840
  this.__wbg_ptr = 0;
840
841
  WasmMqttClientFinalization.unregister(this);
841
842
  return ptr;
842
843
  }
843
-
844
844
  free() {
845
845
  const ptr = this.__destroy_into_raw();
846
846
  wasm.__wbg_wasmmqttclient_free(ptr, 0);
@@ -886,6 +886,16 @@ export class WasmMqttClient {
886
886
  const ret = wasm.wasmmqttclient_connect_message_port(this.__wbg_ptr, port);
887
887
  return ret;
888
888
  }
889
+ /**
890
+ * @param {MessagePort} port
891
+ * @param {WasmConnectOptions} config
892
+ * @returns {Promise<void>}
893
+ */
894
+ connect_message_port_with_options(port, config) {
895
+ _assertClass(config, WasmConnectOptions);
896
+ const ret = wasm.wasmmqttclient_connect_message_port_with_options(this.__wbg_ptr, port, config.__wbg_ptr);
897
+ return ret;
898
+ }
889
899
  /**
890
900
  * @param {string} channel_name
891
901
  * @returns {Promise<void>}
@@ -1047,19 +1057,13 @@ export class WasmMqttClient {
1047
1057
  }
1048
1058
  if (Symbol.dispose) WasmMqttClient.prototype[Symbol.dispose] = WasmMqttClient.prototype.free;
1049
1059
 
1050
- const WasmPublishOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
1051
- ? { register: () => {}, unregister: () => {} }
1052
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmpublishoptions_free(ptr >>> 0, 1));
1053
-
1054
1060
  export class WasmPublishOptions {
1055
-
1056
1061
  __destroy_into_raw() {
1057
1062
  const ptr = this.__wbg_ptr;
1058
1063
  this.__wbg_ptr = 0;
1059
1064
  WasmPublishOptionsFinalization.unregister(this);
1060
1065
  return ptr;
1061
1066
  }
1062
-
1063
1067
  free() {
1064
1068
  const ptr = this.__destroy_into_raw();
1065
1069
  wasm.__wbg_wasmpublishoptions_free(ptr, 0);
@@ -1200,19 +1204,13 @@ export class WasmPublishOptions {
1200
1204
  }
1201
1205
  if (Symbol.dispose) WasmPublishOptions.prototype[Symbol.dispose] = WasmPublishOptions.prototype.free;
1202
1206
 
1203
- const WasmSubscribeOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
1204
- ? { register: () => {}, unregister: () => {} }
1205
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmsubscribeoptions_free(ptr >>> 0, 1));
1206
-
1207
1207
  export class WasmSubscribeOptions {
1208
-
1209
1208
  __destroy_into_raw() {
1210
1209
  const ptr = this.__wbg_ptr;
1211
1210
  this.__wbg_ptr = 0;
1212
1211
  WasmSubscribeOptionsFinalization.unregister(this);
1213
1212
  return ptr;
1214
1213
  }
1215
-
1216
1214
  free() {
1217
1215
  const ptr = this.__destroy_into_raw();
1218
1216
  wasm.__wbg_wasmsubscribeoptions_free(ptr, 0);
@@ -1291,19 +1289,13 @@ export class WasmSubscribeOptions {
1291
1289
  }
1292
1290
  if (Symbol.dispose) WasmSubscribeOptions.prototype[Symbol.dispose] = WasmSubscribeOptions.prototype.free;
1293
1291
 
1294
- const WasmTopicMappingFinalization = (typeof FinalizationRegistry === 'undefined')
1295
- ? { register: () => {}, unregister: () => {} }
1296
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmtopicmapping_free(ptr >>> 0, 1));
1297
-
1298
1292
  export class WasmTopicMapping {
1299
-
1300
1293
  __destroy_into_raw() {
1301
1294
  const ptr = this.__wbg_ptr;
1302
1295
  this.__wbg_ptr = 0;
1303
1296
  WasmTopicMappingFinalization.unregister(this);
1304
1297
  return ptr;
1305
1298
  }
1306
-
1307
1299
  free() {
1308
1300
  const ptr = this.__destroy_into_raw();
1309
1301
  wasm.__wbg_wasmtopicmapping_free(ptr, 0);
@@ -1345,19 +1337,13 @@ export class WasmTopicMapping {
1345
1337
  }
1346
1338
  if (Symbol.dispose) WasmTopicMapping.prototype[Symbol.dispose] = WasmTopicMapping.prototype.free;
1347
1339
 
1348
- const WasmWillMessageFinalization = (typeof FinalizationRegistry === 'undefined')
1349
- ? { register: () => {}, unregister: () => {} }
1350
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmwillmessage_free(ptr >>> 0, 1));
1351
-
1352
1340
  export class WasmWillMessage {
1353
-
1354
1341
  __destroy_into_raw() {
1355
1342
  const ptr = this.__wbg_ptr;
1356
1343
  this.__wbg_ptr = 0;
1357
1344
  WasmWillMessageFinalization.unregister(this);
1358
1345
  return ptr;
1359
1346
  }
1360
-
1361
1347
  free() {
1362
1348
  const ptr = this.__destroy_into_raw();
1363
1349
  wasm.__wbg_wasmwillmessage_free(ptr, 0);
@@ -1501,7 +1487,6 @@ async function __wbg_load(module, imports) {
1501
1487
  if (typeof WebAssembly.instantiateStreaming === 'function') {
1502
1488
  try {
1503
1489
  return await WebAssembly.instantiateStreaming(module, imports);
1504
-
1505
1490
  } catch (e) {
1506
1491
  const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
1507
1492
 
@@ -1516,13 +1501,11 @@ async function __wbg_load(module, imports) {
1516
1501
 
1517
1502
  const bytes = await module.arrayBuffer();
1518
1503
  return await WebAssembly.instantiate(bytes, imports);
1519
-
1520
1504
  } else {
1521
1505
  const instance = await WebAssembly.instantiate(module, imports);
1522
1506
 
1523
1507
  if (instance instanceof WebAssembly.Instance) {
1524
1508
  return { instance, module };
1525
-
1526
1509
  } else {
1527
1510
  return instance;
1528
1511
  }
@@ -1532,57 +1515,57 @@ async function __wbg_load(module, imports) {
1532
1515
  function __wbg_get_imports() {
1533
1516
  const imports = {};
1534
1517
  imports.wbg = {};
1535
- imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
1518
+ imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
1536
1519
  const ret = debugString(arg1);
1537
1520
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1538
1521
  const len1 = WASM_VECTOR_LEN;
1539
1522
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1540
1523
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1541
1524
  };
1542
- imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
1525
+ imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
1543
1526
  const ret = typeof(arg0) === 'function';
1544
1527
  return ret;
1545
1528
  };
1546
- imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
1529
+ imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
1547
1530
  const ret = arg0 === undefined;
1548
1531
  return ret;
1549
1532
  };
1550
- imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
1533
+ imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
1551
1534
  throw new Error(getStringFromWasm0(arg0, arg1));
1552
1535
  };
1553
- imports.wbg.__wbg__wbg_cb_unref_2454a539ea5790d9 = function(arg0) {
1536
+ imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
1554
1537
  arg0._wbg_cb_unref();
1555
1538
  };
1556
- imports.wbg.__wbg_buffer_ccc4520b36d3ccf4 = function(arg0) {
1539
+ imports.wbg.__wbg_buffer_6cb2fecb1f253d71 = function(arg0) {
1557
1540
  const ret = arg0.buffer;
1558
1541
  return ret;
1559
1542
  };
1560
- imports.wbg.__wbg_call_525440f72fbfc0ea = function() { return handleError(function (arg0, arg1, arg2) {
1543
+ imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
1561
1544
  const ret = arg0.call(arg1, arg2);
1562
1545
  return ret;
1563
1546
  }, arguments) };
1564
- imports.wbg.__wbg_call_e45d2cf9fc925fcf = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1565
- const ret = arg0.call(arg1, arg2, arg3);
1547
+ imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
1548
+ const ret = arg0.call(arg1);
1566
1549
  return ret;
1567
1550
  }, arguments) };
1568
- imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
1569
- const ret = arg0.call(arg1);
1551
+ imports.wbg.__wbg_call_c8baa5c5e72d274e = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1552
+ const ret = arg0.call(arg1, arg2, arg3);
1570
1553
  return ret;
1571
1554
  }, arguments) };
1572
1555
  imports.wbg.__wbg_clearTimeout_5a54f8841c30079a = function(arg0) {
1573
1556
  const ret = clearTimeout(arg0);
1574
1557
  return ret;
1575
1558
  };
1576
- imports.wbg.__wbg_close_209083eb02f34c98 = function(arg0) {
1559
+ imports.wbg.__wbg_close_1db3952de1b5b1cf = function() { return handleError(function (arg0) {
1577
1560
  arg0.close();
1578
- };
1579
- imports.wbg.__wbg_close_462d6d95a9f53a1d = function(arg0) {
1561
+ }, arguments) };
1562
+ imports.wbg.__wbg_close_8158530fc398ee2f = function(arg0) {
1580
1563
  arg0.close();
1581
1564
  };
1582
- imports.wbg.__wbg_close_885e277edf06b3fa = function() { return handleError(function (arg0) {
1565
+ imports.wbg.__wbg_close_c956ddbf0426a990 = function(arg0) {
1583
1566
  arg0.close();
1584
- }, arguments) };
1585
- imports.wbg.__wbg_data_ee4306d069f24f2d = function(arg0) {
1567
+ };
1568
+ imports.wbg.__wbg_data_8bf4ae669a78a688 = function(arg0) {
1586
1569
  const ret = arg0.data;
1587
1570
  return ret;
1588
1571
  };
@@ -1597,13 +1580,13 @@ function __wbg_get_imports() {
1597
1580
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1598
1581
  }
1599
1582
  };
1600
- imports.wbg.__wbg_error_a7f8fbb0523dae15 = function(arg0) {
1583
+ imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
1601
1584
  console.error(arg0);
1602
1585
  };
1603
1586
  imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
1604
1587
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1605
1588
  }, arguments) };
1606
- imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
1589
+ imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
1607
1590
  let result;
1608
1591
  try {
1609
1592
  result = arg0 instanceof ArrayBuffer;
@@ -1613,7 +1596,7 @@ function __wbg_get_imports() {
1613
1596
  const ret = result;
1614
1597
  return ret;
1615
1598
  };
1616
- imports.wbg.__wbg_instanceof_Window_4846dbb3de56c84c = function(arg0) {
1599
+ imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
1617
1600
  let result;
1618
1601
  try {
1619
1602
  result = arg0 instanceof Window;
@@ -1623,21 +1606,45 @@ function __wbg_get_imports() {
1623
1606
  const ret = result;
1624
1607
  return ret;
1625
1608
  };
1626
- imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
1609
+ imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
1627
1610
  const ret = arg0.length;
1628
1611
  return ret;
1629
1612
  };
1630
- imports.wbg.__wbg_log_8cec76766b8c0e33 = function(arg0) {
1613
+ imports.wbg.__wbg_log_1d990106d99dacb7 = function(arg0) {
1631
1614
  console.log(arg0);
1632
1615
  };
1633
- imports.wbg.__wbg_new_3c3d849046688a66 = function(arg0, arg1) {
1616
+ imports.wbg.__wbg_new_137453588c393c59 = function() { return handleError(function () {
1617
+ const ret = new MessageChannel();
1618
+ return ret;
1619
+ }, arguments) };
1620
+ imports.wbg.__wbg_new_25f239778d6112b9 = function() {
1621
+ const ret = new Array();
1622
+ return ret;
1623
+ };
1624
+ imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1625
+ const ret = new Uint8Array(arg0);
1626
+ return ret;
1627
+ };
1628
+ imports.wbg.__wbg_new_7c30d1f874652e62 = function() { return handleError(function (arg0, arg1) {
1629
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
1630
+ return ret;
1631
+ }, arguments) };
1632
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
1633
+ const ret = new Error();
1634
+ return ret;
1635
+ };
1636
+ imports.wbg.__wbg_new_b3dd747604c3c93e = function() { return handleError(function (arg0, arg1) {
1637
+ const ret = new BroadcastChannel(getStringFromWasm0(arg0, arg1));
1638
+ return ret;
1639
+ }, arguments) };
1640
+ imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
1634
1641
  try {
1635
1642
  var state0 = {a: arg0, b: arg1};
1636
1643
  var cb0 = (arg0, arg1) => {
1637
1644
  const a = state0.a;
1638
1645
  state0.a = 0;
1639
1646
  try {
1640
- return wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e(a, state0.b, arg0, arg1);
1647
+ return wasm_bindgen__convert__closures_____invoke__h22971f3c49e1e8f1(a, state0.b, arg0, arg1);
1641
1648
  } finally {
1642
1649
  state0.a = a;
1643
1650
  }
@@ -1648,35 +1655,11 @@ function __wbg_get_imports() {
1648
1655
  state0.a = state0.b = 0;
1649
1656
  }
1650
1657
  };
1651
- imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
1652
- const ret = new Uint8Array(arg0);
1653
- return ret;
1654
- };
1655
- imports.wbg.__wbg_new_67069b49258d9f2a = function() { return handleError(function (arg0, arg1) {
1656
- const ret = new BroadcastChannel(getStringFromWasm0(arg0, arg1));
1657
- return ret;
1658
- }, arguments) };
1659
- imports.wbg.__wbg_new_881c4fe631eee9ad = function() { return handleError(function (arg0, arg1) {
1660
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1));
1661
- return ret;
1662
- }, arguments) };
1663
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
1664
- const ret = new Error();
1665
- return ret;
1666
- };
1667
- imports.wbg.__wbg_new_c31bb2023cab7b59 = function() { return handleError(function () {
1668
- const ret = new MessageChannel();
1669
- return ret;
1670
- }, arguments) };
1671
- imports.wbg.__wbg_new_e17d9f43105b08be = function() {
1672
- const ret = new Array();
1673
- return ret;
1674
- };
1675
- imports.wbg.__wbg_new_from_slice_92f4d78ca282a2d2 = function(arg0, arg1) {
1658
+ imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1676
1659
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1677
1660
  return ret;
1678
1661
  };
1679
- imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
1662
+ imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1680
1663
  const ret = new Function(getStringFromWasm0(arg0, arg1));
1681
1664
  return ret;
1682
1665
  };
@@ -1684,7 +1667,7 @@ function __wbg_get_imports() {
1684
1667
  const ret = arg0.now();
1685
1668
  return ret;
1686
1669
  };
1687
- imports.wbg.__wbg_now_793306c526e2e3b6 = function() {
1670
+ imports.wbg.__wbg_now_69d776cd24f5215b = function() {
1688
1671
  const ret = Date.now();
1689
1672
  return ret;
1690
1673
  };
@@ -1692,42 +1675,42 @@ function __wbg_get_imports() {
1692
1675
  const ret = arg0.performance;
1693
1676
  return ret;
1694
1677
  };
1695
- imports.wbg.__wbg_port1_d9822fb6881d8cfe = function(arg0) {
1678
+ imports.wbg.__wbg_port1_75dce9d0d8087125 = function(arg0) {
1696
1679
  const ret = arg0.port1;
1697
1680
  return ret;
1698
1681
  };
1699
- imports.wbg.__wbg_port2_bd4cbea5c475915f = function(arg0) {
1682
+ imports.wbg.__wbg_port2_3cffa4119380f41d = function(arg0) {
1700
1683
  const ret = arg0.port2;
1701
1684
  return ret;
1702
1685
  };
1703
- imports.wbg.__wbg_postMessage_2e1248c7fe808340 = function() { return handleError(function (arg0, arg1) {
1686
+ imports.wbg.__wbg_postMessage_79f844174f56304f = function() { return handleError(function (arg0, arg1) {
1704
1687
  arg0.postMessage(arg1);
1705
1688
  }, arguments) };
1706
- imports.wbg.__wbg_postMessage_cea6d6f3b452f8bc = function() { return handleError(function (arg0, arg1) {
1689
+ imports.wbg.__wbg_postMessage_ee7b4e76cd1ed685 = function() { return handleError(function (arg0, arg1) {
1707
1690
  arg0.postMessage(arg1);
1708
1691
  }, arguments) };
1709
- imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
1692
+ imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1710
1693
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1711
1694
  };
1712
- imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
1695
+ imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
1713
1696
  const ret = arg0.push(arg1);
1714
1697
  return ret;
1715
1698
  };
1716
- imports.wbg.__wbg_queueMicrotask_34d692c25c47d05b = function(arg0) {
1699
+ imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1717
1700
  const ret = arg0.queueMicrotask;
1718
1701
  return ret;
1719
1702
  };
1720
- imports.wbg.__wbg_queueMicrotask_9d76cacb20c84d58 = function(arg0) {
1703
+ imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1721
1704
  queueMicrotask(arg0);
1722
1705
  };
1723
- imports.wbg.__wbg_resolve_caf97c30b83f7053 = function(arg0) {
1706
+ imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1724
1707
  const ret = Promise.resolve(arg0);
1725
1708
  return ret;
1726
1709
  };
1727
- imports.wbg.__wbg_send_3d2cf376613294f0 = function() { return handleError(function (arg0, arg1, arg2) {
1710
+ imports.wbg.__wbg_send_ea59e150ab5ebe08 = function() { return handleError(function (arg0, arg1, arg2) {
1728
1711
  arg0.send(getArrayU8FromWasm0(arg1, arg2));
1729
1712
  }, arguments) };
1730
- imports.wbg.__wbg_setTimeout_780ac15e3df4c663 = function() { return handleError(function (arg0, arg1, arg2) {
1713
+ imports.wbg.__wbg_setTimeout_06477c23d31efef1 = function() { return handleError(function (arg0, arg1, arg2) {
1731
1714
  const ret = arg0.setTimeout(arg1, arg2);
1732
1715
  return ret;
1733
1716
  }, arguments) };
@@ -1735,25 +1718,25 @@ function __wbg_get_imports() {
1735
1718
  const ret = setTimeout(arg0, arg1);
1736
1719
  return ret;
1737
1720
  }, arguments) };
1738
- imports.wbg.__wbg_set_binaryType_9d839cea8fcdc5c3 = function(arg0, arg1) {
1721
+ imports.wbg.__wbg_set_binaryType_73e8c75df97825f8 = function(arg0, arg1) {
1739
1722
  arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
1740
1723
  };
1741
- imports.wbg.__wbg_set_onclose_c09e4f7422de8dae = function(arg0, arg1) {
1724
+ imports.wbg.__wbg_set_onclose_032729b3d7ed7a9e = function(arg0, arg1) {
1742
1725
  arg0.onclose = arg1;
1743
1726
  };
1744
- imports.wbg.__wbg_set_onerror_337a3a2db9517378 = function(arg0, arg1) {
1727
+ imports.wbg.__wbg_set_onerror_7819daa6af176ddb = function(arg0, arg1) {
1745
1728
  arg0.onerror = arg1;
1746
1729
  };
1747
- imports.wbg.__wbg_set_onmessage_8661558551a89792 = function(arg0, arg1) {
1730
+ imports.wbg.__wbg_set_onmessage_6fa00f5d8f1c055a = function(arg0, arg1) {
1748
1731
  arg0.onmessage = arg1;
1749
1732
  };
1750
- imports.wbg.__wbg_set_onmessage_86d8d65dbed3a751 = function(arg0, arg1) {
1733
+ imports.wbg.__wbg_set_onmessage_71321d0bed69856c = function(arg0, arg1) {
1751
1734
  arg0.onmessage = arg1;
1752
1735
  };
1753
- imports.wbg.__wbg_set_onmessage_ac099d3d55b27116 = function(arg0, arg1) {
1736
+ imports.wbg.__wbg_set_onmessage_f0d5bf805190d1d8 = function(arg0, arg1) {
1754
1737
  arg0.onmessage = arg1;
1755
1738
  };
1756
- imports.wbg.__wbg_set_onopen_efccb9305427b907 = function(arg0, arg1) {
1739
+ imports.wbg.__wbg_set_onopen_6d4abedb27ba5656 = function(arg0, arg1) {
1757
1740
  arg0.onopen = arg1;
1758
1741
  };
1759
1742
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
@@ -1763,34 +1746,34 @@ function __wbg_get_imports() {
1763
1746
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1764
1747
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1765
1748
  };
1766
- imports.wbg.__wbg_start_90678d64025085fc = function(arg0) {
1749
+ imports.wbg.__wbg_start_dd05b3be5674e9f3 = function(arg0) {
1767
1750
  arg0.start();
1768
1751
  };
1769
- imports.wbg.__wbg_static_accessor_GLOBAL_89e1d9ac6a1b250e = function() {
1752
+ imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
1770
1753
  const ret = typeof global === 'undefined' ? null : global;
1771
1754
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1772
1755
  };
1773
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac = function() {
1756
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
1774
1757
  const ret = typeof globalThis === 'undefined' ? null : globalThis;
1775
1758
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1776
1759
  };
1777
- imports.wbg.__wbg_static_accessor_SELF_6fdf4b64710cc91b = function() {
1760
+ imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1778
1761
  const ret = typeof self === 'undefined' ? null : self;
1779
1762
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1780
1763
  };
1781
- imports.wbg.__wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2 = function() {
1764
+ imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1782
1765
  const ret = typeof window === 'undefined' ? null : window;
1783
1766
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1784
1767
  };
1785
- imports.wbg.__wbg_then_4f46f6544e6b4a28 = function(arg0, arg1) {
1786
- const ret = arg0.then(arg1);
1768
+ imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1769
+ const ret = arg0.then(arg1, arg2);
1787
1770
  return ret;
1788
1771
  };
1789
- imports.wbg.__wbg_then_70d05cf780a18d77 = function(arg0, arg1, arg2) {
1790
- const ret = arg0.then(arg1, arg2);
1772
+ imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1773
+ const ret = arg0.then(arg1);
1791
1774
  return ret;
1792
1775
  };
1793
- imports.wbg.__wbg_warn_1d74dddbe2fd1dbb = function(arg0) {
1776
+ imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
1794
1777
  console.warn(arg0);
1795
1778
  };
1796
1779
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
@@ -1798,24 +1781,24 @@ function __wbg_get_imports() {
1798
1781
  const ret = getStringFromWasm0(arg0, arg1);
1799
1782
  return ret;
1800
1783
  };
1801
- imports.wbg.__wbindgen_cast_363ab6ba52868a22 = function(arg0, arg1) {
1802
- // Cast intrinsic for `Closure(Closure { dtor_idx: 256, function: Function { arguments: [Externref], shim_idx: 257, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1803
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2a5cb8478cd1adb0, wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0);
1784
+ imports.wbg.__wbindgen_cast_7c91697a8c7f6a55 = function(arg0, arg1) {
1785
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 268, function: Function { arguments: [Externref], shim_idx: 269, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1786
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h60ca8c1f3f61ef16, wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4);
1804
1787
  return ret;
1805
1788
  };
1806
1789
  imports.wbg.__wbindgen_cast_841ad4dc62ebec90 = function(arg0, arg1) {
1807
1790
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1808
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0abe416ead11a3f0, wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333);
1791
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8e3161c754fbc99b, wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd);
1809
1792
  return ret;
1810
1793
  };
1811
1794
  imports.wbg.__wbindgen_cast_9a4d11962b71bb1d = function(arg0, arg1) {
1812
1795
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1813
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0abe416ead11a3f0, wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333);
1796
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8e3161c754fbc99b, wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd);
1814
1797
  return ret;
1815
1798
  };
1816
- imports.wbg.__wbindgen_cast_b695ade0c3644c70 = function(arg0, arg1) {
1817
- // Cast intrinsic for `Closure(Closure { dtor_idx: 245, function: Function { arguments: [], shim_idx: 246, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1818
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he3a6d52737a61d69, wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed);
1799
+ imports.wbg.__wbindgen_cast_b03fa23b55c812ea = function(arg0, arg1) {
1800
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 257, function: Function { arguments: [], shim_idx: 258, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1801
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h41d50b86eff9c0fb, wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368);
1819
1802
  return ret;
1820
1803
  };
1821
1804
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
@@ -1825,7 +1808,7 @@ function __wbg_get_imports() {
1825
1808
  };
1826
1809
  imports.wbg.__wbindgen_cast_eee2c0f90882ae61 = function(arg0, arg1) {
1827
1810
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1828
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0abe416ead11a3f0, wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333);
1811
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8e3161c754fbc99b, wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd);
1829
1812
  return ret;
1830
1813
  };
1831
1814
  imports.wbg.__wbindgen_init_externref_table = function() {
@@ -1836,7 +1819,6 @@ function __wbg_get_imports() {
1836
1819
  table.set(offset + 1, null);
1837
1820
  table.set(offset + 2, true);
1838
1821
  table.set(offset + 3, false);
1839
- ;
1840
1822
  };
1841
1823
 
1842
1824
  return imports;
@@ -1866,13 +1848,10 @@ function initSync(module) {
1866
1848
  }
1867
1849
 
1868
1850
  const imports = __wbg_get_imports();
1869
-
1870
1851
  if (!(module instanceof WebAssembly.Module)) {
1871
1852
  module = new WebAssembly.Module(module);
1872
1853
  }
1873
-
1874
1854
  const instance = new WebAssembly.Instance(module, imports);
1875
-
1876
1855
  return __wbg_finalize_init(instance, module);
1877
1856
  }
1878
1857
 
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "fabriciobracht <fabricio@bracht.dev>"
6
6
  ],
7
7
  "description": "MQTT v5.0 WebAssembly client and broker for browser environments",
8
- "version": "0.2.0",
8
+ "version": "0.2.3",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",