function d(s,t){s.indexOf(t)===-1&&s.push(t)}function y(s,t){const n=s.indexOf(t);n>-1&&s.splice(n,1)}const P=(s,t,n)=>n>t?t:n<s?s:n;let S=()=>{};const V={},$=s=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(s);function C(s){return typeof s=="object"&&s!==null}const G=s=>/^0[^.\s]+$/u.test(s);function L(s){let t;return()=>(t===void 0&&(t=s()),t)}const l=s=>s,I=(s,t)=>n=>t(s(n)),N=(...s)=>s.reduce(I),U=(s,t,n)=>{const e=t-s;return e===0?1:(n-s)/e};class Z{constructor(){this.subscriptions=[]}add(t){return d(this.subscriptions,t),()=>y(this.subscriptions,t)}notify(t,n,e){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,e);else for(let i=0;i<r;i++){const c=this.subscriptions[i];c&&c(t,n,e)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const B=s=>s*1e3,H=s=>s/1e3;function J(s,t){return t?s*(1e3/t):0}const M=(s,t,n)=>{const e=t-s;return((n-s)%e+e)%e+s},f=(s,t,n)=>(((1-3*n+3*t)*s+(3*n-6*t))*s+3*t)*s,O=1e-7,x=12;function k(s,t,n,e,r){let i,c,g=0;do c=t+(n-t)/2,i=f(c,e,r)-s,i>0?n=c:t=c;while(Math.abs(i)>O&&++g<x);return c}function o(s,t,n,e){if(s===t&&n===e)return l;const r=i=>k(i,0,1,s,n);return i=>i===0||i===1?i:f(r(i),t,e)}const b=s=>t=>t<=.5?s(2*t)/2:(2-s(2*(1-t)))/2,p=s=>t=>1-s(1-t),h=o(.33,1.53,.69,.99),u=p(h),m=b(u),v=s=>(s*=2)<1?.5*u(s):.5*(2-Math.pow(2,-10*(s-1))),a=s=>1-Math.sin(Math.acos(s)),z=p(a),A=b(a),E=o(.42,0,1,1),F=o(0,0,.58,1),T=o(.42,0,.58,1),j=s=>Array.isArray(s)&&typeof s[0]!="number";function K(s,t){return j(s)?s[M(0,s.length,t)]:s}const q=s=>Array.isArray(s)&&typeof s[0]=="number",w={linear:l,easeIn:E,easeInOut:T,easeOut:F,circIn:a,circInOut:A,circOut:z,backIn:u,backInOut:m,backOut:h,anticipate:v},D=s=>typeof s=="string",Q=s=>{if(q(s)){S(s.length===4);const[t,n,e,r]=s;return o(t,n,e,r)}else if(D(s))return w[s];return s};export{V as M,Z as S,U as a,j as b,P as c,T as d,Q as e,L as f,K as g,q as h,S as i,A as j,m as k,v as l,H as m,l as n,$ as o,N as p,G as q,y as r,B as s,C as t,z as u,J as v,d as w};
