import{a as k,i as I,r as B}from"./index-df01d077.js";import{i as h}from"./app-9444f1fe.js";import{o as N,p as O}from"./index-2653f279.js";import{h as x,E as P}from"./framework-2d0bbdc3.js";var Y=/\s/;function _(e){for(var t=e.length;t--&&Y.test(e.charAt(t)););return t}var H=/^\s+/;function $(e){return e&&e.slice(0,_(e)+1).replace(H,"")}var S=0/0,F=/^[-+]0x[0-9a-f]+$/i,M=/^0b[01]+$/i,D=/^0o[0-7]+$/i,K=parseInt;function R(e){if(typeof e=="number")return e;if(k(e))return S;if(I(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=I(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=$(e);var n=M.test(e);return n||D.test(e)?K(e.slice(2),n?2:8):F.test(e)?S:+e}var U=function(){return B.Date.now()};const y=U;var j="Expected a function",V=Math.max,Z=Math.min;function ne(e,t,n){var r,o,f,c,s,u,a=0,v=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(j);t=R(t)||0,I(n)&&(v=!!n.leading,d="maxWait"in n,f=d?V(R(n.maxWait)||0,t):f,p="trailing"in n?!!n.trailing:p);function T(i){var l=r,m=o;return r=o=void 0,a=i,c=e.apply(m,l),c}function L(i){return a=i,s=setTimeout(g,t),v?T(i):c}function W(i){var l=i-u,m=i-a,C=t-l;return d?Z(C,f-m):C}function w(i){var l=i-u,m=i-a;return u===void 0||l>=t||l<0||d&&m>=f}function g(){var i=y();if(w(i))return b(i);s=setTimeout(g,W(i))}function b(i){return s=void 0,p&&r?T(i):(r=o=void 0,c)}function X(){s!==void 0&&clearTimeout(s),a=0,r=u=o=s=void 0}function A(){return s===void 0?c:b(y())}function E(){var i=y(),l=w(i);if(r=arguments,o=this,u=i,l){if(s===void 0)return L(u);if(d)return clearTimeout(s),s=setTimeout(g,t),T(u)}return s===void 0&&(s=setTimeout(g,t)),c}return E.cancel=X,E.flush=A,E}const re=(e,t)=>{if(!h||!e||!t)return!1;const n=e.getBoundingClientRect();let r;return t instanceof Element?r=t.getBoundingClientRect():r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.top<r.bottom&&n.bottom>r.top&&n.right>r.left&&n.left<r.right},ie=e=>{let t,n;return e.type==="touchend"?(n=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(n=e.touches[0].clientY,t=e.touches[0].clientX):(n=e.clientY,t=e.clientX),{clientX:t,clientY:n}},q=(e,t)=>{if(!h)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],r=N(e,n);return["scroll","auto","overlay"].some(o=>r.includes(o))},oe=(e,t)=>{if(!h)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(q(n,t))return n;n=n.parentNode}return n};function se(e,t){if(!h)return;if(!t){e.scrollTop=0;return}const n=[];let r=t.offsetParent;for(;r!==null&&e!==r&&e.contains(r);)n.push(r),r=r.offsetParent;const o=t.offsetTop+n.reduce((u,a)=>u+a.offsetTop,0),f=o+t.offsetHeight,c=e.scrollTop,s=c+e.clientHeight;o<c?e.scrollTop=o:f>s&&(e.scrollTop=f-e.clientHeight)}const z=["class","style"],G=/^on[A-Z]/,ce=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,r=x(()=>((n==null?void 0:n.value)||[]).concat(z)),o=P();return o?x(()=>{var f;return O(Object.entries((f=o.proxy)==null?void 0:f.$attrs).filter(([c])=>!r.value.includes(c)&&!(t&&G.test(c))))}):x(()=>({}))};export{ie as a,ne as d,oe as g,re as i,se as s,ce as u};
