{"version":3,"file":"ValueAnimation.min.mjs","sources":["../../../../src/util/animation/ValueAnimation.ts"],"sourcesContent":["import { AnimationBase } from './AnimationBase';\nimport type { ValueAnimationOptions } from './types';\n\nexport class ValueAnimation extends AnimationBase<number> {\n  constructor({\n    startValue = 0,\n    endValue = 100,\n    ...otherOptions\n  }: ValueAnimationOptions) {\n    super({\n      ...otherOptions,\n      startValue,\n      byValue: endValue - startValue,\n    });\n  }\n\n  protected calculate(timeElapsed: number) {\n    const value = this.easing(\n      timeElapsed,\n      this.startValue,\n      this.byValue,\n      this.duration,\n    );\n    return {\n      value,\n      valueProgress: Math.abs((value - this.startValue) / this.byValue),\n    };\n  }\n}\n"],"names":["ValueAnimation","AnimationBase","constructor","_ref","startValue","endValue","otherOptions","super","byValue","calculate","timeElapsed","value","this","easing","duration","valueProgress","Math","abs"],"mappings":"wDAGO,MAAMA,UAAuBC,EAClCC,WAAAA,CAAWC,GAIe,IAJdC,WACVA,EAAa,EAACC,SACdA,EAAW,OACRC,GACmBH,EACtBI,MAAM,IACDD,EACHF,aACAI,QAASH,EAAWD,GAExB,CAEUK,SAAAA,CAAUC,GAClB,MAAMC,EAAQC,KAAKC,OACjBH,EACAE,KAAKR,WACLQ,KAAKJ,QACLI,KAAKE,UAEP,MAAO,CACLH,QACAI,cAAeC,KAAKC,KAAKN,EAAQC,KAAKR,YAAcQ,KAAKJ,SAE7D"}