diff --git a/cli/Cargo.lock b/cli/Cargo.lock index 07471b779c..115c16d933 100644 --- a/cli/Cargo.lock +++ b/cli/Cargo.lock @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.36" +version = "1.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54" +checksum = "65193589c6404eb80b450d618eaf9a2cafaaafd57ecce47370519ef674a7bd44" dependencies = [ "find-msvc-tools", "shlex", @@ -725,7 +725,7 @@ dependencies = [ "js-sys", "libc", "r-efi", - "wasi 0.14.5+wasi-0.2.4", + "wasi 0.14.7+wasi-0.2.4", "wasm-bindgen", ] @@ -930,9 +930,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ "base64 0.22.1", "bytes", @@ -954,9 +954,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1097,9 +1097,9 @@ checksum = "cd62e6b5e86ea8eeeb8db1de02880a6abc01a397b2ebb64b5d74ac255318f5cb" [[package]] name = "indexmap" -version = "2.11.1" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" +checksum = "92119844f513ffa41556430369ab02c295a3578af21cf945caa3e9e0c2481ac3" dependencies = [ "equivalent", "hashbrown", @@ -1219,9 +1219,9 @@ checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" [[package]] name = "libredox" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags 2.9.4", "libc", @@ -1543,9 +1543,9 @@ dependencies = [ [[package]] name = "posthog-symbol-data" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155615f55dabf848e8e69d7081412e424afbea5060a49bb9582f48d0f8141f64" +checksum = "ed6c8edcab40fb71e1eb6b6af8961b3d0d04fbcaa841331036c964868d5dcb22" dependencies = [ "serde", "thiserror 1.0.69", @@ -1908,7 +1908,7 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.5", + "rustls-webpki 0.103.6", "subtle", "zeroize", ] @@ -1944,9 +1944,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.5" +version = "0.103.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a37813727b78798e53c2bec3f5e8fe12a6d6f8389bf9ca7802add4c9905ad8" +checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" dependencies = [ "ring", "rustls-pki-types", @@ -1992,24 +1992,34 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.219" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +checksum = "fd6c24dee235d0da097043389623fb913daddf92c76e9f5a1db88607a0bcbd1d" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.225" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "659356f9a0cb1e529b24c01e43ad2bdf520ec4ceaf83047b83ddcc2251f96383" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.219" +version = "1.0.225" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "0ea936adf78b1f766949a4977b91d2f5595825bd6ec079aa9543ad2685fc4516" dependencies = [ "proc-macro2", "quote", @@ -2018,14 +2028,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.143" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] @@ -2725,18 +2736,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.5+wasi-0.2.4" +version = "0.14.7+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4494f6290a82f5fe584817a676a34b9d6763e8d9d18204009fb31dceca98fd4" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" dependencies = [ "wasip2", ] [[package]] name = "wasip2" -version = "1.0.0+wasi-0.2.4" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fa2761397e5bd52002cd7e73110c71af2109aca4e521a9f40473fe685b0a24" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ "wit-bindgen", ] @@ -2881,13 +2892,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.2" +version = "0.62.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" dependencies = [ "windows-implement", "windows-interface", - "windows-link 0.1.3", + "windows-link 0.2.0", "windows-result", "windows-strings", ] @@ -2928,20 +2939,20 @@ checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] name = "windows-result" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" dependencies = [ - "windows-link 0.1.3", + "windows-link 0.2.0", ] [[package]] name = "windows-strings" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" dependencies = [ - "windows-link 0.1.3", + "windows-link 0.2.0", ] [[package]] @@ -3187,9 +3198,9 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.45.1" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ea1da2997a..03bc1c3534 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -22,7 +22,7 @@ path = "src/main.rs" clap = { version = "4.5.31", features = ["derive"] } dirs = "6.0.0" inquire = "0.7.5" -posthog-symbol-data = "0.1.0" +posthog-symbol-data = "0.2.0" walkdir = "2.5.0" globset = "0.4" ratatui = "0.29.0" diff --git a/rust/Cargo.lock b/rust/Cargo.lock index f869c52757..a4f3484c34 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -2033,7 +2033,7 @@ dependencies = [ "moka", "once_cell", "posthog-rs", - "posthog-symbol-data 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "posthog-symbol-data 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdkafka", "regex", "reqwest 0.12.3", @@ -5154,7 +5154,7 @@ dependencies = [ [[package]] name = "posthog-symbol-data" -version = "0.1.0" +version = "0.2.0" dependencies = [ "serde", "thiserror 1.0.69", @@ -5162,9 +5162,9 @@ dependencies = [ [[package]] name = "posthog-symbol-data" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155615f55dabf848e8e69d7081412e424afbea5060a49bb9582f48d0f8141f64" +checksum = "ed6c8edcab40fb71e1eb6b6af8961b3d0d04fbcaa841331036c964868d5dcb22" dependencies = [ "serde", "thiserror 1.0.69", diff --git a/rust/common/symbol_data/Cargo.toml b/rust/common/symbol_data/Cargo.toml index b9315ef8d6..fcd554c082 100644 --- a/rust/common/symbol_data/Cargo.toml +++ b/rust/common/symbol_data/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "posthog-symbol-data" -version = "0.1.0" +version = "0.2.0" authors = [ "David ", "Olly ", diff --git a/rust/common/symbol_data/src/data_types/hermesmap.rs b/rust/common/symbol_data/src/data_types/hermesmap.rs new file mode 100644 index 0000000000..90db4e93d1 --- /dev/null +++ b/rust/common/symbol_data/src/data_types/hermesmap.rs @@ -0,0 +1,22 @@ +use crate::symbol_data::{SymbolData, SymbolDataType}; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct HermesMap { + pub sourcemap: String, // JSON content of sourcemap +} + +impl SymbolData for HermesMap { + fn from_bytes(data: Vec) -> Result { + Ok(Self { + sourcemap: String::from_utf8(data)?, + }) + } + + fn into_bytes(self) -> Vec { + self.sourcemap.into_bytes() + } + + fn data_type() -> crate::symbol_data::SymbolDataType { + SymbolDataType::HermesMap + } +} diff --git a/rust/common/symbol_data/src/data_types/mod.rs b/rust/common/symbol_data/src/data_types/mod.rs index 78b3b5f61c..683b20ff1f 100644 --- a/rust/common/symbol_data/src/data_types/mod.rs +++ b/rust/common/symbol_data/src/data_types/mod.rs @@ -1 +1,2 @@ +pub mod hermesmap; pub mod sourcemap; diff --git a/rust/common/symbol_data/src/lib.rs b/rust/common/symbol_data/src/lib.rs index eea7feb8d7..65b54fb713 100644 --- a/rust/common/symbol_data/src/lib.rs +++ b/rust/common/symbol_data/src/lib.rs @@ -12,3 +12,6 @@ pub use symbol_data::write as write_symbol_data; // Javascript pub use data_types::sourcemap::SourceAndMap; + +// Hermes +pub use data_types::hermesmap::HermesMap; diff --git a/rust/common/symbol_data/src/symbol_data.rs b/rust/common/symbol_data/src/symbol_data.rs index 6bb2ea1dac..4651ab4ace 100644 --- a/rust/common/symbol_data/src/symbol_data.rs +++ b/rust/common/symbol_data/src/symbol_data.rs @@ -6,6 +6,7 @@ const VERSION: u32 = 1; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum SymbolDataType { SourceAndMap = 2, + HermesMap = 3, } pub trait SymbolData: Sized { diff --git a/rust/cymbal/Cargo.toml b/rust/cymbal/Cargo.toml index 9b84a6b715..c12b7c912b 100644 --- a/rust/cymbal/Cargo.toml +++ b/rust/cymbal/Cargo.toml @@ -19,7 +19,7 @@ common-types = { path = "../common/types" } common-dns = { path = "../common/dns" } common-redis = { path = "../common/redis" } limiters = { path = "../common/limiters" } -posthog-symbol-data = "0.1.0" +posthog-symbol-data = "0.2.0" common-geoip = { path = "../common/geoip" } hogvm = { path = "../common/hogvm" } thiserror = { workspace = true } diff --git a/rust/cymbal/src/app_context.rs b/rust/cymbal/src/app_context.rs index 2a5776f230..eae4ef75a2 100644 --- a/rust/cymbal/src/app_context.rs +++ b/rust/cymbal/src/app_context.rs @@ -23,6 +23,7 @@ use crate::{ caching::{Caching, SymbolSetCache}, chunk_id::ChunkIdFetcher, concurrency, + hermesmap::HermesMapProvider, saving::Saving, sourcemap::SourcemapProvider, Catalog, S3Client, @@ -107,34 +108,42 @@ impl AppContext { ))); let smp = SourcemapProvider::new(config); - - let chunk_layer = ChunkIdFetcher::new( + let smp_chunk = ChunkIdFetcher::new( smp, s3_client.clone(), pool.clone(), config.object_storage_bucket.clone(), ); - - let saving_layer = Saving::new( - chunk_layer, + let smp_saving = Saving::new( + smp_chunk, pool.clone(), s3_client.clone(), config.object_storage_bucket.clone(), config.ss_prefix.clone(), ); - let caching_layer = Caching::new(saving_layer, ss_cache.clone()); + let smp_caching = Caching::new(smp_saving, ss_cache.clone()); // We want to fetch each sourcemap from the outside world // exactly once, and if it isn't in the cache, load/parse // it from s3 exactly once too. Limiting the per symbol set // reference concurrency to 1 ensures this. - let limited_layer = concurrency::AtMostOne::new(caching_layer); + let smp_atmostonce = concurrency::AtMostOne::new(smp_caching); + + let hmp = HermesMapProvider {}; + let hmp_chunk = ChunkIdFetcher::new( + hmp, + s3_client.clone(), + pool.clone(), + config.object_storage_bucket.clone(), + ); + let hmp_caching = Caching::new(hmp_chunk, ss_cache.clone()); + // We skip the saving layer for HermesMapProvider, since it'll never fetch something from the outside world. info!( "AppContext initialized, subscribed to topic {}", config.consumer.kafka_consumer_topic ); - let catalog = Catalog::new(limited_layer); + let catalog = Catalog::new(smp_atmostonce, hmp_caching); let resolver = Resolver::new(config); let team_manager = TeamManager::new(config); diff --git a/rust/cymbal/src/bin/hermes.rs b/rust/cymbal/src/bin/hermes.rs new file mode 100644 index 0000000000..864fd83160 --- /dev/null +++ b/rust/cymbal/src/bin/hermes.rs @@ -0,0 +1,36 @@ +use regex::Regex; + +#[tokio::main] +async fn main() { + let composed_map = sourcemap::decode_slice( + include_str!("../../tests/static/hermes/composed_example.map").as_bytes(), + ) + .unwrap(); + let raw_stack = include_str!("../../tests/static/hermes/raw_stack.txt"); + + let frame_regex = Regex::new(r"at\s+(\S+)\s+\(address at\s+[^:]+:(\d+):(\d+)\)").unwrap(); + let expected_names = [ + "c", + "b", + "a", + "loadModuleImplementation", + "guardedLoadModule", + "metroRequire", + "global", + ]; + + for (captures, expected) in frame_regex + .captures_iter(raw_stack) + .zip(expected_names.iter()) + { + let line: u32 = captures[2].parse().unwrap(); + let col: u32 = captures[3].parse().unwrap(); + + composed_map.lookup_token(line - 1, col).unwrap(); + let resolved = composed_map + .get_original_function_name(line - 1, col, Some(&captures[1]), None) + .unwrap_or(&captures[1]); + + assert_eq!(resolved, *expected); + } +} diff --git a/rust/cymbal/src/error.rs b/rust/cymbal/src/error.rs index 4022462c0d..10ee1358d8 100644 --- a/rust/cymbal/src/error.rs +++ b/rust/cymbal/src/error.rs @@ -10,13 +10,11 @@ use thiserror::Error; use uuid::Uuid; #[derive(Debug, Error)] -pub enum Error { +pub enum ResolveError { #[error(transparent)] UnhandledError(#[from] UnhandledError), #[error(transparent)] ResolutionError(#[from] FrameError), - #[error(transparent)] - EventError(#[from] EventError), } // An unhandled failure at some stage of the event pipeline, as @@ -68,6 +66,8 @@ pub enum UnhandledError { pub enum FrameError { #[error(transparent)] JavaScript(#[from] JsResolveErr), + #[error(transparent)] + Hermes(#[from] HermesError), #[error("No symbol set for chunk id: {0}")] MissingChunkIdData(String), } @@ -124,6 +124,20 @@ pub enum JsResolveErr { NoSourcemapUploaded(String), } +#[derive(Debug, Error, Serialize, Deserialize)] +pub enum HermesError { + #[error("Data error: {0}")] + DataError(#[from] SymbolDataError), + #[error("Invalid map: {0}")] + InvalidMap(String), + #[error("No sourcemap uploaded for chunk id: {0}")] + NoSourcemapUploaded(String), + #[error("No chunk id sent with frame")] + NoChunkId, + #[error("No token for column {0} on chunk {1}")] + NoTokenForColumn(u32, String), +} + #[derive(Debug, Error, Clone)] pub enum EventError { #[error("Wrong event type: {0} for event {1}")] @@ -146,12 +160,26 @@ pub enum EventError { FilteredByTeamId, } -impl From for Error { +impl From for ResolveError { fn from(e: JsResolveErr) -> Self { FrameError::JavaScript(e).into() } } +impl From for ResolveError { + fn from(e: HermesError) -> Self { + FrameError::Hermes(e).into() + } +} + +impl From for UnhandledError { + fn from(e: FrameError) -> Self { + // TODO - this should be unreachable, but I need to reconsider the error enum structure to make it possible to assert that + // at the type level. Leaving for a later refactor for now. + UnhandledError::Other(format!("Unhandled resolution error: {e}")) + } +} + impl From for JsResolveErr { fn from(e: reqwest::Error) -> Self { if e.is_timeout() { diff --git a/rust/cymbal/src/fingerprinting/mod.rs b/rust/cymbal/src/fingerprinting/mod.rs index a4749bb24e..5d92867cee 100644 --- a/rust/cymbal/src/fingerprinting/mod.rs +++ b/rust/cymbal/src/fingerprinting/mod.rs @@ -109,12 +109,16 @@ mod test { use uuid::Uuid; - use crate::{frames::Frame, types::Stacktrace}; + use crate::{ + frames::{Frame, FrameId}, + types::Stacktrace, + }; use super::*; #[test] fn test_some_resolved_frames() { + let team_id = 1; let mut exception = Exception { exception_id: None, exception_type: "TypeError".to_string(), @@ -127,7 +131,7 @@ mod test { let mut resolved_frames = vec![ Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), team_id), mangled_name: "foo".to_string(), line: Some(10), column: Some(5), @@ -143,7 +147,7 @@ mod test { synthetic: false, }, Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), team_id), mangled_name: "bar".to_string(), line: Some(20), column: Some(15), @@ -161,7 +165,7 @@ mod test { ]; let unresolved_frame = Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), team_id), mangled_name: "xyz".to_string(), line: Some(30), column: Some(25), @@ -209,7 +213,7 @@ mod test { let resolved_frames = vec![ Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), 1), mangled_name: "foo".to_string(), line: Some(10), column: Some(5), @@ -225,7 +229,7 @@ mod test { synthetic: false, }, Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), 1), mangled_name: "bar".to_string(), line: Some(20), column: Some(15), @@ -241,7 +245,7 @@ mod test { synthetic: false, }, Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), 1), mangled_name: "xyz".to_string(), line: Some(30), column: Some(25), @@ -283,7 +287,7 @@ mod test { }; let mut resolved_frames = vec![Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), 1), mangled_name: "foo".to_string(), line: Some(10), column: Some(5), @@ -300,7 +304,7 @@ mod test { }]; let non_app_frame = Frame { - raw_id: String::new(), + raw_id: FrameId::new(String::new(), 1), mangled_name: "bar".to_string(), line: Some(20), column: Some(15), diff --git a/rust/cymbal/src/frames/mod.rs b/rust/cymbal/src/frames/mod.rs index a2e145ba02..a6369c8618 100644 --- a/rust/cymbal/src/frames/mod.rs +++ b/rust/cymbal/src/frames/mod.rs @@ -8,8 +8,8 @@ use crate::{ error::UnhandledError, fingerprinting::{FingerprintBuilder, FingerprintComponent, FingerprintRecordPart}, langs::{ - custom::CustomFrame, go::RawGoFrame, js::RawJSFrame, node::RawNodeFrame, - python::RawPythonFrame, + custom::CustomFrame, go::RawGoFrame, hermes::RawHermesFrame, js::RawJSFrame, + node::RawNodeFrame, python::RawPythonFrame, }, metric_consts::PER_FRAME_TIME, sanitize_string, @@ -33,6 +33,8 @@ pub enum RawFrame { JavaScriptNode(RawNodeFrame), #[serde(rename = "go")] Go(RawGoFrame), + #[serde(rename = "hermes")] + Hermes(RawHermesFrame), // TODO - remove once we're happy no clients are using this anymore #[serde(rename = "javascript")] LegacyJS(RawJSFrame), @@ -40,6 +42,26 @@ pub enum RawFrame { Custom(CustomFrame), } +#[derive(Debug, Deserialize, Serialize, Clone, Hash, Eq, PartialEq)] +pub struct FrameId { + pub raw_id: String, + #[serde(skip)] + pub team_id: i32, +} + +impl FrameId { + pub fn new(raw_id: String, team_id: i32) -> Self { + FrameId { raw_id, team_id } + } + + pub fn placeholder() -> Self { + FrameId { + raw_id: "placeholder".to_string(), + team_id: 0, + } + } +} + impl RawFrame { pub async fn resolve(&self, team_id: i32, catalog: &Catalog) -> Result { let frame_resolve_time = common_metrics::timing_guard(PER_FRAME_TIME, &[]); @@ -53,11 +75,12 @@ impl RawFrame { RawFrame::Python(frame) => (Ok(frame.into()), "python"), RawFrame::Custom(frame) => (Ok(frame.into()), "custom"), RawFrame::Go(frame) => (Ok(frame.into()), "go"), + RawFrame::Hermes(frame) => (frame.resolve(team_id, catalog).await, "hermes"), }; // The raw id of the frame is set after it's resolved let res = res.map(|mut f| { - f.raw_id = self.frame_id(); + f.raw_id = self.frame_id(team_id); f }); @@ -76,6 +99,7 @@ impl RawFrame { match self { RawFrame::JavaScriptWeb(frame) | RawFrame::LegacyJS(frame) => frame.symbol_set_ref(), RawFrame::JavaScriptNode(frame) => frame.chunk_id.clone(), + RawFrame::Hermes(frame) => frame.chunk_id.clone(), // TODO - Python and Go frames don't use symbol sets for frame resolution, but could still use "marker" symbol set // to associate a given frame with a given release (basically, a symbol set with no data, just some id, // which we'd then use to do a join on the releases table to get release information) @@ -84,14 +108,17 @@ impl RawFrame { } } - pub fn frame_id(&self) -> String { - match self { + pub fn frame_id(&self, team_id: i32) -> FrameId { + let hash_id = match self { RawFrame::JavaScriptWeb(raw) | RawFrame::LegacyJS(raw) => raw.frame_id(), RawFrame::JavaScriptNode(raw) => raw.frame_id(), RawFrame::Python(raw) => raw.frame_id(), RawFrame::Go(raw) => raw.frame_id(), RawFrame::Custom(raw) => raw.frame_id(), - } + RawFrame::Hermes(raw) => raw.frame_id(), + }; + + FrameId::new(hash_id, team_id) } } @@ -99,7 +126,8 @@ impl RawFrame { #[derive(Debug, Clone, Serialize, Deserialize, Eq, PartialEq)] pub struct Frame { // Properties used in processing - pub raw_id: String, // The raw frame id this was resolved from + #[serde(flatten)] + pub raw_id: FrameId, // The raw frame id this was resolved from pub mangled_name: String, // Mangled name of the function #[serde(skip_serializing_if = "Option::is_none")] pub line: Option, // Line the function is define on, if known @@ -146,8 +174,8 @@ pub struct ContextLine { impl FingerprintComponent for Frame { fn update(&self, fp: &mut FingerprintBuilder) { - let get_part = |s: &str, p: Vec<&str>| FingerprintRecordPart::Frame { - raw_id: s.to_string(), + let get_part = |s: &FrameId, p: Vec<&str>| FingerprintRecordPart::Frame { + raw_id: s.raw_id.to_string(), pieces: p.into_iter().map(String::from).collect(), }; @@ -220,7 +248,7 @@ impl ContextLine { impl std::fmt::Display for Frame { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "Frame {}:", self.raw_id)?; + writeln!(f, "Frame {}:", self.raw_id.raw_id)?; // Function name and location write!( diff --git a/rust/cymbal/src/frames/records.rs b/rust/cymbal/src/frames/records.rs index 05e4afa7dd..0703c51d14 100644 --- a/rust/cymbal/src/frames/records.rs +++ b/rust/cymbal/src/frames/records.rs @@ -4,14 +4,13 @@ use serde_json::Value; use sqlx::Executor; use uuid::Uuid; -use crate::error::UnhandledError; +use crate::{error::UnhandledError, frames::FrameId}; use super::{Context, Frame}; #[derive(Debug, Serialize, Deserialize, Clone)] pub struct ErrorTrackingStackFrame { - pub raw_id: String, - pub team_id: i32, + pub id: FrameId, pub created_at: DateTime, pub symbol_set_id: Option, pub contents: Frame, @@ -21,16 +20,14 @@ pub struct ErrorTrackingStackFrame { impl ErrorTrackingStackFrame { pub fn new( - raw_id: String, - team_id: i32, + id: FrameId, symbol_set_id: Option, contents: Frame, resolved: bool, context: Option, ) -> Self { Self { - raw_id, - team_id, + id, symbol_set_id, contents, resolved, @@ -59,8 +56,8 @@ impl ErrorTrackingStackFrame { resolved = $6, context = $8 "#, - self.raw_id, - self.team_id, + self.id.raw_id, + self.id.team_id, self.created_at, self.symbol_set_id, serde_json::to_value(&self.contents)?, @@ -73,8 +70,7 @@ impl ErrorTrackingStackFrame { pub async fn load<'c, E>( e: E, - team_id: i32, - raw_id: &str, + id: &FrameId, result_ttl: Duration, ) -> Result, UnhandledError> where @@ -96,8 +92,8 @@ impl ErrorTrackingStackFrame { FROM posthog_errortrackingstackframe WHERE raw_id = $1 AND team_id = $2 "#, - raw_id, - team_id + id.raw_id, + id.team_id ) .fetch_optional(e) .await?; @@ -127,8 +123,7 @@ impl ErrorTrackingStackFrame { frame.context = context.clone(); Ok(Some(Self { - raw_id: found.raw_id, - team_id: found.team_id, + id: FrameId::new(found.raw_id, found.team_id), created_at: found.created_at, symbol_set_id: found.symbol_set_id, contents: frame, diff --git a/rust/cymbal/src/frames/resolver.rs b/rust/cymbal/src/frames/resolver.rs index eabd435d52..e09f304c82 100644 --- a/rust/cymbal/src/frames/resolver.rs +++ b/rust/cymbal/src/frames/resolver.rs @@ -6,6 +6,7 @@ use sqlx::PgPool; use crate::{ config::Config, error::UnhandledError, + frames::FrameId, metric_consts::{FRAME_CACHE_HITS, FRAME_CACHE_MISSES, FRAME_DB_HITS, FRAME_DB_MISSES}, symbol_store::{saving::SymbolSetRecord, Catalog}, }; @@ -13,7 +14,7 @@ use crate::{ use super::{records::ErrorTrackingStackFrame, releases::ReleaseRecord, Frame, RawFrame}; pub struct Resolver { - cache: Cache, + cache: Cache, result_ttl: chrono::Duration, } @@ -35,19 +36,19 @@ impl Resolver { pool: &PgPool, catalog: &Catalog, ) -> Result { - if let Some(result) = self.cache.get(&frame.frame_id()) { + if let Some(result) = self.cache.get(&frame.frame_id(team_id)) { metrics::counter!(FRAME_CACHE_HITS).increment(1); return Ok(result.contents); } metrics::counter!(FRAME_CACHE_MISSES).increment(1); if let Some(mut result) = - ErrorTrackingStackFrame::load(pool, team_id, &frame.frame_id(), self.result_ttl).await? + ErrorTrackingStackFrame::load(pool, &frame.frame_id(team_id), self.result_ttl).await? { // We don't serialise release information on the frame, so we have to reload it if we fetched // the saved result from the DB result.contents = add_release_info(pool, result.contents, frame, team_id).await?; - self.cache.insert(frame.frame_id(), result.clone()); + self.cache.insert(frame.frame_id(team_id), result.clone()); metrics::counter!(FRAME_DB_HITS).increment(1); return Ok(result.contents); } @@ -64,8 +65,7 @@ impl Resolver { }; let record = ErrorTrackingStackFrame::new( - frame.frame_id(), - team_id, + frame.frame_id(team_id), set.map(|s| s.id), resolved.clone(), resolved.resolved, @@ -74,7 +74,7 @@ impl Resolver { record.save(pool).await?; - self.cache.insert(frame.frame_id(), record); + self.cache.insert(frame.frame_id(team_id), record); Ok(resolved) } } @@ -107,6 +107,7 @@ mod test { frames::{records::ErrorTrackingStackFrame, resolver::Resolver, RawFrame}, symbol_store::{ chunk_id::ChunkIdFetcher, + hermesmap::HermesMapProvider, saving::{Saving, SymbolSetRecord}, sourcemap::SourcemapProvider, Catalog, S3Client, @@ -161,7 +162,14 @@ mod test { config.ss_prefix.clone(), ); - let catalog = Catalog::new(saving_smp); + let hmp = ChunkIdFetcher::new( + HermesMapProvider {}, + client.clone(), + pool.clone(), + config.object_storage_bucket.clone(), + ); + + let catalog = Catalog::new(saving_smp, hmp); (config, catalog, server) } @@ -272,12 +280,11 @@ mod test { .unwrap(); // get the frame - let frame_id = frame.frame_id(); - let frame = - ErrorTrackingStackFrame::load(&pool, 0, &frame_id, chrono::Duration::minutes(30)) - .await - .unwrap() - .unwrap(); + let frame_id = frame.frame_id(0); + let frame = ErrorTrackingStackFrame::load(&pool, &frame_id, chrono::Duration::minutes(30)) + .await + .unwrap() + .unwrap(); assert_eq!(frame.symbol_set_id.unwrap(), set.id); diff --git a/rust/cymbal/src/langs/custom.rs b/rust/cymbal/src/langs/custom.rs index 28fe8f4d25..cea4a1dac8 100644 --- a/rust/cymbal/src/langs/custom.rs +++ b/rust/cymbal/src/langs/custom.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha512}; use crate::{ - frames::{Context, ContextLine, Frame}, + frames::{Context, ContextLine, Frame, FrameId}, langs::CommonFrameMetadata, }; @@ -87,7 +87,7 @@ impl CustomFrame { impl From<&CustomFrame> for Frame { fn from(value: &CustomFrame) -> Self { Frame { - raw_id: String::new(), + raw_id: FrameId::placeholder(), mangled_name: value.function.clone(), line: value.lineno, column: value.colno, diff --git a/rust/cymbal/src/langs/go.rs b/rust/cymbal/src/langs/go.rs index 673620d0ae..e932806ef3 100644 --- a/rust/cymbal/src/langs/go.rs +++ b/rust/cymbal/src/langs/go.rs @@ -1,7 +1,10 @@ use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha512}; -use crate::{frames::Frame, langs::CommonFrameMetadata}; +use crate::{ + frames::{Frame, FrameId}, + langs::CommonFrameMetadata, +}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct RawGoFrame { @@ -25,7 +28,7 @@ impl RawGoFrame { impl From<&RawGoFrame> for Frame { fn from(frame: &RawGoFrame) -> Self { Frame { - raw_id: frame.frame_id(), + raw_id: FrameId::placeholder(), mangled_name: frame.function.clone(), line: Some(frame.lineno), column: None, diff --git a/rust/cymbal/src/langs/hermes.rs b/rust/cymbal/src/langs/hermes.rs new file mode 100644 index 0000000000..37ead6ffc0 --- /dev/null +++ b/rust/cymbal/src/langs/hermes.rs @@ -0,0 +1,292 @@ +use std::fmt::Display; + +use serde::{Deserialize, Serialize}; +use sha2::{Digest, Sha512}; +use sourcemap::Token; + +use crate::{ + error::{FrameError, HermesError, ResolveError, UnhandledError}, + frames::{Frame, FrameId}, + langs::{ + utils::{add_raw_to_junk, get_token_context}, + CommonFrameMetadata, + }, + sanitize_string, + symbol_store::{chunk_id::OrChunkId, hermesmap::ParsedHermesMap, SymbolCatalog}, +}; + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct RawHermesFrame { + #[serde(rename = "colno")] + pub column: u32, // Hermes frames don't have a line number + #[serde(rename = "filename")] + pub source: String, // This will /usually/ be meaningless + #[serde(rename = "function")] + pub fn_name: String, // Mangled function name - sometimes, but not always, the same as the demangled function name + #[serde(rename = "chunkId", skip_serializing_if = "Option::is_none")] + pub chunk_id: Option, // Hermes frames are required to provide a chunk ID, or they cannot be resolved + #[serde(flatten)] + pub meta: CommonFrameMetadata, +} + +// This is an enum it's impossible to construct an instance of. We use it here, along with OrChunkId, to represent that the hermes frames +// will always have a chunk ID - this lets us assert the OrChunkId variant will always be OrChunkId::ChunkId, because the R in this case +// is impossible to construct. Change to a never type once that's stable - https://doc.rust-lang.org/std/primitive.never.html +#[derive(Debug, Clone)] +pub enum HermesRef {} + +impl RawHermesFrame { + pub async fn resolve(&self, team_id: i32, catalog: &C) -> Result + where + C: SymbolCatalog, ParsedHermesMap>, + { + match self.resolve_impl(team_id, catalog).await { + Ok(frame) => Ok(frame), + Err(ResolveError::ResolutionError(FrameError::Hermes(e))) => { + Ok(self.handle_resolution_error(e)) + } + Err(ResolveError::ResolutionError(FrameError::MissingChunkIdData(chunk_id))) => { + Ok(self.handle_resolution_error(HermesError::NoSourcemapUploaded(chunk_id))) + } + Err(ResolveError::ResolutionError(FrameError::JavaScript(e))) => { + // TODO - should be unreachable, specialize ResolveError to encode that + Err(UnhandledError::from(FrameError::from(e))) + } + Err(ResolveError::UnhandledError(e)) => Err(e), + } + } + + async fn resolve_impl(&self, team_id: i32, catalog: &C) -> Result + where + C: SymbolCatalog, ParsedHermesMap>, + { + let r = self.get_ref()?; + let sourcemap = catalog.lookup(team_id, r.clone()).await?; + let sourcemap = &sourcemap.map; + + let Some(token) = sourcemap.lookup_token(0, self.column) else { + return Err(HermesError::NoTokenForColumn(self.column, r.to_string()).into()); + }; + + let resolved_name = sourcemap + .get_original_function_name(self.column) + .map(|s| s.to_string()); + + Ok((self, token, resolved_name).into()) + } + + pub fn frame_id(&self) -> String { + let mut hasher = Sha512::new(); + hasher.update(self.fn_name.as_bytes()); + hasher.update(self.source.as_bytes()); + hasher.update(self.column.to_string().as_bytes()); + if let Some(chunk_id) = &self.chunk_id { + hasher.update(chunk_id.as_bytes()); + } + format!("{:x}", hasher.finalize()) + } + + pub fn symbol_set_ref(&self) -> Option { + self.get_ref().ok().map(|r| r.to_string()) + } + + fn get_ref(&self) -> Result, HermesError> { + self.chunk_id + .as_ref() + .map(|id| OrChunkId::chunk_id(id.clone())) + .ok_or(HermesError::NoChunkId) + } + + fn handle_resolution_error(&self, err: HermesError) -> Frame { + (self, err).into() + } +} + +impl Display for HermesRef { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "HermesRef") + } +} + +impl From<(&RawHermesFrame, HermesError)> for Frame { + fn from((frame, err): (&RawHermesFrame, HermesError)) -> Self { + let mut res = Self { + raw_id: FrameId::placeholder(), + mangled_name: frame.fn_name.clone(), + line: Some(1), // Hermes frames are 1-indexed and always 1 + column: Some(frame.column), + source: Some(frame.source.clone()), + in_app: frame.meta.in_app, + resolved_name: None, + lang: "hermes-js".to_string(), + resolved: false, + resolve_failure: Some(err.to_string()), + synthetic: frame.meta.synthetic, + junk_drawer: None, + context: None, + release: None, + }; + + add_raw_to_junk(&mut res, frame); + + res + } +} + +impl From<(&RawHermesFrame, Token<'_>, Option)> for Frame { + fn from((frame, token, resolved_name): (&RawHermesFrame, Token<'_>, Option)) -> Self { + let source = token.get_source().map(|s| sanitize_string(s.to_string())); + let in_app = source + .as_ref() + .map(|s| !s.contains("node_modules")) + .unwrap_or(frame.meta.in_app); + + let mut res = Self { + raw_id: FrameId::placeholder(), + mangled_name: frame.fn_name.clone(), + line: Some(token.get_src_line()), + column: Some(token.get_src_col()), + source, + in_app, + resolved_name, + lang: "hermes-js".to_string(), + resolved: true, + resolve_failure: None, + synthetic: frame.meta.synthetic, + junk_drawer: None, + context: get_token_context(&token, token.get_src_line() as usize), + release: None, + }; + + add_raw_to_junk(&mut res, frame); + + res + } +} + +#[cfg(test)] +mod test { + use std::sync::Arc; + + use chrono::Utc; + use mockall::predicate; + use posthog_symbol_data::write_symbol_data; + use regex::Regex; + use sqlx::PgPool; + use uuid::Uuid; + + use crate::{ + config::Config, + frames::RawFrame, + langs::{hermes::RawHermesFrame, CommonFrameMetadata}, + symbol_store::{ + chunk_id::ChunkIdFetcher, hermesmap::HermesMapProvider, saving::SymbolSetRecord, + sourcemap::SourcemapProvider, Catalog, S3Client, + }, + }; + + const HERMES_MAP: &str = include_str!("../../tests/static/hermes/composed_example.map"); + const RAW_STACK: &str = include_str!("../../tests/static/hermes/raw_stack.txt"); + + #[sqlx::test(migrations = "./tests/test_migrations")] + async fn test_hermes_resolution(db: PgPool) { + let team_id = 1; + let mut config = Config::init_with_defaults().unwrap(); + config.object_storage_bucket = "test-bucket".to_string(); + + let chunk_id = Uuid::now_v7().to_string(); + + let mut record = SymbolSetRecord { + id: Uuid::now_v7(), + team_id, + set_ref: chunk_id.clone(), + storage_ptr: Some(chunk_id.clone()), + failure_reason: None, + created_at: Utc::now(), + content_hash: Some("fake-hash".to_string()), + last_used: Some(Utc::now()), + }; + + record.save(&db).await.unwrap(); + + let mut client = S3Client::default(); + + client + .expect_get() + .with( + predicate::eq(config.object_storage_bucket.clone()), + predicate::eq(chunk_id.clone()), // We set the chunk id as the storage ptr above, in production it will be a different value with a prefix + ) + .returning(|_, _| Ok(get_symbol_data_bytes())); + + let client = Arc::new(client); + + let hmp = HermesMapProvider {}; + let hmp = ChunkIdFetcher::new( + hmp, + client.clone(), + db.clone(), + config.object_storage_bucket.clone(), + ); + + let smp = SourcemapProvider::new(&config); + let smp = ChunkIdFetcher::new( + smp, + client.clone(), + db.clone(), + config.object_storage_bucket.clone(), + ); + + let c = Catalog::new(smp, hmp); + + for (raw_frame, expected_name) in get_frames(chunk_id) { + let res = raw_frame.resolve(team_id, &c).await.unwrap(); + println!("GOT FRAME: {}", serde_json::to_string_pretty(&res).unwrap()); + assert!(res.resolved); + assert_eq!(res.resolved_name, expected_name) + } + } + + fn get_frames(chunk_id: String) -> Vec<(RawFrame, Option)> { + let frame_regex = Regex::new(r"at\s+(\S+)\s+\(address at\s+[^:]+:(\d+):(\d+)\)").unwrap(); + let mut frames = Vec::new(); + + let expected_names = [ + Some("c"), + Some("b"), + Some("a"), + Some("loadModuleImplementation"), + Some("guardedLoadModule"), + Some("metroRequire"), + None, + ]; + + for (captures, expected) in frame_regex + .captures_iter(RAW_STACK) + .zip(expected_names.iter()) + { + let name = &captures[1]; + let _line: u32 = captures[2].parse().unwrap(); + let col: u32 = captures[3].parse().unwrap(); + + let frame = RawHermesFrame { + column: col, + source: String::new(), + fn_name: name.to_string(), + chunk_id: Some(chunk_id.clone()), + meta: CommonFrameMetadata::default(), + }; + + frames.push((RawFrame::Hermes(frame), expected.map(String::from))); + } + + frames + } + + fn get_symbol_data_bytes() -> Vec { + write_symbol_data(posthog_symbol_data::HermesMap { + sourcemap: HERMES_MAP.to_string(), + }) + .unwrap() + } +} diff --git a/rust/cymbal/src/langs/js.rs b/rust/cymbal/src/langs/js.rs index 5c97439f3b..34a5ff2517 100644 --- a/rust/cymbal/src/langs/js.rs +++ b/rust/cymbal/src/langs/js.rs @@ -4,15 +4,15 @@ use sha2::{Digest, Sha512}; use symbolic::sourcemapcache::{ScopeLookupResult, SourceLocation, SourcePosition}; use crate::{ - error::{Error, FrameError, JsResolveErr, UnhandledError}, - frames::Frame, + error::{FrameError, JsResolveErr, ResolveError, UnhandledError}, + frames::{Frame, FrameId}, langs::CommonFrameMetadata, metric_consts::{FRAME_NOT_RESOLVED, FRAME_RESOLVED}, sanitize_string, symbol_store::{chunk_id::OrChunkId, sourcemap::OwnedSourceMapCache, SymbolCatalog}, }; -use super::utils::{add_raw_to_junk, get_context}; +use super::utils::{add_raw_to_junk, get_sourcelocation_context}; // A minifed JS stack frame. Just the minimal information needed to lookup some // sourcemap for it and produce a "real" stack frame. @@ -45,18 +45,21 @@ impl RawJSFrame { { match self.resolve_impl(team_id, catalog).await { Ok(frame) => Ok(frame), - Err(Error::ResolutionError(FrameError::JavaScript(e))) => { + Err(ResolveError::ResolutionError(FrameError::JavaScript(e))) => { Ok(self.handle_resolution_error(e)) } - Err(Error::ResolutionError(FrameError::MissingChunkIdData(chunk_id))) => { + Err(ResolveError::ResolutionError(FrameError::MissingChunkIdData(chunk_id))) => { Ok(self.handle_resolution_error(JsResolveErr::NoSourcemapUploaded(chunk_id))) } - Err(Error::UnhandledError(e)) => Err(e), - Err(Error::EventError(_)) => unreachable!(), + Err(ResolveError::ResolutionError(FrameError::Hermes(e))) => { + // TODO - should be unreachable, specialize ResolveError to encode that + Err(UnhandledError::from(FrameError::from(e))) + } + Err(ResolveError::UnhandledError(e)) => Err(e), } } - async fn resolve_impl(&self, team_id: i32, catalog: &C) -> Result + async fn resolve_impl(&self, team_id: i32, catalog: &C) -> Result where C: SymbolCatalog, OwnedSourceMapCache>, { @@ -176,28 +179,29 @@ impl From<(&RawJSFrame, SourceLocation<'_>)> for Frame { ScopeLookupResult::Unknown => None, }; - let source = token.file().and_then(|f| f.name()).map(|s| s.to_string()); + let source = token + .file() + .and_then(|f| f.name()) + .map(|s| sanitize_string(s.to_string())); let in_app = source + .as_ref() .map(|s| !s.contains("node_modules")) .unwrap_or(raw_frame.meta.in_app); let mut res = Self { - raw_id: String::new(), // We use placeholders here, as they're overriden at the RawFrame level + raw_id: FrameId::placeholder(), // We use placeholders here, as they're overriden at the RawFrame level mangled_name: raw_frame.fn_name.clone(), line: Some(token.line()), column: Some(token.column()), - source: token - .file() - .and_then(|f| f.name()) - .map(|s| sanitize_string(s.to_string())), + source, in_app, resolved_name, lang: "javascript".to_string(), resolved: true, resolve_failure: None, junk_drawer: None, - context: get_context(&token), + context: get_sourcelocation_context(&token), release: None, synthetic: raw_frame.meta.synthetic, }; @@ -229,7 +233,7 @@ impl From<(&RawJSFrame, JsResolveErr, &FrameLocation)> for Frame { }; let mut res = Self { - raw_id: String::new(), + raw_id: FrameId::placeholder(), mangled_name: raw_frame.fn_name.clone(), line: Some(location.line), column: Some(location.column), @@ -270,7 +274,7 @@ impl From<&RawJSFrame> for Frame { let in_app = raw_frame.meta.in_app && !is_anon; let mut res = Self { - raw_id: String::new(), + raw_id: FrameId::placeholder(), mangled_name: raw_frame.fn_name.clone(), line: None, column: None, diff --git a/rust/cymbal/src/langs/mod.rs b/rust/cymbal/src/langs/mod.rs index d8af970dc4..223bb5cf5e 100644 --- a/rust/cymbal/src/langs/mod.rs +++ b/rust/cymbal/src/langs/mod.rs @@ -2,6 +2,7 @@ use serde::{Deserialize, Serialize}; pub mod custom; pub mod go; +pub mod hermes; pub mod js; pub mod node; pub mod python; diff --git a/rust/cymbal/src/langs/node.rs b/rust/cymbal/src/langs/node.rs index 2ea32e6ed3..a8e931b430 100644 --- a/rust/cymbal/src/langs/node.rs +++ b/rust/cymbal/src/langs/node.rs @@ -1,6 +1,6 @@ use crate::{ - error::{Error, FrameError, JsResolveErr, UnhandledError}, - frames::{Context, ContextLine, Frame}, + error::{FrameError, JsResolveErr, ResolveError, UnhandledError}, + frames::{Context, ContextLine, Frame, FrameId}, langs::CommonFrameMetadata, metric_consts::{FRAME_NOT_RESOLVED, FRAME_RESOLVED}, sanitize_string, @@ -13,7 +13,7 @@ use symbolic::sourcemapcache::{ScopeLookupResult, SourceLocation, SourcePosition use super::{ js::FrameLocation, - utils::{add_raw_to_junk, get_context}, + utils::{add_raw_to_junk, get_sourcelocation_context}, }; #[derive(Debug, Clone, Deserialize, Serialize)] @@ -45,12 +45,15 @@ impl RawNodeFrame { match self.resolve_impl(team_id, catalog, chunk_id.clone()).await { Ok(frame) => Ok(frame), - Err(Error::ResolutionError(FrameError::JavaScript(e))) => Ok((self, e).into()), - Err(Error::ResolutionError(FrameError::MissingChunkIdData(chunk_id))) => { + Err(ResolveError::ResolutionError(FrameError::JavaScript(e))) => Ok((self, e).into()), + Err(ResolveError::ResolutionError(FrameError::MissingChunkIdData(chunk_id))) => { Ok((self, JsResolveErr::NoSourcemapUploaded(chunk_id)).into()) } - Err(Error::UnhandledError(e)) => Err(e), - Err(Error::EventError(_)) => unreachable!(), + Err(ResolveError::ResolutionError(FrameError::Hermes(e))) => { + // TODO - should be unreachable, specialize Error to encode that + Err(UnhandledError::from(FrameError::from(e))) + } + Err(ResolveError::UnhandledError(e)) => Err(e), } } @@ -59,7 +62,7 @@ impl RawNodeFrame { team_id: i32, catalog: &C, chunk_id: String, - ) -> Result + ) -> Result where C: SymbolCatalog, OwnedSourceMapCache>, { @@ -146,7 +149,7 @@ impl RawNodeFrame { impl From<&RawNodeFrame> for Frame { fn from(raw: &RawNodeFrame) -> Self { Frame { - raw_id: String::new(), + raw_id: FrameId::placeholder(), mangled_name: raw.function.clone(), line: raw.lineno, column: None, @@ -184,7 +187,7 @@ impl From<(&RawNodeFrame, SourceLocation<'_>)> for Frame { .unwrap_or(raw_frame.meta.in_app); let mut res = Self { - raw_id: String::new(), // We use placeholders here, as they're overriden at the RawFrame level + raw_id: FrameId::placeholder(), mangled_name: raw_frame.function.clone(), line: Some(location.line()), column: Some(location.column()), @@ -198,7 +201,7 @@ impl From<(&RawNodeFrame, SourceLocation<'_>)> for Frame { resolved: true, resolve_failure: None, junk_drawer: None, - context: get_context(&location), + context: get_sourcelocation_context(&location), release: None, synthetic: raw_frame.meta.synthetic, }; @@ -226,7 +229,7 @@ impl From<(&RawNodeFrame, JsResolveErr)> for Frame { }; let mut res = Self { - raw_id: String::new(), + raw_id: FrameId::placeholder(), mangled_name: raw_frame.function.clone(), line: raw_frame.lineno, column: raw_frame.colno, diff --git a/rust/cymbal/src/langs/python.rs b/rust/cymbal/src/langs/python.rs index e4d2a5f11a..3f51f724f2 100644 --- a/rust/cymbal/src/langs/python.rs +++ b/rust/cymbal/src/langs/python.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha512}; use crate::{ - frames::{Context, ContextLine, Frame}, + frames::{Context, ContextLine, Frame, FrameId}, langs::CommonFrameMetadata, }; @@ -79,7 +79,7 @@ impl RawPythonFrame { impl From<&RawPythonFrame> for Frame { fn from(raw: &RawPythonFrame) -> Self { Frame { - raw_id: String::new(), + raw_id: FrameId::placeholder(), mangled_name: raw.function.clone(), line: raw.lineno, column: None, diff --git a/rust/cymbal/src/langs/utils.rs b/rust/cymbal/src/langs/utils.rs index e620d6ec32..45e71dcc83 100644 --- a/rust/cymbal/src/langs/utils.rs +++ b/rust/cymbal/src/langs/utils.rs @@ -1,6 +1,7 @@ use std::sync::atomic::Ordering; use serde::Serialize; +use sourcemap::Token; use symbolic::sourcemapcache::SourceLocation; use crate::{ @@ -13,19 +14,30 @@ pub fn add_raw_to_junk(frame: &mut Frame, raw: &T) { frame.add_junk("raw_frame", raw.clone()).unwrap(); } -pub fn get_context(token: &SourceLocation) -> Option { +pub fn get_sourcelocation_context(token: &SourceLocation) -> Option { let file = token.file()?; let token_line_num = token.line(); let src = file.source()?; let line_limit = FRAME_CONTEXT_LINES.load(Ordering::Relaxed); - get_context_lines(src, token_line_num as usize, line_limit) + get_context_lines(src.lines(), token_line_num as usize, line_limit) } -fn get_context_lines(src: &str, line: usize, context_len: usize) -> Option { +pub fn get_token_context(token: &Token<'_>, line: usize) -> Option { + let src = token.get_source_view()?; + let lines = src.lines(); + + let line_limit = FRAME_CONTEXT_LINES.load(Ordering::Relaxed); + get_context_lines(lines, line, line_limit) +} + +fn get_context_lines<'a, L>(lines: L, line: usize, context_len: usize) -> Option +where + L: Iterator, +{ let start = line.saturating_sub(context_len).saturating_sub(1); - let mut lines = src.lines().enumerate().skip(start); + let mut lines = lines.enumerate().skip(start); let before = (&mut lines) .take(line - start) .map(|(number, line)| ContextLine::new(number as u32, line)) diff --git a/rust/cymbal/src/pipeline/exception/stack_processing.rs b/rust/cymbal/src/pipeline/exception/stack_processing.rs index f55c05786c..d60d66d298 100644 --- a/rust/cymbal/src/pipeline/exception/stack_processing.rs +++ b/rust/cymbal/src/pipeline/exception/stack_processing.rs @@ -6,6 +6,7 @@ use crate::{ app_context::AppContext, error::{PipelineResult, UnhandledError}, fingerprinting::resolve_fingerprint, + frames::FrameId, metric_consts::{FINGERPRINT_BATCH_TIME, FRAME_BATCH_TIME, FRAME_RESOLUTION}, types::{FingerprintedErrProps, RawErrProps, Stacktrace}, }; @@ -43,7 +44,7 @@ pub async fn do_stack_processing( }; for frame in frames.iter() { - let id = frame.frame_id(); + let id = frame.frame_id(team_id); if frame_resolve_handles.contains_key(&id) { // We've already spawned a task to resolve this frame, so we don't need to do it again. continue; @@ -88,14 +89,20 @@ pub async fn do_stack_processing( let fingerprint_timer = common_metrics::timing_guard(FINGERPRINT_BATCH_TIME, &[]); let mut indexed_fingerprinted = Vec::new(); for (index, mut props) in indexed_props.into_iter() { + let team_id = events[index] + .as_ref() + .expect("no events have been dropped since indexed-property gathering") + .team_id; + for exception in props.exception_list.iter_mut() { exception.stack = exception .stack .take() .map(|s| { - s.resolve(&frame_lookup_table).ok_or(UnhandledError::Other( - "Stacktrace::resolve returned None".to_string(), - )) + s.resolve(team_id, &frame_lookup_table) + .ok_or(UnhandledError::Other( + "Stacktrace::resolve returned None".to_string(), + )) }) .transpose() .map_err(|e| (index, e))? @@ -124,12 +131,12 @@ pub async fn do_stack_processing( Ok(indexed_fingerprinted) } -fn find_index_with_matching_frame_id(id: &str, list: &[(usize, RawErrProps)]) -> usize { +fn find_index_with_matching_frame_id(id: &FrameId, list: &[(usize, RawErrProps)]) -> usize { for (index, props) in list.iter() { for exception in props.exception_list.iter() { if let Some(Stacktrace::Raw { frames }) = &exception.stack { for frame in frames { - if frame.frame_id() == id { + if frame.frame_id(id.team_id) == *id { return *index; } } diff --git a/rust/cymbal/src/symbol_store/chunk_id.rs b/rust/cymbal/src/symbol_store/chunk_id.rs index 8c5a9254b3..86ab6a0c02 100644 --- a/rust/cymbal/src/symbol_store/chunk_id.rs +++ b/rust/cymbal/src/symbol_store/chunk_id.rs @@ -204,11 +204,12 @@ mod test { use crate::{ config::Config, - error::Error, + error::ResolveError, frames::RawFrame, langs::js::RawJSFrame, symbol_store::{ chunk_id::{ChunkIdFetcher, OrChunkId}, + hermesmap::HermesMapProvider, saving::SymbolSetRecord, sourcemap::{OwnedSourceMapCache, SourcemapProvider}, Catalog, Provider, S3Client, @@ -226,7 +227,7 @@ mod test { impl Provider for UnimplementedProvider { type Ref = Url; type Set = OwnedSourceMapCache; - type Err = Error; + type Err = ResolveError; async fn lookup(&self, _team_id: i32, _r: Self::Ref) -> Result, Self::Err> { unimplemented!() @@ -331,10 +332,21 @@ mod test { let client = Arc::new(client); let smp = SourcemapProvider::new(&config); - let chunk_id_fetcher = - ChunkIdFetcher::new(smp, client, db.clone(), config.object_storage_bucket); + let chunk_id_fetcher = ChunkIdFetcher::new( + smp, + client.clone(), + db.clone(), + config.object_storage_bucket.clone(), + ); - let catalog = Catalog::new(chunk_id_fetcher); + let hermes_map_fetcher = ChunkIdFetcher::new( + HermesMapProvider {}, + client.clone(), + db.clone(), + config.object_storage_bucket, + ); + + let catalog = Catalog::new(chunk_id_fetcher, hermes_map_fetcher); let mut frame = get_example_frame(); frame.chunk_id = Some(chunk_id.clone()); diff --git a/rust/cymbal/src/symbol_store/hermesmap.rs b/rust/cymbal/src/symbol_store/hermesmap.rs new file mode 100644 index 0000000000..4cc74421e1 --- /dev/null +++ b/rust/cymbal/src/symbol_store/hermesmap.rs @@ -0,0 +1,46 @@ +use axum::async_trait; +use posthog_symbol_data::{read_symbol_data, HermesMap}; + +use crate::{ + error::{HermesError, ResolveError}, + langs::hermes::HermesRef, + symbol_store::{Fetcher, Parser}, +}; + +pub struct ParsedHermesMap { + pub map: sourcemap::SourceMapHermes, +} + +pub struct HermesMapProvider {} + +#[async_trait] +impl Fetcher for HermesMapProvider { + type Ref = HermesRef; + type Fetched = Vec; + type Err = ResolveError; + + async fn fetch(&self, _: i32, _: HermesRef) -> Result, Self::Err> { + unreachable!("HermesRef is impossible to construct, so cannot be passed") + } +} + +#[async_trait] +impl Parser for HermesMapProvider { + type Source = Vec; + type Set = ParsedHermesMap; + type Err = ResolveError; + + async fn parse(&self, source: Vec) -> Result { + let map: HermesMap = read_symbol_data(source).map_err(HermesError::DataError)?; + Ok(ParsedHermesMap::parse(map)?) + } +} + +impl ParsedHermesMap { + pub fn parse(map: HermesMap) -> Result { + Ok(ParsedHermesMap { + map: sourcemap::SourceMapHermes::from_reader(map.sourcemap.as_bytes()) + .map_err(|e| HermesError::InvalidMap(e.to_string()))?, + }) + } +} diff --git a/rust/cymbal/src/symbol_store/mod.rs b/rust/cymbal/src/symbol_store/mod.rs index 83107a9a23..5e019e98c9 100644 --- a/rust/cymbal/src/symbol_store/mod.rs +++ b/rust/cymbal/src/symbol_store/mod.rs @@ -6,11 +6,14 @@ use chunk_id::OrChunkId; use reqwest::Url; use sourcemap::OwnedSourceMapCache; -use crate::error::Error; +use crate::{ + error::ResolveError, langs::hermes::HermesRef, symbol_store::hermesmap::ParsedHermesMap, +}; pub mod caching; pub mod chunk_id; pub mod concurrency; +pub mod hermesmap; pub mod saving; pub mod sourcemap; @@ -25,7 +28,7 @@ pub trait SymbolCatalog: Send + Sync + 'static { // TODO - this doesn't actually need to return an Arc, but it does for now, because I'd // need to re-write the cache to let it return &'s instead, and the Arc overhead is not // going to be super critical right now - async fn lookup(&self, team_id: i32, r: Ref) -> Result, Error>; + async fn lookup(&self, team_id: i32, r: Ref) -> Result, ResolveError>; } #[async_trait] @@ -55,20 +58,27 @@ pub trait Provider: Send + Sync + 'static { pub struct Catalog { // "source map provider" - pub smp: Box, Set = OwnedSourceMapCache, Err = Error>>, + pub smp: Box, Set = OwnedSourceMapCache, Err = ResolveError>>, + // Hermes map provider + pub hmp: + Box, Set = ParsedHermesMap, Err = ResolveError>>, } impl Catalog { pub fn new( - smp: impl Provider, Set = OwnedSourceMapCache, Err = Error>, + smp: impl Provider, Set = OwnedSourceMapCache, Err = ResolveError>, + hmp: impl Provider, Set = ParsedHermesMap, Err = ResolveError>, ) -> Self { - Self { smp: Box::new(smp) } + Self { + smp: Box::new(smp), + hmp: Box::new(hmp), + } } } #[async_trait] impl SymbolCatalog for Catalog { - async fn lookup(&self, team_id: i32, r: Url) -> Result, Error> { + async fn lookup(&self, team_id: i32, r: Url) -> Result, ResolveError> { let r = OrChunkId::inner(r); self.smp.lookup(team_id, r).await } @@ -80,11 +90,22 @@ impl SymbolCatalog, OwnedSourceMapCache> for Catalog { &self, team_id: i32, r: OrChunkId, - ) -> Result, Error> { + ) -> Result, ResolveError> { self.smp.lookup(team_id, r).await } } +#[async_trait] +impl SymbolCatalog, ParsedHermesMap> for Catalog { + async fn lookup( + &self, + team_id: i32, + r: OrChunkId, + ) -> Result, ResolveError> { + self.hmp.lookup(team_id, r).await + } +} + #[async_trait] impl Provider for T where diff --git a/rust/cymbal/src/symbol_store/saving.rs b/rust/cymbal/src/symbol_store/saving.rs index fffeafe238..a2fa05524a 100644 --- a/rust/cymbal/src/symbol_store/saving.rs +++ b/rust/cymbal/src/symbol_store/saving.rs @@ -9,7 +9,7 @@ use tracing::{error, info}; use uuid::Uuid; use crate::{ - error::{Error, FrameError, UnhandledError}, + error::{FrameError, ResolveError, UnhandledError}, metric_consts::{ FRAME_RESOLUTION_RESULTS_DELETED, SAVED_SYMBOL_SET_ERROR_RETURNED, SAVED_SYMBOL_SET_LOADED, SAVE_SYMBOL_SET, SYMBOL_SET_DB_FETCHES, SYMBOL_SET_DB_HITS, SYMBOL_SET_DB_MISSES, @@ -153,7 +153,7 @@ impl Saving { #[async_trait] impl Fetcher for Saving where - F: Fetcher, Err = Error>, + F: Fetcher, Err = ResolveError>, F::Ref: ToString + Send, { type Ref = F::Ref; @@ -200,7 +200,7 @@ where // case, there is no saved data). let error = serde_json::from_str(&record.failure_reason.unwrap()) .map_err(UnhandledError::from)?; - return Err(Error::ResolutionError(error)); + return Err(ResolveError::ResolutionError(error)); } info!("Found stale symbol set error for {}", set_ref); // We last tried to get the symbol set more than a day ago, so we should try again @@ -220,10 +220,10 @@ where set_ref, }) } - Err(Error::ResolutionError(e)) => { + Err(ResolveError::ResolutionError(e)) => { // But if we failed to get any data, we save that fact self.save_no_data(team_id, set_ref, &e).await?; - return Err(Error::ResolutionError(e)); + return Err(ResolveError::ResolutionError(e)); } Err(e) => Err(e), // If some non-resolution error occurred, we just bail out } @@ -233,7 +233,7 @@ where #[async_trait] impl Parser for Saving where - F: Parser, Err = Error>, + F: Parser, Err = ResolveError>, F::Set: Send, { type Source = Saveable; @@ -251,11 +251,11 @@ where } return Ok(s); } - Err(Error::ResolutionError(e)) => { + Err(ResolveError::ResolutionError(e)) => { info!("Failed to parse symbol set data for {}", data.set_ref); // We save the no-data case here, to prevent us from fetching again for day self.save_no_data(data.team_id, data.set_ref, &e).await?; - return Err(Error::ResolutionError(e)); + return Err(ResolveError::ResolutionError(e)); } Err(e) => return Err(e), } diff --git a/rust/cymbal/src/symbol_store/sourcemap.rs b/rust/cymbal/src/symbol_store/sourcemap.rs index 52a1fd1901..7a26ebba25 100644 --- a/rust/cymbal/src/symbol_store/sourcemap.rs +++ b/rust/cymbal/src/symbol_store/sourcemap.rs @@ -9,7 +9,7 @@ use tracing::{info, warn}; use crate::{ config::Config, - error::{Error, JsResolveErr}, + error::{JsResolveErr, ResolveError}, metric_consts::{ SOURCEMAP_BODY_FETCHES, SOURCEMAP_BODY_REF_FOUND, SOURCEMAP_FETCH, SOURCEMAP_HEADER_FOUND, SOURCEMAP_NOT_FOUND, SOURCEMAP_PARSE, @@ -89,7 +89,7 @@ impl From for SourceMappingUrl { impl Fetcher for SourcemapProvider { type Ref = Url; type Fetched = Vec; - type Err = Error; + type Err = ResolveError; async fn fetch(&self, _: i32, r: Url) -> Result, Self::Err> { let start = common_metrics::timing_guard(SOURCEMAP_FETCH, &[]); let (smu, minified_source) = find_sourcemap_url(&self.client, r).await?; @@ -122,7 +122,7 @@ impl Fetcher for SourcemapProvider { impl Parser for SourcemapProvider { type Source = Vec; type Set = OwnedSourceMapCache; - type Err = Error; + type Err = ResolveError; async fn parse(&self, data: Vec) -> Result { let start = common_metrics::timing_guard(SOURCEMAP_PARSE, &[]); let sam: SourceAndMap = read_symbol_data(data).map_err(JsResolveErr::JSDataError)?; @@ -137,7 +137,7 @@ impl Parser for SourcemapProvider { async fn find_sourcemap_url( client: &reqwest::Client, start: Url, -) -> Result<(SourceMappingUrl, String), Error> { +) -> Result<(SourceMappingUrl, String), ResolveError> { info!("Fetching script source from {}", start); // If this request fails, we cannot resolve the frame, and hand this error to the frames @@ -244,7 +244,7 @@ async fn find_sourcemap_url( Err(JsResolveErr::NoSourcemap(final_url.to_string()).into()) } -async fn fetch_source_map(client: &reqwest::Client, url: Url) -> Result { +async fn fetch_source_map(client: &reqwest::Client, url: Url) -> Result { metrics::counter!(SOURCEMAP_BODY_FETCHES).increment(1); let res = client.get(url).send().await.map_err(JsResolveErr::from)?; res.error_for_status_ref().map_err(JsResolveErr::from)?; @@ -264,8 +264,8 @@ struct DataUrlContent { fn maybe_as_data_url( source_url: &str, data: &str, - parse_fn: impl FnOnce(DataUrlContent) -> Result, -) -> Result, Error> { + parse_fn: impl FnOnce(DataUrlContent) -> Result, +) -> Result, ResolveError> { if !data.starts_with(DATA_SCHEME) { return Ok(None); } @@ -343,7 +343,7 @@ fn maybe_as_data_url( Ok(Some(parse_fn(content)?)) } -fn data_url_to_json_str(content: DataUrlContent) -> Result { +fn data_url_to_json_str(content: DataUrlContent) -> Result { if !content.mime_type.starts_with("application/json") { return Err(JsResolveErr::InvalidDataUrl( "data".into(), @@ -362,7 +362,7 @@ fn data_url_to_json_str(content: DataUrlContent) -> Result { Ok(data.to_string()) } -fn assert_is_sourcemap(data: &str) -> Result<(), Error> { +fn assert_is_sourcemap(data: &str) -> Result<(), ResolveError> { if let Err(e) = sourcemap::decode_slice(data.as_bytes()) { return Err(JsResolveErr::InvalidSourceMap(e.to_string()).into()); } diff --git a/rust/cymbal/src/types/mod.rs b/rust/cymbal/src/types/mod.rs index a93d3c590a..e20f36ce96 100644 --- a/rust/cymbal/src/types/mod.rs +++ b/rust/cymbal/src/types/mod.rs @@ -10,7 +10,7 @@ use crate::fingerprinting::{ Fingerprint, FingerprintBuilder, FingerprintComponent, FingerprintRecordPart, }; use crate::frames::releases::{ReleaseInfo, ReleaseRecord}; -use crate::frames::{Frame, RawFrame}; +use crate::frames::{Frame, FrameId, RawFrame}; #[derive(Debug, Deserialize, Serialize, Clone)] pub struct Mechanism { @@ -320,14 +320,14 @@ impl OutputErrProps { } impl Stacktrace { - pub fn resolve(&self, lookup_table: &HashMap) -> Option { + pub fn resolve(&self, team_id: i32, lookup_table: &HashMap) -> Option { let Stacktrace::Raw { frames } = self else { return Some(self.clone()); }; let mut resolved_frames = Vec::with_capacity(frames.len()); for frame in frames { - match lookup_table.get(&frame.frame_id()) { + match lookup_table.get(&frame.frame_id(team_id)) { Some(resolved_frame) => resolved_frames.push(resolved_frame.clone()), None => return None, } diff --git a/rust/cymbal/tests/resolve.rs b/rust/cymbal/tests/resolve.rs index d35c006c8f..1e08930495 100644 --- a/rust/cymbal/tests/resolve.rs +++ b/rust/cymbal/tests/resolve.rs @@ -9,6 +9,7 @@ use cymbal::{ symbol_store::{ caching::{Caching, SymbolSetCache}, chunk_id::OrChunkId, + hermesmap::HermesMapProvider, sourcemap::{OwnedSourceMapCache, SourcemapProvider}, Catalog, Fetcher, Parser, }, @@ -116,8 +117,11 @@ async fn end_to_end_resolver_test() { ))); let wrapped = NoOpChunkIdFetcher { inner: sourcemap }; + let hmp = NoOpChunkIdFetcher { + inner: HermesMapProvider {}, + }; - let catalog = Catalog::new(Caching::new(wrapped, cache)); + let catalog = Catalog::new(Caching::new(wrapped, cache), hmp); let mut resolved_frames = Vec::new(); for frame in test_stack { diff --git a/rust/cymbal/tests/static/hermes/composed_example.map b/rust/cymbal/tests/static/hermes/composed_example.map new file mode 100644 index 0000000000..54f8d79824 --- /dev/null +++ b/rust/cymbal/tests/static/hermes/composed_example.map @@ -0,0 +1 @@ +{"version":3,"sources":["/Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/metro-runtime/src/polyfills/require.js","/Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/@react-native/js-polyfills/console.js","/Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/@react-native/js-polyfills/error-guard.js","/Users/olly/Documents/work/test-rn/HermesMapsDemo/mini-entry.js"],"names":["window","global","globalThis","__METRO_GLOBAL_PREFIX__","Map","modules","EMPTY","module","guardedLoadModule","Error","metroRequire","exports","hasOwnProperty","inGuard","loadModuleImplementation","ID_MASK_SHIFT","moduleId","LOCAL_ID_MASK","value","moduleDefinersBySegmentID","definingSegmentByModuleID","segmentId","unpackModuleId","unknownModuleError","metroImportDefault","metroImportAll","Object","console","originalConsole","Array","level","LOG_LEVELS","groupStack","groupFormat","inspect","element","INDEX_COLUMN_NAME","String","cellValue","Set","i","space","repeat","columnWidths","cell","columnSet","rows","j","formatCellValue","stringRows","Math","msg","GROUP_OPEN","GROUP_PAD","GROUP_CLOSE","stylizeNoColor","formatValue","hash","formatPrimitive","arrayToHash","isError","isFunction","isRegExp","isDate","isArray","RegExp","Date","formatError","formatArray","reduceToSingleString","braces","formatProperty","ctx","recurseTimes","visibleKeys","array","isUndefined","isString","isNumber","isBoolean","isNull","JSON","output","name","base","numLinesEst","prev","arg","isObject","objectToString","e","_key","originalConsoleError","stringifySafe","log","_globalHandler","_inGuard","ErrorUtils","fun","context","guardName","c"],"mappings":"A,0B,M,K,G,M,K,I,E,Q,I,Q,M,M,K,G,E,U,M,K,K,K,G,E,M,K,K,K,K,K,O,MA+UC,KAAA,OAAA,IAAA,KAAA,GAAA,IAAA,KAAA,MAAA,IAAAA,MAAA,EAAAC,MAAA,EAAAC,M,OAAA,KCsXA,KAAA,GAAA,IAAA,KAAA,GAAA,IAAA,KAAA,MAAA,IAAAF,MAAA,EAAAC,MAAA,EAAAC,M,KAAA,KC7kB8B,KAAA,GAAA,IAAA,KAAA,GAAA,IAAA,KAAA,GAAA,IAAAF,MAAA,EAAAC,MAAA,EAAAC,M,KAAA,K,M,O,I,O,M,K,E,K,I,K,K,I,K,I,K,I,K,I,K,I,K,I,K,IFtHrB,QACAC,KAAH,MAAA,aAAA,M,KAAgC,IAC7B,M,KACc,QACL,IAAR,IACG,EAAH,IAEgB,EAAL,KAAA,IAuHI,MA6BJ,MACC,KAAH,MAUO,KAAH,QAQb,OAgBQ,UACA,IASQ,M,KAIF,MACS,IAAH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F,MAAK,KAAA,WAAA,IAAA,IAAf,EACA4F,GAAAA,MAAC,IAAI","sourcesContent":["\"use strict\";\n\nglobal.__r = metroRequire;\nglobal[`${__METRO_GLOBAL_PREFIX__}__d`] = define;\nglobal.__c = clear;\nglobal.__registerSegment = registerSegment;\nvar modules = clear();\nconst EMPTY = {};\nconst CYCLE_DETECTED = {};\nconst { hasOwnProperty } = {};\nif (__DEV__) {\n global.$RefreshReg$ = global.$RefreshReg$ ?? (() => {});\n global.$RefreshSig$ = global.$RefreshSig$ ?? (() => (type) => type);\n}\nfunction clear() {\n modules = new Map();\n return modules;\n}\nif (__DEV__) {\n var verboseNamesToModuleIds = new Map();\n var getModuleIdForVerboseName = (verboseName) => {\n const moduleId = verboseNamesToModuleIds.get(verboseName);\n if (moduleId == null) {\n throw new Error(`Unknown named module: \"${verboseName}\"`);\n }\n return moduleId;\n };\n var initializingModuleIds = [];\n}\nfunction define(factory, moduleId, dependencyMap) {\n if (modules.has(moduleId)) {\n if (__DEV__) {\n const inverseDependencies = arguments[4];\n if (inverseDependencies) {\n global.__accept(moduleId, factory, dependencyMap, inverseDependencies);\n }\n }\n return;\n }\n const mod = {\n dependencyMap,\n factory,\n hasError: false,\n importedAll: EMPTY,\n importedDefault: EMPTY,\n isInitialized: false,\n publicModule: {\n exports: {},\n },\n };\n modules.set(moduleId, mod);\n if (__DEV__) {\n mod.hot = createHotReloadingObject();\n const verboseName = arguments[3];\n if (verboseName) {\n mod.verboseName = verboseName;\n verboseNamesToModuleIds.set(verboseName, moduleId);\n }\n }\n}\nfunction metroRequire(moduleId, maybeNameForDev) {\n if (moduleId === null) {\n if (__DEV__ && typeof maybeNameForDev === \"string\") {\n throw new Error(\"Cannot find module '\" + maybeNameForDev + \"'\");\n }\n throw new Error(\"Cannot find module\");\n }\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n console.warn(\n `Requiring module \"${verboseName}\" by name is only supported for ` +\n \"debugging purposes and will BREAK IN PRODUCTION!\"\n );\n }\n const moduleIdReallyIsNumber = moduleId;\n if (__DEV__) {\n const initializingIndex = initializingModuleIds.indexOf(\n moduleIdReallyIsNumber\n );\n if (initializingIndex !== -1) {\n const cycle = initializingModuleIds\n .slice(initializingIndex)\n .map((id) => modules.get(id)?.verboseName ?? \"[unknown]\");\n if (shouldPrintRequireCycle(cycle)) {\n cycle.push(cycle[0]);\n console.warn(\n `Require cycle: ${cycle.join(\" -> \")}\\n\\n` +\n \"Require cycles are allowed, but can result in uninitialized values. \" +\n \"Consider refactoring to remove the need for a cycle.\"\n );\n }\n }\n }\n const module = modules.get(moduleIdReallyIsNumber);\n return module && module.isInitialized\n ? module.publicModule.exports\n : guardedLoadModule(moduleIdReallyIsNumber, module);\n}\nfunction shouldPrintRequireCycle(modules) {\n const regExps =\n global[__METRO_GLOBAL_PREFIX__ + \"__requireCycleIgnorePatterns\"];\n if (!Array.isArray(regExps)) {\n return true;\n }\n const isIgnored = (module) =>\n module != null && regExps.some((regExp) => regExp.test(module));\n return modules.every((module) => !isIgnored(module));\n}\nfunction metroImportDefault(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (\n maybeInitializedModule &&\n maybeInitializedModule.importedDefault !== EMPTY\n ) {\n return maybeInitializedModule.importedDefault;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n const importedDefault =\n exports && exports.__esModule ? exports.default : exports;\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedDefault = importedDefault);\n}\nmetroRequire.importDefault = metroImportDefault;\nfunction metroImportAll(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (maybeInitializedModule && maybeInitializedModule.importedAll !== EMPTY) {\n return maybeInitializedModule.importedAll;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n let importedAll;\n if (exports && exports.__esModule) {\n importedAll = exports;\n } else {\n importedAll = {};\n if (exports) {\n for (const key in exports) {\n if (hasOwnProperty.call(exports, key)) {\n importedAll[key] = exports[key];\n }\n }\n }\n importedAll.default = exports;\n }\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedAll = importedAll);\n}\nmetroRequire.importAll = metroImportAll;\nmetroRequire.context = function fallbackRequireContext() {\n if (__DEV__) {\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\\nThis can be enabled by setting the `transformer.unstable_allowRequireContext` property to `true` in your Metro configuration.\"\n );\n }\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\"\n );\n};\nmetroRequire.resolveWeak = function fallbackRequireResolveWeak() {\n if (__DEV__) {\n throw new Error(\n \"require.resolveWeak cannot be called dynamically. Ensure you are using the same version of `metro` and `metro-runtime`.\"\n );\n }\n throw new Error(\"require.resolveWeak cannot be called dynamically.\");\n};\nlet inGuard = false;\nfunction guardedLoadModule(moduleId, module) {\n if (!inGuard && global.ErrorUtils) {\n inGuard = true;\n let returnValue;\n try {\n returnValue = loadModuleImplementation(moduleId, module);\n } catch (e) {\n global.ErrorUtils.reportFatalError(e);\n }\n inGuard = false;\n return returnValue;\n } else {\n return loadModuleImplementation(moduleId, module);\n }\n}\nconst ID_MASK_SHIFT = 16;\nconst LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT;\nfunction unpackModuleId(moduleId) {\n const segmentId = moduleId >>> ID_MASK_SHIFT;\n const localId = moduleId & LOCAL_ID_MASK;\n return {\n segmentId,\n localId,\n };\n}\nmetroRequire.unpackModuleId = unpackModuleId;\nfunction packModuleId(value) {\n return (value.segmentId << ID_MASK_SHIFT) + value.localId;\n}\nmetroRequire.packModuleId = packModuleId;\nconst moduleDefinersBySegmentID = [];\nconst definingSegmentByModuleID = new Map();\nfunction registerSegment(segmentId, moduleDefiner, moduleIds) {\n moduleDefinersBySegmentID[segmentId] = moduleDefiner;\n if (__DEV__) {\n if (segmentId === 0 && moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be null for main segment\"\n );\n }\n if (segmentId !== 0 && !moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be passed for segment #\" +\n segmentId\n );\n }\n }\n if (moduleIds) {\n moduleIds.forEach((moduleId) => {\n if (!modules.has(moduleId) && !definingSegmentByModuleID.has(moduleId)) {\n definingSegmentByModuleID.set(moduleId, segmentId);\n }\n });\n }\n}\nfunction loadModuleImplementation(moduleId, module) {\n if (!module && moduleDefinersBySegmentID.length > 0) {\n const segmentId = definingSegmentByModuleID.get(moduleId) ?? 0;\n const definer = moduleDefinersBySegmentID[segmentId];\n if (definer != null) {\n definer(moduleId);\n module = modules.get(moduleId);\n definingSegmentByModuleID.delete(moduleId);\n }\n }\n const nativeRequire = global.nativeRequire;\n if (!module && nativeRequire) {\n const { segmentId, localId } = unpackModuleId(moduleId);\n nativeRequire(localId, segmentId);\n module = modules.get(moduleId);\n }\n if (!module) {\n throw unknownModuleError(moduleId);\n }\n if (module.hasError) {\n throw module.error;\n }\n if (__DEV__) {\n var Systrace = requireSystrace();\n var Refresh = requireRefresh();\n }\n module.isInitialized = true;\n const { factory, dependencyMap } = module;\n if (__DEV__) {\n initializingModuleIds.push(moduleId);\n }\n try {\n if (__DEV__) {\n Systrace.beginEvent(\"JS_require_\" + (module.verboseName || moduleId));\n }\n const moduleObject = module.publicModule;\n if (__DEV__) {\n moduleObject.hot = module.hot;\n var prevRefreshReg = global.$RefreshReg$;\n var prevRefreshSig = global.$RefreshSig$;\n if (Refresh != null) {\n const RefreshRuntime = Refresh;\n global.$RefreshReg$ = (type, id) => {\n const prefixedModuleId =\n __METRO_GLOBAL_PREFIX__ + \" \" + moduleId + \" \" + id;\n RefreshRuntime.register(type, prefixedModuleId);\n };\n global.$RefreshSig$ =\n RefreshRuntime.createSignatureFunctionForTransform;\n }\n }\n moduleObject.id = moduleId;\n factory(\n global,\n metroRequire,\n metroImportDefault,\n metroImportAll,\n moduleObject,\n moduleObject.exports,\n dependencyMap\n );\n if (!__DEV__) {\n module.factory = undefined;\n module.dependencyMap = undefined;\n }\n if (__DEV__) {\n Systrace.endEvent();\n if (Refresh != null) {\n const prefixedModuleId = __METRO_GLOBAL_PREFIX__ + \" \" + moduleId;\n registerExportsForReactRefresh(\n Refresh,\n moduleObject.exports,\n prefixedModuleId\n );\n }\n }\n return moduleObject.exports;\n } catch (e) {\n module.hasError = true;\n module.error = e;\n module.isInitialized = false;\n module.publicModule.exports = undefined;\n throw e;\n } finally {\n if (__DEV__) {\n if (initializingModuleIds.pop() !== moduleId) {\n throw new Error(\n \"initializingModuleIds is corrupt; something is terribly wrong\"\n );\n }\n global.$RefreshReg$ = prevRefreshReg;\n global.$RefreshSig$ = prevRefreshSig;\n }\n }\n}\nfunction unknownModuleError(id) {\n let message = 'Requiring unknown module \"' + id + '\".';\n if (__DEV__) {\n message +=\n \" If you are sure the module exists, try restarting Metro. \" +\n \"You may also want to run `yarn` or `npm install`.\";\n }\n return Error(message);\n}\nif (__DEV__) {\n metroRequire.Systrace = {\n beginEvent: () => {},\n endEvent: () => {},\n };\n metroRequire.getModules = () => {\n return modules;\n };\n var createHotReloadingObject = function () {\n const hot = {\n _acceptCallback: null,\n _disposeCallback: null,\n _didAccept: false,\n accept: (callback) => {\n hot._didAccept = true;\n hot._acceptCallback = callback;\n },\n dispose: (callback) => {\n hot._disposeCallback = callback;\n },\n };\n return hot;\n };\n let reactRefreshTimeout = null;\n const metroHotUpdateModule = function (\n id,\n factory,\n dependencyMap,\n inverseDependencies\n ) {\n const mod = modules.get(id);\n if (!mod) {\n if (factory) {\n return;\n }\n throw unknownModuleError(id);\n }\n if (!mod.hasError && !mod.isInitialized) {\n mod.factory = factory;\n mod.dependencyMap = dependencyMap;\n return;\n }\n const Refresh = requireRefresh();\n const refreshBoundaryIDs = new Set();\n let didBailOut = false;\n let updatedModuleIDs;\n try {\n updatedModuleIDs = topologicalSort(\n [id],\n (pendingID) => {\n const pendingModule = modules.get(pendingID);\n if (pendingModule == null) {\n return [];\n }\n const pendingHot = pendingModule.hot;\n if (pendingHot == null) {\n throw new Error(\n \"[Refresh] Expected module.hot to always exist in DEV.\"\n );\n }\n let canAccept = pendingHot._didAccept;\n if (!canAccept && Refresh != null) {\n const isBoundary = isReactRefreshBoundary(\n Refresh,\n pendingModule.publicModule.exports\n );\n if (isBoundary) {\n canAccept = true;\n refreshBoundaryIDs.add(pendingID);\n }\n }\n if (canAccept) {\n return [];\n }\n const parentIDs = inverseDependencies[pendingID];\n if (parentIDs.length === 0) {\n performFullRefresh(\"No root boundary\", {\n source: mod,\n failed: pendingModule,\n });\n didBailOut = true;\n return [];\n }\n return parentIDs;\n },\n () => didBailOut\n ).reverse();\n } catch (e) {\n if (e === CYCLE_DETECTED) {\n performFullRefresh(\"Dependency cycle\", {\n source: mod,\n });\n return;\n }\n throw e;\n }\n if (didBailOut) {\n return;\n }\n const seenModuleIDs = new Set();\n for (let i = 0; i < updatedModuleIDs.length; i++) {\n const updatedID = updatedModuleIDs[i];\n if (seenModuleIDs.has(updatedID)) {\n continue;\n }\n seenModuleIDs.add(updatedID);\n const updatedMod = modules.get(updatedID);\n if (updatedMod == null) {\n throw new Error(\"[Refresh] Expected to find the updated module.\");\n }\n const prevExports = updatedMod.publicModule.exports;\n const didError = runUpdatedModule(\n updatedID,\n updatedID === id ? factory : undefined,\n updatedID === id ? dependencyMap : undefined\n );\n const nextExports = updatedMod.publicModule.exports;\n if (didError) {\n return;\n }\n if (refreshBoundaryIDs.has(updatedID)) {\n const isNoLongerABoundary = !isReactRefreshBoundary(\n Refresh,\n nextExports\n );\n const didInvalidate = shouldInvalidateReactRefreshBoundary(\n Refresh,\n prevExports,\n nextExports\n );\n if (isNoLongerABoundary || didInvalidate) {\n const parentIDs = inverseDependencies[updatedID];\n if (parentIDs.length === 0) {\n performFullRefresh(\n isNoLongerABoundary\n ? \"No longer a boundary\"\n : \"Invalidated boundary\",\n {\n source: mod,\n failed: updatedMod,\n }\n );\n return;\n }\n for (let j = 0; j < parentIDs.length; j++) {\n const parentID = parentIDs[j];\n const parentMod = modules.get(parentID);\n if (parentMod == null) {\n throw new Error(\"[Refresh] Expected to find parent module.\");\n }\n const canAcceptParent = isReactRefreshBoundary(\n Refresh,\n parentMod.publicModule.exports\n );\n if (canAcceptParent) {\n refreshBoundaryIDs.add(parentID);\n updatedModuleIDs.push(parentID);\n } else {\n performFullRefresh(\"Invalidated boundary\", {\n source: mod,\n failed: parentMod,\n });\n return;\n }\n }\n }\n }\n }\n if (Refresh != null) {\n if (reactRefreshTimeout == null) {\n reactRefreshTimeout = setTimeout(() => {\n reactRefreshTimeout = null;\n Refresh.performReactRefresh();\n }, 30);\n }\n }\n };\n const topologicalSort = function (roots, getEdges, earlyStop) {\n const result = [];\n const visited = new Set();\n const stack = new Set();\n function traverseDependentNodes(node) {\n if (stack.has(node)) {\n throw CYCLE_DETECTED;\n }\n if (visited.has(node)) {\n return;\n }\n visited.add(node);\n stack.add(node);\n const dependentNodes = getEdges(node);\n if (earlyStop(node)) {\n stack.delete(node);\n return;\n }\n dependentNodes.forEach((dependent) => {\n traverseDependentNodes(dependent);\n });\n stack.delete(node);\n result.push(node);\n }\n roots.forEach((root) => {\n traverseDependentNodes(root);\n });\n return result;\n };\n const runUpdatedModule = function (id, factory, dependencyMap) {\n const mod = modules.get(id);\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the module.\");\n }\n const { hot } = mod;\n if (!hot) {\n throw new Error(\"[Refresh] Expected module.hot to always exist in DEV.\");\n }\n if (hot._disposeCallback) {\n try {\n hot._disposeCallback();\n } catch (error) {\n console.error(\n `Error while calling dispose handler for module ${id}: `,\n error\n );\n }\n }\n if (factory) {\n mod.factory = factory;\n }\n if (dependencyMap) {\n mod.dependencyMap = dependencyMap;\n }\n mod.hasError = false;\n mod.error = undefined;\n mod.importedAll = EMPTY;\n mod.importedDefault = EMPTY;\n mod.isInitialized = false;\n const prevExports = mod.publicModule.exports;\n mod.publicModule.exports = {};\n hot._didAccept = false;\n hot._acceptCallback = null;\n hot._disposeCallback = null;\n metroRequire(id);\n if (mod.hasError) {\n mod.hasError = false;\n mod.isInitialized = true;\n mod.error = null;\n mod.publicModule.exports = prevExports;\n return true;\n }\n if (hot._acceptCallback) {\n try {\n hot._acceptCallback();\n } catch (error) {\n console.error(\n `Error while calling accept handler for module ${id}: `,\n error\n );\n }\n }\n return false;\n };\n const performFullRefresh = (reason, modules) => {\n if (\n typeof window !== \"undefined\" &&\n window.location != null &&\n typeof window.location.reload === \"function\"\n ) {\n window.location.reload();\n } else {\n const Refresh = requireRefresh();\n if (Refresh != null) {\n const sourceName = modules.source?.verboseName ?? \"unknown\";\n const failedName = modules.failed?.verboseName ?? \"unknown\";\n Refresh.performFullRefresh(\n `Fast Refresh - ${reason} <${sourceName}> <${failedName}>`\n );\n } else {\n console.warn(\"Could not reload the application after an edit.\");\n }\n }\n };\n var isReactRefreshBoundary = function (Refresh, moduleExports) {\n if (Refresh.isLikelyComponentType(moduleExports)) {\n return true;\n }\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return false;\n }\n let hasExports = false;\n let areAllExportsComponents = true;\n for (const key in moduleExports) {\n hasExports = true;\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n return false;\n }\n const exportValue = moduleExports[key];\n if (!Refresh.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n return hasExports && areAllExportsComponents;\n };\n var shouldInvalidateReactRefreshBoundary = (\n Refresh,\n prevExports,\n nextExports\n ) => {\n const prevSignature = getRefreshBoundarySignature(Refresh, prevExports);\n const nextSignature = getRefreshBoundarySignature(Refresh, nextExports);\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n for (let i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n return false;\n };\n var getRefreshBoundarySignature = (Refresh, moduleExports) => {\n const signature = [];\n signature.push(Refresh.getFamilyByType(moduleExports));\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return signature;\n }\n for (const key in moduleExports) {\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n signature.push(key);\n signature.push(Refresh.getFamilyByType(exportValue));\n }\n return signature;\n };\n var registerExportsForReactRefresh = (Refresh, moduleExports, moduleID) => {\n Refresh.register(moduleExports, moduleID + \" %exports%\");\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return;\n }\n for (const key in moduleExports) {\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n const typeID = moduleID + \" %exports% \" + key;\n Refresh.register(exportValue, typeID);\n }\n };\n global.__accept = metroHotUpdateModule;\n}\nif (__DEV__) {\n var requireSystrace = function requireSystrace() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__SYSTRACE\"] || metroRequire.Systrace\n );\n };\n var requireRefresh = function requireRefresh() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__ReactRefresh\"] ||\n global[global.__METRO_GLOBAL_PREFIX__ + \"__ReactRefresh\"] ||\n metroRequire.Refresh\n );\n };\n}\n","/**\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 *\n * @format\n * @noflow\n * @nolint\n * @polyfill\n */\n\n'use client';\n\n/* eslint-disable no-shadow, eqeqeq, no-unused-vars, no-control-regex */\n\n/**\n * This pipes all of our console logging functions to native logging so that\n * JavaScript errors in required modules show up in Xcode via NSLog.\n */\nconst inspect = (function () {\n // Copyright Joyent, Inc. and other Node contributors.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a\n // copy of this software and associated documentation files (the\n // \"Software\"), to deal in the Software without restriction, including\n // without limitation the rights to use, copy, modify, merge, publish,\n // distribute, sublicense, and/or sell copies of the Software, and to permit\n // persons to whom the Software is furnished to do so, subject to the\n // following conditions:\n //\n // The above copyright notice and this permission notice shall be included\n // in all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n // USE OR OTHER DEALINGS IN THE SOFTWARE.\n //\n // https://github.com/joyent/node/blob/master/lib/util.js\n\n function inspect(obj, opts) {\n var ctx = {\n seen: [],\n formatValueCalls: 0,\n stylize: stylizeNoColor,\n };\n return formatValue(ctx, obj, opts.depth);\n }\n\n function stylizeNoColor(str, styleType) {\n return str;\n }\n\n function arrayToHash(array) {\n var hash = {};\n\n array.forEach(function (val, idx) {\n hash[val] = true;\n });\n\n return hash;\n }\n\n function formatValue(ctx, value, recurseTimes) {\n ctx.formatValueCalls++;\n if (ctx.formatValueCalls > 200) {\n return `[TOO BIG formatValueCalls ${ctx.formatValueCalls} exceeded limit of 200]`;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (\n isError(value) &&\n (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)\n ) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '',\n array = false,\n braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function (key) {\n return formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n key,\n array,\n );\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n }\n\n function formatPrimitive(ctx, value) {\n if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple =\n \"'\" +\n JSON.stringify(value)\n .replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') +\n \"'\";\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value)) return ctx.stylize('' + value, 'number');\n if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value)) return ctx.stylize('null', 'null');\n }\n\n function formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n }\n\n function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(\n formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n String(i),\n true,\n ),\n );\n } else {\n output.push('');\n }\n }\n keys.forEach(function (key) {\n if (!key.match(/^\\d+$/)) {\n output.push(\n formatProperty(ctx, value, recurseTimes, visibleKeys, key, true),\n );\n }\n });\n return output;\n }\n\n function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || {value: value[key]};\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str\n .split('\\n')\n .map(function (line) {\n return ' ' + line;\n })\n .join('\\n')\n .slice(2);\n } else {\n str =\n '\\n' +\n str\n .split('\\n')\n .map(function (line) {\n return ' ' + line;\n })\n .join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, name.length - 1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n }\n\n function reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function (prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return (\n braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1]\n );\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n }\n\n // NOTE: These type checking functions intentionally don't use `instanceof`\n // because it is fragile and can be easily faked with `Object.create()`.\n function isArray(ar) {\n return Array.isArray(ar);\n }\n\n function isBoolean(arg) {\n return typeof arg === 'boolean';\n }\n\n function isNull(arg) {\n return arg === null;\n }\n\n function isNullOrUndefined(arg) {\n return arg == null;\n }\n\n function isNumber(arg) {\n return typeof arg === 'number';\n }\n\n function isString(arg) {\n return typeof arg === 'string';\n }\n\n function isSymbol(arg) {\n return typeof arg === 'symbol';\n }\n\n function isUndefined(arg) {\n return arg === void 0;\n }\n\n function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n }\n\n function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n }\n\n function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n }\n\n function isError(e) {\n return (\n isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error)\n );\n }\n\n function isFunction(arg) {\n return typeof arg === 'function';\n }\n\n function objectToString(o) {\n return Object.prototype.toString.call(o);\n }\n\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n return inspect;\n})();\n\nconst INDEX_COLUMN_NAME = '(index)';\nconst LOG_LEVELS = {\n trace: 0,\n info: 1,\n warn: 2,\n error: 3,\n};\n\nfunction getNativeLogFunction(level) {\n return function () {\n let str;\n if (arguments.length === 1 && typeof arguments[0] === 'string') {\n str = arguments[0];\n } else {\n str = Array.prototype.map\n .call(arguments, function (arg) {\n return inspect(arg, {depth: 10});\n })\n .join(', ');\n }\n\n // TRICKY\n // If more than one argument is provided, the code above collapses them all\n // into a single formatted string. This transform wraps string arguments in\n // single quotes (e.g. \"foo\" -> \"'foo'\") which then breaks the \"Warning:\"\n // check below. So it's important that we look at the first argument, rather\n // than the formatted argument string.\n const firstArg = arguments[0];\n\n let logLevel = level;\n if (\n typeof firstArg === 'string' &&\n firstArg.slice(0, 9) === 'Warning: ' &&\n logLevel >= LOG_LEVELS.error\n ) {\n // React warnings use console.error so that a stack trace is shown,\n // but we don't (currently) want these to show a redbox\n // (Note: Logic duplicated in ExceptionsManager.js.)\n logLevel = LOG_LEVELS.warn;\n }\n if (groupStack.length) {\n str = groupFormat('', str);\n }\n global.nativeLoggingHook(str, logLevel);\n };\n}\n\nfunction repeat(element, n) {\n return Array.apply(null, Array(n)).map(function () {\n return element;\n });\n}\n\nfunction formatCellValue(cell, key) {\n if (key === INDEX_COLUMN_NAME) {\n return cell[key];\n }\n\n if (cell.hasOwnProperty(key)) {\n var cellValue = cell[key];\n\n switch (typeof cellValue) {\n case 'function':\n return 'ƒ';\n case 'string':\n return \"'\" + cellValue + \"'\";\n case 'object':\n return cellValue == null ? 'null' : '{…}';\n }\n\n return String(cellValue);\n }\n return '';\n}\n\nfunction consoleTablePolyfill(data, columns) {\n var rows;\n\n // convert object -> array\n if (Array.isArray(data)) {\n rows = data.map((row, index) => {\n var processedRow = {};\n processedRow[INDEX_COLUMN_NAME] = String(index);\n Object.assign(processedRow, row);\n return processedRow;\n });\n } else {\n rows = [];\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n var processedRow = {};\n processedRow[INDEX_COLUMN_NAME] = key;\n Object.assign(processedRow, data[key]);\n rows.push(processedRow);\n }\n }\n }\n if (rows.length === 0) {\n global.nativeLoggingHook('', LOG_LEVELS.info);\n return;\n }\n\n if (Array.isArray(columns)) {\n columns = [INDEX_COLUMN_NAME].concat(columns);\n } else {\n columns = Array.from(\n rows.reduce((columnSet, row) => {\n Object.keys(row).forEach(key => columnSet.add(key));\n return columnSet;\n }, new Set()),\n );\n }\n var stringRows = [];\n var columnWidths = [];\n\n // Convert each cell to a string. Also\n // figure out max cell width for each column\n columns.forEach(function (k, i) {\n columnWidths[i] = k.length;\n for (var j = 0; j < rows.length; j++) {\n var cellStr = formatCellValue(rows[j], k);\n stringRows[j] = stringRows[j] || [];\n stringRows[j][i] = cellStr;\n columnWidths[i] = Math.max(columnWidths[i], cellStr.length);\n }\n });\n\n // Join all elements in the row into a single string with | separators\n // (appends extra spaces to each cell to make separators | aligned)\n function joinRow(row, space) {\n var cells = row.map(function (cell, i) {\n var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');\n return cell + extraSpaces;\n });\n space = space || ' ';\n return '| ' + cells.join(space + '|' + space) + ' |';\n }\n\n var separators = columnWidths.map(function (columnWidth) {\n return repeat('-', columnWidth).join('');\n });\n var separatorRow = joinRow(separators);\n var header = joinRow(columns);\n var table = [header, separatorRow];\n\n for (var i = 0; i < rows.length; i++) {\n table.push(joinRow(stringRows[i]));\n }\n\n // Notice extra empty line at the beginning.\n // Native logging hook adds \"RCTLog >\" at the front of every\n // logged string, which would shift the header and screw up\n // the table\n global.nativeLoggingHook('\\n' + table.join('\\n'), LOG_LEVELS.info);\n}\n\nconst GROUP_PAD = '\\u2502'; // Box light vertical\nconst GROUP_OPEN = '\\u2510'; // Box light down+left\nconst GROUP_CLOSE = '\\u2518'; // Box light up+left\n\nconst groupStack = [];\n\nfunction groupFormat(prefix, msg) {\n // Insert group formatting before the console message\n return groupStack.join('') + prefix + ' ' + (msg || '');\n}\n\nfunction consoleGroupPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupCollapsedPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupEndPolyfill() {\n groupStack.pop();\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);\n}\n\nfunction consoleAssertPolyfill(expression, label) {\n if (!expression) {\n global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);\n }\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/console/timeStamp_static.\n// Non-standard API for recording markers on a timeline of the Performance instrumentation.\n// The actual logging is not provided by definition.\nfunction consoleTimeStampPolyfill() {}\n\nif (global.nativeLoggingHook) {\n const originalConsole = global.console;\n // Preserve the original `console` as `originalConsole`\n if (__DEV__ && originalConsole) {\n const descriptor = Object.getOwnPropertyDescriptor(global, 'console');\n if (descriptor) {\n Object.defineProperty(global, 'originalConsole', descriptor);\n }\n }\n\n global.console = {\n timeStamp: consoleTimeStampPolyfill,\n ...(originalConsole ?? {}),\n error: getNativeLogFunction(LOG_LEVELS.error),\n info: getNativeLogFunction(LOG_LEVELS.info),\n log: getNativeLogFunction(LOG_LEVELS.info),\n warn: getNativeLogFunction(LOG_LEVELS.warn),\n trace: getNativeLogFunction(LOG_LEVELS.trace),\n debug: getNativeLogFunction(LOG_LEVELS.trace),\n table: consoleTablePolyfill,\n group: consoleGroupPolyfill,\n groupEnd: consoleGroupEndPolyfill,\n groupCollapsed: consoleGroupCollapsedPolyfill,\n assert: consoleAssertPolyfill,\n };\n\n // TODO(T206796580): This was copy-pasted from ExceptionsManager.js\n // Delete the copy there after the c++ pipeline is rolled out everywhere.\n if (global.RN$useAlwaysAvailableJSErrorHandling === true) {\n let originalConsoleError = console.error;\n console.reportErrorsAsExceptions = true;\n function stringifySafe(arg) {\n return inspect(arg, {depth: 10}).replace(/\\n\\s*/g, ' ');\n }\n console.error = function (...args) {\n originalConsoleError.apply(this, args);\n if (!console.reportErrorsAsExceptions) {\n return;\n }\n if (global.RN$inExceptionHandler?.()) {\n return;\n }\n let error;\n\n const firstArg = args[0];\n if (firstArg?.stack) {\n // RN$handleException will console.error this with high enough fidelity.\n error = firstArg;\n } else {\n if (typeof firstArg === 'string' && firstArg.startsWith('Warning: ')) {\n // React warnings use console.error so that a stack trace is shown, but\n // we don't (currently) want these to show a redbox\n return;\n }\n const message = args\n .map(arg => (typeof arg === 'string' ? arg : stringifySafe(arg)))\n .join(' ');\n\n error = new Error(message);\n error.name = 'console.error';\n }\n\n const isFatal = false;\n const reportToConsole = false;\n global.RN$handleException(error, isFatal, reportToConsole);\n };\n }\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n\n // If available, also call the original `console` method since that is\n // sometimes useful. Ex: on OS X, this will let you see rich output in\n // the Safari Web Inspector console.\n if (__DEV__ && originalConsole) {\n Object.keys(console).forEach(methodName => {\n const reactNativeMethod = console[methodName];\n if (\n originalConsole[methodName] &&\n reactNativeMethod !== originalConsole[methodName]\n ) {\n console[methodName] = function () {\n originalConsole[methodName](...arguments);\n reactNativeMethod.apply(console, arguments);\n };\n }\n });\n\n // The following methods are not supported by this polyfill but\n // we still should pass them to original console if they are\n // supported by it.\n ['clear', 'dir', 'dirxml', 'profile', 'profileEnd'].forEach(methodName => {\n if (typeof originalConsole[methodName] === 'function') {\n console[methodName] = function () {\n originalConsole[methodName](...arguments);\n };\n }\n });\n }\n} else if (!global.console) {\n function stub() {}\n const log = global.print || stub;\n\n global.console = {\n debug: log,\n error: log,\n info: log,\n log: log,\n trace: log,\n warn: log,\n assert(expression, label) {\n if (!expression) {\n log('Assertion failed: ' + label);\n }\n },\n clear: stub,\n dir: stub,\n dirxml: stub,\n group: stub,\n groupCollapsed: stub,\n groupEnd: stub,\n profile: stub,\n profileEnd: stub,\n table: stub,\n timeStamp: stub,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n}\n","/**\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 *\n * @flow strict\n * @format\n * @polyfill\n */\n\nlet _inGuard = 0;\n\ntype ErrorHandler = (error: mixed, isFatal: boolean) => void;\ntype Fn = (...Args) => Return;\n\n/**\n * This is the error handler that is called when we encounter an exception\n * when loading a module. This will report any errors encountered before\n * ExceptionsManager is configured.\n */\nlet _globalHandler: ErrorHandler =\n global.RN$useAlwaysAvailableJSErrorHandling === true\n ? global.RN$handleException\n : (e: mixed, isFatal: boolean) => {\n throw e;\n };\n\n/**\n * The particular require runtime that we are using looks for a global\n * `ErrorUtils` object and if it exists, then it requires modules with the\n * error handler specified via ErrorUtils.setGlobalHandler by calling the\n * require function with applyWithGuard. Since the require module is loaded\n * before any of the modules, this ErrorUtils must be defined (and the handler\n * set) globally before requiring anything.\n */\nconst ErrorUtils = {\n setGlobalHandler(fun: ErrorHandler): void {\n _globalHandler = fun;\n },\n getGlobalHandler(): ErrorHandler {\n return _globalHandler;\n },\n reportError(error: mixed): void {\n _globalHandler && _globalHandler(error, false);\n },\n reportFatalError(error: mixed): void {\n // NOTE: This has an untyped call site in Metro.\n _globalHandler && _globalHandler(error, true);\n },\n applyWithGuard, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n // Unused, but some code synced from www sets it to null.\n unused_onError?: null,\n // Some callers pass a name here, which we ignore.\n unused_name?: ?string,\n ): ?TOut {\n try {\n _inGuard++;\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } catch (e) {\n ErrorUtils.reportError(e);\n } finally {\n _inGuard--;\n }\n return null;\n },\n applyWithGuardIfNeeded, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n ): ?TOut {\n if (ErrorUtils.inGuard()) {\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } else {\n ErrorUtils.applyWithGuard(fun, context, args);\n }\n return null;\n },\n inGuard(): boolean {\n return !!_inGuard;\n },\n guard, TOut>(\n fun: Fn,\n name?: ?string,\n context?: ?mixed,\n ): ?(...TArgs) => ?TOut {\n // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types\n // should be sufficient.\n if (typeof fun !== 'function') {\n console.warn('A function must be passed to ErrorUtils.guard, got ', fun);\n return null;\n }\n const guardName = name ?? fun.name ?? '';\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n function guarded(...args: TArgs): ?TOut {\n return ErrorUtils.applyWithGuard(\n fun,\n context ?? this,\n args,\n null,\n guardName,\n );\n }\n\n return guarded;\n },\n};\n\nglobal.ErrorUtils = ErrorUtils;\n\nexport type ErrorUtilsT = typeof ErrorUtils;\n","function c() { throw new Error(\"kaboom from Hermes\"); }\nfunction b() { c(); }\nfunction a() { b(); }\na();\n"],"x_facebook_sources":[[{"names":["","","clear","getModuleIdForVerboseName","define","metroRequire","initializingModuleIds.slice.map$argument_0","shouldPrintRequireCycle","isIgnored","regExps.some$argument_0","modules.every$argument_0","metroImportDefault","metroImportAll","fallbackRequireContext","fallbackRequireResolveWeak","guardedLoadModule","unpackModuleId","packModuleId","registerSegment","moduleIds.forEach$argument_0","loadModuleImplementation","global.$RefreshReg$","unknownModuleError","metroRequire.Systrace.beginEvent","metroRequire.Systrace.endEvent","metroRequire.getModules","createHotReloadingObject","hot.accept","hot.dispose","metroHotUpdateModule","topologicalSort$argument_1","topologicalSort$argument_2","setTimeout$argument_0","topologicalSort","traverseDependentNodes","dependentNodes.forEach$argument_0","roots.forEach$argument_0","runUpdatedModule","performFullRefresh","isReactRefreshBoundary","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","registerExportsForReactRefresh","requireSystrace","requireRefresh"],"mappings":"AAA;gDCW,QD;gDCC,oBD;AEE;CFG;kCGG;GHM;AIG;CJ8B;AKC;aCuB,mDD;CLe;AOC;oBCM;mCCC,+BD,CD;uBGC,8BH;CPC;AWC;CXkB;AYE;CZ2B;uBaE;CbS;2BcC;CdO;AeE;Cfc;AgBG;ChBO;AiBE;CjBE;AkBI;sBCgB;KDI;ClBE;AoBC;8BC0C;SDI;CpBgD;AsBC;CtBQ;gBuBG,QvB;cwBC,QxB;4ByBE;GzBE;iC0BC;cCK;ODG;eEC;OFE;G1BG;+B6BE;QCyB;SDmC;QEC,gBF;yCGqF;SHG;G7BG;0BiCC;ICI;6BCc;ODE;KDG;kBGC;KHE;GjCE;2BqCC;GrCsD;6BsCC;GtCmB;+BuCC;GvCwB;6CwCC;GxCgB;oCyCC;GzCmB;uC0CC;G1Cc;wB2CI;G3CI;uB4CC;G5CM"}],[{"names":["","","inspect","stylizeNoColor","arrayToHash","array.forEach$argument_0","formatValue","keys.map$argument_0","formatPrimitive","formatError","formatArray","keys.forEach$argument_0","formatProperty","str.split.map$argument_0","reduceToSingleString","output.reduce$argument_0","isArray","isBoolean","isNull","isNullOrUndefined","isNumber","isString","isSymbol","isUndefined","isRegExp","isObject","isDate","isError","isFunction","objectToString","hasOwnProperty","getNativeLogFunction","Array.prototype.map.call$argument_1","repeat","Array.apply.map$argument_0","formatCellValue","consoleTablePolyfill","data.map$argument_0","rows.reduce$argument_0","Object.keys.forEach$argument_0","columns.forEach$argument_0","joinRow","row.map$argument_0","columnWidths.map$argument_0","groupFormat","consoleGroupPolyfill","consoleGroupCollapsedPolyfill","consoleGroupEndPolyfill","consoleAssertPolyfill","consoleTimeStampPolyfill","stringifySafe","error","args.map$argument_0","methodName","forEach$argument_0","stub","global.console.assert"],"mappings":"AAA;iBCoB;ECwB;GDO;EEE;GFE;EGE;kBCG;KDE;GHG;EKE;wBC2F;ODS;GLM;EOE;GPgB;EQE;GRE;ESE;iBCkB;KDM;GTE;EWE;mBC4B;eDE;qBCQ;iBDE;GX0B;EaE;+BCE;KDI;Gbc;EeI;GfE;EgBE;GhBE;EiBE;GjBE;EkBE;GlBE;EmBE;GnBE;EoBE;GpBE;EqBE;GrBE;EsBE;GtBE;EuBE;GvBE;EwBE;GxBE;EyBE;GzBE;E0BE;G1BK;E2BE;G3BE;E4BE;G5BE;E6BE;G7BE;CDG;A+BU;S9BC;yB+BM;S/BE;G8B2B;C/BC;AiCE;yCCC;GDE;CjCC;AmCE;CnCoB;AoCE;oBCK;KDK;kBEqB;iCCC,yBD;OFE;kBIQ;GJQ;EKI;wBCC;KDG;GLG;oCOE;GPE;CpCc;A4CQ;C5CG;A6CE;C7CG;A8CE;C9CG;A+CE;C/CG;AgDE;ChDI;AiDK,sCjD;IkDiC;KlDE;oBmDC;eCqB,2DD;KnDU;iCuCY;8BcM;SdG;KvCE;gEsDK;8BDE;SCE;KtDE;EuDG,kBvD;IwDU;KxDI"}],[{"names":["","","ErrorUtils.setGlobalHandler","ErrorUtils.getGlobalHandler","ErrorUtils.reportError","ErrorUtils.reportFatalError","ErrorUtils.applyWithGuard","ErrorUtils.applyWithGuardIfNeeded","ErrorUtils.inGuard","ErrorUtils.guard","guarded"],"mappings":"AAA;MCwB;ODE;EEW;GFE;EGC;GHE;EIC;GJE;EKC;GLG;EMC;GNsB;EOC;GPe;EQC;GRE;ESC;ICc;KDQ;GTG"}],[{"names":["c","","b","a"],"mappings":"AAA,uDC;ACC,qBD;AEC,qBF"}]],"x_hermes_function_offsets":{"0":[0,432,714,751,851,948,1046,1201,1298,1332,1362,1410,1476,1824,1860,1894,1928,2486,2502,2723,2752,2815,2824,2953,3420,3484,3549,3602,3649,3671,3826,3864,3915,3981,4047,4104,4152,4156,4354,4407,4412,4440,4460,5322,5363,5647,5696,5865,5950,6576,6589,6602,6760,6858,6881,6897,6908,6924,6940,6951,6990,7015,7054,7111,7127,7160,7197,7255,7532,7565,7569,7604,7730,7735,7749,7758,7789,7820,7922,7983,7998,8091,8210,8234,8268]},"x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/rust/cymbal/tests/static/hermes/final_stack.txt b/rust/cymbal/tests/static/hermes/final_stack.txt new file mode 100644 index 0000000000..ae8fede0a5 --- /dev/null +++ b/rust/cymbal/tests/static/hermes/final_stack.txt @@ -0,0 +1,8 @@ +Uncaught Error: kaboom from Hermes + at c (address at /Users/olly/Documents/work/test-rn/HermesMapsDemo/mini-entry.js:1:c) + at b (address at /Users/olly/Documents/work/test-rn/HermesMapsDemo/mini-entry.js:2:b) + at anonymous (address at /Users/olly/Documents/work/test-rn/HermesMapsDemo/mini-entry.js:3:a) + at loadModuleImplementation (address at /Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/metro-runtime/src/polyfills/require.js:285:loadModuleImplementation) + at guardedLoadModule (address at /Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/metro-runtime/src/polyfills/require.js:183:guardedLoadModule) + at metroRequire (address at /Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/metro-runtime/src/polyfills/require.js:98:metroRequire) + at global (address at null:null:null) diff --git a/rust/cymbal/tests/static/hermes/hermes_example.map b/rust/cymbal/tests/static/hermes/hermes_example.map new file mode 100644 index 0000000000..31ca37051b --- /dev/null +++ b/rust/cymbal/tests/static/hermes/hermes_example.map @@ -0,0 +1 @@ +{"version":3,"sources":[".\/build\/android\/index.android.bundle"],"mappings":"AAAA,0BAA0B,MAAU,KAAV,GAAuD,MAAQ,KAAA,IAA\/D,EAAgC,QAAoB,IAArD,QAA0E,MAAe,MAAU,KAAV,GAAoB,EAArB,UAA+C,MAAI,KAAY,KAAO,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,EACA,GAAA,IAAsB,KAAA,KAEtB,IAAQ,GAAA,MAEV,EAHU,EACR,GAAA,IAAQ,GAAA,IACV,EAGsB,SAClB,GAAA,IAAkB,KAAA,IAAtB,GAGE,IAAyB,KAAA,SAE3B,EAJkB,KAAA,MAAhB,EAMK,AACE,GAAA,IAAD,GAAD,GAAP,EAEK,QAAA,OAAA,IAED,OAAJ,MAIwB,IAAyB,KAAjC,QAAA,MAAF,IANT,KAaL,IAVE,MAAY,SAAA,QACZ,EAGF,IAC2B,KAAoB,MAAK,KAAA,UAAA,IAAA,MAAkB,IAApE,GACwB,IAAX,IADwE,GAArF,IAGO,GAAA,IAAyB,KAAC,GAAA,IAAK,MAAA,IAAkB,IAA4B,kBAApD,IAAhC,EAOJ,EAAA,KAAA,IAAA,OAQC,IAGL,EAVE,EACY,MAAK,KAAA,WAAA,IAAA,IAAf,EAEF,AACE,GAAA,MAAC,IACH;","x_hermes_function_offsets":{"0":[0,432,714,751,851,948,1046,1201,1298,1332,1362,1410,1476,1824,1860,1894,1928,2486,2502,2723,2752,2815,2824,2953,3420,3484,3549,3602,3649,3671,3826,3864,3915,3981,4047,4104,4152,4156,4354,4407,4412,4440,4460,5322,5363,5647,5696,5865,5950,6576,6589,6602,6760,6858,6881,6897,6908,6924,6940,6951,6990,7015,7054,7111,7127,7160,7197,7255,7532,7565,7569,7604,7730,7735,7749,7758,7789,7820,7922,7983,7998,8091,8210,8234,8268]}} \ No newline at end of file diff --git a/rust/cymbal/tests/static/hermes/metro_example.map b/rust/cymbal/tests/static/hermes/metro_example.map new file mode 100644 index 0000000000..90f8a5f89c --- /dev/null +++ b/rust/cymbal/tests/static/hermes/metro_example.map @@ -0,0 +1 @@ +{"version":3,"sources":["__prelude__","/Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/metro-runtime/src/polyfills/require.js","/Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/@react-native/js-polyfills/console.js","/Users/olly/Documents/work/test-rn/HermesMapsDemo/node_modules/@react-native/js-polyfills/error-guard.js","/Users/olly/Documents/work/test-rn/HermesMapsDemo/mini-entry.js"],"sourcesContent":["var __BUNDLE_START_TIME__=globalThis.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=globalThis.process||{},__METRO_GLOBAL_PREFIX__='';process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||\"production\";","\"use strict\";\n\nglobal.__r = metroRequire;\nglobal[`${__METRO_GLOBAL_PREFIX__}__d`] = define;\nglobal.__c = clear;\nglobal.__registerSegment = registerSegment;\nvar modules = clear();\nconst EMPTY = {};\nconst CYCLE_DETECTED = {};\nconst { hasOwnProperty } = {};\nif (__DEV__) {\n global.$RefreshReg$ = global.$RefreshReg$ ?? (() => {});\n global.$RefreshSig$ = global.$RefreshSig$ ?? (() => (type) => type);\n}\nfunction clear() {\n modules = new Map();\n return modules;\n}\nif (__DEV__) {\n var verboseNamesToModuleIds = new Map();\n var getModuleIdForVerboseName = (verboseName) => {\n const moduleId = verboseNamesToModuleIds.get(verboseName);\n if (moduleId == null) {\n throw new Error(`Unknown named module: \"${verboseName}\"`);\n }\n return moduleId;\n };\n var initializingModuleIds = [];\n}\nfunction define(factory, moduleId, dependencyMap) {\n if (modules.has(moduleId)) {\n if (__DEV__) {\n const inverseDependencies = arguments[4];\n if (inverseDependencies) {\n global.__accept(moduleId, factory, dependencyMap, inverseDependencies);\n }\n }\n return;\n }\n const mod = {\n dependencyMap,\n factory,\n hasError: false,\n importedAll: EMPTY,\n importedDefault: EMPTY,\n isInitialized: false,\n publicModule: {\n exports: {},\n },\n };\n modules.set(moduleId, mod);\n if (__DEV__) {\n mod.hot = createHotReloadingObject();\n const verboseName = arguments[3];\n if (verboseName) {\n mod.verboseName = verboseName;\n verboseNamesToModuleIds.set(verboseName, moduleId);\n }\n }\n}\nfunction metroRequire(moduleId, maybeNameForDev) {\n if (moduleId === null) {\n if (__DEV__ && typeof maybeNameForDev === \"string\") {\n throw new Error(\"Cannot find module '\" + maybeNameForDev + \"'\");\n }\n throw new Error(\"Cannot find module\");\n }\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n console.warn(\n `Requiring module \"${verboseName}\" by name is only supported for ` +\n \"debugging purposes and will BREAK IN PRODUCTION!\"\n );\n }\n const moduleIdReallyIsNumber = moduleId;\n if (__DEV__) {\n const initializingIndex = initializingModuleIds.indexOf(\n moduleIdReallyIsNumber\n );\n if (initializingIndex !== -1) {\n const cycle = initializingModuleIds\n .slice(initializingIndex)\n .map((id) => modules.get(id)?.verboseName ?? \"[unknown]\");\n if (shouldPrintRequireCycle(cycle)) {\n cycle.push(cycle[0]);\n console.warn(\n `Require cycle: ${cycle.join(\" -> \")}\\n\\n` +\n \"Require cycles are allowed, but can result in uninitialized values. \" +\n \"Consider refactoring to remove the need for a cycle.\"\n );\n }\n }\n }\n const module = modules.get(moduleIdReallyIsNumber);\n return module && module.isInitialized\n ? module.publicModule.exports\n : guardedLoadModule(moduleIdReallyIsNumber, module);\n}\nfunction shouldPrintRequireCycle(modules) {\n const regExps =\n global[__METRO_GLOBAL_PREFIX__ + \"__requireCycleIgnorePatterns\"];\n if (!Array.isArray(regExps)) {\n return true;\n }\n const isIgnored = (module) =>\n module != null && regExps.some((regExp) => regExp.test(module));\n return modules.every((module) => !isIgnored(module));\n}\nfunction metroImportDefault(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (\n maybeInitializedModule &&\n maybeInitializedModule.importedDefault !== EMPTY\n ) {\n return maybeInitializedModule.importedDefault;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n const importedDefault =\n exports && exports.__esModule ? exports.default : exports;\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedDefault = importedDefault);\n}\nmetroRequire.importDefault = metroImportDefault;\nfunction metroImportAll(moduleId) {\n if (__DEV__ && typeof moduleId === \"string\") {\n const verboseName = moduleId;\n moduleId = getModuleIdForVerboseName(verboseName);\n }\n const moduleIdReallyIsNumber = moduleId;\n const maybeInitializedModule = modules.get(moduleIdReallyIsNumber);\n if (maybeInitializedModule && maybeInitializedModule.importedAll !== EMPTY) {\n return maybeInitializedModule.importedAll;\n }\n const exports = metroRequire(moduleIdReallyIsNumber);\n let importedAll;\n if (exports && exports.__esModule) {\n importedAll = exports;\n } else {\n importedAll = {};\n if (exports) {\n for (const key in exports) {\n if (hasOwnProperty.call(exports, key)) {\n importedAll[key] = exports[key];\n }\n }\n }\n importedAll.default = exports;\n }\n const initializedModule = modules.get(moduleIdReallyIsNumber);\n return (initializedModule.importedAll = importedAll);\n}\nmetroRequire.importAll = metroImportAll;\nmetroRequire.context = function fallbackRequireContext() {\n if (__DEV__) {\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\\nThis can be enabled by setting the `transformer.unstable_allowRequireContext` property to `true` in your Metro configuration.\"\n );\n }\n throw new Error(\n \"The experimental Metro feature `require.context` is not enabled in your project.\"\n );\n};\nmetroRequire.resolveWeak = function fallbackRequireResolveWeak() {\n if (__DEV__) {\n throw new Error(\n \"require.resolveWeak cannot be called dynamically. Ensure you are using the same version of `metro` and `metro-runtime`.\"\n );\n }\n throw new Error(\"require.resolveWeak cannot be called dynamically.\");\n};\nlet inGuard = false;\nfunction guardedLoadModule(moduleId, module) {\n if (!inGuard && global.ErrorUtils) {\n inGuard = true;\n let returnValue;\n try {\n returnValue = loadModuleImplementation(moduleId, module);\n } catch (e) {\n global.ErrorUtils.reportFatalError(e);\n }\n inGuard = false;\n return returnValue;\n } else {\n return loadModuleImplementation(moduleId, module);\n }\n}\nconst ID_MASK_SHIFT = 16;\nconst LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT;\nfunction unpackModuleId(moduleId) {\n const segmentId = moduleId >>> ID_MASK_SHIFT;\n const localId = moduleId & LOCAL_ID_MASK;\n return {\n segmentId,\n localId,\n };\n}\nmetroRequire.unpackModuleId = unpackModuleId;\nfunction packModuleId(value) {\n return (value.segmentId << ID_MASK_SHIFT) + value.localId;\n}\nmetroRequire.packModuleId = packModuleId;\nconst moduleDefinersBySegmentID = [];\nconst definingSegmentByModuleID = new Map();\nfunction registerSegment(segmentId, moduleDefiner, moduleIds) {\n moduleDefinersBySegmentID[segmentId] = moduleDefiner;\n if (__DEV__) {\n if (segmentId === 0 && moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be null for main segment\"\n );\n }\n if (segmentId !== 0 && !moduleIds) {\n throw new Error(\n \"registerSegment: Expected moduleIds to be passed for segment #\" +\n segmentId\n );\n }\n }\n if (moduleIds) {\n moduleIds.forEach((moduleId) => {\n if (!modules.has(moduleId) && !definingSegmentByModuleID.has(moduleId)) {\n definingSegmentByModuleID.set(moduleId, segmentId);\n }\n });\n }\n}\nfunction loadModuleImplementation(moduleId, module) {\n if (!module && moduleDefinersBySegmentID.length > 0) {\n const segmentId = definingSegmentByModuleID.get(moduleId) ?? 0;\n const definer = moduleDefinersBySegmentID[segmentId];\n if (definer != null) {\n definer(moduleId);\n module = modules.get(moduleId);\n definingSegmentByModuleID.delete(moduleId);\n }\n }\n const nativeRequire = global.nativeRequire;\n if (!module && nativeRequire) {\n const { segmentId, localId } = unpackModuleId(moduleId);\n nativeRequire(localId, segmentId);\n module = modules.get(moduleId);\n }\n if (!module) {\n throw unknownModuleError(moduleId);\n }\n if (module.hasError) {\n throw module.error;\n }\n if (__DEV__) {\n var Systrace = requireSystrace();\n var Refresh = requireRefresh();\n }\n module.isInitialized = true;\n const { factory, dependencyMap } = module;\n if (__DEV__) {\n initializingModuleIds.push(moduleId);\n }\n try {\n if (__DEV__) {\n Systrace.beginEvent(\"JS_require_\" + (module.verboseName || moduleId));\n }\n const moduleObject = module.publicModule;\n if (__DEV__) {\n moduleObject.hot = module.hot;\n var prevRefreshReg = global.$RefreshReg$;\n var prevRefreshSig = global.$RefreshSig$;\n if (Refresh != null) {\n const RefreshRuntime = Refresh;\n global.$RefreshReg$ = (type, id) => {\n const prefixedModuleId =\n __METRO_GLOBAL_PREFIX__ + \" \" + moduleId + \" \" + id;\n RefreshRuntime.register(type, prefixedModuleId);\n };\n global.$RefreshSig$ =\n RefreshRuntime.createSignatureFunctionForTransform;\n }\n }\n moduleObject.id = moduleId;\n factory(\n global,\n metroRequire,\n metroImportDefault,\n metroImportAll,\n moduleObject,\n moduleObject.exports,\n dependencyMap\n );\n if (!__DEV__) {\n module.factory = undefined;\n module.dependencyMap = undefined;\n }\n if (__DEV__) {\n Systrace.endEvent();\n if (Refresh != null) {\n const prefixedModuleId = __METRO_GLOBAL_PREFIX__ + \" \" + moduleId;\n registerExportsForReactRefresh(\n Refresh,\n moduleObject.exports,\n prefixedModuleId\n );\n }\n }\n return moduleObject.exports;\n } catch (e) {\n module.hasError = true;\n module.error = e;\n module.isInitialized = false;\n module.publicModule.exports = undefined;\n throw e;\n } finally {\n if (__DEV__) {\n if (initializingModuleIds.pop() !== moduleId) {\n throw new Error(\n \"initializingModuleIds is corrupt; something is terribly wrong\"\n );\n }\n global.$RefreshReg$ = prevRefreshReg;\n global.$RefreshSig$ = prevRefreshSig;\n }\n }\n}\nfunction unknownModuleError(id) {\n let message = 'Requiring unknown module \"' + id + '\".';\n if (__DEV__) {\n message +=\n \" If you are sure the module exists, try restarting Metro. \" +\n \"You may also want to run `yarn` or `npm install`.\";\n }\n return Error(message);\n}\nif (__DEV__) {\n metroRequire.Systrace = {\n beginEvent: () => {},\n endEvent: () => {},\n };\n metroRequire.getModules = () => {\n return modules;\n };\n var createHotReloadingObject = function () {\n const hot = {\n _acceptCallback: null,\n _disposeCallback: null,\n _didAccept: false,\n accept: (callback) => {\n hot._didAccept = true;\n hot._acceptCallback = callback;\n },\n dispose: (callback) => {\n hot._disposeCallback = callback;\n },\n };\n return hot;\n };\n let reactRefreshTimeout = null;\n const metroHotUpdateModule = function (\n id,\n factory,\n dependencyMap,\n inverseDependencies\n ) {\n const mod = modules.get(id);\n if (!mod) {\n if (factory) {\n return;\n }\n throw unknownModuleError(id);\n }\n if (!mod.hasError && !mod.isInitialized) {\n mod.factory = factory;\n mod.dependencyMap = dependencyMap;\n return;\n }\n const Refresh = requireRefresh();\n const refreshBoundaryIDs = new Set();\n let didBailOut = false;\n let updatedModuleIDs;\n try {\n updatedModuleIDs = topologicalSort(\n [id],\n (pendingID) => {\n const pendingModule = modules.get(pendingID);\n if (pendingModule == null) {\n return [];\n }\n const pendingHot = pendingModule.hot;\n if (pendingHot == null) {\n throw new Error(\n \"[Refresh] Expected module.hot to always exist in DEV.\"\n );\n }\n let canAccept = pendingHot._didAccept;\n if (!canAccept && Refresh != null) {\n const isBoundary = isReactRefreshBoundary(\n Refresh,\n pendingModule.publicModule.exports\n );\n if (isBoundary) {\n canAccept = true;\n refreshBoundaryIDs.add(pendingID);\n }\n }\n if (canAccept) {\n return [];\n }\n const parentIDs = inverseDependencies[pendingID];\n if (parentIDs.length === 0) {\n performFullRefresh(\"No root boundary\", {\n source: mod,\n failed: pendingModule,\n });\n didBailOut = true;\n return [];\n }\n return parentIDs;\n },\n () => didBailOut\n ).reverse();\n } catch (e) {\n if (e === CYCLE_DETECTED) {\n performFullRefresh(\"Dependency cycle\", {\n source: mod,\n });\n return;\n }\n throw e;\n }\n if (didBailOut) {\n return;\n }\n const seenModuleIDs = new Set();\n for (let i = 0; i < updatedModuleIDs.length; i++) {\n const updatedID = updatedModuleIDs[i];\n if (seenModuleIDs.has(updatedID)) {\n continue;\n }\n seenModuleIDs.add(updatedID);\n const updatedMod = modules.get(updatedID);\n if (updatedMod == null) {\n throw new Error(\"[Refresh] Expected to find the updated module.\");\n }\n const prevExports = updatedMod.publicModule.exports;\n const didError = runUpdatedModule(\n updatedID,\n updatedID === id ? factory : undefined,\n updatedID === id ? dependencyMap : undefined\n );\n const nextExports = updatedMod.publicModule.exports;\n if (didError) {\n return;\n }\n if (refreshBoundaryIDs.has(updatedID)) {\n const isNoLongerABoundary = !isReactRefreshBoundary(\n Refresh,\n nextExports\n );\n const didInvalidate = shouldInvalidateReactRefreshBoundary(\n Refresh,\n prevExports,\n nextExports\n );\n if (isNoLongerABoundary || didInvalidate) {\n const parentIDs = inverseDependencies[updatedID];\n if (parentIDs.length === 0) {\n performFullRefresh(\n isNoLongerABoundary\n ? \"No longer a boundary\"\n : \"Invalidated boundary\",\n {\n source: mod,\n failed: updatedMod,\n }\n );\n return;\n }\n for (let j = 0; j < parentIDs.length; j++) {\n const parentID = parentIDs[j];\n const parentMod = modules.get(parentID);\n if (parentMod == null) {\n throw new Error(\"[Refresh] Expected to find parent module.\");\n }\n const canAcceptParent = isReactRefreshBoundary(\n Refresh,\n parentMod.publicModule.exports\n );\n if (canAcceptParent) {\n refreshBoundaryIDs.add(parentID);\n updatedModuleIDs.push(parentID);\n } else {\n performFullRefresh(\"Invalidated boundary\", {\n source: mod,\n failed: parentMod,\n });\n return;\n }\n }\n }\n }\n }\n if (Refresh != null) {\n if (reactRefreshTimeout == null) {\n reactRefreshTimeout = setTimeout(() => {\n reactRefreshTimeout = null;\n Refresh.performReactRefresh();\n }, 30);\n }\n }\n };\n const topologicalSort = function (roots, getEdges, earlyStop) {\n const result = [];\n const visited = new Set();\n const stack = new Set();\n function traverseDependentNodes(node) {\n if (stack.has(node)) {\n throw CYCLE_DETECTED;\n }\n if (visited.has(node)) {\n return;\n }\n visited.add(node);\n stack.add(node);\n const dependentNodes = getEdges(node);\n if (earlyStop(node)) {\n stack.delete(node);\n return;\n }\n dependentNodes.forEach((dependent) => {\n traverseDependentNodes(dependent);\n });\n stack.delete(node);\n result.push(node);\n }\n roots.forEach((root) => {\n traverseDependentNodes(root);\n });\n return result;\n };\n const runUpdatedModule = function (id, factory, dependencyMap) {\n const mod = modules.get(id);\n if (mod == null) {\n throw new Error(\"[Refresh] Expected to find the module.\");\n }\n const { hot } = mod;\n if (!hot) {\n throw new Error(\"[Refresh] Expected module.hot to always exist in DEV.\");\n }\n if (hot._disposeCallback) {\n try {\n hot._disposeCallback();\n } catch (error) {\n console.error(\n `Error while calling dispose handler for module ${id}: `,\n error\n );\n }\n }\n if (factory) {\n mod.factory = factory;\n }\n if (dependencyMap) {\n mod.dependencyMap = dependencyMap;\n }\n mod.hasError = false;\n mod.error = undefined;\n mod.importedAll = EMPTY;\n mod.importedDefault = EMPTY;\n mod.isInitialized = false;\n const prevExports = mod.publicModule.exports;\n mod.publicModule.exports = {};\n hot._didAccept = false;\n hot._acceptCallback = null;\n hot._disposeCallback = null;\n metroRequire(id);\n if (mod.hasError) {\n mod.hasError = false;\n mod.isInitialized = true;\n mod.error = null;\n mod.publicModule.exports = prevExports;\n return true;\n }\n if (hot._acceptCallback) {\n try {\n hot._acceptCallback();\n } catch (error) {\n console.error(\n `Error while calling accept handler for module ${id}: `,\n error\n );\n }\n }\n return false;\n };\n const performFullRefresh = (reason, modules) => {\n if (\n typeof window !== \"undefined\" &&\n window.location != null &&\n typeof window.location.reload === \"function\"\n ) {\n window.location.reload();\n } else {\n const Refresh = requireRefresh();\n if (Refresh != null) {\n const sourceName = modules.source?.verboseName ?? \"unknown\";\n const failedName = modules.failed?.verboseName ?? \"unknown\";\n Refresh.performFullRefresh(\n `Fast Refresh - ${reason} <${sourceName}> <${failedName}>`\n );\n } else {\n console.warn(\"Could not reload the application after an edit.\");\n }\n }\n };\n var isReactRefreshBoundary = function (Refresh, moduleExports) {\n if (Refresh.isLikelyComponentType(moduleExports)) {\n return true;\n }\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return false;\n }\n let hasExports = false;\n let areAllExportsComponents = true;\n for (const key in moduleExports) {\n hasExports = true;\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n return false;\n }\n const exportValue = moduleExports[key];\n if (!Refresh.isLikelyComponentType(exportValue)) {\n areAllExportsComponents = false;\n }\n }\n return hasExports && areAllExportsComponents;\n };\n var shouldInvalidateReactRefreshBoundary = (\n Refresh,\n prevExports,\n nextExports\n ) => {\n const prevSignature = getRefreshBoundarySignature(Refresh, prevExports);\n const nextSignature = getRefreshBoundarySignature(Refresh, nextExports);\n if (prevSignature.length !== nextSignature.length) {\n return true;\n }\n for (let i = 0; i < nextSignature.length; i++) {\n if (prevSignature[i] !== nextSignature[i]) {\n return true;\n }\n }\n return false;\n };\n var getRefreshBoundarySignature = (Refresh, moduleExports) => {\n const signature = [];\n signature.push(Refresh.getFamilyByType(moduleExports));\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return signature;\n }\n for (const key in moduleExports) {\n if (key === \"__esModule\") {\n continue;\n }\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n signature.push(key);\n signature.push(Refresh.getFamilyByType(exportValue));\n }\n return signature;\n };\n var registerExportsForReactRefresh = (Refresh, moduleExports, moduleID) => {\n Refresh.register(moduleExports, moduleID + \" %exports%\");\n if (moduleExports == null || typeof moduleExports !== \"object\") {\n return;\n }\n for (const key in moduleExports) {\n const desc = Object.getOwnPropertyDescriptor(moduleExports, key);\n if (desc && desc.get) {\n continue;\n }\n const exportValue = moduleExports[key];\n const typeID = moduleID + \" %exports% \" + key;\n Refresh.register(exportValue, typeID);\n }\n };\n global.__accept = metroHotUpdateModule;\n}\nif (__DEV__) {\n var requireSystrace = function requireSystrace() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__SYSTRACE\"] || metroRequire.Systrace\n );\n };\n var requireRefresh = function requireRefresh() {\n return (\n global[__METRO_GLOBAL_PREFIX__ + \"__ReactRefresh\"] ||\n global[global.__METRO_GLOBAL_PREFIX__ + \"__ReactRefresh\"] ||\n metroRequire.Refresh\n );\n };\n}\n","/**\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 *\n * @format\n * @noflow\n * @nolint\n * @polyfill\n */\n\n'use client';\n\n/* eslint-disable no-shadow, eqeqeq, no-unused-vars, no-control-regex */\n\n/**\n * This pipes all of our console logging functions to native logging so that\n * JavaScript errors in required modules show up in Xcode via NSLog.\n */\nconst inspect = (function () {\n // Copyright Joyent, Inc. and other Node contributors.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a\n // copy of this software and associated documentation files (the\n // \"Software\"), to deal in the Software without restriction, including\n // without limitation the rights to use, copy, modify, merge, publish,\n // distribute, sublicense, and/or sell copies of the Software, and to permit\n // persons to whom the Software is furnished to do so, subject to the\n // following conditions:\n //\n // The above copyright notice and this permission notice shall be included\n // in all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n // USE OR OTHER DEALINGS IN THE SOFTWARE.\n //\n // https://github.com/joyent/node/blob/master/lib/util.js\n\n function inspect(obj, opts) {\n var ctx = {\n seen: [],\n formatValueCalls: 0,\n stylize: stylizeNoColor,\n };\n return formatValue(ctx, obj, opts.depth);\n }\n\n function stylizeNoColor(str, styleType) {\n return str;\n }\n\n function arrayToHash(array) {\n var hash = {};\n\n array.forEach(function (val, idx) {\n hash[val] = true;\n });\n\n return hash;\n }\n\n function formatValue(ctx, value, recurseTimes) {\n ctx.formatValueCalls++;\n if (ctx.formatValueCalls > 200) {\n return `[TOO BIG formatValueCalls ${ctx.formatValueCalls} exceeded limit of 200]`;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (\n isError(value) &&\n (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)\n ) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '',\n array = false,\n braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function (key) {\n return formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n key,\n array,\n );\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n }\n\n function formatPrimitive(ctx, value) {\n if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple =\n \"'\" +\n JSON.stringify(value)\n .replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') +\n \"'\";\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value)) return ctx.stylize('' + value, 'number');\n if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value)) return ctx.stylize('null', 'null');\n }\n\n function formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n }\n\n function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(\n formatProperty(\n ctx,\n value,\n recurseTimes,\n visibleKeys,\n String(i),\n true,\n ),\n );\n } else {\n output.push('');\n }\n }\n keys.forEach(function (key) {\n if (!key.match(/^\\d+$/)) {\n output.push(\n formatProperty(ctx, value, recurseTimes, visibleKeys, key, true),\n );\n }\n });\n return output;\n }\n\n function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || {value: value[key]};\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str\n .split('\\n')\n .map(function (line) {\n return ' ' + line;\n })\n .join('\\n')\n .slice(2);\n } else {\n str =\n '\\n' +\n str\n .split('\\n')\n .map(function (line) {\n return ' ' + line;\n })\n .join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, name.length - 1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n }\n\n function reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function (prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return (\n braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1]\n );\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n }\n\n // NOTE: These type checking functions intentionally don't use `instanceof`\n // because it is fragile and can be easily faked with `Object.create()`.\n function isArray(ar) {\n return Array.isArray(ar);\n }\n\n function isBoolean(arg) {\n return typeof arg === 'boolean';\n }\n\n function isNull(arg) {\n return arg === null;\n }\n\n function isNullOrUndefined(arg) {\n return arg == null;\n }\n\n function isNumber(arg) {\n return typeof arg === 'number';\n }\n\n function isString(arg) {\n return typeof arg === 'string';\n }\n\n function isSymbol(arg) {\n return typeof arg === 'symbol';\n }\n\n function isUndefined(arg) {\n return arg === void 0;\n }\n\n function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n }\n\n function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n }\n\n function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n }\n\n function isError(e) {\n return (\n isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error)\n );\n }\n\n function isFunction(arg) {\n return typeof arg === 'function';\n }\n\n function objectToString(o) {\n return Object.prototype.toString.call(o);\n }\n\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n return inspect;\n})();\n\nconst INDEX_COLUMN_NAME = '(index)';\nconst LOG_LEVELS = {\n trace: 0,\n info: 1,\n warn: 2,\n error: 3,\n};\n\nfunction getNativeLogFunction(level) {\n return function () {\n let str;\n if (arguments.length === 1 && typeof arguments[0] === 'string') {\n str = arguments[0];\n } else {\n str = Array.prototype.map\n .call(arguments, function (arg) {\n return inspect(arg, {depth: 10});\n })\n .join(', ');\n }\n\n // TRICKY\n // If more than one argument is provided, the code above collapses them all\n // into a single formatted string. This transform wraps string arguments in\n // single quotes (e.g. \"foo\" -> \"'foo'\") which then breaks the \"Warning:\"\n // check below. So it's important that we look at the first argument, rather\n // than the formatted argument string.\n const firstArg = arguments[0];\n\n let logLevel = level;\n if (\n typeof firstArg === 'string' &&\n firstArg.slice(0, 9) === 'Warning: ' &&\n logLevel >= LOG_LEVELS.error\n ) {\n // React warnings use console.error so that a stack trace is shown,\n // but we don't (currently) want these to show a redbox\n // (Note: Logic duplicated in ExceptionsManager.js.)\n logLevel = LOG_LEVELS.warn;\n }\n if (groupStack.length) {\n str = groupFormat('', str);\n }\n global.nativeLoggingHook(str, logLevel);\n };\n}\n\nfunction repeat(element, n) {\n return Array.apply(null, Array(n)).map(function () {\n return element;\n });\n}\n\nfunction formatCellValue(cell, key) {\n if (key === INDEX_COLUMN_NAME) {\n return cell[key];\n }\n\n if (cell.hasOwnProperty(key)) {\n var cellValue = cell[key];\n\n switch (typeof cellValue) {\n case 'function':\n return 'ƒ';\n case 'string':\n return \"'\" + cellValue + \"'\";\n case 'object':\n return cellValue == null ? 'null' : '{…}';\n }\n\n return String(cellValue);\n }\n return '';\n}\n\nfunction consoleTablePolyfill(data, columns) {\n var rows;\n\n // convert object -> array\n if (Array.isArray(data)) {\n rows = data.map((row, index) => {\n var processedRow = {};\n processedRow[INDEX_COLUMN_NAME] = String(index);\n Object.assign(processedRow, row);\n return processedRow;\n });\n } else {\n rows = [];\n for (var key in data) {\n if (data.hasOwnProperty(key)) {\n var processedRow = {};\n processedRow[INDEX_COLUMN_NAME] = key;\n Object.assign(processedRow, data[key]);\n rows.push(processedRow);\n }\n }\n }\n if (rows.length === 0) {\n global.nativeLoggingHook('', LOG_LEVELS.info);\n return;\n }\n\n if (Array.isArray(columns)) {\n columns = [INDEX_COLUMN_NAME].concat(columns);\n } else {\n columns = Array.from(\n rows.reduce((columnSet, row) => {\n Object.keys(row).forEach(key => columnSet.add(key));\n return columnSet;\n }, new Set()),\n );\n }\n var stringRows = [];\n var columnWidths = [];\n\n // Convert each cell to a string. Also\n // figure out max cell width for each column\n columns.forEach(function (k, i) {\n columnWidths[i] = k.length;\n for (var j = 0; j < rows.length; j++) {\n var cellStr = formatCellValue(rows[j], k);\n stringRows[j] = stringRows[j] || [];\n stringRows[j][i] = cellStr;\n columnWidths[i] = Math.max(columnWidths[i], cellStr.length);\n }\n });\n\n // Join all elements in the row into a single string with | separators\n // (appends extra spaces to each cell to make separators | aligned)\n function joinRow(row, space) {\n var cells = row.map(function (cell, i) {\n var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');\n return cell + extraSpaces;\n });\n space = space || ' ';\n return '| ' + cells.join(space + '|' + space) + ' |';\n }\n\n var separators = columnWidths.map(function (columnWidth) {\n return repeat('-', columnWidth).join('');\n });\n var separatorRow = joinRow(separators);\n var header = joinRow(columns);\n var table = [header, separatorRow];\n\n for (var i = 0; i < rows.length; i++) {\n table.push(joinRow(stringRows[i]));\n }\n\n // Notice extra empty line at the beginning.\n // Native logging hook adds \"RCTLog >\" at the front of every\n // logged string, which would shift the header and screw up\n // the table\n global.nativeLoggingHook('\\n' + table.join('\\n'), LOG_LEVELS.info);\n}\n\nconst GROUP_PAD = '\\u2502'; // Box light vertical\nconst GROUP_OPEN = '\\u2510'; // Box light down+left\nconst GROUP_CLOSE = '\\u2518'; // Box light up+left\n\nconst groupStack = [];\n\nfunction groupFormat(prefix, msg) {\n // Insert group formatting before the console message\n return groupStack.join('') + prefix + ' ' + (msg || '');\n}\n\nfunction consoleGroupPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupCollapsedPolyfill(label) {\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);\n groupStack.push(GROUP_PAD);\n}\n\nfunction consoleGroupEndPolyfill() {\n groupStack.pop();\n global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);\n}\n\nfunction consoleAssertPolyfill(expression, label) {\n if (!expression) {\n global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);\n }\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/console/timeStamp_static.\n// Non-standard API for recording markers on a timeline of the Performance instrumentation.\n// The actual logging is not provided by definition.\nfunction consoleTimeStampPolyfill() {}\n\nif (global.nativeLoggingHook) {\n const originalConsole = global.console;\n // Preserve the original `console` as `originalConsole`\n if (__DEV__ && originalConsole) {\n const descriptor = Object.getOwnPropertyDescriptor(global, 'console');\n if (descriptor) {\n Object.defineProperty(global, 'originalConsole', descriptor);\n }\n }\n\n global.console = {\n timeStamp: consoleTimeStampPolyfill,\n ...(originalConsole ?? {}),\n error: getNativeLogFunction(LOG_LEVELS.error),\n info: getNativeLogFunction(LOG_LEVELS.info),\n log: getNativeLogFunction(LOG_LEVELS.info),\n warn: getNativeLogFunction(LOG_LEVELS.warn),\n trace: getNativeLogFunction(LOG_LEVELS.trace),\n debug: getNativeLogFunction(LOG_LEVELS.trace),\n table: consoleTablePolyfill,\n group: consoleGroupPolyfill,\n groupEnd: consoleGroupEndPolyfill,\n groupCollapsed: consoleGroupCollapsedPolyfill,\n assert: consoleAssertPolyfill,\n };\n\n // TODO(T206796580): This was copy-pasted from ExceptionsManager.js\n // Delete the copy there after the c++ pipeline is rolled out everywhere.\n if (global.RN$useAlwaysAvailableJSErrorHandling === true) {\n let originalConsoleError = console.error;\n console.reportErrorsAsExceptions = true;\n function stringifySafe(arg) {\n return inspect(arg, {depth: 10}).replace(/\\n\\s*/g, ' ');\n }\n console.error = function (...args) {\n originalConsoleError.apply(this, args);\n if (!console.reportErrorsAsExceptions) {\n return;\n }\n if (global.RN$inExceptionHandler?.()) {\n return;\n }\n let error;\n\n const firstArg = args[0];\n if (firstArg?.stack) {\n // RN$handleException will console.error this with high enough fidelity.\n error = firstArg;\n } else {\n if (typeof firstArg === 'string' && firstArg.startsWith('Warning: ')) {\n // React warnings use console.error so that a stack trace is shown, but\n // we don't (currently) want these to show a redbox\n return;\n }\n const message = args\n .map(arg => (typeof arg === 'string' ? arg : stringifySafe(arg)))\n .join(' ');\n\n error = new Error(message);\n error.name = 'console.error';\n }\n\n const isFatal = false;\n const reportToConsole = false;\n global.RN$handleException(error, isFatal, reportToConsole);\n };\n }\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n\n // If available, also call the original `console` method since that is\n // sometimes useful. Ex: on OS X, this will let you see rich output in\n // the Safari Web Inspector console.\n if (__DEV__ && originalConsole) {\n Object.keys(console).forEach(methodName => {\n const reactNativeMethod = console[methodName];\n if (\n originalConsole[methodName] &&\n reactNativeMethod !== originalConsole[methodName]\n ) {\n console[methodName] = function () {\n originalConsole[methodName](...arguments);\n reactNativeMethod.apply(console, arguments);\n };\n }\n });\n\n // The following methods are not supported by this polyfill but\n // we still should pass them to original console if they are\n // supported by it.\n ['clear', 'dir', 'dirxml', 'profile', 'profileEnd'].forEach(methodName => {\n if (typeof originalConsole[methodName] === 'function') {\n console[methodName] = function () {\n originalConsole[methodName](...arguments);\n };\n }\n });\n }\n} else if (!global.console) {\n function stub() {}\n const log = global.print || stub;\n\n global.console = {\n debug: log,\n error: log,\n info: log,\n log: log,\n trace: log,\n warn: log,\n assert(expression, label) {\n if (!expression) {\n log('Assertion failed: ' + label);\n }\n },\n clear: stub,\n dir: stub,\n dirxml: stub,\n group: stub,\n groupCollapsed: stub,\n groupEnd: stub,\n profile: stub,\n profileEnd: stub,\n table: stub,\n timeStamp: stub,\n };\n\n Object.defineProperty(console, '_isPolyfilled', {\n value: true,\n enumerable: false,\n });\n}\n","/**\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 *\n * @flow strict\n * @format\n * @polyfill\n */\n\nlet _inGuard = 0;\n\ntype ErrorHandler = (error: mixed, isFatal: boolean) => void;\ntype Fn = (...Args) => Return;\n\n/**\n * This is the error handler that is called when we encounter an exception\n * when loading a module. This will report any errors encountered before\n * ExceptionsManager is configured.\n */\nlet _globalHandler: ErrorHandler =\n global.RN$useAlwaysAvailableJSErrorHandling === true\n ? global.RN$handleException\n : (e: mixed, isFatal: boolean) => {\n throw e;\n };\n\n/**\n * The particular require runtime that we are using looks for a global\n * `ErrorUtils` object and if it exists, then it requires modules with the\n * error handler specified via ErrorUtils.setGlobalHandler by calling the\n * require function with applyWithGuard. Since the require module is loaded\n * before any of the modules, this ErrorUtils must be defined (and the handler\n * set) globally before requiring anything.\n */\nconst ErrorUtils = {\n setGlobalHandler(fun: ErrorHandler): void {\n _globalHandler = fun;\n },\n getGlobalHandler(): ErrorHandler {\n return _globalHandler;\n },\n reportError(error: mixed): void {\n _globalHandler && _globalHandler(error, false);\n },\n reportFatalError(error: mixed): void {\n // NOTE: This has an untyped call site in Metro.\n _globalHandler && _globalHandler(error, true);\n },\n applyWithGuard, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n // Unused, but some code synced from www sets it to null.\n unused_onError?: null,\n // Some callers pass a name here, which we ignore.\n unused_name?: ?string,\n ): ?TOut {\n try {\n _inGuard++;\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } catch (e) {\n ErrorUtils.reportError(e);\n } finally {\n _inGuard--;\n }\n return null;\n },\n applyWithGuardIfNeeded, TOut>(\n fun: Fn,\n context?: ?mixed,\n args?: ?TArgs,\n ): ?TOut {\n if (ErrorUtils.inGuard()) {\n /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,\n * null) is fine. (2) array -> rest array should work */\n return fun.apply(context, args);\n } else {\n ErrorUtils.applyWithGuard(fun, context, args);\n }\n return null;\n },\n inGuard(): boolean {\n return !!_inGuard;\n },\n guard, TOut>(\n fun: Fn,\n name?: ?string,\n context?: ?mixed,\n ): ?(...TArgs) => ?TOut {\n // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types\n // should be sufficient.\n if (typeof fun !== 'function') {\n console.warn('A function must be passed to ErrorUtils.guard, got ', fun);\n return null;\n }\n const guardName = name ?? fun.name ?? '';\n /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by\n * Flow's LTI update could not be added via codemod */\n function guarded(...args: TArgs): ?TOut {\n return ErrorUtils.applyWithGuard(\n fun,\n context ?? this,\n args,\n null,\n guardName,\n );\n }\n\n return guarded;\n },\n};\n\nglobal.ErrorUtils = ErrorUtils;\n\nexport type ErrorUtilsT = typeof ErrorUtils;\n","function c() { throw new Error(\"kaboom from Hermes\"); }\nfunction b() { c(); }\nfunction a() { b(); }\na();\n"],"x_facebook_sources":[null,[{"names":["","","clear","getModuleIdForVerboseName","define","metroRequire","initializingModuleIds.slice.map$argument_0","shouldPrintRequireCycle","isIgnored","regExps.some$argument_0","modules.every$argument_0","metroImportDefault","metroImportAll","fallbackRequireContext","fallbackRequireResolveWeak","guardedLoadModule","unpackModuleId","packModuleId","registerSegment","moduleIds.forEach$argument_0","loadModuleImplementation","global.$RefreshReg$","unknownModuleError","metroRequire.Systrace.beginEvent","metroRequire.Systrace.endEvent","metroRequire.getModules","createHotReloadingObject","hot.accept","hot.dispose","metroHotUpdateModule","topologicalSort$argument_1","topologicalSort$argument_2","setTimeout$argument_0","topologicalSort","traverseDependentNodes","dependentNodes.forEach$argument_0","roots.forEach$argument_0","runUpdatedModule","performFullRefresh","isReactRefreshBoundary","shouldInvalidateReactRefreshBoundary","getRefreshBoundarySignature","registerExportsForReactRefresh","requireSystrace","requireRefresh"],"mappings":"AAA;gDCW,QD;gDCC,oBD;AEE;CFG;kCGG;GHM;AIG;CJ8B;AKC;aCuB,mDD;CLe;AOC;oBCM;mCCC,+BD,CD;uBGC,8BH;CPC;AWC;CXkB;AYE;CZ2B;uBaE;CbS;2BcC;CdO;AeE;Cfc;AgBG;ChBO;AiBE;CjBE;AkBI;sBCgB;KDI;ClBE;AoBC;8BC0C;SDI;CpBgD;AsBC;CtBQ;gBuBG,QvB;cwBC,QxB;4ByBE;GzBE;iC0BC;cCK;ODG;eEC;OFE;G1BG;+B6BE;QCyB;SDmC;QEC,gBF;yCGqF;SHG;G7BG;0BiCC;ICI;6BCc;ODE;KDG;kBGC;KHE;GjCE;2BqCC;GrCsD;6BsCC;GtCmB;+BuCC;GvCwB;6CwCC;GxCgB;oCyCC;GzCmB;uC0CC;G1Cc;wB2CI;G3CI;uB4CC;G5CM"}],[{"names":["","","inspect","stylizeNoColor","arrayToHash","array.forEach$argument_0","formatValue","keys.map$argument_0","formatPrimitive","formatError","formatArray","keys.forEach$argument_0","formatProperty","str.split.map$argument_0","reduceToSingleString","output.reduce$argument_0","isArray","isBoolean","isNull","isNullOrUndefined","isNumber","isString","isSymbol","isUndefined","isRegExp","isObject","isDate","isError","isFunction","objectToString","hasOwnProperty","getNativeLogFunction","Array.prototype.map.call$argument_1","repeat","Array.apply.map$argument_0","formatCellValue","consoleTablePolyfill","data.map$argument_0","rows.reduce$argument_0","Object.keys.forEach$argument_0","columns.forEach$argument_0","joinRow","row.map$argument_0","columnWidths.map$argument_0","groupFormat","consoleGroupPolyfill","consoleGroupCollapsedPolyfill","consoleGroupEndPolyfill","consoleAssertPolyfill","consoleTimeStampPolyfill","stringifySafe","error","args.map$argument_0","methodName","forEach$argument_0","stub","global.console.assert"],"mappings":"AAA;iBCoB;ECwB;GDO;EEE;GFE;EGE;kBCG;KDE;GHG;EKE;wBC2F;ODS;GLM;EOE;GPgB;EQE;GRE;ESE;iBCkB;KDM;GTE;EWE;mBC4B;eDE;qBCQ;iBDE;GX0B;EaE;+BCE;KDI;Gbc;EeI;GfE;EgBE;GhBE;EiBE;GjBE;EkBE;GlBE;EmBE;GnBE;EoBE;GpBE;EqBE;GrBE;EsBE;GtBE;EuBE;GvBE;EwBE;GxBE;EyBE;GzBE;E0BE;G1BK;E2BE;G3BE;E4BE;G5BE;E6BE;G7BE;CDG;A+BU;S9BC;yB+BM;S/BE;G8B2B;C/BC;AiCE;yCCC;GDE;CjCC;AmCE;CnCoB;AoCE;oBCK;KDK;kBEqB;iCCC,yBD;OFE;kBIQ;GJQ;EKI;wBCC;KDG;GLG;oCOE;GPE;CpCc;A4CQ;C5CG;A6CE;C7CG;A8CE;C9CG;A+CE;C/CG;AgDE;ChDI;AiDK,sCjD;IkDiC;KlDE;oBmDC;eCqB,2DD;KnDU;iCuCY;8BcM;SdG;KvCE;gEsDK;8BDE;SCE;KtDE;EuDG,kBvD;IwDU;KxDI"}],[{"names":["","","ErrorUtils.setGlobalHandler","ErrorUtils.getGlobalHandler","ErrorUtils.reportError","ErrorUtils.reportFatalError","ErrorUtils.applyWithGuard","ErrorUtils.applyWithGuardIfNeeded","ErrorUtils.inGuard","ErrorUtils.guard","guarded"],"mappings":"AAA;MCwB;ODE;EEW;GFE;EGC;GHE;EIC;GJE;EKC;GLG;EMC;GNsB;EOC;GPe;EQC;GRE;ESC;ICc;KDQ;GTG"}],[{"names":["c","","b","a"],"mappings":"AAA,uDC;ACC,qBD;AEC,qBF"}]],"x_google_ignoreList":[0,1,2,3],"names":["global","__r","metroRequire","__METRO_GLOBAL_PREFIX__","define","__c","clear","__registerSegment","registerSegment","modules","EMPTY","CYCLE_DETECTED","_ref","hasOwnProperty","Map","factory","moduleId","dependencyMap","has","mod","hasError","importedAll","importedDefault","isInitialized","publicModule","exports","set","maybeNameForDev","Error","moduleIdReallyIsNumber","module","get","guardedLoadModule","metroImportDefault","maybeInitializedModule","__esModule","default","initializedModule","importDefault","metroImportAll","key","call","importAll","context","fallbackRequireContext","resolveWeak","fallbackRequireResolveWeak","inGuard","ErrorUtils","returnValue","loadModuleImplementation","e","reportFatalError","ID_MASK_SHIFT","LOCAL_ID_MASK","unpackModuleId","segmentId","localId","packModuleId","value","moduleDefinersBySegmentID","definingSegmentByModuleID","moduleDefiner","moduleIds","forEach","length","_definingSegmentByMod","definer","delete","nativeRequire","_unpackModuleId","unknownModuleError","error","_module","moduleObject","id","undefined","message","globalThis","window","inspect","obj","opts","ctx","seen","formatValueCalls","stylize","stylizeNoColor","formatValue","depth","str","styleType","arrayToHash","array","hash","val","idx","recurseTimes","primitive","formatPrimitive","keys","Object","visibleKeys","isError","indexOf","formatError","isFunction","name","isRegExp","RegExp","prototype","toString","isDate","Date","base","braces","isArray","n","toUTCString","push","output","formatArray","map","formatProperty","pop","reduceToSingleString","isUndefined","isString","simple","JSON","stringify","replace","isNumber","isBoolean","isNull","i","l","String","match","desc","getOwnPropertyDescriptor","split","line","join","slice","numLinesEst","reduce","prev","cur","ar","Array","arg","re","isObject","objectToString","d","o","prop","INDEX_COLUMN_NAME","LOG_LEVELS","trace","info","warn","getNativeLogFunction","level","arguments","firstArg","logLevel","groupStack","groupFormat","nativeLoggingHook","repeat","element","apply","formatCellValue","cell","cellValue","consoleTablePolyfill","data","columns","rows","row","index","processedRow","assign","concat","from","columnSet","add","Set","stringRows","columnWidths","k","j","cellStr","Math","max","joinRow","space","cells","extraSpaces","separators","columnWidth","separatorRow","header","table","GROUP_PAD","GROUP_OPEN","GROUP_CLOSE","prefix","msg","consoleGroupPolyfill","label","consoleGroupCollapsedPolyfill","consoleGroupEndPolyfill","consoleAssertPolyfill","expression","consoleTimeStampPolyfill","originalConsole","console","timeStamp","log","debug","group","groupEnd","groupCollapsed","assert","RN$useAlwaysAvailableJSErrorHandling","stringifySafe","originalConsoleError","reportErrorsAsExceptions","_len","args","_key","RN$inExceptionHandler","stack","startsWith","isFatal","reportToConsole","RN$handleException","defineProperty","enumerable","stub","print","dir","dirxml","profile","profileEnd","_inGuard","_globalHandler","setGlobalHandler","fun","getGlobalHandler","reportError","applyWithGuard","unused_onError","unused_name","applyWithGuardIfNeeded","guard","guardName","guarded","c","b","a"],"mappings":";;ECAA,YAAY;;EAEZA,MAAM,CAACC,GAAG,GAAGC,YAAY;EACzBF,MAAM,CAAC,GAAGG,uBAAuB,KAAK,CAAC,GAAGC,MAAM;EAChDJ,MAAM,CAACK,GAAG,GAAGC,KAAK;EAClBN,MAAM,CAACO,iBAAiB,GAAGC,eAAe;EAC1C,IAAIC,OAAO,GAAGH,KAAK,CAAC,CAAC;EACrB,IAAMI,KAAK,GAAG,CAAC,CAAC;EAChB,IAAMC,cAAc,GAAG,CAAC,CAAC;EACzB,IAAAC,IAAA,GAA2B,CAAC,CAAC;IAArBC,cAAc,GAAAD,IAAA,CAAdC,cAAc;EAKtB,SAASP,KAAKA,CAAA,EAAG;IACfG,OAAO,GAAG,IAAIK,GAAG,CAAC,CAAC;IACnB,OAAOL,OAAO;EAChB;EAYA,SAASL,MAAMA,CAACW,OAAO,EAAEC,QAAQ,EAAEC,aAAa,EAAE;IAChD,IAAIR,OAAO,CAACS,GAAG,CAACF,QAAQ,CAAC,EAAE;MAOzB;IACF;IACA,IAAMG,GAAG,GAAG;MACVF,aAAa,EAAbA,aAAa;MACbF,OAAO,EAAPA,OAAO;MACPK,QAAQ,EAAE,KAAK;MACf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F,KAAA,CAAAiF,IAAA,GAAAE,IAAA,MAAAA,IAAA,GAAAF,IAAA,EAAAE,IAAA;UAAJD,IAAI,CAAAC,IAAA,IAAApE,SAAA,CAAAoE,IAAA;QAAA;QACtB,OAAOzL,UAAU,CAAC8M,cAAc,CAC9BH,GAAG,EACHhN,OAAO,WAAPA,OAAO,GAAI,IAAI,EACf6L,IAAI,EACJ,IAAI,EACJ2B,SACF,CAAC;MACH;MAEA,OAAOC,OAAO;IAChB;EACF,CAAC;EAEDpQ,MAAM,CAACgD,UAAU,GAAGA,UAAU;AAAC,UAAA8B,UAAA,mBAAAA,UAAA,UAAA9E,MAAA,mBAAAA,MAAA,UAAA+E,MAAA,mBAAAA,MAAA,S;;ECxH/B,SAASsL,CAACA,CAAA,EAAG;IAAE,MAAM,IAAIzO,KAAK,CAAC,oBAAoB,CAAC;EAAE;EACtD,SAAS0O,CAACA,CAAA,EAAG;IAAED,CAAC,CAAC,CAAC;EAAE;EACpB,SAASE,CAACA,CAAA,EAAG;IAAED,CAAC,CAAC,CAAC;EAAE;EACpBC,CAAC,CAAC,CAAC;AAAC,G"} \ No newline at end of file diff --git a/rust/cymbal/tests/static/hermes/raw_stack.txt b/rust/cymbal/tests/static/hermes/raw_stack.txt new file mode 100644 index 0000000000..0835cf0fa3 --- /dev/null +++ b/rust/cymbal/tests/static/hermes/raw_stack.txt @@ -0,0 +1,8 @@ +Uncaught Error: kaboom from Hermes + at c (address at ./build/android/index.android.bundle.hbc:1:8258) + at b (address at ./build/android/index.android.bundle.hbc:1:8277) + at anonymous (address at ./build/android/index.android.bundle.hbc:1:8228) + at loadModuleImplementation (address at ./build/android/index.android.bundle.hbc:1:1755) + at guardedLoadModule (address at ./build/android/index.android.bundle.hbc:1:1249) + at metroRequire (address at ./build/android/index.android.bundle.hbc:1:894) + at global (address at ./build/android/index.android.bundle.hbc:1:425)