56 lines
1.5 KiB
JavaScript
56 lines
1.5 KiB
JavaScript
// Metro module 1700 (f1701).
|
|
import _slicedToArray from "./_slicedToArray";
|
|
import { AnimationsData } from "./Module1662";
|
|
const addTransformToKeepPosition = function addTransformToKeepPosition(style, a1, a2, a3) {
|
|
for (const item of Object.entries(a1)) {
|
|
const [r39, r40] = item;
|
|
if (r40.transform !== void 0) {
|
|
r40.transform.unshift(a2);
|
|
} else {
|
|
r40.transform = [a2];
|
|
}
|
|
const r52 = parseInt(r39) / 2;
|
|
style[`${a3 ? Math.min(r52, 49) : r52 + 50}`] = r40;
|
|
}
|
|
};
|
|
export function EntryExitTransition(a0, a1) {
|
|
const r20 = structuredClone(AnimationsData[a1.exiting]);
|
|
const r27 = structuredClone(AnimationsData[a1.entering]);
|
|
const r32 = {
|
|
translateX: `${a1.translateX}px`,
|
|
translateY: `${a1.translateY}px`,
|
|
scale: `${a1.scaleX},${a1.scaleY}`
|
|
};
|
|
const r45 = {
|
|
name: a0,
|
|
style: {},
|
|
duration: 300
|
|
};
|
|
addTransformToKeepPosition(r45.style, r20.style, r32, true);
|
|
addTransformToKeepPosition(r45.style, r27.style, {
|
|
translateX: "0px",
|
|
translateY: "0px",
|
|
scale: "1,1"
|
|
}, false);
|
|
(function hideComponentBetweenAnimations(a0) {
|
|
const map = new Map();
|
|
if (a0[0].opacity === void 0) {
|
|
map.set(48, 1);
|
|
map.set(49, 0);
|
|
}
|
|
if (a0[50].opacity === void 0) {
|
|
map.set(50, 0);
|
|
map.set(51, 1);
|
|
}
|
|
for (const item of map) {
|
|
const r50 = _slicedToArray(item, 2);
|
|
const r51 = r50[0];
|
|
a0[r51] = {
|
|
...a0[r51],
|
|
opacity: r50[1]
|
|
};
|
|
}
|
|
})(r45.style);
|
|
return r45;
|
|
}
|