{"version":3,"names":["_reactNative","require","getStatusBarHeight","topInset","dimensions","isStatusBarTranslucent","Platform","OS","hasDynamicIsland","y"],"sources":["getStatusBarHeight.tsx"],"sourcesContent":["import { Rect } from 'react-native-safe-area-context';\nimport { Platform } from 'react-native';\n\nexport default function getStatusBarHeight(\n topInset: number,\n dimensions: Rect,\n isStatusBarTranslucent: boolean\n) {\n if (Platform.OS === 'ios') {\n // It looks like some iOS devices don't have strictly set status bar height to 44.\n // Thus, if the top inset is higher than 50, then the device should have a dynamic island.\n // On models with Dynamic Island the status bar height is smaller than the safe area top inset by 5 pixels.\n // See https://developer.apple.com/forums/thread/662466 for more details about status bar height.\n const hasDynamicIsland = topInset > 50;\n return hasDynamicIsland ? topInset - 5 : topInset;\n } else if (Platform.OS === 'android') {\n // On Android we should also rely on frame's y-axis position, as topInset is 0 on visible status bar.\n return isStatusBarTranslucent ? topInset : dimensions.y;\n }\n\n return topInset;\n}\n"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEe,SAASC,kBAAkBA,CACxCC,QAAgB,EAChBC,UAAgB,EAChBC,sBAA+B,EAC/B;EACA,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACzB;IACA;IACA;IACA;IACA,MAAMC,gBAAgB,GAAGL,QAAQ,GAAG,EAAE;IACtC,OAAOK,gBAAgB,GAAGL,QAAQ,GAAG,CAAC,GAAGA,QAAQ;EACnD,CAAC,MAAM,IAAIG,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;IACpC;IACA,OAAOF,sBAAsB,GAAGF,QAAQ,GAAGC,UAAU,CAACK,CAAC;EACzD;EAEA,OAAON,QAAQ;AACjB"}