/* Metro module 1589; source: unknown; dependencies: [57, 29, 31, 27, 33, 1590] */ function _fun17613(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:6, offset: 0x00e713f0, size: 366 bytes, params: 8, frame: 21 const env0_0 = require; const closure = useSafeAreaInsets_17614; const env0_2 = ['children', 'initialMetrics', 'initialSafeAreaInsets', 'style']; const env0_3 = ['onChange', 'style', 'children']; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_4 = importDefault(57) /* metro dependency 57 */; const env0_5 = importDefault(29) /* metro dependency 29 */; let value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const env0_7 = value2.Dimensions; const StyleSheet = value2.StyleSheet; const env0_8 = (require(33) /* metro dependency 33 */).jsx; const context = value.createContext(null); value = value.createContext(null); const env0_11 = StyleSheet.create({fill: {flex: 1}}); const Consumer = context.Consumer; exports.SafeAreaInsetsContext = context; exports.SafeAreaFrameContext = value; exports.SafeAreaProvider = SafeAreaProvider; exports.SafeAreaListener = SafeAreaListener; exports.useSafeAreaInsets = closure; exports.useSafeAreaFrame = useSafeAreaFrame; exports.withSafeAreaInsets = withSafeAreaInsets; exports.useSafeArea = function() { return useSafeAreaInsets_17614(); }; exports.SafeAreaConsumer = Consumer; exports.SafeAreaContext = context; } function useSafeAreaInsets_17614() { // fn#17614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:475, offset: 0x00e7155e, size: 64 bytes, params: 1, frame: 12 const value2 = env0_6.useContext(env0_9); if (value2 == null) { throw new global.Error(env0_12); } return value2; } function SafeAreaProvider(a0) { // fn#17615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:659, offset: 0x00e7159e, size: 480 bytes, params: 2, frame: 28 var object3; var get; const children = a0.children; const initialMetrics = a0.initialMetrics; const initialSafeAreaInsets = a0.initialSafeAreaInsets; const style = a0.style; let binding = env0_5; const value2 = undefined; const value3 = binding(a0, env0_2); const value4 = env0_6.useContext(env0_9); const value5 = env0_6.useContext(env0_10); binding = env0_6; let useState = binding.useState; const value6 = null; const insets = value6 == initialMetrics ? value2 : initialMetrics.insets; const r2 = value6 == insets ? initialSafeAreaInsets : insets; const r6 = value6 == r2 ? value4 : r2; const value8 = env0_4(Reflect.apply(useState, binding, [value6 != r6 ? r6 : value6]), 2); const property = value8[0]; const env0_0 = value8[1]; binding = env0_6; useState = binding.useState; const frame = value6 == initialMetrics ? value2 : initialMetrics.frame; let r1 = value6 == frame ? value5 : frame; if (value6 == r1) { object3 = {'x': 0, 'y': 0}; get = Dimensions.get; object3.width = Reflect.apply(get, Dimensions, ['window']).width; get = Dimensions.get; object3.height = Reflect.apply(get, Dimensions, ['window']).height; r1 = object3; } const value10 = env0_4(Reflect.apply(useState, binding, [r1]), 2); const property2 = value10[0]; const env0_1 = value10[1]; const value11 = env0_6.useCallback(_fun17616, []); const NativeSafeAreaProvider = (require(1590) /* metro dependency 1590 */).NativeSafeAreaProvider; const Object = global.Object; const assign = Object.assign; object3 = {style: [env0_11.fill, style], onInsetsChange: value11}; const object4 = {}; object4.children = value6 != property ? {children} : value6; return ; } function SafeAreaListener(a0) { // fn#17619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:1643, offset: 0x00e7187b, size: 146 bytes, params: 2, frame: 22 const env0_0 = a0.onChange; const style = a0.style; const children = a0.children; const value2 = env0_5(a0, env0_3); const NativeSafeAreaProvider = (require(1590) /* metro dependency 1590 */).NativeSafeAreaProvider; const Object = global.Object; return ( ); } function useSafeAreaFrame() { // fn#17621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:1974, offset: 0x00e71944, size: 64 bytes, params: 1, frame: 12 const value2 = env0_6.useContext(env0_10); if (value2 == null) { throw new global.Error(env0_12); } return value2; } function withSafeAreaInsets(a0) { // fn#17622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:2086, offset: 0x00e71984, size: 34 bytes, params: 2, frame: 11 const env0_0 = a0; return env0_6.forwardRef(_fun17623); } function _fun17616({nativeEvent}) { // fn#17616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:1181, offset: 0x00e7177e, size: 66 bytes, params: 2, frame: 13 const env0_0 = nativeEvent.frame; nativeEvent.insets(function(a0) { var value = a0; return frame ? frame.height !== value.height || frame.width !== value.width || frame.x !== value.x ? frame : frame.y === value.y ? value : frame : value; }); env0_0(function(a0) { var value = a0; return value ? insets.bottom !== value.bottom || insets.left !== value.left || insets.right !== value.right ? insets : insets.top === value.top ? value : insets : insets; }); } function _fun17623(a0, a1) { // fn#17623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1716:2138, offset: 0x00e719a6, size: 71 bytes, params: 3, frame: 18 const value2 = useSafeAreaInsets_17614(); const binding = env0_0; const Object = global.Object; return ((Component) => )(binding); }