{"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","_objectWithoutProperties","_excluded","super","_objectSpread","byValue","calculate","timeElapsed","value","this","easing","duration","valueProgress","Math","abs"],"mappings":"2MAGO,MAAMA,UAAuBC,EAClCC,WAAAA,CAAWC,GAIe,IAJdC,WACVA,EAAa,EAACC,SACdA,EAAW,KAEWF,EADnBG,EAAYC,EAAAJ,EAAAK,GAEfC,MAAKC,EAAAA,KACAJ,GAAY,CAAA,EAAA,CACfF,aACAO,QAASN,EAAWD,IAExB,CAEUQ,SAAAA,CAAUC,GAClB,MAAMC,EAAQC,KAAKC,OACjBH,EACAE,KAAKX,WACLW,KAAKJ,QACLI,KAAKE,UAEP,MAAO,CACLH,QACAI,cAAeC,KAAKC,KAAKN,EAAQC,KAAKX,YAAcW,KAAKJ,SAE7D"}