65 lines
4.0 KiB
TypeScript
65 lines
4.0 KiB
TypeScript
/* Metro module 13561; source: modules/quests/native/useIsCarouselInView.tsx; dependencies: [57, 31, 1478, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
|
|
function _fun103032(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13751:6, offset: 0x02254844, size: 133 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/useIsCarouselInView.tsx');
|
|
exports.default = useIsCarouselInView;
|
|
function useIsCarouselInView() { // fn#103033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13751:205, offset: 0x022548c9, size: 189 bytes, params: 1, frame: 18
|
|
const binding = env0_3;
|
|
const value2 = binding.useRef(null);
|
|
const height = (UseWindowDimensionsNative)().height;
|
|
const env0_2 = binding.useRef(height);
|
|
binding.useEffect(_fun103034, [height]);
|
|
const value = env0_2(binding.useState(true), 2);
|
|
const property = value[0];
|
|
var env0_3 = value[1];
|
|
const env0_4 = binding.useRef(property);
|
|
binding.useEffect(function() {
|
|
var env0_0 = global.setInterval(_fun103036, 1000);
|
|
return _fun103038;
|
|
}, []);
|
|
return {containerRef: value2, isInView: property};
|
|
function _fun103034() { // fn#103034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13751:303, offset: 0x0100b231, size: 21 bytes, params: 1, frame: 2
|
|
env0_2.current = height;
|
|
}
|
|
|
|
function _fun103035() { // fn#103035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13751:405, offset: 0x02254986, size: 44 bytes, params: 1, frame: 14
|
|
const env0_0 = global.setInterval(_fun103036, 1000);
|
|
return _fun103038;
|
|
function _fun103036() { // fn#103036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13751:429, offset: 0x022549b2, size: 51 bytes, params: 1, frame: 11
|
|
if (env1_0.current != null) {
|
|
env1_0.current.measure(_fun103037);
|
|
}
|
|
function _fun103037(a0, a1, a2, a3, a4, a5) { // fn#103037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13751:470, offset: 0x022549e5, size: 144 bytes, params: 7, frame: 19
|
|
const current = env2_2.current;
|
|
const Math = global.Math;
|
|
const max = Math.max;
|
|
const Math2 = global.Math;
|
|
const value2 = Math2.min(a5 + a3, current);
|
|
const Math3 = global.Math;
|
|
const r2 = a3 > 0 && Reflect.apply(max, Math, [0, value2 - Math3.max(a5, 0)]) / a3 >= 0.5;
|
|
if (r2 !== env2_4.current) {
|
|
env2_4.current = r2;
|
|
env2_3(r2);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun103038() { // fn#103038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13751:611, offset: 0x013378b1, size: 24 bytes, params: 1, frame: 11
|
|
return global.clearInterval(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun103032, 13561, [57, 31, 1478, 2]) /* metro module 13561, dependencies: [57, 31, 1478, 2] */;
|