Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
63 lines
1.8 KiB
JavaScript
63 lines
1.8 KiB
JavaScript
// Module ID: 5015
|
|
// Function ID: 5016
|
|
// Dependencies: [19, 4995]
|
|
// Exports: useEdgeInsetApplication
|
|
|
|
// Module 5015
|
|
import get_synchronousScreenUpdatesEnabled from "get synchronousScreenUpdatesEnabled" /* 4995 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = arg1;
|
|
let context = noop.createContext({ topAlreadyApplied: false, leftDisabled: false, rightDisabled: false, bottomDisabled: false });
|
|
|
|
export const EdgeInsetApplicationContext = context;
|
|
export const useEdgeInsetApplication = function useEdgeInsetApplication(arg0, flag, flag2, flag3, flag4) {
|
|
context = noop.useContext(context);
|
|
const topAlreadyApplied = context.topAlreadyApplied;
|
|
({ leftDisabled, rightDisabled, bottomDisabled } = context);
|
|
const experiment = get_synchronousScreenUpdatesEnabled.featureFlags.experiment;
|
|
flag = undefined;
|
|
if (experiment != null) {
|
|
flag = experiment.androidLegacyTopInsetBehavior;
|
|
}
|
|
if (flag == null) {
|
|
flag = false;
|
|
}
|
|
let tmp2 = flag;
|
|
if (!flag) {
|
|
let tmp3 = !topAlreadyApplied;
|
|
if (!topAlreadyApplied) {
|
|
tmp3 = arg0;
|
|
}
|
|
tmp2 = tmp3;
|
|
}
|
|
closure_1 = tmp2;
|
|
let tmp4 = tmp2;
|
|
if (tmp2) {
|
|
tmp4 = !flag;
|
|
}
|
|
if (!leftDisabled) {
|
|
leftDisabled = flag2;
|
|
}
|
|
if (!rightDisabled) {
|
|
rightDisabled = flag3;
|
|
}
|
|
if (!bottomDisabled) {
|
|
bottomDisabled = flag4;
|
|
}
|
|
const items = [topAlreadyApplied, tmp2, leftDisabled, rightDisabled, bottomDisabled];
|
|
return {
|
|
appliesTopInset: tmp4,
|
|
consumeLeftInset: !leftDisabled,
|
|
consumeRightInset: !rightDisabled,
|
|
consumeBottomInset: !bottomDisabled,
|
|
useLegacyBehavior: flag,
|
|
nextContextValue: noop.useMemo(() => {
|
|
let tmp = topAlreadyApplied;
|
|
if (!topAlreadyApplied) {
|
|
tmp = closure_1;
|
|
}
|
|
return { topAlreadyApplied: tmp, leftDisabled, rightDisabled, bottomDisabled };
|
|
}, items)
|
|
};
|
|
};
|