import{r as e}from"./chunk-QTnfLwEv.js";import{n as t}from"./jsx-runtime-BWRPWl8p.js";function n(e){return e&&e.ownerDocument||document}var r=!!(typeof window<`u`&&window.document&&window.document.createElement),i=!1,a=!1;try{var o={get passive(){return i=!0},get once(){return a=i=!0}};r&&(window.addEventListener(`test`,o,o),window.removeEventListener(`test`,o,!0))}catch{}function s(e,t,n,r){if(r&&typeof r!=`boolean`&&!a){var o=r.once,s=r.capture,c=n;!a&&o&&(c=n.__once||function e(r){this.removeEventListener(t,e,s),n.call(this,r)},n.__once=c),e.addEventListener(t,c,i?r:s)}e.addEventListener(t,n,r)}function c(e,t,n,r){var i=r&&typeof r!=`boolean`?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function l(e,t,n,r){return s(e,t,n,r),function(){c(e,t,n,r)}}var u=e(t()),d=e=>!e||typeof e==`function`?e:t=>{e.current=t};function f(e,t){let n=d(e),r=d(t);return e=>{n&&n(e),r&&r(e)}}function p(e,t){return(0,u.useMemo)(()=>f(e,t),[e,t])}export{r as a,s as i,l as n,n as o,c as r,p as t};