// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-or-later
export{};export function showSitePane(){var e;(e=document.getElementById("site-pane"))==null||e.setAttribute("open","")}export function hideSitePane(){var e;(e=document.getElementById("site-pane"))==null||e.removeAttribute("open")}const c=document.getElementById("open-pane"),o=document.getElementById("site-pane");if(!c||!o)throw Error("open-pane or site-pane not found");const i=e=>e===c||e===o||o.contains(e);c.onmouseover=showSitePane;o.onmouseleave=hideSitePane;document.onfocus=e=>{i(e.target)?showSitePane():hideSitePane()};c.onclick=showSitePane;document.onclick=e=>{i(e.target)||hideSitePane()};const n={x:null,y:null};document.ontouchstart=e=>{n.x=e.touches[0].clientX,n.y=e.touches[0].clientY};document.ontouchmove=e=>{if(n.x===null||n.y===null)return;const t=n.x-e.touches[0].clientX,u=n.y-e.touches[0].clientY;if(t===0&&u===0)return;n.x=null,n.y=null;const s=Math.max(12,.01*window.screen.width,u*1.5);console.debug({diffX:t,minDiffX:s}),Math.abs(t)>=s&&(t>0?showSitePane():hideSitePane())};// @license-end
//# sourceMappingURL=better_ui.js.map
