decord/source/1846_KeyboardController.js

119 lines
3.3 KiB
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1846
// Function ID: 1847
2026-07-29 08:29:29 +00:00
// Name: KeyboardController
2026-08-15 05:55:55 +00:00
// Dependencies: [5, 1644]
2026-07-29 08:29:29 +00:00
2026-08-15 05:55:55 +00:00
// Module 1846 (KeyboardController)
2026-08-24 06:08:38 +00:00
import importDefaultResult from "asyncGeneratorStep" /* 5 */;
import { KeyboardEvents, KeyboardEvents as KeyboardEvents2 } from "nativeEventEmitter" /* 1644 */;
2026-07-29 08:29:29 +00:00
let closure_0 = arg1;
let c2 = true;
let obj = { height: 0, duration: 0, timestamp: null, target: -1, type: "default", appearance: "light" };
obj[2] = new Date().getTime();
KeyboardEvents.addListener("keyboardDidHide", (arg0) => {
2026-08-24 06:08:38 +00:00
c2 = true;
closure_3 = arg0;
2026-07-29 08:29:29 +00:00
});
KeyboardEvents2.addListener("keyboardWillShow", (arg0) => {
2026-08-24 06:08:38 +00:00
c2 = false;
closure_3 = arg0;
2026-07-29 08:29:29 +00:00
});
closure_0 = importDefaultResult((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c3 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0) {
if (c3 === 2) {
c3 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
2026-08-24 06:08:38 +00:00
obj = { value: null, done: true };
2026-07-29 08:29:29 +00:00
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c3 = 2;
if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
let keepFocus;
if (closure_0 != null) {
keepFocus = tmp19.keepFocus;
}
2026-08-24 06:08:38 +00:00
closure_1 = keepFocus;
2026-07-29 08:29:29 +00:00
if (keepFocus == null) {
closure_1 = false;
}
closure_0 = closure_1;
let animated;
if (closure_0 != null) {
animated = tmp19.animated;
}
2026-08-24 06:08:38 +00:00
c2 = animated;
2026-07-29 08:29:29 +00:00
if (animated == null) {
c2 = true;
}
closure_1 = c2;
const promise = new Promise((arg0) => {
const callback = arg0;
if (c2) {
arg0();
} else {
2026-08-15 05:55:55 +00:00
const KeyboardEvents = callback(1644).KeyboardEvents;
2026-08-24 06:08:38 +00:00
dependencyMap = KeyboardEvents.addListener("keyboardDidHide", () => {
2026-07-29 08:29:29 +00:00
callback(undefined);
closure_1.remove();
});
2026-08-15 05:55:55 +00:00
const KeyboardControllerNative = callback(1644).KeyboardControllerNative;
2026-07-29 08:29:29 +00:00
KeyboardControllerNative.dismiss(callback, dependencyMap);
}
});
c3 = 3;
obj = { value: null, done: true };
obj[0] = promise;
return obj;
}
} catch (tmp13) {
c3 = tmp;
throw tmp13;
}
}
})();
});
obj = {
setDefaultMode: require("nativeEventEmitter").KeyboardControllerNative.setDefaultMode,
setInputMode: require("nativeEventEmitter").KeyboardControllerNative.setInputMode,
setFocusTo: require("nativeEventEmitter").KeyboardControllerNative.setFocusTo,
preload: require("nativeEventEmitter").KeyboardControllerNative.preload,
dismiss(arg0) {
const self = this;
const apply = closure_0.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
},
isVisible() {
return !c2;
},
state() {
return obj;
}
};
export const KeyboardController = obj;