144 lines
4.3 KiB
JavaScript
144 lines
4.3 KiB
JavaScript
// Metro module 73 (f74).
|
|
import Module74 from "./Module74";
|
|
import nullthrows from "./nullthrows";
|
|
import * as _defineLazyObjectProperty from "./defineLazyObjectProperty";
|
|
import * as _genModule from "./genModule";
|
|
import * as _Module76 from "./Module76";
|
|
let c77_4, c77_5, constants, c77_7, getViewManagerConfig2, c77_10;
|
|
const getConstants2 = function getConstants() {
|
|
if (!c77_7) {
|
|
constants = Module74.getConstants();
|
|
c77_7 = true;
|
|
}
|
|
return constants;
|
|
};
|
|
getViewManagerConfig2 = function getViewManagerConfig(a0) {
|
|
if (c77_4[a0] === void 0 && Module74.getConstantsForViewManager) {
|
|
try {
|
|
c77_4[a0] = Module74.getConstantsForViewManager(a0);
|
|
} catch ($e) {
|
|
console.error("NativeUIManager.getConstantsForViewManager('" + a0 + "') threw an exception.", $e);
|
|
c77_4[a0] = null;
|
|
}
|
|
}
|
|
const r24 = c77_4[a0];
|
|
if (r24) {
|
|
return r24;
|
|
}
|
|
if (global.nativeCallSyncHook) {
|
|
if (Module74.lazilyLoadView && !c77_5.has(a0)) {
|
|
const r41 = nullthrows(Module74.lazilyLoadView)(a0);
|
|
c77_5.add(a0);
|
|
if (r41 != null && r41.viewConfig != null) {
|
|
getConstants2()[a0] = r41.viewConfig;
|
|
(function lazifyViewManagerConfig(a0) {
|
|
if (!c77_7) {
|
|
constants = Module74.getConstants();
|
|
c77_7 = true;
|
|
}
|
|
const r5 = constants[a0];
|
|
let c23566_0 = r5;
|
|
c77_4[a0] = r5;
|
|
if (r5.Manager) {
|
|
_defineLazyObjectProperty.default(r5, "Constants", {
|
|
get: () => {
|
|
const r5 = _genModule.default[c23566_0.Manager];
|
|
let c28617_0 = r5;
|
|
const r13 = {};
|
|
let c28617_1 = r13;
|
|
if (r5) {
|
|
Object.keys(r5).forEach((item) => {
|
|
const r4 = c28617_0[item];
|
|
if (typeof r4 !== "function") {
|
|
c28617_1[item] = r4;
|
|
}
|
|
});
|
|
}
|
|
return r13;
|
|
}
|
|
});
|
|
_defineLazyObjectProperty.default(r5, "Commands", {
|
|
get: () => {
|
|
const r6 = _genModule.default[c23566_0.Manager];
|
|
let c28618_0 = r6;
|
|
const r14 = {};
|
|
let c28618_1 = r14;
|
|
let c28618_2 = 0;
|
|
if (r6) {
|
|
Object.keys(r6).forEach((item) => {
|
|
if (typeof c28618_0[item] === "function") {
|
|
const r8 = +c28618_2;
|
|
c28618_2 = r8 + 1;
|
|
c28618_1[item] = r8;
|
|
}
|
|
});
|
|
}
|
|
return r14;
|
|
}
|
|
});
|
|
}
|
|
})(a0);
|
|
}
|
|
}
|
|
return c77_4[a0];
|
|
}
|
|
return r24;
|
|
};
|
|
c77_4 = {};
|
|
c77_5 = new Set();
|
|
constants = {};
|
|
c77_7 = false;
|
|
c77_10 = {
|
|
...Module74,
|
|
createView: (a0, a1, a2, a3) => {
|
|
Module74.createView(a0, a1, a2, a3);
|
|
},
|
|
getConstants: () => {
|
|
if (!c77_7) {
|
|
constants = Module74.getConstants();
|
|
c77_7 = true;
|
|
}
|
|
return constants;
|
|
},
|
|
getViewManagerConfig: (a0) => getViewManagerConfig2(a0),
|
|
hasViewManagerConfig: (a0) => getViewManagerConfig2(a0) != null
|
|
};
|
|
Module74.getViewManagerConfig = c77_10.getViewManagerConfig;
|
|
if (!c77_7) {
|
|
constants = Module74.getConstants();
|
|
c77_7 = true;
|
|
}
|
|
if (constants.ViewManagerNames) {
|
|
Module74.getConstants().ViewManagerNames.forEach((viewManagerName) => {
|
|
_defineLazyObjectProperty.default(Module74, viewManagerName, {
|
|
get: () => nullthrows(Module74.getConstantsForViewManager)(viewManagerName)
|
|
});
|
|
});
|
|
}
|
|
if (!global.nativeCallSyncHook) {
|
|
const r53 = Object;
|
|
if (!c77_7) {
|
|
constants = Module74.getConstants();
|
|
c77_7 = true;
|
|
}
|
|
r53.keys(constants).forEach((item) => {
|
|
if (!_Module76.default.includes(item)) {
|
|
if (!c77_4[item]) {
|
|
if (!c77_7) {
|
|
constants = Module74.getConstants();
|
|
c77_7 = true;
|
|
}
|
|
c77_4[item] = constants[item];
|
|
}
|
|
_defineLazyObjectProperty.default(Module74, item, {
|
|
get: () => {
|
|
const r3 = console;
|
|
r3.warn(`Accessing view manager configs directly off UIManager via UIManager['${item}'] is no longer supported. Use UIManager.getViewManagerConfig('${item}') instead.`);
|
|
return c77_10.getViewManagerConfig(item);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
export default c77_10;
|