95 lines
7.4 KiB
React
95 lines
7.4 KiB
React
/* Metro module 1689; source: unknown; dependencies: [1650] */
|
|
function _fun18425(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:6, offset: 0x00e8bd69, size: 166 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = {code: "function pnpm_delayTs2(){const{_nextAnimation,delayMs,getReduceMotionForAnimation,reduceMotion}=this.__closure;const nextAnimation=typeof _nextAnimation==='function'?_nextAnimation():_nextAnimation;function delay(animation,now){const{startTime:startTime,started:started,previousAnimation:previousAnimation}=animation;const current=animation.current;if(now-startTime>=delayMs||animation.reduceMotion){if(!started){nextAnimation.onStart(nextAnimation,current,now,previousAnimation);animation.previousAnimation=null;animation.started=true;}const finished=nextAnimation.onFrame(nextAnimation,now);animation.current=nextAnimation.current;return finished;}else if(previousAnimation){const finished=previousAnimation.finished||previousAnimation.onFrame(previousAnimation,now);animation.current=previousAnimation.current;if(finished){animation.previousAnimation=null;}}return false;}function onStart(animation,value,now,previousAnimation){animation.startTime=now;animation.started=false;animation.current=value;if(previousAnimation===animation){animation.previousAnimation=previousAnimation.previousAnimation;}else{animation.previousAnimation=previousAnimation;}if(nextAnimation.reduceMotion===undefined){nextAnimation.reduceMotion=animation.reduceMotion;}}const callback=function(finished){if(nextAnimation.callback){nextAnimation.callback(finished);}};return{isHigherOrder:true,onFrame:delay,onStart:onStart,current:nextAnimation.current,callback:callback,previousAnimation:null,startTime:0,started:false,reduceMotion:getReduceMotionForAnimation(reduceMotion)};}"};
|
|
const closure = withDelay;
|
|
const object = {};
|
|
object.defineAnimation = (require(1650) /* metro dependency 1650 */).defineAnimation;
|
|
const getReduceMotionForAnimation = (require(1650) /* metro dependency 1650 */).getReduceMotionForAnimation;
|
|
object.getReduceMotionForAnimation = getReduceMotionForAnimation;
|
|
closure.__closure = object;
|
|
closure.__workletHash = 10965419997083;
|
|
closure.__initData = {code: "function pnpm_delayTs1(delayMs,_nextAnimation,reduceMotion){const{defineAnimation,getReduceMotionForAnimation}=this.__closure;return defineAnimation(_nextAnimation,function(){'worklet';const nextAnimation=typeof _nextAnimation==='function'?_nextAnimation():_nextAnimation;function delay(animation,now){const{startTime:startTime,started:started,previousAnimation:previousAnimation}=animation;const current=animation.current;if(now-startTime>=delayMs||animation.reduceMotion){if(!started){nextAnimation.onStart(nextAnimation,current,now,previousAnimation);animation.previousAnimation=null;animation.started=true;}const finished=nextAnimation.onFrame(nextAnimation,now);animation.current=nextAnimation.current;return finished;}else if(previousAnimation){const finished=previousAnimation.finished||previousAnimation.onFrame(previousAnimation,now);animation.current=previousAnimation.current;if(finished){animation.previousAnimation=null;}}return false;}function onStart(animation,value,now,previousAnimation){animation.startTime=now;animation.started=false;animation.current=value;if(previousAnimation===animation){animation.previousAnimation=previousAnimation.previousAnimation;}else{animation.previousAnimation=previousAnimation;}if(nextAnimation.reduceMotion===undefined){nextAnimation.reduceMotion=animation.reduceMotion;}}const callback=function(finished){if(nextAnimation.callback){nextAnimation.callback(finished);}};return{isHigherOrder:true,onFrame:delay,onStart:onStart,current:nextAnimation.current,callback:callback,previousAnimation:null,startTime:0,started:false,reduceMotion:getReduceMotionForAnimation(reduceMotion)};});}"};
|
|
exports.withDelay = closure;
|
|
}
|
|
|
|
function withDelay(a0, a1, a2) { // fn#18426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3317, offset: 0x00e8be0f, size: 135 bytes, params: 4, frame: 22
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const moduleValue = require(1650) /* metro dependency 1650 */;
|
|
const defineAnimation = moduleValue.defineAnimation;
|
|
const closure = pnpm_delayTs2;
|
|
const getReduceMotionForAnimation = moduleValue.getReduceMotionForAnimation;
|
|
closure.__closure = {_nextAnimation: a1, delayMs: a0, getReduceMotionForAnimation: getReduceMotionForAnimation,
|
|
reduceMotion: a2};
|
|
closure.__workletHash = 7904568249320;
|
|
closure.__initData = env0_2;
|
|
return Reflect.apply(defineAnimation, moduleValue, [a1, closure]);
|
|
}
|
|
|
|
function pnpm_delayTs2() { // fn#18427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3384, owner: withDelay.pnpm_delayTs2, offset: 0x00e8be96, size: 153 bytes, params: 1, frame: 13
|
|
const r3 = typeof require === 'function' ? require() : require;
|
|
const object2 = {isHigherOrder: true, onFrame: onFrame, onStart: onStart_18429};
|
|
object2.current = r3.current;
|
|
object2.callback = callback_18430;
|
|
object2.previousAnimation = null;
|
|
object2.startTime = 0;
|
|
object2.started = false;
|
|
object2.reduceMotion = (require(1650) /* metro dependency 1650 */).getReduceMotionForAnimation(importDefault);
|
|
return object2;
|
|
}
|
|
|
|
function pnpm_delayTs2OnFrame(a0, a1) { // fn#18428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3474, owner: withDelay.pnpm_delayTs2.onFrame, offset: 0x00e8bf2f, size: 195 bytes, params: 3, frame: 18
|
|
var r1;
|
|
var value3;
|
|
const startTime = a0.startTime;
|
|
const started = a0.started;
|
|
const previousAnimation = a0.previousAnimation;
|
|
let current = a0.current;
|
|
if (a1 - startTime >= env1_0) {
|
|
if (!started) {
|
|
env0_0.onStart(env0_0, current, a1, previousAnimation);
|
|
a0.previousAnimation = null;
|
|
a0.started = true;
|
|
}
|
|
value3 = env0_0.onFrame(env0_0, a1);
|
|
current = env0_0.current;
|
|
a0.current = current;
|
|
return value3;
|
|
}
|
|
if (a0.reduceMotion) {
|
|
if (!started) {
|
|
env0_0.onStart(env0_0, current, a1, previousAnimation);
|
|
a0.previousAnimation = null;
|
|
a0.started = true;
|
|
}
|
|
value3 = env0_0.onFrame(env0_0, a1);
|
|
current = env0_0.current;
|
|
a0.current = current;
|
|
return value3;
|
|
}
|
|
if (previousAnimation) {
|
|
r1 = previousAnimation.finished || previousAnimation.onFrame(previousAnimation, a1);
|
|
a0.current = previousAnimation.current;
|
|
if (r1) {
|
|
a0.previousAnimation = null;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function pnpm_delayTs2OnStart(a0, a1, a2, a3) { // fn#18429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1816:3804, owner: withDelay.pnpm_delayTs2.onStart, offset: 0x00e8bff2, size: 88 bytes, params: 5, frame: 4
|
|
const value = a3;
|
|
a0.startTime = a2;
|
|
a0.started = false;
|
|
a0.current = a1;
|
|
a0.previousAnimation = value !== a0 ? value : value.previousAnimation;
|
|
if (env0_0.reduceMotion === undefined) {
|
|
env0_0.reduceMotion = a0.reduceMotion;
|
|
}
|
|
}
|
|
|