/**
 * Bundled by jsDelivr using Rollup v4.62.2 and esbuild v0.28.1.
 * Original file: /npm/motion-utils@12.23.6/dist/es/index.mjs
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
function p(n,t){n.indexOf(t)===-1&&n.push(t)}function g(n,t){const s=n.indexOf(t);s>-1&&n.splice(s,1)}function k([...n],t,s){const e=t<0?n.length+t:t;if(e>=0&&e<n.length){const o=s<0?n.length+s:s,[i]=n.splice(t,1);n.splice(o,0,i)}return n}const y=(n,t,s)=>s>t?t:s<n?n:s;function $(n,t){return t?`${n}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:n}let j=()=>{},M=()=>{};const D={},P=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function V(n){return typeof n=="object"&&n!==null}const q=n=>/^0[^.\s]+$/u.test(n);function G(n){let t;return()=>(t===void 0&&(t=n()),t)}const l=n=>n,L=(n,t)=>s=>t(n(s)),N=(...n)=>n.reduce(L),U=(n,t,s)=>{const e=t-n;return e===0?1:(s-n)/e};class W{constructor(){this.subscriptions=[]}add(t){return p(this.subscriptions,t),()=>g(this.subscriptions,t)}notify(t,s,e){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,s,e);else for(let i=0;i<o;i++){const c=this.subscriptions[i];c&&c(t,s,e)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Z=n=>n*1e3,B=n=>n/1e3;function C(n,t){return t?n*(1e3/t):0}const f=new Set;function H(n){return f.has(n)}function J(n,t,s){n||f.has(t)||(console.warn($(t,s)),f.add(t))}const O=(n,t,s)=>{const e=t-n;return((s-n)%e+e)%e+n},S=(n,t,s)=>(((1-3*s+3*t)*n+(3*s-6*t))*n+3*t)*n,K=1e-7,Q=12;function R(n,t,s,e,o){let i,c,T=0;do c=t+(s-t)/2,i=S(c,e,o)-n,i>0?s=c:t=c;while(Math.abs(i)>K&&++T<Q);return c}function r(n,t,s,e){if(n===t&&s===e)return l;const o=i=>R(i,0,1,n,s);return i=>i===0||i===1?i:S(o(i),t,e)}const h=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,b=n=>t=>1-n(1-t),d=r(.33,1.53,.69,.99),u=b(d),v=h(u),I=n=>(n*=2)<1?.5*u(n):.5*(2-Math.pow(2,-10*(n-1))),a=n=>1-Math.sin(Math.acos(n)),m=b(a),w=h(a),E=r(.42,0,1,1),F=r(0,0,.58,1),x=r(.42,0,.58,1);function X(n,t="end"){return s=>{s=t==="end"?Math.min(s,.999):Math.max(s,.001);const e=s*n,o=t==="end"?Math.floor(e):Math.ceil(e);return y(0,1,o/n)}}const z=n=>Array.isArray(n)&&typeof n[0]!="number";function _(n,t){return z(n)?n[O(0,n.length,t)]:n}const A=n=>Array.isArray(n)&&typeof n[0]=="number",Y={linear:l,easeIn:E,easeInOut:x,easeOut:F,circIn:a,circInOut:w,circOut:m,backIn:u,backInOut:v,backOut:d,anticipate:I},nn=n=>typeof n=="string",tn=n=>{if(A(n)){M(n.length===4);const[t,s,e,o]=n;return r(t,s,e,o)}else if(nn(n))return Y[n];return n};export{D as MotionGlobalConfig,W as SubscriptionManager,p as addUniqueItem,I as anticipate,u as backIn,v as backInOut,d as backOut,a as circIn,w as circInOut,m as circOut,y as clamp,r as cubicBezier,E as easeIn,x as easeInOut,F as easeOut,tn as easingDefinitionToFunction,_ as getEasingForSegment,H as hasWarned,M as invariant,A as isBezierDefinition,z as isEasingArray,P as isNumericalString,V as isObject,q as isZeroValueString,G as memo,B as millisecondsToSeconds,h as mirrorEasing,k as moveItem,l as noop,N as pipe,U as progress,g as removeItem,b as reverseEasing,Z as secondsToMilliseconds,X as steps,C as velocityPerSecond,J as warnOnce,j as warning,O as wrap};
//# sourceMappingURL=/sm/54ca0b1c820340536a3e215e7076f731c27b6c15685607f906169e8512715882.map