{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","withSequence","withTiming","ComplexAnimationBuilder","LightSpeedInRight","constructor","arguments","delayFunction","getDelayFunction","animation","config","getAnimationAndConfig","delay","getDelay","duration","getDuration","callback","callbackV","initialValues","values","animations","opacity","transform","translateX","skewX","windowWidth","createInstance","LightSpeedInLeft","LightSpeedOutRight","LightSpeedOutLeft"],"sources":["Lightspeed.ts"],"sourcesContent":["'use strict';\nimport { withSequence, withTiming } from '../../animation';\nimport type { BaseAnimationBuilder } from '../animationBuilder';\nimport { ComplexAnimationBuilder } from '../animationBuilder';\nimport type {\n EntryExitAnimationsValues,\n EntryExitAnimationFunction,\n IEntryExitAnimationBuilder,\n} from '../animationBuilder/commonTypes';\n\n/**\n * Entry from right animation with change in skew and opacity. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `entering` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/entering-exiting-animations#lightspeed\n */\nexport class LightSpeedInRight\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static presetName = 'LightSpeedInRight';\n\n static createInstance(\n this: T\n ): InstanceType {\n return new LightSpeedInRight() as InstanceType;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values: EntryExitAnimationsValues) => {\n 'worklet';\n return {\n animations: {\n opacity: delayFunction(delay, withTiming(1, { duration })),\n transform: [\n {\n translateX: delayFunction(\n delay,\n animation(0, { ...config, duration: duration * 0.7 })\n ),\n },\n {\n skewX: delayFunction(\n delay,\n withSequence(\n withTiming('10deg', { duration: duration * 0.7 }),\n withTiming('-5deg', { duration: duration * 0.15 }),\n withTiming('0deg', { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n opacity: 0,\n transform: [{ translateX: values.windowWidth }, { skewX: '-45deg' }],\n ...initialValues,\n },\n callback,\n };\n };\n };\n}\n\n/**\n * Entry from left animation with change in skew and opacity. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `entering` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/entering-exiting-animations#lightspeed\n */\nexport class LightSpeedInLeft\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static presetName = 'LightSpeedInLeft';\n\n static createInstance(\n this: T\n ): InstanceType {\n return new LightSpeedInLeft() as InstanceType;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const delay = this.getDelay();\n const duration = this.getDuration();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values: EntryExitAnimationsValues) => {\n 'worklet';\n return {\n animations: {\n opacity: delayFunction(delay, withTiming(1, { duration })),\n transform: [\n {\n translateX: delayFunction(\n delay,\n animation(0, { ...config, duration: duration * 0.7 })\n ),\n },\n {\n skewX: delayFunction(\n delay,\n withSequence(\n withTiming('-10deg', { duration: duration * 0.7 }),\n withTiming('5deg', { duration: duration * 0.15 }),\n withTiming('0deg', { duration: duration * 0.15 })\n )\n ),\n },\n ],\n },\n initialValues: {\n opacity: 0,\n transform: [{ translateX: -values.windowWidth }, { skewX: '45deg' }],\n ...initialValues,\n },\n callback,\n };\n };\n };\n}\n\n/**\n * Exit to right animation with change in skew and opacity. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `exiting` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/entering-exiting-animations#lightspeed\n */\nexport class LightSpeedOutRight\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static presetName = 'LightSpeedOutRight';\n\n static createInstance(\n this: T\n ): InstanceType {\n return new LightSpeedOutRight() as InstanceType;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const delay = this.getDelay();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values: EntryExitAnimationsValues) => {\n 'worklet';\n return {\n animations: {\n opacity: delayFunction(delay, animation(0, config)),\n transform: [\n {\n translateX: delayFunction(\n delay,\n animation(values.windowWidth, config)\n ),\n },\n {\n skewX: delayFunction(delay, animation('-45deg', config)),\n },\n ],\n },\n initialValues: {\n opacity: 1,\n transform: [{ translateX: 0 }, { skewX: '0deg' }],\n ...initialValues,\n },\n callback,\n };\n };\n };\n}\n\n/**\n * Exit to left animation with change in skew and opacity. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `exiting` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/entering-exiting-animations/#lightspeed\n */\nexport class LightSpeedOutLeft\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static presetName = 'LightSpeedOutLeft';\n\n static createInstance(\n this: T\n ): InstanceType {\n return new LightSpeedOutLeft() as InstanceType;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const delay = this.getDelay();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return (values: EntryExitAnimationsValues) => {\n 'worklet';\n return {\n animations: {\n opacity: delayFunction(delay, animation(0, config)),\n transform: [\n {\n translateX: delayFunction(\n delay,\n animation(-values.windowWidth, config)\n ),\n },\n {\n skewX: delayFunction(delay, animation('45deg', config)),\n },\n ],\n },\n initialValues: {\n opacity: 1,\n transform: [{ translateX: 0 }, { skewX: '0deg' }],\n ...initialValues,\n },\n callback,\n };\n };\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AACb,SAASU,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAE1D,SAASC,uBAAuB,QAAQ,qBAAqB;AAO7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,SACpBD,uBAAuB,CAEjC;EAAAE,YAAA;IAAA,SAAAC,SAAA;IAAA5B,eAAA,gBASU,MAAkC;MACxC,MAAM6B,aAAa,GAAG,IAAI,CAACC,gBAAgB,EAAE;MAC7C,MAAM,CAACC,SAAS,EAAEC,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