openrtc 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ITransport-CjxCQ6q7.d.ts → Connection-DZ5eP5hL.d.ts} +445 -94
- package/dist/DelegatingRuntimeAdapter-4cgiIWMN.d.ts +150 -0
- package/dist/IpcRuntimeAdapter-Dduaxscj.d.ts +80 -0
- package/dist/WasmBridge-3W2HHADU.js +1 -0
- package/dist/{assembly-Bmi65-tK.d.ts → assembly-By3UBQsE.d.ts} +36 -19
- package/dist/{capabilities-BPuynml5.d.ts → capabilities-B2mHv_H7.d.ts} +2 -6
- package/dist/chunk-2GX6GB6L.js +1 -0
- package/dist/chunk-2LATKLCC.js +118 -0
- package/dist/{chunk-KRJECX7X.js → chunk-5XOLKH66.js} +1 -1
- package/dist/chunk-6OFAKLDB.js +2 -0
- package/dist/chunk-72NEEJQG.js +1 -0
- package/dist/chunk-BCGCJGIV.js +2 -0
- package/dist/chunk-GNW63SM6.js +2 -0
- package/dist/chunk-JPBW67B3.js +1 -0
- package/dist/chunk-MI3ZMVPK.js +2 -0
- package/dist/chunk-OT7IPLZE.js +1 -0
- package/dist/chunk-OWKAJPOI.js +1 -0
- package/dist/chunk-P2SHJMS3.js +1 -0
- package/dist/chunk-TYZS5LXQ.js +2 -0
- package/dist/chunk-WB66633N.js +1 -0
- package/dist/chunk-XEHBTMJQ.js +1 -0
- package/dist/chunk-YYI6AY6W.js +2 -0
- package/dist/{controlPlane-KVFZ7BR5.js → controlPlane-7E6KGQPP.js} +1 -1
- package/dist/coreClient.d.ts +3 -4
- package/dist/coreClient.js +1 -1
- package/dist/{deviceEnrollment-VACC64CQ.js → deviceEnrollment-CBJYXZ43.js} +2 -2
- package/dist/index.d.ts +6 -7
- package/dist/index.js +1 -1
- package/dist/{ipc-CPnNwv6f.d.ts → ipc-DgzKqHH3.d.ts} +3 -0
- package/dist/ipcFactory-4PCGKZIN.js +1 -0
- package/dist/native.d.ts +21 -0
- package/dist/native.js +1 -0
- package/dist/openrtc-5HAYVDHT.js +2 -0
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/protocol-BSBjMb7p.d.ts +6 -0
- package/dist/runtime/WasmRuntimeAdapter.d.ts +4 -5
- package/dist/runtime/WasmRuntimeAdapter.js +1 -1
- package/dist/runtime/device-status.d.ts +1 -2
- package/dist/runtime/factories.d.ts +283 -8
- package/dist/runtime/factories.js +1 -1
- package/dist/runtime/index.d.ts +13 -160
- package/dist/runtime/index.js +1 -1
- package/dist/testing/native.d.ts +11 -0
- package/dist/testing/native.js +1 -0
- package/dist/testing.d.ts +13 -19
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +7 -18
- package/dist/transport/index.js +1 -1
- package/dist/{types--jQzenZR.d.ts → types-BArEthJr.d.ts} +178 -10
- package/package.json +11 -2
- package/dist/DelegatingRuntimeAdapter-DE4LTGAJ.d.ts +0 -399
- package/dist/IpcRuntimeAdapter-CE0va9Tr.d.ts +0 -19
- package/dist/WasmBridge-75F6GKHG.js +0 -1
- package/dist/chunk-2L6ULC32.js +0 -1
- package/dist/chunk-2SUSPEC4.js +0 -1
- package/dist/chunk-7BJKDBLP.js +0 -2
- package/dist/chunk-DUY34MGT.js +0 -1
- package/dist/chunk-HEAJ7ZUR.js +0 -1
- package/dist/chunk-HUG5AX7R.js +0 -1
- package/dist/chunk-Q6KXVTSH.js +0 -2
- package/dist/chunk-R35AWMNY.js +0 -1
- package/dist/chunk-UILOGUOU.js +0 -1
- package/dist/chunk-WA434EWD.js +0 -2
- package/dist/chunk-XAL4T6TB.js +0 -3
- package/dist/chunk-Z2IS6NH2.js +0 -2
- package/dist/ipcFactory-32R47AVK.js +0 -1
- package/dist/openrtc-MWLNTJI7.js +0 -2
- package/dist/types-DDhMQkK8.d.ts +0 -621
package/dist/native.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { O as Options, C as Client } from './types-BArEthJr.js';
|
|
2
|
+
export { A as AccessMode, a as AttestationProvider, b as AuthProvider, c as Avenue, B as BotVerificationProvider, d as Channel, e as Channels, f as Connection, D as Delivery, g as DeviceOptions, h as DeviceProfile, i as Devices, E as EnrolledDevice, I as IncomingPeerBidirectionalStream, j as IncomingPeerUnidirectionalStream, M as MediaConnection, k as MediaIncomingDemuxStats, l as MediaKind, m as MediaLatencySummary, n as MediaReceiver, o as MediaReceiverStats, p as MediaSender, q as MediaSenderStats, r as MediaStats, s as MediaTrackEvent, t as MediaTrackOptions, P as PeerBidirectionalStream, u as PeerDatagramDuplexStream, v as PeerDatagramStats, w as PeerStreamOptions, x as PeerStreamTransport, R as Room, y as RoomOptions, S as Space, z as SpaceOptions, F as State, T as Ticket, G as TicketOptions, H as Transports, U as Usage, J as UsageUpdate, K as UsageWarning } from './types-BArEthJr.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from './ipc-DgzKqHH3.js';
|
|
4
|
+
import './coreClient.js';
|
|
5
|
+
import './assembly-By3UBQsE.js';
|
|
6
|
+
import './Connection-DZ5eP5hL.js';
|
|
7
|
+
import './capabilities-B2mHv_H7.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Native-only OpenRTC entrypoint for Tauri and other IPC-backed frontends.
|
|
11
|
+
*
|
|
12
|
+
* Owner: the native Rust Client exposed through openrtc-tauri-plugin.
|
|
13
|
+
* Consumers: native frontend shells that must not ship or initialize WASM.
|
|
14
|
+
* Introduced: 2026-08-26.
|
|
15
|
+
*
|
|
16
|
+
* Import this as `OpenRTC` from `openrtc/native`. Keeping the browser factory
|
|
17
|
+
* out of this module lets bundlers omit the WASM loader and binary entirely.
|
|
18
|
+
*/
|
|
19
|
+
declare function OpenRTC(options: Options, bridge?: PlutoIpcBridge): Client;
|
|
20
|
+
|
|
21
|
+
export { Client, OpenRTC, Options };
|
package/dist/native.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-BOS554IK.js';import'./chunk-4MLJXEVV.js';import {b}from'./chunk-2LATKLCC.js';import'./chunk-ZA44REGI.js';import {a}from'./chunk-P2SHJMS3.js';import {d}from'./chunk-72NEEJQG.js';import'./chunk-WB66633N.js';import'./chunk-JPBW67B3.js';import'./chunk-2GX6GB6L.js';function s(p,e=d()){let r=new a;return b(p,{platform:"native",close:()=>r.close(),deviceKeyProvider:a$1(e),deviceIdProvider:async()=>{let t=await e.invoke("get_rtc_local_device_info");return String(t?.deviceId??"")},runtimeFactory:async t=>{let{createIpcClient:a}=await import('./ipcFactory-4PCGKZIN.js');return a(t,e,r)}})}export{s as OpenRTC};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var j=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,$.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,$.unregister(this),t}free(){let t=this.__destroy_into_raw();e.__wbg_bistream_free(t,0);}get applicationCryptoWrapped(){return e.bistream_applicationCryptoWrapped(this.__wbg_ptr)!==0}cancelSend(){let t=e.bistream_cancelSend(this.__wbg_ptr);return p(t)}get endpoint_id(){let t,n;try{let o=e.__wbindgen_add_to_stack_pointer(-16);e.bistream_endpoint_id(o,this.__wbg_ptr);var _=d().getInt32(o+0,!0),r=d().getInt32(o+4,!0);return t=_,n=r,k(_,r)}finally{e.__wbindgen_add_to_stack_pointer(16),e.__wbindgen_export4(t,n,1);}}finishSend(){let t=e.bistream_finishSend(this.__wbg_ptr);return p(t)}get recv(){let t=e.bistream_recv(this.__wbg_ptr);return p(t)}get send(){let t=e.bistream_send(this.__wbg_ptr);return p(t)}};Symbol.dispose&&(j.prototype[Symbol.dispose]=j.prototype.free);var U=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Rt.unregister(this),t}free(){let t=this.__destroy_into_raw();e.__wbg_intounderlyingbytesource_free(t,0);}get autoAllocateChunkSize(){return e.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr)>>>0}cancel(){let t=this.__destroy_into_raw();e.intounderlyingbytesource_cancel(t);}pull(t){let n=e.intounderlyingbytesource_pull(this.__wbg_ptr,w(t));return p(n)}start(t){e.intounderlyingbytesource_start(this.__wbg_ptr,w(t));}get type(){let t=e.intounderlyingbytesource_type(this.__wbg_ptr);return ht[t]}};Symbol.dispose&&(U.prototype[Symbol.dispose]=U.prototype.free);var q=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,K.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,K.unregister(this),t}free(){let t=this.__destroy_into_raw();e.__wbg_intounderlyingsink_free(t,0);}abort(t){let n=this.__destroy_into_raw(),_=e.intounderlyingsink_abort(n,w(t));return p(_)}close(){let t=this.__destroy_into_raw(),n=e.intounderlyingsink_close(t);return p(n)}write(t){let n=e.intounderlyingsink_write(this.__wbg_ptr,w(t));return p(n)}};Symbol.dispose&&(q.prototype[Symbol.dispose]=q.prototype.free);var B=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,J.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,J.unregister(this),t}free(){let t=this.__destroy_into_raw();e.__wbg_intounderlyingsource_free(t,0);}cancel(){let t=this.__destroy_into_raw();e.intounderlyingsource_cancel(t);}pull(t){let n=e.intounderlyingsource_pull(this.__wbg_ptr,w(t));return p(n)}};Symbol.dispose&&(B.prototype[Symbol.dispose]=B.prototype.free);var z=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,Y.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),t}free(){let t=this.__destroy_into_raw();e.__wbg_peerunistream_free(t,0);}get applicationCryptoWrapped(){return e.peerunistream_applicationCryptoWrapped(this.__wbg_ptr)!==0}cancelSend(){let t=e.peerunistream_cancelSend(this.__wbg_ptr);return p(t)}finishSend(){let t=e.peerunistream_finishSend(this.__wbg_ptr);return p(t)}get writable(){let t=e.peerunistream_writable(this.__wbg_ptr);return p(t)}};Symbol.dispose&&(z.prototype[Symbol.dispose]=z.prototype.free);var G=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),t}free(){let t=this.__destroy_into_raw();e.__wbg_wasmclient_free(t,0);}__acknowledgePersistentIrohOutbox(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient___acknowledgePersistentIrohOutbox(this.__wbg_ptr,n,_);return p(r)}__advancePreferredIrohCarrier(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,m=e.wasmclient___advancePreferredIrohCarrier(this.__wbg_ptr,r,o,s,g,u,l);return p(m)}__applyIrohCarrierPolicy(){let t=e.wasmclient___applyIrohCarrierPolicy(this.__wbg_ptr);return p(t)}__attachMoqCarrier(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=c(r,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=e.wasmclient___attachMoqCarrier(this.__wbg_ptr,o,s,g,u,w(_),l,m);return p(x)}__attachWebRtcCarrier(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=c(r,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=e.wasmclient___attachWebRtcCarrier(this.__wbg_ptr,o,s,g,u,w(_),l,m);return p(x)}__beginMoqCarrier(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient___beginMoqCarrier(this.__wbg_ptr,_,r,o,s);return p(g)}__beginOpenRtcMediaPublication(t,n,_,r,o,s,g){try{let I=e.__wbindgen_add_to_stack_pointer(-16);var u=f(t)?0:c(t,e.__wbindgen_export,e.__wbindgen_export2),l=i;let R=c(n,e.__wbindgen_export,e.__wbindgen_export2),A=i,P=c(_,e.__wbindgen_export,e.__wbindgen_export2),O=i;e.wasmclient___beginOpenRtcMediaPublication(I,this.__wbg_ptr,u,l,R,A,P,O,r,f(o)?Number.MAX_SAFE_INTEGER:o>>>0,f(s)?Number.MAX_SAFE_INTEGER:s>>>0,f(g)?16777215:g);var m=d().getInt32(I+0,!0),x=d().getInt32(I+4,!0),h=d().getInt32(I+8,!0);if(h)throw p(x);return p(m)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__beginPreferredIrohCarrier(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=e.wasmclient___beginPreferredIrohCarrier(this.__wbg_ptr,o,s,g,u,_,r);return p(l)}__beginWebRtcCarrier(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient___beginWebRtcCarrier(this.__wbg_ptr,_,r,o,s);return p(g)}__configureIrohRoutePolicy(t,n,_){var r=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),o=i;let s=e.wasmclient___configureIrohRoutePolicy(this.__wbg_ptr,t,r,o,w(_));return p(s)}__configureMoqCarrier(t,n){var _=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),r=i;let o=e.wasmclient___configureMoqCarrier(this.__wbg_ptr,t,_,r);return p(o)}__configureWebRtcCarrier(t,n){let _=e.wasmclient___configureWebRtcCarrier(this.__wbg_ptr,t,n);return p(_)}__createPersistentIrohNamespace(t,n){let _=e.wasmclient___createPersistentIrohNamespace(this.__wbg_ptr,t,n);return p(_)}__decodeOpenRtcMediaChunk(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=v(t,e.__wbindgen_export),g=i;e.wasmclient___decodeOpenRtcMediaChunk(o,this.__wbg_ptr,s,g);var n=d().getInt32(o+0,!0),_=d().getInt32(o+4,!0),r=d().getInt32(o+8,!0);if(r)throw p(_);return p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__decodeOpenRtcMediaControl(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=v(t,e.__wbindgen_export),g=i;e.wasmclient___decodeOpenRtcMediaControl(o,this.__wbg_ptr,s,g);var n=d().getInt32(o+0,!0),_=d().getInt32(o+4,!0),r=d().getInt32(o+8,!0);if(r)throw p(_);return p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__deletePersistentIrohPrefix(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=v(n,e.__wbindgen_export),s=i,g=e.wasmclient___deletePersistentIrohPrefix(this.__wbg_ptr,_,r,o,s);return p(g)}__encodeOpenRtcMediaSample(t,n,_,r,o,s){try{let h=e.__wbindgen_add_to_stack_pointer(-16),I=c(t,e.__wbindgen_export,e.__wbindgen_export2),R=i,A=v(s,e.__wbindgen_export),P=i;e.wasmclient___encodeOpenRtcMediaSample(h,this.__wbg_ptr,I,R,n,_,r,o,A,P);var g=d().getInt32(h+0,!0),u=d().getInt32(h+4,!0),l=d().getInt32(h+8,!0),m=d().getInt32(h+12,!0);if(m)throw p(l);var x=C(g,u).slice();return e.__wbindgen_export4(g,u*1,1),x}finally{e.__wbindgen_add_to_stack_pointer(16);}}__flushPersistentIrohProtocols(){let t=e.wasmclient___flushPersistentIrohProtocols(this.__wbg_ptr);return p(t)}__forgetIrohCarrierPeer(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient___forgetIrohCarrierPeer(this.__wbg_ptr,n,_);return p(r)}__getIrohCarrierReadiness(){let t=e.wasmclient___getIrohCarrierReadiness(this.__wbg_ptr);return p(t)}__handleIrohCarrierControl(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=e.wasmclient___handleIrohCarrierControl(this.__wbg_ptr,r,o,s,g,w(_));return p(u)}__hydratePersistentIrohBlob(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient___hydratePersistentIrohBlob(this.__wbg_ptr,n,_);return p(r)}__importPersistentIrohAuthor(t){let n=v(t,e.__wbindgen_export),_=i,r=e.wasmclient___importPersistentIrohAuthor(this.__wbg_ptr,n,_);return p(r)}__importPersistentIrohNamespace(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=v(n,e.__wbindgen_export),u=i,l=e.wasmclient___importPersistentIrohNamespace(this.__wbg_ptr,o,s,g,u,_,r);return p(l)}__importPersistentIrohTicket(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=e.wasmclient___importPersistentIrohTicket(this.__wbg_ptr,r,o,n,_);return p(s)}__initPersistentIrohProtocols(t){let n=e.wasmclient___initPersistentIrohProtocols(this.__wbg_ptr,w(t));return p(n)}__moqCarrierFailed(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,m=e.wasmclient___moqCarrierFailed(this.__wbg_ptr,r,o,s,g,u,l);return p(m)}__moqCarrierPrepared(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient___moqCarrierPrepared(this.__wbg_ptr,_,r,o,s);return p(g)}__pauseOpenRtcMediaPublication(t){try{let r=e.__wbindgen_add_to_stack_pointer(-16),o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i;e.wasmclient___pauseOpenRtcMediaPublication(r,this.__wbg_ptr,o,s);var n=d().getInt32(r+0,!0),_=d().getInt32(r+4,!0);if(_)throw p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__putPersistentIrohBytes(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=v(n,e.__wbindgen_export),g=i,u=v(_,e.__wbindgen_export),l=i,m=e.wasmclient___putPersistentIrohBytes(this.__wbg_ptr,r,o,s,g,u,l);return p(m)}__queryPersistentIrohNamespace(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=v(n,e.__wbindgen_export),s=i,g=e.wasmclient___queryPersistentIrohNamespace(this.__wbg_ptr,_,r,o,s);return p(g)}__reconcileIrohCarriersAfterNetworkChange(){let t=e.wasmclient___reconcileIrohCarriersAfterNetworkChange(this.__wbg_ptr);return p(t)}__reconcilePersistentIrohProtocols(){let t=e.wasmclient___reconcilePersistentIrohProtocols(this.__wbg_ptr);return p(t)}__removePersistentIrohNamespace(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=e.wasmclient___removePersistentIrohNamespace(this.__wbg_ptr,r,o,n,_);return p(s)}__retireIrohCarrierPeer(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;var o=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let g=e.wasmclient___retireIrohCarrierPeer(this.__wbg_ptr,_,r,o,s);return p(g)}__retireMoqCarrier(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;var o=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let g=e.wasmclient___retireMoqCarrier(this.__wbg_ptr,_,r,o,s);return p(g)}__retireOpenRtcMediaPublication(t){try{let r=e.__wbindgen_add_to_stack_pointer(-16),o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i;e.wasmclient___retireOpenRtcMediaPublication(r,this.__wbg_ptr,o,s);var n=d().getInt32(r+0,!0),_=d().getInt32(r+4,!0);if(_)throw p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__retireOpenRtcMediaReceiver(t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),g=i;e.wasmclient___retireOpenRtcMediaReceiver(o,this.__wbg_ptr,s,g,n);var _=d().getInt32(o+0,!0),r=d().getInt32(o+4,!0);if(r)throw p(_)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__retireWebRtcCarrier(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;var o=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let g=e.wasmclient___retireWebRtcCarrier(this.__wbg_ptr,_,r,o,s);return p(g)}__setIrohCarrierActionHandler(t){e.wasmclient___setIrohCarrierActionHandler(this.__wbg_ptr,f(t)?0:w(t));}__setPersistentIrohHash(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=v(n,e.__wbindgen_export),u=i,l=c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=e.wasmclient___setPersistentIrohHash(this.__wbg_ptr,o,s,g,u,l,m,r);return p(x)}__sharePersistentIrohNamespace(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient___sharePersistentIrohNamespace(this.__wbg_ptr,_,r,n);return p(o)}__shutdownPersistentIrohProtocols(){let t=e.wasmclient___shutdownPersistentIrohProtocols(this.__wbg_ptr);return p(t)}__webRtcCarrierFailed(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,m=e.wasmclient___webRtcCarrierFailed(this.__wbg_ptr,r,o,s,g,u,l);return p(m)}__webRtcCarrierPrepared(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient___webRtcCarrierPrepared(this.__wbg_ptr,_,r,o,s);return p(g)}add_peer_scope(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_add_peer_scope(this.__wbg_ptr,_,r,o,s);return p(g)}bind_connection_device_id(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_bind_connection_device_id(this.__wbg_ptr,_,r,o,s);return p(g)}bind_node_device_id(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_bind_node_device_id(this.__wbg_ptr,_,r,o,s);return p(g)}clearConnectionApplicationCryptoKey(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i;e.wasmclient_clearConnectionApplicationCryptoKey(this.__wbg_ptr,n,_);}clearIdentityCredential(){e.wasmclient_clearIdentityCredential(this.__wbg_ptr);}clear_session_tokens(){e.wasmclient_clear_session_tokens(this.__wbg_ptr);}confirm_reciprocal_admission(t,n,_,r,o,s){let g=c(t,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;var I=f(s)?0:c(s,e.__wbindgen_export,e.__wbindgen_export2),R=i;let A=e.wasmclient_confirm_reciprocal_admission(this.__wbg_ptr,g,u,n,l,m,x,h,o,I,R);return p(A)}connect_device(t,n){var _=f(t)?0:c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;let o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_connect_device(this.__wbg_ptr,_,r,o,s);return p(g)}connectionApplicationCryptoReady(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i;return e.wasmclient_connectionApplicationCryptoReady(this.__wbg_ptr,n,_)!==0}connection_state(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_connection_state(this.__wbg_ptr,n,_);return p(r)}connection_states(){let t=e.wasmclient_connection_states(this.__wbg_ptr);return p(t)}createPeerDatagramPolicy(){let t=e.wasmclient_createPeerDatagramPolicy(this.__wbg_ptr);return D.__wrap(t)}create_room(t,n,_,r,o,s){let g=c(t,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=c(n,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=c(_,e.__wbindgen_export,e.__wbindgen_export2),h=i,I=c(r,e.__wbindgen_export,e.__wbindgen_export2),R=i,A=c(o,e.__wbindgen_export,e.__wbindgen_export2),P=i,O=e.wasmclient_create_room(this.__wbg_ptr,g,u,l,m,x,h,I,R,A,P,f(s)?Number.MAX_SAFE_INTEGER:s>>>0);return p(O)}create_session(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_create_session(this.__wbg_ptr,n,_);return p(r)}decodeIncomingChannelEnvelope(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=v(t,e.__wbindgen_export),g=i;e.wasmclient_decodeIncomingChannelEnvelope(o,this.__wbg_ptr,s,g);var n=d().getInt32(o+0,!0),_=d().getInt32(o+4,!0),r=d().getInt32(o+8,!0);if(r)throw p(_);return p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}delete_device(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_delete_device(this.__wbg_ptr,_,r,o,s);return p(g)}devices_with_status(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_devices_with_status(this.__wbg_ptr,n,_);return p(r)}disconnect(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_disconnect(this.__wbg_ptr,n,_);return p(r)}disconnect_device(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;var o=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let g=e.wasmclient_disconnect_device(this.__wbg_ptr,_,r,o,s);return p(g)}disconnect_transient(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_disconnect_transient(this.__wbg_ptr,n,_);return p(r)}endpoint_id_from_ticket(t){let n,_;try{let m=e.__wbindgen_add_to_stack_pointer(-16),x=c(t,e.__wbindgen_export,e.__wbindgen_export2),h=i;e.wasmclient_endpoint_id_from_ticket(m,this.__wbg_ptr,x,h);var r=d().getInt32(m+0,!0),o=d().getInt32(m+4,!0),s=d().getInt32(m+8,!0),g=d().getInt32(m+12,!0),u=r,l=o;if(g)throw u=0,l=0,p(s);return n=u,_=l,k(u,l)}finally{e.__wbindgen_add_to_stack_pointer(16),e.__wbindgen_export4(n,_,1);}}endpoint_ticket(){let t=e.wasmclient_endpoint_ticket(this.__wbg_ptr);return p(t)}endpoint_ticket_with_token(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_endpoint_ticket_with_token(this.__wbg_ptr,_,r,n);return p(o)}ensureConnectionApplicationCrypto(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=e.wasmclient_ensureConnectionApplicationCrypto(this.__wbg_ptr,o,s,g,u,_,w(r));return p(l)}force_reconnect_snapshot(){e.wasmclient_force_reconnect_snapshot(this.__wbg_ptr);}get_members(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,m=e.wasmclient_get_members(this.__wbg_ptr,r,o,s,g,u,l);return p(m)}handleConnectionApplicationCryptoHandshake(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i;var l=f(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i;let x=v(r,e.__wbindgen_export),h=i,I=e.wasmclient_handleConnectionApplicationCryptoHandshake(this.__wbg_ptr,o,s,g,u,l,m,x,h);return p(I)}incoming_streams(){let t=e.wasmclient_incoming_streams(this.__wbg_ptr);return p(t)}initIrohWithTestRelay(t,n){var _=f(t)?0:v(t,e.__wbindgen_export),r=i,o=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let g=e.wasmclient_initIrohWithTestRelay(this.__wbg_ptr,_,r,o,s);return p(g)}init_iroh(t){var n=f(t)?0:v(t,e.__wbindgen_export),_=i;let r=e.wasmclient_init_iroh(this.__wbg_ptr,n,_);return p(r)}inspectIncomingStreamPrefix(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),g=v(t,e.__wbindgen_export),u=i;e.wasmclient_inspectIncomingStreamPrefix(s,this.__wbg_ptr,g,u,n);var _=d().getInt32(s+0,!0),r=d().getInt32(s+4,!0),o=d().getInt32(s+8,!0);if(o)throw p(r);return p(_)}finally{e.__wbindgen_add_to_stack_pointer(16);}}iroh_path_kind(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_iroh_path_kind(this.__wbg_ptr,n,_);return p(r)}iroh_secret_key(){let t=e.wasmclient_iroh_secret_key(this.__wbg_ptr);return p(t)}iroh_transport_rtt_ms(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_iroh_transport_rtt_ms(this.__wbg_ptr,n,_);return p(r)}is_auto_connect_excluded(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i;return e.wasmclient_is_auto_connect_excluded(this.__wbg_ptr,n,_)!==0}is_connected(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_is_connected(this.__wbg_ptr,n,_);return p(r)}is_current_transport_stable_id(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_is_current_transport_stable_id(this.__wbg_ptr,_,r,n);return p(o)}is_remote_admitted(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_is_remote_admitted(this.__wbg_ptr,n,_);return p(r)}join_room(t,n,_,r,o){let s=c(t,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i,m=c(_,e.__wbindgen_export,e.__wbindgen_export2),x=i,h=c(r,e.__wbindgen_export,e.__wbindgen_export2),I=i,R=c(o,e.__wbindgen_export,e.__wbindgen_export2),A=i,P=e.wasmclient_join_room(this.__wbg_ptr,s,g,u,l,m,x,h,I,R,A);return p(P)}leave_room(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,m=e.wasmclient_leave_room(this.__wbg_ptr,r,o,s,g,u,l);return p(m)}list_managed_connections(){let t=e.wasmclient_list_managed_connections(this.__wbg_ptr);return p(t)}constructor(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),g=i;e.wasmclient_new(o,s,g);var n=d().getInt32(o+0,!0),_=d().getInt32(o+4,!0),r=d().getInt32(o+8,!0);if(r)throw p(_);return this.__wbg_ptr=n,Q.register(this,this.__wbg_ptr,this),this}finally{e.__wbindgen_add_to_stack_pointer(16);}}node_addr(){let t=e.wasmclient_node_addr(this.__wbg_ptr);return p(t)}openConnectionApplicationPayload(t,n,_){try{let l=e.__wbindgen_add_to_stack_pointer(-16),m=c(t,e.__wbindgen_export,e.__wbindgen_export2),x=i,h=v(_,e.__wbindgen_export),I=i;e.wasmclient_openConnectionApplicationPayload(l,this.__wbg_ptr,m,x,n,h,I);var r=d().getInt32(l+0,!0),o=d().getInt32(l+4,!0),s=d().getInt32(l+8,!0),g=d().getInt32(l+12,!0);if(g)throw p(s);var u=C(r,o).slice();return e.__wbindgen_export4(r,o*1,1),u}finally{e.__wbindgen_add_to_stack_pointer(16);}}open_bi(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_open_bi(this.__wbg_ptr,n,_);return p(r)}open_native_main_control_bi(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_open_native_main_control_bi(this.__wbg_ptr,n,_);return p(r)}open_peer_bi(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_open_peer_bi(this.__wbg_ptr,_,r,f(n)?Number.MAX_SAFE_INTEGER:n>>>0);return p(o)}open_peer_bi_explicit_file_sender(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_open_peer_bi_explicit_file_sender(this.__wbg_ptr,_,r,f(n)?Number.MAX_SAFE_INTEGER:n>>>0);return p(o)}open_peer_bi_transport_only(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_open_peer_bi_transport_only(this.__wbg_ptr,_,r,f(n)?Number.MAX_SAFE_INTEGER:n>>>0);return p(o)}open_peer_uni(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_open_peer_uni(this.__wbg_ptr,_,r,f(n)?Number.MAX_SAFE_INTEGER:n>>>0);return p(o)}open_uni(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_open_uni(this.__wbg_ptr,n,_);return p(r)}peerDatagramMaxSize(){return e.wasmclient_peerDatagramMaxSize(this.__wbg_ptr)>>>0}peer_scopes(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_peer_scopes(this.__wbg_ptr,n,_);return p(r)}peer_session(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_peer_session(this.__wbg_ptr,n,_);return p(r)}peer_sessions(){let t=e.wasmclient_peer_sessions(this.__wbg_ptr);return p(t)}peer_snapshot(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_peer_snapshot(this.__wbg_ptr,n,_);return p(r)}prepare_reciprocal_admission(t,n,_,r,o,s,g,u){let l=c(t,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=c(_,e.__wbindgen_export,e.__wbindgen_export2),h=i,I=c(r,e.__wbindgen_export,e.__wbindgen_export2),R=i,A=c(o,e.__wbindgen_export,e.__wbindgen_export2),P=i,O=c(s,e.__wbindgen_export,e.__wbindgen_export2),_t=i,rt=c(g,e.__wbindgen_export,e.__wbindgen_export2),ot=i,it=c(u,e.__wbindgen_export,e.__wbindgen_export2),st=i,ct=e.wasmclient_prepare_reciprocal_admission(this.__wbg_ptr,l,m,n,x,h,I,R,A,P,O,_t,rt,ot,it,st);return p(ct)}present_session_token(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i;var l=f(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=f(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;let I=e.wasmclient_present_session_token(this.__wbg_ptr,o,s,g,u,l,m,x,h);return p(I)}protectConnectionApplicationPayload(t,n,_){try{let l=e.__wbindgen_add_to_stack_pointer(-16),m=c(t,e.__wbindgen_export,e.__wbindgen_export2),x=i,h=v(_,e.__wbindgen_export),I=i;e.wasmclient_protectConnectionApplicationPayload(l,this.__wbg_ptr,m,x,n,h,I);var r=d().getInt32(l+0,!0),o=d().getInt32(l+4,!0),s=d().getInt32(l+8,!0),g=d().getInt32(l+12,!0);if(g)throw p(s);var u=C(r,o).slice();return e.__wbindgen_export4(r,o*1,1),u}finally{e.__wbindgen_add_to_stack_pointer(16);}}rankRoutes(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),g=tt(t,e.__wbindgen_export),u=i,l=tt(n,e.__wbindgen_export),m=i;e.wasmclient_rankRoutes(s,this.__wbg_ptr,g,u,l,m);var _=d().getInt32(s+0,!0),r=d().getInt32(s+4,!0),o=At(_,r).slice();return e.__wbindgen_export4(_,r*4,4),o}finally{e.__wbindgen_add_to_stack_pointer(16);}}receivePeerDatagram(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_receivePeerDatagram(this.__wbg_ptr,n,_);return p(r)}register_session_token(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i;e.wasmclient_register_session_token(this.__wbg_ptr,r,o,s,g,_);}register_token_until(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i;e.wasmclient_register_token_until(this.__wbg_ptr,o,s,g,u,_,r);}reject_connection_admission(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_reject_connection_admission(this.__wbg_ptr,_,r,o,s);return p(g)}release_peer_scope(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;var o=f(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let g=e.wasmclient_release_peer_scope(this.__wbg_ptr,_,r,o,s);return p(g)}report_managed_connection_settled(t,n,_,r,o,s){let g=c(t,e.__wbindgen_export,e.__wbindgen_export2),u=i;var l=f(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i;let x=e.wasmclient_report_managed_connection_settled(this.__wbg_ptr,g,u,n,l,m,!f(r),f(r)?BigInt(0):r,!f(o),f(o)?BigInt(0):o,!f(s),f(s)?BigInt(0):s);return p(x)}report_transport_status(t,n,_,r,o,s){let g=c(t,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=c(n,e.__wbindgen_export,e.__wbindgen_export2),m=i;var x=f(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),h=i;let I=e.wasmclient_report_transport_status(this.__wbg_ptr,g,u,l,m,x,h,!f(r),f(r)?BigInt(0):r,!f(o),f(o)?BigInt(0):o,!f(s),f(s)?BigInt(0):s);return p(I)}resolve_peer_connection_records(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_resolve_peer_connection_records(this.__wbg_ptr,n,_);return p(r)}revoke_session_token(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),g=i;e.wasmclient_revoke_session_token(o,this.__wbg_ptr,s,g);var n=d().getInt32(o+0,!0),_=d().getInt32(o+4,!0),r=d().getInt32(o+8,!0);if(r)throw p(_);return p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}revoke_tokens_by_scope(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_revoke_tokens_by_scope(this.__wbg_ptr,n,_);return p(r)}runtime_policy(){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.wasmclient_runtime_policy(r,this.__wbg_ptr);var t=d().getInt32(r+0,!0),n=d().getInt32(r+4,!0),_=d().getInt32(r+8,!0);if(_)throw p(n);return p(t)}finally{e.__wbindgen_add_to_stack_pointer(16);}}same_peer(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_same_peer(this.__wbg_ptr,_,r,o,s);return p(g)}search_devices(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_search_devices(this.__wbg_ptr,n,_);return p(r)}sendPeerDatagram(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=v(n,e.__wbindgen_export),g=i,u=e.wasmclient_sendPeerDatagram(this.__wbg_ptr,r,o,s,g,f(_)?Number.MAX_SAFE_INTEGER:_>>>0);return p(u)}send_message(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i;var l=f(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i,x=f(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;let I=e.wasmclient_send_message(this.__wbg_ptr,o,s,g,u,l,m,x,h);return p(I)}send_native_main_control_frame(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=v(n,e.__wbindgen_export),s=i,g=e.wasmclient_send_native_main_control_frame(this.__wbg_ptr,_,r,o,s);return p(g)}send_peer(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=v(n,e.__wbindgen_export),s=i,g=e.wasmclient_send_peer(this.__wbg_ptr,_,r,o,s);return p(g)}send_peer_application_frame(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=v(n,e.__wbindgen_export),g=i,u=e.wasmclient_send_peer_application_frame(this.__wbg_ptr,r,o,s,g,f(_)?Number.MAX_SAFE_INTEGER:_>>>0);return p(u)}setConnectionApplicationCryptoKey(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=v(n,e.__wbindgen_export),s=i,g=e.wasmclient_setConnectionApplicationCryptoKey(this.__wbg_ptr,_,r,o,s);return p(g)}setConnectionApplicationCryptoRequired(t){try{let r=e.__wbindgen_add_to_stack_pointer(-16),o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i;e.wasmclient_setConnectionApplicationCryptoRequired(r,this.__wbg_ptr,o,s);var n=d().getInt32(r+0,!0),_=d().getInt32(r+4,!0);if(_)throw p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}setIdentityCredential(t){var n=f(t)?0:c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i;e.wasmclient_setIdentityCredential(this.__wbg_ptr,n,_);}setRelay(t){let n=e.wasmclient_setRelay(this.__wbg_ptr,t);return p(n)}set_auto_connect_excluded(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_set_auto_connect_excluded(this.__wbg_ptr,_,r,n);return p(o)}set_offline(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_set_offline(this.__wbg_ptr,n,_);return p(r)}start_auto_connect(t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i;e.wasmclient_start_auto_connect(o,this.__wbg_ptr,s,g,u,l);var _=d().getInt32(o+0,!0),r=d().getInt32(o+4,!0);if(r)throw p(_)}finally{e.__wbindgen_add_to_stack_pointer(16);}}start_presence_loop(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i,l=c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i;var x=f(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;e.wasmclient_start_presence_loop(this.__wbg_ptr,o,s,g,u,l,m,x,h);}stop_auth_scoped_activity(){e.wasmclient_stop_auth_scoped_activity(this.__wbg_ptr);}stop_auto_connect(){e.wasmclient_stop_auto_connect(this.__wbg_ptr);}stop_presence_loop(){e.wasmclient_stop_presence_loop(this.__wbg_ptr);}submit_browser_desired_peers(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),g=c(n,e.__wbindgen_export,e.__wbindgen_export2),u=i;e.wasmclient_submit_browser_desired_peers(s,this.__wbg_ptr,t,g,u);var _=d().getInt32(s+0,!0),r=d().getInt32(s+4,!0),o=d().getInt32(s+8,!0);if(o)throw p(r);return _!==0}finally{e.__wbindgen_add_to_stack_pointer(16);}}update_device(t,n,_,r,o){let s=c(t,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i;var m=f(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),x=i,h=f(o)?0:c(o,e.__wbindgen_export,e.__wbindgen_export2),I=i;let R=e.wasmclient_update_device(this.__wbg_ptr,s,g,u,l,m,x,f(r)?0:w(r),h,I);return p(R)}update_presence(t,n,_,r,o){let s=c(t,e.__wbindgen_export,e.__wbindgen_export2),g=i,u=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i,m=c(_,e.__wbindgen_export,e.__wbindgen_export2),x=i;var h=f(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),I=i;let R=e.wasmclient_update_presence(this.__wbg_ptr,s,g,u,l,m,x,h,I,!f(o),f(o)?BigInt(0):o);return p(R)}update_session(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,g=e.wasmclient_update_session(this.__wbg_ptr,_,r,o,s);return p(g)}validate_connection_token(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),g=i;var u=f(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i;let m=e.wasmclient_validate_connection_token(this.__wbg_ptr,r,o,s,g,u,l);return p(m)}validate_session_token(t){let n,_;try{let m=e.__wbindgen_add_to_stack_pointer(-16),x=c(t,e.__wbindgen_export,e.__wbindgen_export2),h=i;e.wasmclient_validate_session_token(m,this.__wbg_ptr,x,h);var r=d().getInt32(m+0,!0),o=d().getInt32(m+4,!0),s=d().getInt32(m+8,!0),g=d().getInt32(m+12,!0),u=r,l=o;if(g)throw u=0,l=0,p(s);return n=u,_=l,k(u,l)}finally{e.__wbindgen_add_to_stack_pointer(16),e.__wbindgen_export4(n,_,1);}}wait_for_peer(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_wait_for_peer(this.__wbg_ptr,_,r,f(n)?Number.MAX_SAFE_INTEGER:n>>>0);return p(o)}wake_browser_auto_connect(){return e.wasmclient_wake_browser_auto_connect(this.__wbg_ptr)!==0}};Symbol.dispose&&(G.prototype[Symbol.dispose]=G.prototype.free);var D=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,Z.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),t}free(){let t=this.__destroy_into_raw();e.__wbg_wasmpeerdatagrampolicy_free(t,0);}close(){e.wasmpeerdatagrampolicy_close(this.__wbg_ptr);}closeIncoming(){e.wasmpeerdatagrampolicy_closeIncoming(this.__wbg_ptr);}closeOutgoing(){e.wasmpeerdatagrampolicy_closeOutgoing(this.__wbg_ptr);}getStats(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16);e.wasmpeerdatagrampolicy_getStats(o,this.__wbg_ptr,t);var n=d().getInt32(o+0,!0),_=d().getInt32(o+4,!0),r=d().getInt32(o+8,!0);if(r)throw p(_);return p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}popIncoming(t){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.wasmpeerdatagrampolicy_popIncoming(r,this.__wbg_ptr,t);var n=d().getInt32(r+0,!0),_=d().getInt32(r+4,!0);let o;return n!==0&&(o=C(n,_).slice(),e.__wbindgen_export4(n,_*1,1)),o}finally{e.__wbindgen_add_to_stack_pointer(16);}}popOutgoing(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16);e.wasmpeerdatagrampolicy_popOutgoing(o,this.__wbg_ptr,t);var n=d().getInt32(o+0,!0),_=d().getInt32(o+4,!0),r=d().getInt32(o+8,!0);if(r)throw p(_);return p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}pushIncoming(t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=v(t,e.__wbindgen_export),g=i;e.wasmpeerdatagrampolicy_pushIncoming(o,this.__wbg_ptr,s,g,n);var _=d().getInt32(o+0,!0),r=d().getInt32(o+4,!0);if(r)throw p(_)}finally{e.__wbindgen_add_to_stack_pointer(16);}}pushOutgoing(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),g=v(t,e.__wbindgen_export),u=i;e.wasmpeerdatagrampolicy_pushOutgoing(s,this.__wbg_ptr,g,u,n);var _=d().getInt32(s+0,!0),r=d().getInt32(s+4,!0),o=d().getInt32(s+8,!0);if(o)throw p(r);return _!==0}finally{e.__wbindgen_add_to_stack_pointer(16);}}recordExpiredOutgoing(){e.wasmpeerdatagrampolicy_recordExpiredOutgoing(this.__wbg_ptr);}recordSendFailure(){e.wasmpeerdatagrampolicy_recordSendFailure(this.__wbg_ptr);}recordSent(t){e.wasmpeerdatagrampolicy_recordSent(this.__wbg_ptr,t);}setIncomingMaxAge(t,n){e.wasmpeerdatagrampolicy_setIncomingMaxAge(this.__wbg_ptr,f(t)?Number.MAX_SAFE_INTEGER:t>>>0,n);}setIncomingMaxBufferedDatagrams(t){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.wasmpeerdatagrampolicy_setIncomingMaxBufferedDatagrams(r,this.__wbg_ptr,t);var n=d().getInt32(r+0,!0),_=d().getInt32(r+4,!0);if(_)throw p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}setOutgoingMaxAge(t){e.wasmpeerdatagrampolicy_setOutgoingMaxAge(this.__wbg_ptr,f(t)?Number.MAX_SAFE_INTEGER:t>>>0);}setOutgoingMaxBufferedDatagrams(t){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.wasmpeerdatagrampolicy_setOutgoingMaxBufferedDatagrams(r,this.__wbg_ptr,t);var n=d().getInt32(r+0,!0),_=d().getInt32(r+4,!0);if(_)throw p(n)}finally{e.__wbindgen_add_to_stack_pointer(16);}}};Symbol.dispose&&(D.prototype[Symbol.dispose]=D.prototype.free);function Tt(){e.start();}function et(){return {__proto__:null,"./openrtc_bg.js":{__proto__:null,__wbg_Error_9dc85fe1bc224456:function(t,n){let _=Error(k(t,n));return w(_)},__wbg_Number_4779d427bae39753:function(t){return Number(a(t))},__wbg_String_8564e559799eccda:function(t,n){let _=String(a(n)),r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6:function(t,n){let _=a(n),r=typeof _=="bigint"?_:void 0;d().setBigInt64(t+8,f(r)?BigInt(0):r,true),d().setInt32(t+0,!f(r),true);},__wbg___wbindgen_boolean_get_b131b2f36d6b2f55:function(t){let n=a(t),_=typeof n=="boolean"?n:void 0;return f(_)?16777215:_?1:0},__wbg___wbindgen_debug_string_56c147eb1a51f0c4:function(t,n){let _=H(a(n)),r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg___wbindgen_in_ce8569b2fc6f5088:function(t,n){return a(t)in a(n)},__wbg___wbindgen_is_bigint_df272c65456269c2:function(t){return typeof a(t)=="bigint"},__wbg___wbindgen_is_function_147961669f068cd4:function(t){return typeof a(t)=="function"},__wbg___wbindgen_is_null_ced4761460071341:function(t){return a(t)===null},__wbg___wbindgen_is_object_3a2c414391dbf751:function(t){let n=a(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_6541b0f6ecd4e8e5:function(t){return typeof a(t)=="string"},__wbg___wbindgen_is_undefined_4410e3c20a99fa97:function(t){return a(t)===void 0},__wbg___wbindgen_jsval_eq_174c93ec61bab0c5:function(t,n){return a(t)===a(n)},__wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c:function(t,n){return a(t)==a(n)},__wbg___wbindgen_number_get_588ed6b97f0d7e14:function(t,n){let _=a(n),r=typeof _=="number"?_:void 0;d().setFloat64(t+8,f(r)?0:r,true),d().setInt32(t+0,!f(r),true);},__wbg___wbindgen_string_get_fa2687d531ed17a5:function(t,n){let _=a(n),r=typeof _=="string"?_:void 0;var o=f(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),s=i;d().setInt32(t+4,s,true),d().setInt32(t+0,o,true);},__wbg___wbindgen_throw_bbadd78c1bac3a77:function(t,n){throw new Error(k(t,n))},__wbg__wbg_cb_unref_c2301a3c9b78104b:function(t){a(t)._wbg_cb_unref();},__wbg_abort_56c00f462c9261d9:function(t,n){a(t).abort(a(n));},__wbg_abort_f2416f4a9852003e:function(t){a(t).abort();},__wbg_addEventListener_b635263c509aa7de:function(){return y(function(t,n,_,r){a(t).addEventListener(k(n,_),a(r));},arguments)},__wbg_append_c5a0c94a6a73b22e:function(){return y(function(t,n,_,r,o){a(t).append(k(n,_),k(r,o));},arguments)},__wbg_apply_5d99f956e2dda74d:function(){return y(function(t,n,_){let r=a(t).apply(a(n),a(_));return w(r)},arguments)},__wbg_arrayBuffer_cc7704fa158b907a:function(){return y(function(t){let n=a(t).arrayBuffer();return w(n)},arguments)},__wbg_bistream_new:function(t){let n=j.__wrap(t);return w(n)},__wbg_body_442a47f02322d7b0:function(t){let n=a(t).body;return f(n)?0:w(n)},__wbg_buffer_8524b3453cde4918:function(t){let n=a(t).buffer;return w(n)},__wbg_bufferedAmount_c1581bbb06f4f36c:function(t){return a(t).bufferedAmount},__wbg_byobRequest_cc72d210de793e64:function(t){let n=a(t).byobRequest;return f(n)?0:w(n)},__wbg_byteLength_96807b1d9ab24a4c:function(t){return a(t).byteLength},__wbg_byteOffset_a9c7002428843c41:function(t){return a(t).byteOffset},__wbg_call_91f00ddc43e01490:function(){return y(function(t,n){let _=a(t).call(a(n));return w(_)},arguments)},__wbg_call_ec09a4cf93377d3a:function(){return y(function(t,n,_){let r=a(t).call(a(n),a(_));return w(r)},arguments)},__wbg_cancel_f3a197b26dc88b39:function(t){let n=a(t).cancel();return w(n)},__wbg_catch_66060324c27be6f7:function(t,n){let _=a(t).catch(a(n));return w(_)},__wbg_clearTimeout_113b1cde814ec762:function(t){let n=clearTimeout(p(t));return w(n)},__wbg_clearTimeout_333bba87532ab9d3:function(t){let n=clearTimeout(p(t));return w(n)},__wbg_clearTimeout_47a40e3be01ed7a3:function(){return y(function(t,n){a(t).clearTimeout(p(n));},arguments)},__wbg_close_296263cfe1bb2999:function(){return y(function(t){a(t).close();},arguments)},__wbg_close_388d99468213b286:function(){return y(function(t){a(t).close();},arguments)},__wbg_close_4857e22d08b71356:function(){return y(function(t){a(t).close();},arguments)},__wbg_close_f3365df7ba1b74d3:function(t){a(t).close();},__wbg_code_1cda2855fcd9b009:function(t){return a(t).code},__wbg_code_70beb7b22374d55e:function(t){return a(t).code},__wbg_crypto_38df2bab126b63dc:function(t){let n=a(t).crypto;return w(n)},__wbg_data_8a04443c1e5a8cd3:function(t){let n=a(t).data;return w(n)},__wbg_debug_de823612d4d12f74:function(t){console.debug(a(t));},__wbg_dispatchEvent_cc62a6a43d28b01c:function(){return y(function(t,n){return a(t).dispatchEvent(a(n))},arguments)},__wbg_done_6a8439e544ec6206:function(t){return a(t).done},__wbg_enqueue_bbeb09ba0b140f76:function(){return y(function(t,n){a(t).enqueue(a(n));},arguments)},__wbg_entries_4e00eefd3fd54cf1:function(t){let n=a(t).entries();return w(n)},__wbg_entries_5a6a7e7e0df09fe5:function(t){let n=Object.entries(a(t));return w(n)},__wbg_error_6651fee1c71e5da9:function(t){console.error(a(t));},__wbg_error_9a99766f65a03031:function(t,n){console.error(a(t),a(n));},__wbg_error_a6fa202b58aa1cd3:function(t,n){let _,r;try{_=t,r=n,console.error(k(t,n));}finally{e.__wbindgen_export4(_,r,1);}},__wbg_fetch_074561c3e313c86f:function(t){let n=fetch(a(t));return w(n)},__wbg_fetch_22858a12fcf93152:function(t,n){let _=a(t).fetch(a(n));return w(_)},__wbg_from_8a57180716c586ee:function(t){let n=Array.from(a(t));return w(n)},__wbg_getRandomValues_76dfc69825c9c552:function(){return y(function(t,n){globalThis.crypto.getRandomValues(C(t,n));},arguments)},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return y(function(t,n){a(t).getRandomValues(a(n));},arguments)},__wbg_getReader_9facd4f899beac89:function(){return y(function(t){let n=a(t).getReader();return w(n)},arguments)},__wbg_get_44e98e27bda25b5b:function(){return y(function(t,n){let _=Reflect.get(a(t),a(n));return w(_)},arguments)},__wbg_get_4b90d6d8c5deb5d5:function(t,n){let _=a(t)[n>>>0];return w(_)},__wbg_get_52a8a619f7b88df6:function(){return y(function(t,n){let _=Reflect.get(a(t),a(n));return w(_)},arguments)},__wbg_get_done_c21b9933fc9a9e9c:function(t){let n=a(t).done;return f(n)?16777215:n?1:0},__wbg_get_unchecked_46e778e3cec74b5e:function(t,n){let _=a(t)[n>>>0];return w(_)},__wbg_get_value_ad568c7d3db9073f:function(t){let n=a(t).value;return w(n)},__wbg_get_with_ref_key_6412cf3094599694:function(t,n){let _=a(t)[a(n)];return w(_)},__wbg_has_14676d88c1340d2c:function(){return y(function(t,n){return Reflect.has(a(t),a(n))},arguments)},__wbg_headers_5b19cf40627ae54d:function(t){let n=a(t).headers;return w(n)},__wbg_info_a2b5f8a5dae8b26c:function(t){console.info(a(t));},__wbg_instanceof_ArrayBuffer_a581da923203f29f:function(t){let n;try{n=a(t)instanceof ArrayBuffer;}catch{n=false;}return n},__wbg_instanceof_Blob_5c4e145be35f9b1e:function(t){let n;try{n=a(t)instanceof Blob;}catch{n=false;}return n},__wbg_instanceof_Map_7f94c740225003e2:function(t){let n;try{n=a(t)instanceof Map;}catch{n=false;}return n},__wbg_instanceof_Promise_aa24ea31000d4ee6:function(t){let n;try{n=a(t)instanceof Promise;}catch{n=false;}return n},__wbg_instanceof_Response_36a65a969abaa7c6:function(t){let n;try{n=a(t)instanceof Response;}catch{n=false;}return n},__wbg_instanceof_Uint8Array_b6fe1ac89eba107e:function(t){let n;try{n=a(t)instanceof Uint8Array;}catch{n=false;}return n},__wbg_instanceof_Window_9e0fe7d3d1ff4342:function(t){let n;try{n=a(t)instanceof Window;}catch{n=false;}return n},__wbg_isArray_139f48e3c057ede8:function(t){return Array.isArray(a(t))},__wbg_isSafeInteger_c22ccb4af2201fe9:function(t){return Number.isSafeInteger(a(t))},__wbg_iterator_9b36cebf3be7b7cd:function(){return w(Symbol.iterator)},__wbg_length_68a9d5278d084f4f:function(t){return a(t).length},__wbg_length_fb04d16d7bdf6d4c:function(t){return a(t).length},__wbg_log_6614a4effdb4e983:function(t){console.log(a(t));},__wbg_maxRetransmits_dfa0382c31f8e2ca:function(t){let n=a(t).maxRetransmits;return f(n)?16777215:n},__wbg_message_12958526424a887b:function(t,n){let _=a(n).message,r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg_msCrypto_bd5a034af96bcba6:function(t){let n=a(t).msCrypto;return w(n)},__wbg_new_0b303268aa395a38:function(){let t=new Array;return w(t)},__wbg_new_189262ff31890c23:function(){return y(function(){let t=new Headers;return w(t)},arguments)},__wbg_new_20b778a4c5c691c3:function(){let t=new Object;return w(t)},__wbg_new_227d7c05414eb861:function(){let t=new Error;return w(t)},__wbg_new_24739629d416f982:function(){return y(function(){let t=new AbortController;return w(t)},arguments)},__wbg_new_5fae30e6b23db8df:function(t,n){let _=new Error(k(t,n));return w(_)},__wbg_new_883c0db065f06efd:function(){return w(new Map)},__wbg_new_a3e5112401a82338:function(){return y(function(t,n){let _=new WebSocket(k(t,n));return w(_)},arguments)},__wbg_new_b06772b280cc6e52:function(t){let n=new Uint8Array(a(t));return w(n)},__wbg_new_from_slice_bb2d1778c0b87eb1:function(t,n){let _=new Uint8Array(C(t,n));return w(_)},__wbg_new_typed_90c3f6c29ba36d19:function(t,n){try{var _={a:t,b:n},r=(s,g)=>{let u=_.a;_.a=0;try{return mt(u,_.b,s,g)}finally{_.a=u;}};let o=new Promise(r);return w(o)}finally{_.a=0;}},__wbg_new_with_byte_offset_and_length_9e1e664fe1a5d385:function(t,n,_){let r=new Uint8Array(a(t),n>>>0,_>>>0);return w(r)},__wbg_new_with_event_init_dict_bd850674488710b1:function(){return y(function(t,n,_){let r=new CustomEvent(k(t,n),a(_));return w(r)},arguments)},__wbg_new_with_into_underlying_sink_2596343f9b6c8e58:function(t){let n=new WritableStream(q.__wrap(t));return w(n)},__wbg_new_with_into_underlying_source_fd904252f385f59c:function(t,n){let _=new ReadableStream(B.__wrap(t),p(n));return w(_)},__wbg_new_with_length_4b57a7a5dc67221c:function(t){let n=new Uint8Array(t>>>0);return w(n)},__wbg_new_with_str_and_init_df876572184fe639:function(){return y(function(t,n,_){let r=new Request(k(t,n),a(_));return w(r)},arguments)},__wbg_new_with_str_sequence_505a4829cc247e79:function(){return y(function(t,n,_){let r=new WebSocket(k(t,n),a(_));return w(r)},arguments)},__wbg_next_8cb028b6ba50743f:function(){return y(function(t){let n=a(t).next();return w(n)},arguments)},__wbg_next_cfd0b146c9538df8:function(t){let n=a(t).next;return w(n)},__wbg_node_84ea875411254db1:function(t){let n=a(t).node;return w(n)},__wbg_now_bce4dc999095ea77:function(){return Date.now()},__wbg_now_e7c6795a7f81e10f:function(t){return a(t).now()},__wbg_parse_a5c06e19bc1187fd:function(t,n){return Date.parse(k(t,n))},__wbg_peerunistream_new:function(t){let n=z.__wrap(t);return w(n)},__wbg_performance_3fcf6e32a7e1ed0a:function(t){let n=a(t).performance;return w(n)},__wbg_process_44c7a14e11e9f69e:function(t){let n=a(t).process;return w(n)},__wbg_protocol_28aaef5ea42981d6:function(t,n){let _=a(n).protocol,r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg_prototypesetcall_956c7493c68e29b4:function(t,n,_){Uint8Array.prototype.set.call(C(t,n),a(_));},__wbg_push_ceb8ef046afb2041:function(t,n){return a(t).push(a(n))},__wbg_queueMicrotask_4698f900840e3286:function(t){queueMicrotask(a(t));},__wbg_queueMicrotask_477a5533c7100338:function(t){let n=a(t).queueMicrotask;return w(n)},__wbg_randomFillSync_6c25eac9869eb53c:function(){return y(function(t,n){a(t).randomFillSync(p(n));},arguments)},__wbg_read_8426c146431f2905:function(t){let n=a(t).read();return w(n)},__wbg_readyState_25243ad6ce649774:function(t){return a(t).readyState},__wbg_reason_4ec455bac79b33ce:function(t,n){let _=a(n).reason,r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg_releaseLock_188846ef719acb10:function(t){a(t).releaseLock();},__wbg_removeEventListener_016c1d24523b4730:function(){return y(function(t,n,_,r){a(t).removeEventListener(k(n,_),a(r));},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return y(function(){let t=module.require;return w(t)},arguments)},__wbg_resolve_0183de2e8c6b1d54:function(t){let n=Promise.resolve(a(t));return w(n)},__wbg_respond_3cdb4cf32683fd79:function(){return y(function(t,n){a(t).respond(n>>>0);},arguments)},__wbg_send_77521d09456dd693:function(){return y(function(t,n,_){a(t).send(C(n,_));},arguments)},__wbg_send_99d049cae69c53cc:function(){return y(function(t,n,_){a(t).send(C(n,_));},arguments)},__wbg_send_bac9d3dc4f21ef28:function(){return y(function(t,n,_){a(t).send(k(n,_));},arguments)},__wbg_setTimeout_3a808dd861dd3c12:function(t,n){let _=setTimeout(a(t),n);return w(_)},__wbg_setTimeout_6613a51400c1bf9f:function(){return y(function(t,n,_){let r=a(t).setTimeout(p(n),_);return w(r)},arguments)},__wbg_setTimeout_ef24d2fc3ad97385:function(){return y(function(t,n){let _=setTimeout(a(t),n);return w(_)},arguments)},__wbg_set_5f806304fb633ab3:function(t,n,_){let r=a(t).set(a(n),a(_));return w(r)},__wbg_set_6be42768c690e380:function(t,n,_){a(t)[p(n)]=p(_);},__wbg_set_86698c227e5b9dad:function(t,n,_){a(t).set(C(n,_));},__wbg_set_a6ba3ac0e634b822:function(){return y(function(t,n,_){return Reflect.set(a(t),a(n),a(_))},arguments)},__wbg_set_binaryType_07905e4563fcd9b2:function(t,n){a(t).binaryType=kt[n];},__wbg_set_binaryType_8c2dd2cf1cfc2e28:function(t,n){a(t).binaryType=xt[n];},__wbg_set_body_d1153b16a2b95ca1:function(t,n){a(t).body=a(n);},__wbg_set_bufferedAmountLowThreshold_8969a2db2c745257:function(t,n){a(t).bufferedAmountLowThreshold=n>>>0;},__wbg_set_cache_5a01a8b5e6ca6cf2:function(t,n){a(t).cache=yt[n];},__wbg_set_credentials_e9120ed88b1fc0b8:function(t,n){a(t).credentials=It[n];},__wbg_set_da33c120a6584674:function(t,n,_){a(t)[n>>>0]=p(_);},__wbg_set_detail_c7af5edea934390b:function(t,n){a(t).detail=a(n);},__wbg_set_handle_event_6147c38b782c7b42:function(t,n){a(t).handleEvent=a(n);},__wbg_set_headers_877ed41890d28af2:function(t,n){a(t).headers=a(n);},__wbg_set_high_water_mark_77da20c49668427d:function(t,n){a(t).highWaterMark=n;},__wbg_set_method_b4ede299b2064f37:function(t,n,_){a(t).method=k(n,_);},__wbg_set_mode_d6c2e1991aa963c6:function(t,n){a(t).mode=vt[n];},__wbg_set_onbufferedamountlow_b695487bdd219f98:function(t,n){a(t).onbufferedamountlow=a(n);},__wbg_set_onclose_9cb5c3372e16c192:function(t,n){a(t).onclose=a(n);},__wbg_set_onclose_f8bec1cbeb64aa93:function(t,n){a(t).onclose=a(n);},__wbg_set_onerror_190fe67e911ebf28:function(t,n){a(t).onerror=a(n);},__wbg_set_onmessage_4d57c4ddab951294:function(t,n){a(t).onmessage=a(n);},__wbg_set_onmessage_96337495f0bfb796:function(t,n){a(t).onmessage=a(n);},__wbg_set_onopen_3e2bf6b11d434c2d:function(t,n){a(t).onopen=a(n);},__wbg_set_signal_9022b5aa06a6ce5b:function(t,n){a(t).signal=a(n);},__wbg_signal_41dd1a8913cd0b7d:function(t){let n=a(t).signal;return w(n)},__wbg_stack_3b0d974bbf31e44f:function(t,n){let _=a(n).stack,r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg_static_accessor_GLOBAL_60a4124bab7dcc9a:function(){let t=typeof global>"u"?null:global;return f(t)?0:w(t)},__wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13:function(){let t=typeof globalThis>"u"?null:globalThis;return f(t)?0:w(t)},__wbg_static_accessor_SELF_4c95f759a91e9aae:function(){let t=typeof self>"u"?null:self;return f(t)?0:w(t)},__wbg_static_accessor_WINDOW_44b435597f9e9ee7:function(){let t=typeof window>"u"?null:window;return f(t)?0:w(t)},__wbg_status_9e6505cfa3e73a7c:function(t){return a(t).status},__wbg_subarray_42216645a367cd7a:function(t,n,_){let r=a(t).subarray(n>>>0,_>>>0);return w(r)},__wbg_then_254bab9b266a77a5:function(t,n,_){let r=a(t).then(a(n),a(_));return w(r)},__wbg_then_3ea18602c6a5123b:function(t,n){let _=a(t).then(a(n));return w(_)},__wbg_url_72c67c175685a054:function(t,n){let _=a(n).url,r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg_url_d0b8042af0d1bbba:function(t,n){let _=a(n).url,r=c(_,e.__wbindgen_export,e.__wbindgen_export2),o=i;d().setInt32(t+4,o,true),d().setInt32(t+0,r,true);},__wbg_value_3d3defe09fb1ffca:function(t){let n=a(t).value;return w(n)},__wbg_versions_276b2795b1c6a219:function(t){let n=a(t).versions;return w(n)},__wbg_view_15fa5865c6b336e3:function(t){let n=a(t).view;return f(n)?0:w(n)},__wbg_warn_633bacc13ba7e6c3:function(t){console.warn(a(t));},__wbg_wasClean_f17429d064911939:function(t){return a(t).wasClean},__wbindgen_cast_0000000000000001:function(t,n){let _=F(t,n,wt);return w(_)},__wbindgen_cast_0000000000000002:function(t,n){let _=F(t,n,ft);return w(_)},__wbindgen_cast_0000000000000003:function(t,n){let _=F(t,n,dt);return w(_)},__wbindgen_cast_0000000000000004:function(t,n){let _=F(t,n,ut);return w(_)},__wbindgen_cast_0000000000000005:function(t,n){let _=F(t,n,lt);return w(_)},__wbindgen_cast_0000000000000006:function(t,n){let _=F(t,n,at);return w(_)},__wbindgen_cast_0000000000000007:function(t,n){let _=F(t,n,pt);return w(_)},__wbindgen_cast_0000000000000008:function(t,n){let _=Pt(t,n,bt);return w(_)},__wbindgen_cast_0000000000000009:function(t,n){let _=F(t,n,gt);return w(_)},__wbindgen_cast_000000000000000a:function(t){return w(t)},__wbindgen_cast_000000000000000b:function(t){return w(t)},__wbindgen_cast_000000000000000c:function(t,n){let _=C(t,n);return w(_)},__wbindgen_cast_000000000000000d:function(t,n){let _=k(t,n);return w(_)},__wbindgen_cast_000000000000000e:function(t){let n=BigInt.asUintN(64,t);return w(n)},__wbindgen_cast_000000000000000f:function(t,n){var _=C(t,n).slice();return e.__wbindgen_export4(t,n*1,1),w(_)},__wbindgen_object_clone_ref:function(t){let n=a(t);return w(n)},__wbindgen_object_drop_ref:function(t){p(t);}}}}function at(b,t){e.__wasm_bindgen_func_elem_22380(b,t);}function pt(b,t){e.__wasm_bindgen_func_elem_23512(b,t);}function bt(b,t){e.__wasm_bindgen_func_elem_23569(b,t);}function gt(b,t){e.__wasm_bindgen_func_elem_31572(b,t);}function wt(b,t,n){e.__wasm_bindgen_func_elem_22583(b,t,w(n));}function dt(b,t,n){e.__wasm_bindgen_func_elem_19948(b,t,w(n));}function ut(b,t,n){e.__wasm_bindgen_func_elem_4390(b,t,w(n));}function lt(b,t,n){e.__wasm_bindgen_func_elem_24239(b,t,w(n));}function ft(b,t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16);e.__wasm_bindgen_func_elem_31721(o,b,t,w(n));var _=d().getInt32(o+0,!0),r=d().getInt32(o+4,!0);if(r)throw p(_)}finally{e.__wbindgen_add_to_stack_pointer(16);}}function mt(b,t,n,_){e.__wasm_bindgen_func_elem_31723(b,t,w(n),w(_));}var xt=["blob","arraybuffer"],ht=["bytes"],yt=["default","no-store","reload","no-cache","force-cache","only-if-cached"],It=["omit","same-origin","include"],vt=["same-origin","no-cors","cors","navigate"],kt=["arraybuffer","blob"],$=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_bistream_free(b,1)),Rt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_intounderlyingbytesource_free(b,1)),K=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_intounderlyingsink_free(b,1)),J=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_intounderlyingsource_free(b,1)),Y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_peerunistream_free(b,1)),Q=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_wasmclient_free(b,1)),Z=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_wasmpeerdatagrampolicy_free(b,1));function w(b){N===S.length&&S.push(S.length+1);let t=N;return N=S[t],S[t]=b,t}var X=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbindgen_export5(b.a,b.b));function H(b){let t=typeof b;if(t=="number"||t=="boolean"||b==null)return `${b}`;if(t=="string")return `"${b}"`;if(t=="symbol"){let r=b.description;return r==null?"Symbol":`Symbol(${r})`}if(t=="function"){let r=b.name;return typeof r=="string"&&r.length>0?`Function(${r})`:"Function"}if(Array.isArray(b)){let r=b.length,o="[";r>0&&(o+=H(b[0]));for(let s=1;s<r;s++)o+=", "+H(b[s]);return o+="]",o}let n=/\[object ([^\]]+)\]/.exec(toString.call(b)),_;if(n&&n.length>1)_=n[1];else return toString.call(b);if(_=="Object")try{return "Object("+JSON.stringify(b)+")"}catch{return "Object"}return b instanceof Error?`${b.name}: ${b.message}
|
|
2
|
+
${b.stack}`:_}function Ct(b){b<1028||(S[b]=N,N=b);}function At(b,t){b=b>>>0;let n=d(),_=[];for(let r=b;r<b+4*t;r+=4)_.push(p(n.getUint32(r,true)));return _}function C(b,t){return b=b>>>0,E().subarray(b/1,b/1+t)}var M=null;function d(){return (M===null||M.buffer.detached===true||M.buffer.detached===void 0&&M.buffer!==e.memory.buffer)&&(M=new DataView(e.memory.buffer)),M}function k(b,t){return Ft(b>>>0,t)}var T=null;function E(){return (T===null||T.byteLength===0)&&(T=new Uint8Array(e.memory.buffer)),T}function a(b){return S[b]}function y(b,t){try{return b.apply(this,t)}catch(n){e.__wbindgen_export3(w(n));}}var S=new Array(1024).fill(void 0);S.push(void 0,null,true,false);var N=S.length;function f(b){return b==null}function Pt(b,t,n){let _={a:b,b:t,cnt:1},r=(...o)=>{_.cnt++;try{return n(_.a,_.b,...o)}finally{r._wbg_cb_unref();}};return r._wbg_cb_unref=()=>{--_.cnt===0&&(e.__wbindgen_export5(_.a,_.b),_.a=0,X.unregister(_));},X.register(r,_,_),r}function F(b,t,n){let _={a:b,b:t,cnt:1},r=(...o)=>{_.cnt++;let s=_.a;_.a=0;try{return n(s,_.b,...o)}finally{_.a=s,r._wbg_cb_unref();}};return r._wbg_cb_unref=()=>{--_.cnt===0&&(e.__wbindgen_export5(_.a,_.b),_.a=0,X.unregister(_));},X.register(r,_,_),r}function v(b,t){let n=t(b.length*1,1)>>>0;return E().set(b,n/1),i=b.length,n}function tt(b,t){let n=t(b.length*4,4)>>>0,_=d();for(let r=0;r<b.length;r++)_.setUint32(n+4*r,w(b[r]),true);return i=b.length,n}function c(b,t,n){if(n===void 0){let g=W.encode(b),u=t(g.length,1)>>>0;return E().subarray(u,u+g.length).set(g),i=g.length,u}let _=b.length,r=t(_,1)>>>0,o=E(),s=0;for(;s<_;s++){let g=b.charCodeAt(s);if(g>127)break;o[r+s]=g;}if(s!==_){s!==0&&(b=b.slice(s)),r=n(r,_,_=s+b.length*3,1)>>>0;let g=E().subarray(r+s,r+_),u=W.encodeInto(b,g);s+=u.written,r=n(r,_,s,1)>>>0;}return i=s,r}function p(b){let t=a(b);return Ct(b),t}var L=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});L.decode();var St=2146435072,V=0;function Ft(b,t){return V+=t,V>=St&&(L=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}),L.decode(),V=t),L.decode(E().subarray(b,b+t))}var W=new TextEncoder;"encodeInto"in W||(W.encodeInto=function(b,t){let n=W.encode(b);return t.set(n),{read:b.length,written:n.length}});var i=0,e;function nt(b,t){return e=b.exports,M=null,T=null,e.__wbindgen_start(),e}async function Ot(b,t){if(typeof Response=="function"&&b instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(b,t)}catch(r){if(b.ok&&n(b.type)&&b.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}let _=await b.arrayBuffer();return await WebAssembly.instantiate(_,t)}else {let _=await WebAssembly.instantiate(b,t);return _ instanceof WebAssembly.Instance?{instance:_,module:b}:_}function n(_){switch(_){case "basic":case "cors":case "default":return true}return false}}function Nt(b){if(e!==void 0)return e;b!==void 0&&(Object.getPrototypeOf(b)===Object.prototype?{module:b}=b:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));let t=et();b instanceof WebAssembly.Module||(b=new WebAssembly.Module(b));let n=new WebAssembly.Instance(b,t);return nt(n)}async function Wt(b){if(e!==void 0)return e;b!==void 0&&(Object.getPrototypeOf(b)===Object.prototype?{module_or_path:b}=b:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),b===void 0&&(b=new URL("openrtc_bg.wasm",import.meta.url));let t=et();(typeof b=="string"||typeof Request=="function"&&b instanceof Request||typeof URL=="function"&&b instanceof URL)&&(b=fetch(b));let{instance:n,module:_}=await Ot(await b,t);return nt(n)}export{j as BiStream,U as IntoUnderlyingByteSource,q as IntoUnderlyingSink,B as IntoUnderlyingSource,z as PeerUniStream,G as WasmClient,D as WasmPeerDatagramPolicy,Wt as default,Nt as initSync,Tt as start};
|
package/dist/openrtc_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { D as DelegatingRuntimeAdapter,
|
|
2
|
-
import '../
|
|
3
|
-
import '../
|
|
4
|
-
import '../capabilities-BPuynml5.js';
|
|
1
|
+
import { D as DelegatingRuntimeAdapter, R as RuntimeBridgeOptions } from '../DelegatingRuntimeAdapter-4cgiIWMN.js';
|
|
2
|
+
import '../Connection-DZ5eP5hL.js';
|
|
3
|
+
import '../capabilities-B2mHv_H7.js';
|
|
5
4
|
|
|
6
5
|
declare class WasmRuntimeAdapter extends DelegatingRuntimeAdapter {
|
|
7
|
-
constructor(options:
|
|
6
|
+
constructor(options: RuntimeBridgeOptions);
|
|
8
7
|
setWasmClient(client: unknown): void;
|
|
9
8
|
}
|
|
10
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'../chunk-
|
|
1
|
+
import {a as a$1}from'../chunk-YYI6AY6W.js';import {a}from'../chunk-XEHBTMJQ.js';import'../chunk-GNW63SM6.js';import'../chunk-OT7IPLZE.js';import'../chunk-AJQVMVYW.js';import'../chunk-JPBW67B3.js';import'../chunk-MI3ZMVPK.js';import'../chunk-OWKAJPOI.js';import'../chunk-2GX6GB6L.js';var n=class extends a{constructor(e){super(new a$1(e));}setWasmClient(e){this.unwrap().setWasmClient(e);}};export{n as WasmRuntimeAdapter};
|
|
@@ -1,10 +1,285 @@
|
|
|
1
|
-
import { c as RuntimeFactoryOptions, b as PlutoRuntimeAssembly } from '../assembly-
|
|
2
|
-
import { I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-
|
|
3
|
-
import { W as
|
|
4
|
-
import {
|
|
5
|
-
import '../
|
|
6
|
-
import '../
|
|
7
|
-
|
|
1
|
+
import { c as RuntimeFactoryOptions, b as PlutoRuntimeAssembly } from '../assembly-By3UBQsE.js';
|
|
2
|
+
import { N as NativeProjectionBroker, I as IpcRuntimeAdapter } from '../IpcRuntimeAdapter-Dduaxscj.js';
|
|
3
|
+
import { Q as Device, K as ISignalingBackend, z as DiscoveryMode, B as AuthMode, E as SignalingMode, F as ClientOptions, H as ExplicitFileDataSendParams, ad as BrowserWasmRuntimeModule, _ as LocalDeviceInfo, O as RoomMember, ae as BrowserProtocolStore, af as NamespaceDescriptor, ag as IrohMutationReceipt, ah as IrohDocEntry, N as RuntimeIdentity, V as SignalingEnvelope, T as DeviceStatusSnapshot, g as PeerSessionSnapshot, a0 as BackendPeerBiStream, a1 as BackendPeerUniStream, a2 as PortableMediaPublish, a3 as PortableMediaPublicationStart, a4 as PortableMediaSample, a5 as PortableMediaChunk, a6 as PortableMediaControl, U as ManagedConnectionRecord, j as ResolvedPeerIdentity, W as DeviceEvent, X as DesiredPeerProjection, ai as CoreClientBridgeHost, a7 as NativeConnectParams, a8 as NativeConnectResult, Y as SignalingSession, Z as SessionEvent, a9 as BackendConnectionState } from '../Connection-DZ5eP5hL.js';
|
|
4
|
+
import { R as RuntimeCapabilities } from '../capabilities-B2mHv_H7.js';
|
|
5
|
+
import { R as RuntimeBridgeOptions } from '../DelegatingRuntimeAdapter-4cgiIWMN.js';
|
|
6
|
+
import { P as PlutoIpcBridge } from '../ipc-DgzKqHH3.js';
|
|
7
|
+
|
|
8
|
+
interface NativeTrustToken {
|
|
9
|
+
token: string;
|
|
10
|
+
expiresAtMs: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Internal-only gateway record before normalization; includes namespace fields omitted from the public Device type. */
|
|
14
|
+
type RawDeviceDoc = Device & {
|
|
15
|
+
appTag?: string;
|
|
16
|
+
tag?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type WasmBridgeOptions = RuntimeBridgeOptions;
|
|
20
|
+
/**
|
|
21
|
+
* WasmBridge is the browser host wrapper over the Rust/WASM runtime.
|
|
22
|
+
*
|
|
23
|
+
* Allowed:
|
|
24
|
+
* - normalize JS/WASM binding shapes
|
|
25
|
+
* - forward auth, discovery, signaling, and lifecycle calls into Rust
|
|
26
|
+
* - expose typed browser-facing results
|
|
27
|
+
*
|
|
28
|
+
* Not allowed:
|
|
29
|
+
* - become a second lifecycle engine
|
|
30
|
+
* - invent peer identity or connect policy that is not backed by Rust
|
|
31
|
+
* - normalize app-specific payload protocols into runtime behavior
|
|
32
|
+
*
|
|
33
|
+
* Source of truth:
|
|
34
|
+
* - Rust/WASM owns transport/runtime connection state and lifecycle primitives
|
|
35
|
+
* - The selected coordination provider owns browser delivery projections
|
|
36
|
+
* - RuntimeClient owns app-facing orchestration across those surfaces
|
|
37
|
+
*/
|
|
38
|
+
declare class WasmBridge implements ISignalingBackend {
|
|
39
|
+
private static readonly EXPLICIT_FILE_PROTOCOL_TYPE;
|
|
40
|
+
private static readonly EXPLICIT_FILE_CHUNK_SIZE_BYTES;
|
|
41
|
+
private static readonly MAX_EXPLICIT_TRANSFER_HEADER_BYTES;
|
|
42
|
+
private static readonly FALLBACK_EXPLICIT_FILE_NAME;
|
|
43
|
+
private static readonly MAX_EXPLICIT_FILE_NAME_CHARS;
|
|
44
|
+
private static readonly FALLBACK_EXPLICIT_MIME_TYPE;
|
|
45
|
+
private static readonly MAX_EXPLICIT_MIME_TYPE_CHARS;
|
|
46
|
+
app: any | null;
|
|
47
|
+
auth: any | null;
|
|
48
|
+
private readonly appTag;
|
|
49
|
+
protected options: {
|
|
50
|
+
appTag: string;
|
|
51
|
+
apiKey?: string;
|
|
52
|
+
discoveryMode?: DiscoveryMode;
|
|
53
|
+
space?: string;
|
|
54
|
+
spaceKey?: string;
|
|
55
|
+
authMode: AuthMode;
|
|
56
|
+
signalingMode?: SignalingMode;
|
|
57
|
+
projectId: string;
|
|
58
|
+
coordinationGateway?: ClientOptions['coordinationGateway'];
|
|
59
|
+
coordinationAvenueOverride?: ClientOptions['coordinationAvenueOverride'];
|
|
60
|
+
coordinationRoomGossipFanout?: ClientOptions['coordinationRoomGossipFanout'];
|
|
61
|
+
attestationTokenProvider?: ClientOptions['attestationTokenProvider'];
|
|
62
|
+
coordinationPlatformType?: string;
|
|
63
|
+
storagePrefix?: string;
|
|
64
|
+
deviceIdPersistence?: 'persistent' | 'ephemeral';
|
|
65
|
+
endpointIdPersistence?: 'persistent' | 'ephemeral';
|
|
66
|
+
nodeIdPersistence?: 'persistent' | 'ephemeral';
|
|
67
|
+
localDeviceId?: string;
|
|
68
|
+
deviceName?: string;
|
|
69
|
+
strictMode?: boolean;
|
|
70
|
+
turnCredentialsProvider?: () => Promise<{
|
|
71
|
+
iceServers?: RTCIceServer[];
|
|
72
|
+
} | null | undefined>;
|
|
73
|
+
applicationCrypto?: ExplicitFileDataSendParams['applicationCrypto'];
|
|
74
|
+
spaceTokenProvider?: ClientOptions['spaceTokenProvider'];
|
|
75
|
+
spaceAuth?: 'scoped-token';
|
|
76
|
+
};
|
|
77
|
+
private spaceNamespaceIdPromise;
|
|
78
|
+
private cachedSpaceNamespaceId;
|
|
79
|
+
private authListeners;
|
|
80
|
+
private persistenceReady;
|
|
81
|
+
wasmClient: any;
|
|
82
|
+
private readonly createdAtMs;
|
|
83
|
+
private missingWasmWarnings;
|
|
84
|
+
private readonly wasmReadyWarningDelayMs;
|
|
85
|
+
private readonly coordinationHost;
|
|
86
|
+
/** Test seam only; production gateway ownership remains in coordinationHost. */
|
|
87
|
+
private browserCoordinationSignaling;
|
|
88
|
+
private lastObservedFirebaseUserId;
|
|
89
|
+
private sessionReaders;
|
|
90
|
+
protected authContext: {
|
|
91
|
+
userId: string;
|
|
92
|
+
token?: string | null;
|
|
93
|
+
refreshToken?: string | null;
|
|
94
|
+
customToken?: string | null;
|
|
95
|
+
tokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
96
|
+
appCheckTokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
97
|
+
expiresAtMs?: number | null;
|
|
98
|
+
} | null;
|
|
99
|
+
private injectedBrowserAuthSessionActive;
|
|
100
|
+
private readonly presenceManager;
|
|
101
|
+
private hasSyncedAuthToWasmClient;
|
|
102
|
+
private lastWasmAuthUserId;
|
|
103
|
+
private lastWasmAuthToken;
|
|
104
|
+
private lastDeliveredConnectionStates;
|
|
105
|
+
private authScopedRuntimeGeneration;
|
|
106
|
+
private coreClient;
|
|
107
|
+
private readonly applicationRouteEscalations;
|
|
108
|
+
private applicationRouteEscalationAttemptKeys;
|
|
109
|
+
private applicationRouteEscalationUnsubscribe;
|
|
110
|
+
private routeSubscriptionGeneration;
|
|
111
|
+
private applicationRouteEscalationSubscriptionEpoch;
|
|
112
|
+
constructor(options: WasmBridgeOptions);
|
|
113
|
+
loadBrowserWasmRuntime(): Promise<BrowserWasmRuntimeModule>;
|
|
114
|
+
get tag(): string;
|
|
115
|
+
capabilities(): RuntimeCapabilities;
|
|
116
|
+
private static readonly WEB_DEVICE_ID_STORAGE_PREFIX;
|
|
117
|
+
private static readonly EPHEMERAL_DEVICE_ID_TTL_MS;
|
|
118
|
+
private getDeviceIdentityStorageKey;
|
|
119
|
+
private getDeviceIdPersistenceMode;
|
|
120
|
+
private isTicketOnlyMode;
|
|
121
|
+
private usesProviderNeutralGrant;
|
|
122
|
+
private createRandomDeviceId;
|
|
123
|
+
protected resolveWebLogicalDeviceId(): string;
|
|
124
|
+
private getDefaultBrowserDeviceName;
|
|
125
|
+
getLocalDeviceInfo(): Promise<LocalDeviceInfo>;
|
|
126
|
+
private getCoordinationSignaling;
|
|
127
|
+
usesCoordinationGateway(): boolean;
|
|
128
|
+
setCoordinationHostAvailability(input: {
|
|
129
|
+
available: boolean;
|
|
130
|
+
reason: string;
|
|
131
|
+
}): void;
|
|
132
|
+
/** Restore the existing gateway delivery subscription after a native host resumes. */
|
|
133
|
+
reconnectCoordinationAfterHostResume(): Promise<void>;
|
|
134
|
+
getCoordinationNativeTrustToken(forceRefresh?: boolean): Promise<NativeTrustToken>;
|
|
135
|
+
invalidateCoordinationNativeTrustToken(): void;
|
|
136
|
+
subscribeCoordinationNativeTrustToken(listener: (token: NativeTrustToken | null) => void, options?: {
|
|
137
|
+
emitCurrent?: boolean;
|
|
138
|
+
}): () => void;
|
|
139
|
+
setCoordinationLocalDeviceId(deviceId: string): void;
|
|
140
|
+
/** Internal native-host hint for provider-neutral roster presentation. */
|
|
141
|
+
setCoordinationPlatformType(platformType: string): void;
|
|
142
|
+
setCoordinationExcludedPeers(excludedPeers: string[]): Promise<void>;
|
|
143
|
+
joinCoordinationRoom(roomId: string, nodeId: string, ticket: string): Promise<void>;
|
|
144
|
+
leaveCoordinationRoom(roomId: string): Promise<void>;
|
|
145
|
+
getCoordinationRoomMembers(roomId: string): Promise<RoomMember[]>;
|
|
146
|
+
watchCoordinationRoomMembers(roomId: string, callback: (members: RoomMember[]) => void): () => void;
|
|
147
|
+
private withWebPresenceMetadata;
|
|
148
|
+
setAuthContext(context: {
|
|
149
|
+
userId: string;
|
|
150
|
+
token?: string | null;
|
|
151
|
+
refreshToken?: string | null;
|
|
152
|
+
customToken?: string | null;
|
|
153
|
+
tokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
154
|
+
appCheckTokenProvider?: (forceRefresh?: boolean) => Promise<string | null>;
|
|
155
|
+
expiresAtMs?: number | null;
|
|
156
|
+
} | null): Promise<void>;
|
|
157
|
+
private ensureBrowserPlatformAuth;
|
|
158
|
+
private syncWasmAuthToken;
|
|
159
|
+
private toRuntimeIdentity;
|
|
160
|
+
protected getCurrentUserId(): string | null;
|
|
161
|
+
getCurrentUserIdForScope(): string | null;
|
|
162
|
+
getAuthContext(): Readonly<typeof this.authContext> | null;
|
|
163
|
+
protected isSpaceMode(): boolean;
|
|
164
|
+
getResolvedOptions(): Readonly<typeof this.options>;
|
|
165
|
+
protected getDiscoveryScopeId(): string | null;
|
|
166
|
+
protected matchesTag(device: Pick<RawDeviceDoc, 'tag' | 'appTag'>): boolean;
|
|
167
|
+
matchesLegacyOrCurrentTag(device: Pick<RawDeviceDoc, 'tag' | 'appTag'>): boolean;
|
|
168
|
+
private stopSessionSubscriptions;
|
|
169
|
+
private stopRuntimeAuthScopedLoops;
|
|
170
|
+
stopAuthActivity(options?: {
|
|
171
|
+
userId?: string | null;
|
|
172
|
+
}): Promise<void>;
|
|
173
|
+
setWasmClient(client: any): void;
|
|
174
|
+
initializePersistentIrohProtocols(store: BrowserProtocolStore): Promise<void>;
|
|
175
|
+
createPersistentIrohNamespace(generation: number, shareRevision: number): Promise<NamespaceDescriptor>;
|
|
176
|
+
importPersistentIrohTicket(ticket: string, generation: number, shareRevision: number): Promise<string>;
|
|
177
|
+
sharePersistentIrohNamespace(namespaceId: string, writable: boolean): Promise<string>;
|
|
178
|
+
removePersistentIrohNamespace(namespaceId: string, generation: number, shareRevision: number): Promise<void>;
|
|
179
|
+
putPersistentIrohBytes(namespaceId: string, key: Uint8Array, value: Uint8Array): Promise<IrohMutationReceipt>;
|
|
180
|
+
setPersistentIrohHash(namespaceId: string, key: Uint8Array, contentHash: string, contentLength: number): Promise<string>;
|
|
181
|
+
deletePersistentIrohPrefix(namespaceId: string, prefix: Uint8Array): Promise<{
|
|
182
|
+
removed: number;
|
|
183
|
+
operationId: string;
|
|
184
|
+
}>;
|
|
185
|
+
queryPersistentIrohNamespace(namespaceId: string, keyPrefix: Uint8Array): Promise<IrohDocEntry[]>;
|
|
186
|
+
hydratePersistentIrohBlob(contentHash: string): Promise<void>;
|
|
187
|
+
acknowledgePersistentIrohOutbox(operationId: string): Promise<void>;
|
|
188
|
+
flushPersistentIrohProtocols(): Promise<void>;
|
|
189
|
+
shutdownPersistentIrohProtocols(): Promise<void>;
|
|
190
|
+
private requirePersistentProtocolHost;
|
|
191
|
+
private warnMissingWasmOnce;
|
|
192
|
+
private waitForWasmClient;
|
|
193
|
+
protected normalizeDevice(raw: Record<string, any>, fallbackId?: string): Device;
|
|
194
|
+
normalizeDeviceRecord(raw: Record<string, any>, fallbackId?: string): Device;
|
|
195
|
+
getResolvedWebLogicalDeviceId(): string;
|
|
196
|
+
private normalizeDeviceStatusSnapshot;
|
|
197
|
+
private normalizePeerSessionSnapshot;
|
|
198
|
+
private toBackendConnectionStateFromPeerSession;
|
|
199
|
+
private normalizeStateSnapshot;
|
|
200
|
+
private stabilizeConnectionState;
|
|
201
|
+
private sameConnectionState;
|
|
202
|
+
private deliverConnectionState;
|
|
203
|
+
private get browserPresenceLoopState();
|
|
204
|
+
private set browserPresenceLoopState(value);
|
|
205
|
+
get currentUser(): RuntimeIdentity | null;
|
|
206
|
+
onAuthChange(callback: (user: RuntimeIdentity | null) => void): () => void;
|
|
207
|
+
checkForSSOToken(): Promise<void>;
|
|
208
|
+
waitForAuth(): Promise<void>;
|
|
209
|
+
signInAnonymously(): Promise<void>;
|
|
210
|
+
signInWithPluto(): Promise<void>;
|
|
211
|
+
signOut(): Promise<void>;
|
|
212
|
+
getTurnCredentials(): Promise<any>;
|
|
213
|
+
updatePresence(localNodeId: string, ticketStr: string, isOnline?: boolean, ttlMs?: number, metadata?: string, deviceNameOverride?: string): Promise<void>;
|
|
214
|
+
refreshLivePresence(localNodeId: string, ticketStr: string, metadata?: string, deviceNameOverride?: string): Promise<void>;
|
|
215
|
+
setOffline(localNodeId: string): Promise<void>;
|
|
216
|
+
updateDevice(deviceId: string, updates: {
|
|
217
|
+
deviceName?: string;
|
|
218
|
+
capabilities?: Device['capabilities'];
|
|
219
|
+
metadata?: string;
|
|
220
|
+
excludedPeers?: string[];
|
|
221
|
+
}): Promise<void>;
|
|
222
|
+
deleteDevice(deviceId: string): Promise<void>;
|
|
223
|
+
cleanupStaleDevices(): Promise<void>;
|
|
224
|
+
sendMessage(targetId: string, payload: string, state?: string, replyPayload?: string): Promise<string>;
|
|
225
|
+
pollMessages(targetId: string): Promise<SignalingEnvelope[]>;
|
|
226
|
+
searchDevices(excludeNodeId?: string): Promise<Device[]>;
|
|
227
|
+
listDeviceStatus(): Promise<DeviceStatusSnapshot[]>;
|
|
228
|
+
getPeerSession(id: string): Promise<PeerSessionSnapshot | null>;
|
|
229
|
+
listPeerSessions(): Promise<PeerSessionSnapshot[]>;
|
|
230
|
+
waitForSettledPeer(id: string, timeoutMs?: number): Promise<PeerSessionSnapshot | null>;
|
|
231
|
+
openPeerBi(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
232
|
+
openPeerBiRaw(id: string, timeoutMs?: number): Promise<BackendPeerBiStream>;
|
|
233
|
+
openPeerUni(id: string, timeoutMs?: number): Promise<BackendPeerUniStream>;
|
|
234
|
+
beginOpenRtcMediaPublication(input: Omit<PortableMediaPublish, 'mediaGeneration'>): PortableMediaPublicationStart;
|
|
235
|
+
encodeOpenRtcMediaSample(input: PortableMediaSample): Uint8Array;
|
|
236
|
+
pauseOpenRtcMediaPublication(publicationId: string): void;
|
|
237
|
+
retireOpenRtcMediaPublication(publicationId: string): void;
|
|
238
|
+
retireOpenRtcMediaReceiver(publicationId: string, mediaGeneration: number): void;
|
|
239
|
+
decodeOpenRtcMediaChunk(encoded: Uint8Array): PortableMediaChunk;
|
|
240
|
+
decodeOpenRtcMediaControl(encoded: Uint8Array): PortableMediaControl;
|
|
241
|
+
sendPeerDatagram(id: string, payload: Uint8Array, maxAgeMs?: number): Promise<boolean>;
|
|
242
|
+
receivePeerDatagram(id: string): Promise<Uint8Array>;
|
|
243
|
+
peerDatagramMaxSize(): number;
|
|
244
|
+
createPeerDatagramPolicy(): unknown;
|
|
245
|
+
resolvePeerRecords(id: string): Promise<ManagedConnectionRecord[]>;
|
|
246
|
+
resolvePeerIdentity(id: string): Promise<ResolvedPeerIdentity>;
|
|
247
|
+
onDevicesChange(callback: (devices: Device[]) => void, excludeNodeId?: string): () => void;
|
|
248
|
+
subscribeDevices(userId: string): Promise<ReadableStream<DeviceEvent[]>>;
|
|
249
|
+
startAutoConnect(userId: string, localDeviceId: string): Promise<void>;
|
|
250
|
+
startAutoConnectOnce(userId: string, localDeviceId: string): Promise<void>;
|
|
251
|
+
notifyDisconnectRequested(remoteNodeId: string): void;
|
|
252
|
+
excludeAutoConnect(deviceId: string, excluded: boolean): Promise<void>;
|
|
253
|
+
disconnectDevice(deviceId: string): Promise<void>;
|
|
254
|
+
submitDesiredPeerProjection(revision: number, peers: DesiredPeerProjection[]): Promise<void>;
|
|
255
|
+
setCoreClient(client: CoreClientBridgeHost | null): void;
|
|
256
|
+
private startApplicationRouteEscalationSubscription;
|
|
257
|
+
private stopApplicationRouteEscalationSubscription;
|
|
258
|
+
private retryManagedApplicationRouteEscalations;
|
|
259
|
+
private escalateManagedApplicationRoute;
|
|
260
|
+
connectToDevice(params: NativeConnectParams): Promise<NativeConnectResult>;
|
|
261
|
+
forceReconnect(): void;
|
|
262
|
+
startPresenceLoop(userId: string, localNodeId: string, deviceName: string, ticket: string, metadata?: string): void;
|
|
263
|
+
private ensureSpaceNamespaceIdPromise;
|
|
264
|
+
createSession(session: SignalingSession): Promise<void>;
|
|
265
|
+
updateSession(sessionId: string, updateData: any): Promise<void>;
|
|
266
|
+
subscribeSessions(localDeviceId: string): Promise<ReadableStream<SessionEvent[]>>;
|
|
267
|
+
getLocalDeviceId(): Promise<string | null>;
|
|
268
|
+
isConnected(node_id: string): Promise<boolean>;
|
|
269
|
+
getConnectionStates(): Promise<BackendConnectionState[]>;
|
|
270
|
+
onStateChange(callback: (state: BackendConnectionState) => void): Promise<() => void> | (() => void);
|
|
271
|
+
sendExplicitFilePath(connectionId: string, filePath: string, transferId?: string): Promise<string>;
|
|
272
|
+
private sanitizeExplicitFileName;
|
|
273
|
+
private sanitizeExplicitMimeType;
|
|
274
|
+
private assertExplicitTransferHeaderSize;
|
|
275
|
+
private createWebRTCExplicitTransferId;
|
|
276
|
+
private createWebRTCExplicitTransferFrame;
|
|
277
|
+
sendExplicitFileData(params: ExplicitFileDataSendParams): Promise<void>;
|
|
278
|
+
getTransferHistory(limit?: number): Promise<Array<[string, unknown]>>;
|
|
279
|
+
deleteTransferJob(jobId: string): Promise<void>;
|
|
280
|
+
watchFriendDevices(friendUserIds: string[], callback: (friendDevices: Map<string, any[]>) => void): () => void;
|
|
281
|
+
updateFriendTicket(friendTicket: string | null): Promise<void>;
|
|
282
|
+
}
|
|
8
283
|
|
|
9
284
|
/**
|
|
10
285
|
* @deprecated Legacy assembly helper. Use `OpenRTC()` for app code.
|
|
@@ -16,6 +291,6 @@ declare function createWasmClient(options: RuntimeFactoryOptions): Promise<Pluto
|
|
|
16
291
|
* `OpenRTC.native` from `openrtc`.
|
|
17
292
|
* Removal target: OpenRTC 0.2.0.
|
|
18
293
|
*/
|
|
19
|
-
declare function createIpcClient(options: RuntimeFactoryOptions, bridge: PlutoIpcBridge): PlutoRuntimeAssembly<IpcRuntimeAdapter>;
|
|
294
|
+
declare function createIpcClient(options: RuntimeFactoryOptions, bridge: PlutoIpcBridge, projectionBroker?: NativeProjectionBroker): PlutoRuntimeAssembly<IpcRuntimeAdapter>;
|
|
20
295
|
|
|
21
296
|
export { PlutoRuntimeAssembly, RuntimeFactoryOptions, createIpcClient, createWasmClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'../chunk-
|
|
1
|
+
import {a as a$2}from'../chunk-5XOLKH66.js';import {a}from'../chunk-P2SHJMS3.js';import {s}from'../chunk-6OFAKLDB.js';import'../chunk-XEHBTMJQ.js';import'../chunk-GNW63SM6.js';import'../chunk-TYZS5LXQ.js';import'../chunk-OT7IPLZE.js';import'../chunk-AJQVMVYW.js';import'../chunk-72NEEJQG.js';import'../chunk-WB66633N.js';import'../chunk-JPBW67B3.js';import {a as a$1}from'../chunk-MI3ZMVPK.js';import'../chunk-OWKAJPOI.js';import'../chunk-2GX6GB6L.js';async function l(e){let t=a$1(e),{WasmBridge:o}=await import('../WasmBridge-3W2HHADU.js');return a$2(t,new o(t))}function y(e,t,o=new a){let m=a$1(e);return a$2(m,new s({...m,bridge:t,projectionBroker:o}))}export{y as createIpcClient,l as createWasmClient};
|