diff --git a/Cargo.lock b/Cargo.lock index 3b3057e7..e8bab4f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -118,9 +118,9 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bcder" @@ -158,9 +158,9 @@ checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.92" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2678b2e3449475e95b0aa6f9b506a28e61b3dc8996592b983695e8ebb58a8b41" +checksum = "065a29261d53ba54260972629f9ca6bffa69bac13cd1fed61420f7fa68b9f8bd" [[package]] name = "cfg-if" @@ -170,9 +170,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "arbitrary", @@ -181,7 +181,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -247,15 +247,6 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - [[package]] name = "crossbeam-queue" version = "0.3.11" @@ -314,18 +305,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "encoding_rs" -version = "0.8.34" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if", -] +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "equivalent" @@ -354,31 +336,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" - -[[package]] -name = "filetime" -version = "0.2.23" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "windows-sys 0.52.0", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fnv" @@ -516,30 +476,11 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -564,17 +505,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -586,17 +516,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.0" @@ -604,7 +523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -615,8 +534,8 @@ checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", "futures-core", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "pin-project-lite", ] @@ -634,39 +553,15 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "httparse", "httpdate", "itoa", @@ -676,20 +571,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.28", - "rustls 0.21.10", - "tokio", - "tokio-rustls 0.24.1", -] - [[package]] name = "hyper-rustls" version = "0.26.0" @@ -697,10 +578,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" dependencies = [ "futures-util", - "http 1.1.0", - "hyper 1.2.0", + "http", + "hyper", "hyper-util", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "tokio", "tokio-rustls 0.25.0", @@ -715,7 +596,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.2.0", + "hyper", "hyper-util", "native-tls", "tokio", @@ -732,9 +613,9 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.2.0", + "http", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -815,9 +696,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libredox" @@ -1086,9 +967,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -1141,15 +1022,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_users" version = "0.4.5" @@ -1161,63 +1033,22 @@ dependencies = [ "thiserror", ] -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls 0.24.2", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.10", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-rustls 0.24.1", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.4", - "winreg 0.50.0", -] - [[package]] name = "reqwest" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.1.0", - "http-body 1.0.0", + "http", + "http-body", "http-body-util", - "hyper 1.2.0", - "hyper-rustls 0.26.0", + "hyper", + "hyper-rustls", "hyper-tls", "hyper-util", "ipnet", @@ -1228,7 +1059,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pemfile 2.1.2", "rustls-pki-types", "serde", @@ -1244,8 +1075,8 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.26.1", - "winreg 0.52.0", + "webpki-roots", + "winreg", ] [[package]] @@ -1276,16 +1107,15 @@ dependencies = [ "form_urlencoded", "futures", "http-body-util", - "hyper 1.2.0", + "hyper", "hyper-util", "listenfd", "log", "nix", "pin-project-lite", "rand", - "reqwest 0.12.4", + "reqwest", "ring", - "routinator-ui", "rpki", "rustls-pemfile 1.0.4", "serde", @@ -1299,17 +1129,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "routinator-ui" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b93eb434f0d58c19ab098008bda682fc2e8f2918f3b6f64dcb8c34c3fc8fba" -dependencies = [ - "flate2", - "reqwest 0.11.27", - "tar", -] - [[package]] name = "rpki" version = "0.18.2-dev" @@ -1340,9 +1159,9 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.38.32" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", @@ -1353,9 +1172,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", @@ -1365,14 +1184,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.3" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.2", + "rustls-webpki 0.102.3", "subtle", "zeroize", ] @@ -1392,15 +1211,15 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ - "base64 0.22.0", + "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" +checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" [[package]] name = "rustls-webpki" @@ -1414,9 +1233,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.2" +version = "0.102.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" dependencies = [ "ring", "rustls-pki-types", @@ -1473,18 +1292,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" dependencies = [ "proc-macro2", "quote", @@ -1493,9 +1312,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.115" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa", "ryu", @@ -1516,9 +1335,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -1546,9 +1365,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1574,9 +1393,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.58" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -1591,9 +1410,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "syslog" -version = "6.1.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7434e95bcccce1215d30f4bf84fe8c00e8de1b9be4fb736d747ca53d36e7f96f" +checksum = "dfc7e95b5b795122fafe6519e27629b5ab4232c73ebb2428f568e82b1a457ad3" dependencies = [ "error-chain", "hostname", @@ -1602,38 +1421,6 @@ dependencies = [ "time", ] -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" -dependencies = [ - "filetime", - "libc", - "xattr", -] - [[package]] name = "tempfile" version = "3.10.1" @@ -1658,18 +1445,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" dependencies = [ "proc-macro2", "quote", @@ -1769,7 +1556,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] @@ -1779,7 +1566,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls 0.22.3", + "rustls 0.22.4", "rustls-pki-types", "tokio", ] @@ -1807,20 +1594,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - [[package]] name = "toml_datetime" version = "0.6.5" @@ -2045,12 +1818,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.1" @@ -2088,7 +1855,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -2106,7 +1873,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -2126,17 +1893,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -2147,9 +1915,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -2159,9 +1927,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -2171,9 +1939,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.4" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -2183,9 +1957,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -2195,9 +1969,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -2207,9 +1981,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -2219,9 +1993,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.4" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -2232,16 +2006,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "winreg" version = "0.52.0" @@ -2252,17 +2016,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "xattr" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" -dependencies = [ - "libc", - "linux-raw-sys", - "rustix", -] - [[package]] name = "zeroize" version = "1.7.0" diff --git a/Cargo.toml b/Cargo.toml index c6ea05e0..32003376 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,6 @@ tokio = { version = "1.24", features = [ "io-util", "macros", "process tokio-rustls = "0.24.1" toml_edit = "0.20" uuid = "1.1" -routinator-ui = { version = "0.3.4", optional = true } [target.'cfg(unix)'.dependencies] @@ -57,7 +56,7 @@ native-tls = [ "reqwest/native-tls", "tls" ] rta = [] socks = [ "reqwest/socks" ] tls = [] -ui = [ "routinator-ui" ] +ui = [] [profile.release] panic = "abort" diff --git a/build.rs b/build.rs new file mode 100644 index 00000000..d1bb5b68 --- /dev/null +++ b/build.rs @@ -0,0 +1,134 @@ +//! Build script. +//! +//! This script collects the assets for serving the Routinator UI and creates +//! a module for them in `$OUT_DIR/ui_assets.rs`. +//! +//! If built without the ui feature, does nothing. +use std::{env, fs, io, process}; +use std::path::{PathBuf, Path}; + + +const UI_DIR: &str = "contrib/ui"; +const RS_FILE: &str = "ui_assets.rs"; + +const TYPES: &[(&str, &str)] = &[ + ("css", "text/css"), + ("html", "text/html"), + ("js", "text/javascript"), + ("svg", "image/svg+xml") +]; + +struct Asset { + path: PathBuf, + media_type: &'static str, + content: Vec, +} + +#[derive(Default)] +struct Assets(Vec); + +impl Assets { + fn load_dir(&mut self, path: PathBuf) -> Result<(), String> { + let dir = fs::read_dir(&path).map_err(|err| { + format!("Failed to open directory {}: {}", path.display(), err) + })?; + for entry in dir { + let entry = entry.map_err(|err| { + format!("Failed to read directory {}: {}", path.display(), err) + })?; + let path = entry.path(); + if path.is_dir() { + self.load_dir(path)?; + } + else { + let path_ext = match path.extension().and_then(|s| s.to_str()) { + Some(ext) => ext, + None => continue, + }; + for (type_ext, media_type) in TYPES { + if path_ext == *type_ext { + self.0.push(Asset { + path: path.strip_prefix(UI_DIR).map_err(|_| { + format!("Asset path {} not under {}", + path.display(), UI_DIR + ) + })?.into(), + media_type, + content: fs::read(&path).map_err(|err| { + format!( + "Failed to read UI asset file {}: {}.", + path.display(), err + ) + })? + }) + } + } + } + } + Ok(()) + } + + fn write_mod(self, dest: &mut impl io::Write) -> Result<(), io::Error> { + dest.write_all( + r#" + pub struct Asset { + pub path: &'static str, + pub media_type: &'static str, + pub content: &'static [u8], + } + + pub static ASSETS: &[Asset] = &[ + "#.as_ref() + )?; + for item in self.0 { + writeln!(dest, + " + Asset {{ + path: r#\"{}\"#, + media_type: \"{}\", + content: &{:?}, + }}, + ", + item.path.display(), + item.media_type, + item.content.as_slice(), + )?; + } + writeln!(dest, "];") + } +} + + +fn main() { + if env::var_os("CARGO_FEATURE_UI").is_none() { + return + } + + let out_dir = env::var_os("OUT_DIR").unwrap_or_default(); + let target_path = Path::new(&out_dir).join(RS_FILE); + let mut target = match fs::File::create(&target_path) { + Ok(target) => io::BufWriter::new(target), + Err(err) => { + eprintln!("Failed to open assets module file {}: {}", + target_path.display(), err + ); + process::exit(1); + } + }; + + let mut assets = Assets::default(); + if let Err(err) = assets.load_dir(UI_DIR.into()) { + eprintln!("{}", err); + process::exit(1); + } + + if let Err(err) = assets.write_mod(&mut target) { + eprintln!("Failed to write to assets module file {}: {}", + target_path.display(), err + ); + process::exit(1) + } + + println!("cargo:rerun-if-changed={}", UI_DIR); +} + diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 00000000..5af1242a --- /dev/null +++ b/contrib/README.md @@ -0,0 +1,17 @@ +This directory contains data from external projects imported into this +repository for convenience. + +Currently, these are: + + +# `ui` – Routinator UI + +Project: https://github.com/NLnetLabs/routinator-ui + +Included version: 0.4.0 + +Import with: + +* `yarn build --base /ui` +* `cp -r public/* $ROUTINATOR/contrib/ui` + diff --git a/contrib/ui/assets/afrinic-CpNTeCk2.svg b/contrib/ui/assets/afrinic-CpNTeCk2.svg new file mode 100644 index 00000000..e62f900a --- /dev/null +++ b/contrib/ui/assets/afrinic-CpNTeCk2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/contrib/ui/assets/favicon-BJPY1B5p.ico b/contrib/ui/assets/favicon-BJPY1B5p.ico new file mode 100644 index 00000000..d388fde8 Binary files /dev/null and b/contrib/ui/assets/favicon-BJPY1B5p.ico differ diff --git a/contrib/ui/assets/index-DrDicvl-.js b/contrib/ui/assets/index-DrDicvl-.js new file mode 100644 index 00000000..3f704d8d --- /dev/null +++ b/contrib/ui/assets/index-DrDicvl-.js @@ -0,0 +1,51 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();var us={exports:{}},ul={},ss={exports:{}},z={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var er=Symbol.for("react.element"),Tc=Symbol.for("react.portal"),zc=Symbol.for("react.fragment"),Oc=Symbol.for("react.strict_mode"),Ic=Symbol.for("react.profiler"),Dc=Symbol.for("react.provider"),Fc=Symbol.for("react.context"),Mc=Symbol.for("react.forward_ref"),Ac=Symbol.for("react.suspense"),$c=Symbol.for("react.memo"),Uc=Symbol.for("react.lazy"),Yo=Symbol.iterator;function Vc(e){return e===null||typeof e!="object"?null:(e=Yo&&e[Yo]||e["@@iterator"],typeof e=="function"?e:null)}var as={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cs=Object.assign,ds={};function dn(e,t,n){this.props=e,this.context=t,this.refs=ds,this.updater=n||as}dn.prototype.isReactComponent={};dn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};dn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function fs(){}fs.prototype=dn.prototype;function Ji(e,t,n){this.props=e,this.context=t,this.refs=ds,this.updater=n||as}var qi=Ji.prototype=new fs;qi.constructor=Ji;cs(qi,dn.prototype);qi.isPureReactComponent=!0;var Xo=Array.isArray,ps=Object.prototype.hasOwnProperty,bi={current:null},hs={key:!0,ref:!0,__self:!0,__source:!0};function ms(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)ps.call(t,r)&&!hs.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,q=C[G];if(0>>1;Gl(Pl,L))wtl(or,Pl)?(C[G]=or,C[wt]=L,G=wt):(C[G]=Pl,C[St]=L,G=St);else if(wtl(or,L))C[G]=or,C[wt]=L,G=wt;else break e}}return R}function l(C,R){var L=C.sortIndex-R.sortIndex;return L!==0?L:C.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var a=[],c=[],m=1,v=null,h=3,x=!1,w=!1,S=!1,D=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(C){for(var R=n(c);R!==null;){if(R.callback===null)r(c);else if(R.startTime<=C)r(c),R.sortIndex=R.expirationTime,t(a,R);else break;R=n(c)}}function g(C){if(S=!1,p(C),!w)if(n(a)!==null)w=!0,Cl(k);else{var R=n(c);R!==null&&El(g,R.startTime-C)}}function k(C,R){w=!1,S&&(S=!1,f(N),N=-1),x=!0;var L=h;try{for(p(R),v=n(a);v!==null&&(!(v.expirationTime>R)||C&&!Re());){var G=v.callback;if(typeof G=="function"){v.callback=null,h=v.priorityLevel;var q=G(v.expirationTime<=R);R=e.unstable_now(),typeof q=="function"?v.callback=q:v===n(a)&&r(a),p(R)}else r(a);v=n(a)}if(v!==null)var ir=!0;else{var St=n(c);St!==null&&El(g,St.startTime-R),ir=!1}return ir}finally{v=null,h=L,x=!1}}var E=!1,P=null,N=-1,F=5,_=-1;function Re(){return!(e.unstable_now()-_C||125G?(C.sortIndex=L,t(c,C),n(a)===null&&C===n(c)&&(S?(f(N),N=-1):S=!0,El(g,L-G))):(C.sortIndex=q,t(a,C),w||x||(w=!0,Cl(k))),C},e.unstable_shouldYield=Re,e.unstable_wrapCallback=function(C){var R=h;return function(){var L=h;h=R;try{return C.apply(this,arguments)}finally{h=L}}}})(xs);ys.exports=xs;var qc=ys.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ss=T,Se=qc;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ni=Object.prototype.hasOwnProperty,bc=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Jo={},qo={};function ed(e){return ni.call(qo,e)?!0:ni.call(Jo,e)?!1:bc.test(e)?qo[e]=!0:(Jo[e]=!0,!1)}function td(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nd(e,t,n,r){if(t===null||typeof t>"u"||td(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function de(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){re[e]=new de(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];re[t]=new de(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){re[e]=new de(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){re[e]=new de(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){re[e]=new de(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){re[e]=new de(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){re[e]=new de(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){re[e]=new de(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){re[e]=new de(e,5,!1,e.toLowerCase(),null,!1,!1)});var to=/[\-:]([a-z])/g;function no(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(to,no);re[t]=new de(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(to,no);re[t]=new de(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(to,no);re[t]=new de(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){re[e]=new de(e,1,!1,e.toLowerCase(),null,!1,!1)});re.xlinkHref=new de("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){re[e]=new de(e,1,!1,e.toLowerCase(),null,!0,!0)});function ro(e,t,n,r){var l=re.hasOwnProperty(t)?re[t]:null;(l!==null?l.type!==0:r||!(2u||l[o]!==i[u]){var a=` +`+l[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=u);break}}}finally{Rl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Cn(e):""}function rd(e){switch(e.tag){case 5:return Cn(e.type);case 16:return Cn("Lazy");case 13:return Cn("Suspense");case 19:return Cn("SuspenseList");case 0:case 2:case 15:return e=Ll(e.type,!1),e;case 11:return e=Ll(e.type.render,!1),e;case 1:return e=Ll(e.type,!0),e;default:return""}}function oi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case At:return"Fragment";case Mt:return"Portal";case ri:return"Profiler";case lo:return"StrictMode";case li:return"Suspense";case ii:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case js:return(e.displayName||"Context")+".Consumer";case ks:return(e._context.displayName||"Context")+".Provider";case io:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oo:return t=e.displayName||null,t!==null?t:oi(e.type)||"Memo";case et:t=e._payload,e=e._init;try{return oi(e(t))}catch{}}return null}function ld(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oi(t);case 8:return t===lo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Es(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function id(e){var t=Es(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ar(e){e._valueTracker||(e._valueTracker=id(e))}function Ps(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Es(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ui(e,t){var n=t.checked;return H({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function eu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ht(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ns(e,t){t=t.checked,t!=null&&ro(e,"checked",t,!1)}function si(e,t){Ns(e,t);var n=ht(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ai(e,t.type,n):t.hasOwnProperty("defaultValue")&&ai(e,t.type,ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function tu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ai(e,t,n){(t!=="number"||Mr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var En=Array.isArray;function Zt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=cr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function An(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _n={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},od=["Webkit","ms","Moz","O"];Object.keys(_n).forEach(function(e){od.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_n[t]=_n[e]})});function Ts(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_n.hasOwnProperty(e)&&_n[e]?(""+t).trim():t+"px"}function zs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Ts(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var ud=H({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fi(e,t){if(t){if(ud[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(y(62))}}function pi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hi=null;function uo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mi=null,Jt=null,qt=null;function lu(e){if(e=rr(e)){if(typeof mi!="function")throw Error(y(280));var t=e.stateNode;t&&(t=fl(t),mi(e.stateNode,e.type,t))}}function Os(e){Jt?qt?qt.push(e):qt=[e]:Jt=e}function Is(){if(Jt){var e=Jt,t=qt;if(qt=Jt=null,lu(e),t)for(e=0;e>>=0,e===0?32:31-(yd(e)/xd|0)|0}var dr=64,fr=4194304;function Pn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=Pn(u):(i&=o,i!==0&&(r=Pn(i)))}else o=n&~l,o!==0?r=Pn(o):i!==0&&(r=Pn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function tr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ie(t),e[t]=n}function jd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ln),pu=" ",hu=!1;function ea(e,t){switch(e){case"keyup":return Jd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ta(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $t=!1;function bd(e,t){switch(e){case"compositionend":return ta(t);case"keypress":return t.which!==32?null:(hu=!0,pu);case"textInput":return e=t.data,e===pu&&hu?null:e;default:return null}}function ef(e,t){if($t)return e==="compositionend"||!vo&&ea(e,t)?(e=qs(),Nr=po=lt=null,$t=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yu(n)}}function ia(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ia(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oa(){for(var e=window,t=Mr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mr(e.document)}return t}function go(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function cf(e){var t=oa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ia(n.ownerDocument.documentElement,n)){if(r!==null&&go(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=xu(n,i);var o=xu(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ut=null,wi=null,zn=null,ki=!1;function Su(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ki||Ut==null||Ut!==Mr(r)||(r=Ut,"selectionStart"in r&&go(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zn&&Hn(zn,r)||(zn=r,r=Hr(wi,"onSelect"),0Wt||(e.current=_i[Wt],_i[Wt]=null,Wt--)}function A(e,t){Wt++,_i[Wt]=e.current,e.current=t}var mt={},ue=gt(mt),he=gt(!1),Rt=mt;function rn(e,t){var n=e.type.contextTypes;if(!n)return mt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function me(e){return e=e.childContextTypes,e!=null}function Gr(){U(he),U(ue)}function Nu(e,t,n){if(ue.current!==mt)throw Error(y(168));A(ue,t),A(he,n)}function ma(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(y(108,ld(e)||"Unknown",l));return H({},n,r)}function Kr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mt,Rt=ue.current,A(ue,e),A(he,he.current),!0}function _u(e,t,n){var r=e.stateNode;if(!r)throw Error(y(169));n?(e=ma(e,t,Rt),r.__reactInternalMemoizedMergedChildContext=e,U(he),U(ue),A(ue,e)):U(he),A(he,n)}var He=null,pl=!1,Hl=!1;function va(e){He===null?He=[e]:He.push(e)}function kf(e){pl=!0,va(e)}function yt(){if(!Hl&&He!==null){Hl=!0;var e=0,t=I;try{var n=He;for(I=1;e>=o,l-=o,Qe=1<<32-Ie(t)+l|n<N?(F=P,P=null):F=P.sibling;var _=h(f,P,p[N],g);if(_===null){P===null&&(P=F);break}e&&P&&_.alternate===null&&t(f,P),d=i(_,d,N),E===null?k=_:E.sibling=_,E=_,P=F}if(N===p.length)return n(f,P),V&&kt(f,N),k;if(P===null){for(;NN?(F=P,P=null):F=P.sibling;var Re=h(f,P,_.value,g);if(Re===null){P===null&&(P=F);break}e&&P&&Re.alternate===null&&t(f,P),d=i(Re,d,N),E===null?k=Re:E.sibling=Re,E=Re,P=F}if(_.done)return n(f,P),V&&kt(f,N),k;if(P===null){for(;!_.done;N++,_=p.next())_=v(f,_.value,g),_!==null&&(d=i(_,d,N),E===null?k=_:E.sibling=_,E=_);return V&&kt(f,N),k}for(P=r(f,P);!_.done;N++,_=p.next())_=x(P,f,N,_.value,g),_!==null&&(e&&_.alternate!==null&&P.delete(_.key===null?N:_.key),d=i(_,d,N),E===null?k=_:E.sibling=_,E=_);return e&&P.forEach(function(hn){return t(f,hn)}),V&&kt(f,N),k}function D(f,d,p,g){if(typeof p=="object"&&p!==null&&p.type===At&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case sr:e:{for(var k=p.key,E=d;E!==null;){if(E.key===k){if(k=p.type,k===At){if(E.tag===7){n(f,E.sibling),d=l(E,p.props.children),d.return=f,f=d;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===et&&Du(k)===E.type){n(f,E.sibling),d=l(E,p.props),d.ref=wn(f,E,p),d.return=f,f=d;break e}n(f,E);break}else t(f,E);E=E.sibling}p.type===At?(d=_t(p.props.children,f.mode,g,p.key),d.return=f,f=d):(g=Dr(p.type,p.key,p.props,null,f.mode,g),g.ref=wn(f,d,p),g.return=f,f=g)}return o(f);case Mt:e:{for(E=p.key;d!==null;){if(d.key===E)if(d.tag===4&&d.stateNode.containerInfo===p.containerInfo&&d.stateNode.implementation===p.implementation){n(f,d.sibling),d=l(d,p.children||[]),d.return=f,f=d;break e}else{n(f,d);break}else t(f,d);d=d.sibling}d=ql(p,f.mode,g),d.return=f,f=d}return o(f);case et:return E=p._init,D(f,d,E(p._payload),g)}if(En(p))return w(f,d,p,g);if(vn(p))return S(f,d,p,g);xr(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,d!==null&&d.tag===6?(n(f,d.sibling),d=l(d,p),d.return=f,f=d):(n(f,d),d=Jl(p,f.mode,g),d.return=f,f=d),o(f)):n(f,d)}return D}var on=Ca(!0),Ea=Ca(!1),lr={},Ve=gt(lr),Yn=gt(lr),Xn=gt(lr);function Pt(e){if(e===lr)throw Error(y(174));return e}function Po(e,t){switch(A(Xn,t),A(Yn,e),A(Ve,lr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:di(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=di(t,e)}U(Ve),A(Ve,t)}function un(){U(Ve),U(Yn),U(Xn)}function Pa(e){Pt(Xn.current);var t=Pt(Ve.current),n=di(t,e.type);t!==n&&(A(Yn,e),A(Ve,n))}function No(e){Yn.current===e&&(U(Ve),U(Yn))}var B=gt(0);function br(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ql=[];function _o(){for(var e=0;en?n:4,e(!0);var r=Gl.transition;Gl.transition={};try{e(!1),t()}finally{I=n,Gl.transition=r}}function Ba(){return _e().memoizedState}function Pf(e,t,n){var r=ft(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wa(e))Ha(t,n);else if(n=Sa(e,t,n,r),n!==null){var l=ae();De(n,e,r,l),Qa(n,t,r)}}function Nf(e,t,n){var r=ft(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wa(e))Ha(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,u=i(o,n);if(l.hasEagerState=!0,l.eagerState=u,Fe(u,o)){var a=t.interleaved;a===null?(l.next=l,Co(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=Sa(e,t,l,r),n!==null&&(l=ae(),De(n,e,r,l),Qa(n,t,r))}}function Wa(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ha(e,t){On=el=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qa(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ao(e,n)}}var tl={readContext:Ne,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useInsertionEffect:le,useLayoutEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useMutableSource:le,useSyncExternalStore:le,useId:le,unstable_isNewReconciler:!1},_f={readContext:Ne,useCallback:function(e,t){return Ae().memoizedState=[e,t===void 0?null:t],e},useContext:Ne,useEffect:Mu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Tr(4194308,4,Ma.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Tr(4,2,e,t)},useMemo:function(e,t){var n=Ae();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ae();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Pf.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Ae();return e={current:e},t.memoizedState=e},useState:Fu,useDebugValue:Oo,useDeferredValue:function(e){return Ae().memoizedState=e},useTransition:function(){var e=Fu(!1),t=e[0];return e=Ef.bind(null,e[1]),Ae().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=W,l=Ae();if(V){if(n===void 0)throw Error(y(407));n=n()}else{if(n=t(),ee===null)throw Error(y(349));Tt&30||Ra(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Mu(Ta.bind(null,r,i,e),[e]),r.flags|=2048,qn(9,La.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ae(),t=ee.identifierPrefix;if(V){var n=Ge,r=Qe;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[$e]=t,e[Kn]=r,ec(e,t,!1,!1),t.stateNode=e;e:{switch(o=pi(n,r),n){case"dialog":$("cancel",e),$("close",e),l=r;break;case"iframe":case"object":case"embed":$("load",e),l=r;break;case"video":case"audio":for(l=0;lan&&(t.flags|=128,r=!0,kn(i,!1),t.lanes=4194304)}else{if(!r)if(e=br(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!V)return ie(t),null}else 2*K()-i.renderingStartTime>an&&n!==1073741824&&(t.flags|=128,r=!0,kn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=K(),t.sibling=null,n=B.current,A(B,r?n&1|2:n&1),t):(ie(t),null);case 22:case 23:return $o(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ge&1073741824&&(ie(t),t.subtreeFlags&6&&(t.flags|=8192)):ie(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function Ff(e,t){switch(xo(t),t.tag){case 1:return me(t.type)&&Gr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return un(),U(he),U(ue),_o(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return No(t),null;case 13:if(U(B),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));ln()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(B),null;case 4:return un(),null;case 10:return jo(t.type._context),null;case 22:case 23:return $o(),null;case 24:return null;default:return null}}var wr=!1,oe=!1,Mf=typeof WeakSet=="function"?WeakSet:Set,j=null;function Kt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function Ui(e,t,n){try{n()}catch(r){Q(e,t,r)}}var Gu=!1;function Af(e,t){if(ji=Br,e=oa(),go(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,a=-1,c=0,m=0,v=e,h=null;t:for(;;){for(var x;v!==n||l!==0&&v.nodeType!==3||(u=o+l),v!==i||r!==0&&v.nodeType!==3||(a=o+r),v.nodeType===3&&(o+=v.nodeValue.length),(x=v.firstChild)!==null;)h=v,v=x;for(;;){if(v===e)break t;if(h===n&&++c===l&&(u=o),h===i&&++m===r&&(a=o),(x=v.nextSibling)!==null)break;v=h,h=v.parentNode}v=x}n=u===-1||a===-1?null:{start:u,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ci={focusedElem:e,selectionRange:n},Br=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,D=w.memoizedState,f=t.stateNode,d=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:Te(t.type,S),D);f.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(g){Q(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return w=Gu,Gu=!1,w}function In(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Ui(t,n,i)}l=l.next}while(l!==r)}}function vl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function rc(e){var t=e.alternate;t!==null&&(e.alternate=null,rc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$e],delete t[Kn],delete t[Ni],delete t[Sf],delete t[wf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lc(e){return e.tag===5||e.tag===3||e.tag===4}function Ku(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qr));else if(r!==4&&(e=e.child,e!==null))for(Bi(e,t,n),e=e.sibling;e!==null;)Bi(e,t,n),e=e.sibling}function Wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wi(e,t,n),e=e.sibling;e!==null;)Wi(e,t,n),e=e.sibling}var te=null,ze=!1;function be(e,t,n){for(n=n.child;n!==null;)ic(e,t,n),n=n.sibling}function ic(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(sl,n)}catch{}switch(n.tag){case 5:oe||Kt(n,t);case 6:var r=te,l=ze;te=null,be(e,t,n),te=r,ze=l,te!==null&&(ze?(e=te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):te.removeChild(n.stateNode));break;case 18:te!==null&&(ze?(e=te,n=n.stateNode,e.nodeType===8?Wl(e.parentNode,n):e.nodeType===1&&Wl(e,n),Bn(e)):Wl(te,n.stateNode));break;case 4:r=te,l=ze,te=n.stateNode.containerInfo,ze=!0,be(e,t,n),te=r,ze=l;break;case 0:case 11:case 14:case 15:if(!oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Ui(n,t,o),l=l.next}while(l!==r)}be(e,t,n);break;case 1:if(!oe&&(Kt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Q(n,t,u)}be(e,t,n);break;case 21:be(e,t,n);break;case 22:n.mode&1?(oe=(r=oe)||n.memoizedState!==null,be(e,t,n),oe=r):be(e,t,n);break;default:be(e,t,n)}}function Yu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Mf),t.forEach(function(r){var l=Kf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Le(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=K()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Uf(r/1960))-r,10e?16:e,it===null)var r=!1;else{if(e=it,it=null,ll=0,O&6)throw Error(y(331));var l=O;for(O|=4,j=e.current;j!==null;){var i=j,o=i.child;if(j.flags&16){var u=i.deletions;if(u!==null){for(var a=0;aK()-Mo?Nt(e,0):Fo|=n),ve(e,t)}function pc(e,t){t===0&&(e.mode&1?(t=fr,fr<<=1,!(fr&130023424)&&(fr=4194304)):t=1);var n=ae();e=Ze(e,t),e!==null&&(tr(e,t,n),ve(e,n))}function Gf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pc(e,n)}function Kf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),pc(e,n)}var hc;hc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||he.current)pe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return pe=!1,If(e,t,n);pe=!!(e.flags&131072)}else pe=!1,V&&t.flags&1048576&&ga(t,Xr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zr(e,t),e=t.pendingProps;var l=rn(t,ue.current);en(t,n),l=Lo(null,t,r,e,l,n);var i=To();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,me(r)?(i=!0,Kr(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Eo(t),l.updater=hl,t.stateNode=l,l._reactInternals=t,Oi(t,r,e,n),t=Fi(null,t,r,!0,i,n)):(t.tag=0,V&&i&&yo(t),se(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Xf(r),e=Te(r,e),l){case 0:t=Di(null,t,r,e,n);break e;case 1:t=Wu(null,t,r,e,n);break e;case 11:t=Vu(null,t,r,e,n);break e;case 14:t=Bu(null,t,r,Te(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Te(r,l),Di(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Te(r,l),Wu(e,t,r,l,n);case 3:e:{if(Ja(t),e===null)throw Error(y(387));r=t.pendingProps,i=t.memoizedState,l=i.element,wa(e,t),qr(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=sn(Error(y(423)),t),t=Hu(e,t,r,n,l);break e}else if(r!==l){l=sn(Error(y(424)),t),t=Hu(e,t,r,n,l);break e}else for(ye=at(t.stateNode.containerInfo.firstChild),xe=t,V=!0,Oe=null,n=Ea(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ln(),r===l){t=Je(e,t,n);break e}se(e,t,r,n)}t=t.child}return t;case 5:return Pa(t),e===null&&Li(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Ei(r,l)?o=null:i!==null&&Ei(r,i)&&(t.flags|=32),Za(e,t),se(e,t,o,n),t.child;case 6:return e===null&&Li(t),null;case 13:return qa(e,t,n);case 4:return Po(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=on(t,null,r,n):se(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Te(r,l),Vu(e,t,r,l,n);case 7:return se(e,t,t.pendingProps,n),t.child;case 8:return se(e,t,t.pendingProps.children,n),t.child;case 12:return se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,A(Zr,r._currentValue),r._currentValue=o,i!==null)if(Fe(i.value,o)){if(i.children===l.children&&!he.current){t=Je(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var a=u.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Ke(-1,n&-n),a.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?a.next=a:(a.next=m.next,m.next=a),c.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ti(i.return,n,t),u.lanes|=n;break}a=a.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(y(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ti(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}se(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,en(t,n),l=Ne(l),r=r(l),t.flags|=1,se(e,t,r,n),t.child;case 14:return r=t.type,l=Te(r,t.pendingProps),l=Te(r.type,l),Bu(e,t,r,l,n);case 15:return Ya(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Te(r,l),zr(e,t),t.tag=1,me(r)?(e=!0,Kr(t)):e=!1,en(t,n),ja(t,r,l),Oi(t,r,l,n),Fi(null,t,r,!0,e,n);case 19:return ba(e,t,n);case 22:return Xa(e,t,n)}throw Error(y(156,t.tag))};function mc(e,t){return Vs(e,t)}function Yf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ee(e,t,n,r){return new Yf(e,t,n,r)}function Vo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xf(e){if(typeof e=="function")return Vo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===io)return 11;if(e===oo)return 14}return 2}function pt(e,t){var n=e.alternate;return n===null?(n=Ee(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Dr(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Vo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case At:return _t(n.children,l,i,t);case lo:o=8,l|=8;break;case ri:return e=Ee(12,n,t,l|2),e.elementType=ri,e.lanes=i,e;case li:return e=Ee(13,n,t,l),e.elementType=li,e.lanes=i,e;case ii:return e=Ee(19,n,t,l),e.elementType=ii,e.lanes=i,e;case Cs:return yl(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ks:o=10;break e;case js:o=9;break e;case io:o=11;break e;case oo:o=14;break e;case et:o=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=Ee(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function _t(e,t,n,r){return e=Ee(7,e,r,t),e.lanes=n,e}function yl(e,t,n,r){return e=Ee(22,e,r,t),e.elementType=Cs,e.lanes=n,e.stateNode={isHidden:!1},e}function Jl(e,t,n){return e=Ee(6,e,null,t),e.lanes=n,e}function ql(e,t,n){return t=Ee(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zf(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Bo(e,t,n,r,l,i,o,u,a){return e=new Zf(e,t,n,u,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ee(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Eo(i),e}function Jf(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xc)}catch(e){console.error(e)}}xc(),gs.exports=we;var Sc=gs.exports,wc,ns=Sc;wc=ns.createRoot,ns.hydrateRoot;const cn=[{name:"prefix_check",label:"Prefix Check",path:"/"},{name:"metrics",label:"Metrics",path:"/metrics"},{name:"repositories",label:"Repositories",path:"/repositories"},{name:"connections",label:"Connections",path:"/connections"}];function rs(e){return cn.find(t=>t.path===e)||cn[0]}function Yi(e){return cn.find(t=>t.name===e)||cn[0]}const jl=T.createContext({route:cn[0],params:{},navigate:()=>{}});function np(){const e=window.location.pathname,[t,n]=T.useState(rs(e)),r=new URLSearchParams(window.location.search),[l,i]=T.useState(Object.fromEntries(r));return T.useEffect(()=>{window.addEventListener("popstate",u=>{var a,c;(a=u.state)!=null&&a.routeName?n(Yi(u.state.routeName)):(n(rs(window.location.pathname)),i({})),(c=u.state)!=null&&c.routeParams&&i(u.state.routeParams)})},[]),{params:l,route:t,navigate:(u,a)=>{const c=Yi(u);if(a&&Object.keys(a).length>0){const m=new URLSearchParams(a),v=`${c.path}?${m}`;window.history.pushState({routeName:u,routeParams:a},"",v),n(c),i(a)}else window.history.pushState({routeName:u,routeParams:{}},"",c.path),n(c),i({})}}}function kc({routeName:e,params:t,keepParams:n,className:r,onClick:l,...i}){const{route:o,params:u,navigate:a}=T.useContext(jl),c=e||o.name,m=n?{...u,...t||{}}:t||{},v=Yi(c),h=o.name===c,x=`${r||""} ${h?"active":""}`.trim(),w=S=>{S.preventDefault(),l&&l(),a(c,m)};return s.jsx("a",{...i,href:v.path,className:x,onClick:w,children:i.children||v.label})}function rp(){return s.jsxs("header",{children:[s.jsx("h1",{children:s.jsx("span",{children:"Routinator"})}),s.jsx("menu",{children:s.jsx("ul",{children:cn.map(({name:e})=>s.jsx("li",{children:s.jsx(kc,{routeName:e})},e))})})]})}const jc="https://rest.bgp-api.net",Go="",xt=T.createContext({status:{},roto:null});function lp(){const[e,t]=T.useState(null),[n,r]=T.useState(null);return T.useEffect(()=>{fetch(`${Go}/api/v1/status`).then(l=>l.json()).then(t),fetch(`${jc}/api/v1/status`).then(l=>l.json()).then(r)},[]),{status:e,roto:n}}function ip(){const{status:e}=T.useContext(xt);return s.jsxs("footer",{children:[s.jsxs("div",{children:[s.jsxs("span",{children:["© ",new Date().getFullYear()," Stichting NLnet Labs"]}),s.jsx("span",{children:"-"}),s.jsxs("span",{children:["Version ",e.version]}),s.jsx("span",{children:"-"}),s.jsxs("span",{children:["UI version ","0.4.0"]})]}),s.jsxs("div",{children:[s.jsx("a",{href:"https://nlnetlabs.nl/services/contracts/",target:"_blank",rel:"noreferrer",children:"Support contracts"}),s.jsx("span",{children:"-"}),s.jsx("a",{href:"https://routinator.docs.nlnetlabs.nl/",target:"_blank",rel:"noreferrer",children:"Documentation"}),s.jsx("span",{children:"-"}),s.jsx("a",{href:"https://github.com/NLnetLabs/routinator/issues/new",target:"_blank",rel:"noreferrer",children:"Report a problem"})]})]})}function Xi({children:e}){const[t,n]=T.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsx("button",{className:"help",onClick:()=>n(!t),children:s.jsx("span",{children:"?"})}),Sc.createPortal(s.jsx("div",{className:`help-overlay ${t?"visible":"hidden"}`,onClick:()=>n(!1),children:s.jsx("div",{className:"bar",children:t&&e})}),document.body,"help")]})}function op({exactMatch:e,setExactMatch:t,setValidatePrefix:n,validatePrefix:r,setAsnString:l,onSubmit:i}){const o=r?"":"disabled";return s.jsxs("div",{id:"search-options",children:[s.jsxs("h2",{children:["ASN Lookup",s.jsxs(Xi,{children:[s.jsx("h2",{children:"ASN Lookup"}),s.jsx("p",{children:"Enabling this will use the validation ASN to be looked up using an Origin ASN from BGP announcements for the requested prefix."})]})]}),s.jsx("p",{children:s.jsxs("label",{className:"checkbox",children:[s.jsx("input",{type:"checkbox",checked:r,onChange:u=>{u.target.checked&&l(""),n(u.target.checked),t(!1),i()}}),s.jsx("span",{children:"Validate Prefixes for ASN found in BGP"})]})}),s.jsxs("h2",{children:["Origin ASN Validation Source",s.jsxs(Xi,{children:[s.jsx("h2",{children:"Origin ASN Validation Source"}),s.jsx("p",{children:'If the "ASN Lookup" setting was enabled you can:'}),s.jsxs("ul",{children:[s.jsx("li",{children:"use the ASN from BGP announcements for the exact match of the requested prefix, or"}),s.jsx("li",{children:"use the ASN found for the longest matching prefix"})]}),s.jsx("p",{children:"of the requested prefix."})]})]}),s.jsxs("p",{className:o,children:[s.jsxs("label",{className:"checkbox radio",children:[s.jsx("input",{type:"radio",checked:!e,onChange:()=>{t(!1),i()},disabled:!r}),s.jsx("span",{children:"Longest Matching Prefix"})]}),s.jsxs("label",{className:"checkbox radio",children:[s.jsx("input",{type:"radio",checked:e,onChange:()=>{t(!0),i()},disabled:!r}),s.jsx("span",{children:"Exact Match only"})]})]})]})}const up={readthedocs:"Documentation",report:"Report a problem",supportcontracts:"Support contracts",version:"Version",asn:"ASN",originasn:"BGP Origin ASN",rpkistatus:"RPKI Status",prefix:"Prefix",maxlength:"Max Length",loading:"Loading..."},sp={valid:"Valid ROAs",final:"Final VRPs",unsafe:"Unsafe VRPs",filtered:"VRPs Filtered Locally",duplicate:"Duplicate VRPs"},ap={welcome:"Welcome to Routinator 3000.",origin:"Origin ASN (optional)",validate:"Validate",resultsfor:"Results for",valid:"Valid",invalid:"Invalid",matched:"Matched VRPs",unmatchedasn:"Unmatched VRPs - ASN",unmatchedlength:"Unmatched VRPs - Length",runat:"Validation run done at",pleasevalidasn:"Please enter a valid ASN",pleasevalidasnorbgp:"Please enter a valid ASN or enable validating for an ASN found in BGP",pleaseand:"and a valid asn (or enable validating an ASN found in BGP)",pleasevalidprefix:"Please enter a valid prefix"},cp={status:"Status",duration:"Duration",serial:"Serial",lastupdatestart:"Last Update Started",lastupdateend:"Last Update Ended",lastupdateduration:"Last Update Duration",seconds:"seconds",vrpsaddedlocally:"VRPs Added Locally",staleobject:"Stale Objects",totalconnections:"Total Connections",currentconnections:"Current Connections",bytesread:"Bytes Read",byteswritten:"Bytes Written",requests:"Requests",validasn:"Please enter a valid ASN",validprefix:"Please enter a valid prefix",notifyStatus:"Notify Status",payloadStatus:"Payload Status",delta:"Delta",snapshotReason:"Snapshot Reason",session:"Session"},dp={repository:"Repository",type:"Type",vrpsTotal:"Total VRPs",vrpsUnsafe:"Unsafe VRPs",vrpsLocallyFiltered:"Locally Filtered VRPs",vrpsDuplicate:"Duplicate VRPs",vrpsFinal:"Final VRPs",validPublicationPoints:"Valid Publication Points",rejectedPublicationPoints:"Rejected Publication Points",validManifests:"Valid Manifests",invalidManifests:"Invalid Manifests",staleManifests:"Stale Manifests",missingManifests:"Missing Manifests",validCRLs:"Valid CRLs",invalidCRLs:"Invalid CRLs",staleCRLs:"Stale CRLs",strayCRLs:"Stray CRLs",validCACerts:"Valid CACerts",validEECerts:"Router Certs",invalidCerts:"Invalid Certs",validROAs:"Valid ROAs",invalidROAs:"Invalid ROAs",validGBRs:"Valid GBRs",invalidGBRs:"Invalid GBRs",otherObjects:"Other Objects"},fp={common:up,tal:sp,"tal-detailed":{ROAs:"ROAs",valid:"Valid",invalid:"Invalid",VRPs:"VRPs",total:"Total",final:"Final",unsafe:"Unsafe",locallyFiltered:"Locally Filtered",duplicate:"Duplicate",publicationPoints:"Publication Points",rejected:"Rejected",manifests:"Manifests",stale:"Stale",missing:"Missing",CRLs:"CRLs",stray:"Stray",certs:"Certs",validCA:"Valid CA",validEE:"Valid Router",GBRs:"GBRs",otherObjects:"Other Objects"},home:ap,connections:cp,repositories:dp};function M(e){return e.split(".").reduce((t,n)=>t[pp(n)],fp)||e}function pp(e){return e.replace(/(_[a-z])/g,t=>t.toUpperCase().replace("_",""))}function Xt(e){return new Date(e).toISOString().substring(0,19).split("T").join(" ")+" UTC"}function hp(e){return e?e.toLowerCase().startsWith("as")?!Number.isNaN(parseInt(e.slice(2),10)):!Number.isNaN(parseInt(e,10)):!1}function Fr(e){return e?e.split(",").reduce((t,n)=>(n.trim()&&t.push(n.trim()),t),[]):[]}function Cc(e){return e.length==0?"":e.reduce((t,n)=>`${t},${n}`)}function Ec(e){return Number.isInteger(e)?(e||0).toLocaleString("en"):e}function bl(e){const t=e instanceof Date?e:new Date(e),n=new Intl.RelativeTimeFormat("en"),r=[["years",3600*24*365],["months",3600*24*30],["weeks",3600*24*7],["days",3600*24],["hours",3600],["minutes",60],["seconds",1]],l=(t.getTime()-Date.now())/1e3;for(const[i,o]of r)if(oi.type==="bgp"))==null?void 0:l.lastUpdated,r=t==null?void 0:t.sources.filter(i=>i.type==="rir-alloc").map(i=>i.lastUpdated).sort();return s.jsxs("div",{id:"data-freshness",children:[s.jsxs("h2",{children:["Data Freshness",s.jsxs(Xi,{children:[s.jsx("h2",{children:"Data Sources"}),s.jsx("h3",{children:"RPKI"}),s.jsx("p",{children:"Data collected from the RPKI Trust Anchors and Publication Servers. Update interval in the order of minutes."}),s.jsx("h3",{children:"BGP"}),s.jsxs("p",{children:[s.jsx("a",{href:"https://www.ris.ripe.net/dumps/",children:"RISWhois"})," data, collected from the RIPE NCC",s.jsx("br",{}),s.jsx("a",{href:"https://ris.ripe.net",children:"Route Information Service"}),". Updated every 8 hours."]}),s.jsx("h3",{children:"RIR Allocations"}),s.jsx("p",{children:"Delegated-extended statistics from all five Regional Internet Registries (RIRs). Updated daily."}),s.jsxs("ul",{children:[s.jsx("li",{children:s.jsx("a",{href:"https://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-extended-latest",children:"AFRINIC"})}),s.jsx("li",{children:s.jsx("a",{href:"https://ftp.apnic.net/stats/apnic/delegated-apnic-extended-latest",children:"APNIC"})}),s.jsx("li",{children:s.jsx("a",{href:"https://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest",children:"ARIN"})}),s.jsx("li",{children:s.jsx("a",{href:"https://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-extended-latest",children:"LACNIC"})}),s.jsx("li",{children:s.jsx("a",{href:"https://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-extended-latest",children:"RIPE NCC"})})]})]})]}),s.jsx("table",{children:s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsx("th",{scope:"row",children:"RPKI"}),s.jsxs("td",{children:[s.jsx("pre",{children:Xt(e.lastUpdateDone)}),s.jsxs("span",{className:"ago",children:["(",bl(e.lastUpdateDone),")"]})]})]}),n&&s.jsxs("tr",{children:[s.jsx("th",{scope:"row",children:"BGP"}),s.jsxs("td",{children:[s.jsx("pre",{children:Xt(n)}),s.jsxs("span",{className:"ago",children:["(",bl(n),")"]})]})]}),r&&s.jsxs("tr",{children:[s.jsx("th",{scope:"row",children:"RIR"}),s.jsxs("td",{children:[s.jsx("pre",{children:Xt(r[0])}),s.jsx("pre",{children:Xt(r[r.length-1])}),s.jsxs("span",{className:"ago",children:["(",bl(r[r.length-1]),")"]})]})]})]})})]})}function vp({onSubmit:e,setPrefix:t,prefix:n,setAsnString:r,asnString:l,validatePrefix:i,setValidatePrefix:o}){const u=i?"Will be filled by BGP":"e.g. 64511";return s.jsxs("form",{onSubmit:a=>{a.preventDefault(),e()},children:[s.jsxs("p",{children:[s.jsx("label",{htmlFor:"prefix",children:"Prefix or IP Address"}),s.jsx("input",{type:"text",onChange:a=>t(a.target.value),value:n,id:"prefix",placeholder:"e.g. 192.0.2.0/24"})]}),s.jsxs("p",{children:[s.jsx("label",{htmlFor:"asn",children:"Origin ASN (optional)"}),s.jsx("input",{type:"text",onChange:a=>r(a.target.value),value:l,id:"asn",placeholder:u,readOnly:i,onClick:()=>i&&o(!1)})]}),s.jsx("p",{children:s.jsx("button",{type:"submit",className:"button",children:"Validate"})})]})}function gp({notification:e,setNotification:t}){return s.jsxs("div",{id:"notification",className:e.level,children:[e.message,s.jsx("span",{className:"close",onClick:()=>t(null),children:"×"})]})}function ei({type:e,routeIdents:t}){return s.jsxs("div",{className:e,children:[s.jsx("h5",{children:M(`home.${e}`)}),s.jsxs("table",{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{className:"prefix-container",children:M("common.prefix")}),s.jsx("th",{children:M("common.maxlength")}),s.jsx("th",{children:M("common.asn")})]})}),s.jsx("tbody",{children:t.map((n,r)=>s.jsxs("tr",{className:r%2===0?"even":"odd",children:[s.jsx("td",{className:"prefix-container",children:n.prefix}),s.jsx("td",{children:n.max_length}),s.jsx("td",{children:n.asn})]},JSON.stringify(n)))})]})]})}function Pc({matched:e,unmatched_as:t,unmatched_length:n}){return s.jsxs(s.Fragment,{children:[e&&e.length>0&&s.jsx(ei,{type:"matched",routeIdents:e}),t&&t.length>0&&s.jsx(ei,{type:"unmatchedasn",routeIdents:t}),n&&n.length>0&&s.jsx(ei,{type:"unmatchedlength",routeIdents:n})]})}function yp(e,t,n){const[r,l]=T.useState(null);return T.useEffect(()=>{!t||!e||fetch(`${Go}/api/v1/validity/${t}/${e}`).then(i=>i.json()).then(l).catch(()=>n({message:"An error occurred",level:"error"}))},[t,e]),r}function xp({prefix:e,asn:t,index:n,isAllocated:r,highlightAsn:l,setNotification:i}){const[o,u]=T.useState(!1),a=yp(e,t,i),c=a==null?void 0:a.validated_route.validity;return s.jsxs(s.Fragment,{children:[s.jsxs("tr",{className:n%2===0?"even":"odd",children:[s.jsx("td",{className:"button-container",children:c&&s.jsx("button",{onClick:()=>u(!o),className:o?"collapse":"expand",children:s.jsx("span",{children:s.jsx("span",{children:o?"collapse":"expand"})})})}),s.jsxs("td",{className:"prefix-container",children:[s.jsx(kc,{params:{prefix:e,"validate-bgp":"true"},children:e}),r&&s.jsx("span",{className:"tag",children:"Allocated"})]}),s.jsx("td",{className:l?"higlighted":"",children:s.jsx("span",{children:t||s.jsx("span",{className:"tag",children:"Not seen"})})}),s.jsx("td",{children:c&&s.jsx("span",{className:c.state,children:c.state})})]}),o&&c&&s.jsx("tr",{children:s.jsxs("td",{colSpan:4,className:"sub-table",children:[s.jsx("p",{children:c.description}),s.jsx(Pc,{matched:c.VRPs.matched,unmatched_as:c.VRPs.unmatched_as,unmatched_length:c.VRPs.unmatched_length})]})})]})}function Sp(e){const[t,n]=T.useState(""),[r,l]=T.useState(null);T.useEffect(()=>{const o=setTimeout(()=>{l(t?new RegExp(t.replace(".","\\.")):null)},100);return()=>clearTimeout(o)},[t]);const i=e.filter(o=>!r||o.prefix.match(r)).map(o=>{const u=o.meta.filter(a=>a.originASNs).map(a=>{var c;return((c=a.originASNs)==null?void 0:c.map(m=>({...o,asn:m,key:o.prefix+m,isAllocated:o.meta.some(v=>v.sourceType==="rir-alloc")})))||[]}).flat();return u.length>0?u:[{...o,asn:null,key:o.prefix,isAllocated:o.meta.some(a=>a.sourceType==="rir-alloc")}]}).flat();return{filter:t,setFilter:n,membersWithAsn:i}}function Nc({members:e,highlight:t,showAllocated:n,showFilter:r,setNotification:l}){const{membersWithAsn:i,filter:o,setFilter:u}=Sp(e),a=c=>t.some(m=>(m=m.toLowerCase().trim().replace("as",""),c=c.toLowerCase().trim().replace("as",""),m===c));return s.jsxs(s.Fragment,{children:[r&&s.jsx("form",{action:"",children:s.jsx("input",{type:"search",placeholder:"Filter on Prefix (regex allowed)",value:o,onChange:c=>u(c.target.value)})}),s.jsxs("table",{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{}),s.jsx("th",{className:"prefix-container",children:M("common.prefix")}),s.jsx("th",{children:M("common.originasn")}),s.jsx("th",{children:M("common.rpkistatus")})]})}),s.jsx("tbody",{children:i.map((c,m)=>s.jsx(xp,{index:m,prefix:c.prefix,asn:c.asn,isAllocated:n&&c.isAllocated,highlightAsn:a(c.asn||""),setNotification:l},c.key))})]})]})}function wp({type:e,param:t,relations:n}){var h,x,w;const{route:r,params:l,navigate:i}=T.useContext(jl),o=n==null?void 0:n.find(S=>S.type==e),u=((h=l.include)==null?void 0:h.split(","))||[],a=u.includes(t),c=(w=(x=o==null?void 0:o.members[0])==null?void 0:x.meta.find(S=>S.sourceType==="rir-alloc"))==null?void 0:w.sourceID,m=a?u.filter(S=>S!==t):[...u,t];return{items:o,show:a,rir:c,clickToggle:()=>i(r.name,{...l,include:m.filter(S=>S).join(",")})}}function ti({type:e,label:t,param:n,highlight:r,showAllocated:l,relations:i,setNotification:o}){const{items:u,show:a,rir:c,clickToggle:m}=wp({type:e,param:n,relations:i});return!u||u.members.length===0?null:s.jsxs("div",{className:"related-prefixes-group",children:[s.jsxs("h4",{onClick:m,className:`${a?"collapse":"expand"}`,children:[s.jsx("span",{className:"arrow",children:s.jsx("span",{children:a?"collapse":"expand"})}),u.members.length," ",t,e==="same-org"&&s.jsxs("span",{className:"tag",children:["Region ",c]})]}),a&&s.jsx(Nc,{highlight:r,showAllocated:l,members:u.members,setNotification:o,showFilter:!0})]})}function kp({search:e,highlight:t,setNotification:n}){var l,i,o;if(!e.result.relations)return s.jsx("div",{className:"no-results",children:"No less or more specific prefixes in either Allocations and BGP, or prefixes for the same organisation were found."});const r=(o=(i=(l=e.result.relations.find(u=>u.type==="same-org"))==null?void 0:l.members[0])==null?void 0:i.meta.find(u=>u.sourceType==="rir-alloc"))==null?void 0:o.sourceID;return s.jsxs("div",{id:"related-prefixes",children:[s.jsx("h3",{children:"Related Prefixes"}),s.jsxs("p",{children:["Best Matching Prefix in Allocations and/or BGP",s.jsxs("span",{className:"tag",children:["Region ",r]})]}),s.jsx(Nc,{members:[e.result],highlight:t,showAllocated:!0,setNotification:n,showFilter:!1}),s.jsx(ti,{type:"more-specific",label:"more specific",param:"related_more_specific",highlight:t,showAllocated:!0,relations:e.result.relations,setNotification:n}),s.jsx(ti,{type:"less-specific",label:"less specific",param:"related_less_specific",highlight:t,showAllocated:!0,relations:e.result.relations,setNotification:n}),s.jsx(ti,{type:"same-org",label:"allocated to the same organization",param:"related_alloc",highlight:t,showAllocated:!1,relations:e.result.relations,setNotification:n})]})}const We="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",Y="[a-fA-F\\d]{1,4}",_c=` +(?: +(?:${Y}:){7}(?:${Y}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${Y}:){6}(?:${We}|:${Y}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 +(?:${Y}:){5}(?::${We}|(?::${Y}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${Y}:){4}(?:(?::${Y}){0,1}:${We}|(?::${Y}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${Y}:){3}(?:(?::${Y}){0,2}:${We}|(?::${Y}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${Y}:){2}(?:(?::${Y}){0,3}:${We}|(?::${Y}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${Y}:){1}(?:(?::${Y}){0,4}:${We}|(?::${Y}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::(?:(?::${Y}){0,5}:${We}|(?::${Y}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 +)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 +`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),Zi=new RegExp(`(?:^${We}$)|(?:^${_c}$)`),jp=new RegExp(`^${We}$`),Cp=new RegExp(`^${_c}$`);function Ep(e){const t=e.trim().split("/").filter(Boolean);if(t.length==1){if(jp.test(t[0]))return`${t[0]}/32`;if(Cp.test(t[0]))return`${t[0]}/128`}else if(t.length==2&&Zi.test(t[0]))return`${t[0]}/${parseInt(t[1],10)}`;return null}function Pp(e){const t=e.trim();return t.endsWith("/")?Zi.test(t.slice(0,-1)):Zi.test(t)}function Np(e,t,n,r,l,i){const o={...e,prefix:n};l?(o["validate-bgp"]="true",delete o.asns):(o.asns=Cc(r),delete o["validate-bgp"]),i&&l?o["exact-match-only"]="true":delete o["exact-match-only"],o.asns||delete o.asns,t("prefix-check",o)}function _p(e,t,n,r){if(!e)return r({message:"Please enter a valid prefix",level:"error"}),null;if(!n){let i=!0;for(const o of t)if(!hp(o)){i=!1;break}if(!i||t.length==0)return r({message:"Please enter a valid ASN or enable validating for an ASN found in BGP",level:"error"}),null}const l=Ep(e);return l?(r(null),l):(r({message:"Please enter a valid prefix",level:"error"}),null)}function Rp(e,t){const[n,r]=T.useState(e.prefix||""),[l,i]=T.useState(e.asns||""),[o,u]=T.useState(null),[a,c]=T.useState(Object.keys(e).length>0?e["validate-bgp"]==="true":!0),[m,v]=T.useState(e["exact-match-only"]==="true"),[h,x]=T.useState(null),[w,S]=T.useState(null),D=(d="An error occurred")=>S({message:d,level:"error"});return T.useEffect(()=>{if(e.prefix!==n&&r(e.prefix||""),e.asns!==l&&i(e.asns||""),!e.prefix){u(null),x(null);return}const d=_p(e.prefix,Fr(e.asns),a,S);if(!d)return;(async()=>{const g=await fetch(`${jc}/api/v1/prefix/${d}/search`);if(g.status!==200)return D();const k=await g.json();if(k.error_msg)return D(k.error_msg);u(k);let E=e.prefix,P=Fr(e.asns);if(a){const F=k.result.meta.map(_=>_.originASNs?_.originASNs:null).find(_=>_);if(F&&(k.result.type==="exact-match"||!m))P=F,i(Cc(P));else{S({message:"Could not find an Origin ASN in BGP for this Prefix",level:"warning"}),x(null);return}}Pp(n)&&k.result.prefix&&(E=k.result.prefix,r(E),S({message:"The prefix length was automatically inferred",level:"success"}));const N=[];for(const F of P){const _=await fetch(`${Go}/api/v1/validity/${F}/${E}`);N.push(await _.json())}x(N)})().catch(D)},[e.prefix,e.asns,a,m]),{prefix:n,setPrefix:r,validatePrefix:a,setValidatePrefix:c,asnString:l,setAsnString:i,notification:w,setNotification:S,exactMatch:m,setExactMatch:v,onSubmit:()=>Np(e,t,n,Fr(l),a,m),searchResult:o,validationResults:h}}function Lp({validationResults:e}){return e?s.jsxs("div",{id:"validation-results",children:[s.jsx("h3",{children:"Validation"}),e.map(t=>{const{route:n,validity:r}=t.validated_route;return s.jsxs(s.Fragment,{children:[s.jsxs("p",{children:["Results for ",n.prefix," - ",n.origin_asn,s.jsx("span",{className:r.state,children:r.state})]}),s.jsx("p",{children:s.jsx("em",{children:r.description})}),s.jsx(Pc,{matched:r.VRPs.matched,unmatched_as:r.VRPs.unmatched_as,unmatched_length:r.VRPs.unmatched_length})]})})]}):s.jsxs("div",{id:"validation-results",children:[s.jsx("h3",{children:"Validation"}),s.jsx("h4",{children:"No Origin ASN found for this Prefix in BGP."}),s.jsx("p",{children:s.jsx("em",{children:"You can enter an ASN to validate this prefix against and try again."})})]})}function Tp(){const{params:e,navigate:t}=T.useContext(jl),{prefix:n,setPrefix:r,asnString:l,setAsnString:i,validatePrefix:o,setValidatePrefix:u,exactMatch:a,setExactMatch:c,notification:m,setNotification:v,onSubmit:h,searchResult:x,validationResults:w}=Rp(e,t);return s.jsxs("div",{id:"prefix-check",className:x?"searched":"initial",children:[s.jsxs("div",{className:"sidebar",children:[s.jsx(vp,{onSubmit:h,setPrefix:r,prefix:n,setAsnString:i,asnString:l,validatePrefix:o,setValidatePrefix:u}),m&&s.jsx(gp,{notification:m,setNotification:v}),s.jsx(op,{exactMatch:a,setExactMatch:c,validatePrefix:o,setValidatePrefix:u,setAsnString:i,onSubmit:h}),s.jsx(mp,{})]}),s.jsx("div",{className:"results",children:x&&s.jsxs(s.Fragment,{children:[s.jsx(Lp,{validationResults:w}),s.jsx(kp,{highlight:Fr(l),search:x,setNotification:v})]})})]})}const zp=[{group:"tal-detailed.ROAs",fields:{"tal-detailed.valid":"validROAs","tal-detailed.invalid":"invalidROAs"}},{group:"tal-detailed.VRPs",fields:{"tal-detailed.total":"vrpsTotal","tal-detailed.unsafe":"vrpsUnsafe","tal-detailed.duplicate":"vrpsDuplicate","tal-detailed.final":"vrpsFinal","tal-detailed.locallyFiltered":"vrpsLocallyFiltered"}},{group:"tal-detailed.publicationPoints",fields:{"tal-detailed.valid":"validPublicationPoints","tal-detailed.rejected":"rejectedPublicationPoints"}},{group:"tal-detailed.manifests",fields:{"tal-detailed.valid":"validManifests","tal-detailed.invalid":"invalidManifests","tal-detailed.stale":"staleManifests","tal-detailed.missing":"missingManifests"}},{group:"tal-detailed.CRLs",fields:{"tal-detailed.valid":"validCRLs","tal-detailed.invalid":"invalidCRLs","tal-detailed.stale":"staleCRLs","tal-detailed.stray":"strayCRLs"}},{group:"tal-detailed.certs",fields:{"tal-detailed.validCA":"validCACerts","tal-detailed.validEE":"validEECerts","tal-detailed.invalid":"invalidCerts"}},{group:"tal-detailed.GBRs",fields:{"tal-detailed.valid":"validGBRs","tal-detailed.invalid":"invalidGBRs"}},{group:"tal-detailed.otherObjects",fields:{"tal-detailed.otherObjects":"otherObjects"}}];function Op(){const{status:e}=T.useContext(xt);return s.jsx("div",{id:"metrics",children:Object.entries(e.tals).map(([t,n])=>s.jsxs("div",{children:[s.jsx("h4",{className:t,children:t}),zp.map(({group:r,fields:l})=>s.jsxs(T.Fragment,{children:[s.jsx("h5",{children:M(r)}),s.jsx("dl",{children:Object.entries(l).map(([i,o])=>s.jsxs(T.Fragment,{children:[r!==i&&s.jsx("dt",{children:M(i)}),s.jsx("dd",{children:(n[o]||0).toLocaleString("en")})]},i))})]},r))]},t))})}const ls=["repository","type","vrpsTotal","vrpsUnsafe","vrpsLocallyFiltered","vrpsDuplicate","vrpsFinal","validPublicationPoints","rejectedPublicationPoints","validManifests","invalidManifests","staleManifests","missingManifests","validCRLs","invalidCRLs","staleCRLs","strayCRLs","validCACerts","validEECerts","invalidCerts","validROAs","invalidROAs","validGBRs","invalidGBRs","otherObjects"];function Ip(){const{status:e}=T.useContext(xt),[t,n]=T.useState(null);let r=Object.entries(e.repositories);return t&&(r=r.sort((l,i)=>(i[1][t]||0)-(l[1][t]||0))),s.jsx("div",{id:"repositories",className:"scroll-table",children:s.jsx("div",{children:s.jsxs("table",{children:[s.jsx("thead",{children:s.jsx("tr",{children:ls.map(l=>s.jsx("th",{onClick:()=>n(l),className:`${t===l?"active":""}`,children:M(`repositories.${l}`)},l))})}),s.jsx("tbody",{children:r.map(([l,i])=>s.jsxs("tr",{children:[s.jsx("th",{scope:"row",title:l,children:s.jsx("a",{href:l,target:"_blank",rel:"noreferrer",children:l})}),ls.slice(1).map(o=>s.jsx("td",{children:(i[o]||0).toLocaleString("en")},o))]},l))})]})})})}function Rc({value:e,max:t}){const n=e/t*100;return s.jsxs("div",{className:"duration",children:[s.jsx("div",{children:s.jsx("div",{style:{width:`${n.toFixed(2)}%`},children:s.jsx("span",{children:`${n.toFixed(1)}%`})})}),s.jsxs("span",{children:[e.toFixed(3),"s"]})]})}const is=["duration","status","notifyStatus","payloadStatus","serial","delta","snapshot_reason","session"];function Dp(){const{status:e}=T.useContext(xt),t=Object.values(e.rrdp).reduce((n,r)=>Math.max(n,r.duration),0);return s.jsx("div",{id:"rrdp",className:"scroll-table",children:s.jsx("div",{children:s.jsxs("table",{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"URL"}),is.map(n=>s.jsx("th",{children:M(`connections.${n}`)},n))]})}),s.jsx("tbody",{children:Object.entries(e.rrdp).map(([n,r])=>s.jsxs("tr",{children:[s.jsx("th",{role:"column",title:n,children:s.jsx("a",{href:n,target:"_blank",rel:"noreferrer",children:n})}),s.jsx("td",{children:s.jsx(Rc,{value:r.duration,max:t})}),is.slice(1).map(l=>s.jsx("td",{children:Ec(r[l])},l))]},n))})]})})})}const os=["duration","status"];function Fp(){const{status:e}=T.useContext(xt),t=Object.values(e.rsync).reduce((n,r)=>Math.max(n,r.duration),0);return s.jsx("div",{id:"rsync",className:"scroll-table",children:s.jsx("div",{children:s.jsxs("table",{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"URL"}),os.map(n=>s.jsx("th",{children:M(`connections.${n}`)},n))]})}),s.jsx("tbody",{children:Object.entries(e.rsync).map(([n,r])=>s.jsxs("tr",{children:[s.jsx("th",{role:"column",title:n,children:s.jsx("a",{href:n,target:"_blank",rel:"noreferrer",children:n})}),s.jsx("td",{children:s.jsx(Rc,{value:r.duration,max:t})}),os.slice(1).map(l=>s.jsx("td",{children:Ec(r[l])},l))]},n))})]})})})}function Mp(){const{status:e}=T.useContext(xt);return s.jsxs("dl",{className:"status-list",children:[s.jsx("dt",{children:M("connections.serial")}),s.jsx("dd",{children:e.serial}),s.jsx("dt",{children:M("connections.lastupdatestart")}),s.jsx("dd",{children:Xt(e.lastUpdateStart)}),s.jsx("dt",{children:M("connections.lastupdateend")}),s.jsx("dd",{children:Xt(e.lastUpdateDone)}),s.jsx("dt",{children:M("connections.lastupdateduration")}),s.jsxs("dd",{children:[e.lastUpdateDuration," ",M("connections.seconds")]}),s.jsx("dt",{children:M("connections.vrpsaddedlocally")}),s.jsx("dd",{children:e.vrpsAddedLocally}),s.jsx("dt",{children:"RTR"}),s.jsx("dd",{children:s.jsxs("dl",{children:[s.jsx("dt",{children:M("connections.currentconnections")}),s.jsx("dd",{children:e.rtr.currentConnections}),s.jsx("dt",{children:M("connections.bytesread")}),s.jsx("dd",{children:e.rtr.bytesRead.toLocaleString("en")}),s.jsx("dt",{children:M("connections.byteswritten")}),s.jsx("dd",{children:e.rtr.bytesWritten.toLocaleString("en")})]})}),s.jsx("dt",{children:"RTR"}),s.jsx("dd",{children:s.jsxs("dl",{children:[s.jsx("dt",{children:M("connections.totalconnections")}),s.jsx("dd",{children:e.http.totalConnections.toLocaleString("en")}),s.jsx("dt",{children:M("connections.currentconnections")}),s.jsx("dd",{children:e.http.currentConnections.toLocaleString("en")}),s.jsx("dt",{children:M("connections.requests")}),s.jsx("dd",{children:e.http.requests.toLocaleString("en")}),s.jsx("dt",{children:M("connections.bytesread")}),s.jsx("dd",{children:e.http.bytesRead.toLocaleString("en")}),s.jsx("dt",{children:M("connections.byteswritten")}),s.jsx("dd",{children:e.http.bytesWritten.toLocaleString("en")})]})})]})}function Ap(){return s.jsxs("div",{id:"connections",children:[s.jsx("h3",{children:"Rrdp"}),s.jsx(Dp,{}),s.jsxs("div",{className:"side-by-side",children:[s.jsxs("div",{children:[s.jsx("h3",{children:"Rsync"}),s.jsx(Fp,{})]}),s.jsxs("div",{children:[s.jsx("h3",{children:"Status"}),s.jsx(Mp,{})]})]})]})}function $p(){const e=np(),{status:t,roto:n}=lp(),r=e.route.name;return s.jsxs(jl.Provider,{value:e,children:[s.jsx(rp,{}),t&&s.jsxs(xt.Provider,{value:{status:t,roto:n},children:[s.jsxs("div",{className:`content route-${r}`,children:[r==="prefix_check"&&s.jsx(Tp,{}),r==="metrics"&&s.jsx(Op,{}),r==="repositories"&&s.jsx(Ip,{}),r==="connections"&&s.jsx(Ap,{})]}),s.jsx(ip,{})]})]})}const Up=wc(document.getElementById("root"));Up.render(s.jsx($p,{})); diff --git a/contrib/ui/assets/index-mSsVcpj7.css b/contrib/ui/assets/index-mSsVcpj7.css new file mode 100644 index 00000000..0f06e941 --- /dev/null +++ b/contrib/ui/assets/index-mSsVcpj7.css @@ -0,0 +1 @@ +:root{--white: #fff;--black: #000;--light: #fafafa;--dark: #606060;--blue-bg: #e7eaf1;--blue-border: #bec8e1;--blue-lighter: #4e6297;--blue-light: #002b99;--blue: #001f6d;--blue-dark: #001957;--red: #f63107;--grey-99: #fcfcfc;--grey-98: #fbfbfb;--grey-95: #f3f3f3;--grey-93: #eee;--grey-light: #dcdcdc;--grey: #c0c0c0;--grey-dark: #999;--grey-darker: #666;--shadaw: 0 2px 12px 0 rgb(0 0 0 / 10%);--radius: .25rem;--success: #67c23a;--success-border: #e1f3d8;--success-bg: #f0f9eb;--warning: #e6a23c;--warning-border: #faecd8;--warning-bg: #fdf6ec;--error: #f56c6c;--error-border: #fbc4c4;--error-bg: #fbe7e7}html{box-sizing:border-box;font-size:16px}body{font-size:16px}*,*:before,*:after{box-sizing:inherit}body,h1,h2,h3,h4,h5,h6,p,ol,ul{margin:0;padding:0;font-weight:400}ol,ul{list-style:none}img{max-width:100%;height:auto}a{color:var(--blue-dark)}body,input,button,select{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}label{line-height:2.5rem;color:var(--dark);font-size:.9rem;margin-right:1rem}label.required:before{content:"*";color:var(--red);margin-right:.3rem}input,textarea{border:1px solid var(--grey-light);border-radius:var(--radius);line-height:2.5rem;padding:0 .75rem;transition:border .3s;font-size:.9rem;color:var(--dark)}textarea{padding:.75rem;margin-bottom:1rem;line-height:1.4}input:focus,input:active,textarea:focus,textarea:active{outline:none}input:focus:not([readonly]),input:active:not([readonly]),textarea:focus,textarea:active{border-color:var(--red)}input::placeholder{color:var(--grey);opacity:1}input[readonly]{background-color:var(--grey-light)}.checkbox{position:relative;display:flex;gap:.5rem;line-height:2rem}.checkbox input{visibility:hidden}.checkbox input:checked+span:after{opacity:1}.checkbox span:before{content:"";background:var(--white);border:1px solid var(--grey-light);height:1.2rem;width:1.2rem;left:0;top:.4rem;position:absolute;border-radius:2px}.checkbox span:after{content:"";width:.7rem;height:.7rem;top:.65rem;left:.25rem;background:var(--blue);opacity:0;position:absolute;border-radius:2px}p.disabled{opacity:.5;filter:grayscale(1)}.checkbox.radio span:before{border-radius:100%}.checkbox.radio span:after{border-radius:100%}.button{display:inline-block;border:none;background:var(--blue);border-radius:var(--radius);line-height:2.5rem;font-size:.9rem;padding:0 1rem;color:#fff;white-space:nowrap;cursor:pointer;vertical-align:text-bottom}a.button{text-decoration:none}.button:hover{opacity:.8}.button+.button{margin-left:.75rem}html,body{height:100%;min-width:540px}body{overflow-y:scroll}#root{height:100%;display:flex;flex-direction:column}#root .content{flex:1}.hide{visibility:hidden}header{background-color:var(--blue);display:flex;height:4rem;-webkit-user-select:none;user-select:none}header h1{display:block;width:18rem;margin:1rem;background:url(/ui/assets/routinator_logo_white-Bc6DWGwq.svg) no-repeat}header h1 span{display:none}header menu,header menu ul{display:flex;height:100%;margin:0;padding:0}header menu{width:calc(100% - 20rem);justify-content:space-between}header menu li{display:block;height:100%;list-style:none}header menu li a{height:100%;line-height:4rem;padding:0 1rem;display:block;color:var(--white);text-decoration:none;font-weight:500;cursor:pointer;white-space:nowrap;transition:all .1s ease-in-out}header menu li a:hover{background-color:var(--blue-light)}header menu li a.active{background-color:var(--blue-dark);border-bottom:.2rem solid var(--red)}@media (max-width: 720px){header{height:3rem}header h1{width:6rem}header menu li a{padding:0 .5rem;font-size:.8rem;line-height:3rem}}footer{background-color:var(--light);color:var(--grey-dark);line-height:1.5rem;padding:.5rem;font-size:.8rem;display:flex;flex-wrap:wrap;justify-content:space-between}footer div{display:flex;gap:.5rem;padding:0 1rem;white-space:nowrap}footer a{font-weight:600;text-decoration:none;color:var(--grey-dark)}footer a:hover{text-decoration:underline}.content.route-metrics{background-color:var(--light)}#metrics{display:grid;margin:2rem;gap:2rem;grid-template-columns:repeat(auto-fit,minmax(37rem,1fr))}#metrics>div{border:1px solid var(--grey-light);border-radius:var(--radius);padding-bottom:1rem;background-color:var(--white);max-width:calc(100vw - 4rem)}#metrics h4{line-height:4rem;position:relative;padding-left:4rem;text-transform:uppercase;font-weight:700;border-bottom:1px solid var(--grey-light)}#metrics h4:before{content:" ";display:block;width:2rem;height:2rem;border-radius:1rem;background-repeat:no-repeat;background-size:2rem;background-position:left;position:absolute;left:1rem;top:1rem}#metrics h4.afrinic:before{background-image:url(/ui/assets/afrinic-CpNTeCk2.svg)}#metrics h4.apnic:before{background-image:url("data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%3e%3cpath%20d='M0%200h100v100H0z'%20fill='%23001F6D'/%3e%3cg%20fill='%23FFF'%3e%3cpath%20d='M56.336%2054.321c1.068.005%202.004.485%202.671%201.175.67.692%201.116%201.633%201.116%202.686a3.875%203.875%200%2001-3.812%203.806c-2.07-.01-3.852-1.64-3.876-3.806.028-2.154%201.778-3.843%203.9-3.86m-.024-7.592c-2.07-.012-3.852-1.641-3.875-3.809.026-2.154%201.778-3.84%203.9-3.861%201.068.005%202.003.485%202.67%201.175.671.695%201.117%201.635%201.117%202.686a3.88%203.88%200%2001-3.812%203.809m-11.499%207.591c1.07.005%202.004.485%202.672%201.175.67.692%201.115%201.633%201.115%202.686a3.875%203.875%200%2001-3.81%203.806c-2.071-.01-3.854-1.64-3.878-3.806.028-2.154%201.778-3.843%203.901-3.86m-.024-7.592c-2.07-.012-3.853-1.641-3.877-3.809.028-2.154%201.779-3.84%203.902-3.861%201.068.005%202.003.485%202.67%201.175.671.695%201.116%201.635%201.116%202.686a3.879%203.879%200%2001-3.81%203.809'/%3e%3cpath%20d='M46.353%2071.854c-7.835-2.365-9.724-8.989-11.94-15.916-2.366-7.418-3.939-14.01.703-19.245L33.784%2035.5c-6.994%207.012-8.554%2014.684-6.068%2022.467%203.044%209.536%209.651%2014.264%2018.202%2015.909l.435-2.023zm20.267-6.176c6.026-6.257%208.665-13.914%205.621-23.45-2.489-7.783-8.217-13.146-17.994-14.853l-.397%201.74c6.827%201.61%209.379%207.891%2011.745%2015.306%202.216%206.927%204.517%2013.42-.497%2019.86l1.522%201.397z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}#metrics h4.arin:before{background-image:url("data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%3e%3cpath%20d='M0%200h100v100H0z'%20fill='%23001F6D'/%3e%3cg%20fill='%23FFF'%3e%3cpath%20d='M42.775%2064.632c-2.34%200-2.34-1.065-2.34-1.596%200-.745.64-2.874%202.554-7.877.106-.215.215-.32.215-.53l1.278-3.833%204.258-11.4h.106L52.9%2050.688l4.8-.106-6.427-17.052c-.216-.53-.426-.53-.745-.53-.53%200-.745%200-.85.426-4.47%2010.963-7.983%2020.756-10.75%2028.845-.64%201.8-1.5%202.34-2.34%202.34-1.278%200-1.705.215-1.705.64%200%20.53.106.745.32.745.32%200%20.85-.106%203.62-.106%205.43%200%206.068.106%206.387.106.425%200%20.53-.215.53-.745%200-.425-.215-.64-2.98-.64l.015.021zm23.1%200c-1.81%200-2.768-.53-3.513-2.13-.85-1.8-1.915-4.578-3.088-7.558-1.596%200-3.3%200-4.8-.106l3.195%208.834c0%20.745-.64.96-2.45.96-.96%200-1.915.106-1.915.53%200%20.424%200%20.85.215.85.32%200%20.64-.106%206.813-.106l6.387.106c.425%200%20.53-.53.53-.85%200-.425-.96-.53-1.384-.53h.01z'/%3e%3cpath%20d='M18%2052.844c0-1.377%2014.272-2.485%2032-2.485s32%201.108%2032%202.485c0%201.377-14.27%202.486-32%202.486s-32-1.11-32-2.486z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}#metrics h4.lacnic:before{background-image:url("data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%3e%3cpath%20d='M0%200h100v100H0z'%20fill='%23001F6D'/%3e%3cpath%20d='M54.096%2058.473c-7.182%200-11.137-4.215-11.137-11.361%200-7.332%204.137-11.182%2011.137-11.182%207.004%200%2011.134%203.85%2011.134%2011.182%200%207.146-3.948%2011.36-11.134%2011.36'%20fill='%23366FFF'/%3e%3cpath%20d='M56.096%2050.473c-4.312%200-6.681-2.478-6.681-6.682%200-4.308%202.478-6.573%206.681-6.573%204.204%200%206.678%202.265%206.678%206.573%200%204.204-2.37%206.682-6.678%206.682'%20fill='%23FFF'/%3e%3cpath%20d='M57.096%2047.473c-2.583%200-4.007-1.559-4.007-4.199%200-2.71%201.487-4.132%204.007-4.132%202.524%200%204.011%201.423%204.011%204.132%200%202.64-1.424%204.199-4.01%204.199'%20fill='%23366FFF'/%3e%3cpath%20d='M51.096%2073.473c-4.312%200-6.681-2.478-6.681-6.678%200-4.312%202.481-6.573%206.681-6.573%204.204%200%206.678%202.26%206.678%206.573%200%204.2-2.37%206.678-6.678%206.678'%20fill='%23FFF'/%3e%3cpath%20d='M50.096%2072.473c-2.586%200-4.007-1.559-4.007-4.199%200-2.71%201.487-4.132%204.007-4.132%202.524%200%204.011%201.423%204.011%204.132%200%202.64-1.424%204.199-4.01%204.199'%20fill='%23366FFF'/%3e%3cpath%20d='M49.596%2070.473c-1.554%200-2.408-.89-2.408-2.405%200-1.55.896-2.362%202.408-2.362s2.405.812%202.405%202.362c0%201.516-.85%202.405-2.405%202.405m-9.5-34c-4.308%200-6.678-2.478-6.678-6.682%200-4.312%202.478-6.573%206.678-6.573%204.204%200%206.685%202.261%206.685%206.573%200%204.204-2.373%206.682-6.685%206.682'%20fill='%23FFF'/%3e%3cpath%20d='M41.096%2035.473c-2.583%200-4.007-1.559-4.007-4.199%200-2.71%201.487-4.132%204.007-4.132%202.524%200%204.011%201.423%204.011%204.132%200%202.64-1.424%204.199-4.01%204.199'%20fill='%23366FFF'/%3e%3cpath%20d='M41.596%2034.473c-1.55%200-2.404-.893-2.404-2.405%200-1.55.892-2.366%202.404-2.366s2.405.816%202.405%202.366c0%201.512-.854%202.405-2.405%202.405'%20fill='%23FFF'/%3e%3cpath%20d='M50.096%2023.473c-2.586%200-4.01-1.559-4.01-4.199%200-2.71%201.49-4.132%204.01-4.132%202.524%200%204.011%201.423%204.011%204.132%200%202.64-1.424%204.199-4.01%204.199'%20fill='%23366FFF'/%3e%3cpath%20d='M49.596%2022.473c-1.55%200-2.408-.893-2.408-2.405%200-1.55.893-2.366%202.408-2.366%201.512%200%202.405.816%202.405%202.366%200%201.512-.854%202.405-2.405%202.405'%20fill='%23FFF'/%3e%3cpath%20d='M48.096%2084.473c-2.59%200-4.01-1.559-4.01-4.202%200-2.71%201.487-4.133%204.01-4.133%202.52%200%204.004%201.423%204.004%204.133%200%202.643-1.42%204.202-4.004%204.202'%20fill='%23366FFF'/%3e%3cpath%20d='M46.846%2083.473c-1.661%200-2.576-.956-2.576-2.576%200-1.67.956-2.54%202.576-2.54%201.624%200%202.573.87%202.573%202.54%200%201.62-.912%202.576-2.573%202.576'%20fill='%23FFF'/%3e%3c/g%3e%3c/svg%3e")}#metrics h4.ripe:before{background-image:url("data:image/svg+xml,%3csvg%20width='100'%20height='100'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%3e%3cpath%20d='M0%200h100v100H0z'%20fill='%23001F6D'/%3e%3cpath%20d='M65.012%2045.877V29.674L50%2021l-15.012%208.674v16.204L21%2053.96v17.366L36.012%2080%2050%2071.918%2063.988%2080%2079%2071.326V53.96l-13.988-8.083zM50%2053l-12-7%2012-7%2012%207-12%207zm-13-5l12%207v14l-12-7V48zm14%207l12-7v14l-12%207V55zM37%2031.382L50%2024l13%207.382V45l-13-7.382L37%2045V31.382zM23%2070.595V55.803L34.977%2049v14.772L48%2071.178%2036.003%2078%2023%2070.595zm54%20.019L63.997%2078%2052%2071.178l13.023-7.406V49L77%2055.803v14.81z'%20fill='%23FFF'/%3e%3c/g%3e%3c/svg%3e")}#metrics h5{font-size:1rem;font-weight:500;margin:1.5rem 1rem 0;padding-bottom:.3rem;border-bottom:1px solid var(--grey-light)}#metrics dl{margin:.3rem 1rem;display:grid;grid-template-rows:auto auto;grid-auto-columns:7rem;grid-auto-flow:column}#metrics dt{font-size:.9rem;color:var(--grey-darker);margin-bottom:.2rem}#metrics dd{margin:0}@media (max-width: 720px){#metrics>div{max-width:calc(100% - 7rem)}#metrics dl{grid-auto-columns:auto}}.content.route-repositories{max-height:calc(100vh - 7rem);background-color:var(--light)}#repositories{box-sizing:border-box;margin:1rem;width:calc(100% - 2rem);height:calc(100% - 2rem)}#repositories tbody th{max-width:24rem}@media (max-width: 720px){#repositories tbody th{max-width:15rem}}.scroll-table{overflow:auto;border-radius:var(--radius);border:1px solid var(--grey-light);background-color:var(--white)}.scroll-table>div{padding:1rem;position:relative}.scroll-table table{border-collapse:collapse;font-size:.9rem;-webkit-user-select:none;user-select:none}.scroll-table thead th{position:sticky;top:0;z-index:1;text-align:left;padding:.5rem;vertical-align:bottom;min-width:8rem;color:var(--black);background-color:var(--white);border-left:1px solid var(--grey-95);cursor:pointer;white-space:nowrap}.scroll-table thead th.active{text-decoration:underline}.scroll-table thead th:first-child{left:0;z-index:2;border-left:none}.scroll-table tbody th{position:sticky;left:0;z-index:1;text-align:left;font-weight:400;padding:.5rem;border-top:1px solid var(--grey-93);background-color:var(--white);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.scroll-table td{text-align:right;color:var(--black);padding:.5rem;border-left:1px solid var(--grey-95);border-top:1px solid var(--grey-93);background-color:var(--grey-99)}.scroll-table tr:nth-child(2n) td{background-color:var(--grey-98)}.content.route-connections{background-color:var(--light)}#connections{padding:2rem}#connections h3{text-transform:uppercase;font-weight:500;font-size:1rem;margin:1rem 0 0}#rrdp{max-height:20rem;max-width:120rem}#rsync{max-width:60rem}#rrdp,#rsync{display:inline-block;margin:.5rem 0;width:100%}#rrdp table,#rsync table{width:100%}#rrdp tbody th{max-width:24rem}@media (max-width: 720px){#rsync tbody th,#rrdp tbody th{max-width:15rem}}.duration{display:flex}.duration>div{width:6rem;margin-right:.5rem;background:var(--blue-lighter);height:1rem;border-radius:var(--radius);overflow:hidden}.duration>div>div{font-size:.7rem;line-height:1rem;overflow:visible;background:var(--blue);color:var(--white);height:1rem}.duration span{margin:0 .2rem}.side-by-side{width:100%;max-width:120rem;overflow:hidden;display:grid;gap:2rem;grid-template-columns:repeat(auto-fit,minmax(40rem,1fr))}.side-by-side>div{max-width:calc(100% - 4rem)}.status-list{font-size:.9rem;width:100%;max-width:100%;border-radius:var(--radius);border:1px solid var(--grey-light);background-color:var(--white);padding:.5rem 1rem;display:grid;grid-template-columns:15rem auto;line-height:2rem;overflow-x:auto}.status-list dt{font-weight:500;border-bottom:1px solid var(--grey-light)}.status-list dd{border-bottom:1px solid var(--grey-light);margin:0}.status-list>dd:nth-last-child(3),.status-list>dd:last-child,.status-list>dt:nth-last-child(2),.status-list dd:last-child dt:nth-last-child(2),.status-list dd:last-child dd:last-child{border-bottom:none}.status-list dl{margin:0;display:grid;grid-template-columns:12rem auto}#prefix-check .sidebar{display:flex;flex-direction:column;transition:all .25s ease-in;flex-grow:1;min-width:0;max-width:100%;align-items:center}#prefix-check .sidebar>form,#prefix-check .sidebar>div{transition:all .25s ease-in;width:100%;max-width:100%}#prefix-check .results{transition:all .25s ease-in}#prefix-check.initial .sidebar{background:var(--white)}#prefix-check.searched .sidebar{min-width:20rem;background:var(--grey-98)}#prefix-check.initial .sidebar>form,#prefix-check.initial .sidebar>div{width:50rem;max-width:100%;padding:2rem!important}#prefix-check .sidebar form{display:flex;flex-direction:column;gap:1rem;padding:1rem 1rem 0}#prefix-check .sidebar form label{display:block}#prefix-check #notification{position:relative;width:100%;max-width:18rem;display:inline-block;margin:1rem;padding:.5rem 2rem .5rem .5rem;border-radius:var(--radius);font-size:.9rem;line-height:1.4}#prefix-check #notification .close{position:absolute;top:0;right:0;height:1.5rem;width:1.5rem;font-size:1.5rem;cursor:pointer}#prefix-check #notification.error{color:var(--error);background-color:var(--error-bg);border:1px solid var(--error-border)}#prefix-check #notification.warning{color:var(--warning);background-color:var(--warning-bg);border:1px solid var(--warning-border)}#prefix-check #notification.success{color:var(--success);background-color:var(--success-bg);border:1px solid var(--success-border)}#prefix-check .help{width:1rem;height:1rem;background-color:var(--grey-dark)}#prefix-check #search-options{margin-top:1rem;padding:0 1rem 1rem;background-color:var(--grey-99);border-top:1px solid var(--grey-light)}#prefix-check #data-freshness h2,#prefix-check #search-options h2{font-size:.9rem;margin-top:1rem;margin-bottom:.5rem;color:var(--dark)}#prefix-check #search-options label{font-size:.9rem;margin-right:0;-webkit-user-select:none;user-select:none;cursor:pointer;color:var(--blue-dark)}#prefix-check #data-freshness{padding:0 1rem 1rem;color:var(--dark);border-top:1px solid var(--grey-light);background:var(--grey-98)}#data-freshness table{width:100%;font-size:.9rem;line-height:1.4;border-collapse:collapse;color:var(--grey-darker)}#prefix-check #data-freshness td{text-align:right;padding:.3rem 0;font-size:.9rem;border-bottom:1px solid var(--grey-93)}#prefix-check #data-freshness th{padding:.3rem 0;text-align:left;vertical-align:top;font-weight:400;border-bottom:1px solid var(--grey-93)}#prefix-check #data-freshness pre{margin:0;padding:0}#prefix-check #data-freshness .ago{opacity:.7}#prefix-check{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;align-content:stretch;height:100%}#prefix-check h2{font-size:1rem;font-weight:500}#prefix-check.initial .results{max-width:0;min-width:0}#prefix-check.searched .results{flex-grow:1000;padding:1rem;min-width:calc(540px - 2rem);max-width:100%}#prefix-check .results>div{border-left:.5rem solid var(--light);padding-left:1rem;max-width:50rem}#prefix-check .results a{color:var(--dark);text-decoration:none}#prefix-check .results a:hover{color:var(--blue-dark);text-decoration:underline}#prefix-check .results table{width:100%;border-collapse:collapse;margin-bottom:2em;color:var(--dark)}#prefix-check .results table tr td.sub-table{background:#fff!important;padding:.5rem 1rem}#prefix-check .results table table{margin-bottom:1rem}#prefix-check .results table th{font-size:.9rem;font-weight:500;border-bottom:1px solid var(--grey-light);padding:.5rem;text-align:right}#prefix-check .results table td{border-bottom:1px solid var(--grey-light);padding:.5rem;vertical-align:middle;text-align:right}#prefix-check .results table .prefix-container{text-align:left}#prefix-check .results table tbody tr.even td{background-color:var(--grey-99)}#prefix-check .results .valid,#prefix-check .results .invalid,#prefix-check .results .not-found,#prefix-check .results .tag{display:inline-block;border-radius:var(--radius);padding:.2rem .3rem;text-transform:uppercase;font-size:.8rem;margin-left:.5rem}#prefix-check .results .tag{line-height:1.2;font-weight:500;vertical-align:middle}#prefix-check .results .valid{color:var(--success);background:var(--success-bg);border:1px solid var(--success-border)}#prefix-check .results .invalid{color:var(--warning);background:var(--warning-bg);border:1px solid var(--warning-border)}#prefix-check .results .not-found,#prefix-check .results .tag{color:var(--dark);background:var(--light);border:1px solid var(--grey-light)}#prefix-check .results h3{text-transform:uppercase}#prefix-check .results p{font-size:.9rem;margin-top:.5rem;color:var(--dark)}#prefix-check .results .no-results{display:block;margin:2rem 0;color:var(--dark);border-left:.5rem solid var(--light);padding-left:1rem}#prefix-check .results #validation-results{margin-bottom:2rem}#prefix-check .results #validation-results h4{color:var(--dark);margin:.5rem 0}#prefix-check .results table td p{text-align:left;margin-top:.5rem;color:var(--dark)}#prefix-check .results table td.higlighted span{border:1px solid var(--blue-border);background:var(--blue-bg);display:inline-block;padding:.1rem .2rem;border-radius:var(--radius);color:var(--black)}#prefix-check .button-container button{display:block;background:none;border:none;width:100%;min-width:2rem;height:2rem;cursor:pointer}#prefix-check .button-container button:hover span{border-right:2px solid black;border-bottom:2px solid black}#prefix-check .button-container button span{display:inline-block;width:.7rem;height:.7rem;border-right:2px solid var(--dark);border-bottom:2px solid var(--dark);transition:.1s}#prefix-check .button-container .collapse span{transform:rotate(45deg)}#prefix-check .button-container .expand span{transform:rotate(-45deg)}#prefix-check .button-container button span span{display:none}#prefix-check .results table td.button-container{padding:0}#prefix-check #related-prefixes>table{margin-top:1.5rem}#prefix-check .related-prefixes-group{width:100%;border:1px solid var(--grey-light);margin-bottom:1.5rem;border-radius:var(--radius)}#prefix-check .related-prefixes-group>table{margin:1rem;width:calc(100% - 2rem)}#prefix-check .related-prefixes-group h4{font-size:1rem;font-weight:600;background-color:var(--light);height:3rem;line-height:3rem;padding-left:1rem;cursor:pointer;-webkit-user-select:none;user-select:none}#prefix-check .related-prefixes-group input{margin:1rem 1rem 0;width:20rem}#prefix-check .related-prefixes-group h4.collapse{border-bottom:1px solid var(--grey-light)}#prefix-check .related-prefixes-group h4 .arrow{display:inline-block;margin-right:1rem;width:.7rem;height:.7rem;border-right:2px solid var(--dark);border-bottom:2px solid var(--dark);transition:.1s}#prefix-check .related-prefixes-group h4.collapse .arrow{transform:rotate(45deg)}#prefix-check .related-prefixes-group h4.expand .arrow{transform:rotate(-45deg)}#prefix-check .related-prefixes-group h4 .arrow span{display:none}#prefix-check .matched,#prefix-check .unmatchedasn,#prefix-check .unmatchedlength{margin-top:1rem;text-align:left;border-left:.5rem solid var(--error-border)}#prefix-check .matched h5,#prefix-check .unmatchedasn h5,#prefix-check .unmatchedlength h5{display:inline-block;line-height:1rem;padding:.25rem;text-align:left;color:var(--error);background-color:var(--error-bg);border:1px solid var(--error-border);border-left:none;border-radius:0 var(--radius) var(--radius) 0}#prefix-check .matched h5{color:var(--success);background-color:var(--success-bg);border:1px solid var(--success-border);border-left:none}#prefix-check .matched{border-left:.5rem solid var(--success-border)}.help{display:inline-block;border-radius:100%;border:none;width:1rem;height:1rem;padding:0;line-height:1;vertical-align:middle;margin-left:.5rem;text-align:center;cursor:pointer;font-weight:500;color:var(--white);background-color:transparent}.help:hover{background-color:var(--blue-dark)}.help-overlay{visibility:hidden;position:fixed;left:0;top:0;width:100%;height:100%;background-color:#00000080;cursor:pointer;z-index:10;transition:all .2s ease-in-out;opacity:0}.help-overlay.visible{visibility:visible;opacity:1}.help-overlay .bar{position:absolute;right:-100%;width:30rem;height:100%;max-width:90%;line-height:1.4;background:var(--white);padding:1.5rem;color:var(--dark);overflow-y:auto;transition:all .2s ease-in-out}.help-overlay.visible .bar{right:0}.help-overlay .bar h3,.help-overlay .bar h2{font-weight:500;font-size:1rem;margin-top:1rem;margin-bottom:.5rem}.help-overlay .bar h2{font-size:1.2rem}.help-overlay .bar p{margin-bottom:.5rem}.help-overlay .bar ul{list-style:disc;padding-left:1.5rem;margin-bottom:1rem} diff --git a/contrib/ui/assets/routinator_logo_white-Bc6DWGwq.svg b/contrib/ui/assets/routinator_logo_white-Bc6DWGwq.svg new file mode 100644 index 00000000..67a89a16 --- /dev/null +++ b/contrib/ui/assets/routinator_logo_white-Bc6DWGwq.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/contrib/ui/index.html b/contrib/ui/index.html new file mode 100644 index 00000000..f390a515 --- /dev/null +++ b/contrib/ui/index.html @@ -0,0 +1,15 @@ + + + + + + + Routinator + + + + + +
+ + diff --git a/src/http/ui.rs b/src/http/ui.rs index 446c7a2d..692449e9 100644 --- a/src/http/ui.rs +++ b/src/http/ui.rs @@ -5,20 +5,20 @@ //! that represents a single file from the web resources. #![cfg(feature = "ui")] +use std::path::Path; use super::request::Request; use super::response::{ContentType, Response, ResponseBuilder}; +use self::assets::{ASSETS, Asset}; -// Sensible settings for BASE_URL are either: -// "/" => just route everything from the domain-name without further ado, or -// "/ui" => the default prodution setting in the Vue App, this means that all -// request URLs should either start with `/ui`. -// -// Note that this setting MUST correspond with the environment variable -// VUE_APP_BASE_DIR in the Vue App (set by the .env.* files in routinator-ui). -// -// CATCH_ALL_URL is the path of the asset, that all unknown URLs starting with -// BASE_URL will be redirected to. All other URLs will return a 404. +/// Sensible settings for BASE_URL are either: +/// * `"/"`: just route everything from the domain-name without further ado, +/// or +/// * `"/ui"`: the default prodution setting in the UI App, this means that +/// all request URLs should start with `/ui`. const BASE_URL: &str = "/ui"; + +/// The path of the asset, that all unknown URLs starting with +/// BASE_URL will be redirected to. All other URLs will return a 404. const CATCH_ALL_URL: &str = "index.html"; pub fn handle_get_or_head(req: &Request) -> Option { @@ -27,12 +27,10 @@ pub fn handle_get_or_head(req: &Request) -> Option { return Some(Response::moved_permanently("/ui/")) } - let req_path = std::path::Path::new(req.uri().path()); + let req_path = Path::new(req.uri().path()); if let Ok(p) = req_path.strip_prefix(BASE_URL) { - match routinator_ui::endpoints::ui_resource(p) { - Some(endpoint) => { - Some(serve(head, endpoint.content, endpoint.content_type)) - } + match get_asset(p) { + Some(asset) => Some(serve(head, asset)), None => { // In order to have the frontend handle all routing and // queryparams under BASE_URL, all unknown URLs that start @@ -41,13 +39,10 @@ pub fn handle_get_or_head(req: &Request) -> Option { // Note that we could be smarter about this and do a // (somewhat convoluted) regex on the requested URL to figure // out if it makes sense as a search prefix url. - if let Some(default) = - routinator_ui::endpoints::ui_resource( - std::path::Path::new(CATCH_ALL_URL) - ) - { - Some(serve(head, default.content, default.content_type)) - } else { + if let Some(default) = get_asset(Path::new(CATCH_ALL_URL)) { + Some(serve(head, default)) + } + else { // if CATCH_ALL_URL is not defined in ui_resources // we'll return a 404 Some(Response::not_found()) @@ -61,14 +56,27 @@ pub fn handle_get_or_head(req: &Request) -> Option { } } +fn get_asset(path: &Path) -> Option<&Asset> { + let path = path.to_str()?; + ASSETS.iter().find(|asset| asset.path == path) +} + /// Creates the response from data and the content type. -fn serve(head: bool, data: &'static [u8], ctype: &'static [u8]) -> Response { - let res = ResponseBuilder::ok().content_type(ContentType::external(ctype)); +fn serve(head: bool, asset: &Asset) -> Response { + let res = ResponseBuilder::ok().content_type( + ContentType::external(asset.media_type.as_bytes()) + ); if head { res.empty() } else { - res.body(data) + res.body(asset.content) } } + + +mod assets { + include!(concat!(env!("OUT_DIR"), "/ui_assets.rs")); +} + diff --git a/src/operation.rs b/src/operation.rs index 3ac29e1b..2d67cb54 100644 --- a/src/operation.rs +++ b/src/operation.rs @@ -308,6 +308,7 @@ impl Server { // log rotation, we need to loop here. But then we need // to recalculate timeout. let deadline = Instant::now() + timeout; + let end = loop { let timeout = deadline.saturating_duration_since( Instant::now()