306 lines
14 KiB
TypeScript
306 lines
14 KiB
TypeScript
/* Metro module 12367; source: stores/web/WindowStore.tsx; dependencies: [6, 7, 15, 17, 18, 44, 6724, 566, 694, 683, 1962, 2] */
|
|
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
|
|
|
|
function _fun94271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:6, offset: 0x021128e9, size: 471 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(dependencyMap[0]);
|
|
const env0_4 = importDefault(dependencyMap[1]);
|
|
const env0_5 = importDefault(dependencyMap[2]);
|
|
const env0_6 = importDefault(dependencyMap[3]);
|
|
const env0_7 = importDefault(dependencyMap[4]);
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
const Set = global.Set;
|
|
let set = new Set();
|
|
const Store = importDefault(dependencyMap[7]).Store;
|
|
_fun94276(Store).displayName = 'WindowStore';
|
|
set = new set(importDefault(dependencyMap[8]), {WINDOW_INIT: WINDOW_INIT,
|
|
WINDOW_FULLSCREEN_CHANGE: WINDOW_FULLSCREEN_CHANGE, WINDOW_FOCUS: WINDOW_FOCUS_94288,
|
|
WINDOW_RESIZED: WINDOW_RESIZED, WINDOW_UNLOAD: WINDOW_UNLOAD,
|
|
WINDOW_VISIBILITY_CHANGE: WINDOW_VISIBILITY_CHANGE});
|
|
require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths).then(function({addExtraAnalyticsDecorator}) {
|
|
addExtraAnalyticsDecorator(_fun94293);
|
|
});
|
|
require(dependencyMap[11]).fileFinishedImporting('stores/web/WindowStore.tsx');
|
|
exports.default = set;
|
|
function _isNativeReflectConstruct_94272() { // fn#94272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:148, offset: 0x02112ac0, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_94272_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function getWindowIdState(a0) { // fn#94275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:372, offset: 0x02112b22, size: 75 bytes, params: 2, frame: 12
|
|
var r0;
|
|
const value2 = env0_9.get(a0);
|
|
if (value2 != null) {
|
|
r0 = value2;
|
|
} else {
|
|
env0_10.has(a0);
|
|
r0 = {'isElementFullscreen': false, 'focused': false, 'windowSize': null, 'visible': false,
|
|
windowSize: {'width': 0,
|
|
'height': 0}};
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun94276(a0) { // fn#94276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:527, offset: 0x02112b6d, size: 230 bytes, params: 2, frame: 16
|
|
const WindowStore2 = WindowStore;
|
|
env0_7(WindowStore2, a0);
|
|
return env0_4(WindowStore2, [{key: 'isFocused', value: value_94278}, {key: 'isAppFocused', value: function() {
|
|
return this.getFocusedWindowId() != null;
|
|
}}, {key: 'isVisible', value: value_94280}, {key: 'getFocusedWindowId', value: value_94281},
|
|
{key: 'getLastFocusedWindowId', value: value_94283}, {key: 'isElementFullScreen', value: value_94284},
|
|
{key: 'windowSize', value: value_94285}]);
|
|
function WindowStore() { // fn#94277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:539, offset: 0x0102b796, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_3(this, WindowStore);
|
|
const value3 = env1_6(WindowStore);
|
|
return env1_5(this, _isNativeReflectConstruct_94272() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_94278() { // fn#94278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:811, offset: 0x02112c53, size: 62 bytes, params: 1, frame: 13
|
|
var r2;
|
|
let value = a0;
|
|
if (value !== undefined) {
|
|
r2 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(6724) /* metro dependency 6724: WindowIdUtils */;
|
|
value = value.getMainWindowId();
|
|
r2 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
return getWindowIdState(r2).focused;
|
|
}
|
|
|
|
function value_94280() { // fn#94280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:987, offset: 0x02112ca8, size: 62 bytes, params: 1, frame: 13
|
|
var r2;
|
|
let value = a0;
|
|
if (value !== undefined) {
|
|
r2 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(6724) /* metro dependency 6724: WindowIdUtils */;
|
|
value = value.getMainWindowId();
|
|
r2 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
return getWindowIdState(r2).visible;
|
|
}
|
|
|
|
function value_94281() { // fn#94281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:1094, offset: 0x02112ce6, size: 38 bytes, params: 1, frame: 12
|
|
const env0_0 = null;
|
|
env1_9.forEach(_fun94282);
|
|
return env0_0;
|
|
function _fun94282(a0, a1) { // fn#94282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:1134, offset: 0x02112d0c, size: 26 bytes, params: 3, frame: 2
|
|
if (a0.focused) {
|
|
env0_0 = a1;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function value_94283() { // fn#94283, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
|
|
return env1_8;
|
|
}
|
|
|
|
function value_94284() { // fn#94284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:1257, offset: 0x02112d26, size: 62 bytes, params: 1, frame: 13
|
|
var r2;
|
|
let value = a0;
|
|
if (value !== undefined) {
|
|
r2 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(6724) /* metro dependency 6724: WindowIdUtils */;
|
|
value = value.getMainWindowId();
|
|
r2 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
return getWindowIdState(r2).isElementFullscreen;
|
|
}
|
|
|
|
function value_94285() { // fn#94285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:1368, offset: 0x02112d64, size: 62 bytes, params: 1, frame: 13
|
|
var r2;
|
|
let value = a0;
|
|
if (value !== undefined) {
|
|
r2 = value;
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(6724) /* metro dependency 6724: WindowIdUtils */;
|
|
value = value.getMainWindowId();
|
|
r2 = value;
|
|
}
|
|
value = environment.__proto__;
|
|
return getWindowIdState(r2).windowSize;
|
|
}
|
|
|
|
}
|
|
|
|
function WINDOW_INIT(a0) { // fn#94286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:1525, offset: 0x02112da2, size: 161 bytes, params: 2, frame: 21
|
|
const defaultImport = Module00044;
|
|
let binding = env0_9;
|
|
const has = binding.has;
|
|
let windowId = a0.windowId;
|
|
defaultImport(!Reflect.apply(has, binding, [windowId]), 'Window initialized multiple times');
|
|
const width = a0.width;
|
|
const height = a0.height;
|
|
const isElementFullscreen = a0.isElementFullscreen;
|
|
const focused = a0.focused;
|
|
const visible = a0.visible;
|
|
binding = env0_9;
|
|
binding.set(a0.windowId, {windowSize: {width: width, height: height}, isElementFullscreen: isElementFullscreen,
|
|
focused: focused, visible: visible});
|
|
if (focused) {
|
|
windowId = a0.windowId;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function WINDOW_FULLSCREEN_CHANGE(a0) { // fn#94287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:1837, offset: 0x02112e43, size: 94 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var binding;
|
|
var set;
|
|
var object;
|
|
const getWindowIdStateBinding = getWindowIdState;
|
|
let windowId = a0.windowId;
|
|
const windowIdStateBinding = getWindowIdStateBinding(windowId);
|
|
const value3 = windowIdStateBinding.isElementFullscreen !== a0.isElementFullscreen;
|
|
if (value3) {
|
|
binding = env0_9;
|
|
set = binding.set;
|
|
windowId = a0.windowId;
|
|
object = {};
|
|
copyDataProperties(object, windowIdStateBinding, windowIdStateBinding);
|
|
object['isElementFullscreen'] = a0.isElementFullscreen;
|
|
Reflect.apply(set, binding, [windowId, object]);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function WINDOW_FOCUS_94288(a0) { // fn#94288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:2053, offset: 0x02112ea1, size: 113 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var binding;
|
|
var set;
|
|
var object;
|
|
const getWindowIdStateBinding = getWindowIdState;
|
|
let windowId = a0.windowId;
|
|
const windowIdStateBinding = getWindowIdStateBinding(windowId);
|
|
let focused = windowIdStateBinding.focused;
|
|
const value3 = focused !== a0.focused;
|
|
if (value3) {
|
|
focused = a0.focused;
|
|
if (focused) {
|
|
windowId = a0.windowId;
|
|
}
|
|
binding = env0_9;
|
|
set = binding.set;
|
|
windowId = a0.windowId;
|
|
object = {};
|
|
copyDataProperties(object, windowIdStateBinding, windowIdStateBinding);
|
|
focused = a0.focused;
|
|
object['focused'] = focused;
|
|
Reflect.apply(set, binding, [windowId, object]);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function WINDOW_RESIZED(a0) { // fn#94289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:2238, offset: 0x02112f12, size: 135 bytes, params: 2, frame: 17
|
|
var binding;
|
|
var set;
|
|
var object;
|
|
const getWindowIdStateBinding = getWindowIdState;
|
|
let windowId = a0.windowId;
|
|
const windowIdStateBinding = getWindowIdStateBinding(windowId);
|
|
let r0 = windowIdStateBinding.windowSize.width !== a0.width || windowIdStateBinding.windowSize.height !== a0.height;
|
|
if (r0) {
|
|
binding = env0_9;
|
|
set = binding.set;
|
|
windowId = a0.windowId;
|
|
object = {};
|
|
copyDataProperties(object, windowIdStateBinding, undefined);
|
|
object['windowSize'] = {width: a0.width, height: a0.height};
|
|
Reflect.apply(set, binding, [windowId, object]);
|
|
r0 = true;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function WINDOW_UNLOAD(a0) { // fn#94290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:2462, offset: 0x02112f99, size: 70 bytes, params: 2, frame: 13
|
|
const binding = env0_10;
|
|
binding.add(a0.windowId);
|
|
env0_9.delete(a0.windowId);
|
|
if (env0_8 !== a0.windowId) {
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function WINDOW_VISIBILITY_CHANGE(a0) { // fn#94291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:2593, offset: 0x02112fdf, size: 94 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var binding;
|
|
var set;
|
|
var object;
|
|
const getWindowIdStateBinding = getWindowIdState;
|
|
let windowId = a0.windowId;
|
|
const windowIdStateBinding = getWindowIdStateBinding(windowId);
|
|
const value3 = windowIdStateBinding.visible !== a0.visible;
|
|
if (value3) {
|
|
binding = env0_9;
|
|
set = binding.set;
|
|
windowId = a0.windowId;
|
|
object = {};
|
|
copyDataProperties(object, windowIdStateBinding, windowIdStateBinding);
|
|
object['visible'] = a0.visible;
|
|
Reflect.apply(set, binding, [windowId, object]);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun94292({addExtraAnalyticsDecorator}) { // fn#94292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12553:2779, offset: 0x0211303d, size: 27 bytes, params: 2, frame: 11
|
|
addExtraAnalyticsDecorator(function() {
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
function _fun94293() { // fn#94293, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
|
|
}
|
|
|
|
global.__d(_fun94271, 12367, [6, 7, 15, 17, 18, 44, 6724, 566, 694, 683, 1962,
|
|
2]) /* metro module 12367, dependencies: [6, 7, 15, 17, 18, 44, 6724, 566, 694, 683, 1962, 2] */;
|