@mercuryworkshop/epoxy-tls
Advanced tools
Comparing version 1.5.1-1 to 2.0.0-1
453
demo.js
import epoxy from "./pkg/epoxy-module-bundled.js"; | ||
import CERTS from "./pkg/certs-module.js"; | ||
onmessage = async (msg) => { | ||
console.debug("recieved demo:", msg); | ||
let [ | ||
should_feature_test, | ||
should_multiparallel_test, | ||
should_parallel_test, | ||
should_multiperf_test, | ||
should_perf_test, | ||
should_ws_test, | ||
should_tls_test, | ||
should_udp_test, | ||
should_reconnect_test, | ||
should_perf2_test, | ||
] = msg.data; | ||
console.log( | ||
"%cWASM is significantly slower with DevTools open!", | ||
"color:red;font-size:3rem;font-weight:bold" | ||
); | ||
console.debug("recieved demo:", msg); | ||
let [ | ||
should_feature_test, | ||
should_multiparallel_test, | ||
should_parallel_test, | ||
should_multiperf_test, | ||
should_perf_test, | ||
should_ws_test, | ||
should_tls_test, | ||
should_udp_test, | ||
should_reconnect_test, | ||
should_perf2_test, | ||
] = msg.data; | ||
console.log( | ||
"%cWASM is significantly slower with DevTools open!", | ||
"color:red;font-size:3rem;font-weight:bold" | ||
); | ||
const log = (str) => { | ||
console.log(str); | ||
postMessage(str); | ||
} | ||
const log = (str) => { | ||
console.log(str); | ||
postMessage(str); | ||
} | ||
const plog = (str) => { | ||
console.log(str); | ||
postMessage(JSON.stringify(str, null, 4)); | ||
} | ||
const plog = (str) => { | ||
console.log(str); | ||
postMessage(JSON.stringify(str, null, 4)); | ||
} | ||
const { EpoxyClient, certs } = await epoxy(); | ||
const { EpoxyClient, EpoxyClientOptions, EpoxyHandlers } = await epoxy(); | ||
console.log("certs:", certs()); | ||
console.log("certs:", CERTS); | ||
const tconn0 = performance.now(); | ||
// args: websocket url, user agent, redirect limit | ||
let epoxy_client = await new EpoxyClient("ws://localhost:4000", navigator.userAgent, 10); | ||
const tconn1 = performance.now(); | ||
log(`conn establish took ${tconn1 - tconn0} ms or ${(tconn1 - tconn0) / 1000} s`); | ||
let epoxy_client_options = new EpoxyClientOptions(); | ||
epoxy_client_options.user_agent = navigator.userAgent; | ||
// epoxy classes are inspectable | ||
console.log(epoxy_client); | ||
// you can change the user agent and redirect limit in JS | ||
epoxy_client.redirectLimit = 15; | ||
let epoxy_client = new EpoxyClient("ws://localhost:4000", CERTS, epoxy_client_options); | ||
const test_mux = async (url) => { | ||
const t0 = performance.now(); | ||
await epoxy_client.fetch(url); | ||
const t1 = performance.now(); | ||
return t1 - t0; | ||
}; | ||
const tconn0 = performance.now(); | ||
await epoxy_client.replace_stream_provider(); | ||
const tconn1 = performance.now(); | ||
log(`conn establish took ${tconn1 - tconn0} ms or ${(tconn1 - tconn0) / 1000} s`); | ||
const test_native = async (url) => { | ||
const t0 = performance.now(); | ||
await fetch(url, { cache: "no-store" }); | ||
const t1 = performance.now(); | ||
return t1 - t0; | ||
}; | ||
// epoxy classes are inspectable | ||
console.log(epoxy_client); | ||
// you can change the user agent and redirect limit in JS | ||
epoxy_client.redirect_limit = 15; | ||
if (should_feature_test) { | ||
let formdata = new FormData(); | ||
formdata.append("a", "b"); | ||
for (const url of [ | ||
["https://httpbin.org/get", {}], | ||
["https://httpbin.org/gzip", {}], | ||
["https://httpbin.org/brotli", {}], | ||
["https://httpbin.org/redirect/11", {}], | ||
["https://httpbin.org/redirect/1", { redirect: "manual" }], | ||
["https://httpbin.org/post", { method: "POST", body: new URLSearchParams("a=b") }], | ||
["https://httpbin.org/post", { method: "POST", body: formdata }], | ||
["https://httpbin.org/post", { method: "POST", body: "a" }], | ||
["https://httpbin.org/post", { method: "POST", body: (new TextEncoder()).encode("abc") }], | ||
["https://httpbin.org/get", { headers: {"a": "b", "b": "c"} }], | ||
["https://httpbin.org/get", { headers: new Headers({"a": "b", "b": "c"}) }] | ||
]) { | ||
let resp = await epoxy_client.fetch(url[0], url[1]); | ||
console.warn(url, resp, Object.fromEntries(resp.headers)); | ||
log(await resp.text()); | ||
} | ||
} else if (should_multiparallel_test) { | ||
const num_tests = 10; | ||
let total_mux_minus_native = 0; | ||
for (const _ of Array(num_tests).keys()) { | ||
let total_mux = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running mux test ${i}`); | ||
return await test_mux("https://httpbin.org/get"); | ||
})).then((vals) => { total_mux = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_mux = total_mux / num_tests; | ||
const test_mux = async (url) => { | ||
const t0 = performance.now(); | ||
await epoxy_client.fetch(url); | ||
const t1 = performance.now(); | ||
return t1 - t0; | ||
}; | ||
let total_native = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running native test ${i}`); | ||
return await test_native("https://httpbin.org/get"); | ||
})).then((vals) => { total_native = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_native = total_native / num_tests; | ||
const test_native = async (url) => { | ||
const t0 = performance.now(); | ||
await fetch(url, { cache: "no-store" }); | ||
const t1 = performance.now(); | ||
return t1 - t0; | ||
}; | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
total_mux_minus_native += total_mux - total_native; | ||
} | ||
total_mux_minus_native = total_mux_minus_native / num_tests; | ||
log(`total mux - native (${num_tests} tests of ${num_tests} reqs): ${total_mux_minus_native} ms or ${total_mux_minus_native / 1000} s`); | ||
} else if (should_parallel_test) { | ||
const num_tests = 10; | ||
if (should_feature_test) { | ||
let formdata = new FormData(); | ||
formdata.append("a", "b"); | ||
for (const url of [ | ||
["https://httpbin.org/get", {}], | ||
["https://httpbin.org/gzip", {}], | ||
["https://httpbin.org/brotli", {}], | ||
["https://httpbin.org/redirect/11", {}], | ||
["https://httpbin.org/redirect/1", { redirect: "manual" }], | ||
["https://httpbin.org/post", { method: "POST", body: new URLSearchParams("a=b") }], | ||
["https://httpbin.org/post", { method: "POST", body: formdata }], | ||
["https://httpbin.org/post", { method: "POST", body: "a" }], | ||
["https://httpbin.org/post", { method: "POST", body: (new TextEncoder()).encode("abc") }], | ||
["https://httpbin.org/get", { headers: { "a": "b", "b": "c" } }], | ||
["https://httpbin.org/get", { headers: new Headers({ "a": "b", "b": "c" }) }] | ||
]) { | ||
let resp = await epoxy_client.fetch(url[0], url[1]); | ||
console.warn(url, resp, Object.fromEntries(resp.headers)); | ||
log(await resp.text()); | ||
} | ||
} else if (should_multiparallel_test) { | ||
const num_tests = 10; | ||
let total_mux_minus_native = 0; | ||
for (const _ of Array(num_tests).keys()) { | ||
let total_mux = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running mux test ${i}`); | ||
return await test_mux("https://httpbin.org/get"); | ||
})).then((vals) => { total_mux = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_mux = total_mux / num_tests; | ||
let total_mux = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running mux test ${i}`); | ||
return await test_mux("https://httpbin.org/get"); | ||
})).then((vals) => { total_mux = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_mux = total_mux / num_tests; | ||
let total_native = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running native test ${i}`); | ||
return await test_native("https://httpbin.org/get"); | ||
})).then((vals) => { total_native = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_native = total_native / num_tests; | ||
let total_native = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running native test ${i}`); | ||
return await test_native("https://httpbin.org/get"); | ||
})).then((vals) => { total_native = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_native = total_native / num_tests; | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
total_mux_minus_native += total_mux - total_native; | ||
} | ||
total_mux_minus_native = total_mux_minus_native / num_tests; | ||
log(`total mux - native (${num_tests} tests of ${num_tests} reqs): ${total_mux_minus_native} ms or ${total_mux_minus_native / 1000} s`); | ||
} else if (should_parallel_test) { | ||
const num_tests = 10; | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
} else if (should_multiperf_test) { | ||
const num_tests = 10; | ||
let total_mux_minus_native = 0; | ||
for (const _ of Array(num_tests).keys()) { | ||
let total_mux = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running mux test ${i}`); | ||
total_mux += await test_mux("https://httpbin.org/get"); | ||
} | ||
total_mux = total_mux / num_tests; | ||
let total_mux = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running mux test ${i}`); | ||
return await test_mux("https://httpbin.org/get"); | ||
})).then((vals) => { total_mux = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_mux = total_mux / num_tests; | ||
let total_native = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running native test ${i}`); | ||
total_native += await test_native("https://httpbin.org/get"); | ||
} | ||
total_native = total_native / num_tests; | ||
let total_native = 0; | ||
await Promise.all([...Array(num_tests).keys()].map(async i => { | ||
log(`running native test ${i}`); | ||
return await test_native("https://httpbin.org/get"); | ||
})).then((vals) => { total_native = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_native = total_native / num_tests; | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
total_mux_minus_native += total_mux - total_native; | ||
} | ||
total_mux_minus_native = total_mux_minus_native / num_tests; | ||
log(`total mux - native (${num_tests} tests of ${num_tests} reqs): ${total_mux_minus_native} ms or ${total_mux_minus_native / 1000} s`); | ||
} else if (should_perf_test) { | ||
const num_tests = 10; | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
} else if (should_multiperf_test) { | ||
const num_tests = 10; | ||
let total_mux_minus_native = 0; | ||
for (const _ of Array(num_tests).keys()) { | ||
let total_mux = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running mux test ${i}`); | ||
total_mux += await test_mux("https://httpbin.org/get"); | ||
} | ||
total_mux = total_mux / num_tests; | ||
let total_mux = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running mux test ${i}`); | ||
total_mux += await test_mux("https://httpbin.org/get"); | ||
} | ||
total_mux = total_mux / num_tests; | ||
let total_native = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running native test ${i}`); | ||
total_native += await test_native("https://httpbin.org/get"); | ||
} | ||
total_native = total_native / num_tests; | ||
let total_native = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running native test ${i}`); | ||
total_native += await test_native("https://httpbin.org/get"); | ||
} | ||
total_native = total_native / num_tests; | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
total_mux_minus_native += total_mux - total_native; | ||
} | ||
total_mux_minus_native = total_mux_minus_native / num_tests; | ||
log(`total mux - native (${num_tests} tests of ${num_tests} reqs): ${total_mux_minus_native} ms or ${total_mux_minus_native / 1000} s`); | ||
} else if (should_perf_test) { | ||
const num_tests = 10; | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
} else if (should_ws_test) { | ||
let ws = await epoxy_client.connect_ws( | ||
() => log("opened"), | ||
() => log("closed"), | ||
err => console.error(err), | ||
msg => log(msg), | ||
"wss://echo.websocket.events", | ||
[], | ||
"localhost" | ||
); | ||
while (true) { | ||
log("sending `data`"); | ||
await ws.send_text("data"); | ||
await (new Promise((res, _) => setTimeout(res, 50))); | ||
} | ||
} else if (should_tls_test) { | ||
let decoder = new TextDecoder(); | ||
let ws = await epoxy_client.connect_tls( | ||
() => log("opened"), | ||
() => log("closed"), | ||
err => console.error(err), | ||
msg => { console.log(msg); log(decoder.decode(msg)) }, | ||
"google.com:443", | ||
); | ||
await ws.send("GET / HTTP 1.1\r\nHost: google.com\r\nConnection: close\r\n\r\n"); | ||
await (new Promise((res, _) => setTimeout(res, 500))); | ||
await ws.close(); | ||
} else if (should_udp_test) { | ||
let decoder = new TextDecoder(); | ||
// tokio example: `cargo r --example echo-udp -- 127.0.0.1:5000` | ||
let ws = await epoxy_client.connect_udp( | ||
() => log("opened"), | ||
() => log("closed"), | ||
err => console.error(err), | ||
msg => { console.log(msg); log(decoder.decode(msg)) }, | ||
"127.0.0.1:5000", | ||
); | ||
while (true) { | ||
log("sending `data`"); | ||
await ws.send("data"); | ||
await (new Promise((res, _) => setTimeout(res, 50))); | ||
} | ||
} else if (should_reconnect_test) { | ||
while (true) { | ||
try { | ||
await epoxy_client.fetch("https://httpbin.org/get"); | ||
} catch(e) {console.error(e)} | ||
log("sent req"); | ||
await (new Promise((res, _) => setTimeout(res, 500))); | ||
} | ||
} else if (should_perf2_test) { | ||
const num_outer_tests = 10; | ||
const num_inner_tests = 50; | ||
let total_mux_multi = 0; | ||
for (const _ of Array(num_outer_tests).keys()) { | ||
let total_mux = 0; | ||
await Promise.all([...Array(num_inner_tests).keys()].map(async i => { | ||
log(`running mux test ${i}`); | ||
return await test_mux("https://httpbin.org/get"); | ||
})).then((vals) => { total_mux = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_mux = total_mux / num_inner_tests; | ||
let total_mux = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running mux test ${i}`); | ||
total_mux += await test_mux("https://httpbin.org/get"); | ||
} | ||
total_mux = total_mux / num_tests; | ||
log(`avg mux (${num_inner_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
total_mux_multi += total_mux; | ||
} | ||
total_mux_multi = total_mux_multi / num_outer_tests; | ||
log(`total avg mux (${num_outer_tests} tests of ${num_inner_tests} reqs): ${total_mux_multi} ms or ${total_mux_multi / 1000} s`); | ||
let total_native = 0; | ||
for (const i of Array(num_tests).keys()) { | ||
log(`running native test ${i}`); | ||
total_native += await test_native("https://httpbin.org/get"); | ||
} | ||
total_native = total_native / num_tests; | ||
} else { | ||
let resp = await epoxy_client.fetch("https://httpbin.org/get"); | ||
console.log(resp, Object.fromEntries(resp.headers)); | ||
plog(await resp.json()); | ||
} | ||
log("done"); | ||
log(`avg mux (${num_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
log(`avg native (${num_tests}) took ${total_native} ms or ${total_native / 1000} s`); | ||
log(`avg mux - avg native (${num_tests}): ${total_mux - total_native} ms or ${(total_mux - total_native) / 1000} s`); | ||
} else if (should_ws_test) { | ||
let handlers = new EpoxyHandlers( | ||
() => log("opened"), | ||
() => log("closed"), | ||
err => console.error(err), | ||
msg => log(`got "${msg}"`) | ||
); | ||
let ws = await epoxy_client.connect_websocket( | ||
handlers, | ||
"wss://echo.websocket.events", | ||
[], | ||
); | ||
while (true) { | ||
log("sending `data`"); | ||
await ws.send("data"); | ||
await (new Promise((res, _) => setTimeout(res, 10))); | ||
} | ||
} else if (should_tls_test) { | ||
let decoder = new TextDecoder(); | ||
let handlers = new EpoxyHandlers( | ||
() => log("opened"), | ||
() => log("closed"), | ||
err => console.error(err), | ||
msg => { console.log(msg); console.log(decoder.decode(msg).split("\r\n\r\n")[1].length); log(decoder.decode(msg)) }, | ||
); | ||
let ws = await epoxy_client.connect_tls( | ||
handlers, | ||
"google.com:443", | ||
); | ||
await ws.send("GET / HTTP 1.1\r\nHost: google.com\r\nConnection: close\r\n\r\n"); | ||
await (new Promise((res, _) => setTimeout(res, 500))); | ||
await ws.close(); | ||
} else if (should_udp_test) { | ||
let decoder = new TextDecoder(); | ||
let handlers = new EpoxyHandlers( | ||
() => log("opened"), | ||
() => log("closed"), | ||
err => console.error(err), | ||
msg => { console.log(msg); log(decoder.decode(msg)) }, | ||
); | ||
// tokio example: `cargo r --example echo-udp -- 127.0.0.1:5000` | ||
let ws = await epoxy_client.connect_udp( | ||
handlers, | ||
"127.0.0.1:5000", | ||
); | ||
while (true) { | ||
log("sending `data`"); | ||
await ws.send("data"); | ||
await (new Promise((res, _) => setTimeout(res, 10))); | ||
} | ||
} else if (should_reconnect_test) { | ||
while (true) { | ||
try { | ||
await epoxy_client.fetch("https://httpbin.org/get"); | ||
} catch (e) { console.error(e) } | ||
log("sent req"); | ||
await (new Promise((res, _) => setTimeout(res, 500))); | ||
} | ||
} else if (should_perf2_test) { | ||
const num_outer_tests = 10; | ||
const num_inner_tests = 50; | ||
let total_mux_multi = 0; | ||
for (const _ of Array(num_outer_tests).keys()) { | ||
let total_mux = 0; | ||
await Promise.all([...Array(num_inner_tests).keys()].map(async i => { | ||
log(`running mux test ${i}`); | ||
return await test_mux("https://httpbin.org/get"); | ||
})).then((vals) => { total_mux = vals.reduce((acc, x) => acc + x, 0) }); | ||
total_mux = total_mux / num_inner_tests; | ||
log(`avg mux (${num_inner_tests}) took ${total_mux} ms or ${total_mux / 1000} s`); | ||
total_mux_multi += total_mux; | ||
} | ||
total_mux_multi = total_mux_multi / num_outer_tests; | ||
log(`total avg mux (${num_outer_tests} tests of ${num_inner_tests} reqs): ${total_mux_multi} ms or ${total_mux_multi / 1000} s`); | ||
} else { | ||
let resp = await epoxy_client.fetch("https://www.example.com/"); | ||
console.log(resp, Object.fromEntries(resp.headers)); | ||
log(await resp.text()); | ||
} | ||
log("done"); | ||
}; |
{ | ||
"name": "@mercuryworkshop/epoxy-tls", | ||
"version": "1.5.1-1", | ||
"version": "2.0.0-1", | ||
"description": "A wasm library for using raw encrypted tls/ssl/https/websocket streams on the browser", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -6,9 +6,2 @@ declare namespace wasm_bindgen { | ||
*/ | ||
export function init(): void; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function certs(): any; | ||
/** | ||
*/ | ||
export class EpoxyClient { | ||
@@ -25,38 +18,38 @@ /** | ||
/** | ||
* @param {string} ws_url | ||
* @param {string} useragent | ||
* @param {number} redirect_limit | ||
* @param {string} wisp_url | ||
* @param {Array<any>} certs | ||
* @param {EpoxyClientOptions} options | ||
*/ | ||
constructor(ws_url: string, useragent: string, redirect_limit: number); | ||
constructor(wisp_url: string, certs: Array<any>, options: EpoxyClientOptions); | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @returns {Promise<void>} | ||
*/ | ||
replace_stream_provider(): Promise<void>; | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
* @returns {Promise<EpoxyWebSocket>} | ||
*/ | ||
connect_ws(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string, protocols: (string)[], origin: string): Promise<EpxWebSocket>; | ||
connect_websocket(handlers: EpoxyHandlers, url: string, protocols: (string)[]): Promise<EpoxyWebSocket>; | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_tls(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxTlsStream>; | ||
connect_tcp(handlers: EpoxyHandlers, url: string): Promise<EpoxyIoStream>; | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_udp(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxUdpStream>; | ||
connect_tls(handlers: EpoxyHandlers, url: string): Promise<EpoxyIoStream>; | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpoxyUdpStream>} | ||
*/ | ||
connect_udp(handlers: EpoxyHandlers, url: string): Promise<EpoxyUdpStream>; | ||
/** | ||
* @param {string} url | ||
* @param {object} options | ||
@@ -68,18 +61,10 @@ * @returns {Promise<Response>} | ||
*/ | ||
redirectLimit: number; | ||
redirect_limit: number; | ||
/** | ||
*/ | ||
useragent: string; | ||
user_agent: string; | ||
} | ||
/** | ||
*/ | ||
export class EpxTlsStream { | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyClientOptions { | ||
free(): void; | ||
@@ -90,41 +75,22 @@ /** | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxTlsStream>; | ||
redirect_limit: number; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: any): Promise<void>; | ||
udp_extension_required: boolean; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close(): Promise<void>; | ||
user_agent: string; | ||
/** | ||
*/ | ||
readonly url: string; | ||
} | ||
websocket_protocols: (string)[]; | ||
/** | ||
*/ | ||
export class EpxUdpStream { | ||
wisp_v2: boolean; | ||
} | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyHandlers { | ||
free(): void; | ||
/** | ||
*/ | ||
constructor(); | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
@@ -134,56 +100,40 @@ * @param {Function} onclose | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxUdpStream>; | ||
constructor(onopen: Function, onclose: Function, onerror: Function, onmessage: Function); | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: any): Promise<void>; | ||
onclose: Function; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close(): Promise<void>; | ||
onerror: Function; | ||
/** | ||
*/ | ||
readonly url: string; | ||
} | ||
onmessage: Function; | ||
/** | ||
*/ | ||
export class EpxWebSocket { | ||
onopen: Function; | ||
} | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyIoStream { | ||
free(): void; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
constructor(); | ||
send(payload: any): Promise<void>; | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
* @returns {Promise<void>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string, protocols: (string)[], origin: string): Promise<EpxWebSocket>; | ||
close(): Promise<void>; | ||
} | ||
/** | ||
* @param {string} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_text(payload: string): Promise<void>; | ||
export class EpoxyUdpStream { | ||
free(): void; | ||
/** | ||
* @param {Uint8Array} payload | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_binary(payload: Uint8Array): Promise<void>; | ||
send(payload: any): Promise<void>; | ||
/** | ||
@@ -193,11 +143,16 @@ * @returns {Promise<void>} | ||
close(): Promise<void>; | ||
} | ||
/** | ||
*/ | ||
readonly origin: string; | ||
export class EpoxyWebSocket { | ||
free(): void; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
readonly protocols: (string)[]; | ||
send(payload: any): Promise<void>; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
readonly url: string; | ||
close(): Promise<void>; | ||
} | ||
@@ -207,2 +162,3 @@ /** | ||
}\ndeclare function epoxy(maybe_memory?: WebAssembly.Memory): Promise<typeof wasm_bindgen>; | ||
} | ||
declare function epoxy(maybe_memory?: WebAssembly.Memory): Promise<typeof wasm_bindgen>; |
@@ -6,9 +6,2 @@ declare namespace wasm_bindgen { | ||
*/ | ||
export function init(): void; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function certs(): any; | ||
/** | ||
*/ | ||
export class EpoxyClient { | ||
@@ -25,38 +18,38 @@ /** | ||
/** | ||
* @param {string} ws_url | ||
* @param {string} useragent | ||
* @param {number} redirect_limit | ||
* @param {string} wisp_url | ||
* @param {Array<any>} certs | ||
* @param {EpoxyClientOptions} options | ||
*/ | ||
constructor(ws_url: string, useragent: string, redirect_limit: number); | ||
constructor(wisp_url: string, certs: Array<any>, options: EpoxyClientOptions); | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @returns {Promise<void>} | ||
*/ | ||
replace_stream_provider(): Promise<void>; | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
* @returns {Promise<EpoxyWebSocket>} | ||
*/ | ||
connect_ws(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string, protocols: (string)[], origin: string): Promise<EpxWebSocket>; | ||
connect_websocket(handlers: EpoxyHandlers, url: string, protocols: (string)[]): Promise<EpoxyWebSocket>; | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_tls(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxTlsStream>; | ||
connect_tcp(handlers: EpoxyHandlers, url: string): Promise<EpoxyIoStream>; | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_udp(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxUdpStream>; | ||
connect_tls(handlers: EpoxyHandlers, url: string): Promise<EpoxyIoStream>; | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpoxyUdpStream>} | ||
*/ | ||
connect_udp(handlers: EpoxyHandlers, url: string): Promise<EpoxyUdpStream>; | ||
/** | ||
* @param {string} url | ||
* @param {object} options | ||
@@ -68,18 +61,10 @@ * @returns {Promise<Response>} | ||
*/ | ||
redirectLimit: number; | ||
redirect_limit: number; | ||
/** | ||
*/ | ||
useragent: string; | ||
user_agent: string; | ||
} | ||
/** | ||
*/ | ||
export class EpxTlsStream { | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyClientOptions { | ||
free(): void; | ||
@@ -90,41 +75,22 @@ /** | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxTlsStream>; | ||
redirect_limit: number; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: any): Promise<void>; | ||
udp_extension_required: boolean; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close(): Promise<void>; | ||
user_agent: string; | ||
/** | ||
*/ | ||
readonly url: string; | ||
} | ||
websocket_protocols: (string)[]; | ||
/** | ||
*/ | ||
export class EpxUdpStream { | ||
wisp_v2: boolean; | ||
} | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyHandlers { | ||
free(): void; | ||
/** | ||
*/ | ||
constructor(); | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
@@ -134,56 +100,40 @@ * @param {Function} onclose | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxUdpStream>; | ||
constructor(onopen: Function, onclose: Function, onerror: Function, onmessage: Function); | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: any): Promise<void>; | ||
onclose: Function; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close(): Promise<void>; | ||
onerror: Function; | ||
/** | ||
*/ | ||
readonly url: string; | ||
} | ||
onmessage: Function; | ||
/** | ||
*/ | ||
export class EpxWebSocket { | ||
onopen: Function; | ||
} | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyIoStream { | ||
free(): void; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
constructor(); | ||
send(payload: any): Promise<void>; | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
* @returns {Promise<void>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string, protocols: (string)[], origin: string): Promise<EpxWebSocket>; | ||
close(): Promise<void>; | ||
} | ||
/** | ||
* @param {string} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_text(payload: string): Promise<void>; | ||
export class EpoxyUdpStream { | ||
free(): void; | ||
/** | ||
* @param {Uint8Array} payload | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_binary(payload: Uint8Array): Promise<void>; | ||
send(payload: any): Promise<void>; | ||
/** | ||
@@ -193,11 +143,16 @@ * @returns {Promise<void>} | ||
close(): Promise<void>; | ||
} | ||
/** | ||
*/ | ||
readonly origin: string; | ||
export class EpoxyWebSocket { | ||
free(): void; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
readonly protocols: (string)[]; | ||
send(payload: any): Promise<void>; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
readonly url: string; | ||
close(): Promise<void>; | ||
} | ||
@@ -207,2 +162,3 @@ /** | ||
}\nexport default function epoxy(maybe_memory?: WebAssembly.Memory): Promise<typeof wasm_bindgen>; | ||
} | ||
export default function epoxy(maybe_memory?: WebAssembly.Memory): Promise<typeof wasm_bindgen>; |
@@ -6,9 +6,2 @@ declare namespace wasm_bindgen { | ||
*/ | ||
export function init(): void; | ||
/** | ||
* @returns {any} | ||
*/ | ||
export function certs(): any; | ||
/** | ||
*/ | ||
export class EpoxyClient { | ||
@@ -25,38 +18,38 @@ /** | ||
/** | ||
* @param {string} ws_url | ||
* @param {string} useragent | ||
* @param {number} redirect_limit | ||
* @param {string} wisp_url | ||
* @param {Array<any>} certs | ||
* @param {EpoxyClientOptions} options | ||
*/ | ||
constructor(ws_url: string, useragent: string, redirect_limit: number); | ||
constructor(wisp_url: string, certs: Array<any>, options: EpoxyClientOptions); | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @returns {Promise<void>} | ||
*/ | ||
replace_stream_provider(): Promise<void>; | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
* @returns {Promise<EpoxyWebSocket>} | ||
*/ | ||
connect_ws(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string, protocols: (string)[], origin: string): Promise<EpxWebSocket>; | ||
connect_websocket(handlers: EpoxyHandlers, url: string, protocols: (string)[]): Promise<EpoxyWebSocket>; | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_tls(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxTlsStream>; | ||
connect_tcp(handlers: EpoxyHandlers, url: string): Promise<EpoxyIoStream>; | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_udp(onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxUdpStream>; | ||
connect_tls(handlers: EpoxyHandlers, url: string): Promise<EpoxyIoStream>; | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpoxyUdpStream>} | ||
*/ | ||
connect_udp(handlers: EpoxyHandlers, url: string): Promise<EpoxyUdpStream>; | ||
/** | ||
* @param {string} url | ||
* @param {object} options | ||
@@ -68,18 +61,10 @@ * @returns {Promise<Response>} | ||
*/ | ||
redirectLimit: number; | ||
redirect_limit: number; | ||
/** | ||
*/ | ||
useragent: string; | ||
user_agent: string; | ||
} | ||
/** | ||
*/ | ||
export class EpxTlsStream { | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyClientOptions { | ||
free(): void; | ||
@@ -90,41 +75,22 @@ /** | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxTlsStream>; | ||
redirect_limit: number; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: any): Promise<void>; | ||
udp_extension_required: boolean; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close(): Promise<void>; | ||
user_agent: string; | ||
/** | ||
*/ | ||
readonly url: string; | ||
} | ||
websocket_protocols: (string)[]; | ||
/** | ||
*/ | ||
export class EpxUdpStream { | ||
wisp_v2: boolean; | ||
} | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyHandlers { | ||
free(): void; | ||
/** | ||
*/ | ||
constructor(); | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
@@ -134,56 +100,40 @@ * @param {Function} onclose | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string): Promise<EpxUdpStream>; | ||
constructor(onopen: Function, onclose: Function, onerror: Function, onmessage: Function); | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: any): Promise<void>; | ||
onclose: Function; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close(): Promise<void>; | ||
onerror: Function; | ||
/** | ||
*/ | ||
readonly url: string; | ||
} | ||
onmessage: Function; | ||
/** | ||
*/ | ||
export class EpxWebSocket { | ||
onopen: Function; | ||
} | ||
/** | ||
** Return copy of self without private attributes. | ||
*/ | ||
toJSON(): Object; | ||
/** | ||
* Return stringified version of self. | ||
*/ | ||
toString(): string; | ||
export class EpoxyIoStream { | ||
free(): void; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
constructor(); | ||
send(payload: any): Promise<void>; | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
* @returns {Promise<void>} | ||
*/ | ||
static connect(tcp: EpoxyClient, onopen: Function, onclose: Function, onerror: Function, onmessage: Function, url: string, protocols: (string)[], origin: string): Promise<EpxWebSocket>; | ||
close(): Promise<void>; | ||
} | ||
/** | ||
* @param {string} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_text(payload: string): Promise<void>; | ||
export class EpoxyUdpStream { | ||
free(): void; | ||
/** | ||
* @param {Uint8Array} payload | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_binary(payload: Uint8Array): Promise<void>; | ||
send(payload: any): Promise<void>; | ||
/** | ||
@@ -193,11 +143,16 @@ * @returns {Promise<void>} | ||
close(): Promise<void>; | ||
} | ||
/** | ||
*/ | ||
readonly origin: string; | ||
export class EpoxyWebSocket { | ||
free(): void; | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
readonly protocols: (string)[]; | ||
send(payload: any): Promise<void>; | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
readonly url: string; | ||
close(): Promise<void>; | ||
} | ||
@@ -265,35 +220,46 @@ /** | ||
declare interface InitOutput { | ||
readonly __wbg_epxtlsstream_free: (a: number) => void; | ||
readonly __wbg_get_epxtlsstream_url: (a: number, b: number) => void; | ||
readonly epxtlsstream_new: (a: number) => void; | ||
readonly epxtlsstream_connect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; | ||
readonly epxtlsstream_send: (a: number, b: number) => number; | ||
readonly epxtlsstream_close: (a: number) => number; | ||
readonly __wbg_epxudpstream_free: (a: number) => void; | ||
readonly epxudpstream_new: (a: number) => void; | ||
readonly epxudpstream_connect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; | ||
readonly epxudpstream_send: (a: number, b: number) => number; | ||
readonly epxudpstream_close: (a: number) => number; | ||
readonly __wbg_epxwebsocket_free: (a: number) => void; | ||
readonly __wbg_get_epxwebsocket_protocols: (a: number, b: number) => void; | ||
readonly __wbg_get_epxwebsocket_origin: (a: number, b: number) => void; | ||
readonly epxwebsocket_new: (a: number) => void; | ||
readonly epxwebsocket_connect: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number; | ||
readonly epxwebsocket_send_text: (a: number, b: number, c: number) => number; | ||
readonly epxwebsocket_send_binary: (a: number, b: number) => number; | ||
readonly epxwebsocket_close: (a: number) => number; | ||
readonly init: () => void; | ||
readonly certs: (a: number) => void; | ||
readonly __wbg_epoxyiostream_free: (a: number) => void; | ||
readonly epoxyiostream_send: (a: number, b: number) => number; | ||
readonly epoxyiostream_close: (a: number) => number; | ||
readonly __wbg_epoxyudpstream_free: (a: number) => void; | ||
readonly epoxyudpstream_send: (a: number, b: number) => number; | ||
readonly epoxyudpstream_close: (a: number) => number; | ||
readonly __wbg_epoxywebsocket_free: (a: number) => void; | ||
readonly epoxywebsocket_send: (a: number, b: number) => number; | ||
readonly epoxywebsocket_close: (a: number) => number; | ||
readonly __wbg_epoxyclientoptions_free: (a: number) => void; | ||
readonly __wbg_get_epoxyclientoptions_wisp_v2: (a: number) => number; | ||
readonly __wbg_set_epoxyclientoptions_wisp_v2: (a: number, b: number) => void; | ||
readonly __wbg_get_epoxyclientoptions_udp_extension_required: (a: number) => number; | ||
readonly __wbg_set_epoxyclientoptions_udp_extension_required: (a: number, b: number) => void; | ||
readonly __wbg_get_epoxyclientoptions_websocket_protocols: (a: number, b: number) => void; | ||
readonly __wbg_set_epoxyclientoptions_websocket_protocols: (a: number, b: number, c: number) => void; | ||
readonly __wbg_get_epoxyclientoptions_redirect_limit: (a: number) => number; | ||
readonly __wbg_set_epoxyclientoptions_redirect_limit: (a: number, b: number) => void; | ||
readonly __wbg_get_epoxyclientoptions_user_agent: (a: number, b: number) => void; | ||
readonly __wbg_set_epoxyclientoptions_user_agent: (a: number, b: number, c: number) => void; | ||
readonly epoxyclientoptions_new_default: () => number; | ||
readonly __wbg_epoxyhandlers_free: (a: number) => void; | ||
readonly __wbg_get_epoxyhandlers_onopen: (a: number) => number; | ||
readonly __wbg_set_epoxyhandlers_onopen: (a: number, b: number) => void; | ||
readonly __wbg_get_epoxyhandlers_onclose: (a: number) => number; | ||
readonly __wbg_set_epoxyhandlers_onclose: (a: number, b: number) => void; | ||
readonly __wbg_get_epoxyhandlers_onerror: (a: number) => number; | ||
readonly __wbg_set_epoxyhandlers_onerror: (a: number, b: number) => void; | ||
readonly __wbg_get_epoxyhandlers_onmessage: (a: number) => number; | ||
readonly __wbg_set_epoxyhandlers_onmessage: (a: number, b: number) => void; | ||
readonly epoxyhandlers_new: (a: number, b: number, c: number, d: number) => number; | ||
readonly __wbg_epoxyclient_free: (a: number) => void; | ||
readonly __wbg_get_epoxyclient_useragent: (a: number, b: number) => void; | ||
readonly __wbg_set_epoxyclient_useragent: (a: number, b: number, c: number) => void; | ||
readonly __wbg_get_epoxyclient_redirectLimit: (a: number) => number; | ||
readonly __wbg_set_epoxyclient_redirectLimit: (a: number, b: number) => void; | ||
readonly epoxyclient_new: (a: number, b: number, c: number, d: number, e: number) => number; | ||
readonly epoxyclient_connect_ws: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number; | ||
readonly epoxyclient_connect_tls: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; | ||
readonly epoxyclient_connect_udp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; | ||
readonly __wbg_get_epoxyclient_redirect_limit: (a: number) => number; | ||
readonly __wbg_set_epoxyclient_redirect_limit: (a: number, b: number) => void; | ||
readonly __wbg_get_epoxyclient_user_agent: (a: number, b: number) => void; | ||
readonly __wbg_set_epoxyclient_user_agent: (a: number, b: number, c: number) => void; | ||
readonly epoxyclient_new: (a: number, b: number, c: number, d: number, e: number) => void; | ||
readonly epoxyclient_replace_stream_provider: (a: number) => number; | ||
readonly epoxyclient_connect_websocket: (a: number, b: number, c: number, d: number, e: number, f: number) => number; | ||
readonly epoxyclient_connect_tcp: (a: number, b: number, c: number, d: number) => number; | ||
readonly epoxyclient_connect_tls: (a: number, b: number, c: number, d: number) => number; | ||
readonly epoxyclient_connect_udp: (a: number, b: number, c: number, d: number) => number; | ||
readonly epoxyclient_fetch: (a: number, b: number, c: number, d: number) => number; | ||
readonly __wbg_get_epxwebsocket_url: (a: number, b: number) => void; | ||
readonly __wbg_get_epxudpstream_url: (a: number, b: number) => void; | ||
readonly ring_core_0_17_8_bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void; | ||
readonly __wbg_intounderlyingbytesource_free: (a: number) => void; | ||
@@ -312,23 +278,2 @@ readonly intounderlyingbytesource_type: (a: number, b: number) => void; | ||
readonly intounderlyingsink_abort: (a: number, b: number) => number; | ||
readonly ring_core_0_17_8_bn_mul_mont: (a: number, b: number, c: number, d: number, e: number, f: number) => void; | ||
readonly BrotliDecoderCreateInstance: (a: number, b: number, c: number) => number; | ||
readonly BrotliDecoderSetParameter: (a: number, b: number, c: number) => void; | ||
readonly BrotliDecoderDecompressPrealloc: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void; | ||
readonly BrotliDecoderDecompressWithReturnInfo: (a: number, b: number, c: number, d: number, e: number) => void; | ||
readonly BrotliDecoderDecompress: (a: number, b: number, c: number, d: number) => number; | ||
readonly BrotliDecoderDecompressStream: (a: number, b: number, c: number, d: number, e: number, f: number) => number; | ||
readonly BrotliDecoderDecompressStreaming: (a: number, b: number, c: number, d: number, e: number) => number; | ||
readonly BrotliDecoderMallocU8: (a: number, b: number) => number; | ||
readonly BrotliDecoderFreeU8: (a: number, b: number, c: number) => void; | ||
readonly BrotliDecoderMallocUsize: (a: number, b: number) => number; | ||
readonly BrotliDecoderFreeUsize: (a: number, b: number, c: number) => void; | ||
readonly BrotliDecoderDestroyInstance: (a: number) => void; | ||
readonly BrotliDecoderHasMoreOutput: (a: number) => number; | ||
readonly BrotliDecoderTakeOutput: (a: number, b: number) => number; | ||
readonly BrotliDecoderIsUsed: (a: number) => number; | ||
readonly BrotliDecoderIsFinished: (a: number) => number; | ||
readonly BrotliDecoderGetErrorCode: (a: number) => number; | ||
readonly BrotliDecoderGetErrorString: (a: number) => number; | ||
readonly BrotliDecoderErrorString: (a: number) => number; | ||
readonly BrotliDecoderVersion: () => number; | ||
readonly memory: WebAssembly.Memory; | ||
@@ -338,10 +283,10 @@ readonly __wbindgen_malloc: (a: number, b: number) => number; | ||
readonly __wbindgen_export_3: WebAssembly.Table; | ||
readonly _dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h426184612d771153: (a: number, b: number) => void; | ||
readonly _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8596994c9cb05193: (a: number, b: number, c: number) => void; | ||
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8809037ebe8830a7: (a: number, b: number) => void; | ||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0214c165a231e368: (a: number, b: number, c: number) => void; | ||
readonly _dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h35e6c92e04e1c007: (a: number, b: number, c: number) => void; | ||
readonly _dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha2feff3edfa4e000: (a: number, b: number) => void; | ||
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h47c277be74871fb3: (a: number, b: number) => void; | ||
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he7cfcb6792a80091: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_add_to_stack_pointer: (a: number) => number; | ||
readonly __wbindgen_free: (a: number, b: number, c: number) => void; | ||
readonly __wbindgen_exn_store: (a: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke2_mut__h04c18c2ef5697aa1: (a: number, b: number, c: number, d: number) => void; | ||
readonly wasm_bindgen__convert__closures__invoke2_mut__h13d5968d1f5eae39: (a: number, b: number, c: number, d: number) => void; | ||
readonly __wbindgen_thread_destroy: (a?: number, b?: number) => void; | ||
@@ -348,0 +293,0 @@ readonly __wbindgen_start: () => void; |
1784
pkg/epoxy.js
@@ -214,8 +214,8 @@ let epoxy; | ||
} | ||
function __wbg_adapter_36(arg0, arg1) { | ||
wasm._dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h426184612d771153(arg0, arg1); | ||
function __wbg_adapter_36(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h35e6c92e04e1c007(arg0, arg1, addHeapObject(arg2)); | ||
} | ||
function __wbg_adapter_39(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8596994c9cb05193(arg0, arg1, addHeapObject(arg2)); | ||
function __wbg_adapter_39(arg0, arg1) { | ||
wasm._dyn_core__ops__function__Fn_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha2feff3edfa4e000(arg0, arg1); | ||
} | ||
@@ -248,24 +248,9 @@ | ||
function __wbg_adapter_42(arg0, arg1) { | ||
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8809037ebe8830a7(arg0, arg1); | ||
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h47c277be74871fb3(arg0, arg1); | ||
} | ||
function __wbg_adapter_45(arg0, arg1, arg2) { | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0214c165a231e368(arg0, arg1, addHeapObject(arg2)); | ||
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__he7cfcb6792a80091(arg0, arg1, addHeapObject(arg2)); | ||
} | ||
function getCachedStringFromWasm0(ptr, len) { | ||
if (ptr === 0) { | ||
return getObject(len); | ||
} else { | ||
return getStringFromWasm0(ptr, len); | ||
} | ||
} | ||
function _assertClass(instance, klass) { | ||
if (!(instance instanceof klass)) { | ||
throw new Error(`expected instance of ${klass.name}`); | ||
} | ||
return instance.ptr; | ||
} | ||
let cachedUint32Memory0 = null; | ||
@@ -300,26 +285,9 @@ | ||
} | ||
/** | ||
*/ | ||
__exports.init = function() { | ||
wasm.init(); | ||
}; | ||
/** | ||
* @returns {any} | ||
*/ | ||
__exports.certs = function() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.certs(retptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
return takeObject(r0); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
function _assertClass(instance, klass) { | ||
if (!(instance instanceof klass)) { | ||
throw new Error(`expected instance of ${klass.name}`); | ||
} | ||
}; | ||
return instance.ptr; | ||
} | ||
@@ -333,2 +301,5 @@ function handleError(f, args) { | ||
} | ||
function __wbg_adapter_153(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h13d5968d1f5eae39(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -339,5 +310,2 @@ function getArrayU8FromWasm0(ptr, len) { | ||
} | ||
function __wbg_adapter_235(arg0, arg1, arg2, arg3) { | ||
wasm.wasm_bindgen__convert__closures__invoke2_mut__h04c18c2ef5697aa1(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3)); | ||
} | ||
@@ -351,14 +319,6 @@ const EpoxyClientFinalization = (typeof FinalizationRegistry === 'undefined') | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(EpoxyClient.prototype); | ||
obj.__wbg_ptr = ptr; | ||
EpoxyClientFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
toJSON() { | ||
return { | ||
useragent: this.useragent, | ||
redirectLimit: this.redirectLimit, | ||
redirect_limit: this.redirect_limit, | ||
user_agent: this.user_agent, | ||
}; | ||
@@ -383,142 +343,153 @@ } | ||
/** | ||
* @returns {number} | ||
*/ | ||
get redirect_limit() { | ||
const ret = wasm.__wbg_get_epoxyclient_redirect_limit(this.__wbg_ptr); | ||
return ret >>> 0; | ||
} | ||
/** | ||
* @param {number} arg0 | ||
*/ | ||
set redirect_limit(arg0) { | ||
wasm.__wbg_set_epoxyclient_redirect_limit(this.__wbg_ptr, arg0); | ||
} | ||
/** | ||
* @returns {string} | ||
*/ | ||
get useragent() { | ||
get user_agent() { | ||
let deferred1_0; | ||
let deferred1_1; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.__wbg_get_epoxyclient_useragent(retptr, this.__wbg_ptr); | ||
wasm.__wbg_get_epoxyclient_user_agent(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getCachedStringFromWasm0(r0, r1); | ||
if (r0 !== 0) { wasm.__wbindgen_free(r0, r1, 1); } | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
deferred1_0 = r0; | ||
deferred1_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); | ||
} | ||
} | ||
/** | ||
* @param {string} arg0 | ||
*/ | ||
set user_agent(arg0) { | ||
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.__wbg_set_epoxyclient_user_agent(this.__wbg_ptr, ptr0, len0); | ||
} | ||
/** | ||
* @param {string} wisp_url | ||
* @param {Array<any>} certs | ||
* @param {EpoxyClientOptions} options | ||
*/ | ||
constructor(wisp_url, certs, options) { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
const ptr0 = passStringToWasm0(wisp_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
_assertClass(options, EpoxyClientOptions); | ||
var ptr1 = options.__destroy_into_raw(); | ||
wasm.epoxyclient_new(retptr, ptr0, len0, addHeapObject(certs), ptr1); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
this.__wbg_ptr = r0 >>> 0; | ||
return this; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
replace_stream_provider() { | ||
const ret = wasm.epoxyclient_replace_stream_provider(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @returns {Promise<EpoxyWebSocket>} | ||
*/ | ||
connect_websocket(handlers, url, protocols) { | ||
_assertClass(handlers, EpoxyHandlers); | ||
var ptr0 = handlers.__destroy_into_raw(); | ||
const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passArrayJsValueToWasm0(protocols, wasm.__wbindgen_malloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_connect_websocket(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_tcp(handlers, url) { | ||
_assertClass(handlers, EpoxyHandlers); | ||
var ptr0 = handlers.__destroy_into_raw(); | ||
const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_connect_tcp(this.__wbg_ptr, ptr0, ptr1, len1); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpoxyIoStream>} | ||
*/ | ||
connect_tls(handlers, url) { | ||
_assertClass(handlers, EpoxyHandlers); | ||
var ptr0 = handlers.__destroy_into_raw(); | ||
const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_connect_tls(this.__wbg_ptr, ptr0, ptr1, len1); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {EpoxyHandlers} handlers | ||
* @param {string} url | ||
* @returns {Promise<EpoxyUdpStream>} | ||
*/ | ||
connect_udp(handlers, url) { | ||
_assertClass(handlers, EpoxyHandlers); | ||
var ptr0 = handlers.__destroy_into_raw(); | ||
const ptr1 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_connect_udp(this.__wbg_ptr, ptr0, ptr1, len1); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {string} url | ||
* @param {object} options | ||
* @returns {Promise<Response>} | ||
*/ | ||
fetch(url, options) { | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_fetch(this.__wbg_ptr, ptr0, len0, addHeapObject(options)); | ||
return takeObject(ret); | ||
} | ||
} | ||
/** | ||
* @param {string} arg0 | ||
*/ | ||
set useragent(arg0) { | ||
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.__wbg_set_epoxyclient_useragent(this.__wbg_ptr, ptr0, len0); | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get redirectLimit() { | ||
const ret = wasm.__wbg_get_epoxyclient_redirectLimit(this.__wbg_ptr); | ||
return ret >>> 0; | ||
} | ||
/** | ||
* @param {number} arg0 | ||
*/ | ||
set redirectLimit(arg0) { | ||
wasm.__wbg_set_epoxyclient_redirectLimit(this.__wbg_ptr, arg0); | ||
} | ||
/** | ||
* @param {string} ws_url | ||
* @param {string} useragent | ||
* @param {number} redirect_limit | ||
*/ | ||
constructor(ws_url, useragent, redirect_limit) { | ||
const ptr0 = passStringToWasm0(ws_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passStringToWasm0(useragent, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_new(ptr0, len0, ptr1, len1, redirect_limit); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
*/ | ||
connect_ws(onopen, onclose, onerror, onmessage, url, protocols, origin) { | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passArrayJsValueToWasm0(protocols, wasm.__wbindgen_malloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(origin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_connect_ws(this.__wbg_ptr, addHeapObject(onopen), addHeapObject(onclose), addHeapObject(onerror), addHeapObject(onmessage), ptr0, len0, ptr1, len1, ptr2, len2); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
*/ | ||
connect_tls(onopen, onclose, onerror, onmessage, url) { | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_connect_tls(this.__wbg_ptr, addHeapObject(onopen), addHeapObject(onclose), addHeapObject(onerror), addHeapObject(onmessage), ptr0, len0); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
*/ | ||
connect_udp(onopen, onclose, onerror, onmessage, url) { | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_connect_udp(this.__wbg_ptr, addHeapObject(onopen), addHeapObject(onclose), addHeapObject(onerror), addHeapObject(onmessage), ptr0, len0); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {string} url | ||
* @param {object} options | ||
* @returns {Promise<Response>} | ||
*/ | ||
fetch(url, options) { | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.epoxyclient_fetch(this.__wbg_ptr, ptr0, len0, addHeapObject(options)); | ||
return takeObject(ret); | ||
} | ||
} | ||
__exports.EpoxyClient = EpoxyClient; | ||
const EpxTlsStreamFinalization = (typeof FinalizationRegistry === 'undefined') | ||
const EpoxyClientOptionsFinalization = (typeof FinalizationRegistry === 'undefined') | ||
? { register: () => {}, unregister: () => {} } | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epxtlsstream_free(ptr >>> 0)); | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epoxyclientoptions_free(ptr >>> 0)); | ||
/** | ||
*/ | ||
class EpxTlsStream { | ||
class EpoxyClientOptions { | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(EpxTlsStream.prototype); | ||
obj.__wbg_ptr = ptr; | ||
EpxTlsStreamFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
toJSON() { | ||
return { | ||
url: this.url, | ||
}; | ||
} | ||
toString() { | ||
return JSON.stringify(this); | ||
} | ||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
EpxTlsStreamFinalization.unregister(this); | ||
EpoxyClientOptionsFinalization.unregister(this); | ||
return ptr; | ||
@@ -529,101 +500,251 @@ } | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_epxtlsstream_free(ptr); | ||
wasm.__wbg_epoxyclientoptions_free(ptr); | ||
} | ||
/** | ||
* @returns {boolean} | ||
*/ | ||
get wisp_v2() { | ||
const ret = wasm.__wbg_get_epoxyclientoptions_wisp_v2(this.__wbg_ptr); | ||
return ret !== 0; | ||
} | ||
/** | ||
* @param {boolean} arg0 | ||
*/ | ||
set wisp_v2(arg0) { | ||
wasm.__wbg_set_epoxyclientoptions_wisp_v2(this.__wbg_ptr, arg0); | ||
} | ||
/** | ||
* @returns {boolean} | ||
*/ | ||
get udp_extension_required() { | ||
const ret = wasm.__wbg_get_epoxyclientoptions_udp_extension_required(this.__wbg_ptr); | ||
return ret !== 0; | ||
} | ||
/** | ||
* @param {boolean} arg0 | ||
*/ | ||
set udp_extension_required(arg0) { | ||
wasm.__wbg_set_epoxyclientoptions_udp_extension_required(this.__wbg_ptr, arg0); | ||
} | ||
/** | ||
* @returns {(string)[]} | ||
*/ | ||
get websocket_protocols() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.__wbg_get_epoxyclientoptions_websocket_protocols(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 4, 4); | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @param {(string)[]} arg0 | ||
*/ | ||
set websocket_protocols(arg0) { | ||
const ptr0 = passArrayJsValueToWasm0(arg0, wasm.__wbindgen_malloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.__wbg_set_epoxyclientoptions_websocket_protocols(this.__wbg_ptr, ptr0, len0); | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get redirect_limit() { | ||
const ret = wasm.__wbg_get_epoxyclientoptions_redirect_limit(this.__wbg_ptr); | ||
return ret >>> 0; | ||
} | ||
/** | ||
* @param {number} arg0 | ||
*/ | ||
set redirect_limit(arg0) { | ||
wasm.__wbg_set_epoxyclientoptions_redirect_limit(this.__wbg_ptr, arg0); | ||
} | ||
/** | ||
* @returns {string} | ||
*/ | ||
get url() { | ||
get user_agent() { | ||
let deferred1_0; | ||
let deferred1_1; | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.__wbg_get_epxtlsstream_url(retptr, this.__wbg_ptr); | ||
wasm.__wbg_get_epoxyclientoptions_user_agent(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getCachedStringFromWasm0(r0, r1); | ||
if (r0 !== 0) { wasm.__wbindgen_free(r0, r1, 1); } | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
deferred1_0 = r0; | ||
deferred1_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); | ||
} | ||
} | ||
/** | ||
* @param {string} arg0 | ||
*/ | ||
set user_agent(arg0) { | ||
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
wasm.__wbg_set_epoxyclientoptions_user_agent(this.__wbg_ptr, ptr0, len0); | ||
} | ||
/** | ||
*/ | ||
constructor() { | ||
const ret = wasm.epoxyclientoptions_new_default(); | ||
this.__wbg_ptr = ret >>> 0; | ||
return this; | ||
} | ||
} | ||
__exports.EpoxyClientOptions = EpoxyClientOptions; | ||
const EpoxyHandlersFinalization = (typeof FinalizationRegistry === 'undefined') | ||
? { register: () => {}, unregister: () => {} } | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epoxyhandlers_free(ptr >>> 0)); | ||
/** | ||
*/ | ||
constructor() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.epxtlsstream_new(retptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
this.__wbg_ptr = r0 >>> 0; | ||
class EpoxyHandlers { | ||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
EpoxyHandlersFinalization.unregister(this); | ||
return ptr; | ||
} | ||
free() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_epoxyhandlers_free(ptr); | ||
} | ||
/** | ||
* @returns {Function} | ||
*/ | ||
get onopen() { | ||
const ret = wasm.__wbg_get_epoxyhandlers_onopen(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Function} arg0 | ||
*/ | ||
set onopen(arg0) { | ||
wasm.__wbg_set_epoxyhandlers_onopen(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
/** | ||
* @returns {Function} | ||
*/ | ||
get onclose() { | ||
const ret = wasm.__wbg_get_epoxyhandlers_onclose(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Function} arg0 | ||
*/ | ||
set onclose(arg0) { | ||
wasm.__wbg_set_epoxyhandlers_onclose(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
/** | ||
* @returns {Function} | ||
*/ | ||
get onerror() { | ||
const ret = wasm.__wbg_get_epoxyhandlers_onerror(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Function} arg0 | ||
*/ | ||
set onerror(arg0) { | ||
wasm.__wbg_set_epoxyhandlers_onerror(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
/** | ||
* @returns {Function} | ||
*/ | ||
get onmessage() { | ||
const ret = wasm.__wbg_get_epoxyhandlers_onmessage(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Function} arg0 | ||
*/ | ||
set onmessage(arg0) { | ||
wasm.__wbg_set_epoxyhandlers_onmessage(this.__wbg_ptr, addHeapObject(arg0)); | ||
} | ||
/** | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
*/ | ||
constructor(onopen, onclose, onerror, onmessage) { | ||
const ret = wasm.epoxyhandlers_new(addHeapObject(onopen), addHeapObject(onclose), addHeapObject(onerror), addHeapObject(onmessage)); | ||
this.__wbg_ptr = ret >>> 0; | ||
return this; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxTlsStream>} | ||
*/ | ||
static connect(tcp, onopen, onclose, onerror, onmessage, url) { | ||
_assertClass(tcp, EpoxyClient); | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.epxtlsstream_connect(tcp.__wbg_ptr, addHeapObject(onopen), addHeapObject(onclose), addHeapObject(onerror), addHeapObject(onmessage), ptr0, len0); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload) { | ||
const ret = wasm.epxtlsstream_send(this.__wbg_ptr, addHeapObject(payload)); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close() { | ||
const ret = wasm.epxtlsstream_close(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
__exports.EpxTlsStream = EpxTlsStream; | ||
__exports.EpoxyHandlers = EpoxyHandlers; | ||
const EpxUdpStreamFinalization = (typeof FinalizationRegistry === 'undefined') | ||
const EpoxyIoStreamFinalization = (typeof FinalizationRegistry === 'undefined') | ||
? { register: () => {}, unregister: () => {} } | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epxudpstream_free(ptr >>> 0)); | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epoxyiostream_free(ptr >>> 0)); | ||
/** | ||
*/ | ||
class EpxUdpStream { | ||
class EpoxyIoStream { | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(EpxUdpStream.prototype); | ||
const obj = Object.create(EpoxyIoStream.prototype); | ||
obj.__wbg_ptr = ptr; | ||
EpxUdpStreamFinalization.register(obj, obj.__wbg_ptr, obj); | ||
EpoxyIoStreamFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
toJSON() { | ||
return { | ||
url: this.url, | ||
}; | ||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
EpoxyIoStreamFinalization.unregister(this); | ||
return ptr; | ||
} | ||
toString() { | ||
return JSON.stringify(this); | ||
free() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_epoxyiostream_free(ptr); | ||
} | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload) { | ||
const ret = wasm.epoxyiostream_send(this.__wbg_ptr, addHeapObject(payload)); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close() { | ||
const ret = wasm.epoxyiostream_close(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
__exports.EpoxyIoStream = EpoxyIoStream; | ||
const EpoxyUdpStreamFinalization = (typeof FinalizationRegistry === 'undefined') | ||
? { register: () => {}, unregister: () => {} } | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epoxyudpstream_free(ptr >>> 0)); | ||
/** | ||
*/ | ||
class EpoxyUdpStream { | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(EpoxyUdpStream.prototype); | ||
obj.__wbg_ptr = ptr; | ||
EpoxyUdpStreamFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
EpxUdpStreamFinalization.unregister(this); | ||
EpoxyUdpStreamFinalization.unregister(this); | ||
return ptr; | ||
@@ -634,103 +755,41 @@ } | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_epxudpstream_free(ptr); | ||
wasm.__wbg_epoxyudpstream_free(ptr); | ||
} | ||
/** | ||
* @returns {string} | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
get url() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.__wbg_get_epxtlsstream_url(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getCachedStringFromWasm0(r0, r1); | ||
if (r0 !== 0) { wasm.__wbindgen_free(r0, r1, 1); } | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
send(payload) { | ||
const ret = wasm.epoxyudpstream_send(this.__wbg_ptr, addHeapObject(payload)); | ||
return takeObject(ret); | ||
} | ||
} | ||
/** | ||
*/ | ||
constructor() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.epxudpstream_new(retptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
this.__wbg_ptr = r0 >>> 0; | ||
return this; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close() { | ||
const ret = wasm.epoxyudpstream_close(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @returns {Promise<EpxUdpStream>} | ||
*/ | ||
static connect(tcp, onopen, onclose, onerror, onmessage, url) { | ||
_assertClass(tcp, EpoxyClient); | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.epxudpstream_connect(tcp.__wbg_ptr, addHeapObject(onopen), addHeapObject(onclose), addHeapObject(onerror), addHeapObject(onmessage), ptr0, len0); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload) { | ||
const ret = wasm.epxudpstream_send(this.__wbg_ptr, addHeapObject(payload)); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close() { | ||
const ret = wasm.epxudpstream_close(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
__exports.EpxUdpStream = EpxUdpStream; | ||
__exports.EpoxyUdpStream = EpoxyUdpStream; | ||
const EpxWebSocketFinalization = (typeof FinalizationRegistry === 'undefined') | ||
const EpoxyWebSocketFinalization = (typeof FinalizationRegistry === 'undefined') | ||
? { register: () => {}, unregister: () => {} } | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epxwebsocket_free(ptr >>> 0)); | ||
: new FinalizationRegistry(ptr => wasm.__wbg_epoxywebsocket_free(ptr >>> 0)); | ||
/** | ||
*/ | ||
class EpxWebSocket { | ||
class EpoxyWebSocket { | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(EpxWebSocket.prototype); | ||
const obj = Object.create(EpoxyWebSocket.prototype); | ||
obj.__wbg_ptr = ptr; | ||
EpxWebSocketFinalization.register(obj, obj.__wbg_ptr, obj); | ||
EpoxyWebSocketFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
toJSON() { | ||
return { | ||
url: this.url, | ||
protocols: this.protocols, | ||
origin: this.origin, | ||
}; | ||
} | ||
toString() { | ||
return JSON.stringify(this); | ||
} | ||
__destroy_into_raw() { | ||
const ptr = this.__wbg_ptr; | ||
this.__wbg_ptr = 0; | ||
EpxWebSocketFinalization.unregister(this); | ||
EpoxyWebSocketFinalization.unregister(this); | ||
return ptr; | ||
@@ -741,119 +800,21 @@ } | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.__wbg_epxwebsocket_free(ptr); | ||
wasm.__wbg_epoxywebsocket_free(ptr); | ||
} | ||
/** | ||
* @returns {string} | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
get url() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.__wbg_get_epxtlsstream_url(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getCachedStringFromWasm0(r0, r1); | ||
if (r0 !== 0) { wasm.__wbindgen_free(r0, r1, 1); } | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
send(payload) { | ||
const ret = wasm.epoxywebsocket_send(this.__wbg_ptr, addHeapObject(payload)); | ||
return takeObject(ret); | ||
} | ||
} | ||
/** | ||
* @returns {(string)[]} | ||
*/ | ||
get protocols() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.__wbg_get_epxwebsocket_protocols(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getArrayJsValueFromWasm0(r0, r1).slice(); | ||
wasm.__wbindgen_free(r0, r1 * 4, 4); | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close() { | ||
const ret = wasm.epoxywebsocket_close(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
/** | ||
* @returns {string} | ||
*/ | ||
get origin() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.__wbg_get_epxwebsocket_origin(retptr, this.__wbg_ptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getCachedStringFromWasm0(r0, r1); | ||
if (r0 !== 0) { wasm.__wbindgen_free(r0, r1, 1); } | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
*/ | ||
constructor() { | ||
try { | ||
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
wasm.epxwebsocket_new(retptr); | ||
var r0 = getInt32Memory0()[retptr / 4 + 0]; | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var r2 = getInt32Memory0()[retptr / 4 + 2]; | ||
if (r2) { | ||
throw takeObject(r1); | ||
} | ||
this.__wbg_ptr = r0 >>> 0; | ||
return this; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
} | ||
} | ||
/** | ||
* @param {EpoxyClient} tcp | ||
* @param {Function} onopen | ||
* @param {Function} onclose | ||
* @param {Function} onerror | ||
* @param {Function} onmessage | ||
* @param {string} url | ||
* @param {(string)[]} protocols | ||
* @param {string} origin | ||
* @returns {Promise<EpxWebSocket>} | ||
*/ | ||
static connect(tcp, onopen, onclose, onerror, onmessage, url, protocols, origin) { | ||
_assertClass(tcp, EpoxyClient); | ||
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ptr1 = passArrayJsValueToWasm0(protocols, wasm.__wbindgen_malloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
const ptr2 = passStringToWasm0(origin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len2 = WASM_VECTOR_LEN; | ||
const ret = wasm.epxwebsocket_connect(tcp.__wbg_ptr, addHeapObject(onopen), addHeapObject(onclose), addHeapObject(onerror), addHeapObject(onmessage), ptr0, len0, ptr1, len1, ptr2, len2); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {string} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_text(payload) { | ||
const ptr0 = passStringToWasm0(payload, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len0 = WASM_VECTOR_LEN; | ||
const ret = wasm.epxwebsocket_send_text(this.__wbg_ptr, ptr0, len0); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @param {Uint8Array} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send_binary(payload) { | ||
const ret = wasm.epxwebsocket_send_binary(this.__wbg_ptr, addHeapObject(payload)); | ||
return takeObject(ret); | ||
} | ||
/** | ||
* @returns {Promise<void>} | ||
*/ | ||
close() { | ||
const ret = wasm.epxwebsocket_close(this.__wbg_ptr); | ||
return takeObject(ret); | ||
} | ||
} | ||
__exports.EpxWebSocket = EpxWebSocket; | ||
__exports.EpoxyWebSocket = EpoxyWebSocket; | ||
@@ -867,2 +828,10 @@ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined') | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(IntoUnderlyingByteSource.prototype); | ||
obj.__wbg_ptr = ptr; | ||
IntoUnderlyingByteSourceFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
__destroy_into_raw() { | ||
@@ -883,2 +852,4 @@ const ptr = this.__wbg_ptr; | ||
get type() { | ||
let deferred1_0; | ||
let deferred1_1; | ||
try { | ||
@@ -889,37 +860,38 @@ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); | ||
var r1 = getInt32Memory0()[retptr / 4 + 1]; | ||
var v1 = getCachedStringFromWasm0(r0, r1); | ||
if (r0 !== 0) { wasm.__wbindgen_free(r0, r1, 1); } | ||
return v1; | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
deferred1_0 = r0; | ||
deferred1_1 = r1; | ||
return getStringFromWasm0(r0, r1); | ||
} finally { | ||
wasm.__wbindgen_add_to_stack_pointer(16); | ||
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); | ||
} | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get autoAllocateChunkSize() { | ||
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr); | ||
return ret >>> 0; | ||
} | ||
/** | ||
* @param {ReadableByteStreamController} controller | ||
*/ | ||
start(controller) { | ||
wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller)); | ||
} | ||
/** | ||
* @param {ReadableByteStreamController} controller | ||
* @returns {Promise<any>} | ||
*/ | ||
pull(controller) { | ||
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller)); | ||
return takeObject(ret); | ||
} | ||
/** | ||
*/ | ||
cancel() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.intounderlyingbytesource_cancel(ptr); | ||
} | ||
} | ||
/** | ||
* @returns {number} | ||
*/ | ||
get autoAllocateChunkSize() { | ||
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr); | ||
return ret >>> 0; | ||
} | ||
/** | ||
* @param {ReadableByteStreamController} controller | ||
*/ | ||
start(controller) { | ||
wasm.intounderlyingbytesource_start(this.__wbg_ptr, addHeapObject(controller)); | ||
} | ||
/** | ||
* @param {ReadableByteStreamController} controller | ||
* @returns {Promise<any>} | ||
*/ | ||
pull(controller) { | ||
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, addHeapObject(controller)); | ||
return takeObject(ret); | ||
} | ||
/** | ||
*/ | ||
cancel() { | ||
const ptr = this.__destroy_into_raw(); | ||
wasm.intounderlyingbytesource_cancel(ptr); | ||
} | ||
} | ||
__exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource; | ||
@@ -980,10 +952,2 @@ | ||
static __wrap(ptr) { | ||
ptr = ptr >>> 0; | ||
const obj = Object.create(IntoUnderlyingSource.prototype); | ||
obj.__wbg_ptr = ptr; | ||
IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj); | ||
return obj; | ||
} | ||
__destroy_into_raw() { | ||
@@ -1055,2 +1019,22 @@ const ptr = this.__wbg_ptr; | ||
}; | ||
imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof Uint8Array; | ||
} catch (_) { | ||
result = false; | ||
} | ||
const ret = result; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof ArrayBuffer; | ||
} catch (_) { | ||
result = false; | ||
} | ||
const ret = result; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_string_get = function(arg0, arg1) { | ||
@@ -1068,4 +1052,4 @@ const obj = getObject(arg1); | ||
}; | ||
imports.wbg.__wbindgen_error_new = function(arg0, arg1) { | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
imports.wbg.__wbg_epoxywebsocket_new = function(arg0) { | ||
const ret = EpoxyWebSocket.__wrap(arg0); | ||
return addHeapObject(ret); | ||
@@ -1077,2 +1061,59 @@ }; | ||
}; | ||
imports.wbg.__wbg_epoxyudpstream_new = function(arg0) { | ||
const ret = EpoxyUdpStream.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_headers_abb199c3be8d817c = function(arg0) { | ||
const ret = getObject(arg0).headers; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_get_0ebaad3318b38f2a = function() { return handleError(function (arg0, arg1, arg2, arg3) { | ||
const ret = getObject(arg1).get(getStringFromWasm0(arg2, arg3)); | ||
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}, arguments) }; | ||
imports.wbg.__wbg_instanceof_Headers_e8d8a8f38d11f7d7 = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof Headers; | ||
} catch (_) { | ||
result = false; | ||
} | ||
const ret = result; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_of_647f9238b4d5407a = function(arg0, arg1) { | ||
const ret = Array.of(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) { | ||
const ret = getObject(arg0).push(getObject(arg1)); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() { | ||
const ret = new Object(); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_number_new = function(arg0) { | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_newwithintounderlyingbytesource_0a89c1aee97aed2b = function() { return handleError(function (arg0) { | ||
const ret = new ReadableStream(IntoUnderlyingByteSource.__wrap(arg0)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_newwithoptreadablestreamandinit_0b825f969ca543d6 = function() { return handleError(function (arg0, arg1) { | ||
const ret = new Response(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_defineProperty_cc00e2de8a0f5141 = function(arg0, arg1, arg2) { | ||
const ret = Object.defineProperty(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_array = function(arg0) { | ||
@@ -1082,4 +1123,5 @@ const ret = Array.isArray(getObject(arg0)); | ||
}; | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
imports.wbg.__wbg_from_89e3fc3ba5e6fb48 = function(arg0) { | ||
const ret = Array.from(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
@@ -1095,39 +1137,218 @@ imports.wbg.__wbindgen_cb_drop = function(arg0) { | ||
}; | ||
imports.wbg.__wbg_debug_1f3cc7532d15b669 = function(arg0, arg1) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
console.debug(v0); | ||
imports.wbg.__wbg_clearTimeout_76877dbc010e786d = function(arg0) { | ||
const ret = clearTimeout(takeObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_log_27a4eac1048962da = function(arg0, arg1) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
console.log(v0); | ||
imports.wbg.__wbindgen_object_drop_ref = function(arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbg_epxtlsstream_new = function(arg0) { | ||
const ret = EpxTlsStream.__wrap(arg0); | ||
imports.wbg.__wbindgen_error_new = function(arg0, arg1) { | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_epxudpstream_new = function(arg0) { | ||
const ret = EpxUdpStream.__wrap(arg0); | ||
imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) { | ||
const ret = new Uint8Array(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_epxwebsocket_new = function(arg0) { | ||
const ret = EpxWebSocket.__wrap(arg0); | ||
imports.wbg.__wbg_epoxyiostream_new = function(arg0) { | ||
const ret = EpoxyIoStream.__wrap(arg0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_epoxyclient_new = function(arg0) { | ||
const ret = EpoxyClient.__wrap(arg0); | ||
imports.wbg.__wbg_newwithstrsequence_9bc178264d955680 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_new_6c74223c77cfabad = function() { return handleError(function (arg0, arg1) { | ||
const ret = new WebSocket(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_setbinaryType_b0cf5103cd561959 = function(arg0, arg1) { | ||
getObject(arg0).binaryType = takeObject(arg1); | ||
}; | ||
imports.wbg.__wbg_sethighWaterMark_ea50ed3ec2143088 = function(arg0, arg1) { | ||
getObject(arg0).highWaterMark = arg1; | ||
imports.wbg.__wbg_setonmessage_2af154ce83a3dc94 = function(arg0, arg1) { | ||
getObject(arg0).onmessage = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_newwithintounderlyingsource_a03a82aa1bbbb292 = function(arg0, arg1) { | ||
const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), takeObject(arg1)); | ||
imports.wbg.__wbg_setonopen_ce7a4c51e5cf5788 = function(arg0, arg1) { | ||
getObject(arg0).onopen = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_setonclose_b9929b1c1624dff3 = function(arg0, arg1) { | ||
getObject(arg0).onclose = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_setonerror_39a785302b0cd2e9 = function(arg0, arg1) { | ||
getObject(arg0).onerror = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_setTimeout_75cb9b6991a4031d = function() { return handleError(function (arg0, arg1) { | ||
const ret = setTimeout(getObject(arg0), arg1); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_arrayBuffer_8a7388e2f90d7e79 = function() { return handleError(function (arg0) { | ||
const ret = getObject(arg0).arrayBuffer(); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) { | ||
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_abda76e883ba8a5f = function() { | ||
const ret = new Error(); | ||
imports.wbg.__wbg_entries_95cc2c823b285a09 = function(arg0) { | ||
const ret = Object.entries(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) { | ||
const ret = getObject(arg1).stack; | ||
imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) { | ||
const ret = getObject(arg0).data; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) { | ||
try { | ||
var state0 = {a: arg0, b: arg1}; | ||
var cb0 = (arg0, arg1) => { | ||
const a = state0.a; | ||
state0.a = 0; | ||
try { | ||
return __wbg_adapter_153(a, state0.b, arg0, arg1); | ||
} finally { | ||
state0.a = a; | ||
} | ||
}; | ||
const ret = new Promise(cb0); | ||
return addHeapObject(ret); | ||
} finally { | ||
state0.a = state0.b = 0; | ||
} | ||
}; | ||
imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_is_object = function(arg0) { | ||
const val = getObject(arg0); | ||
const ret = typeof(val) === 'object' && val !== null; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_memory = function() { | ||
const ret = wasm.memory; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) { | ||
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049 = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).randomFillSync(takeObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) { | ||
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).getRandomValues(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_crypto_1d1f22824a6a080c = function(arg0) { | ||
const ret = getObject(arg0).crypto; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_process_4a72847cc503995b = function(arg0) { | ||
const ret = getObject(arg0).process; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_versions_f686565e586dd935 = function(arg0) { | ||
const ret = getObject(arg0).versions; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_node_104a2ff8d6ea03a2 = function(arg0) { | ||
const ret = getObject(arg0).node; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_require_cca90b1a94a0255b = function() { return handleError(function () { | ||
const ret = module.require; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbindgen_is_function = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'function'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_msCrypto_eb05e62b530a1508 = function(arg0) { | ||
const ret = getObject(arg0).msCrypto; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) { | ||
const ret = new Uint8Array(arg0 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () { | ||
const ret = self.self; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () { | ||
const ret = window.window; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () { | ||
const ret = globalThis.globalThis; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () { | ||
const ret = global.global; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbindgen_is_undefined = function(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) { | ||
const ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_fromEntries_c9d8ec8925e677a8 = function() { return handleError(function (arg0) { | ||
const ret = Object.fromEntries(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return ret; | ||
}, arguments) }; | ||
imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) { | ||
const ret = getObject(arg0).then(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
}; | ||
imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_now_3014639a94423537 = function() { | ||
const ret = Date.now(); | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { | ||
const ret = debugString(getObject(arg1)); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
@@ -1138,423 +1359,150 @@ const len1 = WASM_VECTOR_LEN; | ||
}; | ||
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1, 1); } | ||
console.error(v0); | ||
}; | ||
imports.wbg.__wbindgen_is_undefined = function(arg0) { | ||
const ret = getObject(arg0) === undefined; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_performance_1430613edb72ce03 = function(arg0) { | ||
const ret = getObject(arg0).performance; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_now_eab901b1d3b8a295 = function(arg0) { | ||
const ret = getObject(arg0).now(); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_setTimeout_fba1b48a90e30862 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2); | ||
return ret; | ||
}, arguments) }; | ||
imports.wbg.__wbindgen_is_object = function(arg0) { | ||
const val = getObject(arg0); | ||
const ret = typeof(val) === 'object' && val !== null; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_crypto_d05b68a3572bb8ca = function(arg0) { | ||
const ret = getObject(arg0).crypto; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_process_b02b3570280d0366 = function(arg0) { | ||
const ret = getObject(arg0).process; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_versions_c1cb42213cedf0f5 = function(arg0) { | ||
const ret = getObject(arg0).versions; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_node_43b1089f407e4ec2 = function(arg0) { | ||
const ret = getObject(arg0).node; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_string = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'string'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_require_9a7e0f667ead4995 = function() { return handleError(function () { | ||
const ret = module.require; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_msCrypto_10fc94afee92bd76 = function(arg0) { | ||
const ret = getObject(arg0).msCrypto; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_randomFillSync_b70ccbdf4926a99d = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).randomFillSync(takeObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_getRandomValues_7e42b4fb8779dc6d = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).getRandomValues(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) { | ||
const ret = getObject(arg0).queueMicrotask; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_is_function = function(arg0) { | ||
const ret = typeof(getObject(arg0)) === 'function'; | ||
return ret; | ||
}; | ||
imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) { | ||
const ret = "data:application/javascript," + encodeURIComponent(`onmessage = function (ev) { | ||
let [ia, index, value] = ev.data; | ||
ia = new Int32Array(ia.buffer); | ||
let result = Atomics.wait(ia, index, value); | ||
postMessage(result); | ||
imports.wbg.__wbindgen_throw = function(arg0, arg1) { | ||
throw new Error(getStringFromWasm0(arg0, arg1)); | ||
}; | ||
`); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) { | ||
queueMicrotask(getObject(arg0)); | ||
}; | ||
imports.wbg.__wbindgen_number_new = function(arg0) { | ||
const ret = arg0; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() { | ||
const ret = Atomics.waitAsync; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) { | ||
const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) { | ||
const ret = getObject(arg0).async; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_value_571d60108110e917 = function(arg0) { | ||
const ret = getObject(arg0).value; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_instanceof_Headers_e8d8a8f38d11f7d7 = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof Headers; | ||
} catch (_) { | ||
result = false; | ||
} | ||
const ret = result; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_get_0ebaad3318b38f2a = function() { return handleError(function (arg0, arg1, arg2, arg3) { | ||
var v0 = getCachedStringFromWasm0(arg2, arg3); | ||
const ret = getObject(arg1).get(v0); | ||
var ptr2 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
var len2 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len2; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr2; | ||
}, arguments) }; | ||
imports.wbg.__wbg_data_3ce7c145ca4fbcdc = function(arg0) { | ||
const ret = getObject(arg0).data; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_byobRequest_72fca99f9c32c193 = function(arg0) { | ||
const ret = getObject(arg0).byobRequest; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_close_184931724d961ccc = function() { return handleError(function (arg0) { | ||
getObject(arg0).close(); | ||
}, arguments) }; | ||
imports.wbg.__wbg_view_7f0ce470793a340f = function(arg0) { | ||
const ret = getObject(arg0).view; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_respond_b1a43b2e3a06d525 = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).respond(arg1 >>> 0); | ||
}, arguments) }; | ||
imports.wbg.__wbg_close_a994f9425dab445c = function() { return handleError(function (arg0) { | ||
getObject(arg0).close(); | ||
}, arguments) }; | ||
imports.wbg.__wbg_enqueue_ea194723156c0cc2 = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).enqueue(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_headers_abb199c3be8d817c = function(arg0) { | ||
const ret = getObject(arg0).headers; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_newwithstrandinit_3fd6fba4083ff2d0 = function() { return handleError(function (arg0, arg1, arg2) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
const ret = new Request(v0, getObject(arg2)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_arrayBuffer_8a7388e2f90d7e79 = function() { return handleError(function (arg0) { | ||
const ret = getObject(arg0).arrayBuffer(); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_newwithoptreadablestreamandinit_0b825f969ca543d6 = function() { return handleError(function (arg0, arg1) { | ||
const ret = new Response(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_setonopen_ce7a4c51e5cf5788 = function(arg0, arg1) { | ||
getObject(arg0).onopen = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_setonerror_39a785302b0cd2e9 = function(arg0, arg1) { | ||
getObject(arg0).onerror = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_setonclose_b9929b1c1624dff3 = function(arg0, arg1) { | ||
getObject(arg0).onclose = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_setonmessage_2af154ce83a3dc94 = function(arg0, arg1) { | ||
getObject(arg0).onmessage = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_setbinaryType_b0cf5103cd561959 = function(arg0, arg1) { | ||
getObject(arg0).binaryType = takeObject(arg1); | ||
}; | ||
imports.wbg.__wbg_new_6c74223c77cfabad = function() { return handleError(function (arg0, arg1) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
const ret = new WebSocket(v0); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_newwithstrsequence_9bc178264d955680 = function() { return handleError(function (arg0, arg1, arg2) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
const ret = new WebSocket(v0, getObject(arg2)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_close_acd9532ff5c093ea = function() { return handleError(function (arg0) { | ||
getObject(arg0).close(); | ||
}, arguments) }; | ||
imports.wbg.__wbg_send_5fcd7bab9777194e = function() { return handleError(function (arg0, arg1, arg2) { | ||
getObject(arg0).send(new Uint8Array(getArrayU8FromWasm0(arg1, arg2))); | ||
}, arguments) }; | ||
imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) { | ||
getObject(arg0).onmessage = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
const ret = new Worker(v0); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).postMessage(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () { | ||
const ret = self.self; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () { | ||
const ret = window.window; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () { | ||
const ret = globalThis.globalThis; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () { | ||
const ret = global.global; | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_length_cd7af8117672b8b8 = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() { | ||
const ret = new Array(); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() { | ||
const ret = new Object(); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) { | ||
const ret = getObject(arg0)[arg1 >>> 0]; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_from_89e3fc3ba5e6fb48 = function(arg0) { | ||
const ret = Array.from(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_of_647f9238b4d5407a = function(arg0, arg1) { | ||
const ret = Array.of(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) { | ||
const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) { | ||
const ret = getObject(arg0).push(getObject(arg1)); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) { | ||
let result; | ||
try { | ||
result = getObject(arg0) instanceof ArrayBuffer; | ||
} catch (_) { | ||
result = false; | ||
} | ||
const ret = result; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_new_28c511d9baebfa89 = function(arg0, arg1) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
const ret = new Error(v0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) { | ||
var v0 = getCachedStringFromWasm0(arg0, arg1); | ||
const ret = new Function(v0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) { | ||
const ret = getObject(arg0).call(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_now_3014639a94423537 = function() { | ||
const ret = Date.now(); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_defineProperty_cc00e2de8a0f5141 = function(arg0, arg1, arg2) { | ||
const ret = Object.defineProperty(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_entries_95cc2c823b285a09 = function(arg0) { | ||
const ret = Object.entries(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_fromEntries_c9d8ec8925e677a8 = function() { return handleError(function (arg0) { | ||
const ret = Object.fromEntries(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) { | ||
const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
return addHeapObject(ret); | ||
}, arguments) }; | ||
imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return ret; | ||
}, arguments) }; | ||
imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_81740750da40724f = function(arg0, arg1) { | ||
try { | ||
var state0 = {a: arg0, b: arg1}; | ||
var cb0 = (arg0, arg1) => { | ||
const a = state0.a; | ||
state0.a = 0; | ||
try { | ||
return __wbg_adapter_235(a, state0.b, arg0, arg1); | ||
} finally { | ||
state0.a = a; | ||
} | ||
imports.wbg.__wbindgen_rethrow = function(arg0) { | ||
throw takeObject(arg0); | ||
}; | ||
imports.wbg.__wbg_waitAsync_5d743fc9058ba01a = function() { | ||
const ret = Atomics.waitAsync; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) { | ||
const ret = new Int32Array(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_waitAsync_46d5c36955b71a79 = function(arg0, arg1, arg2) { | ||
const ret = Atomics.waitAsync(getObject(arg0), arg1, arg2); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_async_19c0400d97cc72fe = function(arg0) { | ||
const ret = getObject(arg0).async; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_value_571d60108110e917 = function(arg0) { | ||
const ret = getObject(arg0).value; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_link_fc1eedd35dc7e0a6 = function(arg0) { | ||
const ret = "data:application/javascript," + encodeURIComponent(`onmessage = function (ev) { | ||
let [ia, index, value] = ev.data; | ||
ia = new Int32Array(ia.buffer); | ||
let result = Atomics.wait(ia, index, value); | ||
postMessage(result); | ||
}; | ||
const ret = new Promise(cb0); | ||
`); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
imports.wbg.__wbg_new_d1187ae36d662ef9 = function() { return handleError(function (arg0, arg1) { | ||
const ret = new Worker(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
} finally { | ||
state0.a = state0.b = 0; | ||
} | ||
}; | ||
imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) { | ||
const ret = Promise.resolve(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function(arg0, arg1) { | ||
const ret = getObject(arg0).then(getObject(arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_then_a73caa9a87991566 = function(arg0, arg1, arg2) { | ||
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_8cccba86b0f574cb = function(arg0) { | ||
const ret = new Int32Array(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) { | ||
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) { | ||
const ret = new Uint8Array(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) { | ||
const ret = new Uint8Array(arg0 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_buffer_dd7f74bc60f1faab = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) { | ||
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_length_c20a40f15020d68a = function(arg0) { | ||
const ret = getObject(arg0).length; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_byteLength_58f7b4fab1919d44 = function(arg0) { | ||
const ret = getObject(arg0).byteLength; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_byteOffset_81d60f7392524f62 = function(arg0) { | ||
const ret = getObject(arg0).byteOffset; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) { | ||
getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
}; | ||
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { | ||
const ret = debugString(getObject(arg1)); | ||
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); | ||
const len1 = WASM_VECTOR_LEN; | ||
getInt32Memory0()[arg0 / 4 + 1] = len1; | ||
getInt32Memory0()[arg0 / 4 + 0] = ptr1; | ||
}; | ||
imports.wbg.__wbindgen_throw = function(arg0, arg1) { | ||
throw new Error(getStringFromWasm0(arg0, arg1)); | ||
}; | ||
imports.wbg.__wbindgen_rethrow = function(arg0) { | ||
throw takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_memory = function() { | ||
const ret = wasm.memory; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper469 = function(arg0, arg1, arg2) { | ||
const ret = makeClosure(arg0, arg1, 8, __wbg_adapter_36); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper471 = function(arg0, arg1, arg2) { | ||
const ret = makeClosure(arg0, arg1, 8, __wbg_adapter_39); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper4329 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 882, __wbg_adapter_42); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper6727 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 1270, __wbg_adapter_45); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper6729 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 1270, __wbg_adapter_45); | ||
return addHeapObject(ret); | ||
}; | ||
}, arguments) }; | ||
imports.wbg.__wbg_setonmessage_503809e5bb51bd33 = function(arg0, arg1) { | ||
getObject(arg0).onmessage = getObject(arg1); | ||
}; | ||
imports.wbg.__wbg_of_6a70eed8d41f469c = function(arg0, arg1, arg2) { | ||
const ret = Array.of(getObject(arg0), getObject(arg1), getObject(arg2)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_postMessage_7380d10e8b8269df = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).postMessage(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function(arg0) { | ||
queueMicrotask(getObject(arg0)); | ||
}; | ||
imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function(arg0) { | ||
const ret = getObject(arg0).queueMicrotask; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_resolve_b0083a7967828ec8 = function(arg0) { | ||
const ret = Promise.resolve(getObject(arg0)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_close_a994f9425dab445c = function() { return handleError(function (arg0) { | ||
getObject(arg0).close(); | ||
}, arguments) }; | ||
imports.wbg.__wbg_enqueue_ea194723156c0cc2 = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).enqueue(getObject(arg1)); | ||
}, arguments) }; | ||
imports.wbg.__wbg_byobRequest_72fca99f9c32c193 = function(arg0) { | ||
const ret = getObject(arg0).byobRequest; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_view_7f0ce470793a340f = function(arg0) { | ||
const ret = getObject(arg0).view; | ||
return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_byteLength_58f7b4fab1919d44 = function(arg0) { | ||
const ret = getObject(arg0).byteLength; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_close_184931724d961ccc = function() { return handleError(function (arg0) { | ||
getObject(arg0).close(); | ||
}, arguments) }; | ||
imports.wbg.__wbg_new_28c511d9baebfa89 = function(arg0, arg1) { | ||
const ret = new Error(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_buffer_dd7f74bc60f1faab = function(arg0) { | ||
const ret = getObject(arg0).buffer; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_byteOffset_81d60f7392524f62 = function(arg0) { | ||
const ret = getObject(arg0).byteOffset; | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_setTimeout_fba1b48a90e30862 = function() { return handleError(function (arg0, arg1, arg2) { | ||
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2); | ||
return ret; | ||
}, arguments) }; | ||
imports.wbg.__wbg_performance_1430613edb72ce03 = function(arg0) { | ||
const ret = getObject(arg0).performance; | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_now_eab901b1d3b8a295 = function(arg0) { | ||
const ret = getObject(arg0).now(); | ||
return ret; | ||
}; | ||
imports.wbg.__wbg_respond_b1a43b2e3a06d525 = function() { return handleError(function (arg0, arg1) { | ||
getObject(arg0).respond(arg1 >>> 0); | ||
}, arguments) }; | ||
imports.wbg.__wbg_close_acd9532ff5c093ea = function() { return handleError(function (arg0) { | ||
getObject(arg0).close(); | ||
}, arguments) }; | ||
imports.wbg.__wbg_send_5fcd7bab9777194e = function() { return handleError(function (arg0, arg1, arg2) { | ||
getObject(arg0).send(new Uint8Array(getArrayU8FromWasm0(arg1, arg2)).buffer); | ||
}, arguments) }; | ||
imports.wbg.__wbindgen_closure_wrapper415 = function(arg0, arg1, arg2) { | ||
const ret = makeClosure(arg0, arg1, 7, __wbg_adapter_36); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper417 = function(arg0, arg1, arg2) { | ||
const ret = makeClosure(arg0, arg1, 7, __wbg_adapter_39); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper1684 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 108, __wbg_adapter_42); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper1711 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 7, __wbg_adapter_45); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper3870 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 7, __wbg_adapter_45); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_closure_wrapper4028 = function(arg0, arg1, arg2) { | ||
const ret = makeMutClosure(arg0, arg1, 7, __wbg_adapter_42); | ||
return addHeapObject(ret); | ||
}; | ||
return imports; | ||
return imports; | ||
} | ||
function __wbg_init_memory(imports, maybe_memory) { | ||
imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:25,maximum:16384,shared:true}); | ||
imports.wbg.memory = maybe_memory || new WebAssembly.Memory({initial:22,maximum:16384,shared:true}); | ||
} | ||
@@ -1561,0 +1509,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
14
2
5021461
19284