/* Metro module 12367; source: stores/web/WindowStore.tsx; dependencies: [6, 7, 15, 17, 18, 44, 6724, 566, 694, 683, 1962, 2] */ 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 closure = WindowStore; env0_7(closure, a0); return env0_4(closure, [{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 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 = importDefault(44) /* metro dependency 44 */; 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 object2; 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; object2 = {}; copyDataProperties(object2, windowIdStateBinding, windowIdStateBinding); object2['isElementFullscreen'] = a0.isElementFullscreen; Reflect.apply(set, binding, [windowId, object2]); 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 object2; 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; object2 = {}; copyDataProperties(object2, windowIdStateBinding, windowIdStateBinding); focused = a0.focused; object2['focused'] = focused; Reflect.apply(set, binding, [windowId, object2]); 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 object2; 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; object2 = {}; copyDataProperties(object2, windowIdStateBinding, undefined); object2['windowSize'] = {width: a0.width, height: a0.height}; Reflect.apply(set, binding, [windowId, object2]); 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 object2; 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; object2 = {}; copyDataProperties(object2, windowIdStateBinding, windowIdStateBinding); object2['visible'] = a0.visible; Reflect.apply(set, binding, [windowId, object2]); 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 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 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 _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; } }