{"ast":null,"code":"\"use strict\";\n\nvar _slicedToArray = require(\"@babel/runtime/helpers/slicedToArray\");\nvar __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  var desc = Object.getOwnPropertyDescriptor(m, k);\n  if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n    desc = {\n      enumerable: true,\n      get: function get() {\n        return m[k];\n      }\n    };\n  }\n  Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n  if (k2 === undefined) k2 = k;\n  o[k2] = m[k];\n});\nvar __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {\n  Object.defineProperty(o, \"default\", {\n    enumerable: true,\n    value: v\n  });\n} : function (o, v) {\n  o[\"default\"] = v;\n});\nvar __importStar = this && this.__importStar || function (mod) {\n  if (mod && mod.__esModule) return mod;\n  var result = {};\n  if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n  __setModuleDefault(result, mod);\n  return result;\n};\nvar __importDefault = this && this.__importDefault || function (mod) {\n  return mod && mod.__esModule ? mod : {\n    \"default\": mod\n  };\n};\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.LogBoxInspectorStackFrames = exports.getCollapseMessage = void 0;\nvar react_1 = __importStar(require(\"react\"));\nvar react_native_1 = require(\"react-native-web/dist/index\");\nvar LogContext_1 = require(\"../Data/LogContext\");\nvar LogBoxButton_1 = require(\"../UI/LogBoxButton\");\nvar LogBoxStyle = __importStar(require(\"../UI/LogBoxStyle\"));\nvar openFileInEditor_1 = __importDefault(require(\"../modules/openFileInEditor\"));\nvar LogBoxInspectorSection_1 = require(\"./LogBoxInspectorSection\");\nvar LogBoxInspectorSourceMapStatus_1 = require(\"./LogBoxInspectorSourceMapStatus\");\nvar LogBoxInspectorStackFrame_1 = require(\"./LogBoxInspectorStackFrame\");\nfunction getCollapseMessage(stackFrames, collapsed) {\n  if (stackFrames.length === 0) {\n    return \"No frames to show\";\n  }\n  var collapsedCount = stackFrames.reduce(function (count, _ref) {\n    var collapse = _ref.collapse;\n    if (collapse === true) {\n      return count + 1;\n    }\n    return count;\n  }, 0);\n  if (collapsedCount === 0) {\n    return \"Showing all frames\";\n  }\n  var framePlural = `frame${collapsedCount > 1 ? \"s\" : \"\"}`;\n  if (collapsedCount === stackFrames.length) {\n    return collapsed ? `See${collapsedCount > 1 ? \" all \" : \" \"}${collapsedCount} collapsed ${framePlural}` : `Collapse${collapsedCount > 1 ? \" all \" : \" \"}${collapsedCount} ${framePlural}`;\n  } else {\n    return collapsed ? `See ${collapsedCount} more ${framePlural}` : `Collapse ${collapsedCount} ${framePlural}`;\n  }\n}\nexports.getCollapseMessage = getCollapseMessage;\nfunction LogBoxInspectorStackFrames(_ref2) {\n  var onRetry = _ref2.onRetry,\n    type = _ref2.type;\n  var _a;\n  var log = (0, LogContext_1.useSelectedLog)();\n  var _ref3 = (0, react_1.useState)(function () {\n      var _a;\n      return (_a = log.getAvailableStack(type)) === null || _a === void 0 ? void 0 : _a.some(function (_ref5) {\n        var collapse = _ref5.collapse;\n        return !collapse;\n      });\n    }),\n    _ref4 = _slicedToArray(_ref3, 2),\n    collapsed = _ref4[0],\n    setCollapsed = _ref4[1];\n  function getStackList() {\n    var _a;\n    if (collapsed === true) {\n      return (_a = log.getAvailableStack(type)) === null || _a === void 0 ? void 0 : _a.filter(function (_ref6) {\n        var collapse = _ref6.collapse;\n        return !collapse;\n      });\n    } else {\n      return log.getAvailableStack(type);\n    }\n  }\n  if (((_a = log.getAvailableStack(type)) === null || _a === void 0 ? void 0 : _a.length) === 0) {\n    return null;\n  }\n  return react_1.default.createElement(LogBoxInspectorSection_1.LogBoxInspectorSection, {\n    heading: type === \"component\" ? \"Component Stack\" : \"Call Stack\",\n    action: react_1.default.createElement(LogBoxInspectorSourceMapStatus_1.LogBoxInspectorSourceMapStatus, {\n      onPress: log.symbolicated[type].status === \"FAILED\" ? onRetry : null,\n      status: log.symbolicated[type].status\n    })\n  }, log.symbolicated[type].status !== \"COMPLETE\" && react_1.default.createElement(react_native_1.View, {\n    style: stackStyles.hintBox\n  }, react_1.default.createElement(react_native_1.Text, {\n    style: stackStyles.hintText\n  }, \"This call stack is not symbolicated. Some features are unavailable such as viewing the function name or tapping to open files.\")), react_1.default.createElement(StackFrameList, {\n    list: getStackList(),\n    status: log.symbolicated[type].status\n  }), react_1.default.createElement(StackFrameFooter, {\n    onPress: function onPress() {\n      return setCollapsed(!collapsed);\n    },\n    message: getCollapseMessage(log.getAvailableStack(type), !!collapsed)\n  }));\n}\nexports.LogBoxInspectorStackFrames = LogBoxInspectorStackFrames;\nfunction StackFrameList(_ref7) {\n  var list = _ref7.list,\n    status = _ref7.status;\n  return list.map(function (frame, index) {\n    var file = frame.file,\n      lineNumber = frame.lineNumber;\n    return react_1.default.createElement(LogBoxInspectorStackFrame_1.LogBoxInspectorStackFrame, {\n      key: index,\n      frame: frame,\n      onPress: status === \"COMPLETE\" && file != null && lineNumber != null ? function () {\n        return (0, openFileInEditor_1.default)(file, lineNumber);\n      } : undefined\n    });\n  });\n}\nfunction StackFrameFooter(_ref8) {\n  var message = _ref8.message,\n    onPress = _ref8.onPress;\n  return react_1.default.createElement(react_native_1.View, {\n    style: stackStyles.collapseContainer\n  }, react_1.default.createElement(LogBoxButton_1.LogBoxButton, {\n    backgroundColor: {\n      default: \"transparent\",\n      pressed: LogBoxStyle.getBackgroundColor(1)\n    },\n    onPress: onPress,\n    style: stackStyles.collapseButton\n  }, react_1.default.createElement(react_native_1.Text, {\n    style: stackStyles.collapse\n  }, message)));\n}\nvar stackStyles = react_native_1.StyleSheet.create({\n  section: {\n    marginTop: 15\n  },\n  heading: {\n    alignItems: \"center\",\n    flexDirection: \"row\",\n    paddingHorizontal: 12,\n    marginBottom: 10\n  },\n  headingText: {\n    color: LogBoxStyle.getTextColor(1),\n    flex: 1,\n    fontSize: 20,\n    fontWeight: \"600\",\n    includeFontPadding: false,\n    lineHeight: 20\n  },\n  body: {\n    paddingBottom: 10\n  },\n  bodyText: {\n    color: LogBoxStyle.getTextColor(1),\n    fontSize: 14,\n    includeFontPadding: false,\n    lineHeight: 18,\n    fontWeight: \"500\",\n    paddingHorizontal: 27\n  },\n  hintText: {\n    color: LogBoxStyle.getTextColor(0.7),\n    fontSize: 13,\n    includeFontPadding: false,\n    lineHeight: 18,\n    fontWeight: \"400\",\n    marginHorizontal: 10\n  },\n  hintBox: {\n    backgroundColor: LogBoxStyle.getBackgroundColor(),\n    marginHorizontal: 10,\n    paddingHorizontal: 5,\n    paddingVertical: 10,\n    borderRadius: 5,\n    marginBottom: 5\n  },\n  collapseContainer: {\n    marginLeft: 15,\n    flexDirection: \"row\"\n  },\n  collapseButton: {\n    borderRadius: 5\n  },\n  collapse: {\n    color: LogBoxStyle.getTextColor(0.7),\n    fontSize: 12,\n    fontWeight: \"300\",\n    lineHeight: 20,\n    marginTop: 0,\n    paddingHorizontal: 10,\n    paddingVertical: 5\n  }\n});","map":{"version":3,"sources":["../../../src/error-overlay/overlay/LogBoxInspectorStackFrames.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAA,OAAA,GAAA,YAAA,CAAA,OAAA,CAAA,OAAA,CAAA,CAAA;AAAwC,IAAA,cAAA,GAAA,OAAA;AAKxC,IAAA,YAAA,GAAA,OAAA,qBAAA,CAAA;AACA,IAAA,cAAA,GAAA,OAAA,qBAAA,CAAA;AACA,IAAA,WAAA,GAAA,YAAA,CAAA,OAAA,oBAAA,CAAA,CAAA;AACA,IAAA,kBAAA,GAAA,eAAA,CAAA,OAAA,8BAAA,CAAA,CAAA;AACA,IAAA,wBAAA,GAAA,OAAA,2BAAA,CAAA;AACA,IAAA,gCAAA,GAAA,OAAA,mCAAA,CAAA;AACA,IAAA,2BAAA,GAAA,OAAA,8BAAA,CAAA;AAOA,SAAgB,kBAAkB,CAChC,WAAkB,EA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AAE;GAChB;EACD,QAAQ,EAAE;IACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;IAClC,QAAQ,EAAE,EAAE;IACZ,kBAAkB,EAAE,KAAK;IACzB,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,KAAK;IACjB,iBAAiB,EAAE;GACpB;EACD,QAAQ,EAAE;IACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;IACpC,QAAQ,EAAE,EAAE;IACZ,kBAAkB,EAAE,KAAK;IACzB,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,KAAK;IACjB,gBAAgB,EAAE;GACnB;EACD,OAAO,EAAE;IACP,eAAe,EAAE,WAAW,CAAC,kBAAkB,CAAA,CAAE;IACjD,gBAAgB,EAAE,EAAE;IACpB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,EAAE;IACnB,YAAY,EAAE,CAAC;IACf,YAAY,EAAE;GACf;EACD,iBAAiB,EAAE;IACjB,UAAU,EAAE,EAAE;IACd,aAAa,EAAE;GAChB;EACD,cAAc,EAAE;IACd,YAAY,EAAE;GACf;EACD,QAAQ,EAAE;IACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;IACpC,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,CAAC;IACZ,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE;EAClB;CACF,CAAC","sourcesContent":["/**\n * Copyright (c) Evan Bacon.\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, { useState } from \"react\";\nimport { StyleSheet, Text, View } from \"react-native\";\n\nimport type { StackType } from \"../Data/LogBoxLog\";\nimport type { Stack } from \"../Data/LogBoxSymbolication\";\nimport { useSelectedLog } from \"../Data/LogContext\";\nimport { LogBoxButton } from \"../UI/LogBoxButton\";\nimport * as LogBoxStyle from \"../UI/LogBoxStyle\";\nimport openFileInEditor from \"../modules/openFileInEditor\";\nimport { LogBoxInspectorSection } from \"./LogBoxInspectorSection\";\nimport { LogBoxInspectorSourceMapStatus } from \"./LogBoxInspectorSourceMapStatus\";\nimport { LogBoxInspectorStackFrame } from \"./LogBoxInspectorStackFrame\";\n\ntype Props = {\n  type: StackType;\n  onRetry: () => void;\n};\n\nexport function getCollapseMessage(\n  stackFrames: Stack,\n  collapsed: boolean\n): string {\n  if (stackFrames.length === 0) {\n    return \"No frames to show\";\n  }\n\n  const collapsedCount = stackFrames.reduce((count, { collapse }) => {\n    if (collapse === true) {\n      return count + 1;\n    }\n\n    return count;\n  }, 0);\n\n  if (collapsedCount === 0) {\n    return \"Showing all frames\";\n  }\n\n  const framePlural = `frame${collapsedCount > 1 ? \"s\" : \"\"}`;\n  if (collapsedCount === stackFrames.length) {\n    return collapsed\n      ? `See${\n          collapsedCount > 1 ? \" all \" : \" \"\n        }${collapsedCount} collapsed ${framePlural}`\n      : `Collapse${\n          collapsedCount > 1 ? \" all \" : \" \"\n        }${collapsedCount} ${framePlural}`;\n  } else {\n    return collapsed\n      ? `See ${collapsedCount} more ${framePlural}`\n      : `Collapse ${collapsedCount} ${framePlural}`;\n  }\n}\n\nexport function LogBoxInspectorStackFrames({ onRetry, type }: Props) {\n  const log = useSelectedLog();\n\n  const [collapsed, setCollapsed] = useState(() => {\n    // Only collapse frames initially if some frames are not collapsed.\n    return log.getAvailableStack(type)?.some(({ collapse }) => !collapse);\n  });\n\n  function getStackList() {\n    if (collapsed === true) {\n      return log.getAvailableStack(type)?.filter(({ collapse }) => !collapse);\n    } else {\n      return log.getAvailableStack(type);\n    }\n  }\n\n  if (log.getAvailableStack(type)?.length === 0) {\n    return null;\n  }\n\n  return (\n    <LogBoxInspectorSection\n      heading={type === \"component\" ? \"Component Stack\" : \"Call Stack\"}\n      action={\n        <LogBoxInspectorSourceMapStatus\n          onPress={log.symbolicated[type].status === \"FAILED\" ? onRetry : null}\n          status={log.symbolicated[type].status}\n        />\n      }\n    >\n      {log.symbolicated[type].status !== \"COMPLETE\" && (\n        <View style={stackStyles.hintBox}>\n          <Text style={stackStyles.hintText}>\n            This call stack is not symbolicated. Some features are unavailable\n            such as viewing the function name or tapping to open files.\n          </Text>\n        </View>\n      )}\n      <StackFrameList\n        list={getStackList()!}\n        status={log.symbolicated[type].status}\n      />\n      <StackFrameFooter\n        onPress={() => setCollapsed(!collapsed)}\n        message={getCollapseMessage(log.getAvailableStack(type)!, !!collapsed)}\n      />\n    </LogBoxInspectorSection>\n  );\n}\n\nfunction StackFrameList({\n  list,\n  status,\n}: {\n  list: Stack;\n  status: \"NONE\" | \"PENDING\" | \"COMPLETE\" | \"FAILED\";\n}): any {\n  return list.map((frame, index) => {\n    const { file, lineNumber } = frame;\n    return (\n      <LogBoxInspectorStackFrame\n        key={index}\n        frame={frame}\n        onPress={\n          status === \"COMPLETE\" && file != null && lineNumber != null\n            ? () => openFileInEditor(file, lineNumber)\n            : undefined\n        }\n      />\n    );\n  });\n}\n\nfunction StackFrameFooter({\n  message,\n  onPress,\n}: {\n  message: string;\n  onPress: () => void;\n}) {\n  return (\n    <View style={stackStyles.collapseContainer}>\n      <LogBoxButton\n        backgroundColor={{\n          default: \"transparent\",\n          pressed: LogBoxStyle.getBackgroundColor(1),\n        }}\n        onPress={onPress}\n        style={stackStyles.collapseButton}\n      >\n        <Text style={stackStyles.collapse}>{message}</Text>\n      </LogBoxButton>\n    </View>\n  );\n}\n\nconst stackStyles = StyleSheet.create({\n  section: {\n    marginTop: 15,\n  },\n  heading: {\n    alignItems: \"center\",\n    flexDirection: \"row\",\n    paddingHorizontal: 12,\n    marginBottom: 10,\n  },\n  headingText: {\n    color: LogBoxStyle.getTextColor(1),\n    flex: 1,\n    fontSize: 20,\n    fontWeight: \"600\",\n    includeFontPadding: false,\n    lineHeight: 20,\n  },\n  body: {\n    paddingBottom: 10,\n  },\n  bodyText: {\n    color: LogBoxStyle.getTextColor(1),\n    fontSize: 14,\n    includeFontPadding: false,\n    lineHeight: 18,\n    fontWeight: \"500\",\n    paddingHorizontal: 27,\n  },\n  hintText: {\n    color: LogBoxStyle.getTextColor(0.7),\n    fontSize: 13,\n    includeFontPadding: false,\n    lineHeight: 18,\n    fontWeight: \"400\",\n    marginHorizontal: 10,\n  },\n  hintBox: {\n    backgroundColor: LogBoxStyle.getBackgroundColor(),\n    marginHorizontal: 10,\n    paddingHorizontal: 5,\n    paddingVertical: 10,\n    borderRadius: 5,\n    marginBottom: 5,\n  },\n  collapseContainer: {\n    marginLeft: 15,\n    flexDirection: \"row\",\n  },\n  collapseButton: {\n    borderRadius: 5,\n  },\n  collapse: {\n    color: LogBoxStyle.getTextColor(0.7),\n    fontSize: 12,\n    fontWeight: \"300\",\n    lineHeight: 20,\n    marginTop: 0,\n    paddingHorizontal: 10,\n    paddingVertical: 5,\n  },\n});\n"],"sourceRoot":""},"metadata":{},"sourceType":"script"}