openrtc 2.3.1 → 2.5.1
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/README.md +77 -5
- package/dist/BrowserManagedBroadcastHost-ARCP5MGJ.js +1 -0
- package/dist/{ITransport-CjxCQ6q7.d.ts → Connection-CTpuImO-.d.ts} +610 -95
- package/dist/DelegatingRuntimeAdapter-D67Ozqo3.d.ts +154 -0
- package/dist/IpcRuntimeAdapter-Ddx0MtSI.d.ts +86 -0
- package/dist/WasmBridge-ZXBCXBBM.js +1 -0
- package/dist/{assembly-Bmi65-tK.d.ts → assembly-DvfsYFCL.d.ts} +41 -19
- package/dist/{capabilities-BPuynml5.d.ts → capabilities-CmzzxSvW.d.ts} +14 -7
- package/dist/chunk-2GX6GB6L.js +1 -0
- package/dist/chunk-2K47N3QP.js +2 -0
- package/dist/chunk-72NEEJQG.js +1 -0
- package/dist/chunk-AYHD4X2R.js +1 -0
- package/dist/chunk-BFN3AVHA.js +2 -0
- package/dist/chunk-BGWJHPBC.js +2 -0
- package/dist/chunk-CCCYE3XN.js +1 -0
- package/dist/chunk-EIJNERKZ.js +1 -0
- package/dist/chunk-FEF3DPPB.js +1 -0
- package/dist/chunk-GHAJW6SZ.js +2 -0
- package/dist/chunk-GTHSRQ7Y.js +2 -0
- package/dist/chunk-JPBW67B3.js +1 -0
- package/dist/chunk-LLZT3MR6.js +118 -0
- package/dist/chunk-N6LGTNUI.js +1 -0
- package/dist/{chunk-4MLJXEVV.js → chunk-NDR2ANQB.js} +1 -1
- package/dist/chunk-OT7IPLZE.js +1 -0
- package/dist/chunk-OWKAJPOI.js +1 -0
- package/dist/chunk-TYZS5LXQ.js +2 -0
- package/dist/chunk-VFDCIEP6.js +2 -0
- package/dist/chunk-VTYVIKTM.js +1 -0
- package/dist/chunk-XTYALGJN.js +2 -0
- package/dist/{chunk-KRJECX7X.js → chunk-Z4KJHIV5.js} +1 -1
- package/dist/chunk-Z54XUIKZ.js +1 -0
- package/dist/{controlPlane-KVFZ7BR5.js → controlPlane-IIPEJ77Q.js} +1 -1
- package/dist/coreClient.d.ts +3 -4
- package/dist/coreClient.js +1 -1
- package/dist/{deviceEnrollment-VACC64CQ.js → deviceEnrollment-ZQZ2WP5H.js} +2 -2
- package/dist/{deviceKey-Y35WSEQQ.js → deviceKey-EIMDBAQS.js} +1 -1
- package/dist/{dist-FIVA6EPA.js → dist-XO466BRG.js} +18 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/{ipc-CPnNwv6f.d.ts → ipc-DgzKqHH3.d.ts} +3 -0
- package/dist/ipcFactory-PRAJ7JP7.js +1 -0
- package/dist/native.d.ts +21 -0
- package/dist/native.js +1 -0
- package/dist/node-browser.d.ts +8 -0
- package/dist/node-browser.js +1 -0
- package/dist/node.d.ts +87 -0
- package/dist/node.js +2 -0
- package/dist/openrtc-VCS6V3AN.js +2 -0
- package/dist/openrtc_bg.wasm +0 -0
- package/dist/protocol-BSBjMb7p.d.ts +6 -0
- package/dist/room-ULZ2FGWV.js +1 -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 +352 -8
- package/dist/runtime/factories.js +1 -1
- package/dist/runtime/index.d.ts +15 -161
- package/dist/runtime/index.js +1 -1
- package/dist/server-browser.d.ts +14 -0
- package/dist/server-browser.js +1 -0
- package/dist/server.d.ts +44 -0
- package/dist/server.js +2 -0
- package/dist/service-node.d.ts +155 -0
- package/dist/service-node.js +1 -0
- package/dist/testing/native.d.ts +11 -0
- package/dist/testing/native.js +1 -0
- package/dist/testing.d.ts +47 -20
- package/dist/testing.js +1 -1
- package/dist/transport/index.d.ts +7 -18
- package/dist/transport/index.js +1 -1
- package/dist/types-Cyc-mPjk.d.ts +650 -0
- package/package.json +35 -3
- 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-AJQVMVYW.js +0 -1
- package/dist/chunk-BOS554IK.js +0 -2
- 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--jQzenZR.d.ts +0 -295
- package/dist/types-DDhMQkK8.d.ts +0 -621
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
var se=()=>{};var ae=function(t){let e=[],n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128);}return e},He=function(t){let e=[],n=0,r=0;for(;n<t.length;){let i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){let s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63);}else if(i>239&&i<365){let s=t[n++],o=t[n++],a=t[n++],c=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(c>>10)),e[r++]=String.fromCharCode(56320+(c&1023));}else {let s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63);}}return e.join("")},ce={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){let s=t[i],o=i+1<t.length,a=o?t[i+1]:0,c=i+2<t.length,l=c?t[i+2]:0,u=s>>2,d=(s&3)<<4|a>>4,h=(a&15)<<2|l>>6,m=l&63;c||(m=64,o||(h=64)),r.push(n[u],n[d],n[h],n[m]);}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(ae(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):He(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){let s=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0;++i;let l=i<t.length?n[t.charAt(i)]:64;++i;let d=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||a==null||l==null||d==null)throw new M;let h=s<<2|a>>4;if(r.push(h),l!==64){let m=a<<4&240|l>>2;if(r.push(m),d!==64){let A=l<<6&192|d;r.push(A);}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t);}}},M=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError";}},je=function(t){let e=ae(t);return ce.encodeByteArray(e,true)},$=function(t){return je(t).replace(/\./g,"")},le=function(t){try{return ce.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e);}return null};function ze(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var Ve=()=>ze().__FIREBASE_DEFAULTS__,We=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},Ge=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);}catch{return}let e=t&&le(t[1]);return e&&JSON.parse(e)},ue=()=>{try{return se()||Ve()||We()||Ge()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},Je=t=>ue()?.emulatorHosts?.[t],fe=t=>{let e=Je(t);if(!e)return;let n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);let r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},F=()=>ue()?.config;var T=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n;});}wrapCallback(e){return (n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r));}}};function he(){try{return typeof indexedDB=="object"}catch{return false}}function de(){return new Promise((t,e)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0);},i.onupgradeneeded=()=>{n=!1;},i.onerror=()=>{e(i.error?.message||"");};}catch(n){e(n);}})}var Ke="FirebaseError",b=class t extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=Ke,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,C.prototype.create);}},C=class{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r;}create(e,...n){let r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?qe(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new b(i,a,r)}};function qe(t,e){return t.replace(Ye,(n,r)=>{let i=e[r];return i!=null?String(i):`<${r}?>`})}var Ye=/\{\$([^}]+)}/g;function N(t,e){if(t===e)return true;let n=Object.keys(t),r=Object.keys(e);for(let i of n){if(!r.includes(i))return false;let s=t[i],o=e[i];if(oe(s)&&oe(o)){if(!N(s,o))return false}else if(s!==o)return false}for(let i of r)if(!n.includes(i))return false;return true}function oe(t){return t!==null&&typeof t=="object"}function S(t){return t&&t._delegate?t._delegate:t}function U(t){try{return (t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t).endsWith(".cloudworkstations.dev")}catch{return false}}async function pe(t){return (await fetch(t,{credentials:"include"})).ok}var y=class{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=false,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null;}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}};var w="[DEFAULT]";var H=class{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map;}get(e){let n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){let r=new T;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{let i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i);}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){let n=this.normalizeInstanceIdentifier(e?.identifier),r=e?.optional??false;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(i){if(r)return null;throw i}else {if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(Qe(e))try{this.getOrInitializeService({instanceIdentifier:w});}catch{}for(let[n,r]of this.instancesDeferred.entries()){let i=this.normalizeInstanceIdentifier(n);try{let s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s);}catch{}}}}clearInstance(e=w){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e);}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())]);}isComponentSet(){return this.component!=null}isInitialized(e=w){return this.instances.has(e)}getOptions(e=w){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(let[s,o]of this.instancesDeferred.entries()){let a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i);}return i}onInit(e,n){let r=this.normalizeInstanceIdentifier(n),i=this.onInitCallbacks.get(r)??new Set;i.add(e),this.onInitCallbacks.set(r,i);let s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e);}}invokeOnInitCallbacks(e,n){let r=this.onInitCallbacks.get(n);if(r)for(let i of r)try{i(e,n);}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:Xe(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r);}catch{}return r||null}normalizeInstanceIdentifier(e=w){return this.component?this.component.multipleInstances?e:w:e}shouldAutoInitialize(){return !!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function Xe(t){return t===w?void 0:t}function Qe(t){return t.instantiationMode==="EAGER"}var k=class{constructor(e){this.name=e,this.providers=new Map;}addComponent(e){let n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e);}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e);}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let n=new H(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}};var f;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT";})(f||(f={}));var et={debug:f.DEBUG,verbose:f.VERBOSE,info:f.INFO,warn:f.WARN,error:f.ERROR,silent:f.SILENT},tt=f.INFO,nt={[f.DEBUG]:"log",[f.VERBOSE]:"log",[f.INFO]:"info",[f.WARN]:"warn",[f.ERROR]:"error"},rt=(t,e,...n)=>{if(e<t.logLevel)return;let r=new Date().toISOString(),i=nt[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)},x=class{constructor(e){this.name=e,this._logLevel=tt,this._logHandler=rt,this._userLogHandler=null;}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in f))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e;}setLogLevel(e){this._logLevel=typeof e=="string"?et[e]:e;}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e;}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e;}debug(...e){this._userLogHandler&&this._userLogHandler(this,f.DEBUG,...e),this._logHandler(this,f.DEBUG,...e);}log(...e){this._userLogHandler&&this._userLogHandler(this,f.VERBOSE,...e),this._logHandler(this,f.VERBOSE,...e);}info(...e){this._userLogHandler&&this._userLogHandler(this,f.INFO,...e),this._logHandler(this,f.INFO,...e);}warn(...e){this._userLogHandler&&this._userLogHandler(this,f.WARN,...e),this._logHandler(this,f.WARN,...e);}error(...e){this._userLogHandler&&this._userLogHandler(this,f.ERROR,...e),this._logHandler(this,f.ERROR,...e);}};var it=(t,e)=>e.some(n=>t instanceof n),me,ge;function st(){return me||(me=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ot(){return ge||(ge=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var be=new WeakMap,z=new WeakMap,ye=new WeakMap,j=new WeakMap,W=new WeakMap;function at(t){let e=new Promise((n,r)=>{let i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o);},s=()=>{n(g(t.result)),i();},o=()=>{r(t.error),i();};t.addEventListener("success",s),t.addEventListener("error",o);});return e.then(n=>{n instanceof IDBCursor&&be.set(n,t);}).catch(()=>{}),W.set(e,t),e}function ct(t){if(z.has(t))return;let e=new Promise((n,r)=>{let i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o);},s=()=>{n(),i();},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i();};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o);});z.set(t,e);}var V={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return z.get(t);if(e==="objectStoreNames")return t.objectStoreNames||ye.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return g(t[e])},set(t,e,n){return t[e]=n,true},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?true:e in t}};function Ee(t){V=t(V);}function lt(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){let r=t.call(R(this),e,...n);return ye.set(r,e.sort?e.sort():[e]),g(r)}:ot().includes(t)?function(...e){return t.apply(R(this),e),g(be.get(this))}:function(...e){return g(t.apply(R(this),e))}}function ut(t){return typeof t=="function"?lt(t):(t instanceof IDBTransaction&&ct(t),it(t,st())?new Proxy(t,V):t)}function g(t){if(t instanceof IDBRequest)return at(t);if(j.has(t))return j.get(t);let e=ut(t);return e!==t&&(j.set(t,e),W.set(e,t)),e}var R=t=>W.get(t);function we(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(t,e),a=g(o);return r&&o.addEventListener("upgradeneeded",c=>{r(g(o.result),c.oldVersion,c.newVersion,g(o.transaction),c);}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l));}).catch(()=>{}),a}var ft=["get","getKey","getAll","getAllKeys","count"],ht=["put","add","delete","clear"],G=new Map;function _e(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(G.get(e))return G.get(e);let n=e.replace(/FromIndex$/,""),r=e!==n,i=ht.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||ft.includes(n)))return;let s=async function(o,...a){let c=this.transaction(o,i?"readwrite":"readonly"),l=c.store;return r&&(l=l.index(a.shift())),(await Promise.all([l[n](...a),i&&c.done]))[0]};return G.set(e,s),s}Ee(t=>({...t,get:(e,n,r)=>_e(e,n)||t.get(e,n,r),has:(e,n)=>!!_e(e,n)||t.has(e,n)}));var K=class{constructor(e){this.container=e;}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(dt(n)){let r=n.getImmediate();return `${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}};function dt(t){return t.getComponent()?.type==="VERSION"}var q="@firebase/app",Ae="0.15.1";var E=new x("@firebase/app"),pt="@firebase/app-compat",mt="@firebase/analytics-compat",gt="@firebase/analytics",bt="@firebase/app-check-compat",yt="@firebase/app-check",Et="@firebase/auth",_t="@firebase/auth-compat",wt="@firebase/database",At="@firebase/data-connect",vt="@firebase/database-compat",Dt="@firebase/functions",Ct="@firebase/functions-compat",St="@firebase/installations",It="@firebase/installations-compat",Ot="@firebase/messaging",Tt="@firebase/messaging-compat",Nt="@firebase/performance",kt="@firebase/performance-compat",xt="@firebase/remote-config",Rt="@firebase/remote-config-compat",Bt="@firebase/storage",Lt="@firebase/storage-compat",Pt="@firebase/firestore",Mt="@firebase/ai",$t="@firebase/firestore-compat",Ft="firebase";var Y="[DEFAULT]",Ut={[q]:"fire-core",[pt]:"fire-core-compat",[gt]:"fire-analytics",[mt]:"fire-analytics-compat",[yt]:"fire-app-check",[bt]:"fire-app-check-compat",[Et]:"fire-auth",[_t]:"fire-auth-compat",[wt]:"fire-rtdb",[At]:"fire-data-connect",[vt]:"fire-rtdb-compat",[Dt]:"fire-fn",[Ct]:"fire-fn-compat",[St]:"fire-iid",[It]:"fire-iid-compat",[Ot]:"fire-fcm",[Tt]:"fire-fcm-compat",[Nt]:"fire-perf",[kt]:"fire-perf-compat",[xt]:"fire-rc",[Rt]:"fire-rc-compat",[Bt]:"fire-gcs",[Lt]:"fire-gcs-compat",[Pt]:"fire-fst",[$t]:"fire-fst-compat",[Mt]:"fire-vertex","fire-js":"fire-js",[Ft]:"fire-js-all"};var B=new Map,Ht=new Map,X=new Map;function ve(t,e){try{t.container.addComponent(e);}catch(n){E.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n);}}function I(t){let e=t.name;if(X.has(e))return E.debug(`There were multiple attempts to register component ${e}.`),false;X.set(e,t);for(let n of B.values())ve(n,t);for(let n of Ht.values())ve(n,t);return true}function Ie(t,e){let n=t.container.getProvider("heartbeat").getImmediate({optional:true});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function Oe(t){return t==null?false:t.settings!==void 0}var jt={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},_=new C("app","Firebase",jt);var Q=class{constructor(e,n,r){this._isDeleted=false,this._options={...e},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new y("app",()=>this,"PUBLIC"));}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e;}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e;}checkDestroyed(){if(this.isDeleted)throw _.create("app-deleted",{appName:this._name})}};function zt(t,e={}){let n=t;typeof e!="object"&&(e={name:e});let r={name:Y,automaticDataCollectionEnabled:true,...e},i=r.name;if(typeof i!="string"||!i)throw _.create("bad-app-name",{appName:String(i)});if(n||(n=F()),!n)throw _.create("no-options");let s=B.get(i);if(s){if(N(n,s.options)&&N(r,s.config))return s;throw _.create("duplicate-app",{appName:i})}let o=new k(i);for(let c of X.values())o.addComponent(c);let a=new Q(n,r,o);return B.set(i,a),a}function Te(t=Y){let e=B.get(t);if(!e&&t===Y&&F())return zt();if(!e)throw _.create("no-app",{appName:t});return e}function v(t,e,n){let r=Ut[t]??t;n&&(r+=`-${n}`);let i=r.match(/\s|\//),s=e.match(/\s|\//);if(i||s){let o=[`Unable to register library "${r}" with version "${e}":`];i&&o.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&s&&o.push("and"),s&&o.push(`version name "${e}" contains illegal characters (whitespace or "/")`),E.warn(o.join(" "));return}I(new y(`${r}-version`,()=>({library:r,version:e}),"VERSION"));}var Vt="firebase-heartbeat-database",Wt=1,O="firebase-heartbeat-store",J=null;function Ne(){return J||(J=we(Vt,Wt,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(O);}catch(n){console.warn(n);}}}}).catch(t=>{throw _.create("idb-open",{originalErrorMessage:t.message})})),J}async function Gt(t){try{let n=(await Ne()).transaction(O),r=await n.objectStore(O).get(ke(t));return await n.done,r}catch(e){if(e instanceof b)E.warn(e.message);else {let n=_.create("idb-get",{originalErrorMessage:e?.message});E.warn(n.message);}}}async function De(t,e){try{let r=(await Ne()).transaction(O,"readwrite");await r.objectStore(O).put(e,ke(t)),await r.done;}catch(n){if(n instanceof b)E.warn(n.message);else {let r=_.create("idb-set",{originalErrorMessage:n?.message});E.warn(r.message);}}}function ke(t){return `${t.name}!${t.options.appId}`}var Jt=1024,Kt=30,Z=class{constructor(e){this.container=e,this._heartbeatsCache=null;let n=this.container.getProvider("app").getImmediate();this._storage=new ee(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r));}async triggerHeartbeat(){try{let n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=Ce();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(i=>i.date===r))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>Kt){let i=Yt(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(i,1);}return this._storage.overwrite(this._heartbeatsCache)}catch(e){E.warn(e);}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return "";let e=Ce(),{heartbeatsToSend:n,unsentEntries:r}=qt(this._heartbeatsCache.heartbeats),i=$(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}catch(e){return E.warn(e),""}}};function Ce(){return new Date().toISOString().substring(0,10)}function qt(t,e=Jt){let n=[],r=t.slice();for(let i of t){let s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),Se(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),Se(n)>e){n.pop();break}r=r.slice(1);}return {heartbeatsToSend:n,unsentEntries:r}}var ee=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck();}async runIndexedDBEnvironmentCheck(){return he()?de().then(()=>true).catch(()=>false):false}async read(){if(await this._canUseIndexedDBPromise){let n=await Gt(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return {heartbeats:[]}}async overwrite(e){if(await this._canUseIndexedDBPromise){let r=await this.read();return De(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){if(await this._canUseIndexedDBPromise){let r=await this.read();return De(this.app,{lastSentHeartbeatDate:e.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}};function Se(t){return $(JSON.stringify({version:2,heartbeats:t})).length}function Yt(t){if(t.length===0)return -1;let e=0,n=t[0].date;for(let r=1;r<t.length;r++)t[r].date<n&&(n=t[r].date,e=r);return e}function Xt(t){I(new y("platform-logger",e=>new K(e),"PRIVATE")),I(new y("heartbeat",e=>new Z(e),"PRIVATE")),v(q,Ae,t),v(q,Ae,"esm2020"),v("fire-js","");}Xt("");var Qt="type.googleapis.com/google.protobuf.Int64Value",Zt="type.googleapis.com/google.protobuf.UInt64Value";function Le(t,e){let n={};for(let r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}function L(t){if(t==null)return null;if(t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&isFinite(t)||t===true||t===false||Object.prototype.toString.call(t)==="[object String]")return t;if(t instanceof Date)return t.toISOString();if(Array.isArray(t))return t.map(e=>L(e));if(typeof t=="function"||typeof t=="object")return Le(t,e=>L(e));throw new Error("Data cannot be encoded in JSON: "+t)}function D(t){if(t==null)return t;if(t["@type"])switch(t["@type"]){case Qt:case Zt:{let e=Number(t.value);if(isNaN(e))throw new Error("Data cannot be decoded from JSON: "+t);return e}default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(e=>D(e)):typeof t=="function"||typeof t=="object"?Le(t,e=>D(e)):t}var ie="functions";var xe={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},p=class t extends b{constructor(e,n,r){super(`${ie}/${e}`,n||""),this.details=r,Object.setPrototypeOf(this,t.prototype);}};function en(t){if(t>=200&&t<300)return "ok";switch(t){case 0:return "internal";case 400:return "invalid-argument";case 401:return "unauthenticated";case 403:return "permission-denied";case 404:return "not-found";case 409:return "aborted";case 429:return "resource-exhausted";case 499:return "cancelled";case 500:return "internal";case 501:return "unimplemented";case 503:return "unavailable";case 504:return "deadline-exceeded"}return "unknown"}function P(t,e){let n=en(t),r=n,i;try{let s=e&&e.error;if(s){let o=s.status;if(typeof o=="string"){if(!xe[o])return new p("internal","internal");n=xe[o],r=o;}let a=s.message;typeof a=="string"&&(r=a),i=s.details,i!==void 0&&(i=D(i));}}catch{}return n==="ok"?null:new p(n,r,i)}var te=class{constructor(e,n,r,i){this.app=e,this.auth=null,this.messaging=null,this.appCheck=null,this.serverAppAppCheckToken=null,Oe(e)&&e.settings.appCheckToken&&(this.serverAppAppCheckToken=e.settings.appCheckToken),this.auth=n.getImmediate({optional:true}),this.messaging=r.getImmediate({optional:true}),this.auth||n.get().then(s=>this.auth=s,()=>{}),this.messaging||r.get().then(s=>this.messaging=s,()=>{}),this.appCheck||i?.get().then(s=>this.appCheck=s,()=>{});}async getAuthToken(){if(this.auth)try{return (await this.auth.getToken())?.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(e){if(this.serverAppAppCheckToken)return this.serverAppAppCheckToken;if(this.appCheck){let n=e?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return n.error?null:n.token}return null}async getContext(e){let n=await this.getAuthToken(),r=await this.getMessagingToken(),i=await this.getAppCheckToken(e);return {authToken:n,messagingToken:r,appCheckToken:i}}};var ne="us-central1",tn=/^data: (.*?)(?:\n|$)/;function nn(t){let e=null;return {promise:new Promise((n,r)=>{e=setTimeout(()=>{r(new p("deadline-exceeded","deadline-exceeded"));},t);}),cancel:()=>{e&&clearTimeout(e);}}}var re=class{constructor(e,n,r,i,s=ne,o=(...a)=>fetch(...a)){this.app=e,this.fetchImpl=o,this.emulatorOrigin=null,this.contextProvider=new te(e,n,r,i),this.cancelAllRequests=new Promise(a=>{this.deleteService=()=>Promise.resolve(a());});try{let a=new URL(s);this.customDomain=a.origin+(a.pathname==="/"?"":a.pathname),this.region=ne;}catch{this.customDomain=null,this.region=s;}}_delete(){return this.deleteService()}_url(e){let n=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${n}/${this.region}/${e}`:this.customDomain!==null?`${this.customDomain}/${e}`:`https://${this.region}-${n}.cloudfunctions.net/${e}`}};function rn(t,e,n){let r=U(e);t.emulatorOrigin=`http${r?"s":""}://${e}:${n}`,r&&pe(t.emulatorOrigin+"/backends");}function sn(t,e,n){let r=i=>cn(t,e,i,n||{});return r.stream=(i,s)=>ln(t,e,i,s),r}function on(t,e,n){let r=i=>$e(t,e,i,n||{});return r.stream=(i,s)=>Fe(t,e,i,s||{}),r}function Pe(t){return t.emulatorOrigin&&U(t.emulatorOrigin)?"include":void 0}async function an(t,e,n,r,i){n["Content-Type"]="application/json";let s;try{s=await r(t,{method:"POST",body:JSON.stringify(e),headers:n,credentials:Pe(i)});}catch{return {status:0,json:null}}let o=null;try{o=await s.json();}catch{}return {status:s.status,json:o}}async function Me(t,e){let n={},r=await t.contextProvider.getContext(e.limitedUseAppCheckTokens);return r.authToken&&(n.Authorization="Bearer "+r.authToken),r.messagingToken&&(n["Firebase-Instance-ID-Token"]=r.messagingToken),r.appCheckToken!==null&&(n["X-Firebase-AppCheck"]=r.appCheckToken),n}function cn(t,e,n,r){let i=t._url(e);return $e(t,i,n,r)}async function $e(t,e,n,r){n=L(n);let i={data:n},s=await Me(t,r),o=r.timeout||7e4,a=nn(o),c=await Promise.race([an(e,i,s,t.fetchImpl,t),a.promise,t.cancelAllRequests]);if(a.cancel(),!c)throw new p("cancelled","Firebase Functions instance was deleted.");let l=P(c.status,c.json);if(l)throw l;if(!c.json)throw new p("internal","Response is not valid JSON object.");let u=c.json.data;if(typeof u>"u"&&(u=c.json.result),typeof u>"u")throw new p("internal","Response is missing data field.");return {data:D(u)}}function ln(t,e,n,r){let i=t._url(e);return Fe(t,i,n,r||{})}async function Fe(t,e,n,r){n=L(n);let i={data:n},s=await Me(t,r);s["Content-Type"]="application/json",s.Accept="text/event-stream";let o;try{o=await t.fetchImpl(e,{method:"POST",body:JSON.stringify(i),headers:s,signal:r?.signal,credentials:Pe(t)});}catch(h){if(h instanceof Error&&h.name==="AbortError"){let A=new p("cancelled","Request was cancelled.");return {data:Promise.reject(A),stream:{[Symbol.asyncIterator](){return {next(){return Promise.reject(A)}}}}}}let m=P(0,null);return {data:Promise.reject(m),stream:{[Symbol.asyncIterator](){return {next(){return Promise.reject(m)}}}}}}let a,c,l=new Promise((h,m)=>{a=h,c=m;});r?.signal?.addEventListener("abort",()=>{let h=new p("cancelled","Request was cancelled.");c(h);});let u=o.body.getReader(),d=un(u,a,c,r?.signal);return {stream:{[Symbol.asyncIterator](){let h=d.getReader();return {async next(){let{value:m,done:A}=await h.read();return {value:m,done:A}},async return(){return await h.cancel(),{done:true,value:void 0}}}}},data:l}}function un(t,e,n,r){let i=(o,a)=>{let c=o.match(tn);if(!c)return;let l=c[1];try{let u=JSON.parse(l);if("result"in u){e(D(u.result));return}if("message"in u){a.enqueue(D(u.message));return}if("error"in u){let d=P(0,u);a.error(d),n(d);return}}catch(u){if(u instanceof p){a.error(u),n(u);return}}},s=new TextDecoder;return new ReadableStream({start(o){let a="";return c();async function c(){if(r?.aborted){let l=new p("cancelled","Request was cancelled");return o.error(l),n(l),Promise.resolve()}try{let{value:l,done:u}=await t.read();if(u){a.trim()&&i(a.trim(),o),o.close();return}if(r?.aborted){let h=new p("cancelled","Request was cancelled");o.error(h),n(h),await t.cancel();return}a+=s.decode(l,{stream:!0});let d=a.split(`
|
|
2
2
|
`);a=d.pop()||"";for(let h of d)h.trim()&&i(h.trim(),o);return c()}catch(l){let u=l instanceof p?l:P(0,null);o.error(u),n(u);}}},cancel(){return t.cancel()}})}var Re="@firebase/functions",Be="0.13.5";var fn="auth-internal",hn="app-check-internal",dn="messaging-internal";function pn(t){let e=(n,{instanceIdentifier:r})=>{let i=n.getProvider("app").getImmediate(),s=n.getProvider(fn),o=n.getProvider(dn),a=n.getProvider(hn);return new re(i,s,o,a,r)};I(new y(ie,e,"PUBLIC").setMultipleInstances(true)),v(Re,Be,t),v(Re,Be,"esm2020");}function Un(t=Te(),e=ne){let r=Ie(S(t),ie).getImmediate({identifier:e}),i=fe("functions");return i&&mn(r,...i),r}function mn(t,e,n){rn(S(t),e,n);}function Hn(t,e,n){return sn(S(t),e,n)}function jn(t,e,n){return on(S(t),e,n)}pn();/*! Bundled license information:
|
|
3
3
|
|
|
4
|
+
@firebase/util/dist/postinstall.mjs:
|
|
5
|
+
(**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2025 Google LLC
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*)
|
|
21
|
+
|
|
4
22
|
@firebase/util/dist/node-esm/index.node.esm.js:
|
|
5
23
|
@firebase/util/dist/node-esm/index.node.esm.js:
|
|
6
24
|
@firebase/util/dist/node-esm/index.node.esm.js:
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { P as PlutoIpcBridge } from './ipc-
|
|
2
|
-
import { O as Options, C as Client } from './types
|
|
3
|
-
export {
|
|
1
|
+
import { P as PlutoIpcBridge } from './ipc-DgzKqHH3.js';
|
|
2
|
+
import { O as Options, C as Client } from './types-Cyc-mPjk.js';
|
|
3
|
+
export { a as AttestationProvider, b as AuthProvider, c as Avenue, e as BroadcastGrant, i as BroadcastPublisher, j as BroadcastRole, k as BroadcastSession, l as BroadcastSource, m as BroadcastState, n as BroadcastStats, o as BroadcastTrackEvent, p as Channel, r as Connection, s as DeviceOptions, t as DeviceProfile, u as Devices, E as EnrolledDevice, N as Offline, P as OfflineAssurance, Q as OfflineEnrollmentRequest, R as OfflineRuntimeSupport, X as Room, Y as RoomOptions, $ as Space, a0 as SpaceOptions, a1 as State, a2 as Ticket, a3 as TicketOptions, a4 as Transports, a6 as UsageUpdate, a7 as UsageWarning } from './types-Cyc-mPjk.js';
|
|
4
4
|
import './coreClient.js';
|
|
5
|
-
import './assembly-
|
|
6
|
-
import './
|
|
7
|
-
import './
|
|
8
|
-
import './capabilities-BPuynml5.js';
|
|
5
|
+
import './assembly-DvfsYFCL.js';
|
|
6
|
+
import './Connection-CTpuImO-.js';
|
|
7
|
+
import './capabilities-CmzzxSvW.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* Create a lazy OpenRTC 2.0 browser client. Construction validates only local
|
|
@@ -37,6 +36,7 @@ declare const ERROR_CODES: {
|
|
|
37
36
|
readonly AUTH_DEVICE_REENROLLMENT_REQUIRED: "auth/device-reenrollment-required";
|
|
38
37
|
readonly ADMISSION_DENIED: "admission/denied";
|
|
39
38
|
readonly ADMISSION_SCOPE_MISMATCH: "admission/scope-mismatch";
|
|
39
|
+
readonly ROOM_ARCHITECTURE_UNAVAILABLE: "room-architecture-unavailable";
|
|
40
40
|
readonly BUDGET_EXCEEDED: "budget/exceeded";
|
|
41
41
|
readonly BUDGET_STALE: "budget/stale";
|
|
42
42
|
/** Gateway avenue escrow exhausted; re-auth renews budget and may replay once. */
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-VFDCIEP6.js';import {a}from'./chunk-VTYVIKTM.js';import {d}from'./chunk-72NEEJQG.js';import'./chunk-NDR2ANQB.js';import {f}from'./chunk-Z54XUIKZ.js';import'./chunk-ZA44REGI.js';import'./chunk-LLZT3MR6.js';import'./chunk-DUY34MGT.js';import'./chunk-CCCYE3XN.js';export{a as ERROR_CODES,b as RTCError,e as classifyError,d as createError,c as projectError}from'./chunk-N6LGTNUI.js';import'./chunk-JPBW67B3.js';import'./chunk-2GX6GB6L.js';function y(n){return f(n,{platform:"web",broadcastHostFactory:async e=>{let[{BrowserManagedBroadcastHost:r},{loadBrowserWasmRuntimeModule:t}]=await Promise.all([import('./BrowserManagedBroadcastHost-ARCP5MGJ.js'),import('./WasmBridge-ZXBCXBBM.js')]),o=t().then(async a=>(await a.initWasm(),a.start(),new a.WasmClient(e.apiKey)));return new r({resolve:e.resolve,manage:e.manage,deviceId:e.deviceId,defaultAuth:e.defaultAuth,loadWasm:()=>o})},runtimeFactory:async e=>{let{createWasmClient:r}=await import('./runtime/factories.js');return r(e)}})}y.native=function(n,e=d()){let r=new a;return f(n,{platform:"native",offlineSupport:()=>e.invoke("openrtc_offline_runtime_support"),createOfflineEnrollmentRequest:async t=>{let o=await e.invoke("start_iroh_node");return e.invoke("openrtc_create_offline_enrollment_request",{trustDomain:t.trustDomain,deviceId:t.deviceId,endpointId:o,enrollmentNonce:crypto.randomUUID(),requestedRoles:t.requestedRoles})},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:o}=await import('./ipcFactory-PRAJ7JP7.js');return o(t,e,r)}})};export{y as OpenRTC};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
type PlutoIpcUnlisten = () => void | Promise<void>;
|
|
2
2
|
interface PlutoIpcBridge {
|
|
3
3
|
invoke<T = unknown>(command: string, args?: Record<string, unknown>): Promise<T>;
|
|
4
|
+
invokeRaw?<T = unknown>(command: string, body: Uint8Array, headers?: Record<string, string>): Promise<T>;
|
|
4
5
|
listen<T = unknown>(event: string, handler: (payload: T) => void): Promise<PlutoIpcUnlisten>;
|
|
6
|
+
/** Ordered Tauri IPC channel used for stream descriptors and raw bytes. */
|
|
7
|
+
createChannel?<T = unknown>(handler: (payload: T) => void): Promise<unknown>;
|
|
5
8
|
isAvailable?(): boolean | Promise<boolean>;
|
|
6
9
|
}
|
|
7
10
|
type NativeIpcFailureKind = 'command-unavailable' | 'runtime-unavailable' | 'timeout' | 'unknown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-Z4KJHIV5.js';import {s}from'./chunk-2K47N3QP.js';import'./chunk-BGWJHPBC.js';import'./chunk-FEF3DPPB.js';import'./chunk-GTHSRQ7Y.js';import {a as a$1}from'./chunk-XTYALGJN.js';import'./chunk-TYZS5LXQ.js';import'./chunk-OT7IPLZE.js';import'./chunk-OWKAJPOI.js';import {a}from'./chunk-VTYVIKTM.js';import'./chunk-72NEEJQG.js';import'./chunk-DUY34MGT.js';import'./chunk-CCCYE3XN.js';import'./chunk-N6LGTNUI.js';import'./chunk-JPBW67B3.js';import'./chunk-2GX6GB6L.js';function l(p,n,m=new a){let t=a$1(p);return a$2(t,new s({...t,bridge:n,projectionBroker:m}))}export{l as createIpcClient};
|
package/dist/native.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { O as Options, C as Client } from './types-Cyc-mPjk.js';
|
|
2
|
+
export { A as AccessMode, a as AttestationProvider, b as AuthProvider, c as Avenue, B as BotVerificationProvider, d as BroadcastCreateOptions, e as BroadcastGrant, f as BroadcastInvite, g as BroadcastInviteOptions, h as BroadcastMedia, i as BroadcastPublisher, j as BroadcastRole, k as BroadcastSession, l as BroadcastSource, m as BroadcastState, n as BroadcastStats, o as BroadcastTrackEvent, p as Channel, q as Channels, r as Connection, D as Delivery, s as DeviceOptions, t as DeviceProfile, u as Devices, E as EnrolledDevice, I as IncomingPeerBidirectionalStream, v as IncomingPeerUnidirectionalStream, M as MediaConnection, w as MediaIncomingDemuxStats, x as MediaKind, y as MediaLatencySummary, z as MediaReceiver, F as MediaReceiverStats, G as MediaSender, H as MediaSenderStats, J as MediaStats, K as MediaTrackEvent, L as MediaTrackOptions, N as Offline, P as OfflineAssurance, Q as OfflineEnrollmentRequest, R as OfflineRuntimeSupport, S as PeerBidirectionalStream, T as PeerDatagramDuplexStream, U as PeerDatagramStats, V as PeerStreamOptions, W as PeerStreamTransport, X as Room, Y as RoomOptions, Z as RoomUsageEstimate, _ as RoomUsageEstimateInput, $ as Space, a0 as SpaceOptions, a1 as State, a2 as Ticket, a3 as TicketOptions, a4 as Transports, a5 as Usage, a6 as UsageUpdate, a7 as UsageWarning } from './types-Cyc-mPjk.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from './ipc-DgzKqHH3.js';
|
|
4
|
+
export { E as EffectiveRoomArchitecture, R as RoomArchitectureMode, a as RoomArchitectureReason, b as RoomArchitectureSnapshot, c as RoomAuthorityAssignment } from './Connection-CTpuImO-.js';
|
|
5
|
+
import './coreClient.js';
|
|
6
|
+
import './assembly-DvfsYFCL.js';
|
|
7
|
+
import './capabilities-CmzzxSvW.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-VFDCIEP6.js';import {a}from'./chunk-VTYVIKTM.js';import {d}from'./chunk-72NEEJQG.js';import'./chunk-NDR2ANQB.js';import {f}from'./chunk-Z54XUIKZ.js';import'./chunk-ZA44REGI.js';import'./chunk-LLZT3MR6.js';import'./chunk-DUY34MGT.js';import'./chunk-CCCYE3XN.js';import'./chunk-N6LGTNUI.js';import'./chunk-JPBW67B3.js';import'./chunk-2GX6GB6L.js';function u(a$2,t=d()){let r=new a;return f(a$2,{platform:"native",offlineSupport:()=>t.invoke("openrtc_offline_runtime_support"),createOfflineEnrollmentRequest:async e=>{let o=await t.invoke("start_iroh_node");return t.invoke("openrtc_create_offline_enrollment_request",{trustDomain:e.trustDomain,deviceId:e.deviceId,endpointId:o,enrollmentNonce:crypto.randomUUID(),requestedRoles:e.requestedRoles})},close:()=>r.close(),deviceKeyProvider:a$1(t),deviceIdProvider:async()=>{let e=await t.invoke("get_rtc_local_device_info");return String(e?.deviceId??"")},runtimeFactory:async e=>{let{createIpcClient:o}=await import('./ipcFactory-PRAJ7JP7.js');return o(e,t,r)}})}export{u as OpenRTC};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Browser export for `openrtc/node`; process and secret-bearing helpers are unavailable. */
|
|
2
|
+
declare class ServiceNode {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
declare function OpenRTC(): never;
|
|
6
|
+
declare function inspectNodeHost(): Promise<never>;
|
|
7
|
+
|
|
8
|
+
export { OpenRTC, ServiceNode, inspectNodeHost };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){throw new Error("[OpenRTC] openrtc/node is unavailable in browsers; use openrtc/service-node with a delegated grant.")}var n=class{constructor(){e();}};function t(){return e()}async function o(){return e()}export{t as OpenRTC,n as ServiceNode,o as inspectNodeHost};
|
package/dist/node.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { O as Options, C as Client } from './types-Cyc-mPjk.js';
|
|
2
|
+
export { A as AccessMode, a as AttestationProvider, b as AuthProvider, c as Avenue, B as BotVerificationProvider, d as BroadcastCreateOptions, e as BroadcastGrant, f as BroadcastInvite, g as BroadcastInviteOptions, h as BroadcastMedia, i as BroadcastPublisher, j as BroadcastRole, k as BroadcastSession, l as BroadcastSource, m as BroadcastState, n as BroadcastStats, o as BroadcastTrackEvent, p as Channel, q as Channels, r as Connection, D as Delivery, s as DeviceOptions, t as DeviceProfile, u as Devices, E as EnrolledDevice, I as IncomingPeerBidirectionalStream, v as IncomingPeerUnidirectionalStream, M as MediaConnection, w as MediaIncomingDemuxStats, x as MediaKind, y as MediaLatencySummary, z as MediaReceiver, F as MediaReceiverStats, G as MediaSender, H as MediaSenderStats, J as MediaStats, K as MediaTrackEvent, L as MediaTrackOptions, N as Offline, P as OfflineAssurance, Q as OfflineEnrollmentRequest, R as OfflineRuntimeSupport, S as PeerBidirectionalStream, T as PeerDatagramDuplexStream, U as PeerDatagramStats, V as PeerStreamOptions, W as PeerStreamTransport, X as Room, Y as RoomOptions, Z as RoomUsageEstimate, _ as RoomUsageEstimateInput, $ as Space, a0 as SpaceOptions, a1 as State, a2 as Ticket, a3 as TicketOptions, a4 as Transports, a5 as Usage, a6 as UsageUpdate, a7 as UsageWarning } from './types-Cyc-mPjk.js';
|
|
3
|
+
import { P as PlutoIpcBridge } from './ipc-DgzKqHH3.js';
|
|
4
|
+
import { AuthorityAssignmentInput, AuthorityInterestAssignment } from './service-node.js';
|
|
5
|
+
export { E as EffectiveRoomArchitecture, R as RoomArchitectureMode, a as RoomArchitectureReason, b as RoomArchitectureSnapshot, c as RoomAuthorityAssignment } from './Connection-CTpuImO-.js';
|
|
6
|
+
import './coreClient.js';
|
|
7
|
+
import './assembly-DvfsYFCL.js';
|
|
8
|
+
import './capabilities-CmzzxSvW.js';
|
|
9
|
+
|
|
10
|
+
interface NodeServiceNodeOptions {
|
|
11
|
+
apiKey: string;
|
|
12
|
+
/** Trusted server credential. It is sent on stdin, never argv or the environment. */
|
|
13
|
+
secretKey: string;
|
|
14
|
+
serviceId: string;
|
|
15
|
+
generation: number;
|
|
16
|
+
shardIds: string[];
|
|
17
|
+
deviceId: string;
|
|
18
|
+
/** Absolute private directory used for the durable device, authority, and Iroh keys. */
|
|
19
|
+
stateDirectory: string;
|
|
20
|
+
deviceName?: string;
|
|
21
|
+
maxPeers?: number;
|
|
22
|
+
irohRelay?: boolean;
|
|
23
|
+
/** Explicit released host binary override. */
|
|
24
|
+
binaryPath?: string;
|
|
25
|
+
/** Extra arguments for a host wrapper; primarily useful to test the process contract. */
|
|
26
|
+
binaryArgs?: string[];
|
|
27
|
+
/** Build the Rust host from a reviewed local OpenRTC checkout before spawning it. */
|
|
28
|
+
buildFromSource?: boolean;
|
|
29
|
+
/** OpenRTC repository root containing crates/openrtc/Cargo.toml. */
|
|
30
|
+
sourceRoot?: string;
|
|
31
|
+
startupTimeoutMs?: number;
|
|
32
|
+
}
|
|
33
|
+
interface NodeServiceConnection {
|
|
34
|
+
/** Rust-owned stable logical connection identity. */
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly peerId: string;
|
|
37
|
+
send(message: unknown): Promise<void>;
|
|
38
|
+
onMessage<T = unknown>(callback: (message: T) => void): () => void;
|
|
39
|
+
onClose(callback: () => void): () => void;
|
|
40
|
+
}
|
|
41
|
+
interface NodeServiceRoom {
|
|
42
|
+
readonly kind: 'room';
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly closed: boolean;
|
|
45
|
+
publishAssignment(input: AuthorityAssignmentInput): Promise<AuthorityInterestAssignment>;
|
|
46
|
+
onConnection(callback: (connection: NodeServiceConnection) => void): () => void;
|
|
47
|
+
close(): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
interface NodeServiceConnectionEvent {
|
|
50
|
+
room: NodeServiceRoom;
|
|
51
|
+
connection: NodeServiceConnection;
|
|
52
|
+
}
|
|
53
|
+
interface NodeHostProtocolInfo {
|
|
54
|
+
protocolVersion: number;
|
|
55
|
+
maxConfigBytes: number;
|
|
56
|
+
maxCommandBytes: number;
|
|
57
|
+
maxApplicationPayloadBytes: number;
|
|
58
|
+
lifecycleOwner: 'rust-peer-session';
|
|
59
|
+
}
|
|
60
|
+
/** Developer-preview Node authority backed by the native Rust lifecycle owner. */
|
|
61
|
+
declare class ServiceNode {
|
|
62
|
+
private readonly options;
|
|
63
|
+
private readonly listeners;
|
|
64
|
+
private roomPromise;
|
|
65
|
+
private roomId;
|
|
66
|
+
private closed;
|
|
67
|
+
constructor(options: NodeServiceNodeOptions);
|
|
68
|
+
onConnection(callback: (event: NodeServiceConnectionEvent) => void): () => void;
|
|
69
|
+
listen(roomId: string): Promise<NodeServiceRoom>;
|
|
70
|
+
close(): Promise<void>;
|
|
71
|
+
private open;
|
|
72
|
+
}
|
|
73
|
+
/** Check the exact native protocol without starting a room or exposing credentials. */
|
|
74
|
+
declare function inspectNodeHost(options: Pick<NodeServiceNodeOptions, 'binaryPath' | 'binaryArgs' | 'buildFromSource' | 'sourceRoot'>): Promise<NodeHostProtocolInfo>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Create a Node.js OpenRTC client with a caller-provided native mechanics bridge.
|
|
78
|
+
*
|
|
79
|
+
* The bridge is mechanics only. The shared Rust peer-session actor behind it
|
|
80
|
+
* remains the sole lifecycle owner; JavaScript never implements dialing,
|
|
81
|
+
* retries, route replacement, or carrier switching. No Tauri global is used.
|
|
82
|
+
* Service authorities normally use the bundled `ServiceNode` host exported by
|
|
83
|
+
* this entrypoint and do not provide this bridge themselves.
|
|
84
|
+
*/
|
|
85
|
+
declare function OpenRTC(options: Options, host: PlutoIpcBridge): Client;
|
|
86
|
+
|
|
87
|
+
export { Client, PlutoIpcBridge as NodeHostBridge, type NodeHostProtocolInfo, type NodeServiceConnection, type NodeServiceConnectionEvent, type NodeServiceNodeOptions, type NodeServiceRoom, OpenRTC, Options, ServiceNode, inspectNodeHost };
|
package/dist/node.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-VFDCIEP6.js';import {a}from'./chunk-VTYVIKTM.js';import {c}from'./chunk-72NEEJQG.js';import'./chunk-NDR2ANQB.js';import {f as f$1}from'./chunk-Z54XUIKZ.js';import'./chunk-ZA44REGI.js';import'./chunk-LLZT3MR6.js';import'./chunk-DUY34MGT.js';import'./chunk-CCCYE3XN.js';import'./chunk-N6LGTNUI.js';import'./chunk-JPBW67B3.js';import'./chunk-2GX6GB6L.js';import {spawn}from'child_process';import {constants}from'fs';import {access}from'fs/promises';import {isAbsolute,resolve,dirname}from'path';import {fileURLToPath}from'url';import {randomUUID}from'crypto';var y=1,x=24*1024,G=96*1024,w=128*1024,T=64*1024,z=256,V=256,A=3e4,X=/^[A-Za-z0-9_.:@-]+$/,Y=/(?:^|_)(?:SECRET|TOKEN|PASSWORD|PRIVATE(?:_KEY)?|CREDENTIALS?)(?:_|$)/i;function M(o){return Object.fromEntries(Object.entries(process.env).filter(([e,t])=>!Y.test(e)&&(!o||!t?.includes(o))))}function p(o,e){queueMicrotask(()=>{try{o(e);}catch{try{process.emitWarning("[OpenRTC] ServiceNode callback failed.",{code:"OPENRTC_SERVICE_CALLBACK"});}catch{}}});}function B(o){let e=/^\d{1,20}$/;return typeof o.transportStableId!="string"||!e.test(o.transportStableId)||!e.test(o.transportGeneration)||!e.test(o.routeGeneration)?null:{transportStableId:o.transportStableId,transportGeneration:o.transportGeneration,routeGeneration:o.routeGeneration}}function J(o,e){return o.transportStableId===e.transportStableId&&o.transportGeneration===e.transportGeneration&&o.routeGeneration===e.routeGeneration}function u(o,e,t=160){let r=o.trim();if(!r||r.length>t||!X.test(r))throw new TypeError(`[OpenRTC] ${e} is invalid.`);return r}function f(o,e,t=Number.MAX_SAFE_INTEGER){if(!Number.isSafeInteger(o)||o<1||o>t)throw new RangeError(`[OpenRTC] ${e} must be a positive safe integer.`);return o}function Q(o){if(!/^pk_(?:live|test)_[A-Za-z0-9]+$/.test(o.apiKey))throw new TypeError("[OpenRTC] apiKey is invalid.");if(!/^sk_(?:live|test)_[A-Za-z0-9_-]+$/.test(o.secretKey)||o.secretKey.length>128)throw new TypeError("[OpenRTC] secretKey is invalid.");let e=[...o.shardIds].map(t=>u(t,"shardId",80)).sort();if(e.length<1||e.length>64||new Set(e).size!==e.length)throw new RangeError("[OpenRTC] shardIds must contain 1..64 unique identifiers.");if(!isAbsolute(o.stateDirectory))throw new TypeError("[OpenRTC] stateDirectory must be absolute.");return o.maxPeers!==void 0&&f(o.maxPeers,"maxPeers",5e3),o.startupTimeoutMs!==void 0&&f(o.startupTimeoutMs,"startupTimeoutMs",12e4),{...o,serviceId:u(o.serviceId,"serviceId",80),generation:f(o.generation,"generation"),shardIds:e,deviceId:u(o.deviceId,"deviceId"),deviceName:o.deviceName?.trim()||"OpenRTC Node service"}}async function v(o){try{return await access(o,process.platform==="win32"?constants.F_OK:constants.X_OK),!0}catch{return false}}async function H(o,e,t,r,n){return new Promise((i,s)=>{let a=spawn(o,e,{cwd:t,env:M(n),stdio:["ignore","pipe","pipe"]}),c=Buffer.alloc(0),d=Buffer.alloc(0),h=(l,q)=>Buffer.concat([l,q]).subarray(-w);a.stdout.on("data",l=>{c=h(c,l);}),a.stderr.on("data",l=>{d=h(d,l);});let C=setTimeout(()=>{a.kill(),s(new Error(`[OpenRTC] Node host command timed out: ${o}.`));},r);a.once("error",l=>{clearTimeout(C),s(l);}),a.once("exit",l=>{clearTimeout(C),l===0?i(c.toString("utf8")):s(new Error(`[OpenRTC] Node host command failed (${l??"signal"}): ${d.toString("utf8").trim().slice(-4096)}`));});})}async function K(o){let e=o.binaryPath||process.env.OPENRTC_NODE_HOST_BINARY;if(e){if(!isAbsolute(e)||!await v(e))throw new Error("[OpenRTC] Node host binaryPath must name an executable absolute path.");return {command:e,args:[...o.binaryArgs??[]]}}if(o.buildFromSource){let n=o.sourceRoot||process.env.OPENRTC_SOURCE_ROOT;if(!n||!isAbsolute(n))throw new Error("[OpenRTC] buildFromSource requires an absolute sourceRoot or OPENRTC_SOURCE_ROOT.");let i=resolve(n,"crates/openrtc/Cargo.toml"),s=resolve(n,"target");await H("cargo",["build","--locked","--manifest-path",i,"--features","node-host","--bin","openrtc-node-host","--target-dir",s],n,12e4,o.secretKey);let a=resolve(s,"debug",`openrtc-node-host${process.platform==="win32"?".exe":""}`);if(!await v(a))throw new Error("[OpenRTC] local Node host build did not produce an executable.");return {command:a,args:[]}}let t=resolve(dirname(fileURLToPath(import.meta.url)),".."),r=resolve(t,"native",`${process.platform}-${process.arch}`,`openrtc-node-host${process.platform==="win32"?".exe":""}`);if(!await v(r))throw new Error(`[OpenRTC] This package has no Node host for ${process.platform}-${process.arch}. Install a supported OpenRTC package, set OPENRTC_NODE_HOST_BINARY, or use buildFromSource with sourceRoot.`);return {command:r,args:[]}}async function $(o,e){let t=await H(o.command,[...o.args,"--protocol-info"],process.cwd(),12e4,e),r=JSON.parse(t);if(r.protocolVersion!==y||r.lifecycleOwner!=="rust-peer-session"||r.maxConfigBytes!==x||r.maxCommandBytes!==G||r.maxApplicationPayloadBytes!==T)throw new Error("[OpenRTC] Node host protocol is incompatible.");return r}var N=class{constructor(e,t,r){this.options=e;this.roomId=t;this.onEvent=r;this.child=null;this.output=Buffer.alloc(0);this.stderr=Buffer.alloc(0);this.pending=new Map;this.writeQueue=Promise.resolve();this.stopped=false;}async start(){let e=await K(this.options);await $(e,this.options.secretKey);let t=new Promise((r,n)=>{let i=spawn(e.command,[...e.args],{env:M(this.options.secretKey),stdio:["pipe","pipe","pipe"]});this.child=i;let s=setTimeout(()=>{n(this.failure("Node host startup timed out")),i.kill();},this.options.startupTimeoutMs??A),a=c=>{clearTimeout(s),n(this.failure(c.message)),this.failAll(this.failure(c.message));};i.once("error",a),i.stderr.on("data",c=>{this.stderr=Buffer.concat([this.stderr,c]).subarray(-4096);}),i.stdout.on("data",c=>{try{for(let d of this.parse(c)){if(d.type==="ready"){if(d.protocolVersion!==y||d.roomId!==this.roomId||d.deviceId!==this.options.deviceId)throw new Error("Node host returned inconsistent readiness metadata");clearTimeout(s),r();}this.dispatch(d);}}catch(d){a(d instanceof Error?d:new Error(String(d))),i.kill();}}),i.once("exit",(c,d)=>{clearTimeout(s),this.stopped=true;let h=this.failure(`Node host exited (${c??d??"unknown"})`);this.onEvent({type:"host-exit",error:h}),a(h);});});await this.writeLine({protocolVersion:y,apiKey:this.options.apiKey,secretKey:this.options.secretKey,serviceId:this.options.serviceId,generation:this.options.generation,shardIds:this.options.shardIds,deviceId:this.options.deviceId,roomId:this.roomId,deviceName:this.options.deviceName,stateDirectory:this.options.stateDirectory,maxPeers:this.options.maxPeers,irohRelay:this.options.irohRelay!==false},x),await t;}async request(e,t){if(!this.child||this.stopped||!this.child.stdin.writable)throw new Error("[OpenRTC] Node host is closed.");if(this.pending.size>=z)throw new Error("[OpenRTC] Node host has too many pending requests.");let r=randomUUID(),n=new Promise((i,s)=>{let a=setTimeout(()=>{this.pending.delete(r),s(new Error(`[OpenRTC] Node host ${e} response timed out.`));},A);this.pending.set(r,{resolve:i,reject:s,timer:a});});try{await this.writeLine({type:e,id:r,...t},G);}catch(i){let s=this.pending.get(r);throw s&&clearTimeout(s.timer),this.pending.delete(r),this.failure(i instanceof Error?i.message:String(i))}return n}async close(){if(!this.child||this.stopped)return;let e=this.child;try{await this.request("shutdown",{});}finally{e.stdin.end(),this.stopped||await new Promise(t=>{let r=setTimeout(()=>{e.kill(),t();},2e3);e.once("exit",()=>{clearTimeout(r),t();});});}}parse(e){if(this.output=Buffer.concat([this.output,e]),this.output.length>w&&!this.output.includes(10))throw new Error("Node host output line exceeded its byte limit");let t=[];for(;;){let r=this.output.indexOf(10);if(r<0)break;if(r>w)throw new Error("Node host output line exceeded its byte limit");let n=this.output.subarray(0,r).toString("utf8").trim();this.output=this.output.subarray(r+1),n&&t.push(JSON.parse(n));}return t}writeLine(e,t){let r=`${JSON.stringify(e)}
|
|
2
|
+
`;if(Buffer.byteLength(r,"utf8")-1>t)return Promise.reject(new Error("Node host input line exceeded its byte limit"));let n=this.writeQueue.then(()=>new Promise((i,s)=>{if(!this.child||this.stopped||!this.child.stdin.writable){s(new Error("Node host is closed"));return}this.child.stdin.write(r,a=>{a?s(a):i();});}));return this.writeQueue=n.catch(()=>{}),n}dispatch(e){if(e.type!=="response"){this.onEvent(e);return}let t=this.pending.get(e.id);t&&(clearTimeout(t.timer),this.pending.delete(e.id),e.ok?t.resolve(e.value):t.reject(this.failure(e.error||"Node host request failed")));}failure(e){let t=i=>i.split(this.options.secretKey).join("[REDACTED]"),r=t(e),n=t(this.stderr.toString("utf8")).trim();return new Error(`[OpenRTC] ${r}.${n?` Host stderr: ${n}`:""}`)}failAll(e){for(let t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear();}},I=class{constructor(e,t,r,n){this.id=e;this.peerId=t;this.host=r;this.nativeGeneration=n;this.messages=new Set;this.closeListeners=new Set;this.queued=[];this.isClosed=false;}async send(e){if(this.isClosed)throw new Error("[OpenRTC] Connection is closed.");let t=W(e);await this.host.request("send",{connectionId:this.id,payloadBase64:t.toString("base64")});}onMessage(e){let t=e;this.messages.add(t);for(let r of this.queued.splice(0))p(t,r);return ()=>this.messages.delete(t)}onClose(e){return this.isClosed?p(e,void 0):this.closeListeners.add(e),()=>this.closeListeners.delete(e)}receive(e){if(!this.isClosed){if(this.messages.size===0){this.queued.length===V&&this.queued.shift(),this.queued.push(e);return}for(let t of this.messages)p(t,e);}}close(){if(!this.isClosed){this.isClosed=true,this.queued.length=0;for(let e of this.closeListeners)p(e,void 0);this.messages.clear(),this.closeListeners.clear();}}accepts(e){return J(e,this.nativeGeneration)}replaceGeneration(e){this.nativeGeneration=e;}},E=class{constructor(e,t){this.id=e;this.host=t;this.kind="room";this.listeners=new Set;this.connections=new Map;this.closed=false;}publishAssignment(e){if(this.closed)return Promise.reject(new Error("[OpenRTC] Service room is closed."));let t=(e.priorityDeviceIds??[]).map(n=>u(n,"priorityDeviceId")),r=(e.relevantEntityIds??[]).map(n=>u(n,"relevantEntityId"));return t.length>8||r.length>32||new Set(t).size!==t.length||new Set(r).size!==r.length?Promise.reject(new Error("[OpenRTC] Authority assignment identifiers are invalid.")):this.host.request("publish-assignment",{revision:f(e.revision,"revision"),subjectDeviceId:u(e.subjectDeviceId,"subjectDeviceId"),shardId:u(e.shardId,"shardId",80),priorityDeviceIds:t,relevantEntityIds:r,ttlMs:e.ttlMs===void 0?void 0:f(e.ttlMs,"ttlMs",12e4)})}onConnection(e){this.listeners.add(e);for(let t of this.connections.values())p(e,t);return ()=>this.listeners.delete(e)}project(e){if(this.closed)return;if(e.type==="host-exit"){this.closed=true;for(let c of this.connections.values())c.close();this.connections.clear(),this.listeners.clear();return}if(e.type==="peer-message"){let c=this.connections.get(e.connectionId),d=B(e);c&&d&&c.accepts(d)&&c.receive(Z(e.payloadBase64));return}if(e.type!=="connection-state")return;let t=e.snapshot,r=B(e);if(typeof t.connectionId!="string"||!r)return;let n=this.connections.get(t.connectionId);if(typeof t.state=="string"&&["closed","failed"].includes(t.state.toLowerCase())){n?.accepts(r)&&(n.close(),this.connections.delete(t.connectionId));return}if(n){t.routable===true&&n.replaceGeneration(r);return}let s=typeof t.deviceId=="string"?t.deviceId:null;if(t.routable!==true||!s)return;let a=new I(t.connectionId,s,this.host,r);this.connections.set(a.id,a);for(let c of this.listeners)p(c,a);}async close(){if(!this.closed){this.closed=true;for(let e of this.connections.values())e.close();this.connections.clear(),this.listeners.clear(),await this.host.close();}}};function W(o){let e;if(o instanceof Uint8Array)e=Buffer.from(o);else if(o instanceof ArrayBuffer)e=Buffer.from(o);else if(typeof o=="string")e=Buffer.from(o,"utf8");else {let t=JSON.stringify(o);if(t===void 0)throw new TypeError("[OpenRTC] Message must be a string, bytes, or JSON value.");e=Buffer.from(t,"utf8");}if(e.length>T)throw new RangeError("[OpenRTC] Message exceeds the Node host payload limit.");return e}function Z(o){let e=Buffer.from(o,"base64");if(e.length>T)throw new Error("[OpenRTC] Node host returned an oversized application payload.");try{let t=new TextDecoder("utf-8",{fatal:!0}).decode(e);try{return JSON.parse(t)}catch{return t}}catch{return new Uint8Array(e)}}var S=class{constructor(e){this.listeners=new Set;this.roomPromise=null;this.roomId=null;this.closed=false;this.options=Q(e);}onConnection(e){if(this.closed)throw new Error("[OpenRTC] ServiceNode is closed.");return this.listeners.add(e),()=>this.listeners.delete(e)}listen(e){return this.closed?Promise.reject(new Error("[OpenRTC] ServiceNode is closed.")):(e=u(e,"roomId"),this.roomId&&this.roomId!==e?Promise.reject(new Error("[OpenRTC] A Node ServiceNode owns exactly one room.")):this.roomPromise?this.roomPromise:(this.roomId=e,this.roomPromise=this.open(e),this.roomPromise))}async close(){if(this.closed)return;this.closed=true,await(await this.roomPromise?.catch(()=>null))?.close(),this.listeners.clear();}async open(e){let t,r=new N(this.options,e,n=>t?.project(n));t=new E(e,r);try{return await r.start(),t.onConnection(n=>{for(let i of this.listeners)p(i,{room:t,connection:n});}),t}catch(n){throw this.roomPromise=null,this.roomId=null,n}}};async function ee(o){let e=await K(o);return $(e)}function pe(o,e){let t=c(e,"openrtc/node"),r=new a;return f$1(o,{platform:"native",offlineSupport:()=>t.invoke("openrtc_offline_runtime_support"),createOfflineEnrollmentRequest:async n=>{let i=await t.invoke("start_iroh_node");return t.invoke("openrtc_create_offline_enrollment_request",{trustDomain:n.trustDomain,deviceId:n.deviceId,endpointId:i,enrollmentNonce:crypto.randomUUID(),requestedRoles:n.requestedRoles})},close:()=>r.close(),deviceKeyProvider:a$1(t),deviceIdProvider:async()=>{let n=await t.invoke("get_rtc_local_device_info");return String(n?.deviceId??"")},runtimeFactory:async n=>{let{createIpcClient:i}=await import('./ipcFactory-PRAJ7JP7.js');return i(n,t,r)}})}export{pe as OpenRTC,S as ServiceNode,ee as inspectNodeHost};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var G=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,tt.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tt.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,C(_,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)}get transport_stable_id(){try{let _=e.__wbindgen_add_to_stack_pointer(-16);e.bistream_transport_stable_id(_,this.__wbg_ptr);var t=d().getInt32(_+0,!0),n=d().getFloat64(_+8,!0);return t===0?void 0:n}finally{e.__wbindgen_add_to_stack_pointer(16);}}};Symbol.dispose&&(G.prototype[Symbol.dispose]=G.prototype.free);var $=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,u(t));return p(n)}start(t){e.intounderlyingbytesource_start(this.__wbg_ptr,u(t));}get type(){let t=e.intounderlyingbytesource_type(this.__wbg_ptr);return ht[t]}};Symbol.dispose&&($.prototype[Symbol.dispose]=$.prototype.free);var L=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,et.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,et.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,u(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,u(t));return p(n)}};Symbol.dispose&&(L.prototype[Symbol.dispose]=L.prototype.free);var U=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,nt.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nt.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,u(t));return p(n)}};Symbol.dispose&&(U.prototype[Symbol.dispose]=U.prototype.free);var X=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,_t.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_t.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&&(X.prototype[Symbol.dispose]=X.prototype.free);var K=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_wasmclient_free(t,0);}__acceptOpenRtcBroadcastObject(t,n,_){try{let a=e.__wbindgen_add_to_stack_pointer(-16),w=c(t,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=c(n,e.__wbindgen_export,e.__wbindgen_export2),m=i,h=k(_,e.__wbindgen_export),y=i;e.wasmclient___acceptOpenRtcBroadcastObject(a,this.__wbg_ptr,w,l,f,m,h,y);var r=d().getInt32(a+0,!0),o=d().getInt32(a+4,!0),s=d().getInt32(a+8,!0);if(s)throw p(o);return p(r)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__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),a=i,w=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=e.wasmclient___advancePreferredIrohCarrier(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}__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,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=c(r,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=e.wasmclient___attachMoqCarrier(this.__wbg_ptr,o,s,a,w,u(_),l,f);return p(m)}__attachWebRtcCarrier(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=c(r,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=e.wasmclient___attachWebRtcCarrier(this.__wbg_ptr,o,s,a,w,u(_),l,f);return p(m)}__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,a=e.wasmclient___beginMoqCarrier(this.__wbg_ptr,_,r,o,s);return p(a)}__beginOpenRtcBroadcastPublication(t,n,_,r,o,s,a,w,l){try{let R=e.__wbindgen_add_to_stack_pointer(-16),A=c(t,e.__wbindgen_export,e.__wbindgen_export2),F=i,S=c(n,e.__wbindgen_export,e.__wbindgen_export2),O=i;var f=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i;let M=c(r,e.__wbindgen_export,e.__wbindgen_export2),T=i,N=c(o,e.__wbindgen_export,e.__wbindgen_export2),Q=i;e.wasmclient___beginOpenRtcBroadcastPublication(R,this.__wbg_ptr,A,F,S,O,f,m,M,T,N,Q,s,x(a)?Number.MAX_SAFE_INTEGER:a>>>0,x(w)?Number.MAX_SAFE_INTEGER:w>>>0,x(l)?16777215:l);var h=d().getInt32(R+0,!0),y=d().getInt32(R+4,!0),v=d().getInt32(R+8,!0);if(v)throw p(y);return p(h)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__beginOpenRtcMediaPublication(t,n,_,r,o,s,a){try{let y=e.__wbindgen_add_to_stack_pointer(-16);var w=x(t)?0:c(t,e.__wbindgen_export,e.__wbindgen_export2),l=i;let v=c(n,e.__wbindgen_export,e.__wbindgen_export2),R=i,A=c(_,e.__wbindgen_export,e.__wbindgen_export2),F=i;e.wasmclient___beginOpenRtcMediaPublication(y,this.__wbg_ptr,w,l,v,R,A,F,r,x(o)?Number.MAX_SAFE_INTEGER:o>>>0,x(s)?Number.MAX_SAFE_INTEGER:s>>>0,x(a)?16777215:a);var f=d().getInt32(y+0,!0),m=d().getInt32(y+4,!0),h=d().getInt32(y+8,!0);if(h)throw p(m);return p(f)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__beginPreferredIrohCarrier(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=e.wasmclient___beginPreferredIrohCarrier(this.__wbg_ptr,o,s,a,w,_,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,a=e.wasmclient___beginWebRtcCarrier(this.__wbg_ptr,_,r,o,s);return p(a)}__closeOpenRtcBroadcast(t){try{let r=e.__wbindgen_add_to_stack_pointer(-16),o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i;e.wasmclient___closeOpenRtcBroadcast(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);}}__configureIrohRoutePolicy(t,n,_){var r=x(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),o=i;let s=e.wasmclient___configureIrohRoutePolicy(this.__wbg_ptr,t,r,o,u(_));return p(s)}__configureMoqCarrier(t,n){var _=x(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(_)}__createOpenRtcBroadcastPublisherSigner(){try{let r=e.__wbindgen_add_to_stack_pointer(-16);e.wasmclient___createOpenRtcBroadcastPublisherSigner(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);}}__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=k(t,e.__wbindgen_export),a=i;e.wasmclient___decodeOpenRtcMediaChunk(o,this.__wbg_ptr,s,a);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=k(t,e.__wbindgen_export),a=i;e.wasmclient___decodeOpenRtcMediaControl(o,this.__wbg_ptr,s,a);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=k(n,e.__wbindgen_export),s=i,a=e.wasmclient___deletePersistentIrohPrefix(this.__wbg_ptr,_,r,o,s);return p(a)}__encodeOpenRtcMediaSample(t,n,_,r,o,s){try{let h=e.__wbindgen_add_to_stack_pointer(-16),y=c(t,e.__wbindgen_export,e.__wbindgen_export2),v=i,R=k(s,e.__wbindgen_export),A=i;e.wasmclient___encodeOpenRtcMediaSample(h,this.__wbg_ptr,y,v,n,_,r,o,R,A);var a=d().getInt32(h+0,!0),w=d().getInt32(h+4,!0),l=d().getInt32(h+8,!0),f=d().getInt32(h+12,!0);if(f)throw p(l);var m=P(a,w).slice();return e.__wbindgen_export4(a,w*1,1),m}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)}__forgetManagedRoomGroup(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i;e.wasmclient___forgetManagedRoomGroup(this.__wbg_ptr,n,_);}__getIrohCarrierReadiness(){let t=e.wasmclient___getIrohCarrierReadiness(this.__wbg_ptr);return p(t)}__getOpenRtcBroadcastStats(t){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),a=i;e.wasmclient___getOpenRtcBroadcastStats(o,this.__wbg_ptr,s,a);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);}}__handleIrohCarrierControl(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=e.wasmclient___handleIrohCarrierControl(this.__wbg_ptr,r,o,s,a,u(_));return p(w)}__handleManagedRoomArtifactChunk(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),a=c(t,e.__wbindgen_export,e.__wbindgen_export2),w=i;e.wasmclient___handleManagedRoomArtifactChunk(s,this.__wbg_ptr,a,w,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);}}__handleManagedRoomPreparePage(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),a=c(t,e.__wbindgen_export,e.__wbindgen_export2),w=i;e.wasmclient___handleManagedRoomPreparePage(s,this.__wbg_ptr,a,w,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);}}__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=k(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,a=k(n,e.__wbindgen_export),w=i,l=e.wasmclient___importPersistentIrohNamespace(this.__wbg_ptr,o,s,a,w,_,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)}__initManagedRoomGroup(t,n,_,r){try{let f=e.__wbindgen_add_to_stack_pointer(-16),m=c(t,e.__wbindgen_export,e.__wbindgen_export2),h=i,y=c(n,e.__wbindgen_export,e.__wbindgen_export2),v=i,R=k(_,e.__wbindgen_export),A=i;var o=x(r)?0:k(r,e.__wbindgen_export),s=i;e.wasmclient___initManagedRoomGroup(f,this.__wbg_ptr,m,h,y,v,R,A,o,s);var a=d().getInt32(f+0,!0),w=d().getInt32(f+4,!0),l=d().getInt32(f+8,!0);if(l)throw p(w);return p(a)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__initPersistentIrohProtocols(t){let n=e.wasmclient___initPersistentIrohProtocols(this.__wbg_ptr,u(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),a=i,w=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=e.wasmclient___moqCarrierFailed(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}__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,a=e.wasmclient___moqCarrierPrepared(this.__wbg_ptr,_,r,o,s);return p(a)}__observeOpenRtcBroadcastAdapter(t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),a=i;e.wasmclient___observeOpenRtcBroadcastAdapter(o,this.__wbg_ptr,s,a,u(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);}}__openManagedRoomPayload(t,n,_,r,o,s,a,w){try{let v=e.__wbindgen_add_to_stack_pointer(-16),R=c(t,e.__wbindgen_export,e.__wbindgen_export2),A=i,F=c(r,e.__wbindgen_export,e.__wbindgen_export2),S=i,O=c(o,e.__wbindgen_export,e.__wbindgen_export2),M=i;var l=x(a)?0:c(a,e.__wbindgen_export,e.__wbindgen_export2),f=i;let T=k(w,e.__wbindgen_export),N=i;e.wasmclient___openManagedRoomPayload(v,this.__wbg_ptr,R,A,n,_,F,S,O,M,s,l,f,T,N);var m=d().getInt32(v+0,!0),h=d().getInt32(v+4,!0),y=d().getInt32(v+8,!0);if(y)throw p(h);return p(m)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__openOpenRtcBroadcast(t,n,_,r,o,s){try{let h=e.__wbindgen_add_to_stack_pointer(-16),y=c(t,e.__wbindgen_export,e.__wbindgen_export2),v=i,R=k(n,e.__wbindgen_export),A=i,F=c(_,e.__wbindgen_export,e.__wbindgen_export2),S=i,O=k(r,e.__wbindgen_export),M=i;var a=x(o)?0:c(o,e.__wbindgen_export,e.__wbindgen_export2),w=i;e.wasmclient___openOpenRtcBroadcast(h,this.__wbg_ptr,y,v,R,A,F,S,O,M,a,w,s);var l=d().getInt32(h+0,!0),f=d().getInt32(h+4,!0),m=d().getInt32(h+8,!0);if(m)throw p(f);return p(l)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__pauseOpenRtcBroadcastPublication(t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i;e.wasmclient___pauseOpenRtcBroadcastPublication(o,this.__wbg_ptr,s,a,w,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);}}__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);}}__prepareOpenRtcBroadcastGrant(t,n,_){try{let a=e.__wbindgen_add_to_stack_pointer(-16),w=c(t,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=k(n,e.__wbindgen_export),m=i;e.wasmclient___prepareOpenRtcBroadcastGrant(a,this.__wbg_ptr,w,l,f,m,_);var r=d().getInt32(a+0,!0),o=d().getInt32(a+4,!0),s=d().getInt32(a+8,!0);if(s)throw p(o);return p(r)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__publishOpenRtcBroadcastSample(t,n,_,r,o,s,a){try{let f=e.__wbindgen_add_to_stack_pointer(-16),m=c(t,e.__wbindgen_export,e.__wbindgen_export2),h=i,y=c(n,e.__wbindgen_export,e.__wbindgen_export2),v=i,R=k(a,e.__wbindgen_export),A=i;e.wasmclient___publishOpenRtcBroadcastSample(f,this.__wbg_ptr,m,h,y,v,_,r,o,s,R,A);var w=d().getInt32(f+0,!0),l=d().getInt32(f+4,!0);if(l)throw p(w)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__putPersistentIrohBytes(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=k(n,e.__wbindgen_export),a=i,w=k(_,e.__wbindgen_export),l=i,f=e.wasmclient___putPersistentIrohBytes(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}__queryPersistentIrohNamespace(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=k(n,e.__wbindgen_export),s=i,a=e.wasmclient___queryPersistentIrohNamespace(this.__wbg_ptr,_,r,o,s);return p(a)}__reconcileIrohCarriersAfterNetworkChange(){let t=e.wasmclient___reconcileIrohCarriersAfterNetworkChange(this.__wbg_ptr);return p(t)}__reconcilePersistentIrohProtocols(){let t=e.wasmclient___reconcilePersistentIrohProtocols(this.__wbg_ptr);return p(t)}__releaseOpenRtcBroadcastPublisherSigner(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i;return e.wasmclient___releaseOpenRtcBroadcastPublisherSigner(this.__wbg_ptr,n,_)!==0}__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=x(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let a=e.wasmclient___retireIrohCarrierPeer(this.__wbg_ptr,_,r,o,s);return p(a)}__retireMoqCarrier(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;var o=x(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let a=e.wasmclient___retireMoqCarrier(this.__wbg_ptr,_,r,o,s);return p(a)}__retireOpenRtcBroadcastPublication(t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16),s=c(t,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i;e.wasmclient___retireOpenRtcBroadcastPublication(o,this.__wbg_ptr,s,a,w,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);}}__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),a=i;e.wasmclient___retireOpenRtcMediaReceiver(o,this.__wbg_ptr,s,a,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=x(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let a=e.wasmclient___retireWebRtcCarrier(this.__wbg_ptr,_,r,o,s);return p(a)}__sealManagedRoomPayload(t,n,_,r,o,s,a,w){try{let v=e.__wbindgen_add_to_stack_pointer(-16),R=c(t,e.__wbindgen_export,e.__wbindgen_export2),A=i,F=c(r,e.__wbindgen_export,e.__wbindgen_export2),S=i,O=c(o,e.__wbindgen_export,e.__wbindgen_export2),M=i;var l=x(a)?0:c(a,e.__wbindgen_export,e.__wbindgen_export2),f=i;let T=k(w,e.__wbindgen_export),N=i;e.wasmclient___sealManagedRoomPayload(v,this.__wbg_ptr,R,A,n,_,F,S,O,M,s,l,f,T,N);var m=d().getInt32(v+0,!0),h=d().getInt32(v+4,!0),y=d().getInt32(v+8,!0);if(y)throw p(h);return p(m)}finally{e.__wbindgen_add_to_stack_pointer(16);}}__setIrohCarrierActionHandler(t){e.wasmclient___setIrohCarrierActionHandler(this.__wbg_ptr,x(t)?0:u(t));}__setPersistentIrohHash(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=k(n,e.__wbindgen_export),w=i,l=c(_,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=e.wasmclient___setPersistentIrohHash(this.__wbg_ptr,o,s,a,w,l,f,r);return p(m)}__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)}__takeOpenRtcBroadcastActions(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),a=c(t,e.__wbindgen_export,e.__wbindgen_export2),w=i;e.wasmclient___takeOpenRtcBroadcastActions(s,this.__wbg_ptr,a,w,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);}}__webRtcCarrierFailed(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=e.wasmclient___webRtcCarrierFailed(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}__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,a=e.wasmclient___webRtcCarrierPrepared(this.__wbg_ptr,_,r,o,s);return p(a)}acceptSparseFanoutMessage(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=c(n,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=k(_,e.__wbindgen_export),l=i,f=e.wasmclient_acceptSparseFanoutMessage(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}acknowledge_session_token_response(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i;var l=x(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),f=i;let m=e.wasmclient_acknowledge_session_token_response(this.__wbg_ptr,o,s,a,w,_,l,f);return p(m)}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,a=e.wasmclient_add_peer_scope(this.__wbg_ptr,_,r,o,s);return p(a)}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,a=e.wasmclient_bind_connection_device_id(this.__wbg_ptr,_,r,o,s);return p(a)}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,a=e.wasmclient_bind_node_device_id(this.__wbg_ptr,_,r,o,s);return p(a)}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 a=c(t,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=c(_,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;var y=x(s)?0:c(s,e.__wbindgen_export,e.__wbindgen_export2),v=i;let R=e.wasmclient_confirm_reciprocal_admission(this.__wbg_ptr,a,w,n,l,f,m,h,o,y,v);return p(R)}connect_device(t,n){var _=x(t)?0:c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;let o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=e.wasmclient_connect_device(this.__wbg_ptr,_,r,o,s);return p(a)}connectionApplicationCryptoReady(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;return e.wasmclient_connectionApplicationCryptoReady(this.__wbg_ptr,_,r,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 V.__wrap(t)}create_room(t,n,_,r,o,s){let a=c(t,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=c(n,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=c(_,e.__wbindgen_export,e.__wbindgen_export2),h=i,y=c(r,e.__wbindgen_export,e.__wbindgen_export2),v=i,R=c(o,e.__wbindgen_export,e.__wbindgen_export2),A=i,F=e.wasmclient_create_room(this.__wbg_ptr,a,w,l,f,m,h,y,v,R,A,x(s)?Number.MAX_SAFE_INTEGER:s>>>0);return p(F)}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=k(t,e.__wbindgen_export),a=i;e.wasmclient_decodeIncomingChannelEnvelope(o,this.__wbg_ptr,s,a);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,a=e.wasmclient_delete_device(this.__wbg_ptr,_,r,o,s);return p(a)}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=x(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let a=e.wasmclient_disconnect_device(this.__wbg_ptr,_,r,o,s);return p(a)}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 f=e.__wbindgen_add_to_stack_pointer(-16),m=c(t,e.__wbindgen_export,e.__wbindgen_export2),h=i;e.wasmclient_endpoint_id_from_ticket(f,this.__wbg_ptr,m,h);var r=d().getInt32(f+0,!0),o=d().getInt32(f+4,!0),s=d().getInt32(f+8,!0),a=d().getInt32(f+12,!0),w=r,l=o;if(a)throw w=0,l=0,p(s);return n=w,_=l,C(w,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,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=e.wasmclient_ensureConnectionApplicationCrypto(this.__wbg_ptr,o,s,a,w,_,u(r));return p(l)}finalizeSparseFanoutMessage(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=e.wasmclient_finalizeSparseFanoutMessage(this.__wbg_ptr,_,r,o,s);return p(a)}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),a=i,w=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=e.wasmclient_get_members(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}handleConnectionApplicationCryptoHandshake(t,n,_,r,o){let s=c(t,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i;var f=x(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),m=i;let h=k(o,e.__wbindgen_export),y=i,v=e.wasmclient_handleConnectionApplicationCryptoHandshake(this.__wbg_ptr,s,a,w,l,!x(_),x(_)?BigInt(0):_,f,m,h,y);return p(v)}incoming_streams(){let t=e.wasmclient_incoming_streams(this.__wbg_ptr);return p(t)}initIrohWithTestRelay(t,n){var _=x(t)?0:k(t,e.__wbindgen_export),r=i,o=x(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let a=e.wasmclient_initIrohWithTestRelay(this.__wbg_ptr,_,r,o,s);return p(a)}init_iroh(t){var n=x(t)?0:k(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),a=k(t,e.__wbindgen_export),w=i;e.wasmclient_inspectIncomingStreamPrefix(s,this.__wbg_ptr,a,w,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),a=i,w=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i,h=c(r,e.__wbindgen_export,e.__wbindgen_export2),y=i,v=c(o,e.__wbindgen_export,e.__wbindgen_export2),R=i,A=e.wasmclient_join_room(this.__wbg_ptr,s,a,w,l,f,m,h,y,v,R);return p(A)}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),a=i,w=c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=e.wasmclient_leave_room(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}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),a=i;e.wasmclient_new(o,s,a);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,rt.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),f=c(t,e.__wbindgen_export,e.__wbindgen_export2),m=i,h=k(_,e.__wbindgen_export),y=i;e.wasmclient_openConnectionApplicationPayload(l,this.__wbg_ptr,f,m,n,h,y);var r=d().getInt32(l+0,!0),o=d().getInt32(l+4,!0),s=d().getInt32(l+8,!0),a=d().getInt32(l+12,!0);if(a)throw p(s);var w=P(r,o).slice();return e.__wbindgen_export4(r,o*1,1),w}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,x(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,x(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,x(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,x(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)}prepareSparseFanoutMessage(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=k(n,e.__wbindgen_export),s=i,a=e.wasmclient_prepareSparseFanoutMessage(this.__wbg_ptr,_,r,o,s);return p(a)}prepare_reciprocal_admission(t,n,_,r,o,s,a,w){let l=c(t,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=c(_,e.__wbindgen_export,e.__wbindgen_export2),h=i,y=c(r,e.__wbindgen_export,e.__wbindgen_export2),v=i,R=c(o,e.__wbindgen_export,e.__wbindgen_export2),A=i,F=c(s,e.__wbindgen_export,e.__wbindgen_export2),S=i,O=c(a,e.__wbindgen_export,e.__wbindgen_export2),M=i,T=c(w,e.__wbindgen_export,e.__wbindgen_export2),N=i,Q=e.wasmclient_prepare_reciprocal_admission(this.__wbg_ptr,l,f,n,m,h,y,v,R,A,F,S,O,M,T,N);return p(Q)}present_session_token(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i;var l=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=x(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;let y=e.wasmclient_present_session_token(this.__wbg_ptr,o,s,a,w,l,f,m,h);return p(y)}protectConnectionApplicationPayload(t,n,_){try{let l=e.__wbindgen_add_to_stack_pointer(-16),f=c(t,e.__wbindgen_export,e.__wbindgen_export2),m=i,h=k(_,e.__wbindgen_export),y=i;e.wasmclient_protectConnectionApplicationPayload(l,this.__wbg_ptr,f,m,n,h,y);var r=d().getInt32(l+0,!0),o=d().getInt32(l+4,!0),s=d().getInt32(l+8,!0),a=d().getInt32(l+12,!0);if(a)throw p(s);var w=P(r,o).slice();return e.__wbindgen_export4(r,o*1,1),w}finally{e.__wbindgen_add_to_stack_pointer(16);}}rankRoutes(t,n){try{let s=e.__wbindgen_add_to_stack_pointer(-16),a=it(t,e.__wbindgen_export),w=i,l=it(n,e.__wbindgen_export),f=i;e.wasmclient_rankRoutes(s,this.__wbg_ptr,a,w,l,f);var _=d().getInt32(s+0,!0),r=d().getInt32(s+4,!0),o=Ct(_,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)}recordSparseFanoutForwardQueueDrop(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=e.wasmclient_recordSparseFanoutForwardQueueDrop(this.__wbg_ptr,_,r,n);return p(o)}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),a=i;e.wasmclient_register_session_token(this.__wbg_ptr,r,o,s,a,_);}register_token_until(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i;e.wasmclient_register_token_until(this.__wbg_ptr,o,s,a,w,_,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,a=e.wasmclient_reject_connection_admission(this.__wbg_ptr,_,r,o,s);return p(a)}release_peer_scope(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i;var o=x(n)?0:c(n,e.__wbindgen_export,e.__wbindgen_export2),s=i;let a=e.wasmclient_release_peer_scope(this.__wbg_ptr,_,r,o,s);return p(a)}report_managed_connection_settled(t,n,_,r,o,s){let a=c(t,e.__wbindgen_export,e.__wbindgen_export2),w=i;var l=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),f=i;let m=e.wasmclient_report_managed_connection_settled(this.__wbg_ptr,a,w,n,l,f,!x(r),x(r)?BigInt(0):r,!x(o),x(o)?BigInt(0):o,!x(s),x(s)?BigInt(0):s);return p(m)}report_transport_status(t,n,_,r,o,s){let a=c(t,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=c(n,e.__wbindgen_export,e.__wbindgen_export2),f=i;var m=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),h=i;let y=e.wasmclient_report_transport_status(this.__wbg_ptr,a,w,l,f,m,h,!x(r),x(r)?BigInt(0):r,!x(o),x(o)?BigInt(0):o,!x(s),x(s)?BigInt(0):s);return p(y)}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),a=i;e.wasmclient_revoke_session_token(o,this.__wbg_ptr,s,a);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,a=e.wasmclient_same_peer(this.__wbg_ptr,_,r,o,s);return p(a)}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=k(n,e.__wbindgen_export),a=i,w=e.wasmclient_sendPeerDatagram(this.__wbg_ptr,r,o,s,a,x(_)?Number.MAX_SAFE_INTEGER:_>>>0);return p(w)}send_message(t,n,_,r){let o=c(t,e.__wbindgen_export,e.__wbindgen_export2),s=i,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i;var l=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=x(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;let y=e.wasmclient_send_message(this.__wbg_ptr,o,s,a,w,l,f,m,h);return p(y)}send_native_main_control_frame(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=k(n,e.__wbindgen_export),s=i,a=e.wasmclient_send_native_main_control_frame(this.__wbg_ptr,_,r,o,s);return p(a)}send_peer(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=k(n,e.__wbindgen_export),s=i,a=e.wasmclient_send_peer(this.__wbg_ptr,_,r,o,s);return p(a)}send_peer_application_frame(t,n,_){let r=c(t,e.__wbindgen_export,e.__wbindgen_export2),o=i,s=k(n,e.__wbindgen_export),a=i,w=e.wasmclient_send_peer_application_frame(this.__wbg_ptr,r,o,s,a,x(_)?Number.MAX_SAFE_INTEGER:_>>>0);return p(w)}setConnectionApplicationCryptoKey(t,n){let _=c(t,e.__wbindgen_export,e.__wbindgen_export2),r=i,o=k(n,e.__wbindgen_export),s=i,a=e.wasmclient_setConnectionApplicationCryptoKey(this.__wbg_ptr,_,r,o,s);return p(a)}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=x(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)}sparseFanoutDiagnostics(t){let n=c(t,e.__wbindgen_export,e.__wbindgen_export2),_=i,r=e.wasmclient_sparseFanoutDiagnostics(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),a=i,w=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i;e.wasmclient_start_auto_connect(o,this.__wbg_ptr,s,a,w,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,a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i,l=c(_,e.__wbindgen_export,e.__wbindgen_export2),f=i;var m=x(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i;e.wasmclient_start_presence_loop(this.__wbg_ptr,o,s,a,w,l,f,m,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),a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i;e.wasmclient_submit_browser_desired_peers(s,this.__wbg_ptr,t,a,w);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);}}submit_browser_desired_peers_with_sparse_fanout(t,n,_,r,o,s){let a=c(n,e.__wbindgen_export,e.__wbindgen_export2),w=i;var l=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),f=i,m=x(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),h=i,y=x(o)?0:c(o,e.__wbindgen_export,e.__wbindgen_export2),v=i;let R=e.wasmclient_submit_browser_desired_peers_with_sparse_fanout(this.__wbg_ptr,t,a,w,l,f,m,h,y,v,x(s)?16777215:s?1:0);return p(R)}update_device(t,n,_,r,o){let s=c(t,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i;var f=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i,h=x(o)?0:c(o,e.__wbindgen_export,e.__wbindgen_export2),y=i;let v=e.wasmclient_update_device(this.__wbg_ptr,s,a,w,l,f,m,x(r)?0:u(r),h,y);return p(v)}update_presence(t,n,_,r,o){let s=c(t,e.__wbindgen_export,e.__wbindgen_export2),a=i,w=c(n,e.__wbindgen_export,e.__wbindgen_export2),l=i,f=c(_,e.__wbindgen_export,e.__wbindgen_export2),m=i;var h=x(r)?0:c(r,e.__wbindgen_export,e.__wbindgen_export2),y=i;let v=e.wasmclient_update_presence(this.__wbg_ptr,s,a,w,l,f,m,h,y,!x(o),x(o)?BigInt(0):o);return p(v)}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,a=e.wasmclient_update_session(this.__wbg_ptr,_,r,o,s);return p(a)}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),a=i;var w=x(_)?0:c(_,e.__wbindgen_export,e.__wbindgen_export2),l=i;let f=e.wasmclient_validate_connection_token(this.__wbg_ptr,r,o,s,a,w,l);return p(f)}validate_session_token(t){let n,_;try{let f=e.__wbindgen_add_to_stack_pointer(-16),m=c(t,e.__wbindgen_export,e.__wbindgen_export2),h=i;e.wasmclient_validate_session_token(f,this.__wbg_ptr,m,h);var r=d().getInt32(f+0,!0),o=d().getInt32(f+4,!0),s=d().getInt32(f+8,!0),a=d().getInt32(f+12,!0),w=r,l=o;if(a)throw w=0,l=0,p(s);return n=w,_=l,C(w,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,x(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&&(K.prototype[Symbol.dispose]=K.prototype.free);var V=class b{static __wrap(t){let n=Object.create(b.prototype);return n.__wbg_ptr=t,ot.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ot.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=P(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=k(t,e.__wbindgen_export),a=i;e.wasmpeerdatagrampolicy_pushIncoming(o,this.__wbg_ptr,s,a,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),a=k(t,e.__wbindgen_export),w=i;e.wasmpeerdatagrampolicy_pushOutgoing(s,this.__wbg_ptr,a,w,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,x(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,x(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&&(V.prototype[Symbol.dispose]=V.prototype.free);function Bt(){e.start();}function st(){return {__proto__:null,"./openrtc_bg.js":{__proto__:null,__wbg_Error_9dc85fe1bc224456:function(t,n){let _=Error(C(t,n));return u(_)},__wbg_Number_4779d427bae39753:function(t){return Number(g(t))},__wbg_String_8564e559799eccda:function(t,n){let _=String(g(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 _=g(n),r=typeof _=="bigint"?_:void 0;d().setBigInt64(t+8,x(r)?BigInt(0):r,true),d().setInt32(t+0,!x(r),true);},__wbg___wbindgen_boolean_get_b131b2f36d6b2f55:function(t){let n=g(t),_=typeof n=="boolean"?n:void 0;return x(_)?16777215:_?1:0},__wbg___wbindgen_debug_string_56c147eb1a51f0c4:function(t,n){let _=Z(g(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 g(t)in g(n)},__wbg___wbindgen_is_bigint_df272c65456269c2:function(t){return typeof g(t)=="bigint"},__wbg___wbindgen_is_function_147961669f068cd4:function(t){return typeof g(t)=="function"},__wbg___wbindgen_is_null_ced4761460071341:function(t){return g(t)===null},__wbg___wbindgen_is_object_3a2c414391dbf751:function(t){let n=g(t);return typeof n=="object"&&n!==null},__wbg___wbindgen_is_string_6541b0f6ecd4e8e5:function(t){return typeof g(t)=="string"},__wbg___wbindgen_is_undefined_4410e3c20a99fa97:function(t){return g(t)===void 0},__wbg___wbindgen_jsval_eq_174c93ec61bab0c5:function(t,n){return g(t)===g(n)},__wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c:function(t,n){return g(t)==g(n)},__wbg___wbindgen_number_get_588ed6b97f0d7e14:function(t,n){let _=g(n),r=typeof _=="number"?_:void 0;d().setFloat64(t+8,x(r)?0:r,true),d().setInt32(t+0,!x(r),true);},__wbg___wbindgen_string_get_fa2687d531ed17a5:function(t,n){let _=g(n),r=typeof _=="string"?_:void 0;var o=x(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(C(t,n))},__wbg__wbg_cb_unref_c2301a3c9b78104b:function(t){g(t)._wbg_cb_unref();},__wbg_abort_56c00f462c9261d9:function(t,n){g(t).abort(g(n));},__wbg_abort_f2416f4a9852003e:function(t){g(t).abort();},__wbg_addEventListener_b635263c509aa7de:function(){return I(function(t,n,_,r){g(t).addEventListener(C(n,_),g(r));},arguments)},__wbg_append_c5a0c94a6a73b22e:function(){return I(function(t,n,_,r,o){g(t).append(C(n,_),C(r,o));},arguments)},__wbg_apply_5d99f956e2dda74d:function(){return I(function(t,n,_){let r=g(t).apply(g(n),g(_));return u(r)},arguments)},__wbg_arrayBuffer_cc7704fa158b907a:function(){return I(function(t){let n=g(t).arrayBuffer();return u(n)},arguments)},__wbg_bistream_new:function(t){let n=G.__wrap(t);return u(n)},__wbg_body_442a47f02322d7b0:function(t){let n=g(t).body;return x(n)?0:u(n)},__wbg_buffer_8524b3453cde4918:function(t){let n=g(t).buffer;return u(n)},__wbg_bufferedAmount_c1581bbb06f4f36c:function(t){return g(t).bufferedAmount},__wbg_byobRequest_cc72d210de793e64:function(t){let n=g(t).byobRequest;return x(n)?0:u(n)},__wbg_byteLength_96807b1d9ab24a4c:function(t){return g(t).byteLength},__wbg_byteOffset_a9c7002428843c41:function(t){return g(t).byteOffset},__wbg_call_91f00ddc43e01490:function(){return I(function(t,n){let _=g(t).call(g(n));return u(_)},arguments)},__wbg_call_ec09a4cf93377d3a:function(){return I(function(t,n,_){let r=g(t).call(g(n),g(_));return u(r)},arguments)},__wbg_cancel_f3a197b26dc88b39:function(t){let n=g(t).cancel();return u(n)},__wbg_catch_66060324c27be6f7:function(t,n){let _=g(t).catch(g(n));return u(_)},__wbg_clearTimeout_113b1cde814ec762:function(t){let n=clearTimeout(p(t));return u(n)},__wbg_clearTimeout_333bba87532ab9d3:function(t){let n=clearTimeout(p(t));return u(n)},__wbg_clearTimeout_47a40e3be01ed7a3:function(){return I(function(t,n){g(t).clearTimeout(p(n));},arguments)},__wbg_close_296263cfe1bb2999:function(){return I(function(t){g(t).close();},arguments)},__wbg_close_388d99468213b286:function(){return I(function(t){g(t).close();},arguments)},__wbg_close_4857e22d08b71356:function(){return I(function(t){g(t).close();},arguments)},__wbg_close_f3365df7ba1b74d3:function(t){g(t).close();},__wbg_code_1cda2855fcd9b009:function(t){return g(t).code},__wbg_code_70beb7b22374d55e:function(t){return g(t).code},__wbg_crypto_38df2bab126b63dc:function(t){let n=g(t).crypto;return u(n)},__wbg_data_8a04443c1e5a8cd3:function(t){let n=g(t).data;return u(n)},__wbg_debug_de823612d4d12f74:function(t){console.debug(g(t));},__wbg_dispatchEvent_cc62a6a43d28b01c:function(){return I(function(t,n){return g(t).dispatchEvent(g(n))},arguments)},__wbg_done_6a8439e544ec6206:function(t){return g(t).done},__wbg_enqueue_bbeb09ba0b140f76:function(){return I(function(t,n){g(t).enqueue(g(n));},arguments)},__wbg_entries_4e00eefd3fd54cf1:function(t){let n=g(t).entries();return u(n)},__wbg_entries_5a6a7e7e0df09fe5:function(t){let n=Object.entries(g(t));return u(n)},__wbg_error_6651fee1c71e5da9:function(t){console.error(g(t));},__wbg_error_9a99766f65a03031:function(t,n){console.error(g(t),g(n));},__wbg_error_a6fa202b58aa1cd3:function(t,n){let _,r;try{_=t,r=n,console.error(C(t,n));}finally{e.__wbindgen_export4(_,r,1);}},__wbg_fetch_074561c3e313c86f:function(t){let n=fetch(g(t));return u(n)},__wbg_fetch_22858a12fcf93152:function(t,n){let _=g(t).fetch(g(n));return u(_)},__wbg_from_8a57180716c586ee:function(t){let n=Array.from(g(t));return u(n)},__wbg_getRandomValues_c44a50d8cfdaebeb:function(){return I(function(t,n){g(t).getRandomValues(g(n));},arguments)},__wbg_getRandomValues_cc7f052a444bb2ce:function(){return I(function(t,n){globalThis.crypto.getRandomValues(P(t,n));},arguments)},__wbg_getReader_9facd4f899beac89:function(){return I(function(t){let n=g(t).getReader();return u(n)},arguments)},__wbg_get_44e98e27bda25b5b:function(){return I(function(t,n){let _=Reflect.get(g(t),g(n));return u(_)},arguments)},__wbg_get_4b90d6d8c5deb5d5:function(t,n){let _=g(t)[n>>>0];return u(_)},__wbg_get_52a8a619f7b88df6:function(){return I(function(t,n){let _=Reflect.get(g(t),g(n));return u(_)},arguments)},__wbg_get_done_c21b9933fc9a9e9c:function(t){let n=g(t).done;return x(n)?16777215:n?1:0},__wbg_get_unchecked_46e778e3cec74b5e:function(t,n){let _=g(t)[n>>>0];return u(_)},__wbg_get_value_ad568c7d3db9073f:function(t){let n=g(t).value;return u(n)},__wbg_get_with_ref_key_6412cf3094599694:function(t,n){let _=g(t)[g(n)];return u(_)},__wbg_has_14676d88c1340d2c:function(){return I(function(t,n){return Reflect.has(g(t),g(n))},arguments)},__wbg_headers_5b19cf40627ae54d:function(t){let n=g(t).headers;return u(n)},__wbg_info_a2b5f8a5dae8b26c:function(t){console.info(g(t));},__wbg_instanceof_ArrayBuffer_a581da923203f29f:function(t){let n;try{n=g(t)instanceof ArrayBuffer;}catch{n=false;}return n},__wbg_instanceof_Blob_5c4e145be35f9b1e:function(t){let n;try{n=g(t)instanceof Blob;}catch{n=false;}return n},__wbg_instanceof_Map_7f94c740225003e2:function(t){let n;try{n=g(t)instanceof Map;}catch{n=false;}return n},__wbg_instanceof_Promise_aa24ea31000d4ee6:function(t){let n;try{n=g(t)instanceof Promise;}catch{n=false;}return n},__wbg_instanceof_Response_36a65a969abaa7c6:function(t){let n;try{n=g(t)instanceof Response;}catch{n=false;}return n},__wbg_instanceof_Uint8Array_b6fe1ac89eba107e:function(t){let n;try{n=g(t)instanceof Uint8Array;}catch{n=false;}return n},__wbg_instanceof_Window_9e0fe7d3d1ff4342:function(t){let n;try{n=g(t)instanceof Window;}catch{n=false;}return n},__wbg_isArray_139f48e3c057ede8:function(t){return Array.isArray(g(t))},__wbg_isSafeInteger_c22ccb4af2201fe9:function(t){return Number.isSafeInteger(g(t))},__wbg_iterator_9b36cebf3be7b7cd:function(){return u(Symbol.iterator)},__wbg_length_68a9d5278d084f4f:function(t){return g(t).length},__wbg_length_fb04d16d7bdf6d4c:function(t){return g(t).length},__wbg_log_6614a4effdb4e983:function(t){console.log(g(t));},__wbg_maxRetransmits_dfa0382c31f8e2ca:function(t){let n=g(t).maxRetransmits;return x(n)?16777215:n},__wbg_message_12958526424a887b:function(t,n){let _=g(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=g(t).msCrypto;return u(n)},__wbg_new_0b303268aa395a38:function(){let t=new Array;return u(t)},__wbg_new_189262ff31890c23:function(){return I(function(){let t=new Headers;return u(t)},arguments)},__wbg_new_20b778a4c5c691c3:function(){let t=new Object;return u(t)},__wbg_new_227d7c05414eb861:function(){let t=new Error;return u(t)},__wbg_new_24739629d416f982:function(){return I(function(){let t=new AbortController;return u(t)},arguments)},__wbg_new_5fae30e6b23db8df:function(t,n){let _=new Error(C(t,n));return u(_)},__wbg_new_883c0db065f06efd:function(){return u(new Map)},__wbg_new_a3e5112401a82338:function(){return I(function(t,n){let _=new WebSocket(C(t,n));return u(_)},arguments)},__wbg_new_b06772b280cc6e52:function(t){let n=new Uint8Array(g(t));return u(n)},__wbg_new_from_slice_bb2d1778c0b87eb1:function(t,n){let _=new Uint8Array(P(t,n));return u(_)},__wbg_new_typed_90c3f6c29ba36d19:function(t,n){try{var _={a:t,b:n},r=(s,a)=>{let w=_.a;_.a=0;try{return xt(w,_.b,s,a)}finally{_.a=w;}};let o=new Promise(r);return u(o)}finally{_.a=0;}},__wbg_new_with_byte_offset_and_length_9e1e664fe1a5d385:function(t,n,_){let r=new Uint8Array(g(t),n>>>0,_>>>0);return u(r)},__wbg_new_with_event_init_dict_bd850674488710b1:function(){return I(function(t,n,_){let r=new CustomEvent(C(t,n),g(_));return u(r)},arguments)},__wbg_new_with_into_underlying_sink_2596343f9b6c8e58:function(t){let n=new WritableStream(L.__wrap(t));return u(n)},__wbg_new_with_into_underlying_source_fd904252f385f59c:function(t,n){let _=new ReadableStream(U.__wrap(t),p(n));return u(_)},__wbg_new_with_length_4b57a7a5dc67221c:function(t){let n=new Uint8Array(t>>>0);return u(n)},__wbg_new_with_str_and_init_df876572184fe639:function(){return I(function(t,n,_){let r=new Request(C(t,n),g(_));return u(r)},arguments)},__wbg_new_with_str_sequence_505a4829cc247e79:function(){return I(function(t,n,_){let r=new WebSocket(C(t,n),g(_));return u(r)},arguments)},__wbg_next_8cb028b6ba50743f:function(){return I(function(t){let n=g(t).next();return u(n)},arguments)},__wbg_next_cfd0b146c9538df8:function(t){let n=g(t).next;return u(n)},__wbg_node_84ea875411254db1:function(t){let n=g(t).node;return u(n)},__wbg_now_bce4dc999095ea77:function(){return Date.now()},__wbg_now_e7c6795a7f81e10f:function(t){return g(t).now()},__wbg_parse_a5c06e19bc1187fd:function(t,n){return Date.parse(C(t,n))},__wbg_peerunistream_new:function(t){let n=X.__wrap(t);return u(n)},__wbg_performance_3fcf6e32a7e1ed0a:function(t){let n=g(t).performance;return u(n)},__wbg_process_44c7a14e11e9f69e:function(t){let n=g(t).process;return u(n)},__wbg_protocol_28aaef5ea42981d6:function(t,n){let _=g(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(P(t,n),g(_));},__wbg_push_ceb8ef046afb2041:function(t,n){return g(t).push(g(n))},__wbg_queueMicrotask_4698f900840e3286:function(t){queueMicrotask(g(t));},__wbg_queueMicrotask_477a5533c7100338:function(t){let n=g(t).queueMicrotask;return u(n)},__wbg_randomFillSync_6c25eac9869eb53c:function(){return I(function(t,n){g(t).randomFillSync(p(n));},arguments)},__wbg_read_8426c146431f2905:function(t){let n=g(t).read();return u(n)},__wbg_readyState_25243ad6ce649774:function(t){return g(t).readyState},__wbg_reason_4ec455bac79b33ce:function(t,n){let _=g(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){g(t).releaseLock();},__wbg_removeEventListener_016c1d24523b4730:function(){return I(function(t,n,_,r){g(t).removeEventListener(C(n,_),g(r));},arguments)},__wbg_require_b4edbdcf3e2a1ef0:function(){return I(function(){let t=module.require;return u(t)},arguments)},__wbg_resolve_0183de2e8c6b1d54:function(t){let n=Promise.resolve(g(t));return u(n)},__wbg_respond_3cdb4cf32683fd79:function(){return I(function(t,n){g(t).respond(n>>>0);},arguments)},__wbg_send_77521d09456dd693:function(){return I(function(t,n,_){g(t).send(P(n,_));},arguments)},__wbg_send_99d049cae69c53cc:function(){return I(function(t,n,_){g(t).send(P(n,_));},arguments)},__wbg_send_bac9d3dc4f21ef28:function(){return I(function(t,n,_){g(t).send(C(n,_));},arguments)},__wbg_setTimeout_3a808dd861dd3c12:function(t,n){let _=setTimeout(g(t),n);return u(_)},__wbg_setTimeout_6613a51400c1bf9f:function(){return I(function(t,n,_){let r=g(t).setTimeout(p(n),_);return u(r)},arguments)},__wbg_setTimeout_ef24d2fc3ad97385:function(){return I(function(t,n){let _=setTimeout(g(t),n);return u(_)},arguments)},__wbg_set_5f806304fb633ab3:function(t,n,_){let r=g(t).set(g(n),g(_));return u(r)},__wbg_set_6be42768c690e380:function(t,n,_){g(t)[p(n)]=p(_);},__wbg_set_86698c227e5b9dad:function(t,n,_){g(t).set(P(n,_));},__wbg_set_a6ba3ac0e634b822:function(){return I(function(t,n,_){return Reflect.set(g(t),g(n),g(_))},arguments)},__wbg_set_binaryType_07905e4563fcd9b2:function(t,n){g(t).binaryType=kt[n];},__wbg_set_binaryType_8c2dd2cf1cfc2e28:function(t,n){g(t).binaryType=mt[n];},__wbg_set_body_d1153b16a2b95ca1:function(t,n){g(t).body=g(n);},__wbg_set_bufferedAmountLowThreshold_8969a2db2c745257:function(t,n){g(t).bufferedAmountLowThreshold=n>>>0;},__wbg_set_cache_5a01a8b5e6ca6cf2:function(t,n){g(t).cache=yt[n];},__wbg_set_credentials_e9120ed88b1fc0b8:function(t,n){g(t).credentials=vt[n];},__wbg_set_da33c120a6584674:function(t,n,_){g(t)[n>>>0]=p(_);},__wbg_set_detail_c7af5edea934390b:function(t,n){g(t).detail=g(n);},__wbg_set_handle_event_6147c38b782c7b42:function(t,n){g(t).handleEvent=g(n);},__wbg_set_headers_877ed41890d28af2:function(t,n){g(t).headers=g(n);},__wbg_set_high_water_mark_77da20c49668427d:function(t,n){g(t).highWaterMark=n;},__wbg_set_method_b4ede299b2064f37:function(t,n,_){g(t).method=C(n,_);},__wbg_set_mode_d6c2e1991aa963c6:function(t,n){g(t).mode=It[n];},__wbg_set_onbufferedamountlow_b695487bdd219f98:function(t,n){g(t).onbufferedamountlow=g(n);},__wbg_set_onclose_9cb5c3372e16c192:function(t,n){g(t).onclose=g(n);},__wbg_set_onclose_f8bec1cbeb64aa93:function(t,n){g(t).onclose=g(n);},__wbg_set_onerror_190fe67e911ebf28:function(t,n){g(t).onerror=g(n);},__wbg_set_onmessage_4d57c4ddab951294:function(t,n){g(t).onmessage=g(n);},__wbg_set_onmessage_96337495f0bfb796:function(t,n){g(t).onmessage=g(n);},__wbg_set_onopen_3e2bf6b11d434c2d:function(t,n){g(t).onopen=g(n);},__wbg_set_signal_9022b5aa06a6ce5b:function(t,n){g(t).signal=g(n);},__wbg_signal_41dd1a8913cd0b7d:function(t){let n=g(t).signal;return u(n)},__wbg_stack_3b0d974bbf31e44f:function(t,n){let _=g(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 x(t)?0:u(t)},__wbg_static_accessor_GLOBAL_THIS_95ca6460658b5d13:function(){let t=typeof globalThis>"u"?null:globalThis;return x(t)?0:u(t)},__wbg_static_accessor_SELF_4c95f759a91e9aae:function(){let t=typeof self>"u"?null:self;return x(t)?0:u(t)},__wbg_static_accessor_WINDOW_44b435597f9e9ee7:function(){let t=typeof window>"u"?null:window;return x(t)?0:u(t)},__wbg_status_9e6505cfa3e73a7c:function(t){return g(t).status},__wbg_subarray_42216645a367cd7a:function(t,n,_){let r=g(t).subarray(n>>>0,_>>>0);return u(r)},__wbg_then_254bab9b266a77a5:function(t,n,_){let r=g(t).then(g(n),g(_));return u(r)},__wbg_then_3ea18602c6a5123b:function(t,n){let _=g(t).then(g(n));return u(_)},__wbg_url_72c67c175685a054:function(t,n){let _=g(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 _=g(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=g(t).value;return u(n)},__wbg_versions_276b2795b1c6a219:function(t){let n=g(t).versions;return u(n)},__wbg_view_15fa5865c6b336e3:function(t){let n=g(t).view;return x(n)?0:u(n)},__wbg_warn_633bacc13ba7e6c3:function(t){console.warn(g(t));},__wbg_wasClean_f17429d064911939:function(t){return g(t).wasClean},__wbindgen_cast_0000000000000001:function(t,n){let _=B(t,n,dt);return u(_)},__wbindgen_cast_0000000000000002:function(t,n){let _=B(t,n,ft);return u(_)},__wbindgen_cast_0000000000000003:function(t,n){let _=B(t,n,wt);return u(_)},__wbindgen_cast_0000000000000004:function(t,n){let _=B(t,n,ut);return u(_)},__wbindgen_cast_0000000000000005:function(t,n){let _=B(t,n,lt);return u(_)},__wbindgen_cast_0000000000000006:function(t,n){let _=B(t,n,at);return u(_)},__wbindgen_cast_0000000000000007:function(t,n){let _=B(t,n,pt);return u(_)},__wbindgen_cast_0000000000000008:function(t,n){let _=Ft(t,n,gt);return u(_)},__wbindgen_cast_0000000000000009:function(t,n){let _=B(t,n,bt);return u(_)},__wbindgen_cast_000000000000000a:function(t){return u(t)},__wbindgen_cast_000000000000000b:function(t){return u(t)},__wbindgen_cast_000000000000000c:function(t,n){let _=P(t,n);return u(_)},__wbindgen_cast_000000000000000d:function(t,n){let _=C(t,n);return u(_)},__wbindgen_cast_000000000000000e:function(t){let n=BigInt.asUintN(64,t);return u(n)},__wbindgen_cast_000000000000000f:function(t,n){var _=P(t,n).slice();return e.__wbindgen_export4(t,n*1,1),u(_)},__wbindgen_object_clone_ref:function(t){let n=g(t);return u(n)},__wbindgen_object_drop_ref:function(t){p(t);}}}}function at(b,t){e.__wasm_bindgen_func_elem_28981(b,t);}function pt(b,t){e.__wasm_bindgen_func_elem_30109(b,t);}function gt(b,t){e.__wasm_bindgen_func_elem_30175(b,t);}function bt(b,t){e.__wasm_bindgen_func_elem_38151(b,t);}function dt(b,t,n){e.__wasm_bindgen_func_elem_29181(b,t,u(n));}function wt(b,t,n){e.__wasm_bindgen_func_elem_26549(b,t,u(n));}function ut(b,t,n){e.__wasm_bindgen_func_elem_5922(b,t,u(n));}function lt(b,t,n){e.__wasm_bindgen_func_elem_30837(b,t,u(n));}function ft(b,t,n){try{let o=e.__wbindgen_add_to_stack_pointer(-16);e.__wasm_bindgen_func_elem_39659(o,b,t,u(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 xt(b,t,n,_){e.__wasm_bindgen_func_elem_39661(b,t,u(n),u(_));}var mt=["blob","arraybuffer"],ht=["bytes"],yt=["default","no-store","reload","no-cache","force-cache","only-if-cached"],vt=["omit","same-origin","include"],It=["same-origin","no-cors","cors","navigate"],kt=["arraybuffer","blob"],tt=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)),et=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_intounderlyingsink_free(b,1)),nt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_intounderlyingsource_free(b,1)),_t=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_peerunistream_free(b,1)),rt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_wasmclient_free(b,1)),ot=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbg_wasmpeerdatagrampolicy_free(b,1));function u(b){D===E.length&&E.push(E.length+1);let t=D;return D=E[t],E[t]=b,t}var J=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(b=>e.__wbindgen_export5(b.a,b.b));function Z(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+=Z(b[0]));for(let s=1;s<r;s++)o+=", "+Z(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 At(b){b<1028||(E[b]=D,D=b);}function Ct(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 P(b,t){return b=b>>>0,W().subarray(b/1,b/1+t)}var j=null;function d(){return (j===null||j.buffer.detached===true||j.buffer.detached===void 0&&j.buffer!==e.memory.buffer)&&(j=new DataView(e.memory.buffer)),j}function C(b,t){return St(b>>>0,t)}var q=null;function W(){return (q===null||q.byteLength===0)&&(q=new Uint8Array(e.memory.buffer)),q}function g(b){return E[b]}function I(b,t){try{return b.apply(this,t)}catch(n){e.__wbindgen_export3(u(n));}}var E=new Array(1024).fill(void 0);E.push(void 0,null,true,false);var D=E.length;function x(b){return b==null}function Ft(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,J.unregister(_));},J.register(r,_,_),r}function B(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,J.unregister(_));},J.register(r,_,_),r}function k(b,t){let n=t(b.length*1,1)>>>0;return W().set(b,n/1),i=b.length,n}function it(b,t){let n=t(b.length*4,4)>>>0,_=d();for(let r=0;r<b.length;r++)_.setUint32(n+4*r,u(b[r]),true);return i=b.length,n}function c(b,t,n){if(n===void 0){let a=z.encode(b),w=t(a.length,1)>>>0;return W().subarray(w,w+a.length).set(a),i=a.length,w}let _=b.length,r=t(_,1)>>>0,o=W(),s=0;for(;s<_;s++){let a=b.charCodeAt(s);if(a>127)break;o[r+s]=a;}if(s!==_){s!==0&&(b=b.slice(s)),r=n(r,_,_=s+b.length*3,1)>>>0;let a=W().subarray(r+s,r+_),w=z.encodeInto(b,a);s+=w.written,r=n(r,_,s,1)>>>0;}return i=s,r}function p(b){let t=g(b);return At(b),t}var H=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});H.decode();var Pt=2146435072,Y=0;function St(b,t){return Y+=t,Y>=Pt&&(H=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true}),H.decode(),Y=t),H.decode(W().subarray(b,b+t))}var z=new TextEncoder;"encodeInto"in z||(z.encodeInto=function(b,t){let n=z.encode(b);return t.set(n),{read:b.length,written:n.length}});var i=0,e;function ct(b,t){return e=b.exports,j=null,q=null,e.__wbindgen_start(),e}async function Et(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 Tt(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=st();b instanceof WebAssembly.Module||(b=new WebAssembly.Module(b));let n=new WebAssembly.Instance(b,t);return ct(n)}async function Nt(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=st();(typeof b=="string"||typeof Request=="function"&&b instanceof Request||typeof URL=="function"&&b instanceof URL)&&(b=fetch(b));let{instance:n,module:_}=await Et(await b,t);return ct(n)}export{G as BiStream,$ as IntoUnderlyingByteSource,L as IntoUnderlyingSink,U as IntoUnderlyingSource,X as PeerUniStream,K as WasmClient,V as WasmPeerDatagramPolicy,Nt as default,Tt as initSync,Bt as start};
|
package/dist/openrtc_bg.wasm
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {e,b,d,c}from'./chunk-Z54XUIKZ.js';import {b as b$1}from'./chunk-ZA44REGI.js';import'./chunk-LLZT3MR6.js';import'./chunk-DUY34MGT.js';import'./chunk-CCCYE3XN.js';import'./chunk-N6LGTNUI.js';import'./chunk-JPBW67B3.js';import'./chunk-2GX6GB6L.js';function M(t){let e=t.architecture??(t.advancedFanout===true?"sparse":"auto");if(t.advancedFanout===true&&e!=="sparse")throw new Error("[OpenRTC] advancedFanout conflicts with architecture; use architecture: sparse only.");return {architecture:e,delivery:t.payload??(t.advancedFanout===true?"latest-state":"reliable")}}var R=class{constructor(e){this.mode=e==="sparse"?"sparse":"direct";}create(e){return new w(e,()=>this.mode)}setArchitecture(e){e.phase==="settled"&&(this.mode=e.effective==="sparse"?"sparse":e.effective==="managed"?"managed":"direct");}},w=class{constructor(e,r){this.host=e;this.mode=r;this.sparseForwardQueue=[];this.sparseForwardRunning=false;this.sparseForwardQueueDropsPending=0;this.sparseForwardDropReport=null;this.closed=false;let i=e.client.advanced.runtime.onManagedRoomMessage;this.stopManagedMessage=typeof i=="function"?i.call(e.client.advanced.runtime,a=>{e.deliver(a.senderId,a.payload,a.channel);}):()=>{};}isSparse(){return this.mode()==="sparse"}publishState(e,r){return this.mode()!=="managed"?false:(this.publishManaged(e,r).catch(()=>{}),true)}async sendChannel(e,r){let i=this.mode();if(i==="managed")return await this.publishManaged(e,r),true;if(i!=="sparse")return false;let a=this.host.connections();if(a.length===0)return true;let o=await this.host.client.advanced.runtime.encodeSparseFanoutMessage(this.host.capabilityKey,r);return await Promise.all(a.map(n=>n.send(o))),true}assertTargetedSendAllowed(){if(this.mode()==="managed")throw new Error("[OpenRTC] Targeted messages are not available in managed fanout rooms; use authority mode for targeted request semantics.")}receive(e,r,i){return this.mode()!=="sparse"?false:(i instanceof Uint8Array&&this.receiveSparseBroadcast(e,r,i),true)}close(){this.closed||(this.closed=true,this.stopManagedMessage(),this.sparseForwardQueue.length=0);}publishManaged(e,r){return this.host.client.advanced.runtime.publishManagedRoomMessage({messageId:crypto.randomUUID(),channel:e,priority:1,payload:r})}async receiveSparseBroadcast(e,r,i){let a;try{a=await this.host.client.advanced.runtime.acceptSparseFanoutMessage(this.host.capabilityKey,r,i);}catch{return}if(a.forward){let o=Number.isSafeInteger(a.forwardPeerLimit)&&a.forwardPeerLimit>0?a.forwardPeerLimit:0,n=Number.isSafeInteger(a.forwardQueueCapacity)&&a.forwardQueueCapacity>0?Math.min(a.forwardQueueCapacity,64):0,c=new Set(Array.isArray(a.forwardPeerIds)?a.forwardPeerIds.slice(0,o):[]),s=this.host.connections().filter(u=>u.id!==e.id).filter(u=>c.has(u.remoteNodeId)).slice(0,o);this.enqueueSparseForward(a.forward,s,n);}this.host.deliver(a.authorDeviceId,a.payload);}enqueueSparseForward(e,r,i){if(i===0||r.length===0||this.closed)return;if(this.sparseForwardQueue.length+(this.sparseForwardRunning?1:0)>=i){this.sparseForwardQueueDropsPending+=1,this.flushSparseForwardDropReport();return}this.sparseForwardQueue.push({payload:e,targets:r}),this.sparseForwardRunning||this.drainSparseForwardQueue();}async drainSparseForwardQueue(){if(!this.sparseForwardRunning){this.sparseForwardRunning=true;try{for(;!this.closed;){let e=this.sparseForwardQueue.shift();if(!e)break;await Promise.allSettled(e.targets.map(r=>r.send(e.payload)));}}finally{this.sparseForwardRunning=false,!this.closed&&this.sparseForwardQueue.length>0&&this.drainSparseForwardQueue();}}}flushSparseForwardDropReport(){if(this.sparseForwardDropReport||this.sparseForwardQueueDropsPending===0)return;let e=this.sparseForwardQueueDropsPending;this.sparseForwardQueueDropsPending=0,this.sparseForwardDropReport=this.host.client.advanced.runtime.recordSparseFanoutForwardQueueDrop(this.host.capabilityKey,e).catch(()=>{}).finally(()=>{this.sparseForwardDropReport=null,this.flushSparseForwardDropReport();});}},y=class extends e{constructor(r,i,a,o,n,c="auto"){let s=new R(c);super("room",r,i,a,s);this.membership=o;this.onLeave=n;this.kind="room";this.left=false;this.architectureListeners=new Set;this.authorityAssignmentSnapshot=null;this.authorityAssignmentListeners=new Set;this.architectureSnapshot=x(c);let u=i.advanced.runtime.onRoomArchitectureChange;this.stopArchitecture=typeof u=="function"?u.call(i.advanced.runtime,d=>{if(!(d.epoch<this.architectureSnapshot.epoch)){this.architectureSnapshot=Object.freeze({...d}),this.setArchitecture(d);for(let l of this.architectureListeners)l(this.architectureSnapshot);}}):()=>{};let h=i.advanced.runtime.onRoomAuthorityAssignmentChange;this.stopAuthorityAssignment=typeof h=="function"?h.call(i.advanced.runtime,d=>{this.authorityAssignmentSnapshot=d?O(d):null;for(let l of this.authorityAssignmentListeners)l(S(this.authorityAssignmentSnapshot));}):()=>{};}architecture(){return {...this.architectureSnapshot}}onArchitectureChanged(r){return this.architectureListeners.add(r),r(this.architecture()),()=>this.architectureListeners.delete(r)}authorityAssignment(){return S(this.authorityAssignmentSnapshot)}onAuthorityAssignmentChanged(r){return this.authorityAssignmentListeners.add(r),r(this.authorityAssignment()),()=>this.authorityAssignmentListeners.delete(r)}async leave(){this.left||(this.left=true,await this.onLeave?.()),await this.close();}async close(){this.stopArchitecture(),this.stopAuthorityAssignment(),this.architectureListeners.clear(),this.authorityAssignmentListeners.clear(),await super.close();}};async function L(t,e,r){t.assertOpen();let i=b(e),a=r.access??"capability",{architecture:o,delivery:n}=M(r);return t.activateOnce(`room:${i}`,JSON.stringify({access:a,membership:r.membership??"ephemeral",identity:r.identity??null,maxPeers:r.maxPeers??null,payload:n,architecture:o,advancedFanout:r.advancedFanout===true}),a==="authenticated"?r.auth??t.options.auth:void 0,()=>D(t,i,r,o,n))}async function D(t,e,r,i,a){let o=r.membership??"ephemeral",n=r.access??"capability";if(i==="sparse"&&a!=="latest-state")throw new Error("[OpenRTC] Sparse rooms require payload: latest-state.");if(o==="durable"&&n!=="authenticated")throw new Error("[OpenRTC] Durable room membership requires access: authenticated.");if(r.identity==="session"&&n!=="capability")throw new Error("[OpenRTC] Session room identity requires access: capability.");if(n==="authenticated"){let l=r.auth??t.options.auth;if(!l)throw new Error("[OpenRTC] Authenticated rooms require an auth provider.");let A=await t.deviceId(),v=await t.controlPlane(),m=await v.deviceCertificate(l,A,{kind:"room",id:e});o==="durable"&&await v.durableRoomMembership(m.source,e,"join");let f;try{f=await t.activate({kind:"room",id:e,source:m.source,principalId:m.principalId,deviceId:A,maxPeers:r.maxPeers,autoConnect:!0,durableMembership:o==="durable",advancedFanout:r.advancedFanout,architecture:i,defaultDelivery:a});}catch(I){throw o==="durable"&&await v.durableRoomMembership(m.source,e,"leave").catch(()=>{}),I}let g;return g=new y(e,f,()=>{t.channels.detach(f),t.onClosed(g);},o,o==="durable"?async()=>{await v.durableRoomMembership(m.source,e,"leave");}:void 0,i),t.trackHandle(g)}let c=await(r.identity==="session"?t.sessionPlane():t.controlPlane()),s=await c.capability("room",e,r.maxPeers,r.advancedFanout,i,a),u=String(b$1(s.token).principalId),h=await t.activate({kind:"room",id:e,source:s,principalId:u,deviceId:d(s),maxPeers:r.maxPeers,autoConnect:true,advancedFanout:r.advancedFanout,architecture:i,defaultDelivery:a,controlPlane:c}),d$1;return d$1=new y(e,h,()=>{t.channels.detach(h),t.onClosed(d$1);},"ephemeral",void 0,i),t.trackHandle(d$1)}function T(t,e){t.assertOpen();let r=b(e.roomId),i=b(e.serviceId),a=c(e.deviceId);if(!Number.isSafeInteger(e.generation)||e.generation<1)throw new Error("[OpenRTC] Authority service generation is invalid.");let o=[...e.shardIds].map(b).sort();if(o.length<1||o.length>64||new Set(o).size!==o.length)throw new Error("[OpenRTC] Authority service shards are invalid.");if(!/^[A-Za-z0-9_-]{43}$/.test(e.devicePublicKeyX))throw new Error("[OpenRTC] Authority service device public key is invalid.");if(!/^[A-Za-z0-9_-]{43}$/.test(e.assignmentPublicKeyX))throw new Error("[OpenRTC] Authority assignment public key is invalid.");if(e.maxPeers!==void 0&&(!Number.isSafeInteger(e.maxPeers)||e.maxPeers<1||e.maxPeers>50))throw new Error("[OpenRTC] Authority service maxPeers must be within 1..50.");return t.activateOnce(`room:${r}`,JSON.stringify({architecture:"authority",serviceId:i,generation:e.generation,shardIds:o,deviceId:a,maxPeers:e.maxPeers??null,irohRelay:e.irohRelay,devicePublicKeyX:e.devicePublicKeyX,assignmentPublicKeyX:e.assignmentPublicKeyX,deviceSignerId:t.authorityCallableId(e.deviceSign),grantProviderId:t.authorityCallableId(e.grantProvider)}),void 0,async()=>{let n={type:"capability",token:"",avenue:{kind:"room",id:r},expiresAtMs:Number.MAX_SAFE_INTEGER,irohRelay:e.irohRelay,managedTurn:false},c=await t.activate({kind:"room",id:r,source:n,principalId:i,deviceId:a,maxPeers:e.maxPeers,autoConnect:true,architecture:"authority",defaultDelivery:"reliable",authority:{serviceId:i,generation:e.generation,shardIds:o,deviceId:a,irohRelay:e.irohRelay,devicePublicKeyX:e.devicePublicKeyX,assignmentPublicKeyX:e.assignmentPublicKeyX,deviceSign:e.deviceSign,grantProvider:e.grantProvider}}),s;return s=new y(r,c,()=>{t.channels.detach(c),t.onClosed(s);},"ephemeral",void 0,"authority"),t.trackHandle(s)})}function O(t){return Object.freeze({...t,priorityDeviceIds:Object.freeze([...t.priorityDeviceIds]),relevantEntityIds:Object.freeze([...t.relevantEntityIds])})}function S(t){return t?{...t,priorityDeviceIds:[...t.priorityDeviceIds],relevantEntityIds:[...t.relevantEntityIds]}:null}function x(t){return {requested:t,effective:t==="sparse"?"sparse":"mesh",epoch:0,phase:t==="mesh"||t==="sparse"?"settled":"preparing",reason:t==="auto"?"size":"manual",heldCreditsUsd:0,quoteExpiresAtMs:Date.now()+5*6e4}}export{y as RoomHandle,L as joinRoom,T as openAuthorityRoom,M as resolveRoomJoinOptions};
|
|
@@ -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-D67Ozqo3.js';
|
|
2
|
+
import '../Connection-CTpuImO-.js';
|
|
3
|
+
import '../capabilities-CmzzxSvW.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 {
|
|
1
|
+
import {b}from'../chunk-EIJNERKZ.js';import'../chunk-AYHD4X2R.js';import {a}from'../chunk-FEF3DPPB.js';import'../chunk-GTHSRQ7Y.js';import'../chunk-XTYALGJN.js';import'../chunk-OT7IPLZE.js';import'../chunk-OWKAJPOI.js';import'../chunk-CCCYE3XN.js';import'../chunk-N6LGTNUI.js';import'../chunk-JPBW67B3.js';import'../chunk-2GX6GB6L.js';var n=class extends a{constructor(e){super(new b(e));}setWasmClient(e){this.unwrap().setWasmClient(e);}};export{n as WasmRuntimeAdapter};
|