import{r as o}from"./vendor-react-BUCujlKS.js";function L(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return o.useMemo(()=>u=>{t.forEach(r=>r(u))},t)}const R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(n){const t=Object.prototype.toString.call(n);return t==="[object Window]"||t==="[object global]"}function w(n){return"nodeType"in n}function c(n){var t,e;return n?a(n)?n:w(n)&&(t=(e=n.ownerDocument)==null?void 0:e.defaultView)!=null?t:window:window}function T(n){const{Document:t}=c(n);return n instanceof t}function p(n){return a(n)?!1:n instanceof c(n).HTMLElement}function y(n){return n instanceof c(n).SVGElement}function x(n){return n?a(n)?n.document:w(n)?T(n)?n:p(n)||y(n)?n.ownerDocument:document:document:document}const h=R?o.useLayoutEffect:o.useEffect;function C(n){const t=o.useRef(n);return h(()=>{t.current=n}),o.useCallback(function(){for(var e=arguments.length,u=new Array(e),r=0;r<e;r++)u[r]=arguments[r];return t.current==null?void 0:t.current(...u)},[])}function O(){const n=o.useRef(null),t=o.useCallback((u,r)=>{n.current=setInterval(u,r)},[]),e=o.useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[t,e]}function V(n,t){t===void 0&&(t=[n]);const e=o.useRef(n);return h(()=>{e.current!==n&&(e.current=n)},t),e}function X(n,t){const e=o.useRef();return o.useMemo(()=>{const u=n(e.current);return e.current=u,u},[...t])}function Y(n){const t=C(n),e=o.useRef(null),u=o.useCallback(r=>{r!==e.current&&t?.(r,e.current),e.current=r},[]);return[e,u]}function v(n){const t=o.useRef();return o.useEffect(()=>{t.current=n},[n]),t.current}let i={};function A(n,t){return o.useMemo(()=>{if(t)return t;const e=i[n]==null?0:i[n]+1;return i[n]=e,n+"-"+e},[n,t])}function b(n){return function(t){for(var e=arguments.length,u=new Array(e>1?e-1:0),r=1;r<e;r++)u[r-1]=arguments[r];return u.reduce((s,g)=>{const E=Object.entries(g);for(const[f,S]of E){const l=s[f];l!=null&&(s[f]=l+n*S)}return s},{...t})}}const I=b(1),N=b(-1);function M(n){return"clientX"in n&&"clientY"in n}function q(n){if(!n)return!1;const{KeyboardEvent:t}=c(n.target);return t&&n instanceof t}function j(n){if(!n)return!1;const{TouchEvent:t}=c(n.target);return t&&n instanceof t}function F(n){if(j(n)){if(n.touches&&n.touches.length){const{clientX:t,clientY:e}=n.touches[0];return{x:t,y:e}}else if(n.changedTouches&&n.changedTouches.length){const{clientX:t,clientY:e}=n.changedTouches[0];return{x:t,y:e}}}return M(n)?{x:n.clientX,y:n.clientY}:null}const d=Object.freeze({Translate:{toString(n){if(!n)return;const{x:t,y:e}=n;return"translate3d("+(t?Math.round(t):0)+"px, "+(e?Math.round(e):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:t,scaleY:e}=n;return"scaleX("+t+") scaleY("+e+")"}},Transform:{toString(n){if(n)return[d.Translate.toString(n),d.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:t,duration:e,easing:u}=n;return t+" "+e+"ms "+u}}}),m="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function H(n){return n.matches(m)?n:n.querySelector(m)}export{d as C,A as a,c as b,I as c,h as d,x as e,X as f,F as g,p as h,q as i,Y as j,R as k,O as l,v as m,H as n,C as o,a as p,w as q,T as r,N as s,y as t,V as u,L as v};
