From 15e6e008a25a13ae9a358eaccd041a33042640a5 Mon Sep 17 00:00:00 2001 From: Preston Wang-Stosur-Bassett Date: Sat, 13 Apr 2024 20:58:59 -0400 Subject: [PATCH] Additional improvements --- src/native/Cargo.lock | 830 ++++++++---------- src/native/src/main.rs | 12 +- src/native/tauri.conf.json | 4 + src/views/characters.html | 7 +- src/views/templates/build/bundle.css.map | 4 +- src/views/templates/build/bundle.js | 2 +- src/views/templates/build/bundle.js.map | 2 +- .../components/Navigation/Navigation.svelte | 16 - src/views/templates/styles/theme.css | 5 +- 9 files changed, 400 insertions(+), 482 deletions(-) diff --git a/src/native/Cargo.lock b/src/native/Cargo.lock index ea6ca106..c1560089 100644 --- a/src/native/Cargo.lock +++ b/src/native/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -58,9 +58,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" +checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" [[package]] name = "arboard" @@ -69,7 +69,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2041f1943049c7978768d84e6d0fd95de98b76d6c4727b09e78ec253d29fa58" dependencies = [ "clipboard-win", - "core-graphics 0.23.1", + "core-graphics 0.23.2", "image", "log", "objc", @@ -84,71 +84,51 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" dependencies = [ - "event-listener 2.5.3", + "event-listener 5.3.0", + "event-listener-strategy 0.5.1", "futures-core", + "pin-project-lite", ] [[package]] name = "async-channel" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" dependencies = [ "concurrent-queue", - "event-listener 5.2.0", - "event-listener-strategy 0.5.0", + "event-listener 5.3.0", + "event-listener-strategy 0.5.1", "futures-core", "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.8.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.3.0", + "fastrand", + "futures-lite", "slab", ] [[package]] name = "async-fs" -version = "1.6.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +checksum = "bc19683171f287921f2405677dd2ed2549c3b3bda697a563ebc3a121ace2aba1" dependencies = [ - "async-lock 2.8.0", - "autocfg", + "async-lock", "blocking", - "futures-lite 1.13.0", -] - -[[package]] -name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", + "futures-lite", ] [[package]] @@ -157,28 +137,19 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ - "async-lock 3.3.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "parking", - "polling 3.5.0", - "rustix 0.38.31", + "polling", + "rustix", "slab", "tracing", "windows-sys 0.52.0", ] -[[package]] -name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - [[package]] name = "async-lock" version = "3.3.0" @@ -192,48 +163,51 @@ dependencies = [ [[package]] name = "async-process" -version = "1.8.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel", + "async-io", + "async-lock", "async-signal", + "async-task", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.31", - "windows-sys 0.48.0", + "event-listener 5.3.0", + "futures-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", ] [[package]] name = "async-recursion" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] name = "async-signal" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" dependencies = [ - "async-io 2.3.2", - "async-lock 2.8.0", + "async-io", + "async-lock", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.31", + "rustix", "signal-hook-registry", "slab", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -244,13 +218,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -285,15 +259,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -316,6 +290,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "bincode" version = "1.3.3" @@ -359,11 +339,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel", - "async-lock 3.3.0", + "async-lock", "async-task", - "fastrand 2.0.1", + "fastrand", "futures-io", - "futures-lite 2.3.0", + "futures-lite", "piper", "tracing", ] @@ -401,9 +381,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.4" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" @@ -419,9 +399,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" dependencies = [ "serde", ] @@ -462,9 +442,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.90" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" [[package]] name = "cesu8" @@ -494,9 +474,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", "target-lexicon", @@ -551,22 +531,22 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] name = "clipboard-win" -version = "5.3.0" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d517d4b86184dbb111d3556a10f1c8a04da7428d2987bf1081602bf11c3aa9ee" +checksum = "79f4473f5144e20d9aceaf2972478f06ddf687831eafeeb434fbaf0acc4144ad" dependencies = [ "error-code", ] @@ -609,9 +589,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -663,9 +643,9 @@ dependencies = [ [[package]] name = "core-graphics" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -771,17 +751,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] name = "ctor" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" +checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -805,7 +785,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -816,7 +796,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -848,7 +828,7 @@ checksum = "d150dea618e920167e5973d70ae6ece4385b7164e0d799fe7c122dd0a5d912ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -912,9 +892,9 @@ dependencies = [ [[package]] name = "downcast-rs" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dtoa" @@ -959,13 +939,19 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enumflags2" version = "0.7.9" @@ -984,7 +970,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1009,23 +995,6 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - [[package]] name = "event-listener" version = "4.0.3" @@ -1039,9 +1008,9 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" dependencies = [ "concurrent-queue", "parking", @@ -1060,28 +1029,19 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" dependencies = [ - "event-listener 5.2.0", + "event-listener 5.3.0", "pin-project-lite", ] [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fdeflate" @@ -1098,7 +1058,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset 0.9.0", + "memoffset 0.9.1", "rustc_version", ] @@ -1163,7 +1123,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1235,28 +1195,13 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - [[package]] name = "futures-lite" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand", "futures-core", "futures-io", "parking", @@ -1271,7 +1216,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -1444,9 +1389,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "libc", @@ -1517,7 +1462,7 @@ checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" dependencies = [ "anyhow", "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -1550,7 +1495,7 @@ dependencies = [ "bstr", "log", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -1612,7 +1557,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" dependencies = [ "anyhow", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -1621,9 +1566,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -1631,7 +1576,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -1714,7 +1659,7 @@ checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", - "itoa 1.0.10", + "itoa 1.0.11", ] [[package]] @@ -1761,9 +1706,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.10", + "itoa 1.0.11", "pin-project-lite", - "socket2 0.5.6", + "socket2", "tokio", "tower-service", "tracing", @@ -1875,9 +1820,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1902,17 +1847,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.9.0" @@ -1927,9 +1861,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "javascriptcore-rs" @@ -2033,34 +1967,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.5.0", "libc", - "redox_syscall", ] [[package]] name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "dd1bc4d24ad230d21fb898d1116b1801d7adfc449d42026475862ab48b11e70e" [[package]] name = "linux-raw-sys" @@ -2158,9 +2082,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memoffset" @@ -2173,9 +2097,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -2293,6 +2217,7 @@ dependencies = [ "cfg-if", "cfg_aliases", "libc", + "memoffset 0.9.1", ] [[package]] @@ -2313,9 +2238,9 @@ dependencies = [ [[package]] name = "notify-rust" -version = "4.10.0" +version = "4.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" +checksum = "5312f837191c317644f313f7b2b39f9cb1496570c74f7c17152dd3961219551f" dependencies = [ "log", "mac-notification-sys", @@ -2374,7 +2299,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -2467,7 +2392,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -2478,9 +2403,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -2500,9 +2425,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.8.1" +version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbb46d5d01695d7a1fb8be5f0d1968bd2b2b8ba1d1b3e7062ce2a0593e57af1" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" dependencies = [ "log", "serde", @@ -2598,7 +2523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.5", + "indexmap 2.2.6", ] [[package]] @@ -2705,7 +2630,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -2737,9 +2662,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2754,7 +2679,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand", "futures-io", ] @@ -2766,14 +2691,14 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plist" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" +checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" dependencies = [ "base64 0.21.7", - "indexmap 2.2.5", + "indexmap 2.2.6", "line-wrap", - "quick-xml 0.31.0", + "quick-xml", "serde", "time", ] @@ -2793,30 +2718,15 @@ dependencies = [ [[package]] name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.5.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi", "pin-project-lite", - "rustix 0.38.31", + "rustix", "tracing", "windows-sys 0.52.0", ] @@ -2849,6 +2759,15 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -2881,22 +2800,13 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[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", ] -[[package]] -name = "quick-xml" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.31.0" @@ -2908,9 +2818,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -2975,7 +2885,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -3013,25 +2923,25 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -3051,7 +2961,7 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -3062,15 +2972,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" -version = "0.11.26" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bf93c4af7a8bb7d879d51cebe797356ff10ae8516ace542b5182d9dcac10b2" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", @@ -3149,28 +3059,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.27" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.5.0", "errno", "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -3185,9 +3081,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" [[package]] name = "ryu" @@ -3195,12 +3091,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -3233,9 +3123,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -3246,9 +3136,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -3285,45 +3175,45 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ - "indexmap 2.2.5", - "itoa 1.0.10", + "indexmap 2.2.6", + "itoa 1.0.11", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -3342,22 +3232,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.10", + "itoa 1.0.11", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +checksum = "2c85f8e96d1d6857f13768fcbd895fcb06225510022a2774ed8b5150581847b0" dependencies = [ - "base64 0.21.7", + "base64 0.22.0", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_derive", "serde_json", @@ -3367,14 +3257,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" +checksum = "c8b3a576c4eb2924262d5951a3b737ccaf16c931e39a2810c36f9a7e25575557" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -3452,9 +3342,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", ] @@ -3482,19 +3372,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "socket2" -version = "0.4.10" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -3600,9 +3480,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -3681,7 +3561,7 @@ version = "6.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" dependencies = [ - "cfg-expr 0.15.7", + "cfg-expr 0.15.8", "heck 0.5.0", "pkg-config", "toml 0.8.12", @@ -3690,9 +3570,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.16.7" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22205b267a679ca1c590b9f178488d50981fc3e48a1b91641ae31593db875ce" +checksum = "575c856fc21e551074869dcfaad8f706412bd5b803dfa0fbf6881c4ff4bfafab" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -3731,7 +3611,7 @@ dependencies = [ "unicode-segmentation", "uuid", "windows 0.39.0", - "windows-implement", + "windows-implement 0.39.0", "x11-dl", ] @@ -3765,9 +3645,9 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f078117725e36d55d29fafcbb4b1e909073807ca328ae8deb8c0b3843aac0fed" +checksum = "047aefcc7721bfb8024a9bc39d4719112262610502de7a224fa62c4570cd78d4" dependencies = [ "anyhow", "base64 0.21.7", @@ -3782,7 +3662,7 @@ dependencies = [ "glib", "glob", "gtk", - "heck 0.4.1", + "heck 0.5.0", "http", "ignore", "indexmap 1.9.3", @@ -3968,12 +3848,13 @@ dependencies = [ [[package]] name = "tauri-winrt-notification" -version = "0.1.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006851c9ccefa3c38a7646b8cec804bb429def3da10497bfa977179869c3e8e2" +checksum = "f89f5fb70d6f62381f5d9b2ba9008196150b40b75f3068eb24faeddf1c686871" dependencies = [ - "quick-xml 0.30.0", - "windows 0.51.1", + "quick-xml", + "windows 0.56.0", + "windows-version", ] [[package]] @@ -3983,8 +3864,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "rustix 0.38.31", + "fastrand", + "rustix", "windows-sys 0.52.0", ] @@ -4007,22 +3888,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[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", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -4048,12 +3929,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", - "itoa 1.0.10", + "itoa 1.0.11", "num-conv", "powerfmt", "serde", @@ -4069,9 +3950,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -4094,9 +3975,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -4104,7 +3985,7 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.6", + "socket2", "windows-sys 0.48.0", ] @@ -4162,7 +4043,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.8", + "toml_edit 0.22.12", ] [[package]] @@ -4180,7 +4061,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -4189,15 +4070,26 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.8" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12219811e0c1ba077867254e5ad62ee2c9c190b0d957110750ac0cda1ae96cd" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.5", + "winnow 0.6.6", ] [[package]] @@ -4225,7 +4117,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", ] [[package]] @@ -4308,7 +4200,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset 0.9.0", + "memoffset 0.9.1", "tempfile", "winapi", ] @@ -4364,7 +4256,7 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.14", ] [[package]] @@ -4417,12 +4309,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" version = "2.5.0" @@ -4475,7 +4361,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", "wasm-bindgen-shared", ] @@ -4509,7 +4395,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4541,7 +4427,7 @@ checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" dependencies = [ "cc", "downcast-rs", - "rustix 0.38.31", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -4554,7 +4440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ "bitflags 2.5.0", - "rustix 0.38.31", + "rustix", "wayland-backend", "wayland-scanner", ] @@ -4591,7 +4477,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" dependencies = [ "proc-macro2", - "quick-xml 0.31.0", + "quick-xml", "quote", ] @@ -4672,7 +4558,7 @@ dependencies = [ "webview2-com-macros", "webview2-com-sys", "windows 0.39.0", - "windows-implement", + "windows-implement 0.39.0", ] [[package]] @@ -4725,11 +4611,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -4757,7 +4643,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" dependencies = [ - "windows-implement", + "windows-implement 0.39.0", "windows_aarch64_msvc 0.39.0", "windows_i686_gnu 0.39.0", "windows_i686_msvc 0.39.0", @@ -4776,12 +4662,12 @@ dependencies = [ [[package]] name = "windows" -version = "0.51.1" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" dependencies = [ - "windows-core 0.51.1", - "windows-targets 0.48.5", + "windows-core 0.56.0", + "windows-targets 0.52.5", ] [[package]] @@ -4796,20 +4682,23 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] name = "windows-core" -version = "0.52.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" dependencies = [ - "windows-targets 0.52.4", + "windows-implement 0.56.0", + "windows-interface", + "windows-result", + "windows-targets 0.52.5", ] [[package]] @@ -4822,12 +4711,43 @@ dependencies = [ "windows-tokens", ] +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "windows-metadata" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" +[[package]] +name = "windows-result" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +dependencies = [ + "windows-targets 0.52.5", +] + [[package]] name = "windows-sys" version = "0.42.0" @@ -4867,7 +4787,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]] @@ -4902,17 +4822,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]] @@ -4923,11 +4844,11 @@ checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" [[package]] name = "windows-version" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75aa004c988e080ad34aff5739c39d0312f4684699d6d71fc8a198d057b8b9b4" +checksum = "6998aa457c9ba8ff2fb9f13e9d2a930dabcea28f1d0ab94d687d8b3654844515" dependencies = [ - "windows-targets 0.52.4", + "windows-targets 0.52.5", ] [[package]] @@ -4944,9 +4865,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" @@ -4974,9 +4895,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" @@ -5004,9 +4925,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 = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -5034,9 +4961,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" @@ -5064,9 +4991,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" @@ -5082,9 +5009,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" @@ -5112,9 +5039,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" @@ -5127,9 +5054,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" dependencies = [ "memchr", ] @@ -5176,9 +5103,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.24.7" +version = "0.24.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad85d0e067359e409fcb88903c3eac817c392e5d638258abfb3da5ad8ba6fc4" +checksum = "a04e72739ee84a218e3dbf8625888eadc874285637003ed21ab96a1bbbb538ec" dependencies = [ "base64 0.13.1", "block", @@ -5209,7 +5136,7 @@ dependencies = [ "webkit2gtk-sys", "webview2-com", "windows 0.39.0", - "windows-implement", + "windows-implement 0.39.0", ] [[package]] @@ -5240,7 +5167,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" dependencies = [ "gethostname", - "rustix 0.38.31", + "rustix", "x11rb-protocol", ] @@ -5257,8 +5184,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", - "linux-raw-sys 0.4.13", - "rustix 0.38.31", + "linux-raw-sys", + "rustix", ] [[package]] @@ -5273,30 +5200,28 @@ dependencies = [ [[package]] name = "zbus" -version = "3.15.2" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +checksum = "c9ff46f2a25abd690ed072054733e0bc3157e3d4c45f41bd183dce09c2ff8ab9" dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock", "async-process", "async-recursion", "async-task", "async-trait", "blocking", - "byteorder", "derivative", "enumflags2", - "event-listener 2.5.3", + "event-listener 5.3.0", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.26.4", - "once_cell", + "nix 0.28.0", "ordered-stream", "rand 0.8.5", "serde", @@ -5305,7 +5230,7 @@ dependencies = [ "static_assertions", "tracing", "uds_windows", - "winapi", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -5314,11 +5239,11 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.2" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +checksum = "4e0e3852c93dcdb49c9462afe67a2a468f7bd464150d866e861eaf06208633e0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "regex", @@ -5328,9 +5253,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", @@ -5350,13 +5275,12 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +checksum = "2c1b3ca6db667bfada0f1ebfc94b2b1759ba25472ee5373d4551bb892616389a" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", "serde", "static_assertions", "zvariant_derive", @@ -5364,11 +5288,11 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.15.2" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +checksum = "b7a4b236063316163b69039f77ce3117accb41a09567fd24c168e43491e521bc" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 1.0.109", @@ -5377,9 +5301,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", diff --git a/src/native/src/main.rs b/src/native/src/main.rs index 889fc2e5..e62121dd 100644 --- a/src/native/src/main.rs +++ b/src/native/src/main.rs @@ -147,8 +147,7 @@ fn main() { #[cfg(target_os = "macos")] { - // main_window.set_transparent_titlebar(ToolbarThickness::Thick); - // character_window.set_transparent_titlebar(ToolbarThickness::Medium); + character_window.set_transparent_titlebar(ToolbarThickness::Medium); main_window .lock() .unwrap() @@ -166,13 +165,12 @@ fn main() { main_window.lock().unwrap().on_window_event(move |event| { match event { WindowEvent::CloseRequested { .. } => { - /* TODO(macos): When the app icon is clicked from the dock, open the main window. - * Currently, Tuair doesn't offer a way to capture dock click events, so - * for now we'll just clcose the application when the main window is - * closed, like we do for other platforms. + /* TODO(macos): When the app icon is clicked from the dock, open the main + * window. Currently, Tauri doesn't offer a way to capture dock click + * events, so for now we'll just clcose the application when the main + * window is closed, like we do for other platforms. */ - // When the main window is closed, emit an exit event. handle.exit(0); } WindowEvent::Resized { .. } => { diff --git a/src/native/tauri.conf.json b/src/native/tauri.conf.json index 06c88724..0b3bbd5c 100644 --- a/src/native/tauri.conf.json +++ b/src/native/tauri.conf.json @@ -69,6 +69,8 @@ "fullscreen": false, "height": 655, "width": 1110, + "minHeight": 567, + "minWidth": 567, "resizable": true, "title": "Syng", "url": "index.html", @@ -81,6 +83,8 @@ "fullscreen": false, "height": 497, "width": 886, + "minHeight": 497, + "minWidth": 886, "resizable": true, "title": "Syng | Characters", "visible": false, diff --git a/src/views/characters.html b/src/views/characters.html index 13490c53..8af6c9b3 100644 --- a/src/views/characters.html +++ b/src/views/characters.html @@ -10,7 +10,12 @@ + - \ No newline at end of file + diff --git a/src/views/templates/build/bundle.css.map b/src/views/templates/build/bundle.css.map index 67adf1e9..ad200d38 100644 --- a/src/views/templates/build/bundle.css.map +++ b/src/views/templates/build/bundle.css.map @@ -40,7 +40,7 @@ "\n\n\n\n\n openLink() } data-testid=\"dictionary-link\">\n\t\n", "\n\n\n\n
\n\t

\n\t\t\n\t\t{#if word.simplified != word.traditional}\n\t\t\t ()\n\t\t{/if}\n\t

\n\t
\n\t\t

\n\t\t\t{word.pinyin_marks}\n\t\t

\n\t
\n
", "\n\n\n\n
\n\t\n\t\t{ value.simplified }\n\t\t{#if value.simplified != value.traditional}\n\t\t ({value.traditional})\n\t\t{/if}\n\t\n
", - "\n\n\n\t\n\t\t{#each primaryNavigation as navItem}\n\t\t\t{#if !navItem.beta || enableBetaFeatures}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{navItem.title}\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t{/if}\n\t\t{/each}\n\t\n\t
\n\t\t{#each secondaryNavigation as navItem}\n\t\t\t{#if !navItem.beta || enableBetaFeatures}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{navItem.title}\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t{/if}\n\t\t{/each}\n\t
\n\n\n\n", + "\n\n\n\t\n\t\t{#each primaryNavigation as navItem}\n\t\t\t{#if !navItem.beta || enableBetaFeatures}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{navItem.title}\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t{/if}\n\t\t{/each}\n\t\n\t
\n\t\t{#each secondaryNavigation as navItem}\n\t\t\t{#if !navItem.beta || enableBetaFeatures}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{navItem.title}\n\t\t\t\t\t\t

\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t{/if}\n\t\t{/each}\n\t
\n\n\n\n", "\n\n\n\n
\n\t{#each tones as tone}\n\t\t
\n\t\t\t\n\t\t\t handleUpdate(tone.index) }>\n\t\t
\n\t{/each}\n
", "\n\n\n\n
\n{#if !knownStatus}\n\t{#if checking}\n\t\t\n\t\t\n\t\t\tChecking for updates...\n\t\t\n\t{:else}\n\t\t\n\t\t updateStatus() }>\n\t\t\tCheck for updates\n\t\t\n\t{/if}\n{:else}\n\t{#if updateAvailable}\n\t\t\n\t
\n\t\t\t\n\t\t\t\tUpdate available\n\t\t\t\n\t\t\t\n\t\t\t\tVersion { updateVersion }
\n\t\t\t\tRelease Notes: { releaseNotes }\n\t\t\t
\n\t\t\t\n\t\t\t\t fetchUpdate() } disabled={ updating }>\n\t\t\t\t\t{#if !updating }\n\t\t\t\t\t\tUpdate\n\t\t\t\t\t{:else}\n\t\t\t\t\t\tUpdating...\n\t\t\t\t\t{/if}\n\t\t\t\t\n\t\t\t\n\t\t
\n\t{:else}\n\t\t\n\t\t
\n\t\t\t\n\t\t\t\tYou are up to date\n\t\t\t\n\t\t\t\n\t\t\t\tVersion { currentVersion }\n\t\t\t\n\t\t
\n\t{/if}\n{/if}\n
", "\n\n
\n \n {value}\n \n \n {#each actions as action}\n \n \n
\n

\n {action.tooltip}\n

\n
\n \n {/each}\n
\n
\n\n\n", @@ -62,5 +62,5 @@ "\n\n
\n \n
\n {#each leftActions as action}\n \n \n  \n {action.label}\n \n {/each}\n
\n
\n {#each rightActions as action}\n \n {action.label}\n  \n \n \n {/each}\n
\n
\n
\n {#if showDetails}\n
\n
\n \n
\n
\n {:else}\n
\n {#if listContent.length > 0}\n

\n {listContent[activeIndex]\n .simplified} ({listContent[activeIndex]\n .traditional})\n

\n {:else}\n

\n {loading ? LOADING_LIST_MESSAGE : EMPTY_LIST_MESSAGE}\n

\n {/if}\n
\n {/if}\n
\n\n\n\n" ], "names": [], - "mappings": "AA0CC,6BAAe,CACd,OAAO,CAAE,IAAI,CACb,MAAM,CAAE,K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AC,CAClC,WAAW,CAAE,MAAM,CACnB,eAAe,CAAE,aACrB,CACA,yDAA4B,CACxB,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,MAAM,CACnB,eAAe,CAAE,YACrB,CACA,iDAAoB,CAChB,OAAO,CAAE,IAAI,CACb,gBAAgB,CAAE,IAAI,iBAAiB,CAAC,CACxC,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,IAAI,CAChB,UAAU,CAAE,MAAM,CAClB,OAAO,CAAE,IAAI,oBAAoB,CACrC,CACA,+CAAkB,CACd,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,MAAM,CACnB,eAAe,CAAE,MAAM,CACvB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IACZ,CACA,gCAAiB,CAAC,iBAAG,CACjB,SAAS,CAAE,IAAI,CACf,WAAW,CAAE,GAAG,CAChB,aAAa,CAAE,IACnB,CACA,8CAAiB,CACb,MAAM,CAAE,IAAI,iBAAiB,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAC3D,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,MACrB,CACA,yDAA4B,CACxB,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,IACb" } \ No newline at end of file diff --git a/src/views/templates/build/bundle.js b/src/views/templates/build/bundle.js index 04f8a80b..9888c701 100644 --- a/src/views/templates/build/bundle.js +++ b/src/views/templates/build/bundle.js @@ -1,2 +1,2 @@ -var app=function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function r(){return Object.create(null)}function s(t){t.forEach(n)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function l(t,e,n,r){if(t){const s=c(t,e,n,r);return t[0](s)}}function c(t,n,r,s){return t[1]&&s?e(r.ctx.slice(),t[1](s(n))):r.ctx}function h(t,e,n,r){if(t[2]&&r){const s=t[2](r(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,r)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e){e=""+e,t.data!==e&&(t.data=e)}function S(t,e,n){t.classList[n?"add":"remove"](e)}function P(t,e){return new t(e)}let T;function E(t){T=t}function W(){if(!T)throw new Error("Function called outside component initialization");return T}function M(t){W().$$.on_destroy.push(t)}function D(){const t=W();return(e,n,{cancelable:r=!1}={})=>{const s=t.$$.callbacks[e];if(s){const o=function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n,r,e),s}(e,n,{cancelable:r});return s.slice().forEach((e=>{e.call(t,o)})),!o.defaultPrevented}return!0}}function A(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const L=[],R=[];let I=[];const B=[],j=Promise.resolve();let O=!1;function N(){O||(O=!0,j.then(V))}function q(){return N(),j}function F(t){I.push(t)}const H=new Set;let U=0;function V(){if(0!==U)return;const t=T;do{try{for(;U{Q.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}function tt(t,e){const n={},r={},s={$$scope:1};let o=t.length;for(;o--;){const i=t[o],a=e[o];if(a){for(const t in i)t in a||(r[t]=1);for(const t in a)s[t]||(n[t]=a[t],s[t]=1);t[o]=a}else for(const t in i)s[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}function et(t){return"object"==typeof t&&null!==t?t:{}}function nt(t){t&&t.c()}function rt(t,e,r,i){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,r),i||F((()=>{const e=t.$$.on_mount.map(n).filter(o);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),l.forEach(F)}function st(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];I.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),I=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ot(e,n,o,i,a,l,c,h=[-1]){const d=T;E(e);const u=e.$$={fragment:null,ctx:[],props:l,update:t,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:r(),dirty:h,skip_bound:!1,root:n.target||d.$$.root};c&&c(u.root);let p=!1;if(u.ctx=o?o(e,n.props||{},((t,n,...r)=>{const s=r.length?r[0]:n;return u.ctx&&a(u.ctx[t],u.ctx[t]=s)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](s),p&&function(t,e){-1===t.$$.dirty[0]&&(L.push(t),N(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const at=[];function lt(t,e){return{subscribe:ct(t,e).subscribe}}function ct(e,n=t){let r;const s=new Set;function o(t){if(i(e,t)&&(e=t,r)){const t=!at.length;for(const t of s)t[1](),at.push(t,e);if(t){for(let t=0;t{s.delete(l),0===s.size&&r&&(r(),r=null)}}}}function ht(e,n,r){const i=!Array.isArray(e),l=i?[e]:e,c=n.length<2;return lt(r,(e=>{let r=!1;const h=[];let d=0,u=t;const p=()=>{if(d)return;u();const r=n(i?h[0]:h,e);c?e(r):u=o(r)?r:t},f=l.map(((t,e)=>a(t,(t=>{h[e]=t,d&=~(1<{d|=1<{st(t,1)})),K()}i?(n=P(i,a()),n.$on("routeEvent",t[7]),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,r.parentNode,r)):n=null}else i&&n.$set(s)},i(t){s||(n&&J(n.$$.fragment,t),s=!0)},o(t){n&&Z(n.$$.fragment,t),s=!1},d(t){t&&$(r),n&&st(n,t)}}}function pt(t){let n,r,s;const o=[{params:t[1]},t[2]];var i=t[0];function a(t){let n={};for(let t=0;t{st(t,1)})),K()}i?(n=P(i,a()),n.$on("routeEvent",t[6]),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,r.parentNode,r)):n=null}else i&&n.$set(s)},i(t){s||(n&&J(n.$$.fragment,t),s=!0)},o(t){n&&Z(n.$$.fragment,t),s=!1},d(t){t&&$(r),n&&st(n,t)}}}function ft(t){let e,n,r,s;const o=[pt,ut],i=[];function a(t,e){return t[1]?0:1}return e=a(t),n=i[e]=o[e](t),{c(){n.c(),r=x()},m(t,n){i[e].m(t,n),m(t,r,n),s=!0},p(t,[s]){let l=e;e=a(t),e===l?i[e].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),n=i[e],n?n.p(t,s):(n=i[e]=o[e](t),n.c()),J(n,1),n.m(r.parentNode,r))},i(t){s||(J(n),s=!0)},o(t){Z(n),s=!1},d(t){i[e].d(t),t&&$(r)}}}function gt(){const t=window.location.href.indexOf("#/");let e=t>-1?window.location.href.substr(t+1):"/";const n=e.indexOf("?");let r="";return n>-1&&(r=e.substr(n+1),e=e.substr(0,n)),{location:e,querystring:r}}const mt=lt(null,(function(t){t(gt());const e=()=>{t(gt())};return window.addEventListener("hashchange",e,!1),function(){window.removeEventListener("hashchange",e,!1)}}));ht(mt,(t=>t.location));const $t=ht(mt,(t=>t.querystring)),wt=ct(void 0);function vt(t,e,n){let{routes:r={}}=e,{prefix:s=""}=e,{restoreScrollState:o=!1}=e;class i{constructor(t,e){if(!e||"function"!=typeof e&&("object"!=typeof e||!0!==e._sveltesparouter))throw Error("Invalid component object");if(!t||"string"==typeof t&&(t.length<1||"/"!=t.charAt(0)&&"*"!=t.charAt(0))||"object"==typeof t&&!(t instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:n,keys:r}=dt(t);this.path=t,"object"==typeof e&&!0===e._sveltesparouter?(this.component=e.component,this.conditions=e.conditions||[],this.userData=e.userData,this.props=e.props||{}):(this.component=()=>Promise.resolve(e),this.conditions=[],this.props={}),this._pattern=n,this._keys=r}match(t){if(s)if("string"==typeof s){if(!t.startsWith(s))return null;t=t.substr(s.length)||"/"}else if(s instanceof RegExp){const e=t.match(s);if(!e||!e[0])return null;t=t.substr(e[0].length)||"/"}const e=this._pattern.exec(t);if(null===e)return null;if(!1===this._keys)return e;const n={};let r=0;for(;r{a.push(new i(e,t))})):Object.keys(r).forEach((t=>{a.push(new i(t,r[t]))}));let l=null,c=null,h={};const d=D();async function u(t,e){await q(),d(t,e)}let p=null,f=null;var g;o&&(f=t=>{p=t.state&&(t.state.__svelte_spa_router_scrollY||t.state.__svelte_spa_router_scrollX)?t.state:null},window.addEventListener("popstate",f),g=()=>{var t;(t=p)?window.scrollTo(t.__svelte_spa_router_scrollX,t.__svelte_spa_router_scrollY):window.scrollTo(0,0)},W().$$.after_update.push(g));let m=null,$=null;const w=mt.subscribe((async t=>{m=t;let e=0;for(;e{wt.set(c)}))}n(0,l=null),$=null,wt.set(void 0)}));return M((()=>{w(),f&&window.removeEventListener("popstate",f)})),t.$$set=t=>{"routes"in t&&n(3,r=t.routes),"prefix"in t&&n(4,s=t.prefix),"restoreScrollState"in t&&n(5,o=t.restoreScrollState)},t.$$.update=()=>{32&t.$$.dirty&&(history.scrollRestoration=o?"manual":"auto")},[l,c,h,r,s,o,function(e){A.call(this,t,e)},function(e){A.call(this,t,e)}]}class kt extends it{constructor(t){super(),ot(this,t,vt,ft,i,{routes:3,prefix:4,restoreScrollState:5})}}function _t(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("polyline"),C(r,"x1","19"),C(r,"y1","12"),C(r,"x2","5"),C(r,"y2","12"),C(s,"points","12 19 5 12 12 5"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-arrow-left "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-arrow-left "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function yt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class xt extends it{constructor(t){super(),ot(this,t,yt,_t,i,{size:0,strokeWidth:1,class:2})}}function bt(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("polyline"),C(r,"x1","5"),C(r,"y1","12"),C(r,"x2","19"),C(r,"y2","12"),C(s,"points","12 5 19 12 12 19"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-arrow-right "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-arrow-right "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Ct(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class zt extends it{constructor(t){super(),ot(this,t,Ct,bt,i,{size:0,strokeWidth:1,class:2})}}function St(e){let n,r,s,o;return{c(){n=k("svg"),r=k("path"),s=k("path"),C(r,"d","M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"),C(s,"d","M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-book-open "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-book-open "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Pt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Tt extends it{constructor(t){super(),ot(this,t,Pt,St,i,{size:0,strokeWidth:1,class:2})}}function Et(e){let n,r,s;return{c(){n=k("svg"),r=k("path"),C(r,"d","M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-bookmark "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-bookmark "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function Wt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Mt extends it{constructor(t){super(),ot(this,t,Wt,Et,i,{size:0,strokeWidth:1,class:2})}}function Dt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","20 6 9 17 4 12"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-check "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-check "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function At(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Lt extends it{constructor(t){super(),ot(this,t,At,Dt,i,{size:0,strokeWidth:1,class:2})}}function Rt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","6 9 12 15 18 9"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-chevron-down "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-chevron-down "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function It(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Bt extends it{constructor(t){super(),ot(this,t,It,Rt,i,{size:0,strokeWidth:1,class:2})}}function jt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","15 18 9 12 15 6"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-chevron-left "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-chevron-left "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function Ot(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Nt extends it{constructor(t){super(),ot(this,t,Ot,jt,i,{size:0,strokeWidth:1,class:2})}}function qt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","9 18 15 12 9 6"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-chevron-right "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-chevron-right "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function Ft(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Ht extends it{constructor(t){super(),ot(this,t,Ft,qt,i,{size:0,strokeWidth:1,class:2})}}function Ut(e){let n,r,s,o;return{c(){n=k("svg"),r=k("rect"),s=k("path"),C(r,"x","9"),C(r,"y","9"),C(r,"width","13"),C(r,"height","13"),C(r,"rx","2"),C(r,"ry","2"),C(s,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-copy "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-copy "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Vt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Yt extends it{constructor(t){super(),ot(this,t,Vt,Ut,i,{size:0,strokeWidth:1,class:2})}}function Qt(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("path"),s=k("polyline"),o=k("line"),C(r,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),C(s,"points","7 10 12 15 17 10"),C(o,"x1","12"),C(o,"y1","15"),C(o,"x2","12"),C(o,"y2","3"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-download "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-download "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function Xt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Gt extends it{constructor(t){super(),ot(this,t,Xt,Qt,i,{size:0,strokeWidth:1,class:2})}}function Kt(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("circle"),s=k("path"),o=k("line"),C(r,"cx","12"),C(r,"cy","12"),C(r,"r","10"),C(s,"d","M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"),C(o,"x1","12"),C(o,"y1","17"),C(o,"x2","12.01"),C(o,"y2","17"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-help-circle "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-help-circle "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function Jt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Zt extends it{constructor(t){super(),ot(this,t,Jt,Kt,i,{size:0,strokeWidth:1,class:2})}}function te(e){let n,r,s,o,i,a;return{c(){n=k("svg"),r=k("polyline"),s=k("polyline"),o=k("line"),i=k("line"),C(r,"points","15 3 21 3 21 9"),C(s,"points","9 21 3 21 3 15"),C(o,"x1","21"),C(o,"y1","3"),C(o,"x2","14"),C(o,"y2","10"),C(i,"x1","3"),C(i,"y1","21"),C(i,"x2","10"),C(i,"y2","14"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",a="feather feather-maximize-2 "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o),g(n,i)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&a!==(a="feather feather-maximize-2 "+t[2])&&C(n,"class",a)},i:t,o:t,d(t){t&&$(n)}}}function ee(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class ne extends it{constructor(t){super(),ot(this,t,ee,te,i,{size:0,strokeWidth:1,class:2})}}function re(e){let n,r,s;return{c(){n=k("svg"),r=k("path"),C(r,"d","M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-message-circle "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-message-circle "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function se(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class oe extends it{constructor(t){super(),ot(this,t,se,re,i,{size:0,strokeWidth:1,class:2})}}function ie(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("circle"),s=k("circle"),o=k("circle"),C(r,"cx","12"),C(r,"cy","12"),C(r,"r","1"),C(s,"cx","12"),C(s,"cy","5"),C(s,"r","1"),C(o,"cx","12"),C(o,"cy","19"),C(o,"r","1"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-more-vertical "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-more-vertical "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function ae(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class le extends it{constructor(t){super(),ot(this,t,ae,ie,i,{size:0,strokeWidth:1,class:2})}}function ce(e){let n,r,s,o;return{c(){n=k("svg"),r=k("rect"),s=k("rect"),C(r,"x","6"),C(r,"y","4"),C(r,"width","4"),C(r,"height","16"),C(s,"x","14"),C(s,"y","4"),C(s,"width","4"),C(s,"height","16"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-pause "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-pause "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function he(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class de extends it{constructor(t){super(),ot(this,t,he,ce,i,{size:0,strokeWidth:1,class:2})}}function ue(e){let n,r,s;return{c(){n=k("svg"),r=k("polygon"),C(r,"points","5 3 19 12 5 21 5 3"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-play "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-play "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function pe(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class fe extends it{constructor(t){super(),ot(this,t,pe,ue,i,{size:0,strokeWidth:1,class:2})}}function ge(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("line"),C(r,"x1","12"),C(r,"y1","5"),C(r,"x2","12"),C(r,"y2","19"),C(s,"x1","5"),C(s,"y1","12"),C(s,"x2","19"),C(s,"y2","12"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-plus "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-plus "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function me(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class $e extends it{constructor(t){super(),ot(this,t,me,ge,i,{size:0,strokeWidth:1,class:2})}}function we(e){let n,r,s,o;return{c(){n=k("svg"),r=k("polyline"),s=k("path"),C(r,"points","1 4 1 10 7 10"),C(s,"d","M3.51 15a9 9 0 1 0 2.13-9.36L1 10"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-rotate-ccw "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-rotate-ccw "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function ve(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class ke extends it{constructor(t){super(),ot(this,t,ve,we,i,{size:0,strokeWidth:1,class:2})}}function _e(e){let n,r,s,o;return{c(){n=k("svg"),r=k("polyline"),s=k("path"),C(r,"points","23 4 23 10 17 10"),C(s,"d","M20.49 15a9 9 0 1 1-2.12-9.36L23 10"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-rotate-cw "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-rotate-cw "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function ye(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class xe extends it{constructor(t){super(),ot(this,t,ye,_e,i,{size:0,strokeWidth:1,class:2})}}function be(e){let n,r,s,o;return{c(){n=k("svg"),r=k("circle"),s=k("line"),C(r,"cx","11"),C(r,"cy","11"),C(r,"r","8"),C(s,"x1","21"),C(s,"y1","21"),C(s,"x2","16.65"),C(s,"y2","16.65"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-search "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-search "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Ce(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class ze extends it{constructor(t){super(),ot(this,t,Ce,be,i,{size:0,strokeWidth:1,class:2})}}function Se(e){let n,r,s,o;return{c(){n=k("svg"),r=k("circle"),s=k("path"),C(r,"cx","12"),C(r,"cy","12"),C(r,"r","3"),C(s,"d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-settings "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-settings "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Pe(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Te extends it{constructor(t){super(),ot(this,t,Pe,Se,i,{size:0,strokeWidth:1,class:2})}}function Ee(e){let n,r,s,o,i,a;return{c(){n=k("svg"),r=k("polyline"),s=k("path"),o=k("line"),i=k("line"),C(r,"points","3 6 5 6 21 6"),C(s,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),C(o,"x1","10"),C(o,"y1","11"),C(o,"x2","10"),C(o,"y2","17"),C(i,"x1","14"),C(i,"y1","11"),C(i,"x2","14"),C(i,"y2","17"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",a="feather feather-trash-2 "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o),g(n,i)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&a!==(a="feather feather-trash-2 "+t[2])&&C(n,"class",a)},i:t,o:t,d(t){t&&$(n)}}}function We(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Me extends it{constructor(t){super(),ot(this,t,We,Ee,i,{size:0,strokeWidth:1,class:2})}}function De(e){let n,r,s,o;return{c(){n=k("svg"),r=k("polyline"),s=k("polyline"),C(r,"points","23 6 13.5 15.5 8.5 10.5 1 18"),C(s,"points","17 6 23 6 23 12"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-trending-up "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-trending-up "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Ae(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Le extends it{constructor(t){super(),ot(this,t,Ae,De,i,{size:0,strokeWidth:1,class:2})}}function Re(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("path"),s=k("polyline"),o=k("line"),C(r,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),C(s,"points","17 8 12 3 7 8"),C(o,"x1","12"),C(o,"y1","3"),C(o,"x2","12"),C(o,"y2","15"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-upload "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-upload "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function Ie(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Be extends it{constructor(t){super(),ot(this,t,Ie,Re,i,{size:0,strokeWidth:1,class:2})}}function je(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("line"),C(r,"x1","18"),C(r,"y1","6"),C(r,"x2","6"),C(r,"y2","18"),C(s,"x1","6"),C(s,"y1","6"),C(s,"x2","18"),C(s,"y2","18"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-x "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-x "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Oe(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Ne extends it{constructor(t){super(),ot(this,t,Oe,je,i,{size:0,strokeWidth:1,class:2})}}const qe=[];let Fe;function He(t){const e=t.pattern.test(Fe);Ue(t,t.className,e),Ue(t,t.inactiveClassName,!e)}function Ue(t,e,n){(e||"").split(" ").forEach((e=>{e&&(t.node.classList.remove(e),n&&t.node.classList.add(e))}))}function Ve(t,e){if(!(e=e&&("string"==typeof e||"object"==typeof e&&e instanceof RegExp)?{path:e}:e||{}).path&&t.hasAttribute("href")&&(e.path=t.getAttribute("href"),e.path&&e.path.length>1&&"#"==e.path.charAt(0)&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||"string"==typeof e.path&&(e.path.length<1||"/"!=e.path.charAt(0)&&"*"!=e.path.charAt(0)))throw Error('Invalid value for "path" argument');const{pattern:n}="string"==typeof e.path?dt(e.path):{pattern:e.path},r={node:t,className:e.className,inactiveClassName:e.inactiveClassName,pattern:n};return qe.push(r),He(r),{destroy(){qe.splice(qe.indexOf(r),1)}}}mt.subscribe((t=>{Fe=t.location+(t.querystring?"?"+t.querystring:""),qe.map(He)}));const Ye={lists:[],notes:""},Qe=["notes"];function Xe(){}class Ge{constructor(t,e){this.initialized=!1,this._list_db=new PouchDB(t),this._document_db=new PouchDB(e)}init(){return new Promise(((t,e)=>{this._list_db.allDocs({include_docs:!0}).then((n=>{n.rows.map((t=>t.doc.name)).includes("Bookmarks")?(this.initialized=!0,t()):this._list_db.post({name:"Bookmarks"}).then((n=>{if(!n.ok)throw console.error(n),e(new Error("There was an error initializing the bookmarks data. Check the logs for more details.")),new Xe;this.initialized=!0,t()})).catch((t=>{throw console.error(t),e(new Error("There was an error initializing the bookmarks data. Check the logs for more details.")),new Xe}))})).catch(Xe,(()=>{})).catch((t=>{console.error(t),e(new Error("There was an error loading bookmarks data. Check the logs for more details."))}))}))}waitForInit(){return new Promise(((t,e)=>{let n=!1;const r=()=>{this.initialized?(t(),n=!0):setTimeout(r,10)};n||r()}))}getLists(){return new Promise(((t,e)=>{this._list_db.allDocs({include_docs:!0}).then((e=>{t(e.rows.map((t=>t.doc.name)))})).catch((t=>{console.error(t),e(new Error("There was an error fetching the available word lists."))}))}))}getEmptyLists(){let t;return new Promise(((e,n)=>{this._list_db.allDocs({include_docs:!0}).then((e=>(t=e.rows.map((t=>t.doc)),this._document_db.allDocs({include_docs:!0})))).then((n=>{n=n.rows.map((t=>t.doc));const r=t.filter((t=>{const e=t._id;return!n.filter((t=>t.lists.includes(e))).length})).map((t=>t.name));e(r)})).catch((t=>{console.error(t),n(new Error("There was an error trying to fetch empty lists."))}))}))}createList(t){return new Promise(((e,n)=>{this._list_db.allDocs({include_docs:!0}).then((t=>t.rows.map((t=>t.doc.name)))).then((e=>{if(e.includes(t))throw n(new Error(`Cannot create list. A list with the name ${t} already exists.`)),new Xe;return this._list_db.post({name:t})})).then((r=>{r.ok?e():(console.error(r),n(new Error(`There was an error while creating ${t}. Check the logs for more details.`)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),n(new Error(`There was an error while creating ${t}. Check the logs for more details.`))}))}))}deleteList(t){let e;return new Promise(((n,r)=>{this._list_db.allDocs({include_docs:!0}).then((n=>{const s=n.rows.filter((e=>e.doc.name===t))[0];if(!s)throw r(new Error(`There was an error deleting the list ${t}. The list does not exist.`)),new Xe;return s.doc._deleted=!0,e=s.doc._id,this._list_db.put(s.doc)})).then((e=>{if(e.ok)return this._document_db.allDocs({include_docs:!0});throw console.error(e),r(`There was an error deleting the list ${t}. Check the log for more details.`),new Xe})).then((t=>{const n=t.rows.map((t=>t.doc));for(let t=0;tt!==e)),r.lists.length||(r._deleted=!0)}return this._document_db.bulkDocs(n)})).then((e=>{e.map((t=>t.ok)).includes(!1)?(console.error(e),r(new Error(`There was an error deleting the list ${t}. Check the log for more details.`))):n()})).catch(Xe,(()=>{})).catch((e=>{console.error(e),r(new Error(`There was an error deleting the list ${t}. Check the log for more details.`))}))}))}getListContent(t){let e;return new Promise(((n,r)=>{this._list_db.allDocs({include_docs:!0}).then((n=>{const s=n.rows.filter((e=>e.doc.name===t))[0];if(!s)throw console.error(n),r(new Error(`There was an error fetching the contents of ${t}. List does not exist! Check the log for more details.`)),new Xe;return e=s.doc._id,this._document_db.allDocs({include_docs:!0})})).then((t=>{n(t.rows.filter((t=>t.doc.lists.includes(e))).map((t=>t.doc)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),r(new Error(`There was an error loading the list ${t}. Check the log for more details.`))}))}))}getWordByHash(t){return new Promise(((e,n)=>{this._document_db.allDocs({include_docs:!0}).then((n=>{e(n.rows.filter((e=>e.doc.hash===t)).map((t=>t.doc))[0])}))}))}_createWordEntry(t,e){const n={...Ye,...t};return n.lists=[e],n}addToList(t,e){let n;return new Promise(((r,s)=>{this._list_db.allDocs({include_docs:!0}).then((e=>{const r=e.rows.filter((e=>e.doc.name===t)).map((t=>t.doc))[0];if(!r)throw s(new Error(`There was an error adding the word to ${t}. List does not exist!`)),new Xe;return n=r._id,this._document_db.allDocs({include_docs:!0})})).then((t=>{const r=t.rows.map((t=>t.doc));let s=r.filter((t=>t.hash===e.hash))[0];return s?(s.lists.includes(n)||s.lists.push(n),this._document_db.put(s)):(s=this._createWordEntry(e,n),this._document_db.post(s))})).then((e=>{e.ok?r():(console.error(e),s(new Error(`There was an error adding the word to ${t}. Check the log for more details.`)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),s(new Error(`There was an error adding the word to ${t}. Check the log for more details.`))}))}))}removeFromList(t,e){let n;return new Promise(((r,s)=>{this._list_db.allDocs({include_docs:!0}).then((e=>{const r=e.rows.filter((e=>e.doc.name===t)).map((t=>t.doc))[0];if(!r)throw s(new Error(`There was an error removing the word from ${t}. The list does not exist.`)),new Xe;return n=r._id,this._document_db.allDocs({include_docs:!0})})).then((r=>{const o=r.rows.map((t=>t.doc));let i=o.filter((t=>t.hash===e.hash))[0];if(i)return i.lists=i.lists.filter((t=>t!==n)),this._document_db.put(i);throw s(new Error(`There was an error removing the word from ${t}. The word does not exist!`)),new Xe})).then((e=>{e.ok?r():(console.error(e),s(new Error(`There was an error removing the word from ${t}. Check the log for more details.`)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),s(new Error(`There was an error removing the word from ${t}. Check the log for more details.`))}))}))}inList(t){let e;return new Promise(((n,r)=>{this.getWordByHash(t).then((t=>(e=t?t.lists:[],this._list_db.allDocs({include_docs:!0})))).then((t=>{n(t.rows.filter((t=>e.includes(t.doc._id))).map((t=>t.doc.name)))})).catch((t=>{console.error(t),r(new Error("There was an error fetching bookmarks data. Please check the log for more details."))}))}))}updateProperty(t,e,n){return new Promise(((r,s)=>{this.getWordByHash(t).then((t=>{if(!t)throw s(new Error("There was an error updating the bookmarks entry. That word could not be found in any of your lists.")),new Xe;if(!Qe.includes(e))throw s(new Error(`There was an error updating the bookmarks entry. The property ${e} cannot be updated with this method.`)),new Xe;return t[e]=n,this._document_db.put(t)})).then((t=>{t.ok?r():s(new Error("There was an error updating the bookmarks entry."))})).catch(Xe,(()=>{})).catch((t=>{console.error(t),s(new Error("There was an error updating the bookmarks entry. Check the log for more details."))}))}))}}const Ke=(t,e)=>{e&&console.error(e),alert(t)},Je=(t,e)=>({requiresRestart:t,value:e});class Ze{constructor(t){this._name=t,this._config={},this.initialized=!1}init(){return new Promise(((t,e)=>{this._db=new PouchDB(this._name),this._db.get("config").catch((t=>{if("not_found"===t.name)return{_id:"config",transparency:Je(!0,!1),beta:Je(!0,!1),toneColors:Je(!0,{colors:["--sy-color--blue-3","--sy-color--yellow-1","--sy-color--red-1","--sy-color--green-3","--sy-color--grey-4"],hasCustomColors:!1})};console.error(t),e("There was an error loading user preferences. Check the logs for more details.")})).then((e=>{this._config=e,this.initialized=!0,t()})).catch((t=>{console.error(t),e("There was an error loading user preferences. Check the logs for more details.")}))}))}waitForInit(){return new Promise(((t,e)=>{let n=!1;const r=()=>{this.initialized?(t(),n=!0):setTimeout(r,10)};n||r()}))}get(t){if(!this.initialized)return Ke("Cannot read preferences. Preferences not yet initialized."),void console.log("Trying to access property "+t);const e=this._config[t];return e||Ke(`Requested preference ${t} does not exist!`),e.value}set(t,e){if(!this.initialized)return void Ke("Cannot save preferences. Preferences not yet initialized.");const n=this._config[t];n?(n.requiresRestart&&alert("You must restart Syng for this change to take effect."),this._config[t].value=e,this._db.put(this._config).then((t=>{t.ok?this._config._rev=t.rev:Ke("Cannot save preferences. An unknown error occurred. Check the log for more details.",t)})).catch((t=>{Ke("Cannot save preferences. An unknown error occurred. Check the logs for more details.",t)}))):Ke(`Requested preference ${t} does not exist!`)}}const tn=async()=>"debug"in await(async()=>{try{const t=await window.__TAURI__.cli.getMatches();return"run"===t.subcommand.name?t.subcommand.matches.args:t.args}catch(t){return console.error(t),{}}})();function en(){return en=Object.assign||function(t){for(var e=1;e=g),v="y"===i&&(m<=0||m+u>=f);w||v||(r=!1,n.removeEventListener(un,l),n.removeEventListener(un,c),"translate3d(0px, 0px, 0px)"!==n.style.transform&&(n.style.transition="none",n.style.transform=pn)),m===s&&$===o||(s=m,o=$,r||!w&&!v||(r=!0,n.addEventListener(un,l),n.style.transition="transform ".concat(e.duration[0],"ms ").concat(e.easing),n.style.transform="translate3d(".concat(w?e.intensity*-h:0,"px, ").concat(v?e.intensity*-d:0,"px, 0)")))}function l(){n.removeEventListener(un,l),n.addEventListener(un,c),n.style.transition="transform ".concat(e.duration[1],"ms ").concat(e.easing),n.style.transform=pn}function c(){n.removeEventListener(un,c),r=!1}function h(){e.appleDevicesOnly&&!hn||(e.useNative&&cn?t.style.webkitOverflowScrolling="touch":e.useNative&&cn||t.addEventListener("wheel",a,{passive:!0}))}h();var d={el:t,props:e,enable:h,disable:function(){t.style.webkitOverflowScrolling="",t.removeEventListener("wheel",a,{passive:!0})}};return t._elasticScroll=d,d}function gn(t){var e,n=en({},nn,t),r=(e=n.targets,"string"==typeof e?dn(document.querySelectorAll(e)):e instanceof NodeList?dn(e):e instanceof Element?[e]:[]).map((function(t){return fn(t,n)})).filter(Boolean);return n.targets instanceof Element?r[0]:r}gn.defaults=nn,window.onload=()=>{gn({appleDevicesOnly:!1,intensity:1})};const mn=()=>{const t=tn(),e=t?"development_config":"config",n=t?"development_word-lists":"word-lists",r=t?"development_bookmarks":"bookmarks";window.preferenceManager=new Ze(e),window.bookmarkManager=new Ge(n,r);const s=[{name:"init-dictionary",action:window.__TAURI__.invoke("init_dictionary")},{name:"init-preference-manager",action:window.preferenceManager.init()},{name:"cache-platform",action:window.__TAURI__.os.platform()},{name:"init-bookmark-manager",action:window.bookmarkManager.init()}];Promise.all(s.map((t=>t.action))).then((t=>{const e=(t=>t.map(((t,e)=>({name:s[e].name,result:t}))))(t);window.platform=((t,e)=>{const n=e.find((e=>e.name===t));return n?n.result:void 0})("cache-platform",e),document.dispatchEvent(new Event("init")),(()=>{const t=window.preferenceManager.get("toneColors");if(t.hasCustomColors){const e=document.querySelector(":root").style,n=t.colors;for(let t=0;t{Ke("There was an error starting Syng. Please quit and try again. If this problem persists please file a bug report.",t)}))};function $n(t,e,n){const r=t.slice();return r[6]=e[n],r}function wn(t,e,n){const r=t.slice();return r[6]=e[n],r}function vn(t){let e,n,r,s,o,i,a,l,c,h,d,u=t[6].title+"";var p=t[6].icon;return p&&(r=P(p,{props:{size:"24"}})),{c(){e=v("a"),n=v("span"),r&&nt(r.$$.fragment),s=y(),o=v("div"),i=v("p"),a=_(u),l=y(),C(n,"class","navigation--item svelte-81zlxj"),C(o,"class","sy-tooltip--body sy-tooltip--body-right"),C(e,"href",`#/${t[6].link}`),C(e,"class","sy-tooltip--container")},m(u,p){m(u,e,p),g(e,n),r&&rt(r,n,null),g(e,s),g(e,o),g(o,i),g(i,a),g(e,l),c=!0,h||(d=f(Ve.call(null,n,{path:t[6].pattern||`/${t[6].link}`,className:"navigation--item-active"})),h=!0)},p(e,s){if(p!==(p=(t=e)[6].icon)){if(r){G();const t=r;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}p?(r=P(p,{props:{size:"24"}}),nt(r.$$.fragment),J(r.$$.fragment,1),rt(r,n,null)):r=null}},i(t){c||(r&&J(r.$$.fragment,t),c=!0)},o(t){r&&Z(r.$$.fragment,t),c=!1},d(t){t&&$(e),r&&st(r),h=!1,d()}}}function kn(t){let e,n,r=(!t[6].beta||t[0])&&vn(t);return{c(){r&&r.c(),e=x()},m(t,s){r&&r.m(t,s),m(t,e,s),n=!0},p(t,n){!t[6].beta||t[0]?r?(r.p(t,n),1&n&&J(r,1)):(r=vn(t),r.c(),J(r,1),r.m(e.parentNode,e)):r&&(G(),Z(r,1,1,(()=>{r=null})),K())},i(t){n||(J(r),n=!0)},o(t){Z(r),n=!1},d(t){r&&r.d(t),t&&$(e)}}}function _n(t){let e,n,r,s,o,i,a,l,c,h,d,u=t[6].title+"";var p=t[6].icon;function w(t){return{props:{size:t[6].size}}}return p&&(r=P(p,w(t))),{c(){e=v("a"),n=v("span"),r&&nt(r.$$.fragment),s=y(),o=v("div"),i=v("p"),a=_(u),l=y(),C(n,"class","navigation--item svelte-81zlxj"),C(o,"class","sy-tooltip--body sy-tooltip--body-right"),C(e,"href",`#/${t[6].link}`),C(e,"class","sy-tooltip--container")},m(u,p){m(u,e,p),g(e,n),r&&rt(r,n,null),g(e,s),g(e,o),g(o,i),g(i,a),g(e,l),c=!0,h||(d=f(Ve.call(null,n,{path:`/${t[6].link}`,className:"navigation--item-active"})),h=!0)},p(e,s){if(p!==(p=(t=e)[6].icon)){if(r){G();const t=r;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}p?(r=P(p,w(t)),nt(r.$$.fragment),J(r.$$.fragment,1),rt(r,n,null)):r=null}},i(t){c||(r&&J(r.$$.fragment,t),c=!0)},o(t){r&&Z(r.$$.fragment,t),c=!1},d(t){t&&$(e),r&&st(r),h=!1,d()}}}function yn(t){let e,n,r=(!t[6].beta||t[0])&&_n(t);return{c(){r&&r.c(),e=x()},m(t,s){r&&r.m(t,s),m(t,e,s),n=!0},p(t,n){!t[6].beta||t[0]?r?(r.p(t,n),1&n&&J(r,1)):(r=_n(t),r.c(),J(r,1),r.m(e.parentNode,e)):r&&(G(),Z(r,1,1,(()=>{r=null})),K())},i(t){n||(J(r),n=!0)},o(t){Z(r),n=!1},d(t){r&&r.d(t),t&&$(e)}}}function xn(t){let e,n,r,s,o,i=t[3],a=[];for(let e=0;eZ(a[t],1,1,(()=>{a[t]=null}));let c=t[4],h=[];for(let e=0;eZ(h[t],1,1,(()=>{h[t]=null}));return{c(){e=v("div"),n=v("div");for(let t=0;t{n(5,o="darwin"===t[1]),n(2,l=o),n(0,i=window.preferenceManager.get("beta")),n(1,a=o&&window.preferenceManager.get("transparency"))})).catch((t=>{Ke("There was an unexpected error reading system information. Syng may not operate as expected. Please restart Syng. If this problem persists, please report this bug. For more details check the logs.",t)})),t.$$.update=()=>{32&t.$$.dirty&&o&&window.__TAURI__.window.appWindow.onResized((()=>{window.__TAURI__.window.appWindow.isFullscreen().then((t=>{n(2,l=!t)}))})).then((t=>{console.log("We got unlisten back"),console.log(t)})).catch((t=>{console.log("There was an error doing this whole thing. Error = "),console.log(t)}))},[i,a,l,r,s,o]}class Cn extends it{constructor(t){super(),ot(this,t,bn,xn,i,{})}}function zn(t){let e,n,r,s;const o=t[12].default,i=l(o,t,t[11],null);return{c(){e=v("button"),i&&i.c(),C(e,"class",p(t[2]())+" svelte-161klet"),e.disabled=t[0],C(e,"data-testid","sy-button")},m(o,a){m(o,e,a),i&&i.m(e,null),n=!0,r||(s=b(e,"click",t[13]),r=!0)},p(t,[r]){i&&i.p&&(!n||2048&r)&&d(i,o,t,t[11],n?h(o,t[11],r,null):u(t[11]),null),(!n||1&r)&&(e.disabled=t[0])},i(t){n||(J(i,t),n=!0)},o(t){Z(i,t),n=!1},d(t){t&&$(e),i&&i.d(t),r=!1,s()}}}function Sn(t,e,n){let{$$slots:r={},$$scope:s}=e,{style:o="filled"}=e,{size:i="medium"}=e,{shape:a="rectangle"}=e,{disabled:l=!1}=e,{grouped:c=!1}=e,{color:h}=e,{hover:d}=e,{center:u=!1}=e,{classes:p=[]}=e;const f=D();return t.$$set=t=>{"style"in t&&n(3,o=t.style),"size"in t&&n(4,i=t.size),"shape"in t&&n(5,a=t.shape),"disabled"in t&&n(0,l=t.disabled),"grouped"in t&&n(6,c=t.grouped),"color"in t&&n(7,h=t.color),"hover"in t&&n(8,d=t.hover),"center"in t&&n(9,u=t.center),"classes"in t&&n(10,p=t.classes),"$$scope"in t&&n(11,s=t.$$scope)},[l,f,()=>p.concat(["sy-button",`sy-button--${o}`,`sy-button--${i}`,`sy-button--${a}`,u?"sy-button--center":"",h?`sy-button--color-${h}`:"",d?`sy-button--hover-${d}`:"",c?"sy-button--grouped":""]).join(" "),o,i,a,c,h,d,u,p,s,r,()=>f("click")]}class Pn extends it{constructor(t){super(),ot(this,t,Sn,zn,i,{style:3,size:4,shape:5,disabled:0,grouped:6,color:7,hover:8,center:9,classes:10})}}function Tn(t){let e,n;const r=t[3].default,s=l(r,t,t[2],null);return{c(){e=v("div"),s&&s.c(),C(e,"class",p(t[0]())+" svelte-vpwbgu")},m(t,r){m(t,e,r),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||4&e)&&d(s,r,t,t[2],n?h(r,t[2],e,null):u(t[2]),null)},i(t){n||(J(s,t),n=!0)},o(t){Z(s,t),n=!1},d(t){t&&$(e),s&&s.d(t)}}}function En(t,e,n){let{$$slots:r={},$$scope:s}=e,{size:o="medium"}=e;return t.$$set=t=>{"size"in t&&n(1,o=t.size),"$$scope"in t&&n(2,s=t.$$scope)},[()=>["sy-button-bar--container",`sy-button-bar--container--${o}`].join(" "),o,s,r]}class Wn extends it{constructor(t){super(),ot(this,t,En,Tn,i,{size:1})}}function Mn(e){let n,r,o,i;return{c(){n=v("span"),r=_(e[0]),C(n,"class",p(e[1]())+" svelte-312fzw")},m(t,s){m(t,n,s),g(n,r),o||(i=[b(n,"click",e[2]),b(n,"keyup",e[2])],o=!0)},p(t,[e]){1&e&&z(r,t[0])},i:t,o:t,d(t){t&&$(n),o=!1,s(i)}}}function Dn(t,e,n){let{text:r}=e,{color:s="black"}=e,{hover:o="blue"}=e,{icon:i}=e;const a=D();return t.$$set=t=>{"text"in t&&n(0,r=t.text),"color"in t&&n(3,s=t.color),"hover"in t&&n(4,o=t.hover),"icon"in t&&n(5,i=t.icon)},[r,()=>["st-dropdown-item--container",`st-dropdown-item--color--${s}`,`st-dropdown-item--hover--${o}`].join(" "),t=>{a("click",t)},s,o,i]}class An extends it{constructor(t){super(),ot(this,t,Dn,Mn,i,{text:0,color:3,hover:4,icon:5})}}function Ln(t,e,n){const r=t.slice();return r[13]=e[n],r}function Rn(t){let e,n,r;function s(...e){return t[9](t[13],...e)}var o=t[13].component;function i(t){return{props:{text:t[13].text,icon:t[13].icon,color:t[13].color,hover:t[13].hover}}}return o&&(e=P(o,i(t)),e.$on("click",s)),{c(){e&&nt(e.$$.fragment),n=x()},m(t,s){e&&rt(e,t,s),m(t,n,s),r=!0},p(r,a){t=r;const l={};if(1&a&&(l.text=t[13].text),1&a&&(l.icon=t[13].icon),1&a&&(l.color=t[13].color),1&a&&(l.hover=t[13].hover),1&a&&o!==(o=t[13].component)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(e=P(o,i(t)),e.$on("click",s),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}else o&&e.$set(l)},i(t){r||(e&&J(e.$$.fragment,t),r=!0)},o(t){e&&Z(e.$$.fragment,t),r=!1},d(t){t&&$(n),e&&st(e,t)}}}function In(t){let e,n,r,o,i,a,c,f;const k=t[8].default,_=l(k,t,t[7],null);let x=t[0],z=[];for(let e=0;eZ(z[t],1,1,(()=>{z[t]=null}));return{c(){e=v("div"),n=v("span"),_&&_.c(),r=y(),o=v("div"),i=v("div");for(let t=0;t{t.composedPath().includes(l)||n(1,c=!1)},u=t=>{t&&(h("selection",t),n(1,c=!1))};M((()=>{document.removeEventListener("click",d,{capture:!0})}));return t.$$set=t=>{"values"in t&&n(0,o=t.values),"position"in t&&n(6,i=t.position),"$$scope"in t&&n(7,s=t.$$scope)},t.$$.update=()=>{2&t.$$.dirty&&(c?document.addEventListener("click",d,{capture:!0}):document.removeEventListener("click",d,{capture:!0}))},[o,c,a,u,()=>{n(1,c=!c)},()=>["sy-dropdown--list",`sy-dropdown--list--${i}`].join(" "),i,s,r,(t,e)=>u(t.id)]}class jn extends it{constructor(t){super(),ot(this,t,Bn,In,i,{values:0,position:6})}}function On(t){let e,n,r,o,i,a,l,c;var h=t[0];return h&&(n=P(h,{props:{size:"14"}})),{c(){e=v("span"),n&&nt(n.$$.fragment),r=_("\n\t \n\t"),o=v("span"),i=_(t[1]),C(e,"class",p(t[2]())+" svelte-rlw7fj")},m(s,h){m(s,e,h),n&&rt(n,e,null),g(e,r),g(e,o),g(o,i),a=!0,l||(c=[b(e,"click",t[3]),b(e,"keyup",t[3])],l=!0)},p(t,[s]){if(1&s&&h!==(h=t[0])){if(n){G();const t=n;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}h?(n=P(h,{props:{size:"14"}}),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,e,r)):n=null}(!a||2&s)&&z(i,t[1])},i(t){a||(n&&J(n.$$.fragment,t),a=!0)},o(t){n&&Z(n.$$.fragment,t),a=!1},d(t){t&&$(e),n&&st(n),l=!1,s(c)}}}function Nn(t,e,n){let{icon:r}=e,{text:s=""}=e,{hover:o="blue"}=e,{color:i="black"}=e;const a=D();return t.$$set=t=>{"icon"in t&&n(0,r=t.icon),"text"in t&&n(1,s=t.text),"hover"in t&&n(4,o=t.hover),"color"in t&&n(5,i=t.color)},[r,s,()=>["twi-dropdown-item--container",`twi-dropdown-item--color--${i}`,`twi-dropdown-item--hover--${o}`].join(" "),t=>{a("click",t)},o,i]}class qn extends it{constructor(t){super(),ot(this,t,Nn,On,i,{icon:0,text:1,hover:4,color:5})}}function Fn(t,e,n){const r=t.slice();return r[7]=e[n],r}function Hn(t){let e,n,r,s;var o=t[1];function i(t){return{props:{value:t[7]}}}return o&&(n=P(o,i(t)),n.$on("selection",t[5]),n.$on("event",t[6])),{c(){e=v("div"),n&&nt(n.$$.fragment),r=y(),C(e,"class","sy-list--list-item svelte-kedf8z")},m(t,o){m(t,e,o),n&&rt(n,e,null),g(e,r),s=!0},p(t,s){const a={};if(1&s&&(a.value=t[7]),2&s&&o!==(o=t[1])){if(n){G();const t=n;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(n=P(o,i(t)),n.$on("selection",t[5]),n.$on("event",t[6]),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,e,r)):n=null}else o&&n.$set(a)},i(t){s||(n&&J(n.$$.fragment,t),s=!0)},o(t){n&&Z(n.$$.fragment,t),s=!1},d(t){t&&$(e),n&&st(n)}}}function Un(t){let e,n,r=t[0],s=[];for(let e=0;eZ(s[t],1,1,(()=>{s[t]=null}));return{c(){e=v("div");for(let t=0;t{"values"in t&&n(0,r=t.values),"component"in t&&n(1,s=t.component),"highlight"in t&&n(3,o=t.highlight),"filterable"in t&&n(4,i=t.filterable)},[r,s,a,o,i,t=>a("selection",t.detail),function(e){A.call(this,t,e)}]}class Yn extends it{constructor(t){super(),ot(this,t,Vn,Un,i,{values:0,component:1,highlight:3,filterable:4})}}function Qn(e){let n,r,o;return{c(){n=v("input"),C(n,"placeholder",e[0]),C(n,"type",e[1]),C(n,"class",p(e[5]())+" svelte-z7kzs5"),C(n,"id",e[2]),C(n,"spellcheck",e[3])},m(t,s){m(t,n,s),r||(o=[b(n,"change",e[10]),b(n,"keyup",e[6])],r=!0)},p(t,[e]){1&e&&C(n,"placeholder",t[0]),2&e&&C(n,"type",t[1]),4&e&&C(n,"id",t[2]),8&e&&C(n,"spellcheck",t[3])},i:t,o:t,d(t){t&&$(n),r=!1,s(o)}}}function Xn(t,e,n){let{style:r="standard"}=e,{size:s="medium"}=e,{transparency:o=!1}=e,{placeholder:i=""}=e,{type:a="text"}=e,{id:l}=e,{spellcheck:c}=e;const h=D();return t.$$set=t=>{"style"in t&&n(7,r=t.style),"size"in t&&n(8,s=t.size),"transparency"in t&&n(9,o=t.transparency),"placeholder"in t&&n(0,i=t.placeholder),"type"in t&&n(1,a=t.type),"id"in t&&n(2,l=t.id),"spellcheck"in t&&n(3,c=t.spellcheck)},[i,a,l,c,h,()=>["sy-text-input",o?"sy-text-input--transparency":"",`sy-text-input--${r}`,`sy-text-input--${s}`].join(" "),t=>{"Enter"==t.code?h("enter",t):h("keyup",t.srcElement.value)},r,s,o,t=>h("change",t.srcElement.value)]}class Gn extends it{constructor(t){super(),ot(this,t,Xn,Qn,i,{style:7,size:8,transparency:9,placeholder:0,type:1,id:2,spellcheck:3})}}function Kn(e){let n,r,o,i,a,l,c,h,d,u,f,w=e[6](e[2])+"";return{c(){n=v("div"),r=v("p"),o=_(e[0]),i=y(),a=v("p"),l=_(e[1]),c=y(),h=v("p"),d=_(w),C(r,"class","sy-list-preview-item--text sy-list-preview-item--headline svelte-14tz0cu"),C(a,"class","sy-list-preview-item--text sy-list-preview-item--subtitle svelte-14tz0cu"),C(h,"class","sy-list-preview-item--text sy-list-preview-item--content svelte-14tz0cu"),C(n,"class",p(e[8]())+" svelte-14tz0cu"),S(n,"sy-list-preview-item-container--active",e[4]&&e[5])},m(t,s){m(t,n,s),g(n,r),g(r,o),g(n,i),g(n,a),g(a,l),g(n,c),g(n,h),g(h,d),u||(f=[b(n,"click",e[10]),b(n,"keyup",e[9])],u=!0)},p(t,[e]){1&e&&z(o,t[0]),2&e&&z(l,t[1]),4&e&&w!==(w=t[6](t[2])+"")&&z(d,w),48&e&&S(n,"sy-list-preview-item-container--active",t[4]&&t[5])},i:t,o:t,d(t){t&&$(n),u=!1,s(f)}}}function Jn(t,e,n){let{headline:r=""}=e,{subtitle:s=""}=e,{content:o=""}=e,{index:i}=e,{active:a=!1}=e,{highlight:l}=e;const c=D();return t.$$set=t=>{"headline"in t&&n(0,r=t.headline),"subtitle"in t&&n(1,s=t.subtitle),"content"in t&&n(2,o=t.content),"index"in t&&n(3,i=t.index),"active"in t&&n(4,a=t.active),"highlight"in t&&n(5,l=t.highlight)},[r,s,o,i,a,l,t=>t.length>25?`${t.slice(0,22)}...`:t,c,()=>["sy-list-preview-item-container"].join(" "),t=>{13===t.keycode&&c("click",i)},()=>c("click",i)]}class Zn extends it{constructor(t){super(),ot(this,t,Jn,Kn,i,{headline:0,subtitle:1,content:2,index:3,active:4,highlight:5})}}function tr(t,e,n){const r=t.slice();return r[11]=e[n],r[13]=n,r}function er(e){let n,r;return n=new Gn({props:{spellcheck:!1,placeholder:"Filter",size:"large",id:e[4]}}),n.$on("keyup",e[6]),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function nr(t){let e,n;return e=new Zn({props:{headline:t[11].headline,subtitle:t[11].subtitle,content:t[11].content,active:t[2]===t[13],index:t[13],highlight:t[0]}}),e.$on("click",t[5]),e.$on("event",t[9]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};8&n&&(r.headline=t[11].headline),8&n&&(r.subtitle=t[11].subtitle),8&n&&(r.content=t[11].content),4&n&&(r.active=t[2]===t[13]),1&n&&(r.highlight=t[0]),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function rr(t){let e,n,r,s=t[1]&&er(t),o=t[3],i=[];for(let e=0;eZ(i[t],1,1,(()=>{i[t]=null}));return{c(){s&&s.c(),e=y();for(let t=0;t{s=null})),K()),45&r){let e;for(o=t[3],e=0;e{"values"in t&&n(7,o=t.values),"highlight"in t&&n(0,i=t.highlight),"filterable"in t&&n(1,a=t.filterable),"component"in t&&n(8,l=t.component)},t.$$.update=()=>{if(130&t.$$.dirty&&o&&(n(3,c=o),a)){const t=document.getElementById(r);t&&(t.value="")}},[i,a,s,c,r,t=>{n(2,s=t.detail),h("selection",{index:o.indexOf(c[s]),value:c[s]})},t=>{t=t.detail,n(3,c=o.filter((e=>e.content.includes(t)||e.headline.includes(t)||e.subtitle.includes(t))))},o,l,function(e){A.call(this,t,e)}]}class or extends it{constructor(t){super(),ot(this,t,sr,rr,i,{values:7,highlight:0,filterable:1,component:8})}}function ir(t){let e,n,r;var s=t[6][t[0]];function o(t){return{props:{values:t[1],component:t[2],highlight:t[3],filterable:t[4]}}}return s&&(e=P(s,o(t)),e.$on("selection",t[7]),e.$on("event",t[8])),{c(){e&&nt(e.$$.fragment),n=x()},m(t,s){e&&rt(e,t,s),m(t,n,s),r=!0},p(t,[r]){const i={};if(2&r&&(i.values=t[1]),4&r&&(i.component=t[2]),8&r&&(i.highlight=t[3]),16&r&&(i.filterable=t[4]),1&r&&s!==(s=t[6][t[0]])){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}s?(e=P(s,o(t)),e.$on("selection",t[7]),e.$on("event",t[8]),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}else s&&e.$set(i)},i(t){r||(e&&J(e.$$.fragment,t),r=!0)},o(t){e&&Z(e.$$.fragment,t),r=!1},d(t){t&&$(n),e&&st(e,t)}}}function ar(t,e,n){let{style:r="content"}=e,{values:s=[]}=e,{component:o}=e,{highlight:i}=e,{filterable:a=!1}=e;const l=D(),c={preview:or,content:Yn};return t.$$set=t=>{"style"in t&&n(0,r=t.style),"values"in t&&n(1,s=t.values),"component"in t&&n(2,o=t.component),"highlight"in t&&n(3,i=t.highlight),"filterable"in t&&n(4,a=t.filterable)},[r,s,o,i,a,l,c,t=>l("selection",t.detail),function(e){A.call(this,t,e)}]}class lr extends it{constructor(t){super(),ot(this,t,ar,ir,i,{style:0,values:1,component:2,highlight:3,filterable:4})}}function cr(t){let e,n,r,s;const o=t[3].default,i=l(o,t,t[2],null);return{c(){e=v("a"),i&&i.c(),C(e,"href","javascript:void(0)"),C(e,"class","dictionary-link svelte-vhlbnn"),C(e,"data-testid","dictionary-link")},m(o,a){m(o,e,a),i&&i.m(e,null),n=!0,r||(s=b(e,"click",t[4]),r=!0)},p(t,[e]){i&&i.p&&(!n||4&e)&&d(i,o,t,t[2],n?h(o,t[2],e,null):u(t[2]),null)},i(t){n||(J(i,t),n=!0)},o(t){Z(i,t),n=!1},d(t){t&&$(e),i&&i.d(t),r=!1,s()}}}function hr(t,e,n){let{$$slots:r={},$$scope:s}=e,{link:o}=e;const i=D(),a=()=>i("open",o);return t.$$set=t=>{"link"in t&&n(1,o=t.link),"$$scope"in t&&n(2,s=t.$$scope)},[a,o,s,r,()=>a()]}class dr extends it{constructor(t){super(),ot(this,t,hr,cr,i,{link:1})}}function ur(e){let n;return{c(){n=_(e[0])},m(t,e){m(t,n,e)},p(t,e){1&e&&z(n,t[0])},i:t,o:t,d(t){t&&$(n)}}}function pr(t){let e,n,r,s,o=t[0].split(t[1](t[0]))+"";return r=new dr({props:{link:t[3](t[1](t[0])),$$slots:{default:[fr]},$$scope:{ctx:t}}}),r.$on("open",t[4]),{c(){e=_(o),n=_(" \n\t\t"),nt(r.$$.fragment)},m(t,o){m(t,e,o),m(t,n,o),rt(r,t,o),s=!0},p(t,n){(!s||1&n)&&o!==(o=t[0].split(t[1](t[0]))+"")&&z(e,o);const i={};1&n&&(i.link=t[3](t[1](t[0]))),129&n&&(i.$$scope={dirty:n,ctx:t}),r.$set(i)},i(t){s||(J(r.$$.fragment,t),s=!0)},o(t){Z(r.$$.fragment,t),s=!1},d(t){t&&$(e),t&&$(n),st(r,t)}}}function fr(t){let e,n=t[2](t[1](t[0]))+"";return{c(){e=_(n)},m(t,n){m(t,e,n)},p(t,r){1&r&&n!==(n=t[2](t[1](t[0]))+"")&&z(e,n)},d(t){t&&$(e)}}}function gr(t){let e,n,r,s,o;const i=[pr,ur],a=[];function l(t,e){return 1&e&&(n=null),null==n&&(n=!!mr.test(t[0])),n?0:1}return r=l(t,-1),s=a[r]=i[r](t),{c(){e=v("div"),s.c(),C(e,"class","dictionary-content--definition-item svelte-1qtxwq5")},m(t,n){m(t,e,n),a[r].m(e,null),o=!0},p(t,[n]){let o=r;r=l(t,n),r===o?a[r].p(t,n):(G(),Z(a[o],1,1,(()=>{a[o]=null})),K(),s=a[r],s?s.p(t,n):(s=a[r]=i[r](t),s.c()),J(s,1),s.m(e,null))},i(t){o||(J(s),o=!0)},o(t){Z(s),o=!1},d(t){t&&$(e),a[r].d()}}}const mr=/\s\S+\[(\S|\s\S)+.\]/g;function $r(t,e,n){let{value:r}=e;const s=t=>{const e=t.split("[")[0].split("|");return{traditional:e[0],simplified:e[1]||e[0]}},o=D();return t.$$set=t=>{"value"in t&&n(0,r=t.value)},[r,t=>{const e=t.match(mr);return e?e[0]:null},t=>{const e=s(t);return e.traditional==e.simplified?`${e.traditional}`:`${e.simplified} (${e.traditional})`},t=>s(t).traditional,t=>o("event",t.detail)]}class wr extends it{constructor(t){super(),ot(this,t,$r,gr,i,{value:0})}}function vr(t,e,n){const r=t.slice();return r[2]=e[n],r[4]=n,r}function kr(t){let e,n,r,s=t[2]+"";return{c(){e=v("span"),n=_(s),C(e,"class",r=p(`colored-characters--tone-${t[1][t[4]]||5}`)+" svelte-sic3zr")},m(t,r){m(t,e,r),g(e,n)},p(t,o){1&o&&s!==(s=t[2]+"")&&z(n,s),2&o&&r!==(r=p(`colored-characters--tone-${t[1][t[4]]||5}`)+" svelte-sic3zr")&&C(e,"class",r)},d(t){t&&$(e)}}}function _r(e){let n,r=e[0],s=[];for(let t=0;t{"characters"in t&&n(0,r=t.characters),"tones"in t&&n(1,s=t.tones)},[r,s]}class xr extends it{constructor(t){super(),ot(this,t,yr,_r,i,{characters:0,tones:1})}}function br(t){let e,n,r,s;return n=new xr({props:{characters:t[0].traditional,tones:t[0].tone_marks}}),{c(){e=_(" ("),nt(n.$$.fragment),r=_(")")},m(t,o){m(t,e,o),rt(n,t,o),m(t,r,o),s=!0},p(t,e){const r={};1&e&&(r.characters=t[0].traditional),1&e&&(r.tones=t[0].tone_marks),n.$set(r)},i(t){s||(J(n.$$.fragment,t),s=!0)},o(t){Z(n.$$.fragment,t),s=!1},d(t){t&&$(e),st(n,t),t&&$(r)}}}function Cr(t){let e,n,r,s,o,i,a,l,c,h=t[0].pinyin_marks+"";r=new xr({props:{characters:t[0].simplified,tones:t[0].tone_marks}});let d=t[0].simplified!=t[0].traditional&&br(t);return{c(){e=v("div"),n=v("h1"),nt(r.$$.fragment),s=y(),d&&d.c(),o=y(),i=v("div"),a=v("h3"),l=_(h),C(n,"class","chinese-characters--character-container chinese-characters--character svelte-k2y6zv"),C(n,"data-testid","chinese-characters"),C(a,"class","chinese-characters--pinyin-container svelte-k2y6zv"),C(e,"class","chinese-characters--container svelte-k2y6zv")},m(t,h){m(t,e,h),g(e,n),rt(r,n,null),g(n,s),d&&d.m(n,null),g(e,o),g(e,i),g(i,a),g(a,l),c=!0},p(t,[e]){const s={};1&e&&(s.characters=t[0].simplified),1&e&&(s.tones=t[0].tone_marks),r.$set(s),t[0].simplified!=t[0].traditional?d?(d.p(t,e),1&e&&J(d,1)):(d=br(t),d.c(),J(d,1),d.m(n,null)):d&&(G(),Z(d,1,1,(()=>{d=null})),K()),(!c||1&e)&&h!==(h=t[0].pinyin_marks+"")&&z(l,h)},i(t){c||(J(r.$$.fragment,t),J(d),c=!0)},o(t){Z(r.$$.fragment,t),Z(d),c=!1},d(t){t&&$(e),st(r),d&&d.d()}}}function zr(t,e,n){let{word:r={}}=e;return t.$$set=t=>{"word"in t&&n(0,r=t.word)},[r]}class Sr extends it{constructor(t){super(),ot(this,t,zr,Cr,i,{word:0})}}function Pr(t){let e,n,r,s=t[0].traditional+"";return{c(){e=_(" ("),n=_(s),r=_(")")},m(t,s){m(t,e,s),m(t,n,s),m(t,r,s)},p(t,e){1&e&&s!==(s=t[0].traditional+"")&&z(n,s)},d(t){t&&$(e),t&&$(n),t&&$(r)}}}function Tr(t){let e,n,r,s=t[0].simplified+"",o=t[0].simplified!=t[0].traditional&&Pr(t);return{c(){e=_(s),n=y(),o&&o.c(),r=x()},m(t,s){m(t,e,s),m(t,n,s),o&&o.m(t,s),m(t,r,s)},p(t,n){1&n&&s!==(s=t[0].simplified+"")&&z(e,s),t[0].simplified!=t[0].traditional?o?o.p(t,n):(o=Pr(t),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},d(t){t&&$(e),t&&$(n),o&&o.d(t),t&&$(r)}}}function Er(t){let e,n,r;return n=new dr({props:{link:t[0].traditional,$$slots:{default:[Tr]},$$scope:{ctx:t}}}),n.$on("open",t[1]),{c(){e=v("div"),nt(n.$$.fragment),C(e,"class","dictionary-content--mw svelte-n92ii8")},m(t,s){m(t,e,s),rt(n,e,null),r=!0},p(t,[e]){const r={};1&e&&(r.link=t[0].traditional),9&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){t&&$(e),st(n)}}}function Wr(t,e,n){let{value:r}=e;const s=D();return t.$$set=t=>{"value"in t&&n(0,r=t.value)},[r,t=>s("event",t.detail)]}class Mr extends it{constructor(t){super(),ot(this,t,Wr,Er,i,{value:0})}}function Dr(t,e,n){const r=t.slice();return r[18]=e[n],r}function Ar(t){let e,n,r,s,o,i,a,l,c,h,d,u,p;n=new Sr({props:{word:t[0]}}),s=new Wn({props:{$$slots:{default:[Fr]},$$scope:{ctx:t}}}),c=new lr({props:{values:t[0].english,component:wr}}),c.$on("event",t[2]);let f=t[0].measure_words.length&&Hr(t),w="string"==typeof t[0].notes&&Ur(t);return{c(){e=v("section"),nt(n.$$.fragment),r=y(),nt(s.$$.fragment),o=y(),i=v("section"),a=v("h2"),a.textContent="Definitions",l=y(),nt(c.$$.fragment),h=y(),f&&f.c(),d=y(),w&&w.c(),u=x(),C(e,"class","dictionary-content dictionary-content--header svelte-1dqewiq"),C(a,"class","dictionary-content--section-title svelte-1dqewiq"),C(i,"class","dictionary-content svelte-1dqewiq")},m(t,$){m(t,e,$),rt(n,e,null),g(e,r),rt(s,e,null),m(t,o,$),m(t,i,$),g(i,a),g(i,l),rt(c,i,null),m(t,h,$),f&&f.m(t,$),m(t,d,$),w&&w.m(t,$),m(t,u,$),p=!0},p(t,e){const r={};1&e&&(r.word=t[0]),n.$set(r);const o={};2097154&e&&(o.$$scope={dirty:e,ctx:t}),s.$set(o);const i={};1&e&&(i.values=t[0].english),c.$set(i),t[0].measure_words.length?f?(f.p(t,e),1&e&&J(f,1)):(f=Hr(t),f.c(),J(f,1),f.m(d.parentNode,d)):f&&(G(),Z(f,1,1,(()=>{f=null})),K()),"string"==typeof t[0].notes?w?w.p(t,e):(w=Ur(t),w.c(),w.m(u.parentNode,u)):w&&(w.d(1),w=null)},i(t){p||(J(n.$$.fragment,t),J(s.$$.fragment,t),J(c.$$.fragment,t),J(f),p=!0)},o(t){Z(n.$$.fragment,t),Z(s.$$.fragment,t),Z(c.$$.fragment,t),Z(f),p=!1},d(t){t&&$(e),st(n),st(s),t&&$(o),t&&$(i),st(c),t&&$(h),f&&f.d(t),t&&$(d),w&&w.d(t),t&&$(u)}}}function Lr(t){let e,n;return e=new Pn({props:{grouped:"true",classes:["sy-tooltip--container"],$$slots:{default:[Br]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[18].action)&&t[18].action.apply(this,arguments)})),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(n,r){t=n;const s={};2097154&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Rr(t){let e,n;return e=new jn({props:{values:t[18].dropdown,position:"right",$$slots:{default:[Nr]},$$scope:{ctx:t}}}),e.$on("selection",t[4]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};2&n&&(r.values=t[18].dropdown),2097154&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ir(t){let e,n,r,s=t[18].tooltip+"";return{c(){e=v("div"),n=v("p"),r=_(s),C(e,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,s){m(t,e,s),g(e,n),g(n,r)},p(t,e){2&e&&s!==(s=t[18].tooltip+"")&&z(r,s)},d(t){t&&$(e)}}}function Br(t){let e,n,r,s;var o=t[18].component;o&&(e=P(o,{props:{size:"18"}}));let i=t[18].tooltip&&Ir(t);return{c(){e&&nt(e.$$.fragment),n=y(),i&&i.c(),r=y()},m(t,o){e&&rt(e,t,o),m(t,n,o),i&&i.m(t,o),m(t,r,o),s=!0},p(t,s){if(2&s&&o!==(o=t[18].component)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(e=P(o,{props:{size:"18"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}t[18].tooltip?i?i.p(t,s):(i=Ir(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},i(t){s||(e&&J(e.$$.fragment,t),s=!0)},o(t){e&&Z(e.$$.fragment,t),s=!1},d(t){e&&st(e,t),t&&$(n),i&&i.d(t),t&&$(r)}}}function jr(t){let e,n,r,s=t[18].tooltip+"";return{c(){e=v("div"),n=v("p"),r=_(s),C(e,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,s){m(t,e,s),g(e,n),g(n,r)},p(t,e){2&e&&s!==(s=t[18].tooltip+"")&&z(r,s)},d(t){t&&$(e)}}}function Or(t){let e,n,r,s;var o=t[18].component;o&&(e=P(o,{props:{size:"18"}}));let i=t[18].tooltip&&jr(t);return{c(){e&&nt(e.$$.fragment),n=y(),i&&i.c(),r=x()},m(t,o){e&&rt(e,t,o),m(t,n,o),i&&i.m(t,o),m(t,r,o),s=!0},p(t,s){if(2&s&&o!==(o=t[18].component)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(e=P(o,{props:{size:"18"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}t[18].tooltip?i?i.p(t,s):(i=jr(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},i(t){s||(e&&J(e.$$.fragment,t),s=!0)},o(t){e&&Z(e.$$.fragment,t),s=!1},d(t){e&&st(e,t),t&&$(n),i&&i.d(t),t&&$(r)}}}function Nr(t){let e,n,r;return e=new Pn({props:{grouped:"true",classes:["sy-tooltip--container",...t[18].classes],$$slots:{default:[Or]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[18].action)&&t[18].action.apply(this,arguments)})),{c(){nt(e.$$.fragment),n=y()},m(t,s){rt(e,t,s),m(t,n,s),r=!0},p(n,r){t=n;const s={};2&r&&(s.classes=["sy-tooltip--container",...t[18].classes]),2097154&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){r||(J(e.$$.fragment,t),r=!0)},o(t){Z(e.$$.fragment,t),r=!1},d(t){st(e,t),t&&$(n)}}}function qr(t){let e,n,r,s;const o=[Rr,Lr],i=[];function a(t,e){return t[18].dropdown?0:1}return e=a(t),n=i[e]=o[e](t),{c(){n.c(),r=x()},m(t,n){i[e].m(t,n),m(t,r,n),s=!0},p(t,s){let l=e;e=a(t),e===l?i[e].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),n=i[e],n?n.p(t,s):(n=i[e]=o[e](t),n.c()),J(n,1),n.m(r.parentNode,r))},i(t){s||(J(n),s=!0)},o(t){Z(n),s=!1},d(t){i[e].d(t),t&&$(r)}}}function Fr(t){let e,n,r=t[1],s=[];for(let e=0;eZ(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t{r=null})),K())},i(t){n||(J(r),n=!0)},o(t){Z(r),n=!1},d(t){t&&$(e),r&&r.d()}}}function Yr(t,e,n){let r,{word:s}=e,{lists:o=[]}=e,{backgroundColor:i="grey"}=e,a=[];const l=()=>{window.bookmarkManager.inList(s.hash).then((t=>{n(8,a=t),n(1,r[0].component=f(),r),n(1,r[0].tooltip=g(),r)})).catch((t=>{Ke("There was an error fetching list membership. Check the log for more details.",t)}))},c=(t,e,n)=>{window.bookmarkManager[t](e,n).then((()=>{l()})).catch((t=>{Ke("There was an error modifying the list membership. Check the log for more details.",{e:t,word:n,list:e})}))},h=(t,e)=>{c("removeFromList",t,e)},d=(t,e)=>{c("addToList",t,e)},u=window.__TAURI__.invoke,p=D(),f=()=>a.length?Lt:$e,g=()=>`${a.length?"Remove from":"Add to"} ${o.length>1?"List":"Bookmarks"}`;let m;return t.$$set=t=>{"word"in t&&n(0,s=t.word),"lists"in t&&n(6,o=t.lists),"backgroundColor"in t&&n(7,i=t.backgroundColor)},t.$$.update=()=>{1&t.$$.dirty&&s&&l(),321&t.$$.dirty&&n(1,r=[{component:f(),tooltip:g(),action:()=>{if(1===o.length){const t=o[0];a.includes(t)?h(t,s):d(t,s)}},dropdown:1===o.length?void 0:o.map((t=>{let e=a.includes(t);return{text:t,id:t,component:e?qn:An,icon:e?Lt:void 0,hover:e?"red":void 0}})),classes:["sy-button--grouped--first"]},{component:ne,tooltip:"Enlarge Characters",action:()=>{u("open_character_window",{word:{traditional:s.traditional,simplified:s.simplified}}).catch((t=>{Ke("An unknown error occurred while trying to open the enlarged character window. Please check the log for more details.",t)}))}}])},[s,r,t=>p("link",t.detail),()=>{const t=s;clearTimeout(m),m=setTimeout((()=>{const e=document.getElementById("dictionary-content--notes").value.trim();window.bookmarkManager.updateProperty(t.hash,"notes",e).then((()=>{t.notes=e})).catch((t=>{Ke("An unknown error occurred while trying to save the notes. Please check the log for more details.",t)}))}),500)},t=>{const e=t.detail;a.includes(e)?h(e,s):d(e,s)},()=>["dictionary-content-container",`dictionary-content--background-${i}`].join(" "),o,i,a]}class Qr extends it{constructor(t){super(),ot(this,t,Yr,Vr,i,{word:0,lists:6,backgroundColor:7})}}function Xr(e){let n;return{c(){n=v("hr"),C(n,"class","sy-dropdown--divider svelte-n4h875")},m(t,e){m(t,n,e)},p:t,i:t,o:t,d(t){t&&$(n)}}}function Gr(t,e,n){let{text:r}=e,{icon:s}=e;return t.$$set=t=>{"text"in t&&n(0,r=t.text),"icon"in t&&n(1,s=t.icon)},[r,s]}class Kr extends it{constructor(t){super(),ot(this,t,Gr,Xr,i,{text:0,icon:1})}}const Jr=t=>({}),Zr=t=>({}),ts=t=>({}),es=t=>({});function ns(e){let n,r;return n=new Ne({props:{size:"14"}}),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function rs(t){let e,n,r,s,o,i,a,c,p,f,w,k,x,b;a=new Pn({props:{style:"ghost",$$slots:{default:[ns]},$$scope:{ctx:t}}}),a.$on("click",t[4]);const P=t[3].body,T=l(P,t,t[5],es),E=t[3].footer,W=l(E,t,t[5],Zr);return{c(){e=v("div"),n=v("div"),r=v("div"),s=v("h2"),o=_(t[1]),i=y(),nt(a.$$.fragment),c=y(),p=v("div"),T&&T.c(),f=y(),w=v("div"),W&&W.c(),k=y(),x=v("div"),C(s,"class","sy-modal--title svelte-sr1ian"),C(r,"class","sy-modal--header svelte-sr1ian"),C(p,"class","sy-modal--body svelte-sr1ian"),C(w,"class","sy-modal--footer svelte-sr1ian"),C(n,"class","sy-modal--content svelte-sr1ian"),C(x,"class","sy-modal--backdrop svelte-sr1ian"),C(e,"class","sy-modal--container svelte-sr1ian"),S(e,"sy-modal--active",t[0])},m(t,l){m(t,e,l),g(e,n),g(n,r),g(r,s),g(s,o),g(r,i),rt(a,r,null),g(n,c),g(n,p),T&&T.m(p,null),g(n,f),g(n,w),W&&W.m(w,null),g(e,k),g(e,x),b=!0},p(t,[n]){(!b||2&n)&&z(o,t[1]);const r={};32&n&&(r.$$scope={dirty:n,ctx:t}),a.$set(r),T&&T.p&&(!b||32&n)&&d(T,P,t,t[5],b?h(P,t[5],n,ts):u(t[5]),es),W&&W.p&&(!b||32&n)&&d(W,E,t,t[5],b?h(E,t[5],n,Jr):u(t[5]),Zr),(!b||1&n)&&S(e,"sy-modal--active",t[0])},i(t){b||(J(a.$$.fragment,t),J(T,t),J(W,t),b=!0)},o(t){Z(a.$$.fragment,t),Z(T,t),Z(W,t),b=!1},d(t){t&&$(e),st(a),T&&T.d(t),W&&W.d(t)}}}function ss(t,e,n){let{$$slots:r={},$$scope:s}=e,{visible:o=!1}=e,{title:i=""}=e;const a=D();return t.$$set=t=>{"visible"in t&&n(0,o=t.visible),"title"in t&&n(1,i=t.title),"$$scope"in t&&n(5,s=t.$$scope)},[o,i,a,r,t=>{a("close",t)},s]}class os extends it{constructor(t){super(),ot(this,t,ss,rs,i,{visible:0,title:1})}}function is(t,e,n){const r=t.slice();return r[30]=e[n],r}function as(t){let e,n,r,s;return r=new Bt({props:{size:"20"}}),{c(){e=_(t[0]),n=_(" "),nt(r.$$.fragment)},m(t,o){m(t,e,o),m(t,n,o),rt(r,t,o),s=!0},p(t,n){(!s||1&n[0])&&z(e,t[0])},i(t){s||(J(r.$$.fragment,t),s=!0)},o(t){Z(r.$$.fragment,t),s=!1},d(t){t&&$(e),t&&$(n),st(r,t)}}}function ls(t){let e,n;return e=new Pn({props:{size:"large",style:"ghost",center:!0,$$slots:{default:[as]},$$scope:{ctx:t}}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};1&n[0]|4&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function cs(t){let e,n,r,s;return n=new Pn({props:{style:"ghost",disabled:t[30].disabled,hover:t[30].hover,classes:["sy-tooltip--container"],$$slots:{default:[hs]},$$scope:{ctx:t}}}),n.$on("click",t[30].action),{c(){e=v("span"),nt(n.$$.fragment),r=y(),C(e,"class","bookmarks--header--action-item svelte-12dvz92")},m(t,o){m(t,e,o),rt(n,e,null),g(e,r),s=!0},p(t,e){const r={};4&e[1]&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i(t){s||(J(n.$$.fragment,t),s=!0)},o(t){Z(n.$$.fragment,t),s=!1},d(t){t&&$(e),st(n)}}}function hs(t){let e,n,r,s,o,i,a=t[30].tooltip+"";var l=t[30].icon;return l&&(e=P(l,{props:{size:"20"}})),{c(){e&&nt(e.$$.fragment),n=y(),r=v("div"),s=v("p"),o=_(a),C(r,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,a){e&&rt(e,t,a),m(t,n,a),m(t,r,a),g(r,s),g(s,o),i=!0},p(t,r){if(l!==(l=t[30].icon)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}l?(e=P(l,{props:{size:"20"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}},i(t){i||(e&&J(e.$$.fragment,t),i=!0)},o(t){e&&Z(e.$$.fragment,t),i=!1},d(t){e&&st(e,t),t&&$(n),t&&$(r)}}}function ds(t){let e,n,r=!t[30].exclude.includes(t[0]),s=r&&cs(t);return{c(){s&&s.c(),e=x()},m(t,r){s&&s.m(t,r),m(t,e,r),n=!0},p(t,n){1&n[0]&&(r=!t[30].exclude.includes(t[0])),r?s?(s.p(t,n),1&n[0]&&J(s,1)):(s=cs(t),s.c(),J(s,1),s.m(e.parentNode,e)):s&&(G(),Z(s,1,1,(()=>{s=null})),K())},i(t){n||(J(s),n=!0)},o(t){Z(s),n=!1},d(t){s&&s.d(t),t&&$(e)}}}function us(e){let n,r,s,o,i;return o=new Gn({props:{size:"large",placeholder:`ex. ${e[10]()}`,id:"create-new-list-input"}}),{c(){n=v("div"),r=v("p"),r.textContent="What would you like to call this list?",s=y(),nt(o.$$.fragment),C(n,"class","bookmarks-modal-content svelte-12dvz92"),C(n,"slot","body")},m(t,e){m(t,n,e),g(n,r),g(n,s),rt(o,n,null),i=!0},p:t,i(t){i||(J(o.$$.fragment,t),i=!0)},o(t){Z(o.$$.fragment,t),i=!1},d(t){t&&$(n),st(o)}}}function ps(t){let e;return{c(){e=_("Cancel")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function fs(t){let e;return{c(){e=_("Create")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function gs(t){let e,n,r,s;return e=new Pn({props:{size:"large",$$slots:{default:[ps]},$$scope:{ctx:t}}}),e.$on("click",t[11]),r=new Pn({props:{size:"large",color:"green",disabled:t[6],$$slots:{default:[fs]},$$scope:{ctx:t}}}),r.$on("click",t[12]),{c(){nt(e.$$.fragment),n=_("\n\t\t\t \n\t\t\t"),nt(r.$$.fragment)},m(t,o){rt(e,t,o),m(t,n,o),rt(r,t,o),s=!0},p(t,n){const s={};4&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s);const o={};64&n[0]&&(o.disabled=t[6]),4&n[1]&&(o.$$scope={dirty:n,ctx:t}),r.$set(o)},i(t){s||(J(e.$$.fragment,t),J(r.$$.fragment,t),s=!0)},o(t){Z(e.$$.fragment,t),Z(r.$$.fragment,t),s=!1},d(t){st(e,t),t&&$(n),st(r,t)}}}function ms(t){let e,n,r,s,o,i,a,l,c,h,d,u,p,f,k;r=new jn({props:{values:t[3],$$slots:{default:[ls]},$$scope:{ctx:t}}}),r.$on("selection",t[9]);let _=t[14],x=[];for(let e=0;e<_.length;e+=1)x[e]=ds(is(t,_,e));const b=t=>Z(x[t],1,1,(()=>{x[t]=null}));return c=new lr({props:{style:"preview",values:t[4],highlight:t[7],filterable:!0}}),c.$on("selection",t[13]),u=new Qr({props:{word:t[1],lists:t[2]}}),f=new os({props:{title:"Create List",visible:t[5],$$slots:{footer:[gs],body:[us]},$$scope:{ctx:t}}}),f.$on("close",t[11]),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),s=y(),o=v("div");for(let t=0;t{window.bookmarkManager.getLists().then((e=>{n(2,a=e),n(3,l=[...e.map((t=>({text:t,id:t,component:An}))).sort(((t,e)=>t.text.localeCompare(e.text))),{component:Kr},{text:"Create New",id:"create-new",component:qn,icon:$e,color:"blue",hover:"green"}]),t()})).catch((t=>{Ke("There was an error fetching word lists. Check the logs for more details.",t)}))};c((()=>{}));let h=[],d=[];const u=t=>{window.bookmarkManager.getListContent(i).then((e=>{var r;h=e,n(4,(r=e,n(7,v=!1),d=r.map((t=>({headline:t.traditional===t.simplified?t.simplified:`${t.simplified} (${t.traditional})`,subtitle:t.pinyin_marks,content:t.english.join("; "),active:!1}))))),t()})).catch((t=>{Ke("There was an error fetching the word list content. Check the logs for more details.",t)}))};u((()=>{}));const p=t=>{n(0,i=t),u((()=>{}))},f=["HSK 1","Week 3 Vocab","Internet Slang","Idioms","Chapter 7"],g=["create-new","Bookmarks"];let m=!1,$=!1;const w=()=>{n(5,m=!1),document.getElementById("create-new-list-input").value="",n(6,$=!1)};let v=!0,k=!1;return[i,o,a,l,d,m,$,v,s,t=>{"create-new"!==t.detail?p(t.detail):n(5,m=!0)},()=>f.slice(Math.random()*f.length)[0],w,()=>{n(6,$=!0);const t=document.getElementById("create-new-list-input").value.trim();if(!t||g.includes(t))return Ke(`Cannot create new list with name ${t}.`),void w();window.bookmarkManager.createList(t).then((()=>{c((()=>{w()}))})).catch((e=>{Ke(`There was an unexpected error while attempting to create the list ${t}. Check the log for more details.`,e),w()}))},t=>{n(1,o=h[t.detail.index]),n(7,v=!0)},[{icon:Gt,action:()=>{r("import_list_data").then((t=>{if(t){const e=((t,e)=>{let n=t,r=2;for(;e.includes(n)&&r<=100;)n=`${t} ${r}`,r++;return n})(t.meta.name,a);window.bookmarkManager.createList(e).then((()=>{const n=t.entries.reduceRight(((t,e)=>t.find((t=>t.hash===e.hash))?t:[...t,e]),[]).map((t=>window.bookmarkManager.addToList(e,t)));return Promise.all(n)})).then((()=>{c((()=>{}))})).catch((t=>{Ke("There was an error importing the list. Check the log for more details.",t)}))}})).catch((t=>{Ke("There was an error importing the list. Check the log for more details.",t)}))},tooltip:"Import",exclude:[],disabled:!1},{icon:Be,action:()=>{r("export_list_data",{name:i,data:h}).then((()=>{})).catch((t=>{Ke("There was an error exporting your list. Check the log for more details.",t)}))},tooltip:"Export",exclude:[],disabled:!1},{icon:Me,action:()=>{k=!0,window.__TAURI__.dialog.ask(`Are you sure you want to delete ${i}?`,"Delete List").then((t=>{t?window.bookmarkManager.deleteList(i).then((()=>{p("Bookmarks"),c((()=>{k=!1}))})).catch((t=>{Ke(`There was an unexpected error deleting the list ${i}. Please check the log for more details.`,t),k=!1})):k=!1})).catch((t=>{Ke(`There was an unexpected error while attempting to delete the list ${i}. Check the log for more details.`,t),k=!1}))},tooltip:"Delete",exclude:["Bookmarks"],disabled:k,hover:"red"}]]}class ws extends it{constructor(t){super(),ot(this,t,$s,ms,i,{},null,[-1,-1])}}function vs(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${ks}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let ks="CHAT";class _s extends it{constructor(t){super(),ot(this,t,null,vs,i,{})}}function ys(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${xs}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let xs="HELP";class bs extends it{constructor(t){super(),ot(this,t,null,ys,i,{})}}function Cs(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${zs}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let zs="NOT FOUND";class Ss extends it{constructor(t){super(),ot(this,t,null,Cs,i,{})}}function Ps(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${Ts}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let Ts="READER";class Es extends it{constructor(t){super(),ot(this,t,null,Ps,i,{})}}function Ws(e){let n,r;return n=new Nt({props:{size:"20"}}),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function Ms(e){let n,r;return n=new Ht({props:{size:"20"}}),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function Ds(t){let e;return{c(){e=_(t[4])},m(t,n){m(t,e,n)},p(t,n){16&n&&z(e,t[4])},d(t){t&&$(e)}}}function As(t){let e,n,r,s,o,i,a,l,c,h,d,u,p,f,w,k,_,x;return r=new Pn({props:{style:"ghost",size:"large",disabled:null==t[7][t[0]-1],$$slots:{default:[Ws]},$$scope:{ctx:t}}}),r.$on("click",t[9]),o=new Pn({props:{style:"ghost",size:"large",disabled:null==t[7][t[0]+1],$$slots:{default:[Ms]},$$scope:{ctx:t}}}),o.$on("click",t[10]),a=new Pn({props:{style:"ghost",size:"large",$$slots:{default:[Ds]},$$scope:{ctx:t}}}),a.$on("click",t[15]),c=new Gn({props:{spellcheck:"false",style:"ghost",size:"large",placeholder:"Search...",id:"search",transparency:Rs}}),c.$on("change",t[16]),c.$on("keyup",t[17]),c.$on("enter",t[13]),f=new lr({props:{style:"preview",values:t[1],highlight:t[5]}}),f.$on("selection",t[12]),_=new Qr({props:{word:t[3],lists:t[2]}}),_.$on("link",t[14]),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),s=y(),nt(o.$$.fragment),i=y(),nt(a.$$.fragment),l=y(),nt(c.$$.fragment),d=y(),u=v("div"),p=v("div"),nt(f.$$.fragment),w=y(),k=v("div"),nt(_.$$.fragment),C(n,"class","search-bar-container svelte-sv63r7"),C(n,"data-testid","search-bar-container"),C(n,"data-tauri-drag-region",h=!!t[6]||void 0),S(n,"search-bar-container--transparency",Rs),C(p,"class","search-results svelte-sv63r7"),C(p,"data-elastic",""),C(k,"class","dictionary-content svelte-sv63r7"),C(u,"class","search-content-container svelte-sv63r7"),C(e,"class","search-page-container svelte-sv63r7")},m(t,h){m(t,e,h),g(e,n),rt(r,n,null),g(n,s),rt(o,n,null),g(n,i),rt(a,n,null),g(n,l),rt(c,n,null),g(e,d),g(e,u),g(u,p),rt(f,p,null),g(u,w),g(u,k),rt(_,k,null),x=!0},p(t,[e]){const s={};1&e&&(s.disabled=null==t[7][t[0]-1]),33554432&e&&(s.$$scope={dirty:e,ctx:t}),r.$set(s);const i={};1&e&&(i.disabled=null==t[7][t[0]+1]),33554432&e&&(i.$$scope={dirty:e,ctx:t}),o.$set(i);const l={};33554448&e&&(l.$$scope={dirty:e,ctx:t}),a.$set(l),(!x||64&e&&h!==(h=!!t[6]||void 0))&&C(n,"data-tauri-drag-region",h);const c={};2&e&&(c.values=t[1]),32&e&&(c.highlight=t[5]),f.$set(c);const d={};8&e&&(d.word=t[3]),4&e&&(d.lists=t[2]),_.$set(d)},i(t){x||(J(r.$$.fragment,t),J(o.$$.fragment,t),J(a.$$.fragment,t),J(c.$$.fragment,t),J(f.$$.fragment,t),J(_.$$.fragment,t),x=!0)},o(t){Z(r.$$.fragment,t),Z(o.$$.fragment,t),Z(a.$$.fragment,t),Z(c.$$.fragment,t),Z(f.$$.fragment,t),Z(_.$$.fragment,t),x=!1},d(t){t&&$(e),st(r),st(o),st(a),st(c),st(f),st(_)}}}let Ls,Rs=!1;function Is(t,e,n){let r,s=-1,o=[],i=[],a=[],l=[],c="EN",h=!0,d=!1;window.__TAURI__.os.platform().then((t=>{n(6,d="darwin"===t)}));const u=window.__TAURI__.invoke,p=["EN","PY","ZH"],f=(t,e)=>{(t.length||e)&&(n(5,h=!1),a=t,n(1,i=t.map((t=>({headline:t.traditional===t.simplified?t.simplified:`${t.simplified} (${t.traditional})`,subtitle:t.pinyin_marks,content:t.english.join("; "),active:!1})))))},g=(t,e,r)=>{t?(u("classify",{text:t}).then((t=>{n(4,c=t)})).catch((t=>{Ke("There was an error classifying the language of your query.",t)})),u("query",{text:t}).then((t=>{f(t,e),null!=r&&q().then((()=>{w(r)}))})).catch((t=>{Ke("There was an error searching the dictionary for your query.",t)}))):f([],!0)},m=(t,e)=>{n(3,r=t),n(5,h=e)},$=()=>{const t=p.indexOf(c)+1;n(4,c=p[t{try{switch(e){case"EN":u("query_by_english",{text:t}).then((t=>f(t,!0)));break;case"PY":u("query_by_pinyin",{text:t}).then((t=>f(t,!0)));break;case"ZH":u("query_by_chinese",{text:t}).then((t=>f(t,!0)))}}catch(t){Ke("There was an error searching the dictionary for your query.",t)}})(document.getElementById("search").value,c)},w=t=>{try{document.getElementsByClassName("sy-list-preview-item-container")[t].click()}catch(t){}};window.bookmarkManager.getLists().then((t=>{n(2,l=t)})).catch((t=>{Ke("There was an error fetching word lists. Check the log for more details.",t)}));return[s,i,l,r,c,h,d,o,g,t=>{n(0,s-=1),m(o[s],!1)},t=>{n(0,s+=1),m(o[s],!1)},$,t=>{const e=a[t.detail.index];m(e,!0);let r=o.map((t=>t.word_id)).indexOf(e.word_id);r>=0&&(o.splice(r,1),n(0,s-=1)),o.push(e),n(0,s+=1)},t=>{w(0)},t=>{const e=t.detail;document.getElementById("search").value=e,g(e,!0,0)},()=>$(),t=>g(t.detail,!0),t=>g(t.detail,!1)]}class Bs extends it{constructor(t){super(),ot(this,t,Is,As,i,{})}}function js(t,e,n){const r=t.slice();return r[7]=e[n],r}function Os(t){let e,n,r,s,o,i,a,l,c=t[7].label+"";function h(){return t[2](t[7])}return{c(){e=v("div"),n=v("label"),r=_(c),s=y(),o=v("input"),i=y(),C(n,"for",`tone-${t[7].index+1}`),C(o,"type","color"),o.value=t[7].color,C(o,"id",`tone-${t[7].index+1}`),C(o,"name",`tone-${t[7].index+1}`),C(e,"class","tone-color-picker--tone svelte-1wk3p9z")},m(t,c){m(t,e,c),g(e,n),g(n,r),g(e,s),g(e,o),g(e,i),a||(l=b(o,"change",h),a=!0)},p(e,n){t=e},d(t){t&&$(e),a=!1,l()}}}function Ns(e){let n,r=e[0],s=[];for(let t=0;t{return(e=t,"--"==e.substring(0,2)?n.getPropertyValue(e):e).trim();var e})),s=[{label:"First Tone",color:r[0],index:0},{label:"Second Tone",color:r[1],index:1},{label:"Third Tone",color:r[2],index:2},{label:"Fourth Tone",color:r[3],index:3},{label:"No Tone",color:r[4],index:4}],o=t=>{r[t]=document.getElementById(`tone-${t+1}`).value,e("change",{hasCustomColors:!0,colors:r})};return[s,o,t=>o(t.index)]}class Fs extends it{constructor(t){super(),ot(this,t,qs,Ns,i,{})}}function Hs(e){let n,r,s,o,i,a;return{c(){n=v("div"),r=v("span"),r.textContent="You are up to date",s=y(),o=v("span"),i=_("Version "),a=_(e[0]),C(r,"class","updater-checker--status--title svelte-19yodez"),C(o,"class","update-checker--status--subtitle svelte-19yodez"),C(n,"class","update-checker--up-to-date update-checker--status svelte-19yodez")},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o),g(o,i),g(o,a)},p(t,e){1&e&&z(a,t[0])},i:t,o:t,d(t){t&&$(n)}}}function Us(t){let e,n,r,s,o,i,a,l,c,h,d,u,p;return u=new Pn({props:{color:"green",size:"large",disabled:t[6],$$slots:{default:[Xs]},$$scope:{ctx:t}}}),u.$on("click",t[10]),{c(){e=v("div"),n=v("span"),n.textContent="Update available",r=y(),s=v("span"),o=_("Version "),i=_(t[1]),a=v("br"),l=_("\n\t\t\t\tRelease Notes: "),c=_(t[2]),h=y(),d=v("span"),nt(u.$$.fragment),C(n,"class","updater-checker--status--title svelte-19yodez"),C(s,"class","update-checker--status--subtitle svelte-19yodez"),C(d,"class","update-checker--update-button svelte-19yodez"),C(e,"class","update-checker--status update-checker--update-available svelte-19yodez")},m(t,f){m(t,e,f),g(e,n),g(e,r),g(e,s),g(s,o),g(s,i),g(s,a),g(s,l),g(s,c),g(e,h),g(e,d),rt(u,d,null),p=!0},p(t,e){(!p||2&e)&&z(i,t[1]),(!p||4&e)&&z(c,t[2]);const n={};64&e&&(n.disabled=t[6]),4160&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n)},i(t){p||(J(u.$$.fragment,t),p=!0)},o(t){Z(u.$$.fragment,t),p=!1},d(t){t&&$(e),st(u)}}}function Vs(t){let e,n,r,s;const o=[Ks,Gs],i=[];function a(t,e){return t[5]?0:1}return e=a(t),n=i[e]=o[e](t),{c(){n.c(),r=x()},m(t,n){i[e].m(t,n),m(t,r,n),s=!0},p(t,s){let l=e;e=a(t),e===l?i[e].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),n=i[e],n?n.p(t,s):(n=i[e]=o[e](t),n.c()),J(n,1),n.m(r.parentNode,r))},i(t){s||(J(n),s=!0)},o(t){Z(n),s=!1},d(t){i[e].d(t),t&&$(r)}}}function Ys(t){let e;return{c(){e=_("Updating...")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function Qs(t){let e;return{c(){e=_("Update")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function Xs(t){let e;function n(t,e){return t[6]?Ys:Qs}let r=n(t),s=r(t);return{c(){s.c(),e=x()},m(t,n){s.m(t,n),m(t,e,n)},p(t,o){r!==(r=n(t))&&(s.d(1),s=r(t),s&&(s.c(),s.m(e.parentNode,e)))},d(t){s.d(t),t&&$(e)}}}function Gs(t){let e,n;return e=new Pn({props:{size:"large",$$slots:{default:[Js]},$$scope:{ctx:t}}}),e.$on("click",t[9]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ks(t){let e,n;return e=new Pn({props:{disabled:!0,size:"large",$$slots:{default:[Zs]},$$scope:{ctx:t}}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Js(t){let e;return{c(){e=_("Check for updates")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function Zs(t){let e;return{c(){e=_("Checking for updates...")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function to(t){let e,n,r,s;const o=[Vs,Us,Hs],i=[];function a(t,e){return t[3]?t[4]?1:2:0}return n=a(t),r=i[n]=o[n](t),{c(){e=v("div"),r.c(),C(e,"class","update-checker svelte-19yodez")},m(t,r){m(t,e,r),i[n].m(e,null),s=!0},p(t,[s]){let l=n;n=a(t),n===l?i[n].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),r=i[n],r?r.p(t,s):(r=i[n]=o[n](t),r.c()),J(r,1),r.m(e,null))},i(t){s||(J(r),s=!0)},o(t){Z(r),s=!1},d(t){t&&$(e),i[n].d()}}}function eo(t,e,n){let r=window.version||"",s=window.updateVersion||"",o=window.updateReleaseNotes||"",i=window.updateStatusAvailable||!1,a=window.updateAvailable||!1,l=!1,c=!1;window.version||window.__TAURI__.app.getVersion().then((t=>{n(0,r=t),window.version=t}));const h=()=>{n(5,l=!1),n(6,c=!1),n(4,a=!1),n(3,i=!1),n(1,s=""),n(2,o=""),window.updateAvailable=!1,window.updateStatusAvailable=!1,window.updateVersion="",window.updateReleaseNotes=""},d=()=>{n(5,l=!0),n(6,c=!1),window.__TAURI__.updater.checkUpdate().then((t=>{t.shouldUpdate?(n(1,s=t.manifest.version),n(2,o=t.manifest.body),n(3,i=!0),n(4,a=!0),n(5,l=!1),window.updateVersion=t.manifest.version,window.updateReleaseNotes=t.manifest.body,window.updateStatusAvailable=!0,window.updateAvailable=!0):(n(3,i=!0),n(5,l=!1),n(4,a=!1),window.updateAvailable=!1,window.updateStatusAvailable=!0)})).catch((t=>{h(),Ke("There was an error checking for updates. Please try again later. Check the log for more details.",t)}))},u=()=>{n(6,c=!0),window.__TAURI__.updater.installUpdate().then((()=>{window.__TAURI__.process.relaunch()})).catch((t=>{h(),Ke("There was an error fetching the update. Please try again later. Check the log for more details.",t)}))};return[r,s,o,i,a,l,c,d,u,()=>d(),()=>u()]}class no extends it{constructor(t){super(),ot(this,t,eo,to,i,{})}}const ro=new Uint8Array(16);function so(){if(!Ls&&(Ls="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ls))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ls(ro)}const oo=[];for(let t=0;t<256;++t)oo.push((t+256).toString(16).slice(1));var io={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ao(t,e,n){if(io.randomUUID&&!e&&!t)return io.randomUUID();const r=(t=t||{}).random||(t.rng||so)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return function(t,e=0){return oo[t[e+0]]+oo[t[e+1]]+oo[t[e+2]]+oo[t[e+3]]+"-"+oo[t[e+4]]+oo[t[e+5]]+"-"+oo[t[e+6]]+oo[t[e+7]]+"-"+oo[t[e+8]]+oo[t[e+9]]+"-"+oo[t[e+10]]+oo[t[e+11]]+oo[t[e+12]]+oo[t[e+13]]+oo[t[e+14]]+oo[t[e+15]]}(r)}function lo(e){let n,r,s,o,i,a,l;return{c(){n=v("span"),r=v("input"),s=y(),o=v("label"),i=_("Toggle"),C(r,"type","checkbox"),C(r,"id",e[1]),C(r,"class","sy-toggle svelte-ssxm77"),r.value=e[2],r.checked=e[0],C(o,"for",e[1]),C(o,"class","sy-toggle--label svelte-ssxm77"),C(n,"class","sy-toggle--container svelte-ssxm77")},m(t,c){m(t,n,c),g(n,r),g(n,s),g(n,o),g(o,i),a||(l=b(r,"change",e[4]),a=!0)},p(t,[e]){2&e&&C(r,"id",t[1]),4&e&&(r.value=t[2]),1&e&&(r.checked=t[0]),2&e&&C(o,"for",t[1])},i:t,o:t,d(t){t&&$(n),a=!1,l()}}}function co(t,e,n){let{checked:r=!1}=e,{id:s=ao()}=e,{value:o}=e;const i=D();return t.$$set=t=>{"checked"in t&&n(0,r=t.checked),"id"in t&&n(1,s=t.id),"value"in t&&n(2,o=t.value)},[r,s,o,i,t=>i("change",t.srcElement.checked)]}class ho extends it{constructor(t){super(),ot(this,t,co,lo,i,{checked:0,id:1,value:2})}}function uo(t,e,n){const r=t.slice();return r[2]=e[n],r}function po(t){let n,r,s,o,i,a,l,c=t[2].label+"";const h=[t[2].props];var d=t[2].component;function u(t){let n={};for(let t=0;t{st(t,1)})),K()}d?(i=P(d,u()),i.$on("change",t[2].handler),nt(i.$$.fragment),J(i.$$.fragment,1),rt(i,n,a)):i=null}else d&&i.$set(r)},i(t){l||(i&&J(i.$$.fragment,t),l=!0)},o(t){i&&Z(i.$$.fragment,t),l=!1},d(t){t&&$(n),i&&st(i)}}}function fo(t){let e,n,r,s,o,i,a,l=t[1],c=[];for(let e=0;eZ(c[t],1,1,(()=>{c[t]=null}));return{c(){e=v("div"),n=v("div"),r=v("h1"),s=_("Settings"),o=y(),i=v("div");for(let t=0;twindow.preferenceManager.set("beta",t.detail),component:ho,props:{checked:window.preferenceManager.get("beta")}},{label:"Updates",centerLabel:!1,component:no,props:{},handler:()=>{}},{label:"Tone Colors",centerLabel:!1,handler:t=>window.preferenceManager.set("toneColors",t.detail),component:Fs,props:{}}]]}class mo extends it{constructor(t){super(),ot(this,t,go,fo,i,{})}}function $o(t,e,n){const r=t.slice();return r[4]=e[n],r}function wo(t){let e,n,r,s,o,i,a,l=t[4].tooltip+"";var c=t[4].icon;return c&&(e=P(c,{props:{size:"18"}})),{c(){e&&nt(e.$$.fragment),n=y(),r=v("div"),s=v("p"),o=_(l),i=y(),C(r,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,l){e&&rt(e,t,l),m(t,n,l),m(t,r,l),g(r,s),g(s,o),m(t,i,l),a=!0},p(t,r){if(c!==(c=t[4].icon)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}c?(e=P(c,{props:{size:"18"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}},i(t){a||(e&&J(e.$$.fragment,t),a=!0)},o(t){e&&Z(e.$$.fragment,t),a=!1},d(t){e&&st(e,t),t&&$(n),t&&$(r),t&&$(i)}}}function vo(t){let e,n;return e=new Pn({props:{center:!0,size:"large",classes:["sy-tooltip--container"],$$slots:{default:[wo]},$$scope:{ctx:t}}}),e.$on("click",t[4].action),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ko(t){let e,n,r,s,o,i,a=t[1],l=[];for(let e=0;eZ(l[t],1,1,(()=>{l[t]=null}));return{c(){e=v("div"),n=v("span"),r=_(t[0]),s=y(),o=v("span");for(let t=0;t{r&&s("selection",r)},tooltip:`Flashcards for ${r}`}];return t.$$set=t=>{"value"in t&&n(0,r=t.value)},[r,o]}class yo extends it{constructor(t){super(),ot(this,t,_o,ko,i,{value:0})}}function xo(e){let n;return{c(){n=v("div"),n.innerHTML="To take a quiz or study flashcards, add vocab words to your\n\t\t\t\t\tlists.",C(n,"class","study--empty svelte-1hd52ir")},m(t,e){m(t,n,e)},p:t,i:t,o:t,d(t){t&&$(n)}}}function bo(t){let e,n;return e=new lr({props:{values:t[0],component:yo}}),e.$on("selection",t[2]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.values=t[0]),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Co(t){let e,n,r,s,o,i,a,l,c;const h=[bo,xo],d=[];function u(t,e){return t[0].length?0:1}return a=u(t),l=d[a]=h[a](t),{c(){e=v("div"),n=v("div"),r=v("h1"),s=_("Study"),o=y(),i=v("div"),l.c(),C(r,"data-tauri-drag-region",!!t[1]||void 0),C(n,"class","study--title svelte-1hd52ir"),C(n,"data-tauri-drag-region",!!t[1]||void 0),C(i,"class","study--content"),C(e,"class","study--container svelte-1hd52ir")},m(t,l){m(t,e,l),g(e,n),g(n,r),g(r,s),g(e,o),g(e,i),d[a].m(i,null),c=!0},p(t,[e]){let n=a;a=u(t),a===n?d[a].p(t,e):(G(),Z(d[n],1,1,(()=>{d[n]=null})),K(),l=d[a],l?l.p(t,e):(l=d[a]=h[a](t),l.c()),J(l,1),l.m(i,null))},i(t){c||(J(l),c=!0)},o(t){Z(l),c=!1},d(t){t&&$(e),d[a].d()}}}function zo(t,e,n){const r="darwin"===window.platform;let s=[],o=[],i=[];window.bookmarkManager.getLists().then((t=>{n(3,s=t.sort(((t,e)=>t.localeCompare(e))))})).catch((t=>{Ke("There was an error fetching word lists. Check the logs for more details.",t)})),window.bookmarkManager.getEmptyLists().then((t=>{n(4,o=t)})).catch((t=>{Ke("There was an error fetching the empty lists. Check the log for more details.",t)}));return t.$$.update=()=>{24&t.$$.dirty&&n(0,i=s.filter((t=>!o.includes(t))))},[i,r,t=>{const e=`#/study/flashcards?list=${t.detail}`;document.location.href=e},s,o]}class So extends it{constructor(t){super(),ot(this,t,zo,Co,i,{})}}function Po(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${To}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let To="TOOLS";class Eo extends it{constructor(t){super(),ot(this,t,null,Po,i,{})}}function Wo(t,e,n){const r=t.slice();return r[12]=e[n],r}function Mo(t,e,n){const r=t.slice();return r[12]=e[n],r}function Do(t){let e,n,r,s,o,i=t[12].label+"";var a=t[12].icon;return a&&(e=P(a,{})),{c(){e&&nt(e.$$.fragment),n=_("\n  \n "),r=_(i),s=y()},m(t,i){e&&rt(e,t,i),m(t,n,i),m(t,r,i),m(t,s,i),o=!0},p(t,s){if(32&s&&a!==(a=t[12].icon)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}a?(e=P(a,{}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}(!o||32&s)&&i!==(i=t[12].label+"")&&z(r,i)},i(t){o||(e&&J(e.$$.fragment,t),o=!0)},o(t){e&&Z(e.$$.fragment,t),o=!1},d(t){e&&st(e,t),t&&$(n),t&&$(r),t&&$(s)}}}function Ao(t){let e,n;return e=new Pn({props:{disabled:t[12].disabled,style:"ghost",center:!0,$$slots:{default:[Do]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[12].action)&&t[12].action.apply(this,arguments)})),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(n,r){t=n;const s={};32&r&&(s.disabled=t[12].disabled),131104&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Lo(t){let e,n,r,s,o,i=t[12].label+"";var a=t[12].icon;return a&&(r=P(a,{})),{c(){e=_(i),n=_("\n  \n "),r&&nt(r.$$.fragment),s=y()},m(t,i){m(t,e,i),m(t,n,i),r&&rt(r,t,i),m(t,s,i),o=!0},p(t,n){if((!o||64&n)&&i!==(i=t[12].label+"")&&z(e,i),64&n&&a!==(a=t[12].icon)){if(r){G();const t=r;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}a?(r=P(a,{}),nt(r.$$.fragment),J(r.$$.fragment,1),rt(r,s.parentNode,s)):r=null}},i(t){o||(r&&J(r.$$.fragment,t),o=!0)},o(t){r&&Z(r.$$.fragment,t),o=!1},d(t){t&&$(e),t&&$(n),r&&st(r,t),t&&$(s)}}}function Ro(t){let e,n;return e=new Pn({props:{disabled:t[12].disabled,style:"ghost",center:!0,$$slots:{default:[Lo]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[12].action)&&t[12].action.apply(this,arguments)})),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(n,r){t=n;const s={};64&r&&(s.disabled=t[12].disabled),131136&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Io(e){let n;function r(t,e){return t[2].length>0?Oo:jo}let s=r(e),o=s(e);return{c(){n=v("div"),o.c(),C(n,"class","flashcard--front svelte-1mngjuk")},m(t,e){m(t,n,e),o.m(n,null)},p(t,e){s===(s=r(t))&&o?o.p(t,e):(o.d(1),o=s(t),o&&(o.c(),o.m(n,null)))},i:t,o:t,d(t){t&&$(n),o.d()}}}function Bo(t){let e,n,r,s;return r=new Qr({props:{word:t[2][t[0]],backgroundColor:"white",lists:t[4]}}),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),C(n,"class","flashcard--back--container svelte-1mngjuk"),C(e,"class","flashcard--back svelte-1mngjuk")},m(t,o){m(t,e,o),g(e,n),rt(r,n,null),s=!0},p(t,e){const n={};5&e&&(n.word=t[2][t[0]]),16&e&&(n.lists=t[4]),r.$set(n)},i(t){s||(J(r.$$.fragment,t),s=!0)},o(t){Z(r.$$.fragment,t),s=!1},d(t){t&&$(e),st(r)}}}function jo(t){let e,n,r=(t[3]?Fo:qo)+"";return{c(){e=v("h1"),n=_(r),C(e,"class","svelte-1mngjuk")},m(t,r){m(t,e,r),g(e,n)},p(t,e){8&e&&r!==(r=(t[3]?Fo:qo)+"")&&z(n,r)},d(t){t&&$(e)}}}function Oo(t){let e,n,r,s,o,i=t[2][t[0]].simplified+"",a=t[2][t[0]].traditional+"";return{c(){e=v("h1"),n=_(i),r=_(" ("),s=_(a),o=_(")"),C(e,"class","svelte-1mngjuk")},m(t,i){m(t,e,i),g(e,n),g(e,r),g(e,s),g(e,o)},p(t,e){5&e&&i!==(i=t[2][t[0]].simplified+"")&&z(n,i),5&e&&a!==(a=t[2][t[0]].traditional+"")&&z(s,a)},d(t){t&&$(e)}}}function No(t){let e,n,r,s,o,i,a,l,c,h,d=t[5],u=[];for(let e=0;eZ(u[t],1,1,(()=>{u[t]=null}));let f=t[6],k=[];for(let e=0;eZ(k[t],1,1,(()=>{k[t]=null})),x=[Bo,Io],b=[];function z(t,e){return t[1]?0:1}return l=z(t),c=b[l]=x[l](t),{c(){e=v("div"),n=v("div"),r=v("div");for(let t=0;t{b[n]=null})),K(),c=b[l],c?c.p(t,e):(c=b[l]=x[l](t),c.c()),J(c,1),c.m(a,null))},i(t){if(!h){for(let t=0;tn(9,r=t),t.$$.on_destroy.push(a(s,o));let i=!0;const l="darwin"===window.platform;let c,h=0,d=!1,u=[],p=new URLSearchParams(r);c=p.get("list");let f=[];window.bookmarkManager.getLists().then((t=>{n(4,f=t)})).catch((t=>{Ke("There was an error fetching word lists. Check the log for more details.",t)}));let g=[{icon:Nt,label:"Back",disabled:!1,action:()=>{window.history.back()}},{icon:xt,label:"Previous",disabled:0===h,action:()=>{n(0,h-=1)}}],m=[{icon:xe,label:"Flip",disabled:!1,action:()=>{n(1,d=!d)}},{icon:zt,label:"Next",disabled:h===u.length-1,action:()=>{n(0,h+=1)}}];return t.$$.update=()=>{1&t.$$.dirty&&n(5,g[1].disabled=0===h,g),5&t.$$.dirty&&n(6,m[1].disabled=h===u.length-1,m),1&t.$$.dirty&&n(1,d=!1),2&t.$$.dirty&&n(6,m[0].icon=d?ke:xe,m)},window.bookmarkManager.getListContent(c).then((t=>{n(2,u=t),n(3,i=!1)})).catch((t=>{Ke("There was an error fetching list content. Check the log for more details.",t)})),[h,d,u,i,f,g,m,l]}class Uo extends it{constructor(t){super(),ot(this,t,Ho,No,i,{})}}function Vo(e){let n,r,s,o,i,a,l;return s=new Cn({}),a=new kt({props:{routes:e[0]}}),{c(){n=v("div"),r=v("div"),nt(s.$$.fragment),o=y(),i=v("div"),nt(a.$$.fragment),C(r,"class","navigation-container svelte-1izwdrv"),C(i,"class","content-container svelte-1izwdrv"),C(n,"class","app-container svelte-1izwdrv")},m(t,e){m(t,n,e),g(n,r),rt(s,r,null),g(n,o),g(n,i),rt(a,i,null),l=!0},p:t,i(t){l||(J(s.$$.fragment,t),J(a.$$.fragment,t),l=!0)},o(t){Z(s.$$.fragment,t),Z(a.$$.fragment,t),l=!1},d(t){t&&$(n),st(s),st(a)}}}function Yo(t){mn();return[{"/":Bs,"/read":Es,"/bookmarks":ws,"/study":So,"/study/flashcards":Uo,"/tools":Eo,"/help":bs,"/settings":mo,"/chat":_s,"*":Ss}]}class Qo extends it{constructor(t){super(),ot(this,t,Yo,Vo,i,{})}}var Xo;const Go="undefined"==typeof window?global:window,Ko=Go.performance&&(()=>Go.performance.now())||(()=>Date.now()),Jo=Go.requestAnimationFrame||(t=>setTimeout((()=>t(Ko())),1e3/60)),Zo=Go.cancelAnimationFrame||clearTimeout;function ti(t){return t[t.length-1]}const ei=(t,e)=>t<0?e+t:t;function ni(t,e){const n={...t};for(const r in e){const s=t[r],o=e[r];s!==o&&(s&&o&&"object"==typeof s&&"object"==typeof o&&!Array.isArray(o)?n[r]=ni(s,o):n[r]=o)}return n}let ri=0;function si(){return ri++,ri}function oi(t){return t.reduce(((t,e)=>e+t),0)/t.length}function ii(t){const e=t.toUpperCase().trim();if(/^#([A-F0-9]{3}){1,2}$/.test(e)){let t=e.substring(1).split("");3===t.length&&(t=[t[0],t[0],t[1],t[1],t[2],t[2]]);const n=`${t.join("")}`;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}const n=e.match(/^RGBA?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d*\.?\d+))?\)$/);if(n)return{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10),a:parseFloat(n[4]||1,10)};throw new Error(`Invalid color: ${t}`)}function ai(t,e){const n={};for(let r=0;r0||ci.indexOf("Trident/")>0||ci.indexOf("Edge/")>0,di=()=>{};class ui{constructor(t,e,n=di){this._mutationChains=[],this._onStateChange=n,this.state={options:{drawingFadeDuration:e.drawingFadeDuration,drawingWidth:e.drawingWidth,drawingColor:ii(e.drawingColor),strokeColor:ii(e.strokeColor),outlineColor:ii(e.outlineColor),radicalColor:ii(e.radicalColor||e.strokeColor),highlightColor:ii(e.highlightColor)},character:{main:{opacity:e.showCharacter?1:0,strokes:{}},outline:{opacity:e.showOutline?1:0,strokes:{}},highlight:{opacity:1,strokes:{}}},userStrokes:null};for(let e=0;et.scope));return this.cancelMutations(n),new Promise((r=>{const s={_isActive:!0,_index:0,_resolve:r,_mutations:t,_loop:e.loop,_scopes:n};this._mutationChains.push(s),this._run(s)}))}_run(t){if(!t._isActive)return;const e=t._mutations;if(t._index>=e.length){if(!t._loop)return t._isActive=!1,this._mutationChains=this._mutationChains.filter((e=>e!==t)),void t._resolve({canceled:!1});t._index=0}t._mutations[t._index].run(this).then((()=>{t._isActive&&(t._index++,this._run(t))}))}_getActiveMutations(){return this._mutationChains.map((t=>t._mutations[t._index]))}pauseAll(){this._getActiveMutations().forEach((t=>t.pause()))}resumeAll(){this._getActiveMutations().forEach((t=>t.resume()))}cancelMutations(t){for(const e of this._mutationChains)for(const n of e._scopes)for(const r of t)(n.startsWith(r)||r.startsWith(n))&&this._cancelMutationChain(e)}cancelAll(){this.cancelMutations([""])}_cancelMutationChain(t){var e;t._isActive=!1;for(let e=t._index;ee!==t))}}const pi=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),fi=t=>Math.sqrt(Math.pow(t.x,2)+Math.pow(t.y,2)),gi=(t,e)=>fi(pi(t,e)),mi=(t,e=1)=>{const n=10*e;return{x:Math.round(n*t.x)/n,y:Math.round(n*t.y)/n}},$i=t=>{let e=t[0];return t.slice(1).reduce(((t,n)=>{const r=gi(n,e);return e=n,t+r}),0)},wi=(t,e,n)=>{const r=pi(e,t),s=n/fi(r);return{x:e.x+s*r.x,y:e.y+s*r.y}},vi=t=>{const e=((t,e=30)=>{const n=$i(t)/(e-1),r=[t[0]],s=ti(t),o=t.slice(1);for(let t=0;tt.x))),y:oi(e.map((t=>t.y)))},r=e.map((t=>pi(t,n))),s=Math.sqrt(oi([Math.pow(r[0].x,2)+Math.pow(r[0].y,2),Math.pow(ti(r).x,2)+Math.pow(ti(r).y,2)]));return((t,e=.05)=>{const n=t.slice(0,1);for(const r of t.slice(1)){const t=n[n.length-1],s=gi(r,t);if(s>e){const o=Math.ceil(s/e),i=s/o;for(let e=0;e({x:t.x/s,y:t.y/s}))))};function ki(t,e=!1){const n=mi(t[0]),r=t.slice(1);let s=`M ${n.x} ${n.y}`;return r.forEach((t=>{const e=mi(t);s+=` L ${e.x} ${e.y}`})),e&&(s+="Z"),s}const _i=(t,e)=>{const n=(t=>{if(t.length<3)return t;const e=[t[0],t[1]];return t.slice(2).forEach((t=>{const n=e.length,r=pi(t,e[n-1]),s=pi(e[n-1],e[n-2]);r.y*s.x-r.x*s.y==0&&e.pop(),e.push(t)})),e})(t);if(n.length<2)return n;const r=n[1],s=n[0],o=wi(r,s,e),i=n.slice(1);return i.unshift(o),i};class yi{constructor(t,e,n,r=!1){this.path=t,this.points=e,this.strokeNum=n,this.isInRadical=r}getStartingPoint(){return this.points[0]}getEndingPoint(){return this.points[this.points.length-1]}getLength(){return $i(this.points)}getVectors(){let t=this.points[0];return this.points.slice(1).map((e=>{const n=pi(e,t);return t=e,n}))}getDistance(t){const e=this.points.map((e=>gi(e,t)));return Math.min(...e)}getAverageDistance(t){return t.reduce(((t,e)=>t+this.getDistance(e)),0)/t.length}}class xi{constructor(t,e){this.symbol=t,this.strokes=e}}function bi({radStrokes:t,strokes:e,medians:n}){return e.map(((e,r)=>{const s=n[r].map((t=>{const[e,n]=t;return{x:e,y:n}}));return new yi(e,s,r,(o=r,(null!==(i=null==t?void 0:t.indexOf(o))&&void 0!==i?i:-1)>=0));var o,i}))}const[Ci,zi]=[{x:0,y:-124},{x:1024,y:900}],Si=zi.x-Ci.x,Pi=zi.y-Ci.y;class Ti{constructor(t){const{padding:e,width:n,height:r}=t;this.padding=e,this.width=n,this.height=r;const s=n-2*e,o=r-2*e,i=s/Si,a=o/Pi;this.scale=Math.min(i,a);const l=e+(s-this.scale*Si)/2,c=e+(o-this.scale*Pi)/2;this.xOffset=-1*Ci.x*this.scale+l,this.yOffset=-1*Ci.y*this.scale+c}convertExternalPoint(t){return{x:(t.x-this.xOffset)/this.scale,y:(this.height-this.yOffset-t.y)/this.scale}}}const Ei=(t,e)=>{const n=(t=>{const e=[];let n=t[0];return t.slice(1).forEach((t=>{e.push(pi(t,n)),n=t})),e})(t),r=e.getVectors();return oi(n.map((t=>{const e=r.map((e=>{return r=t,((n=e).x*r.x+n.y*r.y)/fi(n)/fi(r);var n,r}));return Math.max(...e)})))>0},Wi=t=>{if(t.length<2)return t;const[e,...n]=t,r=[e];for(const t of n)s=t,o=r[r.length-1],(s.x!==o.x||s.y!==o.y)&&r.push(t);var s,o;return r},Mi=[Math.PI/16,Math.PI/32,0,-1*Math.PI/32,-1*Math.PI/16],Di=(t,e,n)=>{const r=vi(t),s=vi(e);let o=1/0;return Mi.forEach((t=>{const e=((t,e)=>{const n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,s=(t,e,s,o)=>{if(0===t&&0===e)return gi(n[0],r[0]);if(t>0&&0===e)return Math.max(s[0],gi(n[t],r[0]));const i=o[o.length-1];return 0===t&&e>0?Math.max(i,gi(n[0],r[e])):Math.max(Math.min(s[e],s[e-1],i),gi(n[t],r[e]))};let o=[];for(let t=0;tt.map((t=>({x:Math.cos(e)*t.x-Math.sin(e)*t.y,y:Math.sin(e)*t.x+Math.cos(e)*t.y}))))(s,t));e{const{leniency:r=1,isOutlineVisible:s=!1,checkBackwards:o=!0,averageDistanceThreshold:i=350}=n,a=e.getAverageDistance(t),l=a<=i*(s||e.strokeNum>0?.5:1)*r;if(!l)return{isMatch:!1,avgDist:a,meta:{isStrokeBackwards:!1}};const c=((t,e,n)=>{const r=gi(e.getStartingPoint(),t[0]),s=gi(e.getEndingPoint(),t[t.length-1]);return r<=250*n&&s<=250*n})(t,e,r),h=Ei(t,e),d=Di(t,e.points,r),u=((t,e,n)=>n*($i(t)+25)/(e.getLength()+25)>=.35)(t,e,r),p=l&&c&&h&&d&&u;if(o&&!p){if(Ai([...t].reverse(),e,{...n,checkBackwards:!1}).isMatch)return{isMatch:p,avgDist:a,meta:{isStrokeBackwards:!0}}}return{isMatch:p,avgDist:a,meta:{isStrokeBackwards:!1}}};class Li{constructor(t,e,n){this.id=t,this.points=[e],this.externalPoints=[n]}appendPoint(t,e){this.points.push(t),this.externalPoints.push(e)}}class Ri{constructor(t,e,n={}){this._tick=t=>{if(null!==this._startPauseTime)return;const e=Math.min(1,(t-this._startTime-this._pausedDuration)/this._duration);if(1===e)this._renderState.updateState(this._values),this._frameHandle=void 0,this.cancel(this._renderState);else{const t=ji(e),n=Ii(this._startState,this._values,t);this._renderState.updateState(n),this._frameHandle=Jo(this._tick)}},this.scope=t,this._valuesOrCallable=e,this._duration=n.duration||0,this._force=n.force,this._pausedDuration=0,this._startPauseTime=null}run(t){return this._values||this._inflateValues(t),0===this._duration&&t.updateState(this._values),0===this._duration||Bi(t.state,this._values)?Promise.resolve():(this._renderState=t,this._startState=t.state,this._startTime=performance.now(),this._frameHandle=Jo(this._tick),new Promise((t=>{this._resolve=t})))}_inflateValues(t){let e=this._valuesOrCallable;"function"==typeof this._valuesOrCallable&&(e=this._valuesOrCallable(t.state)),this._values=function(t,e){const n=t.split("."),r={};let s=r;for(let t=0;t=0?n*(o-i)+i:Ii(i,o,n)}return r}function Bi(t,e){for(const n in e){const r=e[n],s=null==t?void 0:t[n];if(r>=0){if(r!==s)return!1}else if(!Bi(s,r))return!1}return!0}Ri.Delay=class{constructor(t){this._duration=t,this._startTime=null,this._paused=!1,this.scope=`delay.${t}`}run(){return this._startTime=Ko(),this._runningPromise=new Promise((t=>{this._resolve=t,this._timeout=setTimeout((()=>this.cancel()),this._duration)})),this._runningPromise}pause(){if(this._paused)return;const t=performance.now()-(this._startTime||0);this._duration=Math.max(0,this._duration-t),clearTimeout(this._timeout),this._paused=!0}resume(){this._paused&&(this._startTime=performance.now(),this._timeout=setTimeout((()=>this.cancel()),this._duration),this._paused=!1)}cancel(){clearTimeout(this._timeout),this._resolve&&this._resolve(),this._resolve=void 0}};const ji=t=>-Math.cos(t*Math.PI)/2+.5,Oi=(t,e,n)=>[new Ri(`character.${t}.strokes`,ai({opacity:1,displayPortion:1},e.strokes.length),{duration:n,force:!0})],Ni=(t,e,n)=>[new Ri(`character.${t}`,{opacity:1,strokes:ai({opacity:1,displayPortion:1},e.strokes.length)},{duration:n,force:!0})],qi=(t,e,n)=>[new Ri(`character.${t}.opacity`,0,{duration:n,force:!0}),...Oi(t,e,0)],Fi=(t,e,n)=>[new Ri(`options.${t}`,e,{duration:n})],Hi=(t,e,n)=>{const r=t.strokeNum,s=(t.getLength()+600)/(3*n);return[new Ri("options.highlightColor",e),new Ri("character.highlight",{opacity:1,strokes:{[r]:{displayPortion:0,opacity:0}}}),new Ri(`character.highlight.strokes.${r}`,{displayPortion:1,opacity:1},{duration:s}),new Ri(`character.highlight.strokes.${r}.opacity`,0,{duration:s,force:!0})]},Ui=(t,e,n)=>{const r=e.strokeNum,s=(e.getLength()+600)/(3*n);return[new Ri(`character.${t}`,{opacity:1,strokes:{[r]:{displayPortion:0,opacity:1}}}),new Ri(`character.${t}.strokes.${r}.displayPortion`,1,{duration:s})]},Vi=(t,e,n,r,s)=>{let o=qi(t,e,n);return o=o.concat(Oi(t,e,0)),o.push(new Ri(`character.${t}`,{opacity:1,strokes:ai({opacity:0},e.strokes.length)},{force:!0})),e.strokes.forEach(((e,n)=>{n>0&&o.push(new Ri.Delay(s)),o=o.concat(Ui(t,e,r))})),o},Yi=(t,e)=>[new Ri(`userStrokes.${t}.opacity`,0,{duration:e}),new Ri(`userStrokes.${t}`,null,{force:!0})];class Qi{constructor(t,e,n){this._currentStrokeIndex=0,this._mistakesOnStroke=0,this._totalMistakes=0,this._character=t,this._renderState=e,this._isActive=!1,this._positioner=n}startQuiz(t){this._isActive=!0,this._options=t;const e=ei(t.quizStartStrokeNum,this._character.strokes.length);return this._currentStrokeIndex=Math.min(e,this._character.strokes.length-1),this._mistakesOnStroke=0,this._totalMistakes=0,this._renderState.run((n=this._character,r=t.strokeFadeDuration,s=this._currentStrokeIndex,[...qi("main",n,r),new Ri("character.highlight",{opacity:1,strokes:ai({opacity:0},n.strokes.length)},{force:!0}),new Ri("character.main",{opacity:1,strokes:li(n.strokes.length,(t=>({opacity:t[new Ri("quiz.activeUserStrokeId",t,{force:!0}),new Ri(`userStrokes.${t}`,{points:[e],opacity:1},{force:!0})])(n,e))}continueUserStroke(t){if(!this._userStroke)return Promise.resolve();const e=this._positioner.convertExternalPoint(t);this._userStroke.appendPoint(e,t);const n=this._userStroke.points.slice(0);return this._renderState.run((r=this._userStroke.id,[new Ri(`userStrokes.${r}.points`,n,{force:!0})]));var r}setPositioner(t){this._positioner=t}endUserStroke(){var t;if(!this._userStroke)return;if(this._renderState.run(Yi(this._userStroke.id,null!==(t=this._options.drawingFadeDuration)&&void 0!==t?t:300)),1===this._userStroke.points.length)return void(this._userStroke=void 0);const{acceptBackwardsStrokes:e,markStrokeCorrectAfterMisses:n}=this._options,r=this._getCurrentStroke(),{isMatch:s,meta:o}=function(t,e,n,r={}){const s=e.strokes,o=Wi(t.points);if(o.length<2)return{isMatch:!1,meta:{isStrokeBackwards:!1}};const{isMatch:i,meta:a,avgDist:l}=Ai(o,s[n],r);if(!i)return{isMatch:i,meta:a};const c=s.slice(n+1);let h=l;for(let t=0;t0,leniency:this._options.leniency,averageDistanceThreshold:this._options.averageDistanceThreshold}),i=n&&this._mistakesOnStroke+1>=n;if(s||i||o.isStrokeBackwards&&e)this._handleSuccess(o);else{this._handleFailure(o);const{showHintAfterMisses:t,highlightColor:e,strokeHighlightSpeed:n}=this._options;!1!==t&&this._mistakesOnStroke>=t&&this._renderState.run(Hi(r,ii(e),n))}this._userStroke=void 0}cancel(){this._isActive=!1,this._userStroke&&this._renderState.run(Yi(this._userStroke.id,this._options.drawingFadeDuration))}_getStrokeData({isCorrect:t,meta:e}){return{character:this._character.symbol,strokeNum:this._currentStrokeIndex,mistakesOnStroke:this._mistakesOnStroke,totalMistakes:this._totalMistakes,strokesRemaining:this._character.strokes.length-this._currentStrokeIndex-(t?1:0),drawnPath:(n=this._userStroke,{pathString:ki(n.externalPoints),points:n.points.map((t=>mi(t)))}),isBackwards:e.isStrokeBackwards};var n}_handleSuccess(t){if(!this._options)return;const{strokes:e,symbol:n}=this._character,{onCorrectStroke:r,onComplete:s,highlightOnComplete:o,strokeFadeDuration:i,highlightCompleteColor:a,highlightColor:l,strokeHighlightDuration:c}=this._options;null==r||r({...this._getStrokeData({isCorrect:!0,meta:t})});let h=(d="main",u=this._currentStrokeIndex,[new Ri(`character.${d}.strokes.${u}`,{displayPortion:1,opacity:1},{duration:i,force:!0})]);var d,u;this._mistakesOnStroke=0,this._currentStrokeIndex+=1;this._currentStrokeIndex===e.length&&(this._isActive=!1,null==s||s({character:n,totalMistakes:this._totalMistakes}),o&&(h=h.concat(((t,e,n)=>[new Ri("options.highlightColor",e),...qi("highlight",t),...Ni("highlight",t,n/2),...qi("highlight",t,n/2)])(this._character,ii(a||l),2*(c||0))))),this._renderState.run(h)}_handleFailure(t){var e,n;this._mistakesOnStroke+=1,this._totalMistakes+=1,null===(e=(n=this._options).onMistake)||void 0===e||e.call(n,this._getStrokeData({isCorrect:!1,meta:t}))}_getCurrentStroke(){return this._character.strokes[this._currentStrokeIndex]}}function Xi(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Gi(t,e,n){t.setAttributeNS(null,e,n)}function Ki(t,e){Object.keys(e).forEach((n=>Gi(t,n,e[n])))}function Ji(t){var e;null==t||null===(e=t.parentNode)||void 0===e||e.removeChild(t)}class Zi{constructor(t){this.stroke=t,this._pathLength=t.getLength()+Zi.STROKE_WIDTH/2}_getStrokeDashoffset(t){return.999*this._pathLength*(1-t)}_getColor({strokeColor:t,radicalColor:e}){return e&&this.stroke.isInRadical?e:t}}Zi.STROKE_WIDTH=200;class ta extends Zi{constructor(t){super(t),this._oldProps=void 0}mount(t){this._animationPath=Xi("path"),this._clip=Xi("clipPath"),this._strokePath=Xi("path");const e=`mask-${si()}`;Gi(this._clip,"id",e),Gi(this._strokePath,"d",this.stroke.path),this._animationPath.style.opacity="0",Gi(this._animationPath,"clip-path",function(t){let e="";return window.location&&window.location.href&&(e=window.location.href.replace(/#[^#]*$/,"").replace(/"/gi,"%22")),`url("${e}#${t}")`}(e));const n=_i(this.stroke.points,100);return Gi(this._animationPath,"d",ki(n)),Ki(this._animationPath,{stroke:"#FFFFFF","stroke-width":200..toString(),fill:"none","stroke-linecap":"round","stroke-linejoin":"miter","stroke-dasharray":`${this._pathLength},${this._pathLength}`}),this._clip.appendChild(this._strokePath),t.defs.appendChild(this._clip),t.svg.appendChild(this._animationPath),this}render(t){var e,n;if(t===this._oldProps||!this._animationPath)return;t.displayPortion!==(null===(e=this._oldProps)||void 0===e?void 0:e.displayPortion)&&(this._animationPath.style.strokeDashoffset=this._getStrokeDashoffset(t.displayPortion).toString());const r=this._getColor(t);if(!this._oldProps||r!==this._getColor(this._oldProps)){const{r:t,g:e,b:n,a:s}=r;Ki(this._animationPath,{stroke:`rgba(${t},${e},${n},${s})`})}t.opacity!==(null===(n=this._oldProps)||void 0===n?void 0:n.opacity)&&(this._animationPath.style.opacity=t.opacity.toString()),this._oldProps=t}}class ea{constructor(t){this._oldProps=void 0,this._strokeRenderers=t.strokes.map((t=>new ta(t)))}mount(t){const e=t.createSubRenderTarget();this._group=e.svg,this._strokeRenderers.forEach((t=>{t.mount(e)}))}render(t){var e,n;if(t===this._oldProps||!this._group)return;const{opacity:r,strokes:s,strokeColor:o,radicalColor:i=null}=t;var a;r!==(null===(e=this._oldProps)||void 0===e?void 0:e.opacity)&&(this._group.style.opacity=r.toString(),hi||(0===r?this._group.style.display="none":0===(null===(a=this._oldProps)||void 0===a?void 0:a.opacity)&&this._group.style.removeProperty("display")));const l=!this._oldProps||o!==this._oldProps.strokeColor||i!==this._oldProps.radicalColor;if(l||s!==(null===(n=this._oldProps)||void 0===n?void 0:n.strokes))for(let t=0;t{t(this._eventify(e,this._getMousePoint))})),this.node.addEventListener("touchstart",(e=>{t(this._eventify(e,this._getTouchPoint))}))}addPointerMoveListener(t){this.node.addEventListener("mousemove",(e=>{t(this._eventify(e,this._getMousePoint))})),this.node.addEventListener("touchmove",(e=>{t(this._eventify(e,this._getTouchPoint))}))}addPointerEndListener(t){document.addEventListener("mouseup",t),document.addEventListener("touchend",t)}getBoundingClientRect(){return this.node.getBoundingClientRect()}updateDimensions(t,e){this.node.setAttribute("width",`${t}`),this.node.setAttribute("height",`${e}`)}_eventify(t,e){return{getPoint:()=>e.call(this,t),preventDefault:()=>t.preventDefault()}}_getMousePoint(t){const{left:e,top:n}=this.getBoundingClientRect();return{x:t.clientX-e,y:t.clientY-n}}_getTouchPoint(t){const{left:e,top:n}=this.getBoundingClientRect();return{x:t.touches[0].clientX-e,y:t.touches[0].clientY-n}}}class sa extends ra{constructor(t,e){super(t),this.svg=t,this.defs=e,"createSVGPoint"in t&&(this._pt=t.createSVGPoint())}static init(t,e="100%",n="100%"){const r="string"==typeof t?document.getElementById(t):t;if(!r)throw new Error(`HanziWriter target element not found: ${t}`);const s=r.nodeName.toUpperCase(),o=(()=>{if("SVG"===s||"G"===s)return r;{const t=Xi("svg");return r.appendChild(t),t}})();Ki(o,{width:e,height:n});const i=Xi("defs");return o.appendChild(i),new sa(o,i)}createSubRenderTarget(){const t=Xi("g");return this.svg.appendChild(t),new sa(t,this.defs)}_getMousePoint(t){if(this._pt&&(this._pt.x=t.clientX,this._pt.y=t.clientY,"getScreenCTM"in this.node)){var e;const t=this._pt.matrixTransform(null===(e=this.node.getScreenCTM())||void 0===e?void 0:e.inverse());return{x:t.x,y:t.y}}return super._getMousePoint.call(this,t)}_getTouchPoint(t){if(this._pt&&(this._pt.x=t.touches[0].clientX,this._pt.y=t.touches[0].clientY,"getScreenCTM"in this.node)){var e;const t=this._pt.matrixTransform(null===(e=this.node.getScreenCTM())||void 0===e?void 0:e.inverse());return{x:t.x,y:t.y}}return super._getTouchPoint(t)}}var oa={HanziWriterRenderer:class{constructor(t,e){this._character=t,this._positioner=e,this._mainCharRenderer=new ea(t),this._outlineCharRenderer=new ea(t),this._highlightCharRenderer=new ea(t),this._userStrokeRenderers={}}mount(t){const e=t.createSubRenderTarget(),n=e.svg,{xOffset:r,yOffset:s,height:o,scale:i}=this._positioner;Gi(n,"transform",`translate(${r}, ${o-s}) scale(${i}, ${-1*i})`),this._outlineCharRenderer.mount(e),this._mainCharRenderer.mount(e),this._highlightCharRenderer.mount(e),this._positionedTarget=e}render(t){const{main:e,outline:n,highlight:r}=t.character,{outlineColor:s,radicalColor:o,highlightColor:i,strokeColor:a,drawingWidth:l,drawingColor:c}=t.options;this._outlineCharRenderer.render({opacity:n.opacity,strokes:n.strokes,strokeColor:s}),this._mainCharRenderer.render({opacity:e.opacity,strokes:e.strokes,strokeColor:a,radicalColor:o}),this._highlightCharRenderer.render({opacity:r.opacity,strokes:r.strokes,strokeColor:i});const h=t.userStrokes||{};for(const t in this._userStrokeRenderers){var d;if(!h[t])null===(d=this._userStrokeRenderers[t])||void 0===d||d.destroy(),delete this._userStrokeRenderers[t]}for(const t in h){const e=h[t];if(!e)continue;const n={strokeWidth:l,strokeColor:c,...e};(()=>{if(this._userStrokeRenderers[t])return this._userStrokeRenderers[t];const e=new na;return e.mount(this._positionedTarget),this._userStrokeRenderers[t]=e,e})().render(n)}}destroy(){Ji(this._positionedTarget.svg),this._positionedTarget.defs.innerHTML=""}},createRenderTarget:sa.init};const ia=(t,e)=>{t.beginPath();const n=e[0],r=e.slice(1);t.moveTo(n.x,n.y);for(const e of r)t.lineTo(e.x,e.y);t.stroke()};class aa extends Zi{constructor(t,e=!0){super(t),e&&Path2D?this._path2D=new Path2D(this.stroke.path):this._pathCmd=(t=>{const e=t.split(/(^|\s+)(?=[A-Z])/).filter((t=>" "!==t)),n=[t=>t.beginPath()];for(const t of e){const[e,...r]=t.split(/\s+/),s=r.map((t=>parseFloat(t)));"M"===e?n.push((t=>t.moveTo(...s))):"L"===e?n.push((t=>t.lineTo(...s))):"C"===e?n.push((t=>t.bezierCurveTo(...s))):"Q"===e&&n.push((t=>t.quadraticCurveTo(...s)))}return t=>n.forEach((e=>e(t)))})(this.stroke.path),this._extendedMaskPoints=_i(this.stroke.points,Zi.STROKE_WIDTH/2)}render(t,e){if(e.opacity<.05)return;var n;(t.save(),this._path2D)?t.clip(this._path2D):(null===(n=this._pathCmd)||void 0===n||n.call(this,t),t.globalAlpha=0,t.stroke(),t.clip());const{r:r,g:s,b:o,a:i}=this._getColor(e),a=1===i?`rgb(${r},${s},${o})`:`rgb(${r},${s},${o},${i})`,l=this._getStrokeDashoffset(e.displayPortion);t.globalAlpha=e.opacity,t.strokeStyle=a,t.fillStyle=a,t.lineWidth=Zi.STROKE_WIDTH,t.lineCap="round",t.lineJoin="round",t.setLineDash([this._pathLength,this._pathLength],l),t.lineDashOffset=l,ia(t,this._extendedMaskPoints),t.restore()}}class la{constructor(t){this._strokeRenderers=t.strokes.map((t=>new aa(t)))}render(t,e){if(e.opacity<.05)return;const{opacity:n,strokeColor:r,radicalColor:s,strokes:o}=e;for(let e=0;e{if("CANVAS"===s)return r;const t=document.createElement("canvas");return r.appendChild(t),t})();return o.setAttribute("width",e),o.setAttribute("height",n),new ha(o)}getContext(){return this.node.getContext("2d")}}var da={HanziWriterRenderer:class{constructor(t,e){this.destroy=di,this._character=t,this._positioner=e,this._mainCharRenderer=new la(t),this._outlineCharRenderer=new la(t),this._highlightCharRenderer=new la(t)}mount(t){this._target=t}_animationFrame(t){const{width:e,height:n,scale:r,xOffset:s,yOffset:o}=this._positioner,i=this._target.getContext();i.clearRect(0,0,e,n),i.save(),i.translate(s,n-o),i.transform(1,0,0,-1,0,0),i.scale(r,r),t(i),i.restore(),i.draw&&i.draw()}render(t){const{outline:e,main:n,highlight:r}=t.character,{outlineColor:s,strokeColor:o,radicalColor:i,highlightColor:a,drawingColor:l,drawingWidth:c}=t.options;this._animationFrame((h=>{this._outlineCharRenderer.render(h,{opacity:e.opacity,strokes:e.strokes,strokeColor:s}),this._mainCharRenderer.render(h,{opacity:n.opacity,strokes:n.strokes,strokeColor:o,radicalColor:i}),this._highlightCharRenderer.render(h,{opacity:r.opacity,strokes:r.strokes,strokeColor:a});const d=t.userStrokes||{};for(const t in d){const e=d[t];if(e){ca(h,{strokeWidth:c,strokeColor:l,...e})}}}))}},createRenderTarget:ha.init};const ua={charDataLoader:(t,e,n)=>{const r=new XMLHttpRequest;r.overrideMimeType&&r.overrideMimeType("application/json"),r.open("GET",(t=>`https://cdn.jsdelivr.net/npm/hanzi-writer-data@2.0/${t}.json`)(t),!0),r.onerror=t=>{n(r,t)},r.onreadystatechange=()=>{4===r.readyState&&(200===r.status?e(JSON.parse(r.responseText)):0!==r.status&&n&&n(r))},r.send(null)},onLoadCharDataError:null,onLoadCharDataSuccess:null,showOutline:!0,showCharacter:!0,renderer:"svg",width:0,height:0,padding:20,strokeAnimationSpeed:1,strokeFadeDuration:400,strokeHighlightDuration:200,strokeHighlightSpeed:2,delayBetweenStrokes:1e3,delayBetweenLoops:2e3,strokeColor:"#555",radicalColor:null,highlightColor:"#AAF",outlineColor:"#DDD",drawingColor:"#333",leniency:1,showHintAfterMisses:3,highlightOnComplete:!0,highlightCompleteColor:null,markStrokeCorrectAfterMisses:!1,acceptBackwardsStrokes:!1,quizStartStrokeNum:0,averageDistanceThreshold:350,drawingFadeDuration:300,drawingWidth:4,strokeWidth:2,outlineWidth:2,rendererOverride:{}};class pa{constructor(t){this._loadCounter=0,this._isLoading=!1,this.loadingFailed=!1,this._options=t}_debouncedLoad(t,e){const n=t=>{var n;e===this._loadCounter&&(null===(n=this._resolve)||void 0===n||n.call(this,t))},r=t=>{var n;e===this._loadCounter&&(null===(n=this._reject)||void 0===n||n.call(this,t))},s=this._options.charDataLoader(t,n,r);s&&("then"in s?s.then(n).catch(r):n(s))}_setupLoadingPromise(){return new Promise(((t,e)=>{this._resolve=t,this._reject=e})).then((t=>{var e,n;return this._isLoading=!1,null===(e=(n=this._options).onLoadCharDataSuccess)||void 0===e||e.call(n,t),t})).catch((t=>{if(this._isLoading=!1,this.loadingFailed=!0,this._options.onLoadCharDataError)return void this._options.onLoadCharDataError(t);if(t instanceof Error)throw t;const e=new Error(`Failed to load char data for ${this._loadingChar}`);throw e.reason=t,e}))}loadCharData(t){this._loadingChar=t;const e=this._setupLoadingPromise();return this.loadingFailed=!1,this._isLoading=!0,this._loadCounter++,this._debouncedLoad(t,this._loadCounter),e}}class fa{constructor(t,e={}){const{HanziWriterRenderer:n,createRenderTarget:r}="canvas"===e.renderer?da:oa,s=e.rendererOverride||{};this._renderer={HanziWriterRenderer:s.HanziWriterRenderer||n,createRenderTarget:s.createRenderTarget||r},this.target=this._renderer.createRenderTarget(t,e.width,e.height),this._options=this._assignOptions(e),this._loadingManager=new pa(this._options),this._setupListeners()}static create(t,e,n){const r=new fa(t,n);return r.setCharacter(e),r}static loadCharacterData(t,e={}){const n=(()=>{const{_loadingManager:n,_loadingOptions:r}=fa;return(null==n?void 0:n._loadingChar)===t&&r===e?n:new pa({...ua,...e})})();return fa._loadingManager=n,fa._loadingOptions=e,n.loadCharData(t)}static getScalingTransform(t,e,n=0){const r=new Ti({width:t,height:e,padding:n});return{x:r.xOffset,y:r.yOffset,scale:r.scale,transform:(s=`\n translate(${r.xOffset}, ${r.height-r.yOffset})\n scale(${r.scale}, ${-1*r.scale})\n `,s.replace(/^\s+/,"").replace(/\s+$/,"")).replace(/\s+/g," ")};var s}showCharacter(t={}){return this._options.showCharacter=!0,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(Ni("main",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}hideCharacter(t={}){return this._options.showCharacter=!1,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(qi("main",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}animateCharacter(t={}){return this.cancelQuiz(),this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(Vi("main",this._character,this._options.strokeFadeDuration,this._options.strokeAnimationSpeed,this._options.delayBetweenStrokes)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}animateStroke(t,e={}){return this.cancelQuiz(),this._withData((()=>{var n;return null===(n=this._renderState)||void 0===n?void 0:n.run(((t,e,n,r)=>{const s=e.strokes[n];return[new Ri(`character.${t}`,(n=>{const r=n.character[t],s={opacity:1,strokes:{}};for(let t=0;t{var n;return null===(n=e.onComplete)||void 0===n||n.call(e,t),t}))}))}highlightStroke(t,e={}){return this._withData((()=>{var n,r;if(this._character&&this._renderState)return this._renderState.run(Hi((n=this._character.strokes,r=t,n[ei(r,n.length)]),ii(this._options.highlightColor),this._options.strokeHighlightSpeed)).then((t=>{var n;return null===(n=e.onComplete)||void 0===n||n.call(e,t),t}))}))}async loopCharacterAnimation(){return this.cancelQuiz(),this._withData((()=>this._renderState.run(((t,e,n,r,s,o)=>{const i=Vi(t,e,n,r,s);return i.push(new Ri.Delay(o)),i})("main",this._character,this._options.strokeFadeDuration,this._options.strokeAnimationSpeed,this._options.delayBetweenStrokes,this._options.delayBetweenLoops),{loop:!0})))}pauseAnimation(){return this._withData((()=>{var t;return null===(t=this._renderState)||void 0===t?void 0:t.pauseAll()}))}resumeAnimation(){return this._withData((()=>{var t;return null===(t=this._renderState)||void 0===t?void 0:t.resumeAll()}))}showOutline(t={}){return this._options.showOutline=!0,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(Ni("outline",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}hideOutline(t={}){return this._options.showOutline=!1,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(qi("outline",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}updateDimensions({width:t,height:e,padding:n}){if(void 0!==t&&(this._options.width=t),void 0!==e&&(this._options.height=e),void 0!==n&&(this._options.padding=n),this.target.updateDimensions(this._options.width,this._options.height),this._character&&this._renderState&&this._hanziWriterRenderer&&this._positioner){this._hanziWriterRenderer.destroy();const t=this._initAndMountHanziWriterRenderer(this._character);this._renderState.overwriteOnStateChange((e=>t.render(e))),t.render(this._renderState.state),this._quiz&&this._quiz.setPositioner(this._positioner)}}updateColor(t,e,n={}){var r;let s=[];const o=ii((()=>"radicalColor"!==t||e?e:this._options.strokeColor)());this._options[t]=e;const i=null!==(r=n.duration)&&void 0!==r?r:this._options.strokeFadeDuration;return s=s.concat(Fi(t,o,i)),"radicalColor"!==t||e||(s=s.concat(Fi(t,null,0))),this._withData((()=>{var t;return null===(t=this._renderState)||void 0===t?void 0:t.run(s).then((t=>{var e;return null===(e=n.onComplete)||void 0===e||e.call(n,t),t}))}))}quiz(t={}){return this._withData((async()=>{this._character&&this._renderState&&this._positioner&&(this.cancelQuiz(),this._quiz=new Qi(this._character,this._renderState,this._positioner),this._options={...this._options,...t},this._quiz.startQuiz(this._options))}))}cancelQuiz(){this._quiz&&(this._quiz.cancel(),this._quiz=void 0)}setCharacter(t){return this.cancelQuiz(),this._char=t,this._hanziWriterRenderer&&this._hanziWriterRenderer.destroy(),this._renderState&&this._renderState.cancelAll(),this._hanziWriterRenderer=null,this._withDataPromise=this._loadingManager.loadCharData(t).then((e=>{if(!e||this._loadingManager.loadingFailed)return;this._character=function(t,e){const n=bi(e);return new xi(t,n)}(t,e),this._renderState=new ui(this._character,this._options,(t=>n.render(t)));const n=this._initAndMountHanziWriterRenderer(this._character);n.render(this._renderState.state)})),this._withDataPromise}_initAndMountHanziWriterRenderer(t){const{width:e,height:n,padding:r}=this._options;this._positioner=new Ti({width:e,height:n,padding:r});const s=new this._renderer.HanziWriterRenderer(t,this._positioner);return s.mount(this.target),this._hanziWriterRenderer=s,s}async getCharacterData(){if(!this._char)throw new Error("setCharacter() must be called before calling getCharacterData()");return await this._withData((()=>this._character))}_assignOptions(t){const e={...ua,...t};return t.strokeAnimationDuration&&!t.strokeAnimationSpeed&&(e.strokeAnimationSpeed=500/t.strokeAnimationDuration),t.strokeHighlightDuration&&!t.strokeHighlightSpeed&&(e.strokeHighlightSpeed=500/e.strokeHighlightDuration),t.highlightCompleteColor||(e.highlightCompleteColor=e.highlightColor),this._fillWidthAndHeight(e)}_fillWidthAndHeight(t){const e={...t};if(e.width&&!e.height)e.height=e.width;else if(e.height&&!e.width)e.width=e.height;else if(!e.width&&!e.height){const{width:t,height:n}=this.target.getBoundingClientRect(),r=Math.min(t,n);e.width=r,e.height=r}return e}_withData(t){if(this._loadingManager.loadingFailed)throw Error("Failed to load character data. Call setCharacter and try again.");return this._withDataPromise?this._withDataPromise.then((()=>{if(!this._loadingManager.loadingFailed)return t()})):Promise.resolve().then(t)}_setupListeners(){this.target.addPointerStartListener((t=>{this._quiz&&(t.preventDefault(),this._quiz.startUserStroke(t.getPoint()))})),this.target.addPointerMoveListener((t=>{this._quiz&&(t.preventDefault(),this._quiz.continueUserStroke(t.getPoint()))})),this.target.addPointerEndListener((()=>{var t;null===(t=this._quiz)||void 0===t||t.endUserStroke()}))}}function ga(t){let e;return{c(){e=v("span"),e.textContent="Simplified",C(e,"class","svelte-377oc3"),S(e,"script-selector--active","simplified"==t[1])},m(t,n){m(t,e,n)},p(t,n){2&n&&S(e,"script-selector--active","simplified"==t[1])},d(t){t&&$(e)}}}function ma(t){let e;return{c(){e=v("span"),e.textContent="Traditional",C(e,"class","svelte-377oc3"),S(e,"script-selector--active","traditional"==t[1])},m(t,n){m(t,e,n)},p(t,n){2&n&&S(e,"script-selector--active","traditional"==t[1])},d(t){t&&$(e)}}}function $a(t){let e,n,r,s,o;return n=new Pn({props:{classes:["sy-tooltip--container"],$$slots:{default:[ba]},$$scope:{ctx:t}}}),n.$on("click",t[9]),{c(){e=v("div"),nt(n.$$.fragment),r=y(),s=v("div"),s.innerHTML='
',C(e,"class","character-actions svelte-377oc3"),C(s,"class","character-container svelte-377oc3")},m(t,i){m(t,e,i),rt(n,e,null),m(t,r,i),m(t,s,i),o=!0},p(t,e){const r={};262156&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i(t){o||(J(n.$$.fragment,t),o=!0)},o(t){Z(n.$$.fragment,t),o=!1},d(t){t&&$(e),st(n),t&&$(r),t&&$(s)}}}function wa(e){let n;return{c(){n=v("div"),n.innerHTML="

Character Data Not Found

\n\t\t\t\t

The stroke order data cannot be found for at least one of\n\t\t\t\t\tthe characters in this word.

",C(n,"class","character-window--character-not-found--container svelte-377oc3")},m(t,e){m(t,n,e)},p:t,i:t,o:t,d(t){t&&$(n)}}}function va(t){let e,n;return e=new de({props:{size:"18"}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ka(t){let e,n;return e=new fe({props:{size:"18"}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function _a(t){let e;return{c(){e=_("Play Stroke Order")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function ya(t){let e;return{c(){e=_("Resume")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function xa(t){let e;return{c(){e=_("Pause")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function ba(t){let e,n,r,s,o,i,a;const l=[ka,va],c=[];function h(t,e){return t[2]?1:0}function d(t,e){return t[2]?xa:t[3]?ya:_a}n=h(t),r=c[n]=l[n](t);let u=d(t),p=u(t);return{c(){e=v("span"),r.c(),s=y(),o=v("div"),i=v("p"),p.c(),C(e,"class","animate-button--icon-container svelte-377oc3"),C(e,"data-testid","control-button"),C(i,"data-testid","tooltip-text"),C(o,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,r){m(t,e,r),c[n].m(e,null),m(t,s,r),m(t,o,r),g(o,i),p.m(i,null),a=!0},p(t,s){let o=n;n=h(t),n!==o&&(G(),Z(c[o],1,1,(()=>{c[o]=null})),K(),r=c[n],r||(r=c[n]=l[n](t),r.c()),J(r,1),r.m(e,null)),u!==(u=d(t))&&(p.d(1),p=u(t),p&&(p.c(),p.m(i,null)))},i(t){a||(J(r),a=!0)},o(t){Z(r),a=!1},d(t){t&&$(e),c[n].d(),t&&$(s),t&&$(o),p.d()}}}function Ca(t){let e,n,r,s,o,i,a,l,c,h,d;r=new Pn({props:{style:"ghost",size:"large",$$slots:{default:[ga]},$$scope:{ctx:t}}}),r.$on("click",t[7]),o=new Pn({props:{style:"ghost",size:"large",$$slots:{default:[ma]},$$scope:{ctx:t}}}),o.$on("click",t[8]);const u=[wa,$a],p=[];function f(t,e){return t[4]?0:1}return c=f(t),h=p[c]=u[c](t),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),s=y(),nt(o.$$.fragment),a=y(),l=v("div"),h.c(),C(n,"class","script-selector-container svelte-377oc3"),C(n,"data-tauri-drag-region",i=!!t[0]||void 0),C(l,"class","character-window--content svelte-377oc3"),C(e,"class","character-window-container svelte-377oc3")},m(t,i){m(t,e,i),g(e,n),rt(r,n,null),g(n,s),rt(o,n,null),g(e,a),g(e,l),p[c].m(l,null),d=!0},p(t,[e]){const s={};262146&e&&(s.$$scope={dirty:e,ctx:t}),r.$set(s);const a={};262146&e&&(a.$$scope={dirty:e,ctx:t}),o.$set(a),(!d||1&e&&i!==(i=!!t[0]||void 0))&&C(n,"data-tauri-drag-region",i);let g=c;c=f(t),c===g?p[c].p(t,e):(G(),Z(p[g],1,1,(()=>{p[g]=null})),K(),h=p[c],h?h.p(t,e):(h=p[c]=u[c](t),h.c()),J(h,1),h.m(l,null))},i(t){d||(J(r.$$.fragment,t),J(o.$$.fragment,t),J(h),d=!0)},o(t){Z(r.$$.fragment,t),Z(o.$$.fragment,t),Z(h),d=!1},d(t){t&&$(e),st(r),st(o),p[c].d()}}}fa._loadingManager=null,fa._loadingOptions=null;function za(t,e,n){let r,s=!1;window.__TAURI__.os.platform().then((t=>{n(0,s="darwin"===t)}));let o,i,a=[],l="simplified",c=!1,h=!1,d=!1;const u=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,p=t=>{n(1,l=t),n(2,c=!1),n(3,h=!1),f(r[l])},f=t=>{n(4,d=!1),q().then((()=>{const e=document.getElementById("character-target");e&&(e.innerHTML=""),a=[];for(let e=0;e{fetch(`resources/hanzi-writer-data/data/${t}.json`).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{n(4,d=!0),console.log(t)}))}}),a.push(i);var r}))},g=(t,e)=>{if(e){n(2,c=!0);for(let t=0;t=0&&tg(t+1,!1)})):(n(2,c=!1),n(3,h=!1))},m=()=>{c?(n(3,h=!0),n(2,c=!1),a[o].pauseAnimation()):h?(n(3,h=!1),n(2,c=!0),a[o].resumeAnimation()):g(0,!0)};window.__TAURI__.event.listen("display-characters",(t=>{r=t.payload,f(r[l])})),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{f(r[l])}));return[s,l,c,h,d,p,m,()=>p("simplified"),()=>p("traditional"),()=>m()]}class Sa extends it{constructor(t){super(),ot(this,t,za,Ca,i,{})}}let Pa;const Ta=document.getElementById("app"),Ea=document.getElementById("characters");return Ta?Pa=new Qo({target:Ta}):Ea&&(Pa=new Sa({target:Ea})),Pa}(); +var app=function(){"use strict";function t(){}function e(t,e){for(const n in e)t[n]=e[n];return t}function n(t){return t()}function r(){return Object.create(null)}function s(t){t.forEach(n)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(e,...n){if(null==e)return t;const r=e.subscribe(...n);return r.unsubscribe?()=>r.unsubscribe():r}function l(t,e,n,r){if(t){const s=c(t,e,n,r);return t[0](s)}}function c(t,n,r,s){return t[1]&&s?e(r.ctx.slice(),t[1](s(n))):r.ctx}function h(t,e,n,r){if(t[2]&&r){const s=t[2](r(n));if(void 0===e.dirty)return s;if("object"==typeof s){const t=[],n=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],n=t.ctx.length/32;for(let t=0;tt.removeEventListener(e,n,r)}function C(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function z(t,e){e=""+e,t.data!==e&&(t.data=e)}function S(t,e,n){t.classList[n?"add":"remove"](e)}function P(t,e){return new t(e)}let T;function E(t){T=t}function W(){if(!T)throw new Error("Function called outside component initialization");return T}function M(t){W().$$.on_destroy.push(t)}function D(){const t=W();return(e,n,{cancelable:r=!1}={})=>{const s=t.$$.callbacks[e];if(s){const o=function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n,r,e),s}(e,n,{cancelable:r});return s.slice().forEach((e=>{e.call(t,o)})),!o.defaultPrevented}return!0}}function A(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach((t=>t.call(this,e)))}const L=[],R=[];let I=[];const B=[],j=Promise.resolve();let O=!1;function N(){O||(O=!0,j.then(V))}function q(){return N(),j}function F(t){I.push(t)}const H=new Set;let U=0;function V(){if(0!==U)return;const t=T;do{try{for(;U{Q.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}function tt(t,e){const n={},r={},s={$$scope:1};let o=t.length;for(;o--;){const i=t[o],a=e[o];if(a){for(const t in i)t in a||(r[t]=1);for(const t in a)s[t]||(n[t]=a[t],s[t]=1);t[o]=a}else for(const t in i)s[t]=1}for(const t in r)t in n||(n[t]=void 0);return n}function et(t){return"object"==typeof t&&null!==t?t:{}}function nt(t){t&&t.c()}function rt(t,e,r,i){const{fragment:a,after_update:l}=t.$$;a&&a.m(e,r),i||F((()=>{const e=t.$$.on_mount.map(n).filter(o);t.$$.on_destroy?t.$$.on_destroy.push(...e):s(e),t.$$.on_mount=[]})),l.forEach(F)}function st(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];I.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),I=e}(n.after_update),s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ot(e,n,o,i,a,l,c,h=[-1]){const d=T;E(e);const u=e.$$={fragment:null,ctx:[],props:l,update:t,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(d?d.$$.context:[])),callbacks:r(),dirty:h,skip_bound:!1,root:n.target||d.$$.root};c&&c(u.root);let p=!1;if(u.ctx=o?o(e,n.props||{},((t,n,...r)=>{const s=r.length?r[0]:n;return u.ctx&&a(u.ctx[t],u.ctx[t]=s)&&(!u.skip_bound&&u.bound[t]&&u.bound[t](s),p&&function(t,e){-1===t.$$.dirty[0]&&(L.push(t),N(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const at=[];function lt(t,e){return{subscribe:ct(t,e).subscribe}}function ct(e,n=t){let r;const s=new Set;function o(t){if(i(e,t)&&(e=t,r)){const t=!at.length;for(const t of s)t[1](),at.push(t,e);if(t){for(let t=0;t{s.delete(l),0===s.size&&r&&(r(),r=null)}}}}function ht(e,n,r){const i=!Array.isArray(e),l=i?[e]:e,c=n.length<2;return lt(r,(e=>{let r=!1;const h=[];let d=0,u=t;const p=()=>{if(d)return;u();const r=n(i?h[0]:h,e);c?e(r):u=o(r)?r:t},f=l.map(((t,e)=>a(t,(t=>{h[e]=t,d&=~(1<{d|=1<{st(t,1)})),K()}i?(n=P(i,a()),n.$on("routeEvent",t[7]),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,r.parentNode,r)):n=null}else i&&n.$set(s)},i(t){s||(n&&J(n.$$.fragment,t),s=!0)},o(t){n&&Z(n.$$.fragment,t),s=!1},d(t){t&&$(r),n&&st(n,t)}}}function pt(t){let n,r,s;const o=[{params:t[1]},t[2]];var i=t[0];function a(t){let n={};for(let t=0;t{st(t,1)})),K()}i?(n=P(i,a()),n.$on("routeEvent",t[6]),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,r.parentNode,r)):n=null}else i&&n.$set(s)},i(t){s||(n&&J(n.$$.fragment,t),s=!0)},o(t){n&&Z(n.$$.fragment,t),s=!1},d(t){t&&$(r),n&&st(n,t)}}}function ft(t){let e,n,r,s;const o=[pt,ut],i=[];function a(t,e){return t[1]?0:1}return e=a(t),n=i[e]=o[e](t),{c(){n.c(),r=x()},m(t,n){i[e].m(t,n),m(t,r,n),s=!0},p(t,[s]){let l=e;e=a(t),e===l?i[e].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),n=i[e],n?n.p(t,s):(n=i[e]=o[e](t),n.c()),J(n,1),n.m(r.parentNode,r))},i(t){s||(J(n),s=!0)},o(t){Z(n),s=!1},d(t){i[e].d(t),t&&$(r)}}}function gt(){const t=window.location.href.indexOf("#/");let e=t>-1?window.location.href.substr(t+1):"/";const n=e.indexOf("?");let r="";return n>-1&&(r=e.substr(n+1),e=e.substr(0,n)),{location:e,querystring:r}}const mt=lt(null,(function(t){t(gt());const e=()=>{t(gt())};return window.addEventListener("hashchange",e,!1),function(){window.removeEventListener("hashchange",e,!1)}}));ht(mt,(t=>t.location));const $t=ht(mt,(t=>t.querystring)),wt=ct(void 0);function vt(t,e,n){let{routes:r={}}=e,{prefix:s=""}=e,{restoreScrollState:o=!1}=e;class i{constructor(t,e){if(!e||"function"!=typeof e&&("object"!=typeof e||!0!==e._sveltesparouter))throw Error("Invalid component object");if(!t||"string"==typeof t&&(t.length<1||"/"!=t.charAt(0)&&"*"!=t.charAt(0))||"object"==typeof t&&!(t instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:n,keys:r}=dt(t);this.path=t,"object"==typeof e&&!0===e._sveltesparouter?(this.component=e.component,this.conditions=e.conditions||[],this.userData=e.userData,this.props=e.props||{}):(this.component=()=>Promise.resolve(e),this.conditions=[],this.props={}),this._pattern=n,this._keys=r}match(t){if(s)if("string"==typeof s){if(!t.startsWith(s))return null;t=t.substr(s.length)||"/"}else if(s instanceof RegExp){const e=t.match(s);if(!e||!e[0])return null;t=t.substr(e[0].length)||"/"}const e=this._pattern.exec(t);if(null===e)return null;if(!1===this._keys)return e;const n={};let r=0;for(;r{a.push(new i(e,t))})):Object.keys(r).forEach((t=>{a.push(new i(t,r[t]))}));let l=null,c=null,h={};const d=D();async function u(t,e){await q(),d(t,e)}let p=null,f=null;var g;o&&(f=t=>{p=t.state&&(t.state.__svelte_spa_router_scrollY||t.state.__svelte_spa_router_scrollX)?t.state:null},window.addEventListener("popstate",f),g=()=>{var t;(t=p)?window.scrollTo(t.__svelte_spa_router_scrollX,t.__svelte_spa_router_scrollY):window.scrollTo(0,0)},W().$$.after_update.push(g));let m=null,$=null;const w=mt.subscribe((async t=>{m=t;let e=0;for(;e{wt.set(c)}))}n(0,l=null),$=null,wt.set(void 0)}));return M((()=>{w(),f&&window.removeEventListener("popstate",f)})),t.$$set=t=>{"routes"in t&&n(3,r=t.routes),"prefix"in t&&n(4,s=t.prefix),"restoreScrollState"in t&&n(5,o=t.restoreScrollState)},t.$$.update=()=>{32&t.$$.dirty&&(history.scrollRestoration=o?"manual":"auto")},[l,c,h,r,s,o,function(e){A.call(this,t,e)},function(e){A.call(this,t,e)}]}class kt extends it{constructor(t){super(),ot(this,t,vt,ft,i,{routes:3,prefix:4,restoreScrollState:5})}}function _t(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("polyline"),C(r,"x1","19"),C(r,"y1","12"),C(r,"x2","5"),C(r,"y2","12"),C(s,"points","12 19 5 12 12 5"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-arrow-left "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-arrow-left "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function yt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class xt extends it{constructor(t){super(),ot(this,t,yt,_t,i,{size:0,strokeWidth:1,class:2})}}function bt(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("polyline"),C(r,"x1","5"),C(r,"y1","12"),C(r,"x2","19"),C(r,"y2","12"),C(s,"points","12 5 19 12 12 19"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-arrow-right "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-arrow-right "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Ct(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class zt extends it{constructor(t){super(),ot(this,t,Ct,bt,i,{size:0,strokeWidth:1,class:2})}}function St(e){let n,r,s,o;return{c(){n=k("svg"),r=k("path"),s=k("path"),C(r,"d","M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"),C(s,"d","M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-book-open "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-book-open "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Pt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Tt extends it{constructor(t){super(),ot(this,t,Pt,St,i,{size:0,strokeWidth:1,class:2})}}function Et(e){let n,r,s;return{c(){n=k("svg"),r=k("path"),C(r,"d","M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-bookmark "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-bookmark "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function Wt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Mt extends it{constructor(t){super(),ot(this,t,Wt,Et,i,{size:0,strokeWidth:1,class:2})}}function Dt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","20 6 9 17 4 12"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-check "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-check "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function At(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Lt extends it{constructor(t){super(),ot(this,t,At,Dt,i,{size:0,strokeWidth:1,class:2})}}function Rt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","6 9 12 15 18 9"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-chevron-down "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-chevron-down "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function It(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Bt extends it{constructor(t){super(),ot(this,t,It,Rt,i,{size:0,strokeWidth:1,class:2})}}function jt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","15 18 9 12 15 6"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-chevron-left "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-chevron-left "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function Ot(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Nt extends it{constructor(t){super(),ot(this,t,Ot,jt,i,{size:0,strokeWidth:1,class:2})}}function qt(e){let n,r,s;return{c(){n=k("svg"),r=k("polyline"),C(r,"points","9 18 15 12 9 6"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-chevron-right "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-chevron-right "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function Ft(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Ht extends it{constructor(t){super(),ot(this,t,Ft,qt,i,{size:0,strokeWidth:1,class:2})}}function Ut(e){let n,r,s,o;return{c(){n=k("svg"),r=k("rect"),s=k("path"),C(r,"x","9"),C(r,"y","9"),C(r,"width","13"),C(r,"height","13"),C(r,"rx","2"),C(r,"ry","2"),C(s,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-copy "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-copy "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Vt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Yt extends it{constructor(t){super(),ot(this,t,Vt,Ut,i,{size:0,strokeWidth:1,class:2})}}function Qt(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("path"),s=k("polyline"),o=k("line"),C(r,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),C(s,"points","7 10 12 15 17 10"),C(o,"x1","12"),C(o,"y1","15"),C(o,"x2","12"),C(o,"y2","3"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-download "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-download "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function Xt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Gt extends it{constructor(t){super(),ot(this,t,Xt,Qt,i,{size:0,strokeWidth:1,class:2})}}function Kt(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("circle"),s=k("path"),o=k("line"),C(r,"cx","12"),C(r,"cy","12"),C(r,"r","10"),C(s,"d","M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"),C(o,"x1","12"),C(o,"y1","17"),C(o,"x2","12.01"),C(o,"y2","17"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-help-circle "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-help-circle "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function Jt(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Zt extends it{constructor(t){super(),ot(this,t,Jt,Kt,i,{size:0,strokeWidth:1,class:2})}}function te(e){let n,r,s,o,i,a;return{c(){n=k("svg"),r=k("polyline"),s=k("polyline"),o=k("line"),i=k("line"),C(r,"points","15 3 21 3 21 9"),C(s,"points","9 21 3 21 3 15"),C(o,"x1","21"),C(o,"y1","3"),C(o,"x2","14"),C(o,"y2","10"),C(i,"x1","3"),C(i,"y1","21"),C(i,"x2","10"),C(i,"y2","14"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",a="feather feather-maximize-2 "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o),g(n,i)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&a!==(a="feather feather-maximize-2 "+t[2])&&C(n,"class",a)},i:t,o:t,d(t){t&&$(n)}}}function ee(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class ne extends it{constructor(t){super(),ot(this,t,ee,te,i,{size:0,strokeWidth:1,class:2})}}function re(e){let n,r,s;return{c(){n=k("svg"),r=k("path"),C(r,"d","M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-message-circle "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-message-circle "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function se(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class oe extends it{constructor(t){super(),ot(this,t,se,re,i,{size:0,strokeWidth:1,class:2})}}function ie(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("circle"),s=k("circle"),o=k("circle"),C(r,"cx","12"),C(r,"cy","12"),C(r,"r","1"),C(s,"cx","12"),C(s,"cy","5"),C(s,"r","1"),C(o,"cx","12"),C(o,"cy","19"),C(o,"r","1"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-more-vertical "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-more-vertical "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function ae(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class le extends it{constructor(t){super(),ot(this,t,ae,ie,i,{size:0,strokeWidth:1,class:2})}}function ce(e){let n,r,s,o;return{c(){n=k("svg"),r=k("rect"),s=k("rect"),C(r,"x","6"),C(r,"y","4"),C(r,"width","4"),C(r,"height","16"),C(s,"x","14"),C(s,"y","4"),C(s,"width","4"),C(s,"height","16"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-pause "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-pause "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function he(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class de extends it{constructor(t){super(),ot(this,t,he,ce,i,{size:0,strokeWidth:1,class:2})}}function ue(e){let n,r,s;return{c(){n=k("svg"),r=k("polygon"),C(r,"points","5 3 19 12 5 21 5 3"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",s="feather feather-play "+e[2])},m(t,e){m(t,n,e),g(n,r)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&s!==(s="feather feather-play "+t[2])&&C(n,"class",s)},i:t,o:t,d(t){t&&$(n)}}}function pe(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class fe extends it{constructor(t){super(),ot(this,t,pe,ue,i,{size:0,strokeWidth:1,class:2})}}function ge(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("line"),C(r,"x1","12"),C(r,"y1","5"),C(r,"x2","12"),C(r,"y2","19"),C(s,"x1","5"),C(s,"y1","12"),C(s,"x2","19"),C(s,"y2","12"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-plus "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-plus "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function me(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class $e extends it{constructor(t){super(),ot(this,t,me,ge,i,{size:0,strokeWidth:1,class:2})}}function we(e){let n,r,s,o;return{c(){n=k("svg"),r=k("polyline"),s=k("path"),C(r,"points","1 4 1 10 7 10"),C(s,"d","M3.51 15a9 9 0 1 0 2.13-9.36L1 10"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-rotate-ccw "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-rotate-ccw "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function ve(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class ke extends it{constructor(t){super(),ot(this,t,ve,we,i,{size:0,strokeWidth:1,class:2})}}function _e(e){let n,r,s,o;return{c(){n=k("svg"),r=k("polyline"),s=k("path"),C(r,"points","23 4 23 10 17 10"),C(s,"d","M20.49 15a9 9 0 1 1-2.12-9.36L23 10"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-rotate-cw "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-rotate-cw "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function ye(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class xe extends it{constructor(t){super(),ot(this,t,ye,_e,i,{size:0,strokeWidth:1,class:2})}}function be(e){let n,r,s,o;return{c(){n=k("svg"),r=k("circle"),s=k("line"),C(r,"cx","11"),C(r,"cy","11"),C(r,"r","8"),C(s,"x1","21"),C(s,"y1","21"),C(s,"x2","16.65"),C(s,"y2","16.65"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-search "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-search "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Ce(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class ze extends it{constructor(t){super(),ot(this,t,Ce,be,i,{size:0,strokeWidth:1,class:2})}}function Se(e){let n,r,s,o;return{c(){n=k("svg"),r=k("circle"),s=k("path"),C(r,"cx","12"),C(r,"cy","12"),C(r,"r","3"),C(s,"d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-settings "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-settings "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Pe(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Te extends it{constructor(t){super(),ot(this,t,Pe,Se,i,{size:0,strokeWidth:1,class:2})}}function Ee(e){let n,r,s,o,i,a;return{c(){n=k("svg"),r=k("polyline"),s=k("path"),o=k("line"),i=k("line"),C(r,"points","3 6 5 6 21 6"),C(s,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),C(o,"x1","10"),C(o,"y1","11"),C(o,"x2","10"),C(o,"y2","17"),C(i,"x1","14"),C(i,"y1","11"),C(i,"x2","14"),C(i,"y2","17"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",a="feather feather-trash-2 "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o),g(n,i)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&a!==(a="feather feather-trash-2 "+t[2])&&C(n,"class",a)},i:t,o:t,d(t){t&&$(n)}}}function We(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Me extends it{constructor(t){super(),ot(this,t,We,Ee,i,{size:0,strokeWidth:1,class:2})}}function De(e){let n,r,s,o;return{c(){n=k("svg"),r=k("polyline"),s=k("polyline"),C(r,"points","23 6 13.5 15.5 8.5 10.5 1 18"),C(s,"points","17 6 23 6 23 12"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-trending-up "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-trending-up "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Ae(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Le extends it{constructor(t){super(),ot(this,t,Ae,De,i,{size:0,strokeWidth:1,class:2})}}function Re(e){let n,r,s,o,i;return{c(){n=k("svg"),r=k("path"),s=k("polyline"),o=k("line"),C(r,"d","M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"),C(s,"points","17 8 12 3 7 8"),C(o,"x1","12"),C(o,"y1","3"),C(o,"x2","12"),C(o,"y2","15"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",i="feather feather-upload "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&i!==(i="feather feather-upload "+t[2])&&C(n,"class",i)},i:t,o:t,d(t){t&&$(n)}}}function Ie(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Be extends it{constructor(t){super(),ot(this,t,Ie,Re,i,{size:0,strokeWidth:1,class:2})}}function je(e){let n,r,s,o;return{c(){n=k("svg"),r=k("line"),s=k("line"),C(r,"x1","18"),C(r,"y1","6"),C(r,"x2","6"),C(r,"y2","18"),C(s,"x1","6"),C(s,"y1","6"),C(s,"x2","18"),C(s,"y2","18"),C(n,"xmlns","http://www.w3.org/2000/svg"),C(n,"width",e[0]),C(n,"height",e[0]),C(n,"fill","none"),C(n,"viewBox","0 0 24 24"),C(n,"stroke","currentColor"),C(n,"stroke-width",e[1]),C(n,"stroke-linecap","round"),C(n,"stroke-linejoin","round"),C(n,"class",o="feather feather-x "+e[2])},m(t,e){m(t,n,e),g(n,r),g(n,s)},p(t,[e]){1&e&&C(n,"width",t[0]),1&e&&C(n,"height",t[0]),2&e&&C(n,"stroke-width",t[1]),4&e&&o!==(o="feather feather-x "+t[2])&&C(n,"class",o)},i:t,o:t,d(t){t&&$(n)}}}function Oe(t,e,n){let{size:r="24"}=e,{strokeWidth:s=2}=e,{class:o=""}=e;return"100%"!==r&&(r="x"===r.slice(-1)?r.slice(0,r.length-1)+"em":parseInt(r)+"px"),t.$$set=t=>{"size"in t&&n(0,r=t.size),"strokeWidth"in t&&n(1,s=t.strokeWidth),"class"in t&&n(2,o=t.class)},[r,s,o]}class Ne extends it{constructor(t){super(),ot(this,t,Oe,je,i,{size:0,strokeWidth:1,class:2})}}const qe=[];let Fe;function He(t){const e=t.pattern.test(Fe);Ue(t,t.className,e),Ue(t,t.inactiveClassName,!e)}function Ue(t,e,n){(e||"").split(" ").forEach((e=>{e&&(t.node.classList.remove(e),n&&t.node.classList.add(e))}))}function Ve(t,e){if(!(e=e&&("string"==typeof e||"object"==typeof e&&e instanceof RegExp)?{path:e}:e||{}).path&&t.hasAttribute("href")&&(e.path=t.getAttribute("href"),e.path&&e.path.length>1&&"#"==e.path.charAt(0)&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||"string"==typeof e.path&&(e.path.length<1||"/"!=e.path.charAt(0)&&"*"!=e.path.charAt(0)))throw Error('Invalid value for "path" argument');const{pattern:n}="string"==typeof e.path?dt(e.path):{pattern:e.path},r={node:t,className:e.className,inactiveClassName:e.inactiveClassName,pattern:n};return qe.push(r),He(r),{destroy(){qe.splice(qe.indexOf(r),1)}}}mt.subscribe((t=>{Fe=t.location+(t.querystring?"?"+t.querystring:""),qe.map(He)}));const Ye={lists:[],notes:""},Qe=["notes"];function Xe(){}class Ge{constructor(t,e){this.initialized=!1,this._list_db=new PouchDB(t),this._document_db=new PouchDB(e)}init(){return new Promise(((t,e)=>{this._list_db.allDocs({include_docs:!0}).then((n=>{n.rows.map((t=>t.doc.name)).includes("Bookmarks")?(this.initialized=!0,t()):this._list_db.post({name:"Bookmarks"}).then((n=>{if(!n.ok)throw console.error(n),e(new Error("There was an error initializing the bookmarks data. Check the logs for more details.")),new Xe;this.initialized=!0,t()})).catch((t=>{throw console.error(t),e(new Error("There was an error initializing the bookmarks data. Check the logs for more details.")),new Xe}))})).catch(Xe,(()=>{})).catch((t=>{console.error(t),e(new Error("There was an error loading bookmarks data. Check the logs for more details."))}))}))}waitForInit(){return new Promise(((t,e)=>{let n=!1;const r=()=>{this.initialized?(t(),n=!0):setTimeout(r,10)};n||r()}))}getLists(){return new Promise(((t,e)=>{this._list_db.allDocs({include_docs:!0}).then((e=>{t(e.rows.map((t=>t.doc.name)))})).catch((t=>{console.error(t),e(new Error("There was an error fetching the available word lists."))}))}))}getEmptyLists(){let t;return new Promise(((e,n)=>{this._list_db.allDocs({include_docs:!0}).then((e=>(t=e.rows.map((t=>t.doc)),this._document_db.allDocs({include_docs:!0})))).then((n=>{n=n.rows.map((t=>t.doc));const r=t.filter((t=>{const e=t._id;return!n.filter((t=>t.lists.includes(e))).length})).map((t=>t.name));e(r)})).catch((t=>{console.error(t),n(new Error("There was an error trying to fetch empty lists."))}))}))}createList(t){return new Promise(((e,n)=>{this._list_db.allDocs({include_docs:!0}).then((t=>t.rows.map((t=>t.doc.name)))).then((e=>{if(e.includes(t))throw n(new Error(`Cannot create list. A list with the name ${t} already exists.`)),new Xe;return this._list_db.post({name:t})})).then((r=>{r.ok?e():(console.error(r),n(new Error(`There was an error while creating ${t}. Check the logs for more details.`)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),n(new Error(`There was an error while creating ${t}. Check the logs for more details.`))}))}))}deleteList(t){let e;return new Promise(((n,r)=>{this._list_db.allDocs({include_docs:!0}).then((n=>{const s=n.rows.filter((e=>e.doc.name===t))[0];if(!s)throw r(new Error(`There was an error deleting the list ${t}. The list does not exist.`)),new Xe;return s.doc._deleted=!0,e=s.doc._id,this._list_db.put(s.doc)})).then((e=>{if(e.ok)return this._document_db.allDocs({include_docs:!0});throw console.error(e),r(`There was an error deleting the list ${t}. Check the log for more details.`),new Xe})).then((t=>{const n=t.rows.map((t=>t.doc));for(let t=0;tt!==e)),r.lists.length||(r._deleted=!0)}return this._document_db.bulkDocs(n)})).then((e=>{e.map((t=>t.ok)).includes(!1)?(console.error(e),r(new Error(`There was an error deleting the list ${t}. Check the log for more details.`))):n()})).catch(Xe,(()=>{})).catch((e=>{console.error(e),r(new Error(`There was an error deleting the list ${t}. Check the log for more details.`))}))}))}getListContent(t){let e;return new Promise(((n,r)=>{this._list_db.allDocs({include_docs:!0}).then((n=>{const s=n.rows.filter((e=>e.doc.name===t))[0];if(!s)throw console.error(n),r(new Error(`There was an error fetching the contents of ${t}. List does not exist! Check the log for more details.`)),new Xe;return e=s.doc._id,this._document_db.allDocs({include_docs:!0})})).then((t=>{n(t.rows.filter((t=>t.doc.lists.includes(e))).map((t=>t.doc)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),r(new Error(`There was an error loading the list ${t}. Check the log for more details.`))}))}))}getWordByHash(t){return new Promise(((e,n)=>{this._document_db.allDocs({include_docs:!0}).then((n=>{e(n.rows.filter((e=>e.doc.hash===t)).map((t=>t.doc))[0])}))}))}_createWordEntry(t,e){const n={...Ye,...t};return n.lists=[e],n}addToList(t,e){let n;return new Promise(((r,s)=>{this._list_db.allDocs({include_docs:!0}).then((e=>{const r=e.rows.filter((e=>e.doc.name===t)).map((t=>t.doc))[0];if(!r)throw s(new Error(`There was an error adding the word to ${t}. List does not exist!`)),new Xe;return n=r._id,this._document_db.allDocs({include_docs:!0})})).then((t=>{const r=t.rows.map((t=>t.doc));let s=r.filter((t=>t.hash===e.hash))[0];return s?(s.lists.includes(n)||s.lists.push(n),this._document_db.put(s)):(s=this._createWordEntry(e,n),this._document_db.post(s))})).then((e=>{e.ok?r():(console.error(e),s(new Error(`There was an error adding the word to ${t}. Check the log for more details.`)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),s(new Error(`There was an error adding the word to ${t}. Check the log for more details.`))}))}))}removeFromList(t,e){let n;return new Promise(((r,s)=>{this._list_db.allDocs({include_docs:!0}).then((e=>{const r=e.rows.filter((e=>e.doc.name===t)).map((t=>t.doc))[0];if(!r)throw s(new Error(`There was an error removing the word from ${t}. The list does not exist.`)),new Xe;return n=r._id,this._document_db.allDocs({include_docs:!0})})).then((r=>{const o=r.rows.map((t=>t.doc));let i=o.filter((t=>t.hash===e.hash))[0];if(i)return i.lists=i.lists.filter((t=>t!==n)),this._document_db.put(i);throw s(new Error(`There was an error removing the word from ${t}. The word does not exist!`)),new Xe})).then((e=>{e.ok?r():(console.error(e),s(new Error(`There was an error removing the word from ${t}. Check the log for more details.`)))})).catch(Xe,(()=>{})).catch((e=>{console.error(e),s(new Error(`There was an error removing the word from ${t}. Check the log for more details.`))}))}))}inList(t){let e;return new Promise(((n,r)=>{this.getWordByHash(t).then((t=>(e=t?t.lists:[],this._list_db.allDocs({include_docs:!0})))).then((t=>{n(t.rows.filter((t=>e.includes(t.doc._id))).map((t=>t.doc.name)))})).catch((t=>{console.error(t),r(new Error("There was an error fetching bookmarks data. Please check the log for more details."))}))}))}updateProperty(t,e,n){return new Promise(((r,s)=>{this.getWordByHash(t).then((t=>{if(!t)throw s(new Error("There was an error updating the bookmarks entry. That word could not be found in any of your lists.")),new Xe;if(!Qe.includes(e))throw s(new Error(`There was an error updating the bookmarks entry. The property ${e} cannot be updated with this method.`)),new Xe;return t[e]=n,this._document_db.put(t)})).then((t=>{t.ok?r():s(new Error("There was an error updating the bookmarks entry."))})).catch(Xe,(()=>{})).catch((t=>{console.error(t),s(new Error("There was an error updating the bookmarks entry. Check the log for more details."))}))}))}}const Ke=(t,e)=>{e&&console.error(e),alert(t)},Je=(t,e)=>({requiresRestart:t,value:e});class Ze{constructor(t){this._name=t,this._config={},this.initialized=!1}init(){return new Promise(((t,e)=>{this._db=new PouchDB(this._name),this._db.get("config").catch((t=>{if("not_found"===t.name)return{_id:"config",transparency:Je(!0,!1),beta:Je(!0,!1),toneColors:Je(!0,{colors:["--sy-color--blue-3","--sy-color--yellow-1","--sy-color--red-1","--sy-color--green-3","--sy-color--grey-4"],hasCustomColors:!1})};console.error(t),e("There was an error loading user preferences. Check the logs for more details.")})).then((e=>{this._config=e,this.initialized=!0,t()})).catch((t=>{console.error(t),e("There was an error loading user preferences. Check the logs for more details.")}))}))}waitForInit(){return new Promise(((t,e)=>{let n=!1;const r=()=>{this.initialized?(t(),n=!0):setTimeout(r,10)};n||r()}))}get(t){if(!this.initialized)return Ke("Cannot read preferences. Preferences not yet initialized."),void console.log("Trying to access property "+t);const e=this._config[t];return e||Ke(`Requested preference ${t} does not exist!`),e.value}set(t,e){if(!this.initialized)return void Ke("Cannot save preferences. Preferences not yet initialized.");const n=this._config[t];n?(n.requiresRestart&&alert("You must restart Syng for this change to take effect."),this._config[t].value=e,this._db.put(this._config).then((t=>{t.ok?this._config._rev=t.rev:Ke("Cannot save preferences. An unknown error occurred. Check the log for more details.",t)})).catch((t=>{Ke("Cannot save preferences. An unknown error occurred. Check the logs for more details.",t)}))):Ke(`Requested preference ${t} does not exist!`)}}const tn=async()=>"debug"in await(async()=>{try{const t=await window.__TAURI__.cli.getMatches();return"run"===t.subcommand.name?t.subcommand.matches.args:t.args}catch(t){return console.error(t),{}}})();function en(){return en=Object.assign||function(t){for(var e=1;e=g),v="y"===i&&(m<=0||m+u>=f);w||v||(r=!1,n.removeEventListener(un,l),n.removeEventListener(un,c),"translate3d(0px, 0px, 0px)"!==n.style.transform&&(n.style.transition="none",n.style.transform=pn)),m===s&&$===o||(s=m,o=$,r||!w&&!v||(r=!0,n.addEventListener(un,l),n.style.transition="transform ".concat(e.duration[0],"ms ").concat(e.easing),n.style.transform="translate3d(".concat(w?e.intensity*-h:0,"px, ").concat(v?e.intensity*-d:0,"px, 0)")))}function l(){n.removeEventListener(un,l),n.addEventListener(un,c),n.style.transition="transform ".concat(e.duration[1],"ms ").concat(e.easing),n.style.transform=pn}function c(){n.removeEventListener(un,c),r=!1}function h(){e.appleDevicesOnly&&!hn||(e.useNative&&cn?t.style.webkitOverflowScrolling="touch":e.useNative&&cn||t.addEventListener("wheel",a,{passive:!0}))}h();var d={el:t,props:e,enable:h,disable:function(){t.style.webkitOverflowScrolling="",t.removeEventListener("wheel",a,{passive:!0})}};return t._elasticScroll=d,d}function gn(t){var e,n=en({},nn,t),r=(e=n.targets,"string"==typeof e?dn(document.querySelectorAll(e)):e instanceof NodeList?dn(e):e instanceof Element?[e]:[]).map((function(t){return fn(t,n)})).filter(Boolean);return n.targets instanceof Element?r[0]:r}gn.defaults=nn,window.onload=()=>{gn({appleDevicesOnly:!1,intensity:1})};const mn=()=>{const t=tn(),e=t?"development_config":"config",n=t?"development_word-lists":"word-lists",r=t?"development_bookmarks":"bookmarks";window.preferenceManager=new Ze(e),window.bookmarkManager=new Ge(n,r);const s=[{name:"init-dictionary",action:window.__TAURI__.invoke("init_dictionary")},{name:"init-preference-manager",action:window.preferenceManager.init()},{name:"cache-platform",action:window.__TAURI__.os.platform()},{name:"init-bookmark-manager",action:window.bookmarkManager.init()}];Promise.all(s.map((t=>t.action))).then((t=>{const e=(t=>t.map(((t,e)=>({name:s[e].name,result:t}))))(t);window.platform=((t,e)=>{const n=e.find((e=>e.name===t));return n?n.result:void 0})("cache-platform",e),document.dispatchEvent(new Event("init")),(()=>{const t=window.preferenceManager.get("toneColors");if(t.hasCustomColors){const e=document.querySelector(":root").style,n=t.colors;for(let t=0;t{Ke("There was an error starting Syng. Please quit and try again. If this problem persists please file a bug report.",t)}))};function $n(t,e,n){const r=t.slice();return r[6]=e[n],r}function wn(t,e,n){const r=t.slice();return r[6]=e[n],r}function vn(t){let e,n,r,s,o,i,a,l,c,h,d,u=t[6].title+"";var p=t[6].icon;return p&&(r=P(p,{props:{size:"24"}})),{c(){e=v("a"),n=v("span"),r&&nt(r.$$.fragment),s=y(),o=v("div"),i=v("p"),a=_(u),l=y(),C(n,"class","navigation--item svelte-81zlxj"),C(o,"class","sy-tooltip--body sy-tooltip--body-right"),C(e,"href",`#/${t[6].link}`),C(e,"class","sy-tooltip--container")},m(u,p){m(u,e,p),g(e,n),r&&rt(r,n,null),g(e,s),g(e,o),g(o,i),g(i,a),g(e,l),c=!0,h||(d=f(Ve.call(null,n,{path:t[6].pattern||`/${t[6].link}`,className:"navigation--item-active"})),h=!0)},p(e,s){if(p!==(p=(t=e)[6].icon)){if(r){G();const t=r;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}p?(r=P(p,{props:{size:"24"}}),nt(r.$$.fragment),J(r.$$.fragment,1),rt(r,n,null)):r=null}},i(t){c||(r&&J(r.$$.fragment,t),c=!0)},o(t){r&&Z(r.$$.fragment,t),c=!1},d(t){t&&$(e),r&&st(r),h=!1,d()}}}function kn(t){let e,n,r=(!t[6].beta||t[0])&&vn(t);return{c(){r&&r.c(),e=x()},m(t,s){r&&r.m(t,s),m(t,e,s),n=!0},p(t,n){!t[6].beta||t[0]?r?(r.p(t,n),1&n&&J(r,1)):(r=vn(t),r.c(),J(r,1),r.m(e.parentNode,e)):r&&(G(),Z(r,1,1,(()=>{r=null})),K())},i(t){n||(J(r),n=!0)},o(t){Z(r),n=!1},d(t){r&&r.d(t),t&&$(e)}}}function _n(t){let e,n,r,s,o,i,a,l,c,h,d,u=t[6].title+"";var p=t[6].icon;function w(t){return{props:{size:t[6].size}}}return p&&(r=P(p,w(t))),{c(){e=v("a"),n=v("span"),r&&nt(r.$$.fragment),s=y(),o=v("div"),i=v("p"),a=_(u),l=y(),C(n,"class","navigation--item svelte-81zlxj"),C(o,"class","sy-tooltip--body sy-tooltip--body-right"),C(e,"href",`#/${t[6].link}`),C(e,"class","sy-tooltip--container")},m(u,p){m(u,e,p),g(e,n),r&&rt(r,n,null),g(e,s),g(e,o),g(o,i),g(i,a),g(e,l),c=!0,h||(d=f(Ve.call(null,n,{path:`/${t[6].link}`,className:"navigation--item-active"})),h=!0)},p(e,s){if(p!==(p=(t=e)[6].icon)){if(r){G();const t=r;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}p?(r=P(p,w(t)),nt(r.$$.fragment),J(r.$$.fragment,1),rt(r,n,null)):r=null}},i(t){c||(r&&J(r.$$.fragment,t),c=!0)},o(t){r&&Z(r.$$.fragment,t),c=!1},d(t){t&&$(e),r&&st(r),h=!1,d()}}}function yn(t){let e,n,r=(!t[6].beta||t[0])&&_n(t);return{c(){r&&r.c(),e=x()},m(t,s){r&&r.m(t,s),m(t,e,s),n=!0},p(t,n){!t[6].beta||t[0]?r?(r.p(t,n),1&n&&J(r,1)):(r=_n(t),r.c(),J(r,1),r.m(e.parentNode,e)):r&&(G(),Z(r,1,1,(()=>{r=null})),K())},i(t){n||(J(r),n=!0)},o(t){Z(r),n=!1},d(t){r&&r.d(t),t&&$(e)}}}function xn(t){let e,n,r,s,o,i=t[3],a=[];for(let e=0;eZ(a[t],1,1,(()=>{a[t]=null}));let c=t[4],h=[];for(let e=0;eZ(h[t],1,1,(()=>{h[t]=null}));return{c(){e=v("div"),n=v("div");for(let t=0;t{n(5,o="darwin"===t[1]),n(2,l=o),n(0,i=window.preferenceManager.get("beta")),n(1,a=o&&window.preferenceManager.get("transparency"))})).catch((t=>{Ke("There was an unexpected error reading system information. Syng may not operate as expected. Please restart Syng. If this problem persists, please report this bug. For more details check the logs.",t)})),t.$$.update=()=>{32&t.$$.dirty&&o&&window.__TAURI__.window.appWindow.onResized((()=>{window.__TAURI__.window.appWindow.isFullscreen().then((t=>{n(2,l=!t)}))}))},[i,a,l,r,s,o]}class Cn extends it{constructor(t){super(),ot(this,t,bn,xn,i,{})}}function zn(t){let e,n,r,s;const o=t[12].default,i=l(o,t,t[11],null);return{c(){e=v("button"),i&&i.c(),C(e,"class",p(t[2]())+" svelte-161klet"),e.disabled=t[0],C(e,"data-testid","sy-button")},m(o,a){m(o,e,a),i&&i.m(e,null),n=!0,r||(s=b(e,"click",t[13]),r=!0)},p(t,[r]){i&&i.p&&(!n||2048&r)&&d(i,o,t,t[11],n?h(o,t[11],r,null):u(t[11]),null),(!n||1&r)&&(e.disabled=t[0])},i(t){n||(J(i,t),n=!0)},o(t){Z(i,t),n=!1},d(t){t&&$(e),i&&i.d(t),r=!1,s()}}}function Sn(t,e,n){let{$$slots:r={},$$scope:s}=e,{style:o="filled"}=e,{size:i="medium"}=e,{shape:a="rectangle"}=e,{disabled:l=!1}=e,{grouped:c=!1}=e,{color:h}=e,{hover:d}=e,{center:u=!1}=e,{classes:p=[]}=e;const f=D();return t.$$set=t=>{"style"in t&&n(3,o=t.style),"size"in t&&n(4,i=t.size),"shape"in t&&n(5,a=t.shape),"disabled"in t&&n(0,l=t.disabled),"grouped"in t&&n(6,c=t.grouped),"color"in t&&n(7,h=t.color),"hover"in t&&n(8,d=t.hover),"center"in t&&n(9,u=t.center),"classes"in t&&n(10,p=t.classes),"$$scope"in t&&n(11,s=t.$$scope)},[l,f,()=>p.concat(["sy-button",`sy-button--${o}`,`sy-button--${i}`,`sy-button--${a}`,u?"sy-button--center":"",h?`sy-button--color-${h}`:"",d?`sy-button--hover-${d}`:"",c?"sy-button--grouped":""]).join(" "),o,i,a,c,h,d,u,p,s,r,()=>f("click")]}class Pn extends it{constructor(t){super(),ot(this,t,Sn,zn,i,{style:3,size:4,shape:5,disabled:0,grouped:6,color:7,hover:8,center:9,classes:10})}}function Tn(t){let e,n;const r=t[3].default,s=l(r,t,t[2],null);return{c(){e=v("div"),s&&s.c(),C(e,"class",p(t[0]())+" svelte-vpwbgu")},m(t,r){m(t,e,r),s&&s.m(e,null),n=!0},p(t,[e]){s&&s.p&&(!n||4&e)&&d(s,r,t,t[2],n?h(r,t[2],e,null):u(t[2]),null)},i(t){n||(J(s,t),n=!0)},o(t){Z(s,t),n=!1},d(t){t&&$(e),s&&s.d(t)}}}function En(t,e,n){let{$$slots:r={},$$scope:s}=e,{size:o="medium"}=e;return t.$$set=t=>{"size"in t&&n(1,o=t.size),"$$scope"in t&&n(2,s=t.$$scope)},[()=>["sy-button-bar--container",`sy-button-bar--container--${o}`].join(" "),o,s,r]}class Wn extends it{constructor(t){super(),ot(this,t,En,Tn,i,{size:1})}}function Mn(e){let n,r,o,i;return{c(){n=v("span"),r=_(e[0]),C(n,"class",p(e[1]())+" svelte-312fzw")},m(t,s){m(t,n,s),g(n,r),o||(i=[b(n,"click",e[2]),b(n,"keyup",e[2])],o=!0)},p(t,[e]){1&e&&z(r,t[0])},i:t,o:t,d(t){t&&$(n),o=!1,s(i)}}}function Dn(t,e,n){let{text:r}=e,{color:s="black"}=e,{hover:o="blue"}=e,{icon:i}=e;const a=D();return t.$$set=t=>{"text"in t&&n(0,r=t.text),"color"in t&&n(3,s=t.color),"hover"in t&&n(4,o=t.hover),"icon"in t&&n(5,i=t.icon)},[r,()=>["st-dropdown-item--container",`st-dropdown-item--color--${s}`,`st-dropdown-item--hover--${o}`].join(" "),t=>{a("click",t)},s,o,i]}class An extends it{constructor(t){super(),ot(this,t,Dn,Mn,i,{text:0,color:3,hover:4,icon:5})}}function Ln(t,e,n){const r=t.slice();return r[13]=e[n],r}function Rn(t){let e,n,r;function s(...e){return t[9](t[13],...e)}var o=t[13].component;function i(t){return{props:{text:t[13].text,icon:t[13].icon,color:t[13].color,hover:t[13].hover}}}return o&&(e=P(o,i(t)),e.$on("click",s)),{c(){e&&nt(e.$$.fragment),n=x()},m(t,s){e&&rt(e,t,s),m(t,n,s),r=!0},p(r,a){t=r;const l={};if(1&a&&(l.text=t[13].text),1&a&&(l.icon=t[13].icon),1&a&&(l.color=t[13].color),1&a&&(l.hover=t[13].hover),1&a&&o!==(o=t[13].component)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(e=P(o,i(t)),e.$on("click",s),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}else o&&e.$set(l)},i(t){r||(e&&J(e.$$.fragment,t),r=!0)},o(t){e&&Z(e.$$.fragment,t),r=!1},d(t){t&&$(n),e&&st(e,t)}}}function In(t){let e,n,r,o,i,a,c,f;const k=t[8].default,_=l(k,t,t[7],null);let x=t[0],z=[];for(let e=0;eZ(z[t],1,1,(()=>{z[t]=null}));return{c(){e=v("div"),n=v("span"),_&&_.c(),r=y(),o=v("div"),i=v("div");for(let t=0;t{t.composedPath().includes(l)||n(1,c=!1)},u=t=>{t&&(h("selection",t),n(1,c=!1))};M((()=>{document.removeEventListener("click",d,{capture:!0})}));return t.$$set=t=>{"values"in t&&n(0,o=t.values),"position"in t&&n(6,i=t.position),"$$scope"in t&&n(7,s=t.$$scope)},t.$$.update=()=>{2&t.$$.dirty&&(c?document.addEventListener("click",d,{capture:!0}):document.removeEventListener("click",d,{capture:!0}))},[o,c,a,u,()=>{n(1,c=!c)},()=>["sy-dropdown--list",`sy-dropdown--list--${i}`].join(" "),i,s,r,(t,e)=>u(t.id)]}class jn extends it{constructor(t){super(),ot(this,t,Bn,In,i,{values:0,position:6})}}function On(t){let e,n,r,o,i,a,l,c;var h=t[0];return h&&(n=P(h,{props:{size:"14"}})),{c(){e=v("span"),n&&nt(n.$$.fragment),r=_("\n\t \n\t"),o=v("span"),i=_(t[1]),C(e,"class",p(t[2]())+" svelte-rlw7fj")},m(s,h){m(s,e,h),n&&rt(n,e,null),g(e,r),g(e,o),g(o,i),a=!0,l||(c=[b(e,"click",t[3]),b(e,"keyup",t[3])],l=!0)},p(t,[s]){if(1&s&&h!==(h=t[0])){if(n){G();const t=n;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}h?(n=P(h,{props:{size:"14"}}),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,e,r)):n=null}(!a||2&s)&&z(i,t[1])},i(t){a||(n&&J(n.$$.fragment,t),a=!0)},o(t){n&&Z(n.$$.fragment,t),a=!1},d(t){t&&$(e),n&&st(n),l=!1,s(c)}}}function Nn(t,e,n){let{icon:r}=e,{text:s=""}=e,{hover:o="blue"}=e,{color:i="black"}=e;const a=D();return t.$$set=t=>{"icon"in t&&n(0,r=t.icon),"text"in t&&n(1,s=t.text),"hover"in t&&n(4,o=t.hover),"color"in t&&n(5,i=t.color)},[r,s,()=>["twi-dropdown-item--container",`twi-dropdown-item--color--${i}`,`twi-dropdown-item--hover--${o}`].join(" "),t=>{a("click",t)},o,i]}class qn extends it{constructor(t){super(),ot(this,t,Nn,On,i,{icon:0,text:1,hover:4,color:5})}}function Fn(t,e,n){const r=t.slice();return r[7]=e[n],r}function Hn(t){let e,n,r,s;var o=t[1];function i(t){return{props:{value:t[7]}}}return o&&(n=P(o,i(t)),n.$on("selection",t[5]),n.$on("event",t[6])),{c(){e=v("div"),n&&nt(n.$$.fragment),r=y(),C(e,"class","sy-list--list-item svelte-kedf8z")},m(t,o){m(t,e,o),n&&rt(n,e,null),g(e,r),s=!0},p(t,s){const a={};if(1&s&&(a.value=t[7]),2&s&&o!==(o=t[1])){if(n){G();const t=n;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(n=P(o,i(t)),n.$on("selection",t[5]),n.$on("event",t[6]),nt(n.$$.fragment),J(n.$$.fragment,1),rt(n,e,r)):n=null}else o&&n.$set(a)},i(t){s||(n&&J(n.$$.fragment,t),s=!0)},o(t){n&&Z(n.$$.fragment,t),s=!1},d(t){t&&$(e),n&&st(n)}}}function Un(t){let e,n,r=t[0],s=[];for(let e=0;eZ(s[t],1,1,(()=>{s[t]=null}));return{c(){e=v("div");for(let t=0;t{"values"in t&&n(0,r=t.values),"component"in t&&n(1,s=t.component),"highlight"in t&&n(3,o=t.highlight),"filterable"in t&&n(4,i=t.filterable)},[r,s,a,o,i,t=>a("selection",t.detail),function(e){A.call(this,t,e)}]}class Yn extends it{constructor(t){super(),ot(this,t,Vn,Un,i,{values:0,component:1,highlight:3,filterable:4})}}function Qn(e){let n,r,o;return{c(){n=v("input"),C(n,"placeholder",e[0]),C(n,"type",e[1]),C(n,"class",p(e[5]())+" svelte-z7kzs5"),C(n,"id",e[2]),C(n,"spellcheck",e[3])},m(t,s){m(t,n,s),r||(o=[b(n,"change",e[10]),b(n,"keyup",e[6])],r=!0)},p(t,[e]){1&e&&C(n,"placeholder",t[0]),2&e&&C(n,"type",t[1]),4&e&&C(n,"id",t[2]),8&e&&C(n,"spellcheck",t[3])},i:t,o:t,d(t){t&&$(n),r=!1,s(o)}}}function Xn(t,e,n){let{style:r="standard"}=e,{size:s="medium"}=e,{transparency:o=!1}=e,{placeholder:i=""}=e,{type:a="text"}=e,{id:l}=e,{spellcheck:c}=e;const h=D();return t.$$set=t=>{"style"in t&&n(7,r=t.style),"size"in t&&n(8,s=t.size),"transparency"in t&&n(9,o=t.transparency),"placeholder"in t&&n(0,i=t.placeholder),"type"in t&&n(1,a=t.type),"id"in t&&n(2,l=t.id),"spellcheck"in t&&n(3,c=t.spellcheck)},[i,a,l,c,h,()=>["sy-text-input",o?"sy-text-input--transparency":"",`sy-text-input--${r}`,`sy-text-input--${s}`].join(" "),t=>{"Enter"==t.code?h("enter",t):h("keyup",t.srcElement.value)},r,s,o,t=>h("change",t.srcElement.value)]}class Gn extends it{constructor(t){super(),ot(this,t,Xn,Qn,i,{style:7,size:8,transparency:9,placeholder:0,type:1,id:2,spellcheck:3})}}function Kn(e){let n,r,o,i,a,l,c,h,d,u,f,w=e[6](e[2])+"";return{c(){n=v("div"),r=v("p"),o=_(e[0]),i=y(),a=v("p"),l=_(e[1]),c=y(),h=v("p"),d=_(w),C(r,"class","sy-list-preview-item--text sy-list-preview-item--headline svelte-14tz0cu"),C(a,"class","sy-list-preview-item--text sy-list-preview-item--subtitle svelte-14tz0cu"),C(h,"class","sy-list-preview-item--text sy-list-preview-item--content svelte-14tz0cu"),C(n,"class",p(e[8]())+" svelte-14tz0cu"),S(n,"sy-list-preview-item-container--active",e[4]&&e[5])},m(t,s){m(t,n,s),g(n,r),g(r,o),g(n,i),g(n,a),g(a,l),g(n,c),g(n,h),g(h,d),u||(f=[b(n,"click",e[10]),b(n,"keyup",e[9])],u=!0)},p(t,[e]){1&e&&z(o,t[0]),2&e&&z(l,t[1]),4&e&&w!==(w=t[6](t[2])+"")&&z(d,w),48&e&&S(n,"sy-list-preview-item-container--active",t[4]&&t[5])},i:t,o:t,d(t){t&&$(n),u=!1,s(f)}}}function Jn(t,e,n){let{headline:r=""}=e,{subtitle:s=""}=e,{content:o=""}=e,{index:i}=e,{active:a=!1}=e,{highlight:l}=e;const c=D();return t.$$set=t=>{"headline"in t&&n(0,r=t.headline),"subtitle"in t&&n(1,s=t.subtitle),"content"in t&&n(2,o=t.content),"index"in t&&n(3,i=t.index),"active"in t&&n(4,a=t.active),"highlight"in t&&n(5,l=t.highlight)},[r,s,o,i,a,l,t=>t.length>25?`${t.slice(0,22)}...`:t,c,()=>["sy-list-preview-item-container"].join(" "),t=>{13===t.keycode&&c("click",i)},()=>c("click",i)]}class Zn extends it{constructor(t){super(),ot(this,t,Jn,Kn,i,{headline:0,subtitle:1,content:2,index:3,active:4,highlight:5})}}function tr(t,e,n){const r=t.slice();return r[11]=e[n],r[13]=n,r}function er(e){let n,r;return n=new Gn({props:{spellcheck:!1,placeholder:"Filter",size:"large",id:e[4]}}),n.$on("keyup",e[6]),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function nr(t){let e,n;return e=new Zn({props:{headline:t[11].headline,subtitle:t[11].subtitle,content:t[11].content,active:t[2]===t[13],index:t[13],highlight:t[0]}}),e.$on("click",t[5]),e.$on("event",t[9]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};8&n&&(r.headline=t[11].headline),8&n&&(r.subtitle=t[11].subtitle),8&n&&(r.content=t[11].content),4&n&&(r.active=t[2]===t[13]),1&n&&(r.highlight=t[0]),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function rr(t){let e,n,r,s=t[1]&&er(t),o=t[3],i=[];for(let e=0;eZ(i[t],1,1,(()=>{i[t]=null}));return{c(){s&&s.c(),e=y();for(let t=0;t{s=null})),K()),45&r){let e;for(o=t[3],e=0;e{"values"in t&&n(7,o=t.values),"highlight"in t&&n(0,i=t.highlight),"filterable"in t&&n(1,a=t.filterable),"component"in t&&n(8,l=t.component)},t.$$.update=()=>{if(130&t.$$.dirty&&o&&(n(3,c=o),a)){const t=document.getElementById(r);t&&(t.value="")}},[i,a,s,c,r,t=>{n(2,s=t.detail),h("selection",{index:o.indexOf(c[s]),value:c[s]})},t=>{t=t.detail,n(3,c=o.filter((e=>e.content.includes(t)||e.headline.includes(t)||e.subtitle.includes(t))))},o,l,function(e){A.call(this,t,e)}]}class or extends it{constructor(t){super(),ot(this,t,sr,rr,i,{values:7,highlight:0,filterable:1,component:8})}}function ir(t){let e,n,r;var s=t[6][t[0]];function o(t){return{props:{values:t[1],component:t[2],highlight:t[3],filterable:t[4]}}}return s&&(e=P(s,o(t)),e.$on("selection",t[7]),e.$on("event",t[8])),{c(){e&&nt(e.$$.fragment),n=x()},m(t,s){e&&rt(e,t,s),m(t,n,s),r=!0},p(t,[r]){const i={};if(2&r&&(i.values=t[1]),4&r&&(i.component=t[2]),8&r&&(i.highlight=t[3]),16&r&&(i.filterable=t[4]),1&r&&s!==(s=t[6][t[0]])){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}s?(e=P(s,o(t)),e.$on("selection",t[7]),e.$on("event",t[8]),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}else s&&e.$set(i)},i(t){r||(e&&J(e.$$.fragment,t),r=!0)},o(t){e&&Z(e.$$.fragment,t),r=!1},d(t){t&&$(n),e&&st(e,t)}}}function ar(t,e,n){let{style:r="content"}=e,{values:s=[]}=e,{component:o}=e,{highlight:i}=e,{filterable:a=!1}=e;const l=D(),c={preview:or,content:Yn};return t.$$set=t=>{"style"in t&&n(0,r=t.style),"values"in t&&n(1,s=t.values),"component"in t&&n(2,o=t.component),"highlight"in t&&n(3,i=t.highlight),"filterable"in t&&n(4,a=t.filterable)},[r,s,o,i,a,l,c,t=>l("selection",t.detail),function(e){A.call(this,t,e)}]}class lr extends it{constructor(t){super(),ot(this,t,ar,ir,i,{style:0,values:1,component:2,highlight:3,filterable:4})}}function cr(t){let e,n,r,s;const o=t[3].default,i=l(o,t,t[2],null);return{c(){e=v("a"),i&&i.c(),C(e,"href","javascript:void(0)"),C(e,"class","dictionary-link svelte-vhlbnn"),C(e,"data-testid","dictionary-link")},m(o,a){m(o,e,a),i&&i.m(e,null),n=!0,r||(s=b(e,"click",t[4]),r=!0)},p(t,[e]){i&&i.p&&(!n||4&e)&&d(i,o,t,t[2],n?h(o,t[2],e,null):u(t[2]),null)},i(t){n||(J(i,t),n=!0)},o(t){Z(i,t),n=!1},d(t){t&&$(e),i&&i.d(t),r=!1,s()}}}function hr(t,e,n){let{$$slots:r={},$$scope:s}=e,{link:o}=e;const i=D(),a=()=>i("open",o);return t.$$set=t=>{"link"in t&&n(1,o=t.link),"$$scope"in t&&n(2,s=t.$$scope)},[a,o,s,r,()=>a()]}class dr extends it{constructor(t){super(),ot(this,t,hr,cr,i,{link:1})}}function ur(e){let n;return{c(){n=_(e[0])},m(t,e){m(t,n,e)},p(t,e){1&e&&z(n,t[0])},i:t,o:t,d(t){t&&$(n)}}}function pr(t){let e,n,r,s,o=t[0].split(t[1](t[0]))+"";return r=new dr({props:{link:t[3](t[1](t[0])),$$slots:{default:[fr]},$$scope:{ctx:t}}}),r.$on("open",t[4]),{c(){e=_(o),n=_(" \n\t\t"),nt(r.$$.fragment)},m(t,o){m(t,e,o),m(t,n,o),rt(r,t,o),s=!0},p(t,n){(!s||1&n)&&o!==(o=t[0].split(t[1](t[0]))+"")&&z(e,o);const i={};1&n&&(i.link=t[3](t[1](t[0]))),129&n&&(i.$$scope={dirty:n,ctx:t}),r.$set(i)},i(t){s||(J(r.$$.fragment,t),s=!0)},o(t){Z(r.$$.fragment,t),s=!1},d(t){t&&$(e),t&&$(n),st(r,t)}}}function fr(t){let e,n=t[2](t[1](t[0]))+"";return{c(){e=_(n)},m(t,n){m(t,e,n)},p(t,r){1&r&&n!==(n=t[2](t[1](t[0]))+"")&&z(e,n)},d(t){t&&$(e)}}}function gr(t){let e,n,r,s,o;const i=[pr,ur],a=[];function l(t,e){return 1&e&&(n=null),null==n&&(n=!!mr.test(t[0])),n?0:1}return r=l(t,-1),s=a[r]=i[r](t),{c(){e=v("div"),s.c(),C(e,"class","dictionary-content--definition-item svelte-1qtxwq5")},m(t,n){m(t,e,n),a[r].m(e,null),o=!0},p(t,[n]){let o=r;r=l(t,n),r===o?a[r].p(t,n):(G(),Z(a[o],1,1,(()=>{a[o]=null})),K(),s=a[r],s?s.p(t,n):(s=a[r]=i[r](t),s.c()),J(s,1),s.m(e,null))},i(t){o||(J(s),o=!0)},o(t){Z(s),o=!1},d(t){t&&$(e),a[r].d()}}}const mr=/\s\S+\[(\S|\s\S)+.\]/g;function $r(t,e,n){let{value:r}=e;const s=t=>{const e=t.split("[")[0].split("|");return{traditional:e[0],simplified:e[1]||e[0]}},o=D();return t.$$set=t=>{"value"in t&&n(0,r=t.value)},[r,t=>{const e=t.match(mr);return e?e[0]:null},t=>{const e=s(t);return e.traditional==e.simplified?`${e.traditional}`:`${e.simplified} (${e.traditional})`},t=>s(t).traditional,t=>o("event",t.detail)]}class wr extends it{constructor(t){super(),ot(this,t,$r,gr,i,{value:0})}}function vr(t,e,n){const r=t.slice();return r[2]=e[n],r[4]=n,r}function kr(t){let e,n,r,s=t[2]+"";return{c(){e=v("span"),n=_(s),C(e,"class",r=p(`colored-characters--tone-${t[1][t[4]]||5}`)+" svelte-sic3zr")},m(t,r){m(t,e,r),g(e,n)},p(t,o){1&o&&s!==(s=t[2]+"")&&z(n,s),2&o&&r!==(r=p(`colored-characters--tone-${t[1][t[4]]||5}`)+" svelte-sic3zr")&&C(e,"class",r)},d(t){t&&$(e)}}}function _r(e){let n,r=e[0],s=[];for(let t=0;t{"characters"in t&&n(0,r=t.characters),"tones"in t&&n(1,s=t.tones)},[r,s]}class xr extends it{constructor(t){super(),ot(this,t,yr,_r,i,{characters:0,tones:1})}}function br(t){let e,n,r,s;return n=new xr({props:{characters:t[0].traditional,tones:t[0].tone_marks}}),{c(){e=_(" ("),nt(n.$$.fragment),r=_(")")},m(t,o){m(t,e,o),rt(n,t,o),m(t,r,o),s=!0},p(t,e){const r={};1&e&&(r.characters=t[0].traditional),1&e&&(r.tones=t[0].tone_marks),n.$set(r)},i(t){s||(J(n.$$.fragment,t),s=!0)},o(t){Z(n.$$.fragment,t),s=!1},d(t){t&&$(e),st(n,t),t&&$(r)}}}function Cr(t){let e,n,r,s,o,i,a,l,c,h=t[0].pinyin_marks+"";r=new xr({props:{characters:t[0].simplified,tones:t[0].tone_marks}});let d=t[0].simplified!=t[0].traditional&&br(t);return{c(){e=v("div"),n=v("h1"),nt(r.$$.fragment),s=y(),d&&d.c(),o=y(),i=v("div"),a=v("h3"),l=_(h),C(n,"class","chinese-characters--character-container chinese-characters--character svelte-k2y6zv"),C(n,"data-testid","chinese-characters"),C(a,"class","chinese-characters--pinyin-container svelte-k2y6zv"),C(e,"class","chinese-characters--container svelte-k2y6zv")},m(t,h){m(t,e,h),g(e,n),rt(r,n,null),g(n,s),d&&d.m(n,null),g(e,o),g(e,i),g(i,a),g(a,l),c=!0},p(t,[e]){const s={};1&e&&(s.characters=t[0].simplified),1&e&&(s.tones=t[0].tone_marks),r.$set(s),t[0].simplified!=t[0].traditional?d?(d.p(t,e),1&e&&J(d,1)):(d=br(t),d.c(),J(d,1),d.m(n,null)):d&&(G(),Z(d,1,1,(()=>{d=null})),K()),(!c||1&e)&&h!==(h=t[0].pinyin_marks+"")&&z(l,h)},i(t){c||(J(r.$$.fragment,t),J(d),c=!0)},o(t){Z(r.$$.fragment,t),Z(d),c=!1},d(t){t&&$(e),st(r),d&&d.d()}}}function zr(t,e,n){let{word:r={}}=e;return t.$$set=t=>{"word"in t&&n(0,r=t.word)},[r]}class Sr extends it{constructor(t){super(),ot(this,t,zr,Cr,i,{word:0})}}function Pr(t){let e,n,r,s=t[0].traditional+"";return{c(){e=_(" ("),n=_(s),r=_(")")},m(t,s){m(t,e,s),m(t,n,s),m(t,r,s)},p(t,e){1&e&&s!==(s=t[0].traditional+"")&&z(n,s)},d(t){t&&$(e),t&&$(n),t&&$(r)}}}function Tr(t){let e,n,r,s=t[0].simplified+"",o=t[0].simplified!=t[0].traditional&&Pr(t);return{c(){e=_(s),n=y(),o&&o.c(),r=x()},m(t,s){m(t,e,s),m(t,n,s),o&&o.m(t,s),m(t,r,s)},p(t,n){1&n&&s!==(s=t[0].simplified+"")&&z(e,s),t[0].simplified!=t[0].traditional?o?o.p(t,n):(o=Pr(t),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},d(t){t&&$(e),t&&$(n),o&&o.d(t),t&&$(r)}}}function Er(t){let e,n,r;return n=new dr({props:{link:t[0].traditional,$$slots:{default:[Tr]},$$scope:{ctx:t}}}),n.$on("open",t[1]),{c(){e=v("div"),nt(n.$$.fragment),C(e,"class","dictionary-content--mw svelte-n92ii8")},m(t,s){m(t,e,s),rt(n,e,null),r=!0},p(t,[e]){const r={};1&e&&(r.link=t[0].traditional),9&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){t&&$(e),st(n)}}}function Wr(t,e,n){let{value:r}=e;const s=D();return t.$$set=t=>{"value"in t&&n(0,r=t.value)},[r,t=>s("event",t.detail)]}class Mr extends it{constructor(t){super(),ot(this,t,Wr,Er,i,{value:0})}}function Dr(t,e,n){const r=t.slice();return r[18]=e[n],r}function Ar(t){let e,n,r,s,o,i,a,l,c,h,d,u,p;n=new Sr({props:{word:t[0]}}),s=new Wn({props:{$$slots:{default:[Fr]},$$scope:{ctx:t}}}),c=new lr({props:{values:t[0].english,component:wr}}),c.$on("event",t[2]);let f=t[0].measure_words.length&&Hr(t),w="string"==typeof t[0].notes&&Ur(t);return{c(){e=v("section"),nt(n.$$.fragment),r=y(),nt(s.$$.fragment),o=y(),i=v("section"),a=v("h2"),a.textContent="Definitions",l=y(),nt(c.$$.fragment),h=y(),f&&f.c(),d=y(),w&&w.c(),u=x(),C(e,"class","dictionary-content dictionary-content--header svelte-1dqewiq"),C(a,"class","dictionary-content--section-title svelte-1dqewiq"),C(i,"class","dictionary-content svelte-1dqewiq")},m(t,$){m(t,e,$),rt(n,e,null),g(e,r),rt(s,e,null),m(t,o,$),m(t,i,$),g(i,a),g(i,l),rt(c,i,null),m(t,h,$),f&&f.m(t,$),m(t,d,$),w&&w.m(t,$),m(t,u,$),p=!0},p(t,e){const r={};1&e&&(r.word=t[0]),n.$set(r);const o={};2097154&e&&(o.$$scope={dirty:e,ctx:t}),s.$set(o);const i={};1&e&&(i.values=t[0].english),c.$set(i),t[0].measure_words.length?f?(f.p(t,e),1&e&&J(f,1)):(f=Hr(t),f.c(),J(f,1),f.m(d.parentNode,d)):f&&(G(),Z(f,1,1,(()=>{f=null})),K()),"string"==typeof t[0].notes?w?w.p(t,e):(w=Ur(t),w.c(),w.m(u.parentNode,u)):w&&(w.d(1),w=null)},i(t){p||(J(n.$$.fragment,t),J(s.$$.fragment,t),J(c.$$.fragment,t),J(f),p=!0)},o(t){Z(n.$$.fragment,t),Z(s.$$.fragment,t),Z(c.$$.fragment,t),Z(f),p=!1},d(t){t&&$(e),st(n),st(s),t&&$(o),t&&$(i),st(c),t&&$(h),f&&f.d(t),t&&$(d),w&&w.d(t),t&&$(u)}}}function Lr(t){let e,n;return e=new Pn({props:{grouped:"true",classes:["sy-tooltip--container"],$$slots:{default:[Br]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[18].action)&&t[18].action.apply(this,arguments)})),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(n,r){t=n;const s={};2097154&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Rr(t){let e,n;return e=new jn({props:{values:t[18].dropdown,position:"right",$$slots:{default:[Nr]},$$scope:{ctx:t}}}),e.$on("selection",t[4]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};2&n&&(r.values=t[18].dropdown),2097154&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ir(t){let e,n,r,s=t[18].tooltip+"";return{c(){e=v("div"),n=v("p"),r=_(s),C(e,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,s){m(t,e,s),g(e,n),g(n,r)},p(t,e){2&e&&s!==(s=t[18].tooltip+"")&&z(r,s)},d(t){t&&$(e)}}}function Br(t){let e,n,r,s;var o=t[18].component;o&&(e=P(o,{props:{size:"18"}}));let i=t[18].tooltip&&Ir(t);return{c(){e&&nt(e.$$.fragment),n=y(),i&&i.c(),r=y()},m(t,o){e&&rt(e,t,o),m(t,n,o),i&&i.m(t,o),m(t,r,o),s=!0},p(t,s){if(2&s&&o!==(o=t[18].component)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(e=P(o,{props:{size:"18"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}t[18].tooltip?i?i.p(t,s):(i=Ir(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},i(t){s||(e&&J(e.$$.fragment,t),s=!0)},o(t){e&&Z(e.$$.fragment,t),s=!1},d(t){e&&st(e,t),t&&$(n),i&&i.d(t),t&&$(r)}}}function jr(t){let e,n,r,s=t[18].tooltip+"";return{c(){e=v("div"),n=v("p"),r=_(s),C(e,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,s){m(t,e,s),g(e,n),g(n,r)},p(t,e){2&e&&s!==(s=t[18].tooltip+"")&&z(r,s)},d(t){t&&$(e)}}}function Or(t){let e,n,r,s;var o=t[18].component;o&&(e=P(o,{props:{size:"18"}}));let i=t[18].tooltip&&jr(t);return{c(){e&&nt(e.$$.fragment),n=y(),i&&i.c(),r=x()},m(t,o){e&&rt(e,t,o),m(t,n,o),i&&i.m(t,o),m(t,r,o),s=!0},p(t,s){if(2&s&&o!==(o=t[18].component)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}o?(e=P(o,{props:{size:"18"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}t[18].tooltip?i?i.p(t,s):(i=jr(t),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},i(t){s||(e&&J(e.$$.fragment,t),s=!0)},o(t){e&&Z(e.$$.fragment,t),s=!1},d(t){e&&st(e,t),t&&$(n),i&&i.d(t),t&&$(r)}}}function Nr(t){let e,n,r;return e=new Pn({props:{grouped:"true",classes:["sy-tooltip--container",...t[18].classes],$$slots:{default:[Or]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[18].action)&&t[18].action.apply(this,arguments)})),{c(){nt(e.$$.fragment),n=y()},m(t,s){rt(e,t,s),m(t,n,s),r=!0},p(n,r){t=n;const s={};2&r&&(s.classes=["sy-tooltip--container",...t[18].classes]),2097154&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){r||(J(e.$$.fragment,t),r=!0)},o(t){Z(e.$$.fragment,t),r=!1},d(t){st(e,t),t&&$(n)}}}function qr(t){let e,n,r,s;const o=[Rr,Lr],i=[];function a(t,e){return t[18].dropdown?0:1}return e=a(t),n=i[e]=o[e](t),{c(){n.c(),r=x()},m(t,n){i[e].m(t,n),m(t,r,n),s=!0},p(t,s){let l=e;e=a(t),e===l?i[e].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),n=i[e],n?n.p(t,s):(n=i[e]=o[e](t),n.c()),J(n,1),n.m(r.parentNode,r))},i(t){s||(J(n),s=!0)},o(t){Z(n),s=!1},d(t){i[e].d(t),t&&$(r)}}}function Fr(t){let e,n,r=t[1],s=[];for(let e=0;eZ(s[t],1,1,(()=>{s[t]=null}));return{c(){for(let t=0;t{r=null})),K())},i(t){n||(J(r),n=!0)},o(t){Z(r),n=!1},d(t){t&&$(e),r&&r.d()}}}function Yr(t,e,n){let r,{word:s}=e,{lists:o=[]}=e,{backgroundColor:i="grey"}=e,a=[];const l=()=>{window.bookmarkManager.inList(s.hash).then((t=>{n(8,a=t),n(1,r[0].component=f(),r),n(1,r[0].tooltip=g(),r)})).catch((t=>{Ke("There was an error fetching list membership. Check the log for more details.",t)}))},c=(t,e,n)=>{window.bookmarkManager[t](e,n).then((()=>{l()})).catch((t=>{Ke("There was an error modifying the list membership. Check the log for more details.",{e:t,word:n,list:e})}))},h=(t,e)=>{c("removeFromList",t,e)},d=(t,e)=>{c("addToList",t,e)},u=window.__TAURI__.invoke,p=D(),f=()=>a.length?Lt:$e,g=()=>`${a.length?"Remove from":"Add to"} ${o.length>1?"List":"Bookmarks"}`;let m;return t.$$set=t=>{"word"in t&&n(0,s=t.word),"lists"in t&&n(6,o=t.lists),"backgroundColor"in t&&n(7,i=t.backgroundColor)},t.$$.update=()=>{1&t.$$.dirty&&s&&l(),321&t.$$.dirty&&n(1,r=[{component:f(),tooltip:g(),action:()=>{if(1===o.length){const t=o[0];a.includes(t)?h(t,s):d(t,s)}},dropdown:1===o.length?void 0:o.map((t=>{let e=a.includes(t);return{text:t,id:t,component:e?qn:An,icon:e?Lt:void 0,hover:e?"red":void 0}})),classes:["sy-button--grouped--first"]},{component:ne,tooltip:"Enlarge Characters",action:()=>{u("open_character_window",{word:{traditional:s.traditional,simplified:s.simplified}}).catch((t=>{Ke("An unknown error occurred while trying to open the enlarged character window. Please check the log for more details.",t)}))}}])},[s,r,t=>p("link",t.detail),()=>{const t=s;clearTimeout(m),m=setTimeout((()=>{const e=document.getElementById("dictionary-content--notes").value.trim();window.bookmarkManager.updateProperty(t.hash,"notes",e).then((()=>{t.notes=e})).catch((t=>{Ke("An unknown error occurred while trying to save the notes. Please check the log for more details.",t)}))}),500)},t=>{const e=t.detail;a.includes(e)?h(e,s):d(e,s)},()=>["dictionary-content-container",`dictionary-content--background-${i}`].join(" "),o,i,a]}class Qr extends it{constructor(t){super(),ot(this,t,Yr,Vr,i,{word:0,lists:6,backgroundColor:7})}}function Xr(e){let n;return{c(){n=v("hr"),C(n,"class","sy-dropdown--divider svelte-n4h875")},m(t,e){m(t,n,e)},p:t,i:t,o:t,d(t){t&&$(n)}}}function Gr(t,e,n){let{text:r}=e,{icon:s}=e;return t.$$set=t=>{"text"in t&&n(0,r=t.text),"icon"in t&&n(1,s=t.icon)},[r,s]}class Kr extends it{constructor(t){super(),ot(this,t,Gr,Xr,i,{text:0,icon:1})}}const Jr=t=>({}),Zr=t=>({}),ts=t=>({}),es=t=>({});function ns(e){let n,r;return n=new Ne({props:{size:"14"}}),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function rs(t){let e,n,r,s,o,i,a,c,p,f,w,k,x,b;a=new Pn({props:{style:"ghost",$$slots:{default:[ns]},$$scope:{ctx:t}}}),a.$on("click",t[4]);const P=t[3].body,T=l(P,t,t[5],es),E=t[3].footer,W=l(E,t,t[5],Zr);return{c(){e=v("div"),n=v("div"),r=v("div"),s=v("h2"),o=_(t[1]),i=y(),nt(a.$$.fragment),c=y(),p=v("div"),T&&T.c(),f=y(),w=v("div"),W&&W.c(),k=y(),x=v("div"),C(s,"class","sy-modal--title svelte-sr1ian"),C(r,"class","sy-modal--header svelte-sr1ian"),C(p,"class","sy-modal--body svelte-sr1ian"),C(w,"class","sy-modal--footer svelte-sr1ian"),C(n,"class","sy-modal--content svelte-sr1ian"),C(x,"class","sy-modal--backdrop svelte-sr1ian"),C(e,"class","sy-modal--container svelte-sr1ian"),S(e,"sy-modal--active",t[0])},m(t,l){m(t,e,l),g(e,n),g(n,r),g(r,s),g(s,o),g(r,i),rt(a,r,null),g(n,c),g(n,p),T&&T.m(p,null),g(n,f),g(n,w),W&&W.m(w,null),g(e,k),g(e,x),b=!0},p(t,[n]){(!b||2&n)&&z(o,t[1]);const r={};32&n&&(r.$$scope={dirty:n,ctx:t}),a.$set(r),T&&T.p&&(!b||32&n)&&d(T,P,t,t[5],b?h(P,t[5],n,ts):u(t[5]),es),W&&W.p&&(!b||32&n)&&d(W,E,t,t[5],b?h(E,t[5],n,Jr):u(t[5]),Zr),(!b||1&n)&&S(e,"sy-modal--active",t[0])},i(t){b||(J(a.$$.fragment,t),J(T,t),J(W,t),b=!0)},o(t){Z(a.$$.fragment,t),Z(T,t),Z(W,t),b=!1},d(t){t&&$(e),st(a),T&&T.d(t),W&&W.d(t)}}}function ss(t,e,n){let{$$slots:r={},$$scope:s}=e,{visible:o=!1}=e,{title:i=""}=e;const a=D();return t.$$set=t=>{"visible"in t&&n(0,o=t.visible),"title"in t&&n(1,i=t.title),"$$scope"in t&&n(5,s=t.$$scope)},[o,i,a,r,t=>{a("close",t)},s]}class os extends it{constructor(t){super(),ot(this,t,ss,rs,i,{visible:0,title:1})}}function is(t,e,n){const r=t.slice();return r[30]=e[n],r}function as(t){let e,n,r,s;return r=new Bt({props:{size:"20"}}),{c(){e=_(t[0]),n=_(" "),nt(r.$$.fragment)},m(t,o){m(t,e,o),m(t,n,o),rt(r,t,o),s=!0},p(t,n){(!s||1&n[0])&&z(e,t[0])},i(t){s||(J(r.$$.fragment,t),s=!0)},o(t){Z(r.$$.fragment,t),s=!1},d(t){t&&$(e),t&&$(n),st(r,t)}}}function ls(t){let e,n;return e=new Pn({props:{size:"large",style:"ghost",center:!0,$$slots:{default:[as]},$$scope:{ctx:t}}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};1&n[0]|4&n[1]&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function cs(t){let e,n,r,s;return n=new Pn({props:{style:"ghost",disabled:t[30].disabled,hover:t[30].hover,classes:["sy-tooltip--container"],$$slots:{default:[hs]},$$scope:{ctx:t}}}),n.$on("click",t[30].action),{c(){e=v("span"),nt(n.$$.fragment),r=y(),C(e,"class","bookmarks--header--action-item svelte-12dvz92")},m(t,o){m(t,e,o),rt(n,e,null),g(e,r),s=!0},p(t,e){const r={};4&e[1]&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i(t){s||(J(n.$$.fragment,t),s=!0)},o(t){Z(n.$$.fragment,t),s=!1},d(t){t&&$(e),st(n)}}}function hs(t){let e,n,r,s,o,i,a=t[30].tooltip+"";var l=t[30].icon;return l&&(e=P(l,{props:{size:"20"}})),{c(){e&&nt(e.$$.fragment),n=y(),r=v("div"),s=v("p"),o=_(a),C(r,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,a){e&&rt(e,t,a),m(t,n,a),m(t,r,a),g(r,s),g(s,o),i=!0},p(t,r){if(l!==(l=t[30].icon)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}l?(e=P(l,{props:{size:"20"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}},i(t){i||(e&&J(e.$$.fragment,t),i=!0)},o(t){e&&Z(e.$$.fragment,t),i=!1},d(t){e&&st(e,t),t&&$(n),t&&$(r)}}}function ds(t){let e,n,r=!t[30].exclude.includes(t[0]),s=r&&cs(t);return{c(){s&&s.c(),e=x()},m(t,r){s&&s.m(t,r),m(t,e,r),n=!0},p(t,n){1&n[0]&&(r=!t[30].exclude.includes(t[0])),r?s?(s.p(t,n),1&n[0]&&J(s,1)):(s=cs(t),s.c(),J(s,1),s.m(e.parentNode,e)):s&&(G(),Z(s,1,1,(()=>{s=null})),K())},i(t){n||(J(s),n=!0)},o(t){Z(s),n=!1},d(t){s&&s.d(t),t&&$(e)}}}function us(e){let n,r,s,o,i;return o=new Gn({props:{size:"large",placeholder:`ex. ${e[10]()}`,id:"create-new-list-input"}}),{c(){n=v("div"),r=v("p"),r.textContent="What would you like to call this list?",s=y(),nt(o.$$.fragment),C(n,"class","bookmarks-modal-content svelte-12dvz92"),C(n,"slot","body")},m(t,e){m(t,n,e),g(n,r),g(n,s),rt(o,n,null),i=!0},p:t,i(t){i||(J(o.$$.fragment,t),i=!0)},o(t){Z(o.$$.fragment,t),i=!1},d(t){t&&$(n),st(o)}}}function ps(t){let e;return{c(){e=_("Cancel")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function fs(t){let e;return{c(){e=_("Create")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function gs(t){let e,n,r,s;return e=new Pn({props:{size:"large",$$slots:{default:[ps]},$$scope:{ctx:t}}}),e.$on("click",t[11]),r=new Pn({props:{size:"large",color:"green",disabled:t[6],$$slots:{default:[fs]},$$scope:{ctx:t}}}),r.$on("click",t[12]),{c(){nt(e.$$.fragment),n=_("\n\t\t\t \n\t\t\t"),nt(r.$$.fragment)},m(t,o){rt(e,t,o),m(t,n,o),rt(r,t,o),s=!0},p(t,n){const s={};4&n[1]&&(s.$$scope={dirty:n,ctx:t}),e.$set(s);const o={};64&n[0]&&(o.disabled=t[6]),4&n[1]&&(o.$$scope={dirty:n,ctx:t}),r.$set(o)},i(t){s||(J(e.$$.fragment,t),J(r.$$.fragment,t),s=!0)},o(t){Z(e.$$.fragment,t),Z(r.$$.fragment,t),s=!1},d(t){st(e,t),t&&$(n),st(r,t)}}}function ms(t){let e,n,r,s,o,i,a,l,c,h,d,u,p,f,k;r=new jn({props:{values:t[3],$$slots:{default:[ls]},$$scope:{ctx:t}}}),r.$on("selection",t[9]);let _=t[14],x=[];for(let e=0;e<_.length;e+=1)x[e]=ds(is(t,_,e));const b=t=>Z(x[t],1,1,(()=>{x[t]=null}));return c=new lr({props:{style:"preview",values:t[4],highlight:t[7],filterable:!0}}),c.$on("selection",t[13]),u=new Qr({props:{word:t[1],lists:t[2]}}),f=new os({props:{title:"Create List",visible:t[5],$$slots:{footer:[gs],body:[us]},$$scope:{ctx:t}}}),f.$on("close",t[11]),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),s=y(),o=v("div");for(let t=0;t{window.bookmarkManager.getLists().then((e=>{n(2,a=e),n(3,l=[...e.map((t=>({text:t,id:t,component:An}))).sort(((t,e)=>t.text.localeCompare(e.text))),{component:Kr},{text:"Create New",id:"create-new",component:qn,icon:$e,color:"blue",hover:"green"}]),t()})).catch((t=>{Ke("There was an error fetching word lists. Check the logs for more details.",t)}))};c((()=>{}));let h=[],d=[];const u=t=>{window.bookmarkManager.getListContent(i).then((e=>{var r;h=e,n(4,(r=e,n(7,v=!1),d=r.map((t=>({headline:t.traditional===t.simplified?t.simplified:`${t.simplified} (${t.traditional})`,subtitle:t.pinyin_marks,content:t.english.join("; "),active:!1}))))),t()})).catch((t=>{Ke("There was an error fetching the word list content. Check the logs for more details.",t)}))};u((()=>{}));const p=t=>{n(0,i=t),u((()=>{}))},f=["HSK 1","Week 3 Vocab","Internet Slang","Idioms","Chapter 7"],g=["create-new","Bookmarks"];let m=!1,$=!1;const w=()=>{n(5,m=!1),document.getElementById("create-new-list-input").value="",n(6,$=!1)};let v=!0,k=!1;return[i,o,a,l,d,m,$,v,s,t=>{"create-new"!==t.detail?p(t.detail):n(5,m=!0)},()=>f.slice(Math.random()*f.length)[0],w,()=>{n(6,$=!0);const t=document.getElementById("create-new-list-input").value.trim();if(!t||g.includes(t))return Ke(`Cannot create new list with name ${t}.`),void w();window.bookmarkManager.createList(t).then((()=>{c((()=>{w()}))})).catch((e=>{Ke(`There was an unexpected error while attempting to create the list ${t}. Check the log for more details.`,e),w()}))},t=>{n(1,o=h[t.detail.index]),n(7,v=!0)},[{icon:Gt,action:()=>{r("import_list_data").then((t=>{if(t){const e=((t,e)=>{let n=t,r=2;for(;e.includes(n)&&r<=100;)n=`${t} ${r}`,r++;return n})(t.meta.name,a);window.bookmarkManager.createList(e).then((()=>{const n=t.entries.reduceRight(((t,e)=>t.find((t=>t.hash===e.hash))?t:[...t,e]),[]).map((t=>window.bookmarkManager.addToList(e,t)));return Promise.all(n)})).then((()=>{c((()=>{}))})).catch((t=>{Ke("There was an error importing the list. Check the log for more details.",t)}))}})).catch((t=>{Ke("There was an error importing the list. Check the log for more details.",t)}))},tooltip:"Import",exclude:[],disabled:!1},{icon:Be,action:()=>{r("export_list_data",{name:i,data:h}).then((()=>{})).catch((t=>{Ke("There was an error exporting your list. Check the log for more details.",t)}))},tooltip:"Export",exclude:[],disabled:!1},{icon:Me,action:()=>{k=!0,window.__TAURI__.dialog.ask(`Are you sure you want to delete ${i}?`,"Delete List").then((t=>{t?window.bookmarkManager.deleteList(i).then((()=>{p("Bookmarks"),c((()=>{k=!1}))})).catch((t=>{Ke(`There was an unexpected error deleting the list ${i}. Please check the log for more details.`,t),k=!1})):k=!1})).catch((t=>{Ke(`There was an unexpected error while attempting to delete the list ${i}. Check the log for more details.`,t),k=!1}))},tooltip:"Delete",exclude:["Bookmarks"],disabled:k,hover:"red"}]]}class ws extends it{constructor(t){super(),ot(this,t,$s,ms,i,{},null,[-1,-1])}}function vs(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${ks}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let ks="CHAT";class _s extends it{constructor(t){super(),ot(this,t,null,vs,i,{})}}function ys(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${xs}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let xs="HELP";class bs extends it{constructor(t){super(),ot(this,t,null,ys,i,{})}}function Cs(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${zs}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let zs="NOT FOUND";class Ss extends it{constructor(t){super(),ot(this,t,null,Cs,i,{})}}function Ps(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${Ts}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let Ts="READER";class Es extends it{constructor(t){super(),ot(this,t,null,Ps,i,{})}}function Ws(e){let n,r;return n=new Nt({props:{size:"20"}}),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function Ms(e){let n,r;return n=new Ht({props:{size:"20"}}),{c(){nt(n.$$.fragment)},m(t,e){rt(n,t,e),r=!0},p:t,i(t){r||(J(n.$$.fragment,t),r=!0)},o(t){Z(n.$$.fragment,t),r=!1},d(t){st(n,t)}}}function Ds(t){let e;return{c(){e=_(t[4])},m(t,n){m(t,e,n)},p(t,n){16&n&&z(e,t[4])},d(t){t&&$(e)}}}function As(t){let e,n,r,s,o,i,a,l,c,h,d,u,p,f,w,k,_,x;return r=new Pn({props:{style:"ghost",size:"large",disabled:null==t[7][t[0]-1],$$slots:{default:[Ws]},$$scope:{ctx:t}}}),r.$on("click",t[9]),o=new Pn({props:{style:"ghost",size:"large",disabled:null==t[7][t[0]+1],$$slots:{default:[Ms]},$$scope:{ctx:t}}}),o.$on("click",t[10]),a=new Pn({props:{style:"ghost",size:"large",$$slots:{default:[Ds]},$$scope:{ctx:t}}}),a.$on("click",t[15]),c=new Gn({props:{spellcheck:"false",style:"ghost",size:"large",placeholder:"Search...",id:"search",transparency:Rs}}),c.$on("change",t[16]),c.$on("keyup",t[17]),c.$on("enter",t[13]),f=new lr({props:{style:"preview",values:t[1],highlight:t[5]}}),f.$on("selection",t[12]),_=new Qr({props:{word:t[3],lists:t[2]}}),_.$on("link",t[14]),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),s=y(),nt(o.$$.fragment),i=y(),nt(a.$$.fragment),l=y(),nt(c.$$.fragment),d=y(),u=v("div"),p=v("div"),nt(f.$$.fragment),w=y(),k=v("div"),nt(_.$$.fragment),C(n,"class","search-bar-container svelte-sv63r7"),C(n,"data-testid","search-bar-container"),C(n,"data-tauri-drag-region",h=!!t[6]||void 0),S(n,"search-bar-container--transparency",Rs),C(p,"class","search-results svelte-sv63r7"),C(p,"data-elastic",""),C(k,"class","dictionary-content svelte-sv63r7"),C(u,"class","search-content-container svelte-sv63r7"),C(e,"class","search-page-container svelte-sv63r7")},m(t,h){m(t,e,h),g(e,n),rt(r,n,null),g(n,s),rt(o,n,null),g(n,i),rt(a,n,null),g(n,l),rt(c,n,null),g(e,d),g(e,u),g(u,p),rt(f,p,null),g(u,w),g(u,k),rt(_,k,null),x=!0},p(t,[e]){const s={};1&e&&(s.disabled=null==t[7][t[0]-1]),33554432&e&&(s.$$scope={dirty:e,ctx:t}),r.$set(s);const i={};1&e&&(i.disabled=null==t[7][t[0]+1]),33554432&e&&(i.$$scope={dirty:e,ctx:t}),o.$set(i);const l={};33554448&e&&(l.$$scope={dirty:e,ctx:t}),a.$set(l),(!x||64&e&&h!==(h=!!t[6]||void 0))&&C(n,"data-tauri-drag-region",h);const c={};2&e&&(c.values=t[1]),32&e&&(c.highlight=t[5]),f.$set(c);const d={};8&e&&(d.word=t[3]),4&e&&(d.lists=t[2]),_.$set(d)},i(t){x||(J(r.$$.fragment,t),J(o.$$.fragment,t),J(a.$$.fragment,t),J(c.$$.fragment,t),J(f.$$.fragment,t),J(_.$$.fragment,t),x=!0)},o(t){Z(r.$$.fragment,t),Z(o.$$.fragment,t),Z(a.$$.fragment,t),Z(c.$$.fragment,t),Z(f.$$.fragment,t),Z(_.$$.fragment,t),x=!1},d(t){t&&$(e),st(r),st(o),st(a),st(c),st(f),st(_)}}}let Ls,Rs=!1;function Is(t,e,n){let r,s=-1,o=[],i=[],a=[],l=[],c="EN",h=!0,d=!1;window.__TAURI__.os.platform().then((t=>{n(6,d="darwin"===t)}));const u=window.__TAURI__.invoke,p=["EN","PY","ZH"],f=(t,e)=>{(t.length||e)&&(n(5,h=!1),a=t,n(1,i=t.map((t=>({headline:t.traditional===t.simplified?t.simplified:`${t.simplified} (${t.traditional})`,subtitle:t.pinyin_marks,content:t.english.join("; "),active:!1})))))},g=(t,e,r)=>{t?(u("classify",{text:t}).then((t=>{n(4,c=t)})).catch((t=>{Ke("There was an error classifying the language of your query.",t)})),u("query",{text:t}).then((t=>{f(t,e),null!=r&&q().then((()=>{w(r)}))})).catch((t=>{Ke("There was an error searching the dictionary for your query.",t)}))):f([],!0)},m=(t,e)=>{n(3,r=t),n(5,h=e)},$=()=>{const t=p.indexOf(c)+1;n(4,c=p[t{try{switch(e){case"EN":u("query_by_english",{text:t}).then((t=>f(t,!0)));break;case"PY":u("query_by_pinyin",{text:t}).then((t=>f(t,!0)));break;case"ZH":u("query_by_chinese",{text:t}).then((t=>f(t,!0)))}}catch(t){Ke("There was an error searching the dictionary for your query.",t)}})(document.getElementById("search").value,c)},w=t=>{try{document.getElementsByClassName("sy-list-preview-item-container")[t].click()}catch(t){}};window.bookmarkManager.getLists().then((t=>{n(2,l=t)})).catch((t=>{Ke("There was an error fetching word lists. Check the log for more details.",t)}));return[s,i,l,r,c,h,d,o,g,t=>{n(0,s-=1),m(o[s],!1)},t=>{n(0,s+=1),m(o[s],!1)},$,t=>{const e=a[t.detail.index];m(e,!0);let r=o.map((t=>t.word_id)).indexOf(e.word_id);r>=0&&(o.splice(r,1),n(0,s-=1)),o.push(e),n(0,s+=1)},t=>{w(0)},t=>{const e=t.detail;document.getElementById("search").value=e,g(e,!0,0)},()=>$(),t=>g(t.detail,!0),t=>g(t.detail,!1)]}class Bs extends it{constructor(t){super(),ot(this,t,Is,As,i,{})}}function js(t,e,n){const r=t.slice();return r[7]=e[n],r}function Os(t){let e,n,r,s,o,i,a,l,c=t[7].label+"";function h(){return t[2](t[7])}return{c(){e=v("div"),n=v("label"),r=_(c),s=y(),o=v("input"),i=y(),C(n,"for",`tone-${t[7].index+1}`),C(o,"type","color"),o.value=t[7].color,C(o,"id",`tone-${t[7].index+1}`),C(o,"name",`tone-${t[7].index+1}`),C(e,"class","tone-color-picker--tone svelte-1wk3p9z")},m(t,c){m(t,e,c),g(e,n),g(n,r),g(e,s),g(e,o),g(e,i),a||(l=b(o,"change",h),a=!0)},p(e,n){t=e},d(t){t&&$(e),a=!1,l()}}}function Ns(e){let n,r=e[0],s=[];for(let t=0;t{return(e=t,"--"==e.substring(0,2)?n.getPropertyValue(e):e).trim();var e})),s=[{label:"First Tone",color:r[0],index:0},{label:"Second Tone",color:r[1],index:1},{label:"Third Tone",color:r[2],index:2},{label:"Fourth Tone",color:r[3],index:3},{label:"No Tone",color:r[4],index:4}],o=t=>{r[t]=document.getElementById(`tone-${t+1}`).value,e("change",{hasCustomColors:!0,colors:r})};return[s,o,t=>o(t.index)]}class Fs extends it{constructor(t){super(),ot(this,t,qs,Ns,i,{})}}function Hs(e){let n,r,s,o,i,a;return{c(){n=v("div"),r=v("span"),r.textContent="You are up to date",s=y(),o=v("span"),i=_("Version "),a=_(e[0]),C(r,"class","updater-checker--status--title svelte-19yodez"),C(o,"class","update-checker--status--subtitle svelte-19yodez"),C(n,"class","update-checker--up-to-date update-checker--status svelte-19yodez")},m(t,e){m(t,n,e),g(n,r),g(n,s),g(n,o),g(o,i),g(o,a)},p(t,e){1&e&&z(a,t[0])},i:t,o:t,d(t){t&&$(n)}}}function Us(t){let e,n,r,s,o,i,a,l,c,h,d,u,p;return u=new Pn({props:{color:"green",size:"large",disabled:t[6],$$slots:{default:[Xs]},$$scope:{ctx:t}}}),u.$on("click",t[10]),{c(){e=v("div"),n=v("span"),n.textContent="Update available",r=y(),s=v("span"),o=_("Version "),i=_(t[1]),a=v("br"),l=_("\n\t\t\t\tRelease Notes: "),c=_(t[2]),h=y(),d=v("span"),nt(u.$$.fragment),C(n,"class","updater-checker--status--title svelte-19yodez"),C(s,"class","update-checker--status--subtitle svelte-19yodez"),C(d,"class","update-checker--update-button svelte-19yodez"),C(e,"class","update-checker--status update-checker--update-available svelte-19yodez")},m(t,f){m(t,e,f),g(e,n),g(e,r),g(e,s),g(s,o),g(s,i),g(s,a),g(s,l),g(s,c),g(e,h),g(e,d),rt(u,d,null),p=!0},p(t,e){(!p||2&e)&&z(i,t[1]),(!p||4&e)&&z(c,t[2]);const n={};64&e&&(n.disabled=t[6]),4160&e&&(n.$$scope={dirty:e,ctx:t}),u.$set(n)},i(t){p||(J(u.$$.fragment,t),p=!0)},o(t){Z(u.$$.fragment,t),p=!1},d(t){t&&$(e),st(u)}}}function Vs(t){let e,n,r,s;const o=[Ks,Gs],i=[];function a(t,e){return t[5]?0:1}return e=a(t),n=i[e]=o[e](t),{c(){n.c(),r=x()},m(t,n){i[e].m(t,n),m(t,r,n),s=!0},p(t,s){let l=e;e=a(t),e===l?i[e].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),n=i[e],n?n.p(t,s):(n=i[e]=o[e](t),n.c()),J(n,1),n.m(r.parentNode,r))},i(t){s||(J(n),s=!0)},o(t){Z(n),s=!1},d(t){i[e].d(t),t&&$(r)}}}function Ys(t){let e;return{c(){e=_("Updating...")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function Qs(t){let e;return{c(){e=_("Update")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function Xs(t){let e;function n(t,e){return t[6]?Ys:Qs}let r=n(t),s=r(t);return{c(){s.c(),e=x()},m(t,n){s.m(t,n),m(t,e,n)},p(t,o){r!==(r=n(t))&&(s.d(1),s=r(t),s&&(s.c(),s.m(e.parentNode,e)))},d(t){s.d(t),t&&$(e)}}}function Gs(t){let e,n;return e=new Pn({props:{size:"large",$$slots:{default:[Js]},$$scope:{ctx:t}}}),e.$on("click",t[9]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Ks(t){let e,n;return e=new Pn({props:{disabled:!0,size:"large",$$slots:{default:[Zs]},$$scope:{ctx:t}}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};4096&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Js(t){let e;return{c(){e=_("Check for updates")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function Zs(t){let e;return{c(){e=_("Checking for updates...")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function to(t){let e,n,r,s;const o=[Vs,Us,Hs],i=[];function a(t,e){return t[3]?t[4]?1:2:0}return n=a(t),r=i[n]=o[n](t),{c(){e=v("div"),r.c(),C(e,"class","update-checker svelte-19yodez")},m(t,r){m(t,e,r),i[n].m(e,null),s=!0},p(t,[s]){let l=n;n=a(t),n===l?i[n].p(t,s):(G(),Z(i[l],1,1,(()=>{i[l]=null})),K(),r=i[n],r?r.p(t,s):(r=i[n]=o[n](t),r.c()),J(r,1),r.m(e,null))},i(t){s||(J(r),s=!0)},o(t){Z(r),s=!1},d(t){t&&$(e),i[n].d()}}}function eo(t,e,n){let r=window.version||"",s=window.updateVersion||"",o=window.updateReleaseNotes||"",i=window.updateStatusAvailable||!1,a=window.updateAvailable||!1,l=!1,c=!1;window.version||window.__TAURI__.app.getVersion().then((t=>{n(0,r=t),window.version=t}));const h=()=>{n(5,l=!1),n(6,c=!1),n(4,a=!1),n(3,i=!1),n(1,s=""),n(2,o=""),window.updateAvailable=!1,window.updateStatusAvailable=!1,window.updateVersion="",window.updateReleaseNotes=""},d=()=>{n(5,l=!0),n(6,c=!1),window.__TAURI__.updater.checkUpdate().then((t=>{t.shouldUpdate?(n(1,s=t.manifest.version),n(2,o=t.manifest.body),n(3,i=!0),n(4,a=!0),n(5,l=!1),window.updateVersion=t.manifest.version,window.updateReleaseNotes=t.manifest.body,window.updateStatusAvailable=!0,window.updateAvailable=!0):(n(3,i=!0),n(5,l=!1),n(4,a=!1),window.updateAvailable=!1,window.updateStatusAvailable=!0)})).catch((t=>{h(),Ke("There was an error checking for updates. Please try again later. Check the log for more details.",t)}))},u=()=>{n(6,c=!0),window.__TAURI__.updater.installUpdate().then((()=>{window.__TAURI__.process.relaunch()})).catch((t=>{h(),Ke("There was an error fetching the update. Please try again later. Check the log for more details.",t)}))};return[r,s,o,i,a,l,c,d,u,()=>d(),()=>u()]}class no extends it{constructor(t){super(),ot(this,t,eo,to,i,{})}}const ro=new Uint8Array(16);function so(){if(!Ls&&(Ls="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ls))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ls(ro)}const oo=[];for(let t=0;t<256;++t)oo.push((t+256).toString(16).slice(1));var io={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ao(t,e,n){if(io.randomUUID&&!e&&!t)return io.randomUUID();const r=(t=t||{}).random||(t.rng||so)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=r[t];return e}return function(t,e=0){return oo[t[e+0]]+oo[t[e+1]]+oo[t[e+2]]+oo[t[e+3]]+"-"+oo[t[e+4]]+oo[t[e+5]]+"-"+oo[t[e+6]]+oo[t[e+7]]+"-"+oo[t[e+8]]+oo[t[e+9]]+"-"+oo[t[e+10]]+oo[t[e+11]]+oo[t[e+12]]+oo[t[e+13]]+oo[t[e+14]]+oo[t[e+15]]}(r)}function lo(e){let n,r,s,o,i,a,l;return{c(){n=v("span"),r=v("input"),s=y(),o=v("label"),i=_("Toggle"),C(r,"type","checkbox"),C(r,"id",e[1]),C(r,"class","sy-toggle svelte-ssxm77"),r.value=e[2],r.checked=e[0],C(o,"for",e[1]),C(o,"class","sy-toggle--label svelte-ssxm77"),C(n,"class","sy-toggle--container svelte-ssxm77")},m(t,c){m(t,n,c),g(n,r),g(n,s),g(n,o),g(o,i),a||(l=b(r,"change",e[4]),a=!0)},p(t,[e]){2&e&&C(r,"id",t[1]),4&e&&(r.value=t[2]),1&e&&(r.checked=t[0]),2&e&&C(o,"for",t[1])},i:t,o:t,d(t){t&&$(n),a=!1,l()}}}function co(t,e,n){let{checked:r=!1}=e,{id:s=ao()}=e,{value:o}=e;const i=D();return t.$$set=t=>{"checked"in t&&n(0,r=t.checked),"id"in t&&n(1,s=t.id),"value"in t&&n(2,o=t.value)},[r,s,o,i,t=>i("change",t.srcElement.checked)]}class ho extends it{constructor(t){super(),ot(this,t,co,lo,i,{checked:0,id:1,value:2})}}function uo(t,e,n){const r=t.slice();return r[2]=e[n],r}function po(t){let n,r,s,o,i,a,l,c=t[2].label+"";const h=[t[2].props];var d=t[2].component;function u(t){let n={};for(let t=0;t{st(t,1)})),K()}d?(i=P(d,u()),i.$on("change",t[2].handler),nt(i.$$.fragment),J(i.$$.fragment,1),rt(i,n,a)):i=null}else d&&i.$set(r)},i(t){l||(i&&J(i.$$.fragment,t),l=!0)},o(t){i&&Z(i.$$.fragment,t),l=!1},d(t){t&&$(n),i&&st(i)}}}function fo(t){let e,n,r,s,o,i,a,l=t[1],c=[];for(let e=0;eZ(c[t],1,1,(()=>{c[t]=null}));return{c(){e=v("div"),n=v("div"),r=v("h1"),s=_("Settings"),o=y(),i=v("div");for(let t=0;twindow.preferenceManager.set("beta",t.detail),component:ho,props:{checked:window.preferenceManager.get("beta")}},{label:"Updates",centerLabel:!1,component:no,props:{},handler:()=>{}},{label:"Tone Colors",centerLabel:!1,handler:t=>window.preferenceManager.set("toneColors",t.detail),component:Fs,props:{}}]]}class mo extends it{constructor(t){super(),ot(this,t,go,fo,i,{})}}function $o(t,e,n){const r=t.slice();return r[4]=e[n],r}function wo(t){let e,n,r,s,o,i,a,l=t[4].tooltip+"";var c=t[4].icon;return c&&(e=P(c,{props:{size:"18"}})),{c(){e&&nt(e.$$.fragment),n=y(),r=v("div"),s=v("p"),o=_(l),i=y(),C(r,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,l){e&&rt(e,t,l),m(t,n,l),m(t,r,l),g(r,s),g(s,o),m(t,i,l),a=!0},p(t,r){if(c!==(c=t[4].icon)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}c?(e=P(c,{props:{size:"18"}}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}},i(t){a||(e&&J(e.$$.fragment,t),a=!0)},o(t){e&&Z(e.$$.fragment,t),a=!1},d(t){e&&st(e,t),t&&$(n),t&&$(r),t&&$(i)}}}function vo(t){let e,n;return e=new Pn({props:{center:!0,size:"large",classes:["sy-tooltip--container"],$$slots:{default:[wo]},$$scope:{ctx:t}}}),e.$on("click",t[4].action),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};128&n&&(r.$$scope={dirty:n,ctx:t}),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ko(t){let e,n,r,s,o,i,a=t[1],l=[];for(let e=0;eZ(l[t],1,1,(()=>{l[t]=null}));return{c(){e=v("div"),n=v("span"),r=_(t[0]),s=y(),o=v("span");for(let t=0;t{r&&s("selection",r)},tooltip:`Flashcards for ${r}`}];return t.$$set=t=>{"value"in t&&n(0,r=t.value)},[r,o]}class yo extends it{constructor(t){super(),ot(this,t,_o,ko,i,{value:0})}}function xo(e){let n;return{c(){n=v("div"),n.innerHTML="To take a quiz or study flashcards, add vocab words to your\n\t\t\t\t\tlists.",C(n,"class","study--empty svelte-1hd52ir")},m(t,e){m(t,n,e)},p:t,i:t,o:t,d(t){t&&$(n)}}}function bo(t){let e,n;return e=new lr({props:{values:t[0],component:yo}}),e.$on("selection",t[2]),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(t,n){const r={};1&n&&(r.values=t[0]),e.$set(r)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Co(t){let e,n,r,s,o,i,a,l,c;const h=[bo,xo],d=[];function u(t,e){return t[0].length?0:1}return a=u(t),l=d[a]=h[a](t),{c(){e=v("div"),n=v("div"),r=v("h1"),s=_("Study"),o=y(),i=v("div"),l.c(),C(r,"data-tauri-drag-region",!!t[1]||void 0),C(n,"class","study--title svelte-1hd52ir"),C(n,"data-tauri-drag-region",!!t[1]||void 0),C(i,"class","study--content"),C(e,"class","study--container svelte-1hd52ir")},m(t,l){m(t,e,l),g(e,n),g(n,r),g(r,s),g(e,o),g(e,i),d[a].m(i,null),c=!0},p(t,[e]){let n=a;a=u(t),a===n?d[a].p(t,e):(G(),Z(d[n],1,1,(()=>{d[n]=null})),K(),l=d[a],l?l.p(t,e):(l=d[a]=h[a](t),l.c()),J(l,1),l.m(i,null))},i(t){c||(J(l),c=!0)},o(t){Z(l),c=!1},d(t){t&&$(e),d[a].d()}}}function zo(t,e,n){const r="darwin"===window.platform;let s=[],o=[],i=[];window.bookmarkManager.getLists().then((t=>{n(3,s=t.sort(((t,e)=>t.localeCompare(e))))})).catch((t=>{Ke("There was an error fetching word lists. Check the logs for more details.",t)})),window.bookmarkManager.getEmptyLists().then((t=>{n(4,o=t)})).catch((t=>{Ke("There was an error fetching the empty lists. Check the log for more details.",t)}));return t.$$.update=()=>{24&t.$$.dirty&&n(0,i=s.filter((t=>!o.includes(t))))},[i,r,t=>{const e=`#/study/flashcards?list=${t.detail}`;document.location.href=e},s,o]}class So extends it{constructor(t){super(),ot(this,t,zo,Co,i,{})}}function Po(e){let n,r;return{c(){n=v("center"),r=v("h1"),r.textContent=`${To}`},m(t,e){m(t,n,e),g(n,r)},p:t,i:t,o:t,d(t){t&&$(n)}}}let To="TOOLS";class Eo extends it{constructor(t){super(),ot(this,t,null,Po,i,{})}}function Wo(t,e,n){const r=t.slice();return r[12]=e[n],r}function Mo(t,e,n){const r=t.slice();return r[12]=e[n],r}function Do(t){let e,n,r,s,o,i=t[12].label+"";var a=t[12].icon;return a&&(e=P(a,{})),{c(){e&&nt(e.$$.fragment),n=_("\n  \n "),r=_(i),s=y()},m(t,i){e&&rt(e,t,i),m(t,n,i),m(t,r,i),m(t,s,i),o=!0},p(t,s){if(32&s&&a!==(a=t[12].icon)){if(e){G();const t=e;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}a?(e=P(a,{}),nt(e.$$.fragment),J(e.$$.fragment,1),rt(e,n.parentNode,n)):e=null}(!o||32&s)&&i!==(i=t[12].label+"")&&z(r,i)},i(t){o||(e&&J(e.$$.fragment,t),o=!0)},o(t){e&&Z(e.$$.fragment,t),o=!1},d(t){e&&st(e,t),t&&$(n),t&&$(r),t&&$(s)}}}function Ao(t){let e,n;return e=new Pn({props:{disabled:t[12].disabled,style:"ghost",center:!0,$$slots:{default:[Do]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[12].action)&&t[12].action.apply(this,arguments)})),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(n,r){t=n;const s={};32&r&&(s.disabled=t[12].disabled),131104&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Lo(t){let e,n,r,s,o,i=t[12].label+"";var a=t[12].icon;return a&&(r=P(a,{})),{c(){e=_(i),n=_("\n  \n "),r&&nt(r.$$.fragment),s=y()},m(t,i){m(t,e,i),m(t,n,i),r&&rt(r,t,i),m(t,s,i),o=!0},p(t,n){if((!o||64&n)&&i!==(i=t[12].label+"")&&z(e,i),64&n&&a!==(a=t[12].icon)){if(r){G();const t=r;Z(t.$$.fragment,1,0,(()=>{st(t,1)})),K()}a?(r=P(a,{}),nt(r.$$.fragment),J(r.$$.fragment,1),rt(r,s.parentNode,s)):r=null}},i(t){o||(r&&J(r.$$.fragment,t),o=!0)},o(t){r&&Z(r.$$.fragment,t),o=!1},d(t){t&&$(e),t&&$(n),r&&st(r,t),t&&$(s)}}}function Ro(t){let e,n;return e=new Pn({props:{disabled:t[12].disabled,style:"ghost",center:!0,$$slots:{default:[Lo]},$$scope:{ctx:t}}}),e.$on("click",(function(){o(t[12].action)&&t[12].action.apply(this,arguments)})),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},p(n,r){t=n;const s={};64&r&&(s.disabled=t[12].disabled),131136&r&&(s.$$scope={dirty:r,ctx:t}),e.$set(s)},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function Io(e){let n;function r(t,e){return t[2].length>0?Oo:jo}let s=r(e),o=s(e);return{c(){n=v("div"),o.c(),C(n,"class","flashcard--front svelte-1mngjuk")},m(t,e){m(t,n,e),o.m(n,null)},p(t,e){s===(s=r(t))&&o?o.p(t,e):(o.d(1),o=s(t),o&&(o.c(),o.m(n,null)))},i:t,o:t,d(t){t&&$(n),o.d()}}}function Bo(t){let e,n,r,s;return r=new Qr({props:{word:t[2][t[0]],backgroundColor:"white",lists:t[4]}}),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),C(n,"class","flashcard--back--container svelte-1mngjuk"),C(e,"class","flashcard--back svelte-1mngjuk")},m(t,o){m(t,e,o),g(e,n),rt(r,n,null),s=!0},p(t,e){const n={};5&e&&(n.word=t[2][t[0]]),16&e&&(n.lists=t[4]),r.$set(n)},i(t){s||(J(r.$$.fragment,t),s=!0)},o(t){Z(r.$$.fragment,t),s=!1},d(t){t&&$(e),st(r)}}}function jo(t){let e,n,r=(t[3]?Fo:qo)+"";return{c(){e=v("h1"),n=_(r),C(e,"class","svelte-1mngjuk")},m(t,r){m(t,e,r),g(e,n)},p(t,e){8&e&&r!==(r=(t[3]?Fo:qo)+"")&&z(n,r)},d(t){t&&$(e)}}}function Oo(t){let e,n,r,s,o,i=t[2][t[0]].simplified+"",a=t[2][t[0]].traditional+"";return{c(){e=v("h1"),n=_(i),r=_(" ("),s=_(a),o=_(")"),C(e,"class","svelte-1mngjuk")},m(t,i){m(t,e,i),g(e,n),g(e,r),g(e,s),g(e,o)},p(t,e){5&e&&i!==(i=t[2][t[0]].simplified+"")&&z(n,i),5&e&&a!==(a=t[2][t[0]].traditional+"")&&z(s,a)},d(t){t&&$(e)}}}function No(t){let e,n,r,s,o,i,a,l,c,h,d=t[5],u=[];for(let e=0;eZ(u[t],1,1,(()=>{u[t]=null}));let f=t[6],k=[];for(let e=0;eZ(k[t],1,1,(()=>{k[t]=null})),x=[Bo,Io],b=[];function z(t,e){return t[1]?0:1}return l=z(t),c=b[l]=x[l](t),{c(){e=v("div"),n=v("div"),r=v("div");for(let t=0;t{b[n]=null})),K(),c=b[l],c?c.p(t,e):(c=b[l]=x[l](t),c.c()),J(c,1),c.m(a,null))},i(t){if(!h){for(let t=0;tn(9,r=t),t.$$.on_destroy.push(a(s,o));let i=!0;const l="darwin"===window.platform;let c,h=0,d=!1,u=[],p=new URLSearchParams(r);c=p.get("list");let f=[];window.bookmarkManager.getLists().then((t=>{n(4,f=t)})).catch((t=>{Ke("There was an error fetching word lists. Check the log for more details.",t)}));let g=[{icon:Nt,label:"Back",disabled:!1,action:()=>{window.history.back()}},{icon:xt,label:"Previous",disabled:0===h,action:()=>{n(0,h-=1)}}],m=[{icon:xe,label:"Flip",disabled:!1,action:()=>{n(1,d=!d)}},{icon:zt,label:"Next",disabled:h===u.length-1,action:()=>{n(0,h+=1)}}];return t.$$.update=()=>{1&t.$$.dirty&&n(5,g[1].disabled=0===h,g),5&t.$$.dirty&&n(6,m[1].disabled=h===u.length-1,m),1&t.$$.dirty&&n(1,d=!1),2&t.$$.dirty&&n(6,m[0].icon=d?ke:xe,m)},window.bookmarkManager.getListContent(c).then((t=>{n(2,u=t),n(3,i=!1)})).catch((t=>{Ke("There was an error fetching list content. Check the log for more details.",t)})),[h,d,u,i,f,g,m,l]}class Uo extends it{constructor(t){super(),ot(this,t,Ho,No,i,{})}}function Vo(e){let n,r,s,o,i,a,l;return s=new Cn({}),a=new kt({props:{routes:e[0]}}),{c(){n=v("div"),r=v("div"),nt(s.$$.fragment),o=y(),i=v("div"),nt(a.$$.fragment),C(r,"class","navigation-container svelte-1izwdrv"),C(i,"class","content-container svelte-1izwdrv"),C(n,"class","app-container svelte-1izwdrv")},m(t,e){m(t,n,e),g(n,r),rt(s,r,null),g(n,o),g(n,i),rt(a,i,null),l=!0},p:t,i(t){l||(J(s.$$.fragment,t),J(a.$$.fragment,t),l=!0)},o(t){Z(s.$$.fragment,t),Z(a.$$.fragment,t),l=!1},d(t){t&&$(n),st(s),st(a)}}}function Yo(t){mn();return[{"/":Bs,"/read":Es,"/bookmarks":ws,"/study":So,"/study/flashcards":Uo,"/tools":Eo,"/help":bs,"/settings":mo,"/chat":_s,"*":Ss}]}class Qo extends it{constructor(t){super(),ot(this,t,Yo,Vo,i,{})}}var Xo;const Go="undefined"==typeof window?global:window,Ko=Go.performance&&(()=>Go.performance.now())||(()=>Date.now()),Jo=Go.requestAnimationFrame||(t=>setTimeout((()=>t(Ko())),1e3/60)),Zo=Go.cancelAnimationFrame||clearTimeout;function ti(t){return t[t.length-1]}const ei=(t,e)=>t<0?e+t:t;function ni(t,e){const n={...t};for(const r in e){const s=t[r],o=e[r];s!==o&&(s&&o&&"object"==typeof s&&"object"==typeof o&&!Array.isArray(o)?n[r]=ni(s,o):n[r]=o)}return n}let ri=0;function si(){return ri++,ri}function oi(t){return t.reduce(((t,e)=>e+t),0)/t.length}function ii(t){const e=t.toUpperCase().trim();if(/^#([A-F0-9]{3}){1,2}$/.test(e)){let t=e.substring(1).split("");3===t.length&&(t=[t[0],t[0],t[1],t[1],t[2],t[2]]);const n=`${t.join("")}`;return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}const n=e.match(/^RGBA?\((\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d*\.?\d+))?\)$/);if(n)return{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10),a:parseFloat(n[4]||1,10)};throw new Error(`Invalid color: ${t}`)}function ai(t,e){const n={};for(let r=0;r0||ci.indexOf("Trident/")>0||ci.indexOf("Edge/")>0,di=()=>{};class ui{constructor(t,e,n=di){this._mutationChains=[],this._onStateChange=n,this.state={options:{drawingFadeDuration:e.drawingFadeDuration,drawingWidth:e.drawingWidth,drawingColor:ii(e.drawingColor),strokeColor:ii(e.strokeColor),outlineColor:ii(e.outlineColor),radicalColor:ii(e.radicalColor||e.strokeColor),highlightColor:ii(e.highlightColor)},character:{main:{opacity:e.showCharacter?1:0,strokes:{}},outline:{opacity:e.showOutline?1:0,strokes:{}},highlight:{opacity:1,strokes:{}}},userStrokes:null};for(let e=0;et.scope));return this.cancelMutations(n),new Promise((r=>{const s={_isActive:!0,_index:0,_resolve:r,_mutations:t,_loop:e.loop,_scopes:n};this._mutationChains.push(s),this._run(s)}))}_run(t){if(!t._isActive)return;const e=t._mutations;if(t._index>=e.length){if(!t._loop)return t._isActive=!1,this._mutationChains=this._mutationChains.filter((e=>e!==t)),void t._resolve({canceled:!1});t._index=0}t._mutations[t._index].run(this).then((()=>{t._isActive&&(t._index++,this._run(t))}))}_getActiveMutations(){return this._mutationChains.map((t=>t._mutations[t._index]))}pauseAll(){this._getActiveMutations().forEach((t=>t.pause()))}resumeAll(){this._getActiveMutations().forEach((t=>t.resume()))}cancelMutations(t){for(const e of this._mutationChains)for(const n of e._scopes)for(const r of t)(n.startsWith(r)||r.startsWith(n))&&this._cancelMutationChain(e)}cancelAll(){this.cancelMutations([""])}_cancelMutationChain(t){var e;t._isActive=!1;for(let e=t._index;ee!==t))}}const pi=(t,e)=>({x:t.x-e.x,y:t.y-e.y}),fi=t=>Math.sqrt(Math.pow(t.x,2)+Math.pow(t.y,2)),gi=(t,e)=>fi(pi(t,e)),mi=(t,e=1)=>{const n=10*e;return{x:Math.round(n*t.x)/n,y:Math.round(n*t.y)/n}},$i=t=>{let e=t[0];return t.slice(1).reduce(((t,n)=>{const r=gi(n,e);return e=n,t+r}),0)},wi=(t,e,n)=>{const r=pi(e,t),s=n/fi(r);return{x:e.x+s*r.x,y:e.y+s*r.y}},vi=t=>{const e=((t,e=30)=>{const n=$i(t)/(e-1),r=[t[0]],s=ti(t),o=t.slice(1);for(let t=0;tt.x))),y:oi(e.map((t=>t.y)))},r=e.map((t=>pi(t,n))),s=Math.sqrt(oi([Math.pow(r[0].x,2)+Math.pow(r[0].y,2),Math.pow(ti(r).x,2)+Math.pow(ti(r).y,2)]));return((t,e=.05)=>{const n=t.slice(0,1);for(const r of t.slice(1)){const t=n[n.length-1],s=gi(r,t);if(s>e){const o=Math.ceil(s/e),i=s/o;for(let e=0;e({x:t.x/s,y:t.y/s}))))};function ki(t,e=!1){const n=mi(t[0]),r=t.slice(1);let s=`M ${n.x} ${n.y}`;return r.forEach((t=>{const e=mi(t);s+=` L ${e.x} ${e.y}`})),e&&(s+="Z"),s}const _i=(t,e)=>{const n=(t=>{if(t.length<3)return t;const e=[t[0],t[1]];return t.slice(2).forEach((t=>{const n=e.length,r=pi(t,e[n-1]),s=pi(e[n-1],e[n-2]);r.y*s.x-r.x*s.y==0&&e.pop(),e.push(t)})),e})(t);if(n.length<2)return n;const r=n[1],s=n[0],o=wi(r,s,e),i=n.slice(1);return i.unshift(o),i};class yi{constructor(t,e,n,r=!1){this.path=t,this.points=e,this.strokeNum=n,this.isInRadical=r}getStartingPoint(){return this.points[0]}getEndingPoint(){return this.points[this.points.length-1]}getLength(){return $i(this.points)}getVectors(){let t=this.points[0];return this.points.slice(1).map((e=>{const n=pi(e,t);return t=e,n}))}getDistance(t){const e=this.points.map((e=>gi(e,t)));return Math.min(...e)}getAverageDistance(t){return t.reduce(((t,e)=>t+this.getDistance(e)),0)/t.length}}class xi{constructor(t,e){this.symbol=t,this.strokes=e}}function bi({radStrokes:t,strokes:e,medians:n}){return e.map(((e,r)=>{const s=n[r].map((t=>{const[e,n]=t;return{x:e,y:n}}));return new yi(e,s,r,(o=r,(null!==(i=null==t?void 0:t.indexOf(o))&&void 0!==i?i:-1)>=0));var o,i}))}const[Ci,zi]=[{x:0,y:-124},{x:1024,y:900}],Si=zi.x-Ci.x,Pi=zi.y-Ci.y;class Ti{constructor(t){const{padding:e,width:n,height:r}=t;this.padding=e,this.width=n,this.height=r;const s=n-2*e,o=r-2*e,i=s/Si,a=o/Pi;this.scale=Math.min(i,a);const l=e+(s-this.scale*Si)/2,c=e+(o-this.scale*Pi)/2;this.xOffset=-1*Ci.x*this.scale+l,this.yOffset=-1*Ci.y*this.scale+c}convertExternalPoint(t){return{x:(t.x-this.xOffset)/this.scale,y:(this.height-this.yOffset-t.y)/this.scale}}}const Ei=(t,e)=>{const n=(t=>{const e=[];let n=t[0];return t.slice(1).forEach((t=>{e.push(pi(t,n)),n=t})),e})(t),r=e.getVectors();return oi(n.map((t=>{const e=r.map((e=>{return r=t,((n=e).x*r.x+n.y*r.y)/fi(n)/fi(r);var n,r}));return Math.max(...e)})))>0},Wi=t=>{if(t.length<2)return t;const[e,...n]=t,r=[e];for(const t of n)s=t,o=r[r.length-1],(s.x!==o.x||s.y!==o.y)&&r.push(t);var s,o;return r},Mi=[Math.PI/16,Math.PI/32,0,-1*Math.PI/32,-1*Math.PI/16],Di=(t,e,n)=>{const r=vi(t),s=vi(e);let o=1/0;return Mi.forEach((t=>{const e=((t,e)=>{const n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,s=(t,e,s,o)=>{if(0===t&&0===e)return gi(n[0],r[0]);if(t>0&&0===e)return Math.max(s[0],gi(n[t],r[0]));const i=o[o.length-1];return 0===t&&e>0?Math.max(i,gi(n[0],r[e])):Math.max(Math.min(s[e],s[e-1],i),gi(n[t],r[e]))};let o=[];for(let t=0;tt.map((t=>({x:Math.cos(e)*t.x-Math.sin(e)*t.y,y:Math.sin(e)*t.x+Math.cos(e)*t.y}))))(s,t));e{const{leniency:r=1,isOutlineVisible:s=!1,checkBackwards:o=!0,averageDistanceThreshold:i=350}=n,a=e.getAverageDistance(t),l=a<=i*(s||e.strokeNum>0?.5:1)*r;if(!l)return{isMatch:!1,avgDist:a,meta:{isStrokeBackwards:!1}};const c=((t,e,n)=>{const r=gi(e.getStartingPoint(),t[0]),s=gi(e.getEndingPoint(),t[t.length-1]);return r<=250*n&&s<=250*n})(t,e,r),h=Ei(t,e),d=Di(t,e.points,r),u=((t,e,n)=>n*($i(t)+25)/(e.getLength()+25)>=.35)(t,e,r),p=l&&c&&h&&d&&u;if(o&&!p){if(Ai([...t].reverse(),e,{...n,checkBackwards:!1}).isMatch)return{isMatch:p,avgDist:a,meta:{isStrokeBackwards:!0}}}return{isMatch:p,avgDist:a,meta:{isStrokeBackwards:!1}}};class Li{constructor(t,e,n){this.id=t,this.points=[e],this.externalPoints=[n]}appendPoint(t,e){this.points.push(t),this.externalPoints.push(e)}}class Ri{constructor(t,e,n={}){this._tick=t=>{if(null!==this._startPauseTime)return;const e=Math.min(1,(t-this._startTime-this._pausedDuration)/this._duration);if(1===e)this._renderState.updateState(this._values),this._frameHandle=void 0,this.cancel(this._renderState);else{const t=ji(e),n=Ii(this._startState,this._values,t);this._renderState.updateState(n),this._frameHandle=Jo(this._tick)}},this.scope=t,this._valuesOrCallable=e,this._duration=n.duration||0,this._force=n.force,this._pausedDuration=0,this._startPauseTime=null}run(t){return this._values||this._inflateValues(t),0===this._duration&&t.updateState(this._values),0===this._duration||Bi(t.state,this._values)?Promise.resolve():(this._renderState=t,this._startState=t.state,this._startTime=performance.now(),this._frameHandle=Jo(this._tick),new Promise((t=>{this._resolve=t})))}_inflateValues(t){let e=this._valuesOrCallable;"function"==typeof this._valuesOrCallable&&(e=this._valuesOrCallable(t.state)),this._values=function(t,e){const n=t.split("."),r={};let s=r;for(let t=0;t=0?n*(o-i)+i:Ii(i,o,n)}return r}function Bi(t,e){for(const n in e){const r=e[n],s=null==t?void 0:t[n];if(r>=0){if(r!==s)return!1}else if(!Bi(s,r))return!1}return!0}Ri.Delay=class{constructor(t){this._duration=t,this._startTime=null,this._paused=!1,this.scope=`delay.${t}`}run(){return this._startTime=Ko(),this._runningPromise=new Promise((t=>{this._resolve=t,this._timeout=setTimeout((()=>this.cancel()),this._duration)})),this._runningPromise}pause(){if(this._paused)return;const t=performance.now()-(this._startTime||0);this._duration=Math.max(0,this._duration-t),clearTimeout(this._timeout),this._paused=!0}resume(){this._paused&&(this._startTime=performance.now(),this._timeout=setTimeout((()=>this.cancel()),this._duration),this._paused=!1)}cancel(){clearTimeout(this._timeout),this._resolve&&this._resolve(),this._resolve=void 0}};const ji=t=>-Math.cos(t*Math.PI)/2+.5,Oi=(t,e,n)=>[new Ri(`character.${t}.strokes`,ai({opacity:1,displayPortion:1},e.strokes.length),{duration:n,force:!0})],Ni=(t,e,n)=>[new Ri(`character.${t}`,{opacity:1,strokes:ai({opacity:1,displayPortion:1},e.strokes.length)},{duration:n,force:!0})],qi=(t,e,n)=>[new Ri(`character.${t}.opacity`,0,{duration:n,force:!0}),...Oi(t,e,0)],Fi=(t,e,n)=>[new Ri(`options.${t}`,e,{duration:n})],Hi=(t,e,n)=>{const r=t.strokeNum,s=(t.getLength()+600)/(3*n);return[new Ri("options.highlightColor",e),new Ri("character.highlight",{opacity:1,strokes:{[r]:{displayPortion:0,opacity:0}}}),new Ri(`character.highlight.strokes.${r}`,{displayPortion:1,opacity:1},{duration:s}),new Ri(`character.highlight.strokes.${r}.opacity`,0,{duration:s,force:!0})]},Ui=(t,e,n)=>{const r=e.strokeNum,s=(e.getLength()+600)/(3*n);return[new Ri(`character.${t}`,{opacity:1,strokes:{[r]:{displayPortion:0,opacity:1}}}),new Ri(`character.${t}.strokes.${r}.displayPortion`,1,{duration:s})]},Vi=(t,e,n,r,s)=>{let o=qi(t,e,n);return o=o.concat(Oi(t,e,0)),o.push(new Ri(`character.${t}`,{opacity:1,strokes:ai({opacity:0},e.strokes.length)},{force:!0})),e.strokes.forEach(((e,n)=>{n>0&&o.push(new Ri.Delay(s)),o=o.concat(Ui(t,e,r))})),o},Yi=(t,e)=>[new Ri(`userStrokes.${t}.opacity`,0,{duration:e}),new Ri(`userStrokes.${t}`,null,{force:!0})];class Qi{constructor(t,e,n){this._currentStrokeIndex=0,this._mistakesOnStroke=0,this._totalMistakes=0,this._character=t,this._renderState=e,this._isActive=!1,this._positioner=n}startQuiz(t){this._isActive=!0,this._options=t;const e=ei(t.quizStartStrokeNum,this._character.strokes.length);return this._currentStrokeIndex=Math.min(e,this._character.strokes.length-1),this._mistakesOnStroke=0,this._totalMistakes=0,this._renderState.run((n=this._character,r=t.strokeFadeDuration,s=this._currentStrokeIndex,[...qi("main",n,r),new Ri("character.highlight",{opacity:1,strokes:ai({opacity:0},n.strokes.length)},{force:!0}),new Ri("character.main",{opacity:1,strokes:li(n.strokes.length,(t=>({opacity:t[new Ri("quiz.activeUserStrokeId",t,{force:!0}),new Ri(`userStrokes.${t}`,{points:[e],opacity:1},{force:!0})])(n,e))}continueUserStroke(t){if(!this._userStroke)return Promise.resolve();const e=this._positioner.convertExternalPoint(t);this._userStroke.appendPoint(e,t);const n=this._userStroke.points.slice(0);return this._renderState.run((r=this._userStroke.id,[new Ri(`userStrokes.${r}.points`,n,{force:!0})]));var r}setPositioner(t){this._positioner=t}endUserStroke(){var t;if(!this._userStroke)return;if(this._renderState.run(Yi(this._userStroke.id,null!==(t=this._options.drawingFadeDuration)&&void 0!==t?t:300)),1===this._userStroke.points.length)return void(this._userStroke=void 0);const{acceptBackwardsStrokes:e,markStrokeCorrectAfterMisses:n}=this._options,r=this._getCurrentStroke(),{isMatch:s,meta:o}=function(t,e,n,r={}){const s=e.strokes,o=Wi(t.points);if(o.length<2)return{isMatch:!1,meta:{isStrokeBackwards:!1}};const{isMatch:i,meta:a,avgDist:l}=Ai(o,s[n],r);if(!i)return{isMatch:i,meta:a};const c=s.slice(n+1);let h=l;for(let t=0;t0,leniency:this._options.leniency,averageDistanceThreshold:this._options.averageDistanceThreshold}),i=n&&this._mistakesOnStroke+1>=n;if(s||i||o.isStrokeBackwards&&e)this._handleSuccess(o);else{this._handleFailure(o);const{showHintAfterMisses:t,highlightColor:e,strokeHighlightSpeed:n}=this._options;!1!==t&&this._mistakesOnStroke>=t&&this._renderState.run(Hi(r,ii(e),n))}this._userStroke=void 0}cancel(){this._isActive=!1,this._userStroke&&this._renderState.run(Yi(this._userStroke.id,this._options.drawingFadeDuration))}_getStrokeData({isCorrect:t,meta:e}){return{character:this._character.symbol,strokeNum:this._currentStrokeIndex,mistakesOnStroke:this._mistakesOnStroke,totalMistakes:this._totalMistakes,strokesRemaining:this._character.strokes.length-this._currentStrokeIndex-(t?1:0),drawnPath:(n=this._userStroke,{pathString:ki(n.externalPoints),points:n.points.map((t=>mi(t)))}),isBackwards:e.isStrokeBackwards};var n}_handleSuccess(t){if(!this._options)return;const{strokes:e,symbol:n}=this._character,{onCorrectStroke:r,onComplete:s,highlightOnComplete:o,strokeFadeDuration:i,highlightCompleteColor:a,highlightColor:l,strokeHighlightDuration:c}=this._options;null==r||r({...this._getStrokeData({isCorrect:!0,meta:t})});let h=(d="main",u=this._currentStrokeIndex,[new Ri(`character.${d}.strokes.${u}`,{displayPortion:1,opacity:1},{duration:i,force:!0})]);var d,u;this._mistakesOnStroke=0,this._currentStrokeIndex+=1;this._currentStrokeIndex===e.length&&(this._isActive=!1,null==s||s({character:n,totalMistakes:this._totalMistakes}),o&&(h=h.concat(((t,e,n)=>[new Ri("options.highlightColor",e),...qi("highlight",t),...Ni("highlight",t,n/2),...qi("highlight",t,n/2)])(this._character,ii(a||l),2*(c||0))))),this._renderState.run(h)}_handleFailure(t){var e,n;this._mistakesOnStroke+=1,this._totalMistakes+=1,null===(e=(n=this._options).onMistake)||void 0===e||e.call(n,this._getStrokeData({isCorrect:!1,meta:t}))}_getCurrentStroke(){return this._character.strokes[this._currentStrokeIndex]}}function Xi(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Gi(t,e,n){t.setAttributeNS(null,e,n)}function Ki(t,e){Object.keys(e).forEach((n=>Gi(t,n,e[n])))}function Ji(t){var e;null==t||null===(e=t.parentNode)||void 0===e||e.removeChild(t)}class Zi{constructor(t){this.stroke=t,this._pathLength=t.getLength()+Zi.STROKE_WIDTH/2}_getStrokeDashoffset(t){return.999*this._pathLength*(1-t)}_getColor({strokeColor:t,radicalColor:e}){return e&&this.stroke.isInRadical?e:t}}Zi.STROKE_WIDTH=200;class ta extends Zi{constructor(t){super(t),this._oldProps=void 0}mount(t){this._animationPath=Xi("path"),this._clip=Xi("clipPath"),this._strokePath=Xi("path");const e=`mask-${si()}`;Gi(this._clip,"id",e),Gi(this._strokePath,"d",this.stroke.path),this._animationPath.style.opacity="0",Gi(this._animationPath,"clip-path",function(t){let e="";return window.location&&window.location.href&&(e=window.location.href.replace(/#[^#]*$/,"").replace(/"/gi,"%22")),`url("${e}#${t}")`}(e));const n=_i(this.stroke.points,100);return Gi(this._animationPath,"d",ki(n)),Ki(this._animationPath,{stroke:"#FFFFFF","stroke-width":200..toString(),fill:"none","stroke-linecap":"round","stroke-linejoin":"miter","stroke-dasharray":`${this._pathLength},${this._pathLength}`}),this._clip.appendChild(this._strokePath),t.defs.appendChild(this._clip),t.svg.appendChild(this._animationPath),this}render(t){var e,n;if(t===this._oldProps||!this._animationPath)return;t.displayPortion!==(null===(e=this._oldProps)||void 0===e?void 0:e.displayPortion)&&(this._animationPath.style.strokeDashoffset=this._getStrokeDashoffset(t.displayPortion).toString());const r=this._getColor(t);if(!this._oldProps||r!==this._getColor(this._oldProps)){const{r:t,g:e,b:n,a:s}=r;Ki(this._animationPath,{stroke:`rgba(${t},${e},${n},${s})`})}t.opacity!==(null===(n=this._oldProps)||void 0===n?void 0:n.opacity)&&(this._animationPath.style.opacity=t.opacity.toString()),this._oldProps=t}}class ea{constructor(t){this._oldProps=void 0,this._strokeRenderers=t.strokes.map((t=>new ta(t)))}mount(t){const e=t.createSubRenderTarget();this._group=e.svg,this._strokeRenderers.forEach((t=>{t.mount(e)}))}render(t){var e,n;if(t===this._oldProps||!this._group)return;const{opacity:r,strokes:s,strokeColor:o,radicalColor:i=null}=t;var a;r!==(null===(e=this._oldProps)||void 0===e?void 0:e.opacity)&&(this._group.style.opacity=r.toString(),hi||(0===r?this._group.style.display="none":0===(null===(a=this._oldProps)||void 0===a?void 0:a.opacity)&&this._group.style.removeProperty("display")));const l=!this._oldProps||o!==this._oldProps.strokeColor||i!==this._oldProps.radicalColor;if(l||s!==(null===(n=this._oldProps)||void 0===n?void 0:n.strokes))for(let t=0;t{t(this._eventify(e,this._getMousePoint))})),this.node.addEventListener("touchstart",(e=>{t(this._eventify(e,this._getTouchPoint))}))}addPointerMoveListener(t){this.node.addEventListener("mousemove",(e=>{t(this._eventify(e,this._getMousePoint))})),this.node.addEventListener("touchmove",(e=>{t(this._eventify(e,this._getTouchPoint))}))}addPointerEndListener(t){document.addEventListener("mouseup",t),document.addEventListener("touchend",t)}getBoundingClientRect(){return this.node.getBoundingClientRect()}updateDimensions(t,e){this.node.setAttribute("width",`${t}`),this.node.setAttribute("height",`${e}`)}_eventify(t,e){return{getPoint:()=>e.call(this,t),preventDefault:()=>t.preventDefault()}}_getMousePoint(t){const{left:e,top:n}=this.getBoundingClientRect();return{x:t.clientX-e,y:t.clientY-n}}_getTouchPoint(t){const{left:e,top:n}=this.getBoundingClientRect();return{x:t.touches[0].clientX-e,y:t.touches[0].clientY-n}}}class sa extends ra{constructor(t,e){super(t),this.svg=t,this.defs=e,"createSVGPoint"in t&&(this._pt=t.createSVGPoint())}static init(t,e="100%",n="100%"){const r="string"==typeof t?document.getElementById(t):t;if(!r)throw new Error(`HanziWriter target element not found: ${t}`);const s=r.nodeName.toUpperCase(),o=(()=>{if("SVG"===s||"G"===s)return r;{const t=Xi("svg");return r.appendChild(t),t}})();Ki(o,{width:e,height:n});const i=Xi("defs");return o.appendChild(i),new sa(o,i)}createSubRenderTarget(){const t=Xi("g");return this.svg.appendChild(t),new sa(t,this.defs)}_getMousePoint(t){if(this._pt&&(this._pt.x=t.clientX,this._pt.y=t.clientY,"getScreenCTM"in this.node)){var e;const t=this._pt.matrixTransform(null===(e=this.node.getScreenCTM())||void 0===e?void 0:e.inverse());return{x:t.x,y:t.y}}return super._getMousePoint.call(this,t)}_getTouchPoint(t){if(this._pt&&(this._pt.x=t.touches[0].clientX,this._pt.y=t.touches[0].clientY,"getScreenCTM"in this.node)){var e;const t=this._pt.matrixTransform(null===(e=this.node.getScreenCTM())||void 0===e?void 0:e.inverse());return{x:t.x,y:t.y}}return super._getTouchPoint(t)}}var oa={HanziWriterRenderer:class{constructor(t,e){this._character=t,this._positioner=e,this._mainCharRenderer=new ea(t),this._outlineCharRenderer=new ea(t),this._highlightCharRenderer=new ea(t),this._userStrokeRenderers={}}mount(t){const e=t.createSubRenderTarget(),n=e.svg,{xOffset:r,yOffset:s,height:o,scale:i}=this._positioner;Gi(n,"transform",`translate(${r}, ${o-s}) scale(${i}, ${-1*i})`),this._outlineCharRenderer.mount(e),this._mainCharRenderer.mount(e),this._highlightCharRenderer.mount(e),this._positionedTarget=e}render(t){const{main:e,outline:n,highlight:r}=t.character,{outlineColor:s,radicalColor:o,highlightColor:i,strokeColor:a,drawingWidth:l,drawingColor:c}=t.options;this._outlineCharRenderer.render({opacity:n.opacity,strokes:n.strokes,strokeColor:s}),this._mainCharRenderer.render({opacity:e.opacity,strokes:e.strokes,strokeColor:a,radicalColor:o}),this._highlightCharRenderer.render({opacity:r.opacity,strokes:r.strokes,strokeColor:i});const h=t.userStrokes||{};for(const t in this._userStrokeRenderers){var d;if(!h[t])null===(d=this._userStrokeRenderers[t])||void 0===d||d.destroy(),delete this._userStrokeRenderers[t]}for(const t in h){const e=h[t];if(!e)continue;const n={strokeWidth:l,strokeColor:c,...e};(()=>{if(this._userStrokeRenderers[t])return this._userStrokeRenderers[t];const e=new na;return e.mount(this._positionedTarget),this._userStrokeRenderers[t]=e,e})().render(n)}}destroy(){Ji(this._positionedTarget.svg),this._positionedTarget.defs.innerHTML=""}},createRenderTarget:sa.init};const ia=(t,e)=>{t.beginPath();const n=e[0],r=e.slice(1);t.moveTo(n.x,n.y);for(const e of r)t.lineTo(e.x,e.y);t.stroke()};class aa extends Zi{constructor(t,e=!0){super(t),e&&Path2D?this._path2D=new Path2D(this.stroke.path):this._pathCmd=(t=>{const e=t.split(/(^|\s+)(?=[A-Z])/).filter((t=>" "!==t)),n=[t=>t.beginPath()];for(const t of e){const[e,...r]=t.split(/\s+/),s=r.map((t=>parseFloat(t)));"M"===e?n.push((t=>t.moveTo(...s))):"L"===e?n.push((t=>t.lineTo(...s))):"C"===e?n.push((t=>t.bezierCurveTo(...s))):"Q"===e&&n.push((t=>t.quadraticCurveTo(...s)))}return t=>n.forEach((e=>e(t)))})(this.stroke.path),this._extendedMaskPoints=_i(this.stroke.points,Zi.STROKE_WIDTH/2)}render(t,e){if(e.opacity<.05)return;var n;(t.save(),this._path2D)?t.clip(this._path2D):(null===(n=this._pathCmd)||void 0===n||n.call(this,t),t.globalAlpha=0,t.stroke(),t.clip());const{r:r,g:s,b:o,a:i}=this._getColor(e),a=1===i?`rgb(${r},${s},${o})`:`rgb(${r},${s},${o},${i})`,l=this._getStrokeDashoffset(e.displayPortion);t.globalAlpha=e.opacity,t.strokeStyle=a,t.fillStyle=a,t.lineWidth=Zi.STROKE_WIDTH,t.lineCap="round",t.lineJoin="round",t.setLineDash([this._pathLength,this._pathLength],l),t.lineDashOffset=l,ia(t,this._extendedMaskPoints),t.restore()}}class la{constructor(t){this._strokeRenderers=t.strokes.map((t=>new aa(t)))}render(t,e){if(e.opacity<.05)return;const{opacity:n,strokeColor:r,radicalColor:s,strokes:o}=e;for(let e=0;e{if("CANVAS"===s)return r;const t=document.createElement("canvas");return r.appendChild(t),t})();return o.setAttribute("width",e),o.setAttribute("height",n),new ha(o)}getContext(){return this.node.getContext("2d")}}var da={HanziWriterRenderer:class{constructor(t,e){this.destroy=di,this._character=t,this._positioner=e,this._mainCharRenderer=new la(t),this._outlineCharRenderer=new la(t),this._highlightCharRenderer=new la(t)}mount(t){this._target=t}_animationFrame(t){const{width:e,height:n,scale:r,xOffset:s,yOffset:o}=this._positioner,i=this._target.getContext();i.clearRect(0,0,e,n),i.save(),i.translate(s,n-o),i.transform(1,0,0,-1,0,0),i.scale(r,r),t(i),i.restore(),i.draw&&i.draw()}render(t){const{outline:e,main:n,highlight:r}=t.character,{outlineColor:s,strokeColor:o,radicalColor:i,highlightColor:a,drawingColor:l,drawingWidth:c}=t.options;this._animationFrame((h=>{this._outlineCharRenderer.render(h,{opacity:e.opacity,strokes:e.strokes,strokeColor:s}),this._mainCharRenderer.render(h,{opacity:n.opacity,strokes:n.strokes,strokeColor:o,radicalColor:i}),this._highlightCharRenderer.render(h,{opacity:r.opacity,strokes:r.strokes,strokeColor:a});const d=t.userStrokes||{};for(const t in d){const e=d[t];if(e){ca(h,{strokeWidth:c,strokeColor:l,...e})}}}))}},createRenderTarget:ha.init};const ua={charDataLoader:(t,e,n)=>{const r=new XMLHttpRequest;r.overrideMimeType&&r.overrideMimeType("application/json"),r.open("GET",(t=>`https://cdn.jsdelivr.net/npm/hanzi-writer-data@2.0/${t}.json`)(t),!0),r.onerror=t=>{n(r,t)},r.onreadystatechange=()=>{4===r.readyState&&(200===r.status?e(JSON.parse(r.responseText)):0!==r.status&&n&&n(r))},r.send(null)},onLoadCharDataError:null,onLoadCharDataSuccess:null,showOutline:!0,showCharacter:!0,renderer:"svg",width:0,height:0,padding:20,strokeAnimationSpeed:1,strokeFadeDuration:400,strokeHighlightDuration:200,strokeHighlightSpeed:2,delayBetweenStrokes:1e3,delayBetweenLoops:2e3,strokeColor:"#555",radicalColor:null,highlightColor:"#AAF",outlineColor:"#DDD",drawingColor:"#333",leniency:1,showHintAfterMisses:3,highlightOnComplete:!0,highlightCompleteColor:null,markStrokeCorrectAfterMisses:!1,acceptBackwardsStrokes:!1,quizStartStrokeNum:0,averageDistanceThreshold:350,drawingFadeDuration:300,drawingWidth:4,strokeWidth:2,outlineWidth:2,rendererOverride:{}};class pa{constructor(t){this._loadCounter=0,this._isLoading=!1,this.loadingFailed=!1,this._options=t}_debouncedLoad(t,e){const n=t=>{var n;e===this._loadCounter&&(null===(n=this._resolve)||void 0===n||n.call(this,t))},r=t=>{var n;e===this._loadCounter&&(null===(n=this._reject)||void 0===n||n.call(this,t))},s=this._options.charDataLoader(t,n,r);s&&("then"in s?s.then(n).catch(r):n(s))}_setupLoadingPromise(){return new Promise(((t,e)=>{this._resolve=t,this._reject=e})).then((t=>{var e,n;return this._isLoading=!1,null===(e=(n=this._options).onLoadCharDataSuccess)||void 0===e||e.call(n,t),t})).catch((t=>{if(this._isLoading=!1,this.loadingFailed=!0,this._options.onLoadCharDataError)return void this._options.onLoadCharDataError(t);if(t instanceof Error)throw t;const e=new Error(`Failed to load char data for ${this._loadingChar}`);throw e.reason=t,e}))}loadCharData(t){this._loadingChar=t;const e=this._setupLoadingPromise();return this.loadingFailed=!1,this._isLoading=!0,this._loadCounter++,this._debouncedLoad(t,this._loadCounter),e}}class fa{constructor(t,e={}){const{HanziWriterRenderer:n,createRenderTarget:r}="canvas"===e.renderer?da:oa,s=e.rendererOverride||{};this._renderer={HanziWriterRenderer:s.HanziWriterRenderer||n,createRenderTarget:s.createRenderTarget||r},this.target=this._renderer.createRenderTarget(t,e.width,e.height),this._options=this._assignOptions(e),this._loadingManager=new pa(this._options),this._setupListeners()}static create(t,e,n){const r=new fa(t,n);return r.setCharacter(e),r}static loadCharacterData(t,e={}){const n=(()=>{const{_loadingManager:n,_loadingOptions:r}=fa;return(null==n?void 0:n._loadingChar)===t&&r===e?n:new pa({...ua,...e})})();return fa._loadingManager=n,fa._loadingOptions=e,n.loadCharData(t)}static getScalingTransform(t,e,n=0){const r=new Ti({width:t,height:e,padding:n});return{x:r.xOffset,y:r.yOffset,scale:r.scale,transform:(s=`\n translate(${r.xOffset}, ${r.height-r.yOffset})\n scale(${r.scale}, ${-1*r.scale})\n `,s.replace(/^\s+/,"").replace(/\s+$/,"")).replace(/\s+/g," ")};var s}showCharacter(t={}){return this._options.showCharacter=!0,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(Ni("main",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}hideCharacter(t={}){return this._options.showCharacter=!1,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(qi("main",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}animateCharacter(t={}){return this.cancelQuiz(),this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(Vi("main",this._character,this._options.strokeFadeDuration,this._options.strokeAnimationSpeed,this._options.delayBetweenStrokes)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}animateStroke(t,e={}){return this.cancelQuiz(),this._withData((()=>{var n;return null===(n=this._renderState)||void 0===n?void 0:n.run(((t,e,n,r)=>{const s=e.strokes[n];return[new Ri(`character.${t}`,(n=>{const r=n.character[t],s={opacity:1,strokes:{}};for(let t=0;t{var n;return null===(n=e.onComplete)||void 0===n||n.call(e,t),t}))}))}highlightStroke(t,e={}){return this._withData((()=>{var n,r;if(this._character&&this._renderState)return this._renderState.run(Hi((n=this._character.strokes,r=t,n[ei(r,n.length)]),ii(this._options.highlightColor),this._options.strokeHighlightSpeed)).then((t=>{var n;return null===(n=e.onComplete)||void 0===n||n.call(e,t),t}))}))}async loopCharacterAnimation(){return this.cancelQuiz(),this._withData((()=>this._renderState.run(((t,e,n,r,s,o)=>{const i=Vi(t,e,n,r,s);return i.push(new Ri.Delay(o)),i})("main",this._character,this._options.strokeFadeDuration,this._options.strokeAnimationSpeed,this._options.delayBetweenStrokes,this._options.delayBetweenLoops),{loop:!0})))}pauseAnimation(){return this._withData((()=>{var t;return null===(t=this._renderState)||void 0===t?void 0:t.pauseAll()}))}resumeAnimation(){return this._withData((()=>{var t;return null===(t=this._renderState)||void 0===t?void 0:t.resumeAll()}))}showOutline(t={}){return this._options.showOutline=!0,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(Ni("outline",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}hideOutline(t={}){return this._options.showOutline=!1,this._withData((()=>{var e;return null===(e=this._renderState)||void 0===e?void 0:e.run(qi("outline",this._character,"number"==typeof t.duration?t.duration:this._options.strokeFadeDuration)).then((e=>{var n;return null===(n=t.onComplete)||void 0===n||n.call(t,e),e}))}))}updateDimensions({width:t,height:e,padding:n}){if(void 0!==t&&(this._options.width=t),void 0!==e&&(this._options.height=e),void 0!==n&&(this._options.padding=n),this.target.updateDimensions(this._options.width,this._options.height),this._character&&this._renderState&&this._hanziWriterRenderer&&this._positioner){this._hanziWriterRenderer.destroy();const t=this._initAndMountHanziWriterRenderer(this._character);this._renderState.overwriteOnStateChange((e=>t.render(e))),t.render(this._renderState.state),this._quiz&&this._quiz.setPositioner(this._positioner)}}updateColor(t,e,n={}){var r;let s=[];const o=ii((()=>"radicalColor"!==t||e?e:this._options.strokeColor)());this._options[t]=e;const i=null!==(r=n.duration)&&void 0!==r?r:this._options.strokeFadeDuration;return s=s.concat(Fi(t,o,i)),"radicalColor"!==t||e||(s=s.concat(Fi(t,null,0))),this._withData((()=>{var t;return null===(t=this._renderState)||void 0===t?void 0:t.run(s).then((t=>{var e;return null===(e=n.onComplete)||void 0===e||e.call(n,t),t}))}))}quiz(t={}){return this._withData((async()=>{this._character&&this._renderState&&this._positioner&&(this.cancelQuiz(),this._quiz=new Qi(this._character,this._renderState,this._positioner),this._options={...this._options,...t},this._quiz.startQuiz(this._options))}))}cancelQuiz(){this._quiz&&(this._quiz.cancel(),this._quiz=void 0)}setCharacter(t){return this.cancelQuiz(),this._char=t,this._hanziWriterRenderer&&this._hanziWriterRenderer.destroy(),this._renderState&&this._renderState.cancelAll(),this._hanziWriterRenderer=null,this._withDataPromise=this._loadingManager.loadCharData(t).then((e=>{if(!e||this._loadingManager.loadingFailed)return;this._character=function(t,e){const n=bi(e);return new xi(t,n)}(t,e),this._renderState=new ui(this._character,this._options,(t=>n.render(t)));const n=this._initAndMountHanziWriterRenderer(this._character);n.render(this._renderState.state)})),this._withDataPromise}_initAndMountHanziWriterRenderer(t){const{width:e,height:n,padding:r}=this._options;this._positioner=new Ti({width:e,height:n,padding:r});const s=new this._renderer.HanziWriterRenderer(t,this._positioner);return s.mount(this.target),this._hanziWriterRenderer=s,s}async getCharacterData(){if(!this._char)throw new Error("setCharacter() must be called before calling getCharacterData()");return await this._withData((()=>this._character))}_assignOptions(t){const e={...ua,...t};return t.strokeAnimationDuration&&!t.strokeAnimationSpeed&&(e.strokeAnimationSpeed=500/t.strokeAnimationDuration),t.strokeHighlightDuration&&!t.strokeHighlightSpeed&&(e.strokeHighlightSpeed=500/e.strokeHighlightDuration),t.highlightCompleteColor||(e.highlightCompleteColor=e.highlightColor),this._fillWidthAndHeight(e)}_fillWidthAndHeight(t){const e={...t};if(e.width&&!e.height)e.height=e.width;else if(e.height&&!e.width)e.width=e.height;else if(!e.width&&!e.height){const{width:t,height:n}=this.target.getBoundingClientRect(),r=Math.min(t,n);e.width=r,e.height=r}return e}_withData(t){if(this._loadingManager.loadingFailed)throw Error("Failed to load character data. Call setCharacter and try again.");return this._withDataPromise?this._withDataPromise.then((()=>{if(!this._loadingManager.loadingFailed)return t()})):Promise.resolve().then(t)}_setupListeners(){this.target.addPointerStartListener((t=>{this._quiz&&(t.preventDefault(),this._quiz.startUserStroke(t.getPoint()))})),this.target.addPointerMoveListener((t=>{this._quiz&&(t.preventDefault(),this._quiz.continueUserStroke(t.getPoint()))})),this.target.addPointerEndListener((()=>{var t;null===(t=this._quiz)||void 0===t||t.endUserStroke()}))}}function ga(t){let e;return{c(){e=v("span"),e.textContent="Simplified",C(e,"class","svelte-377oc3"),S(e,"script-selector--active","simplified"==t[1])},m(t,n){m(t,e,n)},p(t,n){2&n&&S(e,"script-selector--active","simplified"==t[1])},d(t){t&&$(e)}}}function ma(t){let e;return{c(){e=v("span"),e.textContent="Traditional",C(e,"class","svelte-377oc3"),S(e,"script-selector--active","traditional"==t[1])},m(t,n){m(t,e,n)},p(t,n){2&n&&S(e,"script-selector--active","traditional"==t[1])},d(t){t&&$(e)}}}function $a(t){let e,n,r,s,o;return n=new Pn({props:{classes:["sy-tooltip--container"],$$slots:{default:[ba]},$$scope:{ctx:t}}}),n.$on("click",t[9]),{c(){e=v("div"),nt(n.$$.fragment),r=y(),s=v("div"),s.innerHTML='
',C(e,"class","character-actions svelte-377oc3"),C(s,"class","character-container svelte-377oc3")},m(t,i){m(t,e,i),rt(n,e,null),m(t,r,i),m(t,s,i),o=!0},p(t,e){const r={};262156&e&&(r.$$scope={dirty:e,ctx:t}),n.$set(r)},i(t){o||(J(n.$$.fragment,t),o=!0)},o(t){Z(n.$$.fragment,t),o=!1},d(t){t&&$(e),st(n),t&&$(r),t&&$(s)}}}function wa(e){let n;return{c(){n=v("div"),n.innerHTML="

Character Data Not Found

\n\t\t\t\t

The stroke order data cannot be found for at least one of\n\t\t\t\t\tthe characters in this word.

",C(n,"class","character-window--character-not-found--container svelte-377oc3")},m(t,e){m(t,n,e)},p:t,i:t,o:t,d(t){t&&$(n)}}}function va(t){let e,n;return e=new de({props:{size:"18"}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function ka(t){let e,n;return e=new fe({props:{size:"18"}}),{c(){nt(e.$$.fragment)},m(t,r){rt(e,t,r),n=!0},i(t){n||(J(e.$$.fragment,t),n=!0)},o(t){Z(e.$$.fragment,t),n=!1},d(t){st(e,t)}}}function _a(t){let e;return{c(){e=_("Play Stroke Order")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function ya(t){let e;return{c(){e=_("Resume")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function xa(t){let e;return{c(){e=_("Pause")},m(t,n){m(t,e,n)},d(t){t&&$(e)}}}function ba(t){let e,n,r,s,o,i,a;const l=[ka,va],c=[];function h(t,e){return t[2]?1:0}function d(t,e){return t[2]?xa:t[3]?ya:_a}n=h(t),r=c[n]=l[n](t);let u=d(t),p=u(t);return{c(){e=v("span"),r.c(),s=y(),o=v("div"),i=v("p"),p.c(),C(e,"class","animate-button--icon-container svelte-377oc3"),C(e,"data-testid","control-button"),C(i,"data-testid","tooltip-text"),C(o,"class","sy-tooltip--body sy-tooltip--body-bottom")},m(t,r){m(t,e,r),c[n].m(e,null),m(t,s,r),m(t,o,r),g(o,i),p.m(i,null),a=!0},p(t,s){let o=n;n=h(t),n!==o&&(G(),Z(c[o],1,1,(()=>{c[o]=null})),K(),r=c[n],r||(r=c[n]=l[n](t),r.c()),J(r,1),r.m(e,null)),u!==(u=d(t))&&(p.d(1),p=u(t),p&&(p.c(),p.m(i,null)))},i(t){a||(J(r),a=!0)},o(t){Z(r),a=!1},d(t){t&&$(e),c[n].d(),t&&$(s),t&&$(o),p.d()}}}function Ca(t){let e,n,r,s,o,i,a,l,c,h,d;r=new Pn({props:{style:"ghost",size:"large",$$slots:{default:[ga]},$$scope:{ctx:t}}}),r.$on("click",t[7]),o=new Pn({props:{style:"ghost",size:"large",$$slots:{default:[ma]},$$scope:{ctx:t}}}),o.$on("click",t[8]);const u=[wa,$a],p=[];function f(t,e){return t[4]?0:1}return c=f(t),h=p[c]=u[c](t),{c(){e=v("div"),n=v("div"),nt(r.$$.fragment),s=y(),nt(o.$$.fragment),a=y(),l=v("div"),h.c(),C(n,"class","script-selector-container svelte-377oc3"),C(n,"data-tauri-drag-region",i=!!t[0]||void 0),C(l,"class","character-window--content svelte-377oc3"),C(e,"class","character-window-container svelte-377oc3")},m(t,i){m(t,e,i),g(e,n),rt(r,n,null),g(n,s),rt(o,n,null),g(e,a),g(e,l),p[c].m(l,null),d=!0},p(t,[e]){const s={};262146&e&&(s.$$scope={dirty:e,ctx:t}),r.$set(s);const a={};262146&e&&(a.$$scope={dirty:e,ctx:t}),o.$set(a),(!d||1&e&&i!==(i=!!t[0]||void 0))&&C(n,"data-tauri-drag-region",i);let g=c;c=f(t),c===g?p[c].p(t,e):(G(),Z(p[g],1,1,(()=>{p[g]=null})),K(),h=p[c],h?h.p(t,e):(h=p[c]=u[c](t),h.c()),J(h,1),h.m(l,null))},i(t){d||(J(r.$$.fragment,t),J(o.$$.fragment,t),J(h),d=!0)},o(t){Z(r.$$.fragment,t),Z(o.$$.fragment,t),Z(h),d=!1},d(t){t&&$(e),st(r),st(o),p[c].d()}}}fa._loadingManager=null,fa._loadingOptions=null;function za(t,e,n){let r,s=!1;window.__TAURI__.os.platform().then((t=>{n(0,s="darwin"===t)}));let o,i,a=[],l="simplified",c=!1,h=!1,d=!1;const u=()=>window.matchMedia("(prefers-color-scheme: dark)").matches,p=t=>{n(1,l=t),n(2,c=!1),n(3,h=!1),f(r[l])},f=t=>{n(4,d=!1),q().then((()=>{const e=document.getElementById("character-target");e&&(e.innerHTML=""),a=[];for(let e=0;e{fetch(`resources/hanzi-writer-data/data/${t}.json`).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{n(4,d=!0),console.log(t)}))}}),a.push(i);var r}))},g=(t,e)=>{if(e){n(2,c=!0);for(let t=0;t=0&&tg(t+1,!1)})):(n(2,c=!1),n(3,h=!1))},m=()=>{c?(n(3,h=!0),n(2,c=!1),a[o].pauseAnimation()):h?(n(3,h=!1),n(2,c=!0),a[o].resumeAnimation()):g(0,!0)};window.__TAURI__.event.listen("display-characters",(t=>{r=t.payload,f(r[l])})),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(t=>{f(r[l])}));return[s,l,c,h,d,p,m,()=>p("simplified"),()=>p("traditional"),()=>m()]}class Sa extends it{constructor(t){super(),ot(this,t,za,Ca,i,{})}}let Pa;const Ta=document.getElementById("app"),Ea=document.getElementById("characters");return Ta?Pa=new Qo({target:Ta}):Ea&&(Pa=new Sa({target:Ea})),Pa}(); //# sourceMappingURL=bundle.js.map diff --git a/src/views/templates/build/bundle.js.map b/src/views/templates/build/bundle.js.map index 4b2b21e8..1ef49c11 100644 --- a/src/views/templates/build/bundle.js.map +++ b/src/views/templates/build/bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"bundle.js","sources":["../../../../node_modules/svelte/internal/index.mjs","../../../../node_modules/svelte/store/index.mjs","../../../../node_modules/regexparam/dist/index.mjs","../../../../node_modules/svelte-spa-router/Router.svelte","../../../../node_modules/svelte-feather-icons/src/icons/ArrowLeftIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/ArrowRightIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/BookOpenIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/BookmarkIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/CheckIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/ChevronDownIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/ChevronLeftIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/ChevronRightIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/CopyIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/DownloadIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/HelpCircleIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/Maximize2Icon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/MessageCircleIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/MoreVerticalIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/PauseIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/PlayIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/PlusIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/RotateCcwIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/RotateCwIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/SearchIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/SettingsIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/Trash2Icon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/TrendingUpIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/UploadIcon.svelte","../../../../node_modules/svelte-feather-icons/src/icons/XIcon.svelte","../../../../node_modules/svelte-spa-router/active.js","../utils/bookmarkManager.js","../utils/error.js","../utils/preferenceManager.js","../utils/process.js","../../../../node_modules/elastic-scroll-polyfill/dist/esm/elasticScroll.js","../utils/startup.js","../components/Navigation/Navigation.svelte","../components/SyButton/SyButton.svelte","../components/SyButtonBar/SyButtonBar.svelte","../components/SyDropdown/SimpleTextDropdownItem.svelte","../components/SyDropdown/SyDropdown.svelte","../components/SyDropdown/TextWithIconDropdownItem.svelte","../components/SyList/SyListContent.svelte","../components/SyTextInput/SyTextInput.svelte","../components/SyList/SyListPreviewItem.svelte","../components/SyList/SyListPreview.svelte","../components/SyList/SyList.svelte","../components/DictionaryContent/DictionaryLink.svelte","../components/DictionaryContent/DefinitionItem.svelte","../components/DictionaryContent/ChineseCharacters.svelte","../components/DictionaryContent/EntryTopline.svelte","../components/DictionaryContent/MeasureWord.svelte","../components/DictionaryContent/DictionaryContent.svelte","../components/SyDropdown/DividerDropdownItem.svelte","../components/SyModal/SyModal.svelte","../routes/Bookmarks.svelte","../utils/name.js","../routes/Chat.svelte","../routes/Help.svelte","../routes/NotFound.svelte","../routes/Reader.svelte","../routes/Search.svelte","../../../../node_modules/uuid/dist/esm-browser/rng.js","../components/SettingsOption/ToneColorPicker.svelte","../components/SettingsOption/UpdateChecker.svelte","../../../../node_modules/uuid/dist/esm-browser/stringify.js","../../../../node_modules/uuid/dist/esm-browser/native.js","../../../../node_modules/uuid/dist/esm-browser/v4.js","../components/SyToggle/SyToggle.svelte","../routes/Settings.svelte","../components/StudyListItem/StudyListItem.svelte","../routes/Study.svelte","../routes/Tools.svelte","../routes/Study/Flashcards.svelte","../App.svelte","../../../../node_modules/hanzi-writer/dist/index.esm.js","../CharacterWindow.svelte","../app.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\nfunction is_promise(value) {\n return !!value && (typeof value === 'object' || typeof value === 'function') && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\nfunction split_css_unit(value) {\n const split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n return split ? [parseFloat(split[1]), split[2] || 'px'] : [value, 'px'];\n}\nconst contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\n/**\n * Resize observer singleton.\n * One listener per element only!\n * https://groups.google.com/a/chromium.org/g/blink-dev/c/z6ienONUb5A/m/F5-VcUZtBAAJ\n */\nclass ResizeObserverSingleton {\n constructor(options) {\n this.options = options;\n this._listeners = 'WeakMap' in globals ? new WeakMap() : undefined;\n }\n observe(element, listener) {\n this._listeners.set(element, listener);\n this._getObserver().observe(element, this.options);\n return () => {\n this._listeners.delete(element);\n this._observer.unobserve(element); // this line can probably be removed\n };\n }\n _getObserver() {\n var _a;\n return (_a = this._observer) !== null && _a !== void 0 ? _a : (this._observer = new ResizeObserver((entries) => {\n var _a;\n for (const entry of entries) {\n ResizeObserverSingleton.entries.set(entry.target, entry);\n (_a = this._listeners.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n }\n }));\n }\n}\n// Needs to be written like this to pass the tree-shake-test\nResizeObserverSingleton.entries = 'WeakMap' in globals ? new WeakMap() : undefined;\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not \n let children = target.childNodes;\n // If target is , there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction comment(content) {\n return document.createComment(content);\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_immediate_propagation(fn) {\n return function (event) {\n event.stopImmediatePropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set && always_set_through_set_attribute.indexOf(key) === -1) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data_map(node, data_map) {\n Object.keys(data_map).forEach((key) => {\n set_custom_element_data(node, key, data_map[key]);\n });\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction set_dynamic_element_data(tag) {\n return (/-/.test(tag)) ? set_custom_element_data_map : set_attributes;\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction init_binding_group(group) {\n let _inputs;\n return {\n /* push */ p(...inputs) {\n _inputs = inputs;\n _inputs.forEach(input => group.push(input));\n },\n /* remove */ r() {\n _inputs.forEach(input => group.splice(group.indexOf(input), 1));\n }\n };\n}\nfunction init_binding_group_dynamic(group, indexes) {\n let _group = get_binding_group(group);\n let _inputs;\n function get_binding_group(group) {\n for (let i = 0; i < indexes.length; i++) {\n group = group[indexes[i]] = group[indexes[i]] || [];\n }\n return group;\n }\n function push() {\n _inputs.forEach(input => _group.push(input));\n }\n function remove() {\n _inputs.forEach(input => _group.splice(_group.indexOf(input), 1));\n }\n return {\n /* update */ u(new_indexes) {\n indexes = new_indexes;\n const new_group = get_binding_group(group);\n if (new_group !== _group) {\n remove();\n _group = new_group;\n push();\n }\n },\n /* push */ p(...inputs) {\n _inputs = inputs;\n push();\n },\n /* remove */ r: remove\n };\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction claim_comment(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 8, (node) => {\n node.data = '' + data;\n return undefined;\n }, () => comment(data), true);\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n text.data = data;\n}\nfunction set_data_contenteditable(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n text.data = data;\n}\nfunction set_data_maybe_contenteditable(text, data, attr_value) {\n if (~contenteditable_truthy_values.indexOf(attr_value)) {\n set_data_contenteditable(text, data);\n }\n else {\n set_data(text, data);\n }\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value == null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value, mounting) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n if (!mounting || value !== undefined) {\n select.selectedIndex = -1; // no option should be selected\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked');\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_iframe_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n // make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n // see https://github.com/sveltejs/svelte/issues/4233\n fn();\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nconst resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({ box: 'content-box' });\nconst resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({ box: 'border-box' });\nconst resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton({ box: 'device-pixel-content-box' });\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n const result = [];\n let started = 0;\n for (const node of head.childNodes) {\n if (node.nodeType === 8 /* comment node */) {\n const comment = node.textContent.trim();\n if (comment === `HEAD_${nodeId}_END`) {\n started -= 1;\n result.push(node);\n }\n else if (comment === `HEAD_${nodeId}_START`) {\n started += 1;\n result.push(node);\n }\n }\n else if (started > 0) {\n result.push(node);\n }\n }\n return result;\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n /** #7364 target for