function e(e,t){let n=e.startsWith(`/`)?e:`/${e}`,r;r=`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}`;let i=new URL(n,`${r}/`);if(t)for(let[e,n]of Object.entries(t))n!==void 0&&n!==``&&i.searchParams.set(e,n);return i.toString()}export{e as t};