var I=t=>{throw TypeError(t)};var P=(t,r,e)=>r.has(t)||I("Cannot "+e);var i=(t,r,e)=>(P(t,r,"read from private field"),e?e.call(t):r.get(t)),p=(t,r,e)=>r.has(t)?I("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,e),w=(t,r,e,s)=>(P(t,r,"write to private field"),s?s.call(t,e):r.set(t,e),e);import{a4 as b,r as _,a3 as y,k as z}from"./runtime-C3rQLW--.js";const x=()=>performance.now(),a={tick:t=>requestAnimationFrame(t),now:()=>x(),tasks:new Set};function T(){const t=a.now();a.tasks.forEach(r=>{r.c(t)||(a.tasks.delete(r),r.f())}),a.tasks.size!==0&&a.tick(T)}function C(t){let r;return a.tasks.size===0&&a.tick(T),{promise:new Promise(e=>{a.tasks.add(r={c:t,f:e})}),abort(){a.tasks.delete(r)}}}function F(t){return t}function H(t){return t<.5?8*Math.pow(t,4):-8*Math.pow(t-1,4)+1}function J(t){return-.5*(Math.cos(Math.PI*t)-1)}function D(t){return Object.prototype.toString.call(t)==="[object Date]"}function k(t,r){if(t===r||t!==t)return()=>t;const e=typeof t;if(e!==typeof r||Array.isArray(t)!==Array.isArray(r))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const s=r.map((n,o)=>k(t[o],n));return n=>s.map(o=>o(n))}if(e==="object"){if(!t||!r)throw new Error("Object cannot be null");if(D(t)&&D(r)){const o=t.getTime(),f=r.getTime()-o;return m=>new Date(o+m*f)}const s=Object.keys(r),n={};return s.forEach(o=>{n[o]=k(t[o],r[o])}),o=>{const h={};return s.forEach(f=>{h[f]=n[f](o)}),h}}if(e==="number"){const s=r-t;return n=>t+n*s}return()=>r}var c,l,d,u;const A=class A{constructor(r,e={}){p(this,c);p(this,l);p(this,d);p(this,u,null);w(this,c,b(r)),w(this,l,b(r)),w(this,d,e)}static of(r,e){const s=new A(r(),e);return _(()=>{s.set(r())}),s}set(r,e){var E;y(i(this,l),r);let{delay:s=0,duration:n=400,easing:o=F,interpolate:h=k}={...i(this,d),...e};if(n===0)return(E=i(this,u))==null||E.abort(),y(i(this,c),r),Promise.resolve();const f=a.now()+s;let m,j=!1,g=i(this,u);return w(this,u,C(O=>{if(On?(y(i(this,c),r),!1):(y(i(this,c),m(o(M/n))),!0)})),i(this,u).promise}get current(){return z(i(this,c))}get target(){return z(i(this,l))}set target(r){this.set(r)}};c=new WeakMap,l=new WeakMap,d=new WeakMap,u=new WeakMap;let S=A;export{S as T,C as l,H as q,J as s};