function e(e,r){if(e.closest)return e.closest(r);for(var c=e;c;){if(t(c,r))return c;c=c.parentElement}return null}function t(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}export{e as c,t as m};