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AE,KAAK;QACpB,iBAAiB,EAAE,EAAE;KACtB;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,CAAC;KAChB;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,KAAK;KACrB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,qBAAS;KACtB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;KAChB;IACD,GAAG,EAAE;QACH,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,UAAU,EAAE,KAAK;KAClB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC","sourcesContent":["/**\n * Copyright (c) 650 Industries.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport React from 'react';\nimport { GestureResponderEvent, StyleSheet, Text, View } from 'react-native';\nimport { StackFrame } from 'stacktrace-parser';\n\nimport { LogBoxButton } from '../UI/LogBoxButton';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\nimport { CODE_FONT } from '../UI/constants';\nimport { getStackFormattedLocation } from '../formatProjectFilePath';\n\ndeclare const process: any;\n\ntype Props = {\n frame: StackFrame & { collapse?: boolean };\n onPress?: (event: GestureResponderEvent) => void;\n};\n\nexport function LogBoxInspectorStackFrame(props: Props) {\n const { frame, onPress } = props;\n const location = getStackFormattedLocation(process.env.EXPO_PROJECT_ROOT, frame);\n return (\n <View style={styles.frameContainer}>\n <LogBoxButton\n backgroundColor={{\n default: 'transparent',\n pressed: onPress ? LogBoxStyle.getBackgroundColor(1) : 'transparent',\n }}\n onPress={onPress}\n style={styles.frame}>\n <Text style={[styles.name, frame.collapse === true && styles.dim]}>{frame.methodName}</Text>\n <Text\n ellipsizeMode=\"middle\"\n numberOfLines={1}\n style={[styles.location, frame.collapse === true && styles.dim]}>\n {location}\n </Text>\n </LogBoxButton>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n frameContainer: {\n flexDirection: 'row',\n paddingHorizontal: 15,\n },\n frame: {\n flex: 1,\n paddingVertical: 4,\n paddingHorizontal: 10,\n borderRadius: 5,\n },\n lineLocation: {\n flexDirection: 'row',\n },\n name: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 18,\n fontWeight: '400',\n fontFamily: CODE_FONT,\n },\n location: {\n color: LogBoxStyle.getTextColor(0.8),\n fontSize: 12,\n fontWeight: '300',\n includeFontPadding: false,\n lineHeight: 16,\n paddingLeft: 10,\n },\n dim: {\n color: LogBoxStyle.getTextColor(0.4),\n fontWeight: '300',\n },\n line: {\n color: LogBoxStyle.getTextColor(0.8),\n fontSize: 12,\n fontWeight: '300',\n includeFontPadding: false,\n lineHeight: 16,\n },\n});\n"]}