import{e as v,m as h,i as p,o as t,t as y}from"./mlcfaua5.js";import{am as a,ag as m}from"./et3mnfcx.js";import{i as g}from"./xqb8qclc.js";function s(t,e,o,r){const n=o-e;return t/=r/2,t<1?n/2*t*t*t+e:n/2*((t-=2)*t*t+2)+e}var w=function(){try{var t=v(object,"defineproperty");return t({},"",{}),t}catch{}}(),_=9007199254740991,p=/^(?:0|[1-9]\d*)$/;function x(t,e){var o=typeof t;return e=e??_,!!e&&(o=="number"||o!="symbol"&&p.test(t))&&t>-1&&t%1==0&&ta?window.requestanimationframe(t):settimeout(t,16),i=t=>a?window.cancelanimationframe(t):cleartimeout(t),n=(t,e)=>{if(!a)return!1;const o={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[string(e)],r=g(t,o);return["scroll","auto","overlay"].some(n=>r.includes(n))},h=(t,e)=>{if(!a)return;let o=t;for(;o;){if([window,document,document.documentelement].includes(o))return window;if(n(o,e))return o;o=o.parentnode}return o};let d;const r=t=>{var e;if(!a)return 0;if(d!==void 0)return d;const o=document.createelement("div");o.classname=`${t}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendchild(o);const r=o.offsetwidth;o.style.overflow="scroll";const n=document.createelement("div");n.style.width="100%",o.appendchild(n);const l=n.offsetwidth;return(e=o.parentnode)==null||e.removechild(o),d=r-l,d};function q(t,e){if(!a)return;if(!e){t.scrolltop=0;return}const o=[];let r=e.offsetparent;for(;r!==null&&t!==r&&t.contains(r);)o.push(r),r=r.offsetparent;const n=e.offsettop+o.reduce((c,i)=>c+i.offsettop,0),l=n+e.offsetheight,f=t.scrolltop,s=f+t.clientheight;ns&&(t.scrolltop=l-t.clientheight)}function g(t,e,o,r,n){const l=date.now();let f;const s=()=>{const i=date.now()-l,u=s(i>r?r:i,e,o,r);m(t)?t.scrollto(window.pagexoffset,u):t.scrolltop=u,i{f&&i(f)}}const x=(t,e)=>m(e)?t.ownerdocument.documentelement:e,$=t=>m(t)?window.scrolly:t.scrolltop;export{b as a,e as b,i as c,x as d,g as e,$ as f,h as g,w as h,x as i,d as j,r as k,c as r,q as s};