Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,31 @@
|
||||
/* Metro module 9559; source: modules/panels/morphable/AppFreezeStore.tsx; dependencies: [629, 690, 2] */
|
||||
function _fun74636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9745:6, offset: 0x01d947f9, size: 117 bytes, params: 8, frame: 18
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(629) /* metro dependency 629 */;
|
||||
value = value.create(function(a0) {
|
||||
var env0_0 = a0;
|
||||
var Set = global.Set;
|
||||
return {lockKeys: new Set(), requestFreezeLock: _fun74638};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/AppFreezeStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun74637(a0) { // fn#74637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9745:114, offset: 0x01d9486e, size: 58 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
const Set = global.Set;
|
||||
return {lockKeys: new Set(), requestFreezeLock: requestFreezeLock_74638};
|
||||
}
|
||||
|
||||
function requestFreezeLock_74638({key, lockEnabled}) { // fn#74638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9745:136, offset: 0x01d948a8, size: 69 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun74639);
|
||||
}
|
||||
|
||||
function _fun74639() { // fn#74639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9745:199, offset: 0x01d948ed, size: 25 bytes, params: 1, frame: 11
|
||||
env1_0(_fun74640);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/* Metro module 14885; source: modules/panels/morphable/native/AppFreezer.tsx; dependencies: [31, 9559, 33, 6821, 4521, 2] */
|
||||
function _fun112615(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15082:6, offset: 0x023d4c38, size: 184 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const appFreezeStore = importDefault(9559) /* metro dependency 9559: AppFreezeStore */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_4 = ((Component) => <Component style={{flex: 1}} />)(importDefault(6821) /* metro dependency 6821: NativeView */);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/AppFreezer.tsx');
|
||||
exports.default = AppFreezer;
|
||||
}
|
||||
|
||||
function AppFreezer({children, manualFreeze, placeholder = env0_4, lockKeys}) { // fn#112616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15082:248, offset: 0x023d4cf0, size: 130 bytes, params: 2, frame: 18
|
||||
manualFreeze = !(manualFreeze === undefined) && manualFreeze;
|
||||
const value2 = AppFreezeStore(function({lockKeys}) {
|
||||
return _fun112618(lockKeys, lockKeys);
|
||||
});
|
||||
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
|
||||
return (
|
||||
<Freeze freeze={value2 || manualFreeze} placeholder={placeholder}>
|
||||
{children}
|
||||
</Freeze>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112617({lockKeys}) { // fn#112617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15082:336, offset: 0x023d4d72, size: 35 bytes, params: 2, frame: 13
|
||||
return ((a0, a1) => {
|
||||
var env0_0 = a0;
|
||||
return a1 != null ? a1.some(_fun112619) : a0.size > 0;
|
||||
})(lockKeys, lockKeys);
|
||||
}
|
||||
|
||||
function shouldFreeze(a0, a1) { // fn#112618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15082:352, offset: 0x023d4d95, size: 51 bytes, params: 3, frame: 12
|
||||
const env0_0 = a0;
|
||||
return a1 != null ? a1.some(_fun112619) : a0.size > 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* Metro module 11796; source: modules/panels/morphable/native/MorphablePanelConstants.tsx; dependencies: [477, 2] */
|
||||
function _fun90332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11982:6, offset: 0x02034fcf, size: 272 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isIOS();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/MorphablePanelConstants.tsx');
|
||||
exports.MIN_PAN_GESTURE_MOVE = 10;
|
||||
exports.PANEL_TAP_GESTURE_MAX_DISTANCE = 30;
|
||||
exports.IS_IOS = value;
|
||||
exports.PIP_POP_HEIGHT = 140;
|
||||
exports.PIP_WINDOW_OFFSET = 16;
|
||||
exports.MIN_PIP_TOSS_VELOCITY = 500;
|
||||
exports.MorphablePanelModes = {PANEL: 'panel', PIP: 'pip', CHANGING_ORIENTATION: 'changing_orientation',
|
||||
UNDEFINED: 'undefined'};
|
||||
exports.PanelControlsModes = {FLOATING_DEFAULT: 'floating-default', DRAWER: 'drawer', UNDEFINED: 'undefined'};
|
||||
exports.SCALE_PHYSICS = {'mass': 0.4, 'damping': 30, 'stiffness': 400};
|
||||
exports.POP_RESISTANCE = 0.55;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
/* Metro module 15372; source: modules/panels/morphable/native/MorphablePanelUtils.tsx; dependencies: [11796, 2] */
|
||||
function _fun117510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:6, offset: 0x024b545d, size: 310 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(11796) /* metro dependency 11796: MorphablePanelConstants */;
|
||||
const env0_0 = value.MIN_PIP_TOSS_VELOCITY;
|
||||
const env0_1 = value.PIP_WINDOW_OFFSET;
|
||||
object = {code: 'function clamp_MorphablePanelUtilsTsx1(value,min,max){return Math.min(Math.max(value,min),max);}'};
|
||||
const env0_3 = _fun117511();
|
||||
object = {code: 'function calculateXYDiff_MorphablePanelUtilsTsx2(event,initialGestureOffset){const{absoluteY:absoluteY,absoluteX:absoluteX}=event.changedTouches[0];const yDiff=initialGestureOffset.get().absoluteYStart-absoluteY;const xDiff=initialGestureOffset.get().absoluteXStart-absoluteX;const absoluteMovement=Math.max(Math.abs(yDiff),Math.abs(xDiff));const isNotPullDownGesture=Math.abs(xDiff)>=Math.abs(yDiff)||yDiff>0;return{absoluteX:absoluteX,absoluteY:absoluteY,xDiff:xDiff,yDiff:yDiff,isNotPullDownGesture:isNotPullDownGesture,absoluteMovement:absoluteMovement};}'};
|
||||
value = _fun117513();
|
||||
object = {code: 'function getPIPWindowDimensions_MorphablePanelUtilsTsx3(windowDimensions,safeArea,disableHorizontalSafeAreas){const{PIP_WINDOW_OFFSET}=this.__closure;const xOffset=disableHorizontalSafeAreas?Math.max(safeArea.left,PIP_WINDOW_OFFSET):PIP_WINDOW_OFFSET;const disabledHorizontalSafeAreasRange=windowDimensions.width-xOffset-Math.max(safeArea.right,PIP_WINDOW_OFFSET);const enabledHorizontalSafeAreasRange=windowDimensions.width-safeArea.left-safeArea.right-PIP_WINDOW_OFFSET*2;const xRange=disableHorizontalSafeAreas?disabledHorizontalSafeAreasRange:enabledHorizontalSafeAreasRange;const yOffset=Math.max(safeArea.top,PIP_WINDOW_OFFSET);return{xOffset:xOffset,yOffset:yOffset,xRange:xRange,yRange:windowDimensions.height-yOffset-Math.max(safeArea.bottom,PIP_WINDOW_OFFSET)};}'};
|
||||
const value2 = _fun117515();
|
||||
object = {code: "function calculatePIPPositionFromVelocity_MorphablePanelUtilsTsx4({velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY,windowDimensions:windowDimensions,safeArea:safeArea,disableHorizontalSafeAreas:disableHorizontalSafeAreas}){const{getPIPWindowDimensions,MIN_PIP_TOSS_VELOCITY,clamp}=this.__closure;const pipRegion=getPIPWindowDimensions(windowDimensions,safeArea,disableHorizontalSafeAreas);const{xRange:xRange,yRange:yRange}=pipRegion;const x=absoluteX-pipRegion.xOffset;const y=absoluteY-pipRegion.yOffset;let pipX=0;let pipY=0;if(Math.max(Math.abs(velocityY),Math.abs(velocityX))<MIN_PIP_TOSS_VELOCITY){const closestEdge=function(specs){const minValue=Math.min(...Object.values(specs));if(specs.left===minValue){return'left';}if(specs.top===minValue){return'top';}if(specs.right===minValue){return'right';}return'bottom';}({left:clamp(x,0,xRange),right:clamp(xRange-x,0,xRange),top:clamp(y,0,yRange),bottom:clamp(yRange-y,0,yRange)});switch(closestEdge){case'left':pipX=0;pipY=y/yRange;break;case'right':pipX=1;pipY=y/yRange;break;case'top':pipY=0;pipX=x/xRange;break;case'bottom':pipY=1;pipX=x/xRange;break;}}else{const slope=velocityY/velocityX;let intersectionY=0;let intersectionX=0;intersectionX=velocityX>0?xRange:0;intersectionY=y+slope*(intersectionX-x);if(intersectionY>=0&&intersectionY<=yRange){pipX=intersectionX/xRange;pipY=intersectionY/yRange;}else{intersectionY=velocityY>0?yRange:0;intersectionX=x+1/slope*(intersectionY-y);pipX=intersectionX/xRange;pipY=intersectionY/yRange;}}return{pipX:clamp(pipX,0,1),pipY:clamp(pipY,0,1)};}"};
|
||||
const value3 = _fun117517();
|
||||
object = {code: 'function pipXYtoAbsoluteXY_MorphablePanelUtilsTsx5({pipX:pipX,pipY:pipY,windowDimensions:windowDimensions,safeArea:safeArea,disableHorizontalSafeAreas:disableHorizontalSafeAreas}){const{getPIPWindowDimensions}=this.__closure;const{xOffset:xOffset,yOffset:yOffset,xRange:xRange,yRange:yRange}=getPIPWindowDimensions(windowDimensions,safeArea,disableHorizontalSafeAreas);return{x:xOffset+pipX*xRange,y:yOffset+pipY*yRange};}'};
|
||||
const value4 = _fun117519();
|
||||
object = {code: 'function getClampedPIPPosition_MorphablePanelUtilsTsx6({pipX:pipX,pipY:pipY,width:width,height:height,windowDimensions:windowDimensions,safeArea:safeArea,bottomAvoidanceRegion=0,topAvoidanceRegion=0,positionOffset={x:0,y:0},disableHorizontalSafeAreas:disableHorizontalSafeAreas}){const{pipXYtoAbsoluteXY,getPIPWindowDimensions,clamp}=this.__closure;let{x:x,y:y}=pipXYtoAbsoluteXY({pipX:pipX===-1?1:pipX,pipY:pipY===-1?0:pipY,windowDimensions:windowDimensions,safeArea:safeArea,disableHorizontalSafeAreas:disableHorizontalSafeAreas});const halfWidth=width/2;const halfHeight=height/2;x-=halfWidth;if(pipY===-1){y+=72;}else{y-=halfHeight;}const pipRegion=getPIPWindowDimensions(windowDimensions,safeArea,disableHorizontalSafeAreas);x=clamp(x,pipRegion.xOffset,pipRegion.xOffset+pipRegion.xRange-width);y=clamp(y,pipRegion.yOffset+topAvoidanceRegion,pipRegion.yOffset+pipRegion.yRange-bottomAvoidanceRegion-height);x+=positionOffset.x;y+=positionOffset.y;return{x:x,y:y};}'};
|
||||
const value5 = _fun117521();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/MorphablePanelUtils.tsx');
|
||||
exports.calculateXYDiff = value;
|
||||
exports.getPIPWindowDimensions = value2;
|
||||
exports.calculatePIPPositionFromVelocity = value3;
|
||||
exports.pipXYtoAbsoluteXY = value4;
|
||||
exports.getClampedPIPPosition = value5;
|
||||
}
|
||||
|
||||
function _fun117511() { // fn#117511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:264, offset: 0x024b5593, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
var Math2 = global.Math;
|
||||
return Math.min(Math2.max(a0, a1), a2);
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 1391695493868;
|
||||
closure.__initData = env0_2;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun117513() { // fn#117513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:996, offset: 0x024b55c3, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = calculateXYDiff;
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 9827767064556;
|
||||
closure.__initData = env0_4;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun117515() { // fn#117515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:2218, offset: 0x024b56bd, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = getPIPWindowDimensions;
|
||||
closure.__closure = {PIP_WINDOW_OFFSET: PIP_WINDOW_OFFSET};
|
||||
closure.__workletHash = 4008246762710;
|
||||
closure.__initData = env0_5;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun117517() { // fn#117517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:4235, offset: 0x024b57cd, size: 75 bytes, params: 1, frame: 4
|
||||
const closure = calculatePIPPositionFromVelocity;
|
||||
closure.__closure = {getPIPWindowDimensions: env0_6, MIN_PIP_TOSS_VELOCITY: MIN_PIP_TOSS_VELOCITY, clamp: env0_3};
|
||||
closure.__workletHash = 3215524498124;
|
||||
closure.__initData = env0_7;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun117519() { // fn#117519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:5626, offset: 0x024b5a1b, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = pipXYtoAbsoluteXY;
|
||||
closure.__closure = {getPIPWindowDimensions: env0_6};
|
||||
closure.__workletHash = 1981621867924;
|
||||
closure.__initData = env0_8;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun117521() { // fn#117521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:6965, offset: 0x024b5ab9, size: 75 bytes, params: 1, frame: 4
|
||||
const closure = getClampedPIPPosition;
|
||||
closure.__closure = {pipXYtoAbsoluteXY: env0_9, getPIPWindowDimensions: env0_6, clamp: env0_3};
|
||||
closure.__workletHash = 7754262947803;
|
||||
closure.__initData = env0_10;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function calculateXYDiff({changedTouches}, a1) { // fn#117514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:1027, offset: 0x024b55f3, size: 202 bytes, params: 3, frame: 20
|
||||
const {absoluteY, absoluteX} = changedTouches[0];
|
||||
let get = a1.get;
|
||||
const value = Reflect.apply(get, a1, []).absoluteYStart - absoluteY;
|
||||
get = a1.get;
|
||||
const value2 = Reflect.apply(get, a1, []).absoluteXStart - absoluteX;
|
||||
let Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const value3 = Math2.abs(value);
|
||||
const Math3 = global.Math;
|
||||
const value4 = Reflect.apply(max, Math, [value3, Math3.abs(value2)]);
|
||||
const object2 = {absoluteX: absoluteX, absoluteY: absoluteY, xDiff: value2, yDiff: value};
|
||||
Math = global.Math;
|
||||
const value5 = Math.abs(value2);
|
||||
Math = global.Math;
|
||||
object2.isNotPullDownGesture = value5 >= Math.abs(value) || value > 0;
|
||||
object2.absoluteMovement = value4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getPIPWindowDimensions(a0, a1, a2) { // fn#117516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:2256, offset: 0x024b56f6, size: 215 bytes, params: 4, frame: 20
|
||||
let value = environment.__proto__;
|
||||
const r7 = a2 ? global.Math.max(a1.left, PIP_WINDOW_OFFSET) : PIP_WINDOW_OFFSET;
|
||||
const value3 = a0.width - r7;
|
||||
let Math = global.Math;
|
||||
const r6 = a2 ? value3 - Math.max(a1.right,
|
||||
PIP_WINDOW_OFFSET) : a0.width - a1.left - a1.right - 2 * PIP_WINDOW_OFFSET;
|
||||
Math = global.Math;
|
||||
const object2 = {xOffset: r7, yOffset: Math.max(a1.top, PIP_WINDOW_OFFSET), xRange: r6};
|
||||
value = a0.height - value;
|
||||
Math = global.Math;
|
||||
object2.yRange = value - Math.max(a1.bottom, PIP_WINDOW_OFFSET);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function calculatePIPPositionFromVelocity({velocityX, velocityY, absoluteX, absoluteY, windowDimensions, safeArea, disableHorizontalSafeAreas}) { // fn#117518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:4283, offset: 0x024b5818, size: 515 bytes, params: 2, frame: 25
|
||||
var r10;
|
||||
var r4;
|
||||
var r6;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var value13;
|
||||
var object2;
|
||||
var binding;
|
||||
var value15;
|
||||
var min;
|
||||
var value16;
|
||||
var items2;
|
||||
var value17;
|
||||
var left;
|
||||
var value18;
|
||||
var value22;
|
||||
var value24;
|
||||
var value25;
|
||||
var value26;
|
||||
const value2 = env1_6(windowDimensions, safeArea, disableHorizontalSafeAreas);
|
||||
const xRange = value2.xRange;
|
||||
const yRange = value2.yRange;
|
||||
const value3 = absoluteX - value2.xOffset;
|
||||
const value4 = absoluteY - value2.yOffset;
|
||||
let Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const value5 = Math2.abs(velocityY);
|
||||
const Math3 = global.Math;
|
||||
if (Reflect.apply(max, Math, [value5, Math3.abs(velocityX)]) < MIN_PIP_TOSS_VELOCITY) {
|
||||
object2 = {};
|
||||
binding = env1_3;
|
||||
value15 = 0;
|
||||
object2.left = binding(value3, value15, xRange);
|
||||
object2.right = binding(xRange - value3, value15, xRange);
|
||||
object2.top = binding(value4, value15, yRange);
|
||||
object2.bottom = binding(yRange - value4, value15, yRange);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value16 = global.Object.values(object2);
|
||||
items2 = [];
|
||||
arraySpread(items2, value16, value15, undefined);
|
||||
value17 = apply(min, items2, Math, undefined);
|
||||
left = object2.left;
|
||||
value18 = 'left';
|
||||
r10 = left === value17 ? value18 : object2.top === value17 ? 'top' : object2.right !== value17 ? 'bottom' : 'right';
|
||||
if (value18 === r10) {
|
||||
r4 = value4 / yRange;
|
||||
r6 = value15;
|
||||
} else if (r10 === 'right') {
|
||||
value25 = value4 / yRange;
|
||||
value26 = 1;
|
||||
r4 = value25;
|
||||
r6 = value26;
|
||||
} else if (r10 === 'top') {
|
||||
value24 = value3 / xRange;
|
||||
r4 = value15;
|
||||
r6 = value24;
|
||||
} else if (r10 !== 'bottom') {
|
||||
r4 = value15;
|
||||
r6 = value15;
|
||||
} else {
|
||||
value22 = value3 / xRange;
|
||||
r4 = 1;
|
||||
r6 = value22;
|
||||
}
|
||||
} else {
|
||||
value7 = velocityY / velocityX;
|
||||
value8 = 0;
|
||||
r10 = velocityX > value8 ? xRange : value8;
|
||||
value9 = value4 + value7 * (r10 - value3);
|
||||
if (value9 >= value8) {
|
||||
if (value9 <= yRange) {
|
||||
value13 = r10 / xRange;
|
||||
r4 = value9 / yRange;
|
||||
r6 = value13;
|
||||
} else {
|
||||
value10 = 1 / value7;
|
||||
r4 = velocityY > value8 ? yRange : value8;
|
||||
value11 = (value3 + value10 * (r4 - value4)) / xRange;
|
||||
r4 = r4 / yRange;
|
||||
r6 = value11;
|
||||
}
|
||||
} else {
|
||||
value10 = 1 / value7;
|
||||
r4 = velocityY > value8 ? yRange : value8;
|
||||
value11 = (value3 + value10 * (r4 - value4)) / xRange;
|
||||
r4 = r4 / yRange;
|
||||
r6 = value11;
|
||||
}
|
||||
}
|
||||
object2 = {};
|
||||
binding = env1_3;
|
||||
object2.pipX = binding(r6, 0, 1);
|
||||
object2.pipY = binding(r4, 0, 1);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function pipXYtoAbsoluteXY({pipX, pipY, windowDimensions, safeArea, disableHorizontalSafeAreas}) { // fn#117520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:5659, offset: 0x024b5a54, size: 101 bytes, params: 2, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = env1_6(windowDimensions, safeArea, disableHorizontalSafeAreas);
|
||||
return {x: value.xOffset + pipX * value.xRange, y: value.yOffset + pipY * value.yRange};
|
||||
}
|
||||
|
||||
function getClampedPIPPosition({pipX, pipY, width, height, windowDimensions, safeArea, bottomAvoidanceRegion, topAvoidanceRegion, positionOffset = {'x': 0, 'y': 0}, disableHorizontalSafeAreas}) { // fn#117522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15569:7002, offset: 0x024b5b04, size: 316 bytes, params: 2, frame: 27
|
||||
bottomAvoidanceRegion = bottomAvoidanceRegion === undefined ? 0 : bottomAvoidanceRegion;
|
||||
topAvoidanceRegion = topAvoidanceRegion === undefined ? 0 : topAvoidanceRegion;
|
||||
const value = environment.__proto__;
|
||||
let binding = env1_9;
|
||||
const value3 = pipY === -1;
|
||||
const {x, y} = binding({pipX: pipX === -1 ? 1 : pipX, pipY: value3 ? 0 : pipY, windowDimensions: windowDimensions,
|
||||
safeArea: safeArea, disableHorizontalSafeAreas: disableHorizontalSafeAreas});
|
||||
const value6 = x - width / 2;
|
||||
const r5 = value3 ? y + 72 : y - height / 2;
|
||||
const value9 = env1_6(windowDimensions, safeArea, disableHorizontalSafeAreas);
|
||||
binding = env1_3;
|
||||
return {x: binding(value6, value9.xOffset, value9.xOffset + value9.xRange - width) + positionOffset.x,
|
||||
y: binding(r5, value9.yOffset + topAvoidanceRegion,
|
||||
value9.yOffset + value9.yRange - bottomAvoidanceRegion - height) + positionOffset.y};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 10724; source: modules/panels/morphable/native/SafeAreaDisabledStore.tsx; dependencies: [629, 690, 2] */
|
||||
function _fun82397(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10910:6, offset: 0x01ef57a4, size: 117 bytes, params: 8, frame: 18
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(629) /* metro dependency 629 */;
|
||||
value = value.create(function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
var Set = global.Set;
|
||||
return {lockKeys: new Set(), shouldDisableSafeAreas: _fun82399, requestSafeAreaDisableLock: _fun82400};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/SafeAreaDisabledStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun82398(a0, a1) { // fn#82398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10910:114, offset: 0x01ef5819, size: 77 bytes, params: 3, frame: 11
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const Set = global.Set;
|
||||
return {lockKeys: new Set(), shouldDisableSafeAreas: function() {
|
||||
return require().lockKeys.size > 0;
|
||||
}, requestSafeAreaDisableLock: requestSafeAreaDisableLock};
|
||||
}
|
||||
|
||||
function requestSafeAreaDisableLock({key, lockEnabled}) { // fn#82400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10910:187, offset: 0x01ef5886, size: 69 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun82401);
|
||||
}
|
||||
|
||||
function _fun82401() { // fn#82401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10910:259, offset: 0x01ef58cb, size: 25 bytes, params: 1, frame: 11
|
||||
env1_0(_fun82402);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 15365; source: modules/panels/morphable/native/getAdjustedBottomOffsets.tsx; dependencies: [477, 2] */
|
||||
function _fun117453(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15562:6, offset: 0x024b37c2, size: 160 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
const closure = t_117454;
|
||||
closure.__closure = {IS_ANDROID: value};
|
||||
closure.__workletHash = 9166664651792;
|
||||
closure.__initData = {code: 'function getAdjustedBottomOffsets_getAdjustedBottomOffsetsTsx1({screenBottomOffset:screenBottomOffset,safeAreaBottom:safeAreaBottom,keyboardHeight:keyboardHeight}){const{IS_ANDROID}=this.__closure;let bottomOffset=screenBottomOffset;if(keyboardHeight>0){bottomOffset+=(IS_ANDROID?0:keyboardHeight)-safeAreaBottom;}return{bottomOffset:bottomOffset};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/getAdjustedBottomOffsets.tsx');
|
||||
exports.default = closure;
|
||||
}
|
||||
|
||||
function t_117454({screenBottomOffset, safeAreaBottom, keyboardHeight}) { // fn#117454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15562:487, offset: 0x024b3862, size: 62 bytes, params: 2, frame: 6
|
||||
return {bottomOffset: keyboardHeight > 0 ? screenBottomOffset + ((env0_0 ? 0 : keyboardHeight) - safeAreaBottom) : screenBottomOffset};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* Metro module 15263; source: modules/panels/morphable/native/getPIPBottomOffsetForPIPMode.tsx; dependencies: [11796, 2] */
|
||||
function _fun116706(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15460:6, offset: 0x02494425, size: 178 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const PIP_WINDOW_OFFSET = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).PIP_WINDOW_OFFSET;
|
||||
const closure = __116707;
|
||||
closure.__closure = {'DEFAULT_CHANNEL_INPUT_HEIGHT': 60, 'PIP_WINDOW_OFFSET': null,
|
||||
'PIP_AVOIDANCE_TAB_BAR_HEIGHT': 46, PIP_WINDOW_OFFSET: PIP_WINDOW_OFFSET};
|
||||
closure.__workletHash = 7115458448589;
|
||||
closure.__initData = {code: "function getPIPBottomOffsetForPIPMode_getPIPBottomOffsetForPIPModeTsx1(screenName){const{DEFAULT_CHANNEL_INPUT_HEIGHT,PIP_WINDOW_OFFSET,PIP_AVOIDANCE_TAB_BAR_HEIGHT}=this.__closure;switch(screenName){case'panels':return DEFAULT_CHANNEL_INPUT_HEIGHT+PIP_WINDOW_OFFSET;case'channel':return DEFAULT_CHANNEL_INPUT_HEIGHT+PIP_WINDOW_OFFSET;case'messages':case'notifications':case'main_tab':case'guilds':return PIP_AVOIDANCE_TAB_BAR_HEIGHT+PIP_WINDOW_OFFSET;default:return 0;}}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/getPIPBottomOffsetForPIPMode.tsx');
|
||||
exports.default = closure;
|
||||
exports.PIP_AVOIDANCE_TAB_BAR_HEIGHT = 46;
|
||||
}
|
||||
|
||||
function __116707(a0) { // fn#116707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15460:615, offset: 0x024944d7, size: 91 bytes, params: 2, frame: 2
|
||||
if (a0 === 'panels') {
|
||||
return 60 + PIP_WINDOW_OFFSET;
|
||||
}
|
||||
if (a0 === 'channel') {
|
||||
return 60 + PIP_WINDOW_OFFSET;
|
||||
}
|
||||
if (a0 === 'messages') {
|
||||
return 46 + PIP_WINDOW_OFFSET;
|
||||
}
|
||||
if (a0 === 'notifications') {
|
||||
return 46 + PIP_WINDOW_OFFSET;
|
||||
}
|
||||
if (a0 === 'main_tab') {
|
||||
return 46 + PIP_WINDOW_OFFSET;
|
||||
}
|
||||
if (a0 === 'guilds') {
|
||||
return 46 + PIP_WINDOW_OFFSET;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 15375; source: modules/panels/morphable/native/triggerIOSHaptic.tsx; dependencies: [11796, 4081, 2] */
|
||||
function _fun117535(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15572:6, offset: 0x024b6b38, size: 117 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).IS_IOS;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/triggerIOSHaptic.tsx');
|
||||
exports.default = triggerIOSHaptic;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,413 @@
|
||||
/* Metro module 15374; source: modules/panels/morphable/native/useMorphablePanelGesture.tsx; dependencies: [31, 11796, 1478, 1585, 4017, 5321, 11282, 15372, 15375, 4081, 2] */
|
||||
function _fun117525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:6, offset: 0x024b5df8, size: 311 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const morphablePanelConstantsModule = require(11796) /* metro dependency 11796: MorphablePanelConstants */;
|
||||
const env0_4 = morphablePanelConstantsModule.IS_IOS;
|
||||
const env0_5 = morphablePanelConstantsModule.MIN_PAN_GESTURE_MOVE;
|
||||
const MorphablePanelModes = morphablePanelConstantsModule.MorphablePanelModes;
|
||||
const env0_7 = morphablePanelConstantsModule.PANEL_TAP_GESTURE_MAX_DISTANCE;
|
||||
const env0_8 = morphablePanelConstantsModule.PIP_POP_HEIGHT;
|
||||
const env0_9 = morphablePanelConstantsModule.POP_RESISTANCE;
|
||||
object = {code: 'function useMorphablePanelGestureTsx1(){const{onTapGestureStart}=this.__closure;var _onTapGestureStart;(_onTapGestureStart=onTapGestureStart)===null||_onTapGestureStart===void 0||_onTapGestureStart();}'};
|
||||
object = {code: 'function useMorphablePanelGestureTsx2(){const{updateSharedValueIfChanged,initialGestureOffset}=this.__closure;updateSharedValueIfChanged(initialGestureOffset,{active:false,cancel:false});}'};
|
||||
object = {code: 'function useMorphablePanelGestureTsx3(event){const{initialGestureOffset,mode,MorphablePanelModes,calculatePIPPositionFromVelocity,windowDimensions,safeArea,disableHorizontalSafeAreas,updateSharedValueIfChanged,wrapperOffset,pipState,onPanMinimizeGestureEnd}=this.__closure;if(initialGestureOffset.get().cancel){return;}const{velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY}=event;if(mode===MorphablePanelModes.PIP){const{pipX:pipX,pipY:pipY}=calculatePIPPositionFromVelocity({velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY,windowDimensions:windowDimensions,safeArea:safeArea,disableHorizontalSafeAreas:disableHorizontalSafeAreas});updateSharedValueIfChanged(wrapperOffset,{gestureActive:false});updateSharedValueIfChanged(pipState,{x:pipX,y:pipY});}else if(mode===MorphablePanelModes.PANEL){if(velocityY>0){if(!initialGestureOffset.get().requiresPop){var _onPanMinimizeGesture;updateSharedValueIfChanged(wrapperOffset,{x:0,y:windowDimensions.height});(_onPanMinimizeGesture=onPanMinimizeGestureEnd)===null||_onPanMinimizeGesture===void 0||_onPanMinimizeGesture();return;}}}updateSharedValueIfChanged(wrapperOffset,{x:0,y:0,gestureActive:false});}'};
|
||||
object = {code: 'function useMorphablePanelGestureTsx4(_e){const{updateSharedValueIfChanged,initialGestureOffset,wrapperOffset}=this.__closure;updateSharedValueIfChanged(initialGestureOffset,{active:false});updateSharedValueIfChanged(wrapperOffset,{gestureActive:false});}'};
|
||||
object = {code: 'function useMorphablePanelGestureTsx5(event){const{mode,MorphablePanelModes,safeArea,initialGestureOffset,POP_RESISTANCE,PIP_POP_HEIGHT,runOnJS,triggerHapticFeedback,HapticFeedbackTypes,updateSharedValueIfChanged,wrapperOffset}=this.__closure;if(mode!==MorphablePanelModes.PIP){const minYOffset=safeArea.top;let newYOffset=(initialGestureOffset.get().absoluteYStart-event.absoluteY)*-1;if(!initialGestureOffset.get().requiresPop&&newYOffset<=minYOffset){initialGestureOffset.set({...initialGestureOffset.get(),requiresPop:true});}if(initialGestureOffset.get().requiresPop){const distance=Math.max(newYOffset,0);const resistance=distance*POP_RESISTANCE;if(distance<=PIP_POP_HEIGHT){newYOffset=distance-resistance;}else{initialGestureOffset.set({...initialGestureOffset.get(),requiresPop:false});runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}}updateSharedValueIfChanged(wrapperOffset,{y:newYOffset,x:0});}else{updateSharedValueIfChanged(wrapperOffset,{x:(initialGestureOffset.get().absoluteXStart-event.absoluteX)*-1,y:(initialGestureOffset.get().absoluteYStart-event.absoluteY)*-1});}}'};
|
||||
object = {code: 'function useMorphablePanelGestureTsx6(event,manager){const{IS_IOS,initialGestureOffset,State,calculateXYDiff,mode,MorphablePanelModes,MIN_PAN_GESTURE_MOVE,runOnJS,triggerIOSHaptic,updateSharedValueIfChanged,wrapperOffset}=this.__closure;if(IS_IOS&&initialGestureOffset.get().gestureInBottomSafeArea){manager.activate();return;}if(initialGestureOffset.get().cancel){manager.fail();return;}if(event.state!==State.BEGAN||initialGestureOffset.get().active){return;}const{absoluteX:absoluteX,absoluteY:absoluteY,absoluteMovement:absoluteMovement,isNotPullDownGesture:isNotPullDownGesture,yDiff:yDiff}=calculateXYDiff(event,initialGestureOffset);let startGesture=false;if(mode===MorphablePanelModes.PANEL){if(yDiff<0){startGesture=true;}else if(isNotPullDownGesture){manager.fail();}}else if(mode===MorphablePanelModes.PIP&&absoluteMovement>MIN_PAN_GESTURE_MOVE){startGesture=true;runOnJS(triggerIOSHaptic)();}if(startGesture){updateSharedValueIfChanged(wrapperOffset,{x:0,y:0,gestureActive:true});initialGestureOffset.set({absoluteXStart:absoluteX,absoluteYStart:absoluteY,active:true,cancel:false,gestureInBottomSafeArea:false,requiresPop:initialGestureOffset.get().requiresPop});manager.activate();}}'};
|
||||
object = {code: 'function useMorphablePanelGestureTsx7(event){const{updateSharedValueIfChanged,wrapperOffset,initialGestureOffset,windowDimensions,safeArea,swipeRequiresPop}=this.__closure;updateSharedValueIfChanged(wrapperOffset,{x:0,y:0});initialGestureOffset.set({absoluteXStart:event.absoluteX,absoluteYStart:event.absoluteY,active:false,cancel:event.absoluteY>windowDimensions.height-safeArea.bottom*2,gestureInBottomSafeArea:event.absoluteY>windowDimensions.height-safeArea.bottom,requiresPop:swipeRequiresPop});}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/useMorphablePanelGesture.tsx');
|
||||
exports.default = useMorphablePanelGesture;
|
||||
exports.MorphablePanelModes = MorphablePanelModes;
|
||||
}
|
||||
|
||||
function useMorphablePanelGesture({mode, onPanMinimizeGestureEnd, onTapGestureStart, panGestureEnabled, pipState, swipeRequiresPop, wrapperOffset, disableHorizontalSafeAreas}) { // fn#117526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:5097, offset: 0x024b5f2f, size: 284 bytes, params: 2, frame: 25
|
||||
panGestureEnabled = !(panGestureEnabled === undefined) && panGestureEnabled;
|
||||
const env0_3 = panGestureEnabled;
|
||||
swipeRequiresPop = !(swipeRequiresPop === undefined) && swipeRequiresPop;
|
||||
disableHorizontalSafeAreas = !(disableHorizontalSafeAreas === undefined) && disableHorizontalSafeAreas;
|
||||
return env0_3.useMemo(_fun117527,
|
||||
[(require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'absoluteXStart': 0,
|
||||
'absoluteYStart': 0, 'active': false, 'gestureInBottomSafeArea': false, 'cancel': false, 'requiresPop': false}),
|
||||
mode, swipeRequiresPop, onPanMinimizeGestureEnd, onTapGestureStart, panGestureEnabled,
|
||||
(importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)(),
|
||||
(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)(), pipState, wrapperOffset,
|
||||
disableHorizontalSafeAreas]);
|
||||
}
|
||||
|
||||
function _fun117527() { // fn#117527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:5461, offset: 0x024b604b, size: 1046 bytes, params: 1, frame: 30
|
||||
var object2;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const Race = Gesture.Race;
|
||||
const Gesture2 = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value2 = Gesture2.Tap();
|
||||
const enabled = value2.enabled;
|
||||
const onTapGestureStartBinding = onTapGestureStart;
|
||||
const value5 = Reflect.apply(enabled, value2,
|
||||
[onTapGestureStartBinding != null]).maxDistance(PANEL_TAP_GESTURE_MAX_DISTANCE);
|
||||
const onStart = value5.onStart;
|
||||
let closure = function() {
|
||||
if (onTapGestureStart != null) {
|
||||
onTapGestureStart();
|
||||
}
|
||||
};
|
||||
closure.__closure = {onTapGestureStart: onTapGestureStartBinding};
|
||||
closure.__workletHash = 9880530558215;
|
||||
closure.__initData = env1_10;
|
||||
const value6 = Reflect.apply(onStart, value5, [closure]);
|
||||
const Gesture3 = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value7 = Gesture3.Pan();
|
||||
const shouldCancelWhenOutside2 = value7.enabled(panGestureEnabled).manualActivation(true).maxPointers(1).shouldCancelWhenOutside(false);
|
||||
const onBegin = shouldCancelWhenOutside2.onBegin;
|
||||
closure = V_117529;
|
||||
object2 = {};
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
const wrapperOffsetBinding = wrapperOffset;
|
||||
object2.wrapperOffset = wrapperOffsetBinding;
|
||||
object2.initialGestureOffset = env0_10;
|
||||
object2.windowDimensions = env0_8;
|
||||
object2.safeArea = env0_9;
|
||||
object2.swipeRequiresPop = swipeRequiresPop;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 14796057583737;
|
||||
closure.__initData = env1_16;
|
||||
const value11 = Reflect.apply(onBegin, shouldCancelWhenOutside2, [closure]);
|
||||
const onTouchesMove = value11.onTouchesMove;
|
||||
closure = C_117530;
|
||||
object2 = {};
|
||||
object2.IS_IOS = IS_IOS;
|
||||
object2.initialGestureOffset = env0_10;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
object2.State = State;
|
||||
object2.calculateXYDiff = (require(15372) /* metro dependency 15372: MorphablePanelUtils */).calculateXYDiff;
|
||||
const modeBinding = mode;
|
||||
object2.mode = modeBinding;
|
||||
object2.MorphablePanelModes = MorphablePanelModes;
|
||||
object2.MIN_PAN_GESTURE_MOVE = MIN_PAN_GESTURE_MOVE;
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.triggerIOSHaptic = importDefault(15375) /* metro dependency 15375: triggerIOSHaptic */;
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
object2.wrapperOffset = wrapperOffsetBinding;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12545486163726;
|
||||
closure.__initData = env1_15;
|
||||
const value12 = Reflect.apply(onTouchesMove, value11, [closure]);
|
||||
const onChange = value12.onChange;
|
||||
closure = H_117531;
|
||||
object2 = {mode: modeBinding, MorphablePanelModes: MorphablePanelModes, safeArea: env0_9,
|
||||
initialGestureOffset: env0_10};
|
||||
object2.POP_RESISTANCE = POP_RESISTANCE;
|
||||
object2.PIP_POP_HEIGHT = PIP_POP_HEIGHT;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
||||
object2.HapticFeedbackTypes = HapticFeedbackTypes;
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
object2.wrapperOffset = wrapperOffsetBinding;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 6076208535373;
|
||||
closure.__initData = env1_14;
|
||||
const value13 = Reflect.apply(onChange, value12, [closure]);
|
||||
const onTouchesCancelled = value13.onTouchesCancelled;
|
||||
closure = D_117532;
|
||||
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
|
||||
initialGestureOffset: env0_10, wrapperOffset: wrapperOffsetBinding};
|
||||
closure.__workletHash = 14566382353702;
|
||||
closure.__initData = env1_13;
|
||||
const value14 = Reflect.apply(onTouchesCancelled, value13, [closure]);
|
||||
const onEnd = value14.onEnd;
|
||||
closure = X_117533;
|
||||
object2 = {initialGestureOffset: env0_10, mode: modeBinding, MorphablePanelModes: MorphablePanelModes};
|
||||
object2.calculatePIPPositionFromVelocity = (require(15372) /* metro dependency 15372: MorphablePanelUtils */).calculatePIPPositionFromVelocity;
|
||||
object2.windowDimensions = env0_8;
|
||||
object2.safeArea = env0_9;
|
||||
object2.disableHorizontalSafeAreas = disableHorizontalSafeAreas;
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
object2.wrapperOffset = wrapperOffsetBinding;
|
||||
object2.pipState = pipState;
|
||||
object2.onPanMinimizeGestureEnd = onPanMinimizeGestureEnd;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 2406462688275;
|
||||
closure.__initData = env1_12;
|
||||
const value15 = Reflect.apply(onEnd, value14, [closure]);
|
||||
const onFinalize = value15.onFinalize;
|
||||
closure = t_117534;
|
||||
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
|
||||
initialGestureOffset: env0_10};
|
||||
closure.__workletHash = 11153815903321;
|
||||
closure.__initData = env1_11;
|
||||
return Reflect.apply(Race, Gesture, [value6, Reflect.apply(onFinalize, value15, [closure])]);
|
||||
}
|
||||
|
||||
function V_117529(a0) { // fn#117529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:5775, offset: 0x024b6461, size: 188 bytes, params: 2, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {'x': 0,
|
||||
'y': 0});
|
||||
env1_10.set({absoluteXStart: a0.absoluteX, absoluteYStart: a0.absoluteY, active: false,
|
||||
cancel: a0.absoluteY > env1_8.height - 2 * env1_9.bottom,
|
||||
gestureInBottomSafeArea: a0.absoluteY > env1_8.height - env1_9.bottom, requiresPop: swipeRequiresPop});
|
||||
}
|
||||
|
||||
function C_117530(a0, a1) { // fn#117530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:6192, offset: 0x024b651d, size: 495 bytes, params: 3, frame: 23
|
||||
var r2;
|
||||
var value2;
|
||||
var binding;
|
||||
var value3;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
var value4;
|
||||
var absoluteX;
|
||||
var absoluteY;
|
||||
var moduleValue2;
|
||||
var value10;
|
||||
var set;
|
||||
var binding2;
|
||||
const value = environment.__proto__.__proto__;
|
||||
if (IS_IOS) {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_10;
|
||||
if (binding.get().gestureInBottomSafeArea) {
|
||||
a1.activate();
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
binding = env1_10;
|
||||
if (binding.get().cancel) {
|
||||
a1.fail();
|
||||
} else if (a0.state === State.BEGAN) {
|
||||
binding = env1_10;
|
||||
if (!binding.get().active) {
|
||||
value4 = (require(15372) /* metro dependency 15372: MorphablePanelUtils */).calculateXYDiff(a0,
|
||||
env1_10);
|
||||
absoluteX = value4.absoluteX;
|
||||
absoluteY = value4.absoluteY;
|
||||
if (mode === MorphablePanelModes.PANEL) {
|
||||
if (value4.yDiff < 0) {
|
||||
r2 = true;
|
||||
} else {
|
||||
value10 = false;
|
||||
if (value4.isNotPullDownGesture) {
|
||||
a1.fail();
|
||||
r2 = value10;
|
||||
} else {
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else if (mode === MorphablePanelModes.PIP && value4.absoluteMovement > MIN_PAN_GESTURE_MOVE) {
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(importDefault(15375) /* metro dependency 15375: triggerIOSHaptic */)();
|
||||
r2 = true;
|
||||
} else {
|
||||
r2 = false;
|
||||
}
|
||||
if (r2) {
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
|
||||
{'x': 0,
|
||||
'y': 0, 'gestureActive': true});
|
||||
binding = env1_10;
|
||||
set = binding.set;
|
||||
binding2 = env1_10;
|
||||
Reflect.apply(set, binding, [{'absoluteXStart': null, 'absoluteYStart': null, 'active': true,
|
||||
'cancel': false,
|
||||
'gestureInBottomSafeArea': false, absoluteXStart: absoluteX, absoluteYStart: absoluteY,
|
||||
requiresPop: binding2.get().requiresPop}]);
|
||||
a1.activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
binding = env1_10;
|
||||
if (binding.get().cancel) {
|
||||
a1.fail();
|
||||
} else if (a0.state === State.BEGAN) {
|
||||
binding = env1_10;
|
||||
if (!binding.get().active) {
|
||||
value4 = (require(15372) /* metro dependency 15372: MorphablePanelUtils */).calculateXYDiff(a0,
|
||||
env1_10);
|
||||
absoluteX = value4.absoluteX;
|
||||
absoluteY = value4.absoluteY;
|
||||
if (mode === MorphablePanelModes.PANEL) {
|
||||
if (value4.yDiff < 0) {
|
||||
r2 = true;
|
||||
} else {
|
||||
value10 = false;
|
||||
if (value4.isNotPullDownGesture) {
|
||||
a1.fail();
|
||||
r2 = value10;
|
||||
} else {
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else if (mode === MorphablePanelModes.PIP && value4.absoluteMovement > MIN_PAN_GESTURE_MOVE) {
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(importDefault(15375) /* metro dependency 15375: triggerIOSHaptic */)();
|
||||
r2 = true;
|
||||
} else {
|
||||
r2 = false;
|
||||
}
|
||||
if (r2) {
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{'x': 0,
|
||||
'y': 0, 'gestureActive': true});
|
||||
binding = env1_10;
|
||||
set = binding.set;
|
||||
binding2 = env1_10;
|
||||
Reflect.apply(set, binding, [{'absoluteXStart': null, 'absoluteYStart': null, 'active': true,
|
||||
'cancel': false,
|
||||
'gestureInBottomSafeArea': false, absoluteXStart: absoluteX, absoluteYStart: absoluteY,
|
||||
requiresPop: binding2.get().requiresPop}]);
|
||||
a1.activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function H_117531(a0) { // fn#117531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:7051, offset: 0x024b670c, size: 521 bytes, params: 2, frame: 21
|
||||
var r4;
|
||||
var defaultImport;
|
||||
var wrapperOffsetBinding;
|
||||
var object2;
|
||||
var binding;
|
||||
var get;
|
||||
var top;
|
||||
var value3;
|
||||
var requiresPop;
|
||||
var set;
|
||||
var binding2;
|
||||
var value6;
|
||||
var binding3;
|
||||
var moduleValue;
|
||||
const modeBinding = mode;
|
||||
const PIP = MorphablePanelModes.PIP;
|
||||
if (modeBinding !== PIP) {
|
||||
top = env1_9.top;
|
||||
binding = env1_10;
|
||||
get = binding.get;
|
||||
value3 = -1 * (Reflect.apply(get, binding, []).absoluteYStart - a0.absoluteY);
|
||||
binding = env1_10;
|
||||
get = binding.get;
|
||||
requiresPop = Reflect.apply(get, binding, []).requiresPop;
|
||||
if (!requiresPop && value3 <= top) {
|
||||
binding = env1_10;
|
||||
set = binding.set;
|
||||
object2 = {};
|
||||
binding2 = env1_10;
|
||||
copyDataProperties(object2, binding2.get(), undefined);
|
||||
object2['requiresPop'] = true;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
binding = env1_10;
|
||||
get = binding.get;
|
||||
requiresPop = Reflect.apply(get, binding, []).requiresPop;
|
||||
if (requiresPop) {
|
||||
value6 = global.Math.max(value3, 0);
|
||||
if (value6 <= PIP_POP_HEIGHT) {
|
||||
r4 = value6 - value6 * POP_RESISTANCE;
|
||||
} else {
|
||||
binding = env1_10;
|
||||
set = binding.set;
|
||||
object2 = {};
|
||||
binding3 = env1_10;
|
||||
copyDataProperties(object2, binding3.get(), undefined);
|
||||
object2['requiresPop'] = false;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS((require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback)((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
r4 = value3;
|
||||
}
|
||||
} else {
|
||||
r4 = value3;
|
||||
}
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {y: r4,
|
||||
x: 0});
|
||||
} else {
|
||||
defaultImport = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
wrapperOffsetBinding = wrapperOffset;
|
||||
object2 = {};
|
||||
binding = env1_10;
|
||||
get = binding.get;
|
||||
object2.x = -1 * (Reflect.apply(get, binding, []).absoluteXStart - a0.absoluteX);
|
||||
binding = env1_10;
|
||||
get = binding.get;
|
||||
object2.y = -1 * (Reflect.apply(get, binding, []).absoluteYStart - a0.absoluteY);
|
||||
defaultImport(wrapperOffsetBinding, object2);
|
||||
}
|
||||
}
|
||||
|
||||
function D_117532() { // fn#117532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:7859, offset: 0x024b6915, size: 75 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_10, {active: false});
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{gestureActive: false});
|
||||
}
|
||||
|
||||
function X_117533(a0) { // fn#117533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:8070, offset: 0x024b6960, size: 418 bytes, params: 2, frame: 21
|
||||
var value3;
|
||||
var pipX;
|
||||
var pipY;
|
||||
let binding = env1_10;
|
||||
const get = binding.get;
|
||||
if (!Reflect.apply(get, binding, []).cancel) {
|
||||
var velocityX = a0.velocityX;
|
||||
var velocityY = a0.velocityY;
|
||||
var absoluteX = a0.absoluteX;
|
||||
var absoluteY = a0.absoluteY;
|
||||
var modeBinding = mode;
|
||||
var PIP = MorphablePanelModes.PIP;
|
||||
if (modeBinding === PIP) {
|
||||
value3 = (require(15372) /* metro dependency 15372: MorphablePanelUtils */).calculatePIPPositionFromVelocity({velocityX: velocityX,
|
||||
|
||||
|
||||
velocityY: velocityY, absoluteX: absoluteX, absoluteY: absoluteY, windowDimensions: env1_8,
|
||||
safeArea: env1_9,
|
||||
disableHorizontalSafeAreas: disableHorizontalSafeAreas});
|
||||
pipX = value3.pipX;
|
||||
pipY = value3.pipY;
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{gestureActive: false});
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(pipState, {x: pipX,
|
||||
y: pipY});
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{'x': 0,
|
||||
'y': 0, 'gestureActive': false});
|
||||
return undefined;
|
||||
}
|
||||
modeBinding = mode;
|
||||
var PANEL = MorphablePanelModes.PANEL;
|
||||
if (modeBinding !== PANEL) {
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{'x': 0,
|
||||
'y': 0, 'gestureActive': false});
|
||||
return undefined;
|
||||
}
|
||||
if (velocityY > 0) {
|
||||
binding = env1_10;
|
||||
if (binding.get().requiresPop) {
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{'x': 0,
|
||||
'y': 0, 'gestureActive': false});
|
||||
return undefined;
|
||||
}
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {x: 0,
|
||||
y: env1_8.height});
|
||||
if (onPanMinimizeGestureEnd != null) {
|
||||
onPanMinimizeGestureEnd();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset, {'x': 0,
|
||||
'y': 0, 'gestureActive': false});
|
||||
}
|
||||
}
|
||||
|
||||
function t_117534() { // fn#117534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15571:8894, offset: 0x024b6b02, size: 54 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_10, {'active': false,
|
||||
'cancel': false});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* Metro module 15364; source: modules/panels/morphable/native/useScreenNameSharedValue.tsx; dependencies: [31, 4008, 4017, 2] */
|
||||
function _fun117448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15561:6, offset: 0x024b35f7, size: 114 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/panels/morphable/native/useScreenNameSharedValue.tsx');
|
||||
exports.default = useScreenNameSharedValue;
|
||||
}
|
||||
|
||||
function useScreenNameSharedValue() { // fn#117449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15561:222, offset: 0x024b3669, size: 167 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var currentRoute;
|
||||
const value2 = undefined;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
const r10 = rootNavigationRef == null ? value2 : rootNavigationRef.isReady();
|
||||
const value4 = 'unknown';
|
||||
if (r10 !== true) {
|
||||
r0 = value4;
|
||||
} else {
|
||||
currentRoute = rootNavigationRef.getCurrentRoute();
|
||||
r0 = (currentRoute == null ? value2 : currentRoute.name) ?? value4;
|
||||
}
|
||||
const value6 = Reflect.apply(useSharedValue, reanimatedRexportModule, [r0]);
|
||||
env0_2.useEffect(_fun117450, [value6]);
|
||||
return value6;
|
||||
}
|
||||
|
||||
function _fun117450() { // fn#117450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15561:438, offset: 0x024b3710, size: 85 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const closure = handleStateChange_117451;
|
||||
let value = environment.__proto__;
|
||||
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
value = value.getRootNavigationRef();
|
||||
if (value != null) {
|
||||
value.addListener('state', closure);
|
||||
return _fun117452;
|
||||
}
|
||||
}
|
||||
|
||||
function handleStateChange_117451() { // fn#117451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15561:589, offset: 0x024b3765, size: 93 bytes, params: 1, frame: 14
|
||||
var name;
|
||||
var binding;
|
||||
var value2;
|
||||
var set;
|
||||
var value;
|
||||
if (env0_0 != null) {
|
||||
binding = env0_0;
|
||||
if (binding.isReady()) {
|
||||
binding = env0_0;
|
||||
value = binding.getCurrentRoute();
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_0;
|
||||
set = binding.set;
|
||||
name = value?.name;
|
||||
value = 'unknown';
|
||||
Reflect.apply(set, binding, [name ?? value]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user