723 lines
38 KiB
React
723 lines
38 KiB
React
/* Metro module 1820; source: unknown; dependencies: [5, 29, 31, 33, 1610, 1818, 1821, 1804, 1800, 1600, 1822, 1823, 1824] */
|
|
function _fun19849(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:6, offset: 0x00eb570e, size: 477 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const env0_3 = ['children', 'onLayout', 'bottomOffset', 'disableScrollOnKeyboardHide', 'enabled',
|
|
'extraKeyboardSpace', 'mode', 'ScrollViewComponent', 'snapToOffsets'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_5 = importDefault(29) /* metro dependency 29 */;
|
|
let value = require(31) /* metro dependency 31 */;
|
|
const forwardRef = value.forwardRef;
|
|
const env0_6 = value.useCallback;
|
|
const env0_7 = value.useEffect;
|
|
const env0_8 = value.useImperativeHandle;
|
|
const env0_9 = value.useMemo;
|
|
const env0_10 = importDefault(31) /* metro dependency 31 */;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_11 = value.jsx;
|
|
const env0_12 = value.jsxs;
|
|
object = {code: 'function pnpm_indexTsx1(e,animated=false){const{enabled,layout,scrollViewTarget,height,keyboardHeight,bottomOffset,interpolate,initialKeyboardSize,scrollDistanceWithRespectToSnapPoints,scrollPosition,snapToOffsets,scrollTo,scrollViewAnimatedRef,scrollViewPageY}=this.__closure;var _layout$value,_layout$value2,_layout$value3;if(!enabled){return 0;}if(((_layout$value=layout.value)===null||_layout$value===void 0?void 0:_layout$value.parentScrollViewTarget)!==scrollViewTarget.value){return 0;}const visibleRect=height-keyboardHeight.value;const absoluteY=((_layout$value2=layout.value)===null||_layout$value2===void 0?void 0:_layout$value2.layout.absoluteY)||0;const inputHeight=((_layout$value3=layout.value)===null||_layout$value3===void 0?void 0:_layout$value3.layout.height)||0;const point=absoluteY+inputHeight;if(visibleRect-point<=bottomOffset){const relativeScrollTo=keyboardHeight.value-(height-point)+bottomOffset;const interpolatedScrollTo=interpolate(e,[initialKeyboardSize.value,keyboardHeight.value],[0,scrollDistanceWithRespectToSnapPoints(relativeScrollTo+scrollPosition.value,snapToOffsets)-scrollPosition.value]);const targetScrollY=Math.max(interpolatedScrollTo,0)+scrollPosition.value;scrollTo(scrollViewAnimatedRef,0,targetScrollY,animated);return interpolatedScrollTo;}if(point<scrollViewPageY.value){const positionOnScreen=visibleRect-bottomOffset;const topOfScreen=scrollPosition.value+point;scrollTo(scrollViewAnimatedRef,0,topOfScreen-positionOnScreen,animated);}return 0;}'};
|
|
object = {code: 'function pnpm_indexTsx2(e){const{mode,keyboardWillAppear,ghostViewSpace,scrollTo,scrollViewAnimatedRef,scrollPosition,interpolate,initialKeyboardSize,keyboardHeight}=this.__closure;if(mode==="layout"){return false;}if(!keyboardWillAppear.value&&ghostViewSpace.value>0){scrollTo(scrollViewAnimatedRef,0,scrollPosition.value-interpolate(e,[initialKeyboardSize.value,keyboardHeight.value],[ghostViewSpace.value,0]),false);return true;}return false;}'};
|
|
object = {code: 'function pnpm_indexTsx3(newPosition){const{scrollPosition,maybeScroll,keyboardHeight}=this.__closure;const prevScroll=scrollPosition.value;scrollPosition.value=newPosition;maybeScroll(keyboardHeight.value,true);scrollPosition.value=prevScroll;}'};
|
|
object = {code: 'function pnpm_indexTsx4(e){const{interpolate,keyboardHeight,extraKeyboardSpace,currentKeyboardFrameHeight}=this.__closure;const keyboardFrame=interpolate(e.height,[0,keyboardHeight.value],[0,keyboardHeight.value+extraKeyboardSpace]);currentKeyboardFrameHeight.value=keyboardFrame;}'};
|
|
object = {code: 'function pnpm_indexTsx5(){const{lastSelection,input,layout,clamp}=this.__closure;var _lastSelection$value,_input$value;const customHeight=(_lastSelection$value=lastSelection.value)===null||_lastSelection$value===void 0?void 0:_lastSelection$value.selection.end.y;if(!((_input$value=input.value)!==null&&_input$value!==void 0&&_input$value.layout)||!customHeight){return false;}layout.value={...input.value,layout:{...input.value.layout,height:clamp(customHeight,0,input.value.layout.height)}};return true;}'};
|
|
object = {code: 'function pnpm_indexTsx6(){const{layout,updateLayoutFromSelection,performScrollWithPositionRestoration,position}=this.__closure;const prevLayout=layout.value;if(!updateLayoutFromSelection()){return;}performScrollWithPositionRestoration(position.value);layout.value=prevLayout;}'};
|
|
object = {code: 'function pnpm_indexTsx7(){const{scrollFromCurrentPosition}=this.__closure;scrollFromCurrentPosition();}'};
|
|
object = {code: 'function pnpm_indexTsx8(e){const{lastSelection,selectionUpdatedSinceHide,pendingSelectionForFocus,updateLayoutFromSelection,keyboardWillAppear,keyboardHeight,position,maybeScroll,scrollFromCurrentPosition,onChangeTextHandler}=this.__closure;var _lastSelection$value,_lastSelection$value2;const lastTarget=(_lastSelection$value=lastSelection.value)===null||_lastSelection$value===void 0?void 0:_lastSelection$value.target;const latestSelection=(_lastSelection$value2=lastSelection.value)===null||_lastSelection$value2===void 0?void 0:_lastSelection$value2.selection;lastSelection.value=e;selectionUpdatedSinceHide.value=true;if(e.target!==lastTarget||pendingSelectionForFocus.value){if(pendingSelectionForFocus.value){pendingSelectionForFocus.value=false;updateLayoutFromSelection();if(!keyboardWillAppear.value&&keyboardHeight.value>0){position.value+=maybeScroll(keyboardHeight.value,true);}}return;}if(e.selection.end.position===e.selection.start.position&&(latestSelection===null||latestSelection===void 0?void 0:latestSelection.end.y)!==e.selection.end.y){return scrollFromCurrentPosition();}if(e.selection.start.position!==e.selection.end.position){return scrollFromCurrentPosition();}onChangeTextHandler();}'};
|
|
object = {code: 'function pnpm_indexTsx9(e){const{keyboardHeight,keyboardWillAppear,tag,initialKeyboardSize,scrollPosition,scrollBeforeKeyboardMovement,pendingSelectionForFocus,position,mode,syncKeyboardFrame,lastSelection,selectionUpdatedSinceHide,updateLayoutFromSelection,input,layout,maybeScroll,ghostViewSpace,scrollViewLayout,scrollViewContentSize}=this.__closure;const keyboardWillChangeSize=keyboardHeight.value!==e.height&&e.height>0;keyboardWillAppear.value=e.height>0&&keyboardHeight.value===0;const keyboardWillHide=e.height===0;const focusWasChanged=tag.value!==e.target&&e.target!==-1||keyboardWillChangeSize;if(keyboardWillChangeSize){initialKeyboardSize.value=keyboardHeight.value;}if(keyboardWillHide){initialKeyboardSize.value=0;scrollPosition.value=scrollBeforeKeyboardMovement.value;pendingSelectionForFocus.value=false;}if(keyboardWillAppear.value||keyboardWillChangeSize||focusWasChanged){scrollPosition.value=position.value;keyboardHeight.value=e.height;if(mode==="insets"){syncKeyboardFrame(e);}}if(focusWasChanged){var _lastSelection$value;tag.value=e.target;if(((_lastSelection$value=lastSelection.value)===null||_lastSelection$value===void 0?void 0:_lastSelection$value.target)===e.target&&selectionUpdatedSinceHide.value){updateLayoutFromSelection();pendingSelectionForFocus.value=false;}else{var _lastSelection$value2;if(((_lastSelection$value2=lastSelection.value)===null||_lastSelection$value2===void 0?void 0:_lastSelection$value2.target)===e.target){updateLayoutFromSelection();}else if(input.value){layout.value=input.value;}pendingSelectionForFocus.value=true;}scrollBeforeKeyboardMovement.value=position.value;}if(focusWasChanged&&!keyboardWillAppear.value){if(!pendingSelectionForFocus.value){position.value+=maybeScroll(e.height,true);}}if(mode==="insets"){ghostViewSpace.value=position.value+scrollViewLayout.value.height-scrollViewContentSize.value.height;if(ghostViewSpace.value>0){scrollPosition.value=position.value;}}}'};
|
|
object = {code: 'function pnpm_indexTsx10(e){const{removeGhostPadding,mode,syncKeyboardFrame,disableScrollOnKeyboardHide,keyboardWillAppear,maybeScroll}=this.__closure;if(removeGhostPadding(e.height)){return;}if(mode==="layout"){syncKeyboardFrame(e);}if(!disableScrollOnKeyboardHide||keyboardWillAppear.value){maybeScroll(e.height);}}'};
|
|
object = {code: 'function pnpm_indexTsx11(e){const{removeGhostPadding,keyboardHeight,scrollPosition,position,selectionUpdatedSinceHide,keyboardWillAppear,pendingSelectionForFocus,syncKeyboardFrame}=this.__closure;removeGhostPadding(e.height);keyboardHeight.value=e.height;scrollPosition.value=position.value;if(e.height===0){selectionUpdatedSinceHide.value=false;}else if(keyboardWillAppear.value){pendingSelectionForFocus.value=false;}syncKeyboardFrame(e);}'};
|
|
object = {code: 'function pnpm_indexTsx12(){const{scrollFromCurrentPosition}=this.__closure;scrollFromCurrentPosition();}'};
|
|
object = {code: 'function pnpm_indexTsx13(){const{input}=this.__closure;return input.value;}'};
|
|
object = {code: 'function pnpm_indexTsx14(current,previous){const{scrollFromCurrentPosition}=this.__closure;if((current===null||current===void 0?void 0:current.target)===(previous===null||previous===void 0?void 0:previous.target)&&(current===null||current===void 0?void 0:current.layout.height)!==(previous===null||previous===void 0?void 0:previous.layout.height)){scrollFromCurrentPosition();}}'};
|
|
object = {code: 'function pnpm_indexTsx15(){const{enabled,currentKeyboardFrameHeight}=this.__closure;return enabled?currentKeyboardFrameHeight.value:0;}'};
|
|
object = {code: 'function pnpm_indexTsx16(){const{enabled,mode,currentKeyboardFrameHeight}=this.__closure;return enabled&&mode==="layout"?{paddingBottom:currentKeyboardFrameHeight.value+1}:{};}'};
|
|
exports.default = forwardRef(_fun19850);
|
|
}
|
|
|
|
function _fun19850(a0, a1) { // fn#19850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:8733, offset: 0x00eb58eb, size: 2576 bytes, params: 3, frame: 54
|
|
var object3;
|
|
var r0;
|
|
var defaultImport;
|
|
var Object;
|
|
var assign;
|
|
var object2;
|
|
var items3;
|
|
const children = a0.children;
|
|
const onLayout = a0.onLayout;
|
|
const bottomOffset = a0.bottomOffset;
|
|
let value = 0;
|
|
const r7 = bottomOffset === undefined ? value : bottomOffset;
|
|
const disableScrollOnKeyboardHide = a0.disableScrollOnKeyboardHide;
|
|
const r24 = disableScrollOnKeyboardHide !== undefined && disableScrollOnKeyboardHide;
|
|
const enabled = a0.enabled;
|
|
let r10 = enabled === undefined || enabled;
|
|
const env0_3 = r10;
|
|
const extraKeyboardSpace = a0.extraKeyboardSpace;
|
|
const r22 = extraKeyboardSpace === undefined ? value : extraKeyboardSpace;
|
|
const env0_4 = r22;
|
|
const mode = a0.mode;
|
|
const r2 = mode === undefined ? 'insets' : mode;
|
|
const env0_5 = r2;
|
|
const ScrollViewComponent = a0.ScrollViewComponent;
|
|
const r3 = ScrollViewComponent !== undefined ? ScrollViewComponent : (importDefault(1610) /* metro dependency 1610 */).ScrollView;
|
|
const snapToOffsets = a0.snapToOffsets;
|
|
const value7 = env0_5(a0, env0_3);
|
|
const value8 = (require(1610) /* metro dependency 1610 */).useAnimatedRef();
|
|
const value10 = (importDefault(1818) /* metro dependency 1818 */)(value8, env0_10.useRef(null));
|
|
const value11 = (require(1610) /* metro dependency 1610 */).useSharedValue(null);
|
|
const value12 = (require(1610) /* metro dependency 1610 */).useSharedValue(value);
|
|
const {offset, layout, size} = (importDefault(1821) /* metro dependency 1821 */)(value8);
|
|
const env0_13 = size;
|
|
const value14 = (require(1610) /* metro dependency 1610 */).useSharedValue(value);
|
|
const env0_14 = value14;
|
|
const value15 = (require(1610) /* metro dependency 1610 */).useSharedValue(value);
|
|
const env0_15 = value15;
|
|
const value16 = (require(1610) /* metro dependency 1610 */).useSharedValue(false);
|
|
const env0_16 = value16;
|
|
const value17 = (require(1610) /* metro dependency 1610 */).useSharedValue(-1);
|
|
const env0_17 = value17;
|
|
const value18 = (require(1610) /* metro dependency 1610 */).useSharedValue(value);
|
|
const env0_18 = value18;
|
|
const value19 = (require(1610) /* metro dependency 1610 */).useSharedValue(value);
|
|
const env0_19 = value19;
|
|
const value20 = (require(1804) /* metro dependency 1804 */).useReanimatedFocusedInput();
|
|
const input = value20.input;
|
|
const env0_20 = input;
|
|
const update = value20.update;
|
|
const env0_21 = update;
|
|
const value21 = (require(1610) /* metro dependency 1610 */).useSharedValue(null);
|
|
const env0_22 = value21;
|
|
const value22 = (require(1610) /* metro dependency 1610 */).useSharedValue(null);
|
|
const env0_23 = value22;
|
|
const value23 = (require(1610) /* metro dependency 1610 */).useSharedValue(-1);
|
|
const value24 = (require(1610) /* metro dependency 1610 */).useSharedValue(false);
|
|
const env0_25 = value24;
|
|
const value25 = (require(1610) /* metro dependency 1610 */).useSharedValue(false);
|
|
const env0_26 = value25;
|
|
value = (require(1610) /* metro dependency 1610 */).useSharedValue(value);
|
|
const env0_27 = value;
|
|
const moduleValue17 = require(1804) /* metro dependency 1804 */;
|
|
const useWindowDimensions = moduleValue17.useWindowDimensions;
|
|
const height = Reflect.apply(useWindowDimensions, moduleValue17, []).height;
|
|
const env0_28 = height;
|
|
const value27 = useCallback(_fun19851(), [onLayout]);
|
|
let closure = pnpm_indexTsx1_19855;
|
|
object3 = {enabled: r10, layout: value21, scrollViewTarget: value11, height: height, keyboardHeight: value15,
|
|
bottomOffset: r7};
|
|
object3.interpolate = (require(1610) /* metro dependency 1610 */).interpolate;
|
|
object3.initialKeyboardSize = value18;
|
|
object3.scrollDistanceWithRespectToSnapPoints = (require(1822) /* metro dependency 1822 */).scrollDistanceWithRespectToSnapPoints;
|
|
object3.scrollPosition = value12;
|
|
object3.snapToOffsets = snapToOffsets;
|
|
object3.scrollTo = (require(1610) /* metro dependency 1610 */).scrollTo;
|
|
object3.scrollViewAnimatedRef = value8;
|
|
object3.scrollViewPageY = value;
|
|
closure.__closure = object3;
|
|
closure.__workletHash = 1454504363777;
|
|
closure.__initData = env0_13;
|
|
value = useCallback(closure, [r7, r10, height, snapToOffsets]);
|
|
closure = pnpm_indexTsx2_19856;
|
|
object3 = {mode: r2, keyboardWillAppear: value16, ghostViewSpace: value23};
|
|
object3.scrollTo = (require(1610) /* metro dependency 1610 */).scrollTo;
|
|
object3.scrollViewAnimatedRef = value8;
|
|
object3.scrollPosition = value12;
|
|
object3.interpolate = (require(1610) /* metro dependency 1610 */).interpolate;
|
|
object3.initialKeyboardSize = value18;
|
|
object3.keyboardHeight = value15;
|
|
closure.__closure = object3;
|
|
closure.__workletHash = 17351526068375;
|
|
closure.__initData = env0_14;
|
|
const value28 = useCallback(closure, [r2]);
|
|
closure = pnpm_indexTsx3_19857;
|
|
closure.__closure = {scrollPosition: value12, maybeScroll: value, keyboardHeight: value15};
|
|
closure.__workletHash = 1481901193395;
|
|
closure.__initData = env0_15;
|
|
const value29 = useCallback(closure, [value12, value15, value]);
|
|
closure = pnpm_indexTsx4_19858;
|
|
closure.__closure = {interpolate: (require(1610) /* metro dependency 1610 */).interpolate, keyboardHeight: value15,
|
|
extraKeyboardSpace: r22, currentKeyboardFrameHeight: value14};
|
|
closure.__workletHash = 6643520179794;
|
|
closure.__initData = env0_16;
|
|
const value30 = useCallback(closure, [r22]);
|
|
closure = pnpm_indexTsx5_19859;
|
|
object3 = {lastSelection: value22, input: input, layout: value21};
|
|
object3.clamp = (require(1610) /* metro dependency 1610 */).clamp;
|
|
closure.__closure = object3;
|
|
closure.__workletHash = 619310634941;
|
|
closure.__initData = env0_17;
|
|
const value31 = useCallback(closure, [input, value22, value21]);
|
|
closure = pnpm_indexTsx6;
|
|
closure.__closure = {layout: value21, updateLayoutFromSelection: value31,
|
|
performScrollWithPositionRestoration: value29, position: offset};
|
|
closure.__workletHash = 11406147562112;
|
|
closure.__initData = env0_18;
|
|
const value32 = useCallback(closure, [value29]);
|
|
closure = pnpm_indexTsx7;
|
|
closure.__closure = {scrollFromCurrentPosition: value32};
|
|
closure.__workletHash = 1300972162638;
|
|
closure.__initData = env0_19;
|
|
const value34 = useMemo(_fun19862, [useCallback(closure, [value32])]);
|
|
closure = pnpm_indexTsx8;
|
|
closure.__closure = {lastSelection: value22, selectionUpdatedSinceHide: value25, pendingSelectionForFocus: value24,
|
|
updateLayoutFromSelection: value31, keyboardWillAppear: value16, keyboardHeight: value15, position: offset,
|
|
maybeScroll: value, scrollFromCurrentPosition: value32, onChangeTextHandler: value34};
|
|
closure.__workletHash = 7363285427351;
|
|
closure.__initData = env0_20;
|
|
const value35 = useCallback(closure, [value32, value34, value31, value]);
|
|
moduleValue17.useFocusedInputHandler({onSelectionChange: value35}, [value35]);
|
|
const moduleValue19 = require(1823) /* metro dependency 1823 */;
|
|
const useSmoothKeyboardHandler = moduleValue19.useSmoothKeyboardHandler;
|
|
object3 = {};
|
|
closure = onStart;
|
|
closure.__closure = {keyboardHeight: value15, keyboardWillAppear: value16, tag: value17,
|
|
initialKeyboardSize: value18, scrollPosition: value12, scrollBeforeKeyboardMovement: value19,
|
|
pendingSelectionForFocus: value24, position: offset, mode: r2, syncKeyboardFrame: value30,
|
|
lastSelection: value22, selectionUpdatedSinceHide: value25, updateLayoutFromSelection: value31, input: input,
|
|
layout: value21, maybeScroll: value, ghostViewSpace: value23, scrollViewLayout: layout,
|
|
scrollViewContentSize: size};
|
|
closure.__workletHash = 4279285643383;
|
|
closure.__initData = env0_21;
|
|
object3.onStart = closure;
|
|
closure = onMove;
|
|
closure.__closure = {removeGhostPadding: value28, mode: r2, syncKeyboardFrame: value30,
|
|
disableScrollOnKeyboardHide: r24, keyboardWillAppear: value16, maybeScroll: value};
|
|
closure.__workletHash = 15263617220981;
|
|
closure.__initData = env0_22;
|
|
object3.onMove = closure;
|
|
closure = onEnd_19866;
|
|
closure.__closure = {removeGhostPadding: value28, keyboardHeight: value15, scrollPosition: value12,
|
|
position: offset, selectionUpdatedSinceHide: value25, keyboardWillAppear: value16,
|
|
pendingSelectionForFocus: value24, syncKeyboardFrame: value30};
|
|
closure.__workletHash = 15672596601321;
|
|
closure.__initData = env0_23;
|
|
object3.onEnd = closure;
|
|
Reflect.apply(useSmoothKeyboardHandler, moduleValue19, [object3, [r2, value, value28, r24, value30]]);
|
|
value = env0_4(_fun19868);
|
|
value = useCallback(value, [update, value32]);
|
|
useImperativeHandle(a1, _fun19870, [value]);
|
|
useEffect(_fun19873, [r7]);
|
|
value = require(1610) /* metro dependency 1610 */;
|
|
const useAnimatedReaction = value.useAnimatedReaction;
|
|
closure = function() {
|
|
return input.value;
|
|
};
|
|
closure.__closure = {input: input};
|
|
closure.__workletHash = 11096167186933;
|
|
closure.__initData = env0_25;
|
|
const closure2 = pnpm_indexTsx14;
|
|
closure2.__closure = {scrollFromCurrentPosition: value32};
|
|
closure2.__workletHash = 5468543936636;
|
|
closure2.__initData = env0_26;
|
|
Reflect.apply(useAnimatedReaction, value, [closure, closure2, []]);
|
|
const useDerivedValue = (require(1610) /* metro dependency 1610 */).useDerivedValue;
|
|
closure = pnpm_indexTsx15;
|
|
closure.__closure = {enabled: r10, currentKeyboardFrameHeight: value14};
|
|
closure.__workletHash = 7351587309738;
|
|
closure.__initData = env0_27;
|
|
value = Reflect.apply(useDerivedValue, value, [closure, [r10]]);
|
|
const moduleValue20 = require(1610) /* metro dependency 1610 */;
|
|
const useAnimatedStyle = moduleValue20.useAnimatedStyle;
|
|
closure = pnpm_indexTsx16;
|
|
closure.__closure = {enabled: r10, mode: r2, currentKeyboardFrameHeight: value14};
|
|
closure.__workletHash = 9098994865676;
|
|
closure.__initData = env0_28;
|
|
if (r2 === 'layout') {
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object3 = {ref: value10};
|
|
object2 = {scrollEventThrottle: 16, onLayout: value27};
|
|
items3 = [children];
|
|
r10 = r10 && ((View) => <View style={Reflect.apply(useAnimatedStyle, moduleValue20, [closure, [r10,
|
|
r2]])} />)((importDefault(1610) /* metro dependency 1610 */).View);
|
|
items3[1] = r10;
|
|
object2.children = items3;
|
|
r0 = ((Component) => <Component {...Reflect.apply(assign, Object, [object3, value7, object2])} />)(r3);
|
|
} else {
|
|
defaultImport = importDefault(1824) /* metro dependency 1824 */;
|
|
Object = global.Object;
|
|
value = ((Component) => <Component {...Object.assign({ref: value10}, value7, {bottomPadding: value,
|
|
scrollEventThrottle: 16, ScrollViewComponent: r3, onLayout: value27,
|
|
children: children})} />)(defaultImport);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun19851() { // fn#19851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:9723, offset: 0x00eb62fb, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_4(_fun19853);
|
|
return _fun19854;
|
|
}
|
|
|
|
function pnpm_indexTsx1_19855(a0) { // fn#19855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:10003, offset: 0x00eb63d5, size: 516 bytes, params: 2, frame: 24
|
|
var absoluteY;
|
|
var value6;
|
|
var value9;
|
|
var value10;
|
|
var value12;
|
|
var value14;
|
|
var value17;
|
|
var value19;
|
|
var value20;
|
|
var value23;
|
|
var value24;
|
|
var moduleValue;
|
|
var interpolate;
|
|
var items2;
|
|
var moduleValue2;
|
|
var value32;
|
|
let value = undefined;
|
|
const r6 = arguments.length > 1 && value !== arguments[1] && arguments[1];
|
|
if (env0_3) {
|
|
value6 = env0_22.value;
|
|
if ((value6 == null ? value : value6.parentScrollViewTarget) !== env0_9.value) {
|
|
return 0;
|
|
}
|
|
value9 = height - env0_15.value;
|
|
value10 = env0_22.value;
|
|
absoluteY = value10 == null ? value : value10.layout.absoluteY;
|
|
absoluteY = !absoluteY ? 0 : absoluteY;
|
|
value12 = env0_22.value;
|
|
value14 = absoluteY + ((value12 == null ? value : value12.layout.height) || 0);
|
|
if (value9 - value14 <= env0_1) {
|
|
value23 = env0_15.value - (height - value14) + env0_1;
|
|
value24 = environment.__proto__;
|
|
moduleValue = require(1610) /* metro dependency 1610 */;
|
|
interpolate = moduleValue.interpolate;
|
|
items2 = [env0_18.value];
|
|
items2[1] = env0_15.value;
|
|
moduleValue2 = require(1822) /* metro dependency 1822 */;
|
|
value32 = Reflect.apply(interpolate, moduleValue, [a0, items2, [0,
|
|
moduleValue2.scrollDistanceWithRespectToSnapPoints(value23 + env0_10.value,
|
|
snapToOffsets) - env0_10.value]]);
|
|
(require(1610) /* metro dependency 1610 */).scrollTo(env0_7, 0, global.Math.max(value32, 0) + env0_10.value,
|
|
r6);
|
|
return value32;
|
|
}
|
|
if (value14 < env0_27.value) {
|
|
value17 = value9 - env0_1;
|
|
value19 = env0_10.value + value14;
|
|
value20 = environment.__proto__;
|
|
value = require(1610) /* metro dependency 1610 */;
|
|
value.scrollTo(env0_7, 0, value19 - value17, r6);
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
function pnpm_indexTsx2_19856(a0) { // fn#19856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:11015, offset: 0x00eb65d9, size: 198 bytes, params: 2, frame: 22
|
|
var value7;
|
|
var moduleValue;
|
|
var scrollTo;
|
|
var binding;
|
|
var value8;
|
|
var moduleValue2;
|
|
var interpolate;
|
|
var value;
|
|
let r0 = env0_5 !== 'layout' && !env0_16.value && env0_24.value > 0;
|
|
if (r0) {
|
|
value7 = environment.__proto__;
|
|
moduleValue = require(1610) /* metro dependency 1610 */;
|
|
scrollTo = moduleValue.scrollTo;
|
|
binding = env0_7;
|
|
value8 = env0_10.value;
|
|
moduleValue2 = require(1610) /* metro dependency 1610 */;
|
|
interpolate = moduleValue2.interpolate;
|
|
value = env0_24.value;
|
|
value = value8 - Reflect.apply(interpolate, moduleValue2, [a0, [env0_18.value, env0_15.value], [value, 0]]);
|
|
Reflect.apply(scrollTo, moduleValue, [binding, 0, value, false]);
|
|
value = true;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function pnpm_indexTsx3_19857(a0) { // fn#19857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:11449, offset: 0x00eb669f, size: 60 bytes, params: 2, frame: 15
|
|
const value2 = env0_10.value;
|
|
env0_10.value = a0;
|
|
env0_29(env0_15.value, true);
|
|
env0_10.value = value2;
|
|
}
|
|
|
|
function pnpm_indexTsx4_19858({height}) { // fn#19858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:11663, offset: 0x00eb66db, size: 115 bytes, params: 2, frame: 18
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply((require(1610) /* metro dependency 1610 */).interpolate, value, [height, [0, env0_15.value],
|
|
[0, env0_15.value + env0_4]]);
|
|
env0_14.value = value;
|
|
}
|
|
|
|
function pnpm_indexTsx5_19859() { // fn#19859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:11945, offset: 0x00eb674e, size: 232 bytes, params: 1, frame: 26
|
|
var layout;
|
|
var binding;
|
|
var Object;
|
|
var assign;
|
|
var value8;
|
|
var Object2;
|
|
var assign2;
|
|
var value10;
|
|
var moduleValue;
|
|
var clamp;
|
|
var height;
|
|
var value;
|
|
const value2 = env0_23.value;
|
|
const y = value2 == null ? undefined : value2.selection.end.y;
|
|
const value4 = input.value;
|
|
let r0 = value4 == null || !value4.layout;
|
|
r0 = !r0 ? !y : r0;
|
|
if (!r0) {
|
|
binding = env0_22;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
value8 = input.value;
|
|
Object2 = global.Object;
|
|
assign2 = Object2.assign;
|
|
layout = input.value.layout;
|
|
value10 = environment.__proto__;
|
|
moduleValue = require(1610) /* metro dependency 1610 */;
|
|
clamp = moduleValue.clamp;
|
|
value = input.value;
|
|
height = value.layout.height;
|
|
value = 0;
|
|
binding.value = Reflect.apply(assign, Object, [{}, value8, {layout: Reflect.apply(assign2, Object2, [{}, layout,
|
|
{height: Reflect.apply(clamp, moduleValue, [y, value, height])}])}]);
|
|
r0 = value;
|
|
}
|
|
return !r0;
|
|
}
|
|
|
|
function pnpm_indexTsx6() { // fn#19860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:12341, offset: 0x00eb6836, size: 55 bytes, params: 1, frame: 13
|
|
if (env0_33()) {
|
|
env0_31(offset.value);
|
|
env0_22.value = env0_22.value;
|
|
}
|
|
}
|
|
|
|
function pnpm_indexTsx7() { // fn#19861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:12582, offset: 0x00eb686d, size: 15 bytes, params: 1, frame: 9
|
|
env0_34();
|
|
}
|
|
|
|
function _fun19862() { // fn#19862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:12716, offset: 0x00eb687c, size: 49 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
return (require(1822) /* metro dependency 1822 */).debounce(env0_35, 200);
|
|
}
|
|
|
|
function pnpm_indexTsx8(a0) { // fn#19863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:12777, offset: 0x00eb68ad, size: 346 bytes, params: 2, frame: 17
|
|
var y;
|
|
var r2;
|
|
var offsetBinding;
|
|
const value2 = env0_23.value;
|
|
const value3 = undefined;
|
|
const target = value2 == null ? value3 : value2.target;
|
|
const value4 = env0_23.value;
|
|
let selection = value4 == null ? value3 : value4.selection;
|
|
env0_23.value = a0;
|
|
env0_26.value = true;
|
|
if (a0.target !== target) {
|
|
if (env0_25.value) {
|
|
env0_25.value = false;
|
|
env0_33();
|
|
if (!env0_16.value && env0_15.value > 0) {
|
|
offsetBinding = offset;
|
|
offsetBinding.value = offsetBinding.value + env0_29(env0_15.value, true);
|
|
}
|
|
}
|
|
return value3;
|
|
}
|
|
if (env0_25.value) {
|
|
if (env0_25.value) {
|
|
env0_25.value = false;
|
|
env0_33();
|
|
if (!env0_16.value && env0_15.value > 0) {
|
|
offsetBinding = offset;
|
|
offsetBinding.value = offsetBinding.value + env0_29(env0_15.value, true);
|
|
}
|
|
}
|
|
return value3;
|
|
}
|
|
let position = a0.selection.end.position;
|
|
if (position !== a0.selection.start.position) {
|
|
selection = a0.selection;
|
|
position = selection.start.position;
|
|
selection = a0.selection;
|
|
if (position !== selection.end.position) {
|
|
r2 = env0_34();
|
|
} else {
|
|
env0_36();
|
|
r2 = value3;
|
|
}
|
|
} else {
|
|
y = selection == null ? value3 : selection.end.y;
|
|
selection = a0.selection;
|
|
if (y !== selection.end.y) {
|
|
r2 = env0_34();
|
|
} else {
|
|
selection = a0.selection;
|
|
position = selection.start.position;
|
|
selection = a0.selection;
|
|
if (position !== selection.end.position) {
|
|
r2 = env0_34();
|
|
} else {
|
|
env0_36();
|
|
r2 = value3;
|
|
}
|
|
}
|
|
}
|
|
return r2;
|
|
}
|
|
|
|
function onStart(a0) { // fn#19864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:13601, offset: 0x00eb6a07, size: 643 bytes, params: 2, frame: 18
|
|
var offsetBinding;
|
|
var value15;
|
|
var value16;
|
|
var value18;
|
|
var value26;
|
|
var value28;
|
|
const value2 = env0_15.value;
|
|
let height = a0.height;
|
|
const r5 = value2 !== height && a0.height > 0;
|
|
let binding = env0_16;
|
|
let r3 = a0.height > 0 && env0_15.value === 0;
|
|
binding.value = r3;
|
|
height = a0.height;
|
|
const value8 = env0_17.value;
|
|
let target = a0.target;
|
|
r3 = value8 !== target && a0.target !== -1;
|
|
r3 = !r3 ? r5 : r3;
|
|
if (r5) {
|
|
env0_18.value = env0_15.value;
|
|
}
|
|
if (height === 0) {
|
|
env0_18.value = 0;
|
|
env0_10.value = env0_19.value;
|
|
env0_25.value = false;
|
|
}
|
|
let r4 = env0_16.value || r5;
|
|
r4 = !r4 ? r3 : r4;
|
|
if (r4) {
|
|
binding = env0_10;
|
|
binding.value = offset.value;
|
|
binding = env0_15;
|
|
binding.value = a0.height;
|
|
if (env0_5 === 'insets') {
|
|
env0_32(a0);
|
|
}
|
|
}
|
|
if (r3) {
|
|
binding = env0_17;
|
|
target = a0.target;
|
|
binding.value = target;
|
|
value15 = env0_23.value;
|
|
value16 = undefined;
|
|
target = value15 == null ? value16 : value15.target;
|
|
if (target !== a0.target) {
|
|
value18 = env0_23.value;
|
|
if ((value18 == null ? value16 : value18.target) === a0.target) {
|
|
env0_33();
|
|
} else if (input.value) {
|
|
env0_22.value = input.value;
|
|
}
|
|
env0_25.value = true;
|
|
} else if (env0_26.value) {
|
|
env0_33();
|
|
env0_25.value = false;
|
|
} else {
|
|
value18 = env0_23.value;
|
|
if ((value18 == null ? value16 : value18.target) === a0.target) {
|
|
env0_33();
|
|
} else if (input.value) {
|
|
env0_22.value = input.value;
|
|
}
|
|
env0_25.value = true;
|
|
}
|
|
binding = env0_19;
|
|
binding.value = offset.value;
|
|
}
|
|
r3 = r3 && !env0_16.value;
|
|
if (r3) {
|
|
if (!env0_25.value) {
|
|
offsetBinding = offset;
|
|
offsetBinding.value = offsetBinding.value + env0_29(a0.height, true);
|
|
}
|
|
}
|
|
if (env0_5 === 'insets') {
|
|
binding = env0_24;
|
|
value26 = offset.value;
|
|
height = layout.value.height;
|
|
value28 = value26 + height;
|
|
height = size.value.height;
|
|
binding.value = value28 - height;
|
|
if (env0_24.value > 0) {
|
|
env0_10.value = offset.value;
|
|
}
|
|
}
|
|
}
|
|
|
|
function onMove(a0) { // fn#19865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:14713, offset: 0x00eb6c8a, size: 84 bytes, params: 2, frame: 13
|
|
if (!env0_30(a0.height)) {
|
|
if (env0_5 === 'layout') {
|
|
env0_32(a0);
|
|
}
|
|
if (!(env0_2 && !env0_16.value)) {
|
|
env0_29(a0.height);
|
|
}
|
|
}
|
|
}
|
|
|
|
function onEnd_19866(a0) { // fn#19866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:14995, offset: 0x00eb6cde, size: 116 bytes, params: 2, frame: 13
|
|
env0_30(a0.height);
|
|
env0_15.value = a0.height;
|
|
env0_10.value = offset.value;
|
|
if (a0.height === 0) {
|
|
env0_26.value = false;
|
|
} else if (env0_16.value) {
|
|
env0_25.value = false;
|
|
}
|
|
env0_32(a0);
|
|
}
|
|
|
|
function* _fun19868() { // fn#19868, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:15396, offset: 0x00eb6d5b, size: 127 bytes, params: 1, frame: 17
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__;
|
|
yield env1_21();
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
var value6 = env2_0(env2_2[4]);
|
|
var runOnUI = value6.runOnUI;
|
|
var closure = pnpm_indexTsx12;
|
|
closure.__closure = {scrollFromCurrentPosition: env1_34};
|
|
closure.__workletHash = 15498084251450;
|
|
closure.__initData = env2_24;
|
|
Reflect.apply(runOnUI, value6, [closure])();
|
|
}
|
|
}
|
|
|
|
function _fun19870() { // fn#19870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:15588, offset: 0x00eb6de9, size: 44 bytes, params: 1, frame: 4
|
|
const current = env0_8.current;
|
|
if (current) {
|
|
current.assureFocusedInputVisible = assureFocusedInputVisible;
|
|
return current;
|
|
}
|
|
return {assureFocusedInputVisible: assureFocusedInputVisible_19872};
|
|
}
|
|
|
|
function pnpm_indexTsx14(a0, a1) { // fn#19875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:15950, offset: 0x00eb6e41, size: 107 bytes, params: 3, frame: 14
|
|
const value = undefined;
|
|
if ((a0 == null ? value : a0.target) === (a1 == null ? value : a1.target) && (a0 == null ? value : a0.layout.height) !== (a1 == null ? value : a1.layout.height)) {
|
|
env0_34();
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function pnpm_indexTsx15() { // fn#19876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:16249, offset: 0x00eb6eac, size: 23 bytes, params: 1, frame: 3
|
|
return env0_3 ? env0_14.value : 0;
|
|
}
|
|
|
|
function pnpm_indexTsx16() { // fn#19877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:16439, offset: 0x00eb6ec3, size: 54 bytes, params: 1, frame: 4
|
|
return env0_3 && env0_5 === 'layout' ? {paddingBottom: env0_14.value + 1} : {};
|
|
}
|
|
|
|
function* _fun19853(a0) { // fn#19853, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:9743, offset: 0x00eb6324, size: 177 bytes, params: 2, frame: 16
|
|
var binding2;
|
|
var property;
|
|
var KeyboardControllerNative;
|
|
var viewPositionInWindow;
|
|
var value5;
|
|
var y;
|
|
var error;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
var binding = env3_0;
|
|
var value3 = binding(env3_2[8]);
|
|
var nodeHandle = value3.findNodeHandle(useEffect.current);
|
|
useMemo.value = nodeHandle;
|
|
reducibleJoin3: while (true) {
|
|
if (require == null) {
|
|
break reducibleJoin3;
|
|
}
|
|
require(a0);
|
|
break reducibleJoin3;
|
|
}
|
|
reduciblePort20: while (true) {
|
|
exceptionLanding19: while (true) {
|
|
if (nodeHandle === null) {
|
|
break reduciblePort20;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
property = binding2[9];
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
value = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
KeyboardControllerNative = value.KeyboardControllerNative;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
viewPositionInWindow = KeyboardControllerNative.viewPositionInWindow;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
value = Reflect.apply(viewPositionInWindow, KeyboardControllerNative, [nodeHandle]);
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
yield value;
|
|
try {
|
|
value = undefined;
|
|
value5 = false;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
if (value5) {
|
|
return value;
|
|
}
|
|
try {
|
|
y = value.y;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
binding = env2_27;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
binding.value = y;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
break reduciblePort20;
|
|
}
|
|
break reduciblePort20;
|
|
}
|
|
}
|
|
}
|
|
|
|
function pnpm_indexTsx12() { // fn#19869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:15445, offset: 0x00eb6dda, size: 15 bytes, params: 1, frame: 9
|
|
env2_34();
|
|
}
|
|
|
|
function assureFocusedInputVisible() { // fn#19871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1947:15665, offset: 0x00eb6e15, size: 15 bytes, params: 1, frame: 9
|
|
env1_37();
|
|
}
|
|
|