Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,258 @@
|
||||
/* Metro module 14377; source: modules/home_drawer/native/useHomeDrawerPeekHint.tsx; dependencies: [57, 31, 4502, 14375, 661, 1376, 4017, 1365, 1485, 14378, 566, 14373, 3968, 7013, 4504, 4577, 14374, 2] */
|
||||
function _fun108802(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:6, offset: 0x0232ee13, size: 350 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const homeDrawerStore = importDefault(14375) /* metro dependency 14375: HomeDrawerStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).ME;
|
||||
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const env0_8 = Reflect.apply(inOut, Easing, [Easing2.cubic]);
|
||||
const env0_9 = [];
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
|
||||
object = [HOME_DRAWER_SWIPE_PEEK_NUX];
|
||||
object = {code: 'function useHomeDrawerPeekHintTsx1(){const{gestureState,panelX,PEEK_HINT_DRAWER_DRAG_THRESHOLD}=this.__closure;return gestureState.get().active&&panelX.get()>PEEK_HINT_DRAWER_DRAG_THRESHOLD;}'};
|
||||
object = {code: 'function useHomeDrawerPeekHintTsx2(isDragged,wasDragged){const{isPeekGranted,runOnJS,handleDrawerDragged}=this.__closure;if(!isPeekGranted||wasDragged==null)return;if(isDragged&&!wasDragged){runOnJS(handleDrawerDragged)();}}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerPeekHint.tsx');
|
||||
exports.PEEK_HINT_DISTANCE = 40;
|
||||
exports.useHomeDrawerPeekHint = useHomeDrawerPeekHint;
|
||||
}
|
||||
|
||||
function useHomeDrawerPeekHint(a0, a1) { // fn#108803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:872, offset: 0x0232ef71, size: 944 bytes, params: 3, frame: 32
|
||||
var object2;
|
||||
let value = a0;
|
||||
const env0_0 = a1;
|
||||
const value3 = HomeDrawerStore();
|
||||
const panelX = value3.panelX;
|
||||
const gestureState = value3.gestureState;
|
||||
const env0_2 = gestureState;
|
||||
const lastInteractionAt = value3.lastInteractionAt;
|
||||
const env0_3 = lastInteractionAt;
|
||||
const isPanelTouchActive = value3.isPanelTouchActive;
|
||||
const noteInteraction = value3.noteInteraction;
|
||||
const value4 = (require(1485) /* metro dependency 1485 */).useIsFocused();
|
||||
const value5 = (require(14378) /* metro dependency 14378: useDrawerState */).useDrawerOpen(value);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
let property = env0_2((require(14373) /* metro dependency 14373: useGuildsRouteGuildId */).useGuildsRouteGuildAndChannelId(),
|
||||
1)[0];
|
||||
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
|
||||
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
let HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
|
||||
const value8 = !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
|
||||
[HOME_DRAWER_SWIPE_PEEK_NUX]);
|
||||
let r3 = value && value4 && property != null;
|
||||
r3 = r3 && property !== ME && !value5;
|
||||
r3 = r3 && !useReducedMotion && value8;
|
||||
let binding = env0_3;
|
||||
const env0_8 = binding.useRef(false);
|
||||
value = binding.useState(false);
|
||||
value = env0_2(value, 2);
|
||||
property = value[0];
|
||||
const env0_9 = property;
|
||||
const property2 = value[1];
|
||||
const env0_10 = property2;
|
||||
if (property && !r3) {
|
||||
property2(false);
|
||||
}
|
||||
const useSelectedDismissibleContent = (require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent;
|
||||
value = Reflect.apply(useSelectedDismissibleContent, value, [property && r3 ? env0_10 : env0_9, undefined, true]);
|
||||
value = env0_2(value, 2);
|
||||
const property3 = value[0];
|
||||
const property4 = value[1];
|
||||
const env0_11 = property4;
|
||||
binding = env0_3;
|
||||
const env0_12 = binding.useRef(null);
|
||||
const env0_13 = binding.useRef(null);
|
||||
const env0_14 = binding.useRef(false);
|
||||
const env0_15 = binding.useRef(null);
|
||||
value = binding.useCallback(_fun108805, [a1]);
|
||||
HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
|
||||
const value9 = property3 === HOME_DRAWER_SWIPE_PEEK_NUX;
|
||||
binding.useEffect(_fun108807, [value9, value, property4]);
|
||||
value = binding.useCallback(_fun108808, [a1]);
|
||||
binding.useEffect(_fun108809, [r3, property, noteInteraction, lastInteractionAt, isPanelTouchActive]);
|
||||
binding.useEffect(_fun108812, [value5, value]);
|
||||
binding.useEffect(_fun108813, [r3, value]);
|
||||
value = binding.useCallback(_fun108814, [value]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
const closure = useHomeDrawerPeekHintV;
|
||||
closure.__closure = {gestureState: gestureState, panelX: panelX, PEEK_HINT_DRAWER_DRAG_THRESHOLD: 8};
|
||||
closure.__workletHash = 15765003051494;
|
||||
closure.__initData = env0_11;
|
||||
const closure2 = useHomeDrawerPeekHintQ;
|
||||
object2 = {isPeekGranted: value9};
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.handleDrawerDragged = value;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 10054961085184;
|
||||
closure2.__initData = env0_12;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
}
|
||||
|
||||
function _fun108805() { // fn#108805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1560, offset: 0x0232f321, size: 179 bytes, params: 1, frame: 18
|
||||
if (env0_12.current != null) {
|
||||
global.clearTimeout(env0_12.current);
|
||||
env0_12.current = null;
|
||||
}
|
||||
env0_14.current = true;
|
||||
const set = require.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, require, [timingModule.withTiming(40, {duration: 1500, easing: env1_8})]);
|
||||
env0_13.current = global.setTimeout(_fun108806, 2500);
|
||||
}
|
||||
|
||||
function _fun108807() { // fn#108807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1949, offset: 0x0232f465, size: 53 bytes, params: 1, frame: 10
|
||||
if (result && !env0_14.current) {
|
||||
env0_15.current = env0_11;
|
||||
env0_16();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108808() { // fn#108808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2019, offset: 0x0232f49a, size: 197 bytes, params: 1, frame: 17
|
||||
var set;
|
||||
var value;
|
||||
if (env0_12.current != null) {
|
||||
global.clearTimeout(env0_12.current);
|
||||
env0_12.current = null;
|
||||
}
|
||||
if (env0_13.current != null) {
|
||||
global.clearTimeout(env0_13.current);
|
||||
env0_13.current = null;
|
||||
}
|
||||
if (env0_14.current) {
|
||||
env0_14.current = false;
|
||||
set = require.set;
|
||||
value = environment.__proto__;
|
||||
value = require(4577) /* metro dependency 4577: spring */;
|
||||
Reflect.apply(set, require, [value.withSpring(0,
|
||||
(require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS)]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108809() { // fn#108809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2251, offset: 0x0232f55f, size: 95 bytes, params: 1, frame: 15
|
||||
if (env0_7) {
|
||||
if (env0_9) {
|
||||
return undefined;
|
||||
}
|
||||
if (env0_8.current) {
|
||||
return undefined;
|
||||
}
|
||||
noteInteraction();
|
||||
env0_12.current = global.setTimeout(checkIdle, 2000);
|
||||
return _fun108811;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108812() { // fn#108812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2541, offset: 0x0232f67e, size: 36 bytes, params: 1, frame: 10
|
||||
if (env0_6) {
|
||||
env0_8.current = true;
|
||||
env0_18();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108813() { // fn#108813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2590, offset: 0x0232f6a2, size: 81 bytes, params: 1, frame: 11
|
||||
var current;
|
||||
let binding = env0_7;
|
||||
if (!binding && env0_14.current) {
|
||||
env0_18();
|
||||
current = env0_15.current;
|
||||
if (current != null) {
|
||||
binding = env0_15;
|
||||
current = binding.current;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108814() { // fn#108814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2693, offset: 0x0232f6f3, size: 68 bytes, params: 1, frame: 13
|
||||
var binding;
|
||||
var value2;
|
||||
env0_18();
|
||||
let current = env0_15.current;
|
||||
if (current != null) {
|
||||
binding = env0_15;
|
||||
current = binding.current;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(current, binding, [ContentDismissActionType.INDIRECT_ACTION]);
|
||||
}
|
||||
env0_10(false);
|
||||
}
|
||||
|
||||
function useHomeDrawerPeekHintV() { // fn#108815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2793, owner: useHomeDrawerPeekHint.V, offset: 0x0232f737, size: 47 bytes, params: 1, frame: 10
|
||||
var r0;
|
||||
var value;
|
||||
const gestureStateBinding = gestureState;
|
||||
const get = gestureStateBinding.get;
|
||||
const active = Reflect.apply(get, gestureStateBinding, []).active;
|
||||
if (active) {
|
||||
value = panelX.get();
|
||||
value = value > 8;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = active;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useHomeDrawerPeekHintQ(a0, a1) { // fn#108816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2946, owner: useHomeDrawerPeekHint.Q, offset: 0x0232f766, size: 84 bytes, params: 3, frame: 13
|
||||
let value = a0;
|
||||
if (result && a1 != null && value && !a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_19)();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108806() { // fn#108806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1714, offset: 0x0232f3d4, size: 145 bytes, params: 1, frame: 21
|
||||
var binding;
|
||||
env1_13.current = null;
|
||||
env1_14.current = false;
|
||||
const set = require.set;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const HOME_DRAWER_FLING_PHYSICS = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS;
|
||||
Reflect.apply(set, require, [Reflect.apply(withSpring, springModule, [0, HOME_DRAWER_FLING_PHYSICS])]);
|
||||
if (env1_15.current != null) {
|
||||
binding = env1_15;
|
||||
binding.current(ContentDismissActionType.AUTO_DISMISS);
|
||||
}
|
||||
env1_10(false);
|
||||
}
|
||||
|
||||
function checkIdle() { // fn#108810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2296, offset: 0x0232f5be, size: 136 bytes, params: 1, frame: 16
|
||||
env1_12.current = null;
|
||||
const Date = global.Date;
|
||||
const value2 = Date.now();
|
||||
const current = lastInteractionAt.current;
|
||||
const value3 = 2000;
|
||||
const value4 = value3 - (value2 - current);
|
||||
const isPanelTouchActiveBinding = isPanelTouchActive;
|
||||
const get = isPanelTouchActiveBinding.get;
|
||||
if (Reflect.apply(get, isPanelTouchActiveBinding, [])) {
|
||||
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
|
||||
} else if (value4 > 0) {
|
||||
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
|
||||
} else {
|
||||
env1_10(true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108811() { // fn#108811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2448, offset: 0x0232f646, size: 56 bytes, params: 1, frame: 13
|
||||
if (env1_12.current != null) {
|
||||
global.clearTimeout(env1_12.current);
|
||||
env1_12.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user