324 lines
10 KiB
JavaScript
324 lines
10 KiB
JavaScript
// Metro module 357 (f358).
|
|
import Module358 from "./Module358";
|
|
import Module361 from "./Module361";
|
|
import { animatedShouldUseSingleOp, cxxNativeAnimatedEnabled, useSharedAnimatedBackend, animatedShouldDebounceQueueFlush } from "./Module27";
|
|
import nullthrows from "./nullthrows";
|
|
import Module38 from "./Module38";
|
|
import RCTDeviceEventEmitterImpl from "./RCTDeviceEventEmitterImpl";
|
|
import NativeEventEmitter from "./NativeEventEmitter";
|
|
let c372_17, c372_18;
|
|
let env372 = {};
|
|
let r25 = Module358;
|
|
if (r25 == null) {
|
|
r25 = Module361;
|
|
}
|
|
env372[5] = 1;
|
|
env372[6] = 1;
|
|
const c372_7 = new Set();
|
|
env372[8] = false;
|
|
const c372_9 = [];
|
|
const c372_10 = [];
|
|
const r34 = r25?.queueAndExecuteBatchedOperations != null && animatedShouldUseSingleOp();
|
|
env372[11] = null;
|
|
const c372_12 = {};
|
|
const c372_13 = {};
|
|
env372[14] = null;
|
|
env372[15] = null;
|
|
const c372_16 = cxxNativeAnimatedEnabled();
|
|
const r47 = cxxNativeAnimatedEnabled() && useSharedAnimatedBackend();
|
|
const r51 = ["createAnimatedNode", "updateAnimatedNodeConfig", "getValue", "startListeningToAnimatedNodeValue", "stopListeningToAnimatedNodeValue", "connectAnimatedNodes", "disconnectAnimatedNodes", "startAnimatingNode", "stopAnimation", "setAnimatedNodeValue", "setAnimatedNodeOffset", "flattenAnimatedNodeOffset", "extractAnimatedNodeOffset", "connectAnimatedNodeToView", "disconnectAnimatedNodeFromView", "restoreDefaultValues", "dropAnimatedNode", "addAnimatedEventToView", "removeAnimatedEventFromView", "addListener", "removeListener"];
|
|
if (r47) {
|
|
r51.push("connectAnimatedNodeToShadowNodeFamily");
|
|
}
|
|
const r55 = {};
|
|
const length = r51.length;
|
|
const r57 = 0 < length;
|
|
if (r34) {
|
|
let r61 = 0;
|
|
let r62 = 0;
|
|
if (r57) {
|
|
do {
|
|
const r64 = r51[r61];
|
|
let c374_0 = r61 + 1;
|
|
r55[r64] = function(...args) {
|
|
c372_10.push.apply(c372_10, [c374_0, ...args]);
|
|
if (c372_16) {
|
|
clearImmediate(env372[11]);
|
|
env372[11] = setImmediate(c372_18.flushQueue);
|
|
}
|
|
};
|
|
r61 = r62 + 1;
|
|
r62 = r61;
|
|
} while (r62 < length);
|
|
}
|
|
} else {
|
|
let r1 = 0;
|
|
let r0 = 0;
|
|
if (r57) {
|
|
do {
|
|
const r59 = r51[r1];
|
|
let c373_0 = r59;
|
|
r55[r59] = function() {
|
|
let c28647_0, c28647_1;
|
|
L6: {
|
|
const r8 = Array.prototype.slice.call(arguments, 0);
|
|
c28647_0 = r8;
|
|
c28647_1 = void 0;
|
|
const r18 = nullthrows(Module358)[c373_0];
|
|
c28647_1 = r18;
|
|
if (!env372[8]) {
|
|
if (c372_9.length === 0) {
|
|
if (c372_16) {
|
|
c372_9.push(() => c28647_1.apply(void 0, [...c28647_0]));
|
|
clearImmediate(env372[11]);
|
|
env372[11] = setImmediate(c372_18.flushQueue);
|
|
break L6;
|
|
}
|
|
r18.apply(void 0, [...r8]);
|
|
break L6;
|
|
}
|
|
}
|
|
c372_9.push(() => c28647_1.apply(void 0, [...c28647_0]));
|
|
}
|
|
};
|
|
r1 = r0 + 1;
|
|
r0 = r1;
|
|
} while (r0 < length);
|
|
}
|
|
}
|
|
c372_17 = r55;
|
|
c372_18 = {
|
|
addAnimatedEventToView: (a0, a1, a2) => {
|
|
c372_17.addAnimatedEventToView(a0, a1, a2);
|
|
},
|
|
connectAnimatedNodes: (a0, a1) => {
|
|
c372_17.connectAnimatedNodes(a0, a1);
|
|
},
|
|
connectAnimatedNodeToShadowNodeFamily: (a0, a1) => {
|
|
const connectAnimatedNodeToShadowNodeFamily2 = c372_17.connectAnimatedNodeToShadowNodeFamily;
|
|
if (connectAnimatedNodeToShadowNodeFamily2 != null) {
|
|
connectAnimatedNodeToShadowNodeFamily2.call(c372_17, a0, a1);
|
|
}
|
|
},
|
|
connectAnimatedNodeToView: (a0, a1) => {
|
|
c372_17.connectAnimatedNodeToView(a0, a1);
|
|
},
|
|
createAnimatedNode: (a0, a1) => {
|
|
if (a1.disableBatchingForNativeCreate) {
|
|
if (Module358 != null) {
|
|
Module358.createAnimatedNode(a0, a1);
|
|
}
|
|
} else {
|
|
c372_17.createAnimatedNode(a0, a1);
|
|
}
|
|
},
|
|
disableQueue: () => {
|
|
Module38(Module358, "Native animated module is not available");
|
|
if (animatedShouldDebounceQueueFlush()) {
|
|
clearImmediate(env372[11]);
|
|
env372[11] = setImmediate(c372_18.flushQueue);
|
|
} else {
|
|
c372_18.flushQueue();
|
|
}
|
|
},
|
|
disconnectAnimatedNodeFromView: (a0, a1) => {
|
|
c372_17.disconnectAnimatedNodeFromView(a0, a1);
|
|
},
|
|
disconnectAnimatedNodes: (a0, a1) => {
|
|
c372_17.disconnectAnimatedNodes(a0, a1);
|
|
},
|
|
dropAnimatedNode: (a0) => {
|
|
c372_17.dropAnimatedNode(a0);
|
|
},
|
|
extractAnimatedNodeOffset: (a0) => {
|
|
c372_17.extractAnimatedNodeOffset(a0);
|
|
},
|
|
flattenAnimatedNodeOffset: (a0) => {
|
|
c372_17.flattenAnimatedNodeOffset(a0);
|
|
},
|
|
flushQueue: r34 ? () => {
|
|
Module38(Module358, "Native animated module is not available");
|
|
env372[11] = null;
|
|
if (c372_10.length !== 0) {
|
|
if (!(env372[14] && env372[15])) {
|
|
env372[14] = RCTDeviceEventEmitterImpl.addListener("onNativeAnimatedModuleGetValue", (a0) => {
|
|
const tag = a0.tag;
|
|
const r4 = c372_12[tag];
|
|
if (r4) {
|
|
r4(a0.value);
|
|
delete c372_12[tag];
|
|
}
|
|
});
|
|
env372[15] = RCTDeviceEventEmitterImpl.addListener("onNativeAnimatedModuleAnimationFinished", (a0) => {
|
|
const r23 = Array.isArray(a0) ? a0 : [a0];
|
|
for (const item of r23) {
|
|
const animationId = item.animationId;
|
|
const r34 = c372_13[animationId];
|
|
if (r34) {
|
|
r34(item);
|
|
delete c372_13[animationId];
|
|
}
|
|
}
|
|
});
|
|
}
|
|
if (Module358 != null) {
|
|
const queueAndExecuteBatchedOperations = Module358.queueAndExecuteBatchedOperations;
|
|
if (queueAndExecuteBatchedOperations != null) {
|
|
queueAndExecuteBatchedOperations.call(Module358, c372_10);
|
|
}
|
|
}
|
|
c372_10.length = 0;
|
|
}
|
|
} : () => {
|
|
Module38(Module358, "Native animated module is not available");
|
|
env372[11] = null;
|
|
let r16 = c372_9;
|
|
if (r16.length !== 0) {
|
|
if (Module358 != null) {
|
|
const startOperationBatch = Module358.startOperationBatch;
|
|
if (startOperationBatch != null) {
|
|
startOperationBatch.call(Module358);
|
|
}
|
|
}
|
|
const length = r16.length;
|
|
const r5 = 0 < length;
|
|
let r0 = 0;
|
|
if (r5) {
|
|
do {
|
|
c372_9[r0]();
|
|
r0 = r0 + 1;
|
|
r16 = c372_9;
|
|
} while (r0 < length);
|
|
}
|
|
r16.length = 0;
|
|
if (Module358 != null) {
|
|
const finishOperationBatch = Module358.finishOperationBatch;
|
|
if (finishOperationBatch != null) {
|
|
finishOperationBatch.call(Module358);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
getValue: r34 ? (a0, a1) => {
|
|
if (a1) {
|
|
c372_12[a0] = a1;
|
|
}
|
|
c372_17.getValue(a0);
|
|
} : (a0, a1) => {
|
|
c372_17.getValue(a0, a1);
|
|
},
|
|
removeAnimatedEventFromView: (a0, a1, a2) => {
|
|
c372_17.removeAnimatedEventFromView(a0, a1, a2);
|
|
},
|
|
restoreDefaultValues: (a0) => {
|
|
const restoreDefaultValues2 = c372_17.restoreDefaultValues;
|
|
if (restoreDefaultValues2 != null) {
|
|
restoreDefaultValues2.call(c372_17, a0);
|
|
}
|
|
},
|
|
setAnimatedNodeOffset: (a0, a1) => {
|
|
c372_17.setAnimatedNodeOffset(a0, a1);
|
|
},
|
|
setAnimatedNodeValue: (a0, a1) => {
|
|
c372_17.setAnimatedNodeValue(a0, a1);
|
|
},
|
|
setWaitingForIdentifier: (a0) => {
|
|
if (!c372_16) {
|
|
c372_7.add(a0);
|
|
env372[8] = true;
|
|
if (animatedShouldDebounceQueueFlush() && env372[11]) {
|
|
clearImmediate(env372[11]);
|
|
}
|
|
}
|
|
},
|
|
startAnimatingNode: r34 ? (a0, a1, a2, a3) => {
|
|
if (a3) {
|
|
c372_13[a0] = a3;
|
|
}
|
|
c372_17.startAnimatingNode(a0, a1, a2);
|
|
} : (a0, a1, a2, a3) => {
|
|
c372_17.startAnimatingNode(a0, a1, a2, a3);
|
|
},
|
|
startListeningToAnimatedNodeValue: (a0) => {
|
|
c372_17.startListeningToAnimatedNodeValue(a0);
|
|
},
|
|
stopAnimation: (a0) => {
|
|
c372_17.stopAnimation(a0);
|
|
},
|
|
stopListeningToAnimatedNodeValue: (a0) => {
|
|
c372_17.stopListeningToAnimatedNodeValue(a0);
|
|
},
|
|
unsetWaitingForIdentifier: (a0) => {
|
|
if (!c372_16) {
|
|
c372_7.delete(a0);
|
|
if (c372_7.size === 0) {
|
|
env372[8] = false;
|
|
c372_18.disableQueue();
|
|
}
|
|
}
|
|
},
|
|
updateAnimatedNodeConfig: (a0, a1) => {
|
|
const updateAnimatedNodeConfig2 = c372_17.updateAnimatedNodeConfig;
|
|
if (updateAnimatedNodeConfig2 != null) {
|
|
updateAnimatedNodeConfig2.call(c372_17, a0, a1);
|
|
}
|
|
}
|
|
};
|
|
env372[19] = false;
|
|
const r92 = {
|
|
API: c372_18,
|
|
assertNativeAnimatedModule: function assertNativeAnimatedModule() {
|
|
Module38(Module358, "Native animated module is not available");
|
|
},
|
|
generateNewAnimationId: function generateNewAnimationId() {
|
|
const r3 = +env372[6];
|
|
env372[6] = r3 + 1;
|
|
return r3;
|
|
},
|
|
generateNewNodeTag: function generateNewNodeTag() {
|
|
const r3 = +env372[5];
|
|
env372[5] = r3 + 1;
|
|
return r3;
|
|
}
|
|
};
|
|
Object.defineProperty(r92, "nativeEventEmitter", {
|
|
get: function() {
|
|
let r1 = env372[3];
|
|
if (!r1) {
|
|
const nativeEventEmitter = new NativeEventEmitter(null);
|
|
env372[3] = nativeEventEmitter;
|
|
r1 = nativeEventEmitter;
|
|
}
|
|
return r1;
|
|
},
|
|
set: void 0,
|
|
enumerable: true,
|
|
configurable: true
|
|
});
|
|
r92.shouldSignalBatch = c372_16;
|
|
r92.shouldUseNativeDriver = function shouldUseNativeDriver(a0) {
|
|
let r15;
|
|
if (a0.useNativeDriver == null) {
|
|
console.warn("Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`");
|
|
}
|
|
L9: {
|
|
if (a0.useNativeDriver === true && !Module358) {
|
|
const r1 = env372[19];
|
|
r15 = false;
|
|
if (r1) {
|
|
break L9;
|
|
}
|
|
console.warn("Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. Make sure to run `bundle exec pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md");
|
|
env372[19] = true;
|
|
r15 = false;
|
|
} else {
|
|
r15 = a0.useNativeDriver || false;
|
|
}
|
|
}
|
|
return r15;
|
|
};
|
|
r92.transformDataType = function transformDataType(a0) {
|
|
return typeof a0 === "string" ? a0.endsWith("deg") ? (parseFloat(a0) || 0) * Math.PI / 180 : a0.endsWith("rad") ? parseFloat(a0) || 0 : a0 : a0;
|
|
};
|
|
export default r92;
|