const a=e=>Object.keys(e).reduce((r,t)=>e[t]||e[t]===0?r+`${t}=${typeof e[t]=="object"?Object.keys(e[t]).length>0?JSON.stringify(e[t]):"":e[t]}&`:r,"").replace(/&+$/,""),o=(e="")=>{const r=new URLSearchParams(e===""?window.location.search:e),t=Object.fromEntries(r.entries());let s={};for(const[c,n]of Object.entries(t))n[0]==="{"?s[c]=JSON.parse(n):s[c]=n;return s};export{a as o,o as q};
