From 11e6f21622bedd2264ea73dc5fbdca2731704a9c Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 29 Jul 2024 05:54:52 +0000 Subject: [PATCH 01/78] chore: Publish crates --- .changeset/eighty-comics-act.md | 6 ------ .changeset/wicked-pandas-lick.md | 5 ----- Cargo.lock | 4 ++-- crates/swc_ecma_minifier/Cargo.toml | 2 +- crates/swc_ecma_usage_analyzer/Cargo.toml | 2 +- 5 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 .changeset/eighty-comics-act.md delete mode 100644 .changeset/wicked-pandas-lick.md diff --git a/.changeset/eighty-comics-act.md b/.changeset/eighty-comics-act.md deleted file mode 100644 index 66c075db070bb..0000000000000 --- a/.changeset/eighty-comics-act.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_ecma_usage_analyzer: patch -swc_ecma_minifier: patch ---- - -fix(es/minifier): Fix analysis of for-in/of diff --git a/.changeset/wicked-pandas-lick.md b/.changeset/wicked-pandas-lick.md deleted file mode 100644 index 065723c8b7584..0000000000000 --- a/.changeset/wicked-pandas-lick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_ecma_minifier: patch ---- - -fix(es/minifier): Fix detection of `this` diff --git a/Cargo.lock b/Cargo.lock index b3ba6a5fb421b..b9d71beea676f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4549,7 +4549,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.200.3" +version = "0.200.4" dependencies = [ "ansi_term", "anyhow", @@ -4961,7 +4961,7 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.29.2" +version = "0.29.3" dependencies = [ "indexmap 2.2.6", "rustc-hash", diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index b73f26a6608da..c193c3552997a 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.200.3" +version = "0.200.4" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_usage_analyzer/Cargo.toml b/crates/swc_ecma_usage_analyzer/Cargo.toml index 7dcaa85273a62..65aa1392b37f9 100644 --- a/crates/swc_ecma_usage_analyzer/Cargo.toml +++ b/crates/swc_ecma_usage_analyzer/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_usage_analyzer" repository = "https://github.com/swc-project/swc.git" -version = "0.29.2" +version = "0.29.3" [package.metadata.docs.rs] all-features = true From d4c3795252e188380b46d477d0363b50d272a903 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 29 Jul 2024 06:01:13 +0000 Subject: [PATCH 02/78] chore: Publish `1.7.4-nightly-20240729.1` with `swc_core` `v0.99.5` --- bindings/Cargo.lock | 12 ++++++------ bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../core/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- .../core/scripts/npm/linux-x64-musl/package.json | 2 +- .../core/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../core/scripts/npm/win32-ia32-msvc/package.json | 2 +- .../core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../minifier/scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 32 insertions(+), 32 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index c399c954e8b9c..431593620f27d 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.3" +version = "1.7.4-nightly-20240729.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.3" +version = "1.7.4-nightly-20240729.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.3" +version = "1.7.4-nightly-20240729.1" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.340" +version = "0.91.341" dependencies = [ "anyhow", "swc_cli_impl", @@ -3824,9 +3824,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.133.3" +version = "0.133.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025021bfd325dcd1232d49743f58ea76de7c81ca2a2526b972e4e9a984b9cbc8" +checksum = "b6148af60d25da893aef037621e4869e9b580eb280e12f5a8d4f87fa5e4cd5da" dependencies = [ "indexmap 2.2.6", "num_cpus", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index cdc2aacb07516..933ffe27e218e 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.3" +version = "1.7.4-nightly-20240729.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index caf40565f3fea..f461c82736fc2 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.3" +version = "1.7.4-nightly-20240729.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 288ad53851691..e288115b3ba6c 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.3" +version = "1.7.4-nightly-20240729.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index f3b1ba1d9612f..4fc9d9cc4ba8f 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.340" +version = "0.91.341" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 958e958b30558..4ec275347dad4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index e6b050ed88f17..4b84a0eb40850 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index b28f78a7c9dfd..02766c16ffac7 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 8529789336232..3b011a158ab42 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 0e7e5775082d5..7401188278a20 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index f2618eb56e2bf..510d6362a1797 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 971a8645f2132..c8e960bff3997 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 8f70a2b538432..aa2773f43e44b 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index ed2faceb25ff3..a353a4cecf54e 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index ab5cf0ed87afd..7cf97583b70a7 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 5a61c1e3e5a5d..556029b3cc5ed 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 0ab040889ca7c..0342f35ba4173 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 6d43621946040..9dcf40daeb92d 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 563c8e27fadff..aba89d341ac45 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index e54c03f1df0e7..95bfab377d056 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 7987fae79e6c8..6090c0582f090 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index e6565d4462720..01924db908001 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 9dadda10925be..768c04df9bfc4 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 659040a60b875..a19473edde428 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index a4134714b1010..51faf20cb53f4 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 7a6ffaa05126a..91fc82688b37b 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index ebbcb216bdc45..8eba1aeed404e 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.3", + "version": "1.7.4-nightly-20240729.1", "os": [ "win32" ], From 1725858ec28e773a13b1a96edf4200d39a7a8c49 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Mon, 29 Jul 2024 06:01:14 +0000 Subject: [PATCH 03/78] chore: Update changelog --- CHANGELOG.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b66319a5bc407..473402258f61a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,27 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/minifier)** Fix detection of `this` ([#9339](https://github.com/swc-project/swc/issues/9339)) ([77da7cf](https://github.com/swc-project/swc/commit/77da7cf24bad5064206ab3e6dc248012d08576cf)) + + +- **(es/minifier)** Fix analysis of for-in/of ([#9340](https://github.com/swc-project/swc/issues/9340)) ([1454ab5](https://github.com/swc-project/swc/commit/1454ab54c112c25ca03cbb866aacbd41a16ee60a)) + +### Documentation + + + +- **(contributing)** Add warning for `test --all` ([#9338](https://github.com/swc-project/swc/issues/9338)) ([234bb97](https://github.com/swc-project/swc/commit/234bb974bc54e9c929fd4cf810bcecab36f760ba)) + +### Miscellaneous Tasks + + + +- **(deps)** Update rust crate toml to v0.8.16 ([#9327](https://github.com/swc-project/swc/issues/9327)) ([67aadfa](https://github.com/swc-project/swc/commit/67aadfa6c976c60a3a756a1b1fcdcf193d96c51f)) + ## [1.7.3] - 2024-07-27 ### Bug Fixes @@ -1328,16 +1351,10 @@ - **(es/decorators)** Do not insert duplicate constructors ([#8631](https://github.com/swc-project/swc/issues/8631)) ([21a447f](https://github.com/swc-project/swc/commit/21a447f35a79cdad4721cdefea26da1d355d34d3)) - -- **(es/plugin)** Fix schema version issue ([#8621](https://github.com/swc-project/swc/issues/8621)) ([132be95](https://github.com/swc-project/swc/commit/132be951733660654b5c0992e19b5f3d414e7350)) - ### Build - **(cargo)** Update `rustc` to `nightly-2024-02-06` ([#8618](https://github.com/swc-project/swc/issues/8618)) ([6726b63](https://github.com/swc-project/swc/commit/6726b631e68cf7f14612e046c8cf057411e4a3c2)) - -- **(plugin)** Update `wasmer` to `v4.2.5` ([#8624](https://github.com/swc-project/swc/issues/8624)) ([4e0d240](https://github.com/swc-project/swc/commit/4e0d24089588da8952c6986f1bfcc47bcd9f84a2)) - From 636585b44d0f74f457b44766f8d6fda68bcc4c09 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 29 Jul 2024 21:36:17 -0400 Subject: [PATCH 04/78] fix(es/codegen): Emit question token for class methods (#9342) --- .changeset/tall-cooks-speak.md | 6 ++++++ crates/swc_ecma_codegen/src/lib.rs | 4 ++++ .../tests/fixture/typescript/class_method/input.js | 2 +- .../tests/fixture/typescript/class_method/output.js | 2 +- .../tests/fixture/typescript/class_method/output.min.js | 2 +- crates/swc_ecma_transforms_typescript/src/strip_type.rs | 1 + 6 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 .changeset/tall-cooks-speak.md diff --git a/.changeset/tall-cooks-speak.md b/.changeset/tall-cooks-speak.md new file mode 100644 index 0000000000000..bc3b06eae02b2 --- /dev/null +++ b/.changeset/tall-cooks-speak.md @@ -0,0 +1,6 @@ +--- +swc_ecma_codegen: patch +swc_ecma_transforms_typescript: patch +--- + +fix(es/codegen): Emit question token for class methods diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index 3a9737fef6c51..f2901a69464a3 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -1599,6 +1599,10 @@ where } } + if n.is_optional { + punct!("?"); + } + if let Some(type_params) = &n.function.type_params { emit!(type_params); } diff --git a/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/input.js b/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/input.js index 8ae861559ba8c..51baf161b6b86 100644 --- a/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/input.js +++ b/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/input.js @@ -1,5 +1,5 @@ class MyClass extends Base { public override method(param: number): string { } - public abstract override log(msg: string): void; + public abstract override log?(msg: string): TValue; } diff --git a/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.js b/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.js index afa69c78aceb7..d2efd95d7ba36 100644 --- a/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.js +++ b/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.js @@ -1,4 +1,4 @@ class MyClass extends Base { public override method(param: number): string {} - public abstract override log(msg: string): void; + public abstract override log?(msg: string): TValue; } diff --git a/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.min.js b/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.min.js index c59261408b329..69933daf3dbcf 100644 --- a/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.min.js +++ b/crates/swc_ecma_codegen/tests/fixture/typescript/class_method/output.min.js @@ -1 +1 @@ -class MyClass extends Base{public override method(param:number):string{}public abstract override log(msg:string):void} +class MyClass extends Base{public override method(param:number):string{}public abstract override log?(msg:string):TValue} diff --git a/crates/swc_ecma_transforms_typescript/src/strip_type.rs b/crates/swc_ecma_transforms_typescript/src/strip_type.rs index 12c7e96ca93a6..a6d0a64292638 100644 --- a/crates/swc_ecma_transforms_typescript/src/strip_type.rs +++ b/crates/swc_ecma_transforms_typescript/src/strip_type.rs @@ -84,6 +84,7 @@ impl VisitMut for StripType { n.accessibility = None; n.is_override = false; n.is_abstract = false; + n.is_optional = false; n.visit_mut_children_with(self); } From bd0f537a812f840cfcf3f2f7ecee29535517d5c1 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Tue, 30 Jul 2024 05:22:33 +0000 Subject: [PATCH 05/78] chore: Publish crates --- .changeset/tall-cooks-speak.md | 6 ------ Cargo.lock | 4 ++-- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_ecma_transforms_typescript/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 .changeset/tall-cooks-speak.md diff --git a/.changeset/tall-cooks-speak.md b/.changeset/tall-cooks-speak.md deleted file mode 100644 index bc3b06eae02b2..0000000000000 --- a/.changeset/tall-cooks-speak.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_ecma_codegen: patch -swc_ecma_transforms_typescript: patch ---- - -fix(es/codegen): Emit question token for class methods diff --git a/Cargo.lock b/Cargo.lock index b9d71beea676f..fcc9d0fab9bc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4271,7 +4271,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.154.3" +version = "0.154.4" dependencies = [ "base64", "codspeed-criterion-compat", @@ -4938,7 +4938,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.194.2" +version = "0.194.3" dependencies = [ "codspeed-criterion-compat", "criterion", diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index dd4aa89028244..b012ba05ec98f 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.154.3" +version = "0.154.4" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 3c186aa29ae89..d9bd3014962db 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.194.2" +version = "0.194.3" [lib] bench = false From ced06e2da35952c7073fee8aa69cf1a21078cc12 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 21:19:44 +0900 Subject: [PATCH 06/78] chore(deps): update dependency magic-string to v0.30.11 (#9345) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [magic-string](https://togithub.com/rich-harris/magic-string) | [`0.30.10` -> `0.30.11`](https://renovatebot.com/diffs/npm/magic-string/0.30.10/0.30.11) | [![age](https://developer.mend.io/api/mc/badges/age/npm/magic-string/0.30.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/magic-string/0.30.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/magic-string/0.30.10/0.30.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/magic-string/0.30.10/0.30.11?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
rich-harris/magic-string (magic-string) ### [`v0.30.11`](https://togithub.com/rich-harris/magic-string/blob/HEAD/CHANGELOG.md#03011-2024-07-29) [Compare Source](https://togithub.com/rich-harris/magic-string/compare/v0.30.10...v0.30.11) ##### Bug Fixes - not use negative indices for remove in empty string ([#​281](https://togithub.com/rich-harris/magic-string/issues/281)) ([5c1cba0](https://togithub.com/rich-harris/magic-string/commit/5c1cba04ed1a45374ab17b07fc335951d59c1a61))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/swc-project/swc). --- yarn.lock | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index b0526d5015e8c..f7e01b5dd9be3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2979,13 +2979,20 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": version: 1.4.15 resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" checksum: 89960ac087781b961ad918978975bcdf2051cd1741880469783c42de64239703eab9db5230d776d8e6a09d73bb5e4cb964e07d93ee6e2e7aea5a7d726e865c09 languageName: node linkType: hard +"@jridgewell/sourcemap-codec@npm:^1.5.0": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 4ed6123217569a1484419ac53f6ea0d9f3b57e5b57ab30d7c267bdb27792a27eb0e4b08e84a2680aa55cc2f2b411ffd6ec3db01c44fdc6dc43aca4b55f8374fd + languageName: node + linkType: hard + "@jridgewell/trace-mapping@npm:0.3.9": version: 0.3.9 resolution: "@jridgewell/trace-mapping@npm:0.3.9" @@ -12909,11 +12916,11 @@ __metadata: linkType: hard "magic-string@npm:^0.30.0": - version: 0.30.10 - resolution: "magic-string@npm:0.30.10" + version: 0.30.11 + resolution: "magic-string@npm:0.30.11" dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.4.15" - checksum: 9f8bf6363a14c98a9d9f32ef833b194702a5c98fb931b05ac511b76f0b06fd30ed92beda6ca3261d2d52d21e39e891ef1136fbd032023f6cbb02d0b7d5767201 + "@jridgewell/sourcemap-codec": "npm:^1.5.0" + checksum: b784d2240252f5b1e755d487354ada4c672cbca16f045144f7185a75b059210e5fcca7be7be03ef1bac2ca754c4428b21d36ae64a9057ba429916f06b8c54eb2 languageName: node linkType: hard From d5472cc344fb4099af3887e6cc1cf8ec2869c33e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 11:59:05 +0900 Subject: [PATCH 07/78] chore(deps): update rust crate toml to v0.8.17 (#9349) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [toml](https://togithub.com/toml-rs/toml) | workspace.dependencies | patch | `0.8.16` -> `0.8.17` | --- ### Release Notes
toml-rs/toml (toml) ### [`v0.8.17`](https://togithub.com/toml-rs/toml/compare/toml-v0.8.16...toml-v0.8.17) [Compare Source](https://togithub.com/toml-rs/toml/compare/toml-v0.8.16...toml-v0.8.17)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/swc-project/swc). --- Cargo.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fcc9d0fab9bc4..4aba70781c67b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5866,21 +5866,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.16" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c" +checksum = "7a44eede9b727419af8095cb2d72fab15487a541f54647ad4414b34096ee4631" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.17", + "toml_edit 0.22.18", ] [[package]] name = "toml_datetime" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -5900,15 +5900,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.17" +version = "0.22.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16" +checksum = "1490595c74d930da779e944f5ba2ecdf538af67df1a9848cbd156af43c1b7cf0" dependencies = [ "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.15", + "winnow 0.6.16", ] [[package]] @@ -6550,7 +6550,7 @@ dependencies = [ "serde_json", "serde_yaml", "thiserror", - "toml 0.8.16", + "toml 0.8.17", "url", ] @@ -6572,7 +6572,7 @@ dependencies = [ "serde_json", "serde_yaml", "thiserror", - "toml 0.8.16", + "toml 0.8.17", "url", ] @@ -7067,9 +7067,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.15" +version = "0.6.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557404e450152cd6795bb558bca69e43c585055f4606e3bcae5894fc6dac9ba0" +checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c" dependencies = [ "memchr", ] @@ -7116,7 +7116,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "toml 0.8.16", + "toml 0.8.17", "walkdir", ] From 0257359971a1b7203cec0dd730014d45049539c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 31 Jul 2024 13:32:00 +0900 Subject: [PATCH 08/78] chore: Disable nissuer --- .github/workflows/nissuer.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/nissuer.yml b/.github/workflows/nissuer.yml index a7769232e5f04..a9830026e6067 100644 --- a/.github/workflows/nissuer.yml +++ b/.github/workflows/nissuer.yml @@ -16,11 +16,13 @@ jobs: issue-validator: runs-on: ubuntu-latest steps: - - name: Nissuer - uses: balazsorban44/nissuer@1.10.0 - with: - reproduction-comment: ".github/invalid-link.md" - reproduction-hosts: "github.com,gist.github.com,play.swc.rs,evanw.github.io,lightningcss.dev,play.rust-lang.org,stackblitz.com" - reproduction-invalid-label: "invalid link" - reproduction-issue-labels: "C-bug" - reproduction-link-section: "### Playground link \\(or link to the minimal reproduction\\)(.*)### SWC Info output" + - uses: actions/checkout@v4 + + # - name: Nissuer + # uses: balazsorban44/nissuer@1.10.0 + # with: + # reproduction-comment: ".github/invalid-link.md" + # reproduction-hosts: "github.com,gist.github.com,play.swc.rs,evanw.github.io,lightningcss.dev,play.rust-lang.org,stackblitz.com" + # reproduction-invalid-label: "invalid link" + # reproduction-issue-labels: "C-bug" + # reproduction-link-section: "### Playground link \\(or link to the minimal reproduction\\)(.*)### SWC Info output" From e0da957eed9e60ad0f6c41d549da505d86fea655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 31 Jul 2024 13:34:12 +0900 Subject: [PATCH 09/78] chore: Revert action upgrade --- .github/workflows/nissuer.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/nissuer.yml b/.github/workflows/nissuer.yml index a9830026e6067..6d186b0c6fa54 100644 --- a/.github/workflows/nissuer.yml +++ b/.github/workflows/nissuer.yml @@ -16,13 +16,11 @@ jobs: issue-validator: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - # - name: Nissuer - # uses: balazsorban44/nissuer@1.10.0 - # with: - # reproduction-comment: ".github/invalid-link.md" - # reproduction-hosts: "github.com,gist.github.com,play.swc.rs,evanw.github.io,lightningcss.dev,play.rust-lang.org,stackblitz.com" - # reproduction-invalid-label: "invalid link" - # reproduction-issue-labels: "C-bug" - # reproduction-link-section: "### Playground link \\(or link to the minimal reproduction\\)(.*)### SWC Info output" + - name: Nissuer + uses: balazsorban44/nissuer@1.7.3 + with: + reproduction-comment: ".github/invalid-link.md" + reproduction-hosts: "github.com,gist.github.com,play.swc.rs,evanw.github.io,lightningcss.dev,play.rust-lang.org,stackblitz.com" + reproduction-invalid-label: "invalid link" + reproduction-issue-labels: "C-bug" + reproduction-link-section: "### Playground link \\(or link to the minimal reproduction\\)(.*)### SWC Info output" From 81d7d9d3dd078a9c5acbf14a37f0beae715ca11f Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Wed, 31 Jul 2024 08:03:18 +0200 Subject: [PATCH 10/78] chore: Typo in typescript_wasm README (#9354) --- bindings/binding_typescript_wasm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/binding_typescript_wasm/README.md b/bindings/binding_typescript_wasm/README.md index b122cd3612ec2..aff59a0bf0d6d 100644 --- a/bindings/binding_typescript_wasm/README.md +++ b/bindings/binding_typescript_wasm/README.md @@ -2,7 +2,7 @@ This package provides a Wasm binding for the TypeScript transform. -The supported TypeScript version is currently 5.5.4, execpt the stage 3 decorator proposal. +The supported TypeScript version is currently 5.5.4, except the stage 3 decorator proposal. ## Contributing From 24e87985d4f4cf69a1d4a184d02195c62ded5a7e Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Wed, 31 Jul 2024 04:03:04 -0400 Subject: [PATCH 11/78] fix(es/minifier): Preserve flags while dropping elements of `SeqExpr` (#8907) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 강동윤 (Donny) --- .changeset/gorgeous-ties-fail.md | 5 ++ Cargo.toml | 1 + crates/swc_ecma_minifier/Cargo.toml | 1 + crates/swc_ecma_minifier/src/compress/mod.rs | 1 - .../src/compress/optimize/mod.rs | 2 + .../src/compress/pure/misc.rs | 72 ++++++++++----- .../src/compress/pure/mod.rs | 9 +- crates/swc_ecma_minifier/src/eval.rs | 1 - crates/swc_ecma_minifier/src/lib.rs | 1 - .../tests/benches-full/terser.js | 3 +- .../tests/benches-full/victory.js | 3 +- .../tests/fixture/issues/2257/full/output.js | 89 ++++++++++--------- .../tests/fixture/issues/8907/input.js | 3 + .../tests/fixture/issues/8907/output.js | 2 + .../fixture/issues/quagga2/1.4.2/1/output.js | 6 +- .../tests/fixture/issues/vercel/007/output.js | 4 +- .../chunks/main-04b5934c26266542/output.js | 5 +- .../tests/projects/output/react-dom-17.0.2.js | 6 +- 18 files changed, 126 insertions(+), 88 deletions(-) create mode 100644 .changeset/gorgeous-ties-fail.md create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8907/input.js create mode 100644 crates/swc_ecma_minifier/tests/fixture/issues/8907/output.js diff --git a/.changeset/gorgeous-ties-fail.md b/.changeset/gorgeous-ties-fail.md new file mode 100644 index 0000000000000..1ff20908a3a4d --- /dev/null +++ b/.changeset/gorgeous-ties-fail.md @@ -0,0 +1,5 @@ +--- +swc_ecma_minifier: patch +--- + +dead_branch_remover removes PURE annotations on sequence expressions diff --git a/Cargo.toml b/Cargo.toml index 611c15cc4d544..93fc4dbc3c5e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,6 +66,7 @@ resolver = "2" copyless = "0.1.5" crc = "2.1.0" criterion = "0.5.1" + crossbeam-queue = "0.3.11" dashmap = "5.5.3" dialoguer = "0.10.2" difference = "2" diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index c193c3552997a..d5cff5410a2da 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -51,6 +51,7 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } tracing = { workspace = true } + swc_allocator = { version = "0.1.7", path = "../swc_allocator", default-features = false } swc_atoms = { version = "0.6.5", path = "../swc_atoms" } swc_common = { version = "0.36.0", path = "../swc_common" } diff --git a/crates/swc_ecma_minifier/src/compress/mod.rs b/crates/swc_ecma_minifier/src/compress/mod.rs index a9da8297f563f..9e926d5b8391a 100644 --- a/crates/swc_ecma_minifier/src/compress/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/mod.rs @@ -235,7 +235,6 @@ impl Compressor<'_> { let mut visitor = pure_optimizer( self.options, - None, self.marks, PureOptimizerConfig { enable_join_vars: self.pass > 1, diff --git a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs index e518cf303c2f5..9a382c04f42a5 100644 --- a/crates/swc_ecma_minifier/src/compress/optimize/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/optimize/mod.rs @@ -1817,7 +1817,9 @@ impl VisitMut for Optimizer<'_> { match e { Expr::Seq(seq) if seq.exprs.len() == 1 => { + let span = seq.span; *e = *seq.exprs[0].take(); + e.set_span(span); } Expr::Assign(AssignExpr { diff --git a/crates/swc_ecma_minifier/src/compress/pure/misc.rs b/crates/swc_ecma_minifier/src/compress/pure/misc.rs index 4060631768017..939727eb83fe4 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/misc.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/misc.rs @@ -870,7 +870,11 @@ impl Pure<'_> { } } - fn make_ignored_expr(&mut self, exprs: impl Iterator>) -> Option { + fn make_ignored_expr( + &mut self, + span: Span, + exprs: impl Iterator>, + ) -> Option { let mut exprs = exprs .filter_map(|mut e| { self.ignore_return_value( @@ -894,7 +898,9 @@ impl Pure<'_> { return None; } if exprs.len() == 1 { - return Some(*exprs.remove(0)); + let mut new = *exprs.remove(0); + new.set_span(span); + return Some(new); } Some( @@ -970,32 +976,41 @@ impl Pure<'_> { } } - Expr::Call(CallExpr { ctxt, args, .. }) if ctxt.has_mark(self.marks.pure) => { + Expr::Call(CallExpr { + span, ctxt, args, .. + }) if ctxt.has_mark(self.marks.pure) => { report_change!("ignore_return_value: Dropping a pure call"); self.changed = true; - let new = self.make_ignored_expr(args.take().into_iter().map(|arg| arg.expr)); + let new = + self.make_ignored_expr(*span, args.take().into_iter().map(|arg| arg.expr)); *e = new.unwrap_or(Invalid { span: DUMMY_SP }.into()); return; } - Expr::TaggedTpl(TaggedTpl { ctxt, tpl, .. }) if ctxt.has_mark(self.marks.pure) => { + Expr::TaggedTpl(TaggedTpl { + span, ctxt, tpl, .. + }) if ctxt.has_mark(self.marks.pure) => { report_change!("ignore_return_value: Dropping a pure call"); self.changed = true; - let new = self.make_ignored_expr(tpl.exprs.take().into_iter()); + let new = self.make_ignored_expr(*span, tpl.exprs.take().into_iter()); *e = new.unwrap_or(Invalid { span: DUMMY_SP }.into()); return; } - Expr::New(NewExpr { ctxt, args, .. }) if ctxt.has_mark(self.marks.pure) => { + Expr::New(NewExpr { + span, ctxt, args, .. + }) if ctxt.has_mark(self.marks.pure) => { report_change!("ignore_return_value: Dropping a pure call"); self.changed = true; - let new = - self.make_ignored_expr(args.take().into_iter().flatten().map(|arg| arg.expr)); + let new = self.make_ignored_expr( + *span, + args.take().into_iter().flatten().map(|arg| arg.expr), + ); *e = new.unwrap_or(Invalid { span: DUMMY_SP }.into()); return; @@ -1006,6 +1021,7 @@ impl Pure<'_> { match e { Expr::Call(CallExpr { + span, callee: Callee::Expr(callee), args, .. @@ -1014,20 +1030,23 @@ impl Pure<'_> { self.changed = true; report_change!("Dropping pure call as callee is pure"); *e = self - .make_ignored_expr(args.take().into_iter().map(|arg| arg.expr)) + .make_ignored_expr(*span, args.take().into_iter().map(|arg| arg.expr)) .unwrap_or(Invalid { span: DUMMY_SP }.into()); return; } } Expr::TaggedTpl(TaggedTpl { - tag: callee, tpl, .. + span, + tag: callee, + tpl, + .. }) => { if callee.is_pure_callee(&self.expr_ctx) { self.changed = true; report_change!("Dropping pure tag tpl as callee is pure"); *e = self - .make_ignored_expr(tpl.exprs.take().into_iter()) + .make_ignored_expr(*span, tpl.exprs.take().into_iter()) .unwrap_or(Invalid { span: DUMMY_SP }.into()); return; } @@ -1357,24 +1376,29 @@ impl Pure<'_> { if self.options.side_effects && self.options.pristine_globals { match e { - Expr::New(NewExpr { callee, args, .. }) - if callee.is_one_of_global_ref_to( - &self.expr_ctx, - &[ - "Map", "Set", "Array", "Object", "Boolean", "Number", "String", - ], - ) => + Expr::New(NewExpr { + span, callee, args, .. + }) if callee.is_one_of_global_ref_to( + &self.expr_ctx, + &[ + "Map", "Set", "Array", "Object", "Boolean", "Number", "String", + ], + ) => { report_change!("Dropping a pure new expression"); self.changed = true; *e = self - .make_ignored_expr(args.iter_mut().flatten().map(|arg| arg.expr.take())) + .make_ignored_expr( + *span, + args.iter_mut().flatten().map(|arg| arg.expr.take()), + ) .unwrap_or(Invalid { span: DUMMY_SP }.into()); return; } Expr::Call(CallExpr { + span, callee: Callee::Expr(callee), args, .. @@ -1387,7 +1411,7 @@ impl Pure<'_> { self.changed = true; *e = self - .make_ignored_expr(args.iter_mut().map(|arg| arg.expr.take())) + .make_ignored_expr(*span, args.iter_mut().map(|arg| arg.expr.take())) .unwrap_or(Invalid { span: DUMMY_SP }.into()); return; } @@ -1427,7 +1451,7 @@ impl Pure<'_> { } *e = self - .make_ignored_expr(exprs.into_iter()) + .make_ignored_expr(obj.span, exprs.into_iter()) .unwrap_or(Invalid { span: DUMMY_SP }.into()); report_change!("Ignored an object literal"); self.changed = true; @@ -1499,7 +1523,7 @@ impl Pure<'_> { } *e = self - .make_ignored_expr(exprs.into_iter()) + .make_ignored_expr(arr.span, exprs.into_iter()) .unwrap_or(Invalid { span: DUMMY_SP }.into()); report_change!("Ignored an array literal"); self.changed = true; @@ -1514,6 +1538,7 @@ impl Pure<'_> { // // foo(),basr(),foo; Expr::Member(MemberExpr { + span, obj, prop: MemberProp::Computed(prop), .. @@ -1526,6 +1551,7 @@ impl Pure<'_> { _ => { *e = self .make_ignored_expr( + *span, vec![obj.take(), prop.expr.take()].into_iter(), ) .unwrap_or(Invalid { span: DUMMY_SP }.into()); diff --git a/crates/swc_ecma_minifier/src/compress/pure/mod.rs b/crates/swc_ecma_minifier/src/compress/pure/mod.rs index 31a7450011f7e..78f702afee6b9 100644 --- a/crates/swc_ecma_minifier/src/compress/pure/mod.rs +++ b/crates/swc_ecma_minifier/src/compress/pure/mod.rs @@ -15,10 +15,7 @@ use self::{ctx::Ctx, misc::DropOpts}; use super::util::is_pure_undefined_or_null; #[cfg(feature = "debug")] use crate::debug::dump; -use crate::{ - debug::AssertValid, maybe_par, option::CompressOptions, program_data::ProgramData, - util::ModuleItemExt, -}; +use crate::{debug::AssertValid, maybe_par, option::CompressOptions, util::ModuleItemExt}; mod arrows; mod bools; @@ -52,7 +49,6 @@ pub(crate) struct PureOptimizerConfig { #[allow(clippy::needless_lifetimes)] pub(crate) fn pure_optimizer<'a>( options: &'a CompressOptions, - data: Option<&'a ProgramData>, marks: Marks, config: PureOptimizerConfig, ) -> impl 'a + VisitMut + Repeated { @@ -64,7 +60,6 @@ pub(crate) fn pure_optimizer<'a>( unresolved_ctxt: SyntaxContext::empty().apply_mark(marks.unresolved_mark), is_unresolved_ref_safe: false, }, - data, ctx: Default::default(), changed: Default::default(), } @@ -76,8 +71,6 @@ struct Pure<'a> { marks: Marks, expr_ctx: ExprCtx, - #[allow(unused)] - data: Option<&'a ProgramData>, ctx: Ctx, changed: bool, } diff --git a/crates/swc_ecma_minifier/src/eval.rs b/crates/swc_ecma_minifier/src/eval.rs index d5d25f3407694..2e11914aa6a95 100644 --- a/crates/swc_ecma_minifier/src/eval.rs +++ b/crates/swc_ecma_minifier/src/eval.rs @@ -242,7 +242,6 @@ impl Evaluator { { e.visit_mut_with(&mut pure_optimizer( &Default::default(), - None, self.marks, PureOptimizerConfig { enable_join_vars: false, diff --git a/crates/swc_ecma_minifier/src/lib.rs b/crates/swc_ecma_minifier/src/lib.rs index 54b9ea7d2334a..a792dd82fcd28 100644 --- a/crates/swc_ecma_minifier/src/lib.rs +++ b/crates/swc_ecma_minifier/src/lib.rs @@ -202,7 +202,6 @@ pub fn optimize( let mut v = pure_optimizer( c, - None, marks, PureOptimizerConfig { force_str_for_tpl: Minification.force_str_for_tpl(), diff --git a/crates/swc_ecma_minifier/tests/benches-full/terser.js b/crates/swc_ecma_minifier/tests/benches-full/terser.js index 6b065691d58f8..e8f57c059b2b7 100644 --- a/crates/swc_ecma_minifier/tests/benches-full/terser.js +++ b/crates/swc_ecma_minifier/tests/benches-full/terser.js @@ -4437,8 +4437,7 @@ let printed_comments = new Set(); var to_utf8 = options.ascii_only ? function(str, identifier = !1, regexp = !1) { return !(options.ecma >= 2015) || options.safari10 || regexp || (str = str.replace(/[\ud800-\udbff][\udc00-\udfff]/g, function(ch) { - return "\\u{" + // https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates - (is_surrogate_pair_head(ch.charCodeAt(0)) ? 0x10000 + (ch.charCodeAt(0) - 0xd800 << 10) + ch.charCodeAt(1) - 0xdc00 : ch.charCodeAt(0)).toString(16) + "}"; + return "\\u{" + (is_surrogate_pair_head(ch.charCodeAt(0)) ? 0x10000 + (ch.charCodeAt(0) - 0xd800 << 10) + ch.charCodeAt(1) - 0xdc00 : ch.charCodeAt(0)).toString(16) + "}"; })), str.replace(/[\u0000-\u001f\u007f-\uffff]/g, function(ch) { var code = ch.charCodeAt(0).toString(16); if (code.length <= 2 && !identifier) { diff --git a/crates/swc_ecma_minifier/tests/benches-full/victory.js b/crates/swc_ecma_minifier/tests/benches-full/victory.js index 9cffd3400e7a0..d3adac39d1103 100644 --- a/crates/swc_ecma_minifier/tests/benches-full/victory.js +++ b/crates/swc_ecma_minifier/tests/benches-full/victory.js @@ -11730,8 +11730,7 @@ object-assign // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; - return Array.isArray(propValue) ? 'array' : propValue instanceof RegExp ? 'object' : // Native Symbol. - 'symbol' === propType || propValue && ('Symbol' === propValue['@@toStringTag'] || 'function' == typeof Symbol && propValue instanceof Symbol) ? 'symbol' : propType; + return Array.isArray(propValue) ? 'array' : propValue instanceof RegExp ? 'object' : 'symbol' === propType || propValue && ('Symbol' === propValue['@@toStringTag'] || 'function' == typeof Symbol && propValue instanceof Symbol) ? 'symbol' : propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/2257/full/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/2257/full/output.js index 0dec27404a6cc..7cab0d8994e19 100644 --- a/crates/swc_ecma_minifier/tests/fixture/issues/2257/full/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/issues/2257/full/output.js @@ -75,11 +75,11 @@ }; exports.default = function(param) { var componentStack = param.componentStack, error = param.error; - return _jsxRuntime.jsxs("div", { + return /*#__PURE__*/ _jsxRuntime.jsxs("div", { style: style, title: "".concat(error.toString(), "\n\nThis is located at:").concat(componentStack), children: [ - _jsxRuntime.jsxs("svg", { + /*#__PURE__*/ _jsxRuntime.jsxs("svg", { viewBox: "0 0 1024 1024", version: "1.1", xmlns: "http://www.w3.org/2000/svg", @@ -87,19 +87,19 @@ width: "60", height: "60", children: [ - _jsxRuntime.jsx("path", { + /*#__PURE__*/ _jsxRuntime.jsx("path", { d: "M1024 512C1024 229.23 794.77 0 512 0S0 229.23 0 512s229.23 512 512 512c117.41 0 228.826-39.669 318.768-111.313 10.79-8.595 12.569-24.308 3.975-35.097-8.594-10.789-24.308-12.568-35.097-3.974C718.47 938.277 618.002 974.049 512 974.049 256.818 974.049 49.951 767.182 49.951 512S256.818 49.951 512 49.951 974.049 256.818 974.049 512c0 87.493-24.334 171.337-69.578 243.96-7.294 11.708-3.716 27.112 7.992 34.405 11.707 7.294 27.11 3.716 34.405-7.991C997.014 701.88 1024 608.898 1024 512z", "p-id": "844", fill: "#cdcdcd" }), - _jsxRuntime.jsx("path", { + /*#__PURE__*/ _jsxRuntime.jsx("path", { d: "M337.17 499.512c34.485 0 62.44-27.955 62.44-62.439s-27.955-62.439-62.44-62.439c-34.483 0-62.438 27.955-62.438 62.44 0 34.483 27.955 62.438 62.439 62.438z m374.635 0c34.484 0 62.439-27.955 62.439-62.439s-27.955-62.439-62.44-62.439c-34.483 0-62.438 27.955-62.438 62.44 0 34.483 27.955 62.438 62.439 62.438zM352.788 704.785c43.377-34.702 100.364-55.425 171.7-55.425 71.336 0 128.322 20.723 171.7 55.425 26.513 21.21 42.695 42.786 50.444 58.284 6.168 12.337 1.168 27.34-11.17 33.508-12.337 6.169-27.34 1.168-33.508-11.17-0.918-1.834-3.462-6.024-7.788-11.793-7.564-10.084-17.239-20.269-29.183-29.824-34.671-27.737-80.71-44.478-140.495-44.478-59.786 0-105.824 16.74-140.496 44.478-11.944 9.555-21.619 19.74-29.182 29.824-4.327 5.769-6.87 9.959-7.788 11.794-6.169 12.337-21.171 17.338-33.509 11.17-12.337-6.17-17.338-21.172-11.169-33.509 7.75-15.498 23.931-37.074 50.444-58.284z", "p-id": "845", fill: "#cdcdcd" }) ] }), - _jsxRuntime.jsx("h3", { + /*#__PURE__*/ _jsxRuntime.jsx("h3", { children: "Oops! Something went wrong." }) ] @@ -144,7 +144,7 @@ value: function() { var _props = this.props, children = _props.children, Fallback = _props.Fallback, _state = this.state, error = _state.error, info = _state.info; return(// render fallback UI if there is error - null !== error && "function" == typeof Fallback ? _jsxRuntime.jsx(Fallback, { + null !== error && "function" == typeof Fallback ? /*#__PURE__*/ _jsxRuntime.jsx(Fallback, { componentStack: info && info.componentStack, error: error }) : children || null); @@ -195,7 +195,10 @@ Object.defineProperty(exports, "__esModule", { value: !0 }), exports.runApp = function(appConfig) { - _appConfig.setAppConfig(appConfig), _loadStaticModules.default(appConfig), process.env.__IS_SERVER__ || (// set History before GID + // store appConfig in case of server side render + // server bundle will to get appConfig after run runApp + _appConfig.setAppConfig(appConfig), // load static modules before init runtime such as request + _loadStaticModules.default(appConfig), process.env.__IS_SERVER__ || (// set History before GID _createAppShared.initHistory && _createAppShared.initHistory(appConfig), _reactAppRenderer.default({ appConfig: appConfig, buildConfig: buildConfig, @@ -238,21 +241,21 @@ Object.defineProperty(exports, "__esModule", { value: !0 }), exports.Provider = exports.withAuth = exports.useAuth = void 0; - var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _react = __webpack_require__(59301), Context = _react.createContext(null), useAuth = function() { + var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _react = __webpack_require__(59301), Context = /*#__PURE__*/ _react.createContext(null), useAuth = function() { return _react.useContext(Context); }; exports.useAuth = useAuth, exports.withAuth = // class 组件支持 Hoc 用法 function(Component) { return function(props) { var ref = useAuth(), auth = ref[0], setAuth = ref[1]; - return _jsxRuntime.jsx(Component, swcHelpers.objectSpread({}, props, { + return /*#__PURE__*/ _jsxRuntime.jsx(Component, swcHelpers.objectSpread({}, props, { auth: auth, setAuth: setAuth })); }; }, exports.Provider = function(param) { var _value = param.value, children = param.children, ref = _react.useState(void 0 === _value ? {} : _value), state = ref[0], setState = ref[1]; - return _jsxRuntime.jsx(Context.Provider, { + return /*#__PURE__*/ _jsxRuntime.jsx(Context.Provider, { value: [ state, function(param) { @@ -273,7 +276,7 @@ var context = param.context, appConfig = param.appConfig, addProvider = param.addProvider, wrapperPageComponent = param.wrapperPageComponent, initialAuth = (context && context.initialData ? context.initialData : {}).auth || {}, authConfig = appConfig.auth || {}; addProvider(function(param) { var children = param.children; - return _jsxRuntime.jsx(_auth.Provider, { + return /*#__PURE__*/ _jsxRuntime.jsx(_auth.Provider, { value: initialAuth, children: children }); @@ -289,7 +292,7 @@ if (pageConfigAuth && !Array.isArray(pageConfigAuth)) throw Error("pageConfig.auth must be an array"); return Array.isArray(pageConfigAuth) && pageConfigAuth.length && !Object.keys(auth).filter(function(item) { return !!pageConfigAuth.includes(item) && auth[item]; - }).length ? authConfig.NoAuthFallback ? "function" == typeof authConfig.NoAuthFallback ? _jsxRuntime.jsx(authConfig.NoAuthFallback, {}) : authConfig.NoAuthFallback : null : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, rest)); + }).length ? authConfig.NoAuthFallback ? "function" == typeof authConfig.NoAuthFallback ? /*#__PURE__*/ _jsxRuntime.jsx(authConfig.NoAuthFallback, {}) : authConfig.NoAuthFallback : null : /*#__PURE__*/ _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, rest)); }); }); }; @@ -363,7 +366,7 @@ wrapperPageComponent(function(PageComponent) { return function(props) { var searchParams = parseSearchParams && applyRuntimeAPI("getSearchParams"); - return _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, { + return /*#__PURE__*/ _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, { searchParams: searchParams }))); }; @@ -376,11 +379,11 @@ }), wrapperPageComponent(process.env.__IS_SERVER__ ? _formatRoutes.wrapperPageWithSSR(context) : _formatRoutes.wrapperPageWithCSR()), wrapperPageComponent(function(PageComponent) { var _pageConfig = PageComponent.pageConfig, pageConfig = void 0 === _pageConfig ? {} : _pageConfig; return function(props) { - return pageConfig.errorBoundary ? _jsxRuntime.jsx(_errorBoundary.default, { + return pageConfig.errorBoundary ? /*#__PURE__*/ _jsxRuntime.jsx(_errorBoundary.default, { Fallback: ErrorBoundaryFallback, onError: onErrorBoundaryHandler, - children: _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props)) - }) : _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props)); + children: /*#__PURE__*/ _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props)) + }) : /*#__PURE__*/ _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, props)); }; }), appConfigRouter.modifyRoutes && modifyRoutes(appConfigRouter.modifyRoutes); var lazy = buildConfig && buildConfig.router && buildConfig.router.lazy; @@ -403,8 +406,8 @@ var fallback = routerProps.fallback, restRouterProps = swcHelpers.objectWithoutProperties(routerProps, [ "fallback" ]); - return _jsxRuntime.jsx(_router.IceRouter, swcHelpers.objectSpread({}, restRouterProps, { - children: RoutesComponent ? _jsxRuntime.jsx(RoutesComponent, { + return /*#__PURE__*/ _jsxRuntime.jsx(_router.IceRouter, swcHelpers.objectSpread({}, restRouterProps, { + children: RoutesComponent ? /*#__PURE__*/ _jsxRuntime.jsx(RoutesComponent, { routes: _router.parseRoutes(routes, fallback), fallback: fallback }) : null @@ -426,14 +429,14 @@ if (!renderChildren && props.routes) { // parse routes before render var parsedRoutes = parseRoutes(props.routes, props.fallback); - renderChildren = _jsxRuntime.jsx(Routes, { + renderChildren = /*#__PURE__*/ _jsxRuntime.jsx(Routes, { routes: parsedRoutes, fallback: props.fallback }); } - return "static" === type ? _jsxRuntime.jsx(_reactRouterDom.StaticRouter, swcHelpers.objectSpread({}, others, { + return "static" === type ? /*#__PURE__*/ _jsxRuntime.jsx(_reactRouterDom.StaticRouter, swcHelpers.objectSpread({}, others, { children: renderChildren - })) : _jsxRuntime.jsx(_reactRouterDom.Router, swcHelpers.objectSpread({}, others, { + })) : /*#__PURE__*/ _jsxRuntime.jsx(_reactRouterDom.Router, swcHelpers.objectSpread({}, others, { children: renderChildren })); }, exports.Routes = Routes; @@ -469,7 +472,7 @@ setComponentAttr(comp, route), wrapperRoute(comp, routerWrappers)); }, fallback: fallback - }) : __LAZY__ ? _react.lazy(function() { + }) : __LAZY__ ? /*#__PURE__*/ _react.lazy(function() { return dynamicImport().then(function(mod) { if (routerWrappers && routerWrappers.length) { var comp = mod.default; @@ -486,22 +489,22 @@ } function Routes(param) { var routes = param.routes, fallback = param.fallback; - return _jsxRuntime.jsx(_reactRouterDom.Switch, { + return /*#__PURE__*/ _jsxRuntime.jsx(_reactRouterDom.Switch, { children: routes.map(function(route, id) { var children = route.children; if (children) { var LayoutComponent = route.component, children = route.children, others = swcHelpers.objectWithoutProperties(route, [ "component", "children" - ]), routesComponent = _jsxRuntime.jsx(Routes, { + ]), routesComponent = /*#__PURE__*/ _jsxRuntime.jsx(Routes, { routes: children, fallback: fallback }), RenderComponent = function(props) { - return LayoutComponent ? _jsxRuntime.jsx(LayoutComponent, swcHelpers.objectSpread({}, props, { + return LayoutComponent ? /*#__PURE__*/ _jsxRuntime.jsx(LayoutComponent, swcHelpers.objectSpread({}, props, { children: routesComponent })) : routesComponent; }; - return _jsxRuntime.jsx(_reactRouterDom.Route, swcHelpers.objectSpread({}, others, { + return /*#__PURE__*/ _jsxRuntime.jsx(_reactRouterDom.Route, swcHelpers.objectSpread({}, others, { render: RenderComponent }), id); } @@ -509,7 +512,7 @@ var redirect = route.redirect, others = swcHelpers.objectWithoutProperties(route, [ "redirect" ]); - return _jsxRuntime.jsx(_reactRouterDom.Redirect, swcHelpers.objectSpread({ + return /*#__PURE__*/ _jsxRuntime.jsx(_reactRouterDom.Redirect, swcHelpers.objectSpread({ from: route.path, to: redirect }, others), id); @@ -524,14 +527,14 @@ var RenderComponent = process.env.__IS_SERVER__ || window.__ICE_SSR_ENABLED__ ? function(props) { /*#__PURE__*/ return _jsxRuntime.jsx(RouteComponent, swcHelpers.objectSpread({}, props)); } : function(props) { - return _jsxRuntime.jsx(_react.Suspense, { - fallback: fallback || _jsxRuntime.jsx("div", { + return /*#__PURE__*/ _jsxRuntime.jsx(_react.Suspense, { + fallback: fallback || /*#__PURE__*/ _jsxRuntime.jsx("div", { children: "loading" }), - children: _jsxRuntime.jsx(RouteComponent, swcHelpers.objectSpread({}, props)) + children: /*#__PURE__*/ _jsxRuntime.jsx(RouteComponent, swcHelpers.objectSpread({}, props)) }); }; - return _jsxRuntime.jsx(_reactRouterDom.Route, swcHelpers.objectSpread({}, others, { + return /*#__PURE__*/ _jsxRuntime.jsx(_reactRouterDom.Route, swcHelpers.objectSpread({}, others, { render: RenderComponent }), id); }) @@ -561,7 +564,7 @@ var pageInitialProps = swcHelpers.objectSpread({}, context.pageInitialProps); return function(PageComponent) { return function(props) { - return _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, pageInitialProps))); + return /*#__PURE__*/ _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, pageInitialProps))); }; }; }, exports.wrapperPageWithCSR = function() { @@ -590,7 +593,7 @@ } }, _callee); }))(); - }, []), _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, data))); + }, []), /*#__PURE__*/ _jsxRuntime.jsx(PageComponent, swcHelpers.objectSpread({}, Object.assign({}, props, data))); }; }; }; @@ -625,21 +628,21 @@ }), exports.default = void 0; var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _indexModuleScss = swcHelpers.interopRequireDefault(__webpack_require__(89704)); exports.default = function() { - return _jsxRuntime.jsxs("div", { + return /*#__PURE__*/ _jsxRuntime.jsxs("div", { className: _indexModuleScss.default.container, children: [ - _jsxRuntime.jsx("h2", { + /*#__PURE__*/ _jsxRuntime.jsx("h2", { className: _indexModuleScss.default.title, children: "Welcome to icejs!" }), - _jsxRuntime.jsx("p", { + /*#__PURE__*/ _jsxRuntime.jsx("p", { className: _indexModuleScss.default.description, children: "This is a awesome project, enjoy it!" }), - _jsxRuntime.jsxs("div", { + /*#__PURE__*/ _jsxRuntime.jsxs("div", { className: _indexModuleScss.default.action, children: [ - _jsxRuntime.jsx("a", { + /*#__PURE__*/ _jsxRuntime.jsx("a", { href: "https://ice.work/docs/guide/about", target: "_blank", rel: "noopener noreferrer", @@ -648,7 +651,7 @@ }, children: "使用文档" }), - _jsxRuntime.jsx("a", { + /*#__PURE__*/ _jsxRuntime.jsx("a", { href: "https://github.com/ice-lab/icejs", target: "_blank", rel: "noopener noreferrer", @@ -667,7 +670,7 @@ }), exports.default = void 0; var swcHelpers = __webpack_require__(547), _jsxRuntime = __webpack_require__(37712), _guide = swcHelpers.interopRequireDefault(__webpack_require__(56905)); exports.default = function() { - return console.log(1), _jsxRuntime.jsx(_guide.default, {}); + return console.log(1), /*#__PURE__*/ _jsxRuntime.jsx(_guide.default, {}); }; /***/ }, /***/ 72791: /***/ function(__unused_webpack_module, exports, __webpack_require__) { @@ -18922,7 +18925,11 @@ (this.arg = undefined), ContinueSentinel; } }, exports; - }(module.exports); + }(// If this script is executing as a CommonJS module, use module.exports + // as the regeneratorRuntime namespace. Otherwise create a new empty + // object. Either way, the resulting object will be used to initialize + // the regeneratorRuntime variable at the top of this file. + module.exports); try { regeneratorRuntime = runtime; } catch (accidentalStrictMode) { diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8907/input.js b/crates/swc_ecma_minifier/tests/fixture/issues/8907/input.js new file mode 100644 index 0000000000000..b8930bb7fb4a3 --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8907/input.js @@ -0,0 +1,3 @@ +const used =/*#__PURE__*/ (0, forwardRef)(/* harden */Foo); + +export default used \ No newline at end of file diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/8907/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/8907/output.js new file mode 100644 index 0000000000000..1400e302c094d --- /dev/null +++ b/crates/swc_ecma_minifier/tests/fixture/issues/8907/output.js @@ -0,0 +1,2 @@ +const used = /*#__PURE__*/ forwardRef(/* harden */ Foo); +export default used; diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/quagga2/1.4.2/1/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/quagga2/1.4.2/1/output.js index ee9d2bf90865b..067a21dbc29ab 100644 --- a/crates/swc_ecma_minifier/tests/fixture/issues/quagga2/1.4.2/1/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/issues/quagga2/1.4.2/1/output.js @@ -4395,7 +4395,11 @@ (this.arg = undefined), ContinueSentinel; } }, exports1; - }(module1.exports); + }(// If this script is executing as a CommonJS module, use module.exports + // as the regeneratorRuntime namespace. Otherwise create a new empty + // object. Either way, the resulting object will be used to initialize + // the regeneratorRuntime variable at the top of this file. + module1.exports); try { regeneratorRuntime = runtime; } catch (accidentalStrictMode) { diff --git a/crates/swc_ecma_minifier/tests/fixture/issues/vercel/007/output.js b/crates/swc_ecma_minifier/tests/fixture/issues/vercel/007/output.js index a6fa3efdc8834..e941547337f69 100644 --- a/crates/swc_ecma_minifier/tests/fixture/issues/vercel/007/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/issues/vercel/007/output.js @@ -9,7 +9,7 @@ import _JSXStyle from "styled-jsx/style"; top ? "column" : "column-reverse" ] ] - ]), Sidebar, _JSXStyle.dynamic([ + ]), /*#__PURE__*/ Sidebar, /*#__PURE__*/ _JSXStyle.dynamic([ [ "4507deac72c40d6c", [ @@ -19,4 +19,4 @@ import _JSXStyle from "styled-jsx/style"; top ? "column" : "column-reverse" ] ] - ]), top ? "column" : "column-reverse"))({}); + ]), /*#__PURE__*/ top ? "column" : "column-reverse"))({}); diff --git a/crates/swc_ecma_minifier/tests/fixture/next/target-es2015/static/chunks/main-04b5934c26266542/output.js b/crates/swc_ecma_minifier/tests/fixture/next/target-es2015/static/chunks/main-04b5934c26266542/output.js index 43f832294eb80..fab0b78f62377 100644 --- a/crates/swc_ecma_minifier/tests/fixture/next/target-es2015/static/chunks/main-04b5934c26266542/output.js +++ b/crates/swc_ecma_minifier/tests/fixture/next/target-es2015/static/chunks/main-04b5934c26266542/output.js @@ -313,7 +313,8 @@ if (// With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time // So, this is how we do it in the client side at runtime __webpack_require__.p = "".concat(prefix, "/_next/") //eslint-disable-line - , _runtimeConfig.setConfig({ + , // Initialize next/config with the environment configuration + _runtimeConfig.setConfig({ serverRuntimeConfig: {}, publicRuntimeConfig: initialData.runtimeConfig || {} }), asPath = _utils.getURL(), _hasBasePath.hasBasePath(asPath) && (asPath = _removeBasePath.removeBasePath(asPath)), initialData.scriptLoader) { @@ -748,7 +749,7 @@ }; }, [ type - ]), portalNode ? _reactDom.createPortal(children, portalNode) : null; + ]), portalNode ? /*#__PURE__*/ _reactDom.createPortal(children, portalNode) : null; }, ("function" == typeof exports.default || "object" == typeof exports.default && null !== exports.default) && void 0 === exports.default.__esModule && (Object.defineProperty(exports.default, "__esModule", { value: !0 }), Object.assign(exports.default, exports), module.exports = exports.default); diff --git a/crates/swc_ecma_minifier/tests/projects/output/react-dom-17.0.2.js b/crates/swc_ecma_minifier/tests/projects/output/react-dom-17.0.2.js index 3a6e16795cc97..cecdd5659b733 100644 --- a/crates/swc_ecma_minifier/tests/projects/output/react-dom-17.0.2.js +++ b/crates/swc_ecma_minifier/tests/projects/output/react-dom-17.0.2.js @@ -6232,13 +6232,11 @@ case 5: var type = fiber.type; fiber.pendingProps; - var instance = 1 !== nextInstance.nodeType || type.toLowerCase() !== nextInstance.nodeName.toLowerCase() ? null : nextInstance // This has now been refined to an element node. - ; + var instance = 1 !== nextInstance.nodeType || type.toLowerCase() !== nextInstance.nodeName.toLowerCase() ? null : nextInstance; if (null !== instance) return fiber.stateNode = instance, !0; return !1; case 6: - var textInstance = "" === fiber.pendingProps || 3 !== nextInstance.nodeType ? null : nextInstance // This has now been refined to a text node. - ; + var textInstance = "" === fiber.pendingProps || 3 !== nextInstance.nodeType ? null : nextInstance; if (null !== textInstance) return fiber.stateNode = textInstance, !0; return !1; default: From 3ee82e223fe0ce54ad892cc5b009f573d997c60e Mon Sep 17 00:00:00 2001 From: magic-akari Date: Wed, 31 Jul 2024 21:33:33 +0800 Subject: [PATCH 12/78] fix(es/typescript): Fix ASI in expression for fast strip (#9358) - Closes #9355 --- .changeset/polite-tools-lie.md | 5 ++ crates/swc_fast_ts_strip/src/lib.rs | 50 ++++++++++++++++++- .../tests/fixture/issue-9355.js | 20 ++++++++ .../tests/fixture/issue-9355.transform.js | 14 ++++++ .../tests/fixture/issue-9355.ts | 20 ++++++++ 5 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 .changeset/polite-tools-lie.md create mode 100644 crates/swc_fast_ts_strip/tests/fixture/issue-9355.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/issue-9355.transform.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/issue-9355.ts diff --git a/.changeset/polite-tools-lie.md b/.changeset/polite-tools-lie.md new file mode 100644 index 0000000000000..a40ab95d6b405 --- /dev/null +++ b/.changeset/polite-tools-lie.md @@ -0,0 +1,5 @@ +--- +swc_fast_ts_strip: patch +--- + +fix(es/typescript): Fix ASI in expression for TypeScript strip diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index 36880b166c9ce..ac851cb54b001 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -389,13 +389,21 @@ impl TsStrip { .. } = &self.tokens[index - 1]; - let index = self.get_prev_token_index(span.hi); + let index = self.get_prev_token_index(span.hi - BytePos(1)); if index == self.tokens.len() - 1 { // Skip if the token is the last token. return; } - let TokenAndSpan { token, .. } = &self.tokens[index + 1]; + let TokenAndSpan { + token, + had_line_break, + .. + } = &self.tokens[index + 1]; + + if !*had_line_break { + return; + } // Add a semicolon if the next token is `[`, `(`, `/`, `+`, or `-` match token { @@ -413,6 +421,23 @@ impl TsStrip { _ => {} } } + + fn fix_asi_in_expr(&mut self, span: Span) { + let index = self.get_prev_token_index(span.hi - BytePos(1)); + if index == self.tokens.len() - 1 { + return; + } + + if let TokenAndSpan { + // Only `([` affect ASI. + token: Token::LParen | Token::LBracket, + had_line_break: true, + .. + } = &self.tokens[index + 1] + { + self.add_overwrite(span.lo, b';'); + } + } } impl Visit for TsStrip { @@ -708,6 +733,16 @@ impl Visit for TsStrip { fn visit_ts_as_expr(&mut self, n: &TsAsExpr) { self.add_replacement(span(n.expr.span().hi, n.span.hi)); + let TokenAndSpan { + token, + span: as_span, + .. + } = self.get_next_token(n.expr.span_hi()); + debug_assert_eq!( + token, + &Token::Word(Word::Ident(IdentLike::Known(KnownIdent::As))) + ); + self.fix_asi_in_expr(span(as_span.lo, n.span.hi)); n.expr.visit_children_with(self); } @@ -820,6 +855,17 @@ impl Visit for TsStrip { fn visit_ts_satisfies_expr(&mut self, n: &TsSatisfiesExpr) { self.add_replacement(span(n.expr.span().hi, n.span.hi)); + let TokenAndSpan { + token, + span: as_span, + .. + } = self.get_next_token(n.expr.span_hi()); + debug_assert_eq!( + token, + &Token::Word(Word::Ident(IdentLike::Known(KnownIdent::Satisfies))) + ); + self.fix_asi_in_expr(span(as_span.lo, n.span.hi)); + n.expr.visit_children_with(self); } diff --git a/crates/swc_fast_ts_strip/tests/fixture/issue-9355.js b/crates/swc_fast_ts_strip/tests/fixture/issue-9355.js new file mode 100644 index 0000000000000..baa2f5f894e32 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/issue-9355.js @@ -0,0 +1,20 @@ +const x1 = 10 ; +(1) + +const x2 = (10); +(1) + +const x3 = 10 ; +(1) + +const x4 = (10); +(1) + +const y = 10 + + 1 + +const z = 10 + / 1 + +const w = 10 ; +[1]; diff --git a/crates/swc_fast_ts_strip/tests/fixture/issue-9355.transform.js b/crates/swc_fast_ts_strip/tests/fixture/issue-9355.transform.js new file mode 100644 index 0000000000000..bc5a37b4e3500 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/issue-9355.transform.js @@ -0,0 +1,14 @@ +const x1 = 10; +1; +const x2 = 10; +1; +const x3 = 10; +1; +const x4 = 10; +1; +const y = 10 + 1; +const z = 10 / 1; +const w = 10; +[ + 1 +]; diff --git a/crates/swc_fast_ts_strip/tests/fixture/issue-9355.ts b/crates/swc_fast_ts_strip/tests/fixture/issue-9355.ts new file mode 100644 index 0000000000000..bb396d8ab9d88 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/issue-9355.ts @@ -0,0 +1,20 @@ +const x1 = 10 as any +(1) + +const x2 = (10)as any +(1) + +const x3 = 10 satisfies any +(1) + +const x4 = (10)satisfies any +(1) + +const y = 10 as any + + 1 + +const z = 10 as any + / 1 + +const w = 10 as any +[1]; From 845c4010d716757bf2ebb85830d51e23fa90f0d4 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 31 Jul 2024 14:38:24 +0000 Subject: [PATCH 13/78] chore: Publish crates --- .changeset/gorgeous-ties-fail.md | 5 ----- .changeset/polite-tools-lie.md | 5 ----- Cargo.lock | 4 ++-- crates/swc_ecma_minifier/Cargo.toml | 2 +- crates/swc_fast_ts_strip/Cargo.toml | 2 +- 5 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 .changeset/gorgeous-ties-fail.md delete mode 100644 .changeset/polite-tools-lie.md diff --git a/.changeset/gorgeous-ties-fail.md b/.changeset/gorgeous-ties-fail.md deleted file mode 100644 index 1ff20908a3a4d..0000000000000 --- a/.changeset/gorgeous-ties-fail.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_ecma_minifier: patch ---- - -dead_branch_remover removes PURE annotations on sequence expressions diff --git a/.changeset/polite-tools-lie.md b/.changeset/polite-tools-lie.md deleted file mode 100644 index a40ab95d6b405..0000000000000 --- a/.changeset/polite-tools-lie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_fast_ts_strip: patch ---- - -fix(es/typescript): Fix ASI in expression for TypeScript strip diff --git a/Cargo.lock b/Cargo.lock index 4aba70781c67b..c7e1695900ec0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4549,7 +4549,7 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.200.4" +version = "0.200.5" dependencies = [ "ansi_term", "anyhow", @@ -5094,7 +5094,7 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.3" +version = "0.4.4" dependencies = [ "anyhow", "codspeed-criterion-compat", diff --git a/crates/swc_ecma_minifier/Cargo.toml b/crates/swc_ecma_minifier/Cargo.toml index d5cff5410a2da..e2cb9864f99ed 100644 --- a/crates/swc_ecma_minifier/Cargo.toml +++ b/crates/swc_ecma_minifier/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"] license = "Apache-2.0" name = "swc_ecma_minifier" repository = "https://github.com/swc-project/swc.git" -version = "0.200.4" +version = "0.200.5" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index 4cc69262e10b8..0562d8deb32be 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_ts_strip" repository = { workspace = true } -version = "0.4.3" +version = "0.4.4" [dependencies] From c979849177ca42d5e729c051031533b6df4e9fb1 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 31 Jul 2024 14:45:42 +0000 Subject: [PATCH 14/78] chore: Publish `1.7.4-nightly-20240731.1` with `swc_core` `v0.99.5` --- bindings/Cargo.lock | 24 +++++++++---------- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 38 insertions(+), 38 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 431593620f27d..7f50c83d0920d 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.4-nightly-20240729.1" +version = "1.7.4-nightly-20240731.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.4-nightly-20240729.1" +version = "1.7.4-nightly-20240731.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.4-nightly-20240729.1" +version = "1.7.4-nightly-20240731.1" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.341" +version = "0.91.342" dependencies = [ "anyhow", "swc_cli_impl", @@ -3221,9 +3221,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.154.3" +version = "0.154.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808d1e5a3c923fe0fa6cd9c28af4ecb7e713b97231fe0914d89c00f6a7dca2e5" +checksum = "7badcda2c45056495ed94b957884099cb000470ae7901ba68db2e7fd48414a4b" dependencies = [ "memchr", "num-bigint", @@ -3502,9 +3502,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.200.3" +version = "0.200.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d42f3f6f5e975f472e422195b5f20c6968ee23f195358737e180324d7eb0bb46" +checksum = "b92feddb27f3ad89dd296696f55e04f8e96cdc778df95a73a6f06664bf6919f3" dependencies = [ "arrayvec", "indexmap 2.2.6", @@ -3790,9 +3790,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.194.2" +version = "0.194.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1405b179495c3d9530f84778f8c27706c9a2bd7ec820cdd16264d275a2cac0c" +checksum = "4f73c4ae3eb15adc5865dc729c4e111040529cec5a349d56ed0b4a0de1a86242" dependencies = [ "ryu-js", "serde", @@ -3807,9 +3807,9 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.29.2" +version = "0.29.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56f2dc6fc854b01c878f0bc6425277b4241a4593ea156a084bd5fc723c84bb2" +checksum = "38f583b8db3cb9848537bd6f91c75398407e64332aee982337fe62ea4dec7e7b" dependencies = [ "indexmap 2.2.6", "rustc-hash", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 933ffe27e218e..7339087c7a95d 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4-nightly-20240729.1" +version = "1.7.4-nightly-20240731.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index f461c82736fc2..bac5940c6b70a 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4-nightly-20240729.1" +version = "1.7.4-nightly-20240731.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index e288115b3ba6c..019c9c886414a 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4-nightly-20240729.1" +version = "1.7.4-nightly-20240731.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 4fc9d9cc4ba8f..3906eb7ff0022 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.341" +version = "0.91.342" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 4ec275347dad4..108769b3ff575 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 4b84a0eb40850..bf5370060a039 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 02766c16ffac7..17d0475811079 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 3b011a158ab42..304fbc11deb4d 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 7401188278a20..e19a354f9d76d 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 510d6362a1797..d85a69af8602f 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index c8e960bff3997..337e2819b7d66 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index aa2773f43e44b..3ab2e0bedba6c 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index a353a4cecf54e..68aeba3a63d00 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 7cf97583b70a7..5a8d2f6e23aaf 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 556029b3cc5ed..8924242d89ad6 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 0342f35ba4173..7631d4306a8b2 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 9dcf40daeb92d..1493c05fc3890 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index aba89d341ac45..211c2a7cd707e 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 95bfab377d056..a395fbef0406c 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 6090c0582f090..52c7817c86ea9 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 01924db908001..1ae7cd706cabb 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 768c04df9bfc4..0a28a0876a267 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index a19473edde428..d8ab2fc647d7c 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 51faf20cb53f4..b66d4c84172f0 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 91fc82688b37b..d042ab108c2bc 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 8eba1aeed404e..8000b81ed4cb0 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.4-nightly-20240729.1", + "version": "1.7.4-nightly-20240731.1", "os": [ "win32" ], From 0ad789f388b3c58ba91509c0874d0b27c1c42fbb Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 31 Jul 2024 14:45:43 +0000 Subject: [PATCH 15/78] chore: Update changelog --- CHANGELOG.md | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 473402258f61a..6293f626f0b1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,20 @@ +- **(es/codegen)** Emit question token for class methods ([#9342](https://github.com/swc-project/swc/issues/9342)) ([636585b](https://github.com/swc-project/swc/commit/636585b44d0f74f457b44766f8d6fda68bcc4c09)) + + - **(es/minifier)** Fix detection of `this` ([#9339](https://github.com/swc-project/swc/issues/9339)) ([77da7cf](https://github.com/swc-project/swc/commit/77da7cf24bad5064206ab3e6dc248012d08576cf)) - **(es/minifier)** Fix analysis of for-in/of ([#9340](https://github.com/swc-project/swc/issues/9340)) ([1454ab5](https://github.com/swc-project/swc/commit/1454ab54c112c25ca03cbb866aacbd41a16ee60a)) + +- **(es/minifier)** Preserve flags while dropping elements of `SeqExpr` ([#8907](https://github.com/swc-project/swc/issues/8907)) ([24e8798](https://github.com/swc-project/swc/commit/24e87985d4f4cf69a1d4a184d02195c62ded5a7e)) + + +- **(es/typescript)** Fix ASI in expression for fast strip ([#9358](https://github.com/swc-project/swc/issues/9358)) ([3ee82e2](https://github.com/swc-project/swc/commit/3ee82e223fe0ce54ad892cc5b009f573d997c60e)) + ### Documentation @@ -22,6 +31,12 @@ - **(deps)** Update rust crate toml to v0.8.16 ([#9327](https://github.com/swc-project/swc/issues/9327)) ([67aadfa](https://github.com/swc-project/swc/commit/67aadfa6c976c60a3a756a1b1fcdcf193d96c51f)) + +- **(deps)** Update dependency magic-string to v0.30.11 ([#9345](https://github.com/swc-project/swc/issues/9345)) ([ced06e2](https://github.com/swc-project/swc/commit/ced06e2da35952c7073fee8aa69cf1a21078cc12)) + + +- **(deps)** Update rust crate toml to v0.8.17 ([#9349](https://github.com/swc-project/swc/issues/9349)) ([d5472cc](https://github.com/swc-project/swc/commit/d5472cc344fb4099af3887e6cc1cf8ec2869c33e)) + ## [1.7.3] - 2024-07-27 ### Bug Fixes @@ -1340,21 +1355,4 @@ - **(es/transforms)** Add a test for `reserved_words` pass ([#8638](https://github.com/swc-project/swc/issues/8638)) ([a0b77e0](https://github.com/swc-project/swc/commit/a0b77e06645f27a2ffb9f0635b2fa4c8db2fe105)) -## [1.4.1] - 2024-02-13 - -### Bug Fixes - - - -- **(es/compat)** Visit AssignExpr right branch in FnEnvHoister ([#8633](https://github.com/swc-project/swc/issues/8633)) ([e5d6de0](https://github.com/swc-project/swc/commit/e5d6de0ea9fbab0e36791f59b58d6d2c76809ea5)) - - -- **(es/decorators)** Do not insert duplicate constructors ([#8631](https://github.com/swc-project/swc/issues/8631)) ([21a447f](https://github.com/swc-project/swc/commit/21a447f35a79cdad4721cdefea26da1d355d34d3)) - -### Build - - - -- **(cargo)** Update `rustc` to `nightly-2024-02-06` ([#8618](https://github.com/swc-project/swc/issues/8618)) ([6726b63](https://github.com/swc-project/swc/commit/6726b631e68cf7f14612e046c8cf057411e4a3c2)) - From 6d5ac54648503414e359442f3148c0b229e262ae Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 31 Jul 2024 15:44:16 +0000 Subject: [PATCH 16/78] chore: Publish `1.7.4` with `swc_core` `v0.99.5` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 7f50c83d0920d..7646e4942b9eb 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.4-nightly-20240731.1" +version = "1.7.4" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.4-nightly-20240731.1" +version = "1.7.4" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.4-nightly-20240731.1" +version = "1.7.4" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.342" +version = "0.91.343" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 7339087c7a95d..1aa7f90a6ea16 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4-nightly-20240731.1" +version = "1.7.4" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index bac5940c6b70a..6a0125d4778a7 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4-nightly-20240731.1" +version = "1.7.4" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 019c9c886414a..1f5e2b69e385c 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4-nightly-20240731.1" +version = "1.7.4" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 3906eb7ff0022..262cbb7802de0 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.342" +version = "0.91.343" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 108769b3ff575..c7a38243b5a84 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index bf5370060a039..378bd15b68e7d 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 17d0475811079..622f7e1227c13 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 304fbc11deb4d..a8e7d5ee82fd1 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index e19a354f9d76d..8db35e8a8dfb4 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index d85a69af8602f..4b76bae475b6b 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 337e2819b7d66..6e8eaac6aaf1d 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 3ab2e0bedba6c..6fd5cd72bb1b2 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 68aeba3a63d00..3e224b9f43e18 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 5a8d2f6e23aaf..7555f7ade0e61 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 8924242d89ad6..f212192b64250 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 7631d4306a8b2..7f16225833571 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 1493c05fc3890..d19eef383e971 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 211c2a7cd707e..29ef1cc70d189 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index a395fbef0406c..de47dcf4ae715 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 52c7817c86ea9..1291f43214363 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 1ae7cd706cabb..734c5b18eb5c7 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 0a28a0876a267..9d1a517f7caf1 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index d8ab2fc647d7c..1f73a5a81d1cc 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index b66d4c84172f0..8fd6c676eae23 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index d042ab108c2bc..7f20cb80c7847 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 8000b81ed4cb0..6c4cbcdfd1c7f 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.4-nightly-20240731.1", + "version": "1.7.4", "os": [ "win32" ], From c0861327e95e94f20d1681de4fd24df9552f44e2 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Wed, 31 Jul 2024 15:44:17 +0000 Subject: [PATCH 17/78] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6293f626f0b1e..6af556a982ab0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.7.4] - 2024-07-31 ### Bug Fixes @@ -1350,9 +1350,6 @@ -- **(es/parser)** Add a test for `<<` ([#8634](https://github.com/swc-project/swc/issues/8634)) ([2c63b31](https://github.com/swc-project/swc/commit/2c63b3114382940e5fa96ddd32ed823a78657ec7)) - - - **(es/transforms)** Add a test for `reserved_words` pass ([#8638](https://github.com/swc-project/swc/issues/8638)) ([a0b77e0](https://github.com/swc-project/swc/commit/a0b77e06645f27a2ffb9f0635b2fa4c8db2fe105)) From 9cd51cebdf7e9dd25ebe5057cde63ce7ee0bd0c6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:44:20 +0900 Subject: [PATCH 18/78] chore(deps): update rust crate toml to v0.8.19 (#9360) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [toml](https://togithub.com/toml-rs/toml) | workspace.dependencies | patch | `0.8.17` -> `0.8.19` | --- ### Release Notes
toml-rs/toml (toml) ### [`v0.8.19`](https://togithub.com/toml-rs/toml/compare/toml-v0.8.18...toml-v0.8.19) [Compare Source](https://togithub.com/toml-rs/toml/compare/toml-v0.8.18...toml-v0.8.19) ### [`v0.8.18`](https://togithub.com/toml-rs/toml/compare/toml-v0.8.17...toml-v0.8.18) [Compare Source](https://togithub.com/toml-rs/toml/compare/toml-v0.8.17...toml-v0.8.18)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/swc-project/swc). --- Cargo.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c7e1695900ec0..9722b4612fe32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5866,14 +5866,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.17" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a44eede9b727419af8095cb2d72fab15487a541f54647ad4414b34096ee4631" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.18", + "toml_edit 0.22.20", ] [[package]] @@ -5900,15 +5900,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.18" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1490595c74d930da779e944f5ba2ecdf538af67df1a9848cbd156af43c1b7cf0" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.16", + "winnow 0.6.18", ] [[package]] @@ -6550,7 +6550,7 @@ dependencies = [ "serde_json", "serde_yaml", "thiserror", - "toml 0.8.17", + "toml 0.8.19", "url", ] @@ -6572,7 +6572,7 @@ dependencies = [ "serde_json", "serde_yaml", "thiserror", - "toml 0.8.17", + "toml 0.8.19", "url", ] @@ -7067,9 +7067,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.16" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -7116,7 +7116,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "toml 0.8.17", + "toml 0.8.19", "walkdir", ] From dc1b87e43ea628791dab48993182ac43cf98c150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 1 Aug 2024 14:16:17 +0900 Subject: [PATCH 19/78] fix(es/parser): Fix span for unterminated block comments (#9361) **Related issue:** - https://github.com/wooorm/mdxjs-rs/pull/49 --- .changeset/large-glasses-move.md | 6 ++++++ crates/swc_common/src/input.rs | 8 ++++++++ crates/swc_ecma_parser/src/lexer/util.rs | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .changeset/large-glasses-move.md diff --git a/.changeset/large-glasses-move.md b/.changeset/large-glasses-move.md new file mode 100644 index 0000000000000..3ddeff66336d0 --- /dev/null +++ b/.changeset/large-glasses-move.md @@ -0,0 +1,6 @@ +--- +swc_common: patch +swc_ecma_parser: patch +--- + +fix(es/parser): Fix span for unterminated block comments diff --git a/crates/swc_common/src/input.rs b/crates/swc_common/src/input.rs index bc6fb16449351..d42cccbd3e978 100644 --- a/crates/swc_common/src/input.rs +++ b/crates/swc_common/src/input.rs @@ -49,6 +49,14 @@ impl<'a> StringInput<'a> { self.reset_to(self.last_pos + BytePos(n as u32)); } } + + pub fn start_pos(&self) -> BytePos { + self.orig_start + } + + pub fn end_pos(&self) -> BytePos { + self.last_pos + } } /// Creates an [Input] from [SourceFile]. This is an alias for diff --git a/crates/swc_ecma_parser/src/lexer/util.rs b/crates/swc_ecma_parser/src/lexer/util.rs index 578944aa11dfb..f67c4911ea1b2 100644 --- a/crates/swc_ecma_parser/src/lexer/util.rs +++ b/crates/swc_ecma_parser/src/lexer/util.rs @@ -290,7 +290,8 @@ impl<'a> Lexer<'a> { self.bump(); } - self.emit_error(start, SyntaxError::UnterminatedBlockComment) + let span = Span::new(start, self.input.end_pos()); + self.emit_error_span(span, SyntaxError::UnterminatedBlockComment) } #[inline(never)] From dd4b78248ab8df782a9b070d2e5b6199f29d62c7 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 05:32:59 +0000 Subject: [PATCH 20/78] chore: Publish crates --- .changeset/large-glasses-move.md | 6 ------ Cargo.lock | 4 ++-- crates/swc_common/Cargo.toml | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 .changeset/large-glasses-move.md diff --git a/.changeset/large-glasses-move.md b/.changeset/large-glasses-move.md deleted file mode 100644 index 3ddeff66336d0..0000000000000 --- a/.changeset/large-glasses-move.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_common: patch -swc_ecma_parser: patch ---- - -fix(es/parser): Fix span for unterminated block comments diff --git a/Cargo.lock b/Cargo.lock index 9722b4612fe32..72f99a65f162d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3924,7 +3924,7 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.36.2" +version = "0.36.3" dependencies = [ "ahash 0.8.11", "anyhow", @@ -4593,7 +4593,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.148.1" +version = "0.148.2" dependencies = [ "codspeed-criterion-compat", "criterion", diff --git a/crates/swc_common/Cargo.toml b/crates/swc_common/Cargo.toml index cd9effb84891b..539986298a776 100644 --- a/crates/swc_common/Cargo.toml +++ b/crates/swc_common/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_common" repository = "https://github.com/swc-project/swc.git" -version = "0.36.2" +version = "0.36.3" [package.metadata.docs.rs] all-features = true diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 3487213c8dcd6..9dd7dd8c8ed04 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.148.1" +version = "0.148.2" [package.metadata.docs.rs] all-features = true From 5368e189ab5227a5cfdb53dc1105b787665a1c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 1 Aug 2024 15:01:32 +0900 Subject: [PATCH 21/78] fix(common): Fix `StringInput.end_pos` (#9362) --- .changeset/pink-pianos-allow.md | 5 +++++ crates/swc_common/src/input.rs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/pink-pianos-allow.md diff --git a/.changeset/pink-pianos-allow.md b/.changeset/pink-pianos-allow.md new file mode 100644 index 0000000000000..dbab099098cc7 --- /dev/null +++ b/.changeset/pink-pianos-allow.md @@ -0,0 +1,5 @@ +--- +swc_common: patch +--- + +fix(common): Fix `StringInput.end_pos` diff --git a/crates/swc_common/src/input.rs b/crates/swc_common/src/input.rs index d42cccbd3e978..546eeec0ef9ca 100644 --- a/crates/swc_common/src/input.rs +++ b/crates/swc_common/src/input.rs @@ -15,6 +15,7 @@ pub struct StringInput<'a> { orig: &'a str, /// Original start position. orig_start: BytePos, + orig_end: BytePos, } impl<'a> StringInput<'a> { @@ -34,6 +35,7 @@ impl<'a> StringInput<'a> { orig: src, iter: src.chars(), orig_start: start, + orig_end: end, } } @@ -55,7 +57,7 @@ impl<'a> StringInput<'a> { } pub fn end_pos(&self) -> BytePos { - self.last_pos + self.orig_end } } From 052a43e5be29fcb00571520f934909e2ab441d10 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 06:02:55 +0000 Subject: [PATCH 22/78] chore: Publish crates --- .changeset/pink-pianos-allow.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/pink-pianos-allow.md diff --git a/.changeset/pink-pianos-allow.md b/.changeset/pink-pianos-allow.md deleted file mode 100644 index dbab099098cc7..0000000000000 --- a/.changeset/pink-pianos-allow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_common: patch ---- - -fix(common): Fix `StringInput.end_pos` From d2cb842eafa00e12132279fc545eb88566e11bb5 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 06:09:53 +0000 Subject: [PATCH 23/78] chore: Publish `1.7.5-nightly-20240801.1` with `swc_core` `v0.99.5` --- bindings/Cargo.lock | 24 +++++++++---------- bindings/Cargo.toml | 4 ++-- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../scripts/npm/darwin-x64/package.json | 2 +- .../npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 40 insertions(+), 40 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 7646e4942b9eb..211c3129152c1 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.4" +version = "1.7.5-nightly-20240801.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.4" +version = "1.7.5-nightly-20240801.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.4" +version = "1.7.5-nightly-20240801.1" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.343" +version = "0.91.344" dependencies = [ "anyhow", "swc_cli_impl", @@ -3086,9 +3086,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.36.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1802b1642488aec58597dc55ea88992c165660d6e44e9838d4d93f7b78ab95f3" +checksum = "457fb92efa9f0c849d6bc4e86561982d464176bc3df96bb22baed5e98309e090" dependencies = [ "ahash 0.8.11", "anyhow", @@ -3502,9 +3502,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.200.4" +version = "0.200.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b92feddb27f3ad89dd296696f55e04f8e96cdc778df95a73a6f06664bf6919f3" +checksum = "624e23b532c9a2f74ea850120b19079ab67f6e85af53c83d1984adbecc820b03" dependencies = [ "arrayvec", "indexmap 2.2.6", @@ -3538,9 +3538,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.148.1" +version = "0.148.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8204235f635274dba4adc30c47ac896fd126ddfc53b27210676722423cbb2e7" +checksum = "63338f720211a66e535eb4892b486cb1703ef115b977efb4014665907f6138e9" dependencies = [ "either", "new_debug_unreachable", @@ -3896,9 +3896,9 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b0bbe29b5ae8854e9bb45c78f0a10bfe16f5eb25b63f99162d876b36f16696" +checksum = "621cd30150e5f96ffc032152ce3c9521e730b87e42565ed6916f81f22b5c1ca8" dependencies = [ "anyhow", "serde", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index d173d1789f2d0..8870bdd7f845a 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -23,12 +23,12 @@ resolver = "2" serde_json = "1.0.120" sourcemap = "8.0.1" swc_cli_impl = "0.17.1" - swc_common = "0.36.2" + swc_common = "0.36.3" swc_compiler_base = "0.15.2" swc_config = "0.1.14" swc_core = "0.99.5" swc_error_reporters = "0.20.0" - swc_fast_ts_strip = "0.4.3" + swc_fast_ts_strip = "0.4.4" swc_malloc = "0.5.11" swc_nodejs_common = "0.0.8" tracing = "0.1.40" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 1aa7f90a6ea16..75f0558ebdc19 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4" +version = "1.7.5-nightly-20240801.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 6a0125d4778a7..6033c2c68d47a 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4" +version = "1.7.5-nightly-20240801.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 1f5e2b69e385c..0d81ce0baccb7 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.4" +version = "1.7.5-nightly-20240801.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 262cbb7802de0..094cff5a2c7aa 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.343" +version = "0.91.344" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index c7a38243b5a84..9cb2714542a35 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 378bd15b68e7d..f6965e94bcbbc 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 622f7e1227c13..a7b8e207b4a3e 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index a8e7d5ee82fd1..2cbf5828fd616 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 8db35e8a8dfb4..3ee61a542dd45 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 4b76bae475b6b..0f0a5bdeb0ded 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 6e8eaac6aaf1d..41f0c63bd9583 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 6fd5cd72bb1b2..5d5030334b864 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 3e224b9f43e18..734b3aa659eb3 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 7555f7ade0e61..5c7b2d1ada4cb 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index f212192b64250..d6fdb05566c2b 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 7f16225833571..78f95e9d32fd2 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index d19eef383e971..2cae89d8a0417 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 29ef1cc70d189..6ff447ff512c4 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index de47dcf4ae715..35a6a5e7ed73d 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 1291f43214363..b1df03ca71620 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 734c5b18eb5c7..59eb8b5a27abb 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 9d1a517f7caf1..65d3f6cdab63f 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 1f73a5a81d1cc..b172fd02a6698 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 8fd6c676eae23..2df20fc17474d 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 7f20cb80c7847..19b26cd7c1dd9 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 6c4cbcdfd1c7f..98aafbb63c4c8 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.4", + "version": "1.7.5-nightly-20240801.1", "os": [ "win32" ], From 9fba319c358e6dd1dfe50332bffc94471eca43f7 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 06:09:54 +0000 Subject: [PATCH 24/78] chore: Update changelog --- CHANGELOG.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6af556a982ab0..8374108fdbfa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,21 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(common)** Fix `StringInput.end_pos` ([#9362](https://github.com/swc-project/swc/issues/9362)) ([5368e18](https://github.com/swc-project/swc/commit/5368e189ab5227a5cfdb53dc1105b787665a1c41)) + + +- **(es/parser)** Fix span for unterminated block comments ([#9361](https://github.com/swc-project/swc/issues/9361)) ([dc1b87e](https://github.com/swc-project/swc/commit/dc1b87e43ea628791dab48993182ac43cf98c150)) + +### Miscellaneous Tasks + + + +- **(deps)** Update rust crate toml to v0.8.19 ([#9360](https://github.com/swc-project/swc/issues/9360)) ([9cd51ce](https://github.com/swc-project/swc/commit/9cd51cebdf7e9dd25ebe5057cde63ce7ee0bd0c6)) + ## [1.7.4] - 2024-07-31 ### Bug Fixes @@ -1332,24 +1349,6 @@ - **(es/minifier)** Abort property hoister on `this` usage ([#8647](https://github.com/swc-project/swc/issues/8647)) ([9715320](https://github.com/swc-project/swc/commit/97153206ad07c98e6f8f4f0a62b1f52eecbdf847)) -- **(es/react)** Validate pragma before parsing ([#8637](https://github.com/swc-project/swc/issues/8637)) ([5f1cf01](https://github.com/swc-project/swc/commit/5f1cf018237d12f786fc6deee48cae5d7d3d77de)) - - - **(es/typescript)** Handle exported JSX members ([#8642](https://github.com/swc-project/swc/issues/8642)) ([22c8e2e](https://github.com/swc-project/swc/commit/22c8e2e1e9914ed161482dea9e63cd34504b6cbd)) -### Features - - - -- **(es/minifier)** Remove unused parameters of arrow functions ([#8636](https://github.com/swc-project/swc/issues/8636)) ([8cd4813](https://github.com/swc-project/swc/commit/8cd481306755fb8cd2436dabceb06ea7cbccbb78)) - - -- **(swc_core)** Expose ES linter ([#8635](https://github.com/swc-project/swc/issues/8635)) ([762959c](https://github.com/swc-project/swc/commit/762959c72d08994c2ad7c4f43405e591cc6af6eb)) - -### Testing - - - -- **(es/transforms)** Add a test for `reserved_words` pass ([#8638](https://github.com/swc-project/swc/issues/8638)) ([a0b77e0](https://github.com/swc-project/swc/commit/a0b77e06645f27a2ffb9f0635b2fa4c8db2fe105)) - From 221773069b2069ded7eb475cb75a2daa1ec4a752 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Thu, 1 Aug 2024 18:49:44 +0800 Subject: [PATCH 25/78] fix(es/typescript): Handle single type statement in if/for/while (#9364) - Closes: #9363 --- .changeset/lucky-panthers-cough.md | 6 ++ .../src/strip_type.rs | 10 ++- crates/swc_fast_ts_strip/src/lib.rs | 81 +++++++++++++++++-- .../tests/fixture/single-ts-stmt.js | 22 +++++ .../tests/fixture/single-ts-stmt.transform.js | 12 +++ .../tests/fixture/single-ts-stmt.ts | 22 +++++ 6 files changed, 146 insertions(+), 7 deletions(-) create mode 100644 .changeset/lucky-panthers-cough.md create mode 100644 crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.transform.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.ts diff --git a/.changeset/lucky-panthers-cough.md b/.changeset/lucky-panthers-cough.md new file mode 100644 index 0000000000000..a90c959039cdf --- /dev/null +++ b/.changeset/lucky-panthers-cough.md @@ -0,0 +1,6 @@ +--- +swc_ecma_transforms_typescript: patch +swc_fast_ts_strip: patch +--- + +Fix (TypeScript): Handle single type statement in if/for/while diff --git a/crates/swc_ecma_transforms_typescript/src/strip_type.rs b/crates/swc_ecma_transforms_typescript/src/strip_type.rs index a6d0a64292638..95f0a51b62ed7 100644 --- a/crates/swc_ecma_transforms_typescript/src/strip_type.rs +++ b/crates/swc_ecma_transforms_typescript/src/strip_type.rs @@ -205,8 +205,16 @@ impl VisitMut for StripType { } fn visit_mut_stmts(&mut self, n: &mut Vec) { - n.retain(should_retain_stmt); n.visit_mut_children_with(self); + n.retain(|s| !s.is_empty()); + } + + fn visit_mut_stmt(&mut self, n: &mut Stmt) { + if should_retain_stmt(n) { + n.visit_mut_children_with(self); + } else if !n.is_empty() { + n.take(); + } } fn visit_mut_ts_import_equals_decl(&mut self, _: &mut TsImportEqualsDecl) { diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index ac851cb54b001..52774f924e93c 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -11,12 +11,13 @@ use swc_common::{ BytePos, FileName, Mark, SourceMap, Span, Spanned, }; use swc_ecma_ast::{ - ArrowExpr, BindingIdent, Class, ClassDecl, ClassMethod, ClassProp, EsVersion, ExportAll, - ExportDecl, ExportSpecifier, FnDecl, ImportDecl, ImportSpecifier, NamedExport, Param, Pat, - Program, TsAsExpr, TsConstAssertion, TsEnumDecl, TsExportAssignment, TsImportEqualsDecl, - TsIndexSignature, TsInstantiation, TsInterfaceDecl, TsModuleDecl, TsModuleName, - TsNamespaceDecl, TsNonNullExpr, TsParamPropParam, TsSatisfiesExpr, TsTypeAliasDecl, TsTypeAnn, - TsTypeAssertion, TsTypeParamDecl, TsTypeParamInstantiation, VarDecl, + ArrowExpr, BindingIdent, Class, ClassDecl, ClassMethod, ClassProp, Decl, DoWhileStmt, + EsVersion, ExportAll, ExportDecl, ExportSpecifier, FnDecl, ForInStmt, ForOfStmt, ForStmt, + IfStmt, ImportDecl, ImportSpecifier, NamedExport, Param, Pat, Program, Stmt, TsAsExpr, + TsConstAssertion, TsEnumDecl, TsExportAssignment, TsImportEqualsDecl, TsIndexSignature, + TsInstantiation, TsInterfaceDecl, TsModuleDecl, TsModuleName, TsNamespaceDecl, TsNonNullExpr, + TsParamPropParam, TsSatisfiesExpr, TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, + TsTypeParamDecl, TsTypeParamInstantiation, VarDecl, WhileStmt, }; use swc_ecma_parser::{ lexer::Lexer, @@ -910,8 +911,76 @@ impl Visit for TsStrip { n.visit_children_with(self); } + + fn visit_if_stmt(&mut self, n: &IfStmt) { + n.visit_children_with(self); + + if n.cons.is_ts_stmt() { + self.add_overwrite(n.cons.span_lo(), b';'); + } + + if let Some(alt) = &n.alt { + if alt.is_ts_stmt() { + self.add_overwrite(alt.span_lo(), b';'); + } + } + } + + fn visit_for_stmt(&mut self, n: &ForStmt) { + n.visit_children_with(self); + + if n.body.is_ts_stmt() { + self.add_overwrite(n.body.span_lo(), b';'); + } + } + + fn visit_for_in_stmt(&mut self, n: &ForInStmt) { + n.visit_children_with(self); + + if n.body.is_ts_stmt() { + self.add_overwrite(n.body.span_lo(), b';'); + } + } + + fn visit_for_of_stmt(&mut self, n: &ForOfStmt) { + n.visit_children_with(self); + + if n.body.is_ts_stmt() { + self.add_overwrite(n.body.span_lo(), b';'); + } + } + + fn visit_while_stmt(&mut self, n: &WhileStmt) { + n.visit_children_with(self); + + if n.body.is_ts_stmt() { + self.add_overwrite(n.body.span_lo(), b';'); + } + } + + fn visit_do_while_stmt(&mut self, n: &DoWhileStmt) { + n.visit_children_with(self); + + if n.body.is_ts_stmt() { + self.add_overwrite(n.body.span_lo(), b';'); + } + } } +trait IsTsStmt { + fn is_ts_stmt(&self) -> bool; +} + +impl IsTsStmt for Stmt { + fn is_ts_stmt(&self) -> bool { + match self { + Stmt::Decl(Decl::TsInterface { .. } | Decl::TsTypeAlias(..)) => true, + Stmt::Decl(Decl::TsModule(n)) => n.declare || matches!(n.id, TsModuleName::Str(..)), + Stmt::Decl(Decl::TsEnum(e)) => e.declare, + _ => false, + } + } +} trait U8Helper { fn is_utf8_char_boundary(&self) -> bool; } diff --git a/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.js b/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.js new file mode 100644 index 0000000000000..581cd582af5c8 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.js @@ -0,0 +1,22 @@ +if (false) ; +console.log("Hello, World!"); + +if (false) { } +else ; +console.log("Hello, World!"); + +for (; false;) + ; +console.log("Hello, World!"); + +for (; false;) + ; +console.log("Hello, World!"); + +while (false) + ; +console.log("Hello, World!"); + +do + ; +while (false); diff --git a/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.transform.js b/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.transform.js new file mode 100644 index 0000000000000..4df06fa238434 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.transform.js @@ -0,0 +1,12 @@ +if (false) ; +console.log("Hello, World!"); +if (false) {} else ; +console.log("Hello, World!"); +for(; false;); +console.log("Hello, World!"); +for(; false;); +console.log("Hello, World!"); +while(false); +console.log("Hello, World!"); +do ; +while (false) diff --git a/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.ts b/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.ts new file mode 100644 index 0000000000000..6a1b50d9bd726 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/single-ts-stmt.ts @@ -0,0 +1,22 @@ +if (false) type Foo = string +console.log("Hello, World!"); + +if (false) { } +else type Bar = string +console.log("Hello, World!"); + +for (; false;) + interface X { } +console.log("Hello, World!"); + +for (; false;) + interface X { } +console.log("Hello, World!"); + +while (false) + type Baz = string +console.log("Hello, World!"); + +do + interface X { } +while (false); From c587c76b67c890f2dbf630c3d20de5a6582640d9 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 10:51:23 +0000 Subject: [PATCH 26/78] chore: Publish crates --- .changeset/lucky-panthers-cough.md | 6 ------ Cargo.lock | 4 ++-- crates/swc_ecma_transforms_typescript/Cargo.toml | 2 +- crates/swc_fast_ts_strip/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 .changeset/lucky-panthers-cough.md diff --git a/.changeset/lucky-panthers-cough.md b/.changeset/lucky-panthers-cough.md deleted file mode 100644 index a90c959039cdf..0000000000000 --- a/.changeset/lucky-panthers-cough.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_ecma_transforms_typescript: patch -swc_fast_ts_strip: patch ---- - -Fix (TypeScript): Handle single type statement in if/for/while diff --git a/Cargo.lock b/Cargo.lock index 72f99a65f162d..be6097e8ffee6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4938,7 +4938,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.194.3" +version = "0.194.4" dependencies = [ "codspeed-criterion-compat", "criterion", @@ -5094,7 +5094,7 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.4" +version = "0.4.5" dependencies = [ "anyhow", "codspeed-criterion-compat", diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index d9bd3014962db..58eb568b45573 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.194.3" +version = "0.194.4" [lib] bench = false diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index 0562d8deb32be..86b38aba461ee 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_ts_strip" repository = { workspace = true } -version = "0.4.4" +version = "0.4.5" [dependencies] From 7c62acb3438b39d78bd6cb5af9c7031f8f1c890a Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 10:58:06 +0000 Subject: [PATCH 27/78] chore: Publish `1.7.5-nightly-20240801.2` with `swc_core` `v0.99.5` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 211c3129152c1..a4544cb781b5e 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.5-nightly-20240801.1" +version = "1.7.5-nightly-20240801.2" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.5-nightly-20240801.1" +version = "1.7.5-nightly-20240801.2" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.5-nightly-20240801.1" +version = "1.7.5-nightly-20240801.2" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.344" +version = "0.91.345" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 75f0558ebdc19..2ca576d430173 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.1" +version = "1.7.5-nightly-20240801.2" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 6033c2c68d47a..05e02dd9cd13d 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.1" +version = "1.7.5-nightly-20240801.2" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 0d81ce0baccb7..6b417d57795dd 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.1" +version = "1.7.5-nightly-20240801.2" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 094cff5a2c7aa..557d02838fb80 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.344" +version = "0.91.345" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 9cb2714542a35..305a74316330b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index f6965e94bcbbc..d85741eb6366a 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index a7b8e207b4a3e..67b3400abd9a5 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 2cbf5828fd616..3f8570f4d6c10 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 3ee61a542dd45..ca8685d4fcbd9 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 0f0a5bdeb0ded..4f201b934e325 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 41f0c63bd9583..19e74b1ecb6c2 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 5d5030334b864..7f32e55de9b66 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 734b3aa659eb3..6733c32df2ef8 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 5c7b2d1ada4cb..0eaea8ee898be 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index d6fdb05566c2b..e1191d661ac72 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 78f95e9d32fd2..37fdb404b2f2a 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 2cae89d8a0417..e6481763ad022 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 6ff447ff512c4..5b5871a278762 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 35a6a5e7ed73d..94dc8d3fb19d1 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index b1df03ca71620..bc5c5d2400c8a 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 59eb8b5a27abb..40d6e71201bed 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 65d3f6cdab63f..726ff4f61b9c2 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index b172fd02a6698..3f126b340cd68 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 2df20fc17474d..6753e737cdbcc 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 19b26cd7c1dd9..3857f62214e6c 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 98aafbb63c4c8..389a945716688 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.1", + "version": "1.7.5-nightly-20240801.2", "os": [ "win32" ], From 1d11d8dee97a02df599db89c5011e9ad6fc0a094 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 10:58:07 +0000 Subject: [PATCH 28/78] chore: Update changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8374108fdbfa0..39f7092761bde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - **(es/parser)** Fix span for unterminated block comments ([#9361](https://github.com/swc-project/swc/issues/9361)) ([dc1b87e](https://github.com/swc-project/swc/commit/dc1b87e43ea628791dab48993182ac43cf98c150)) + +- **(es/typescript)** Handle single type statement in if/for/while ([#9364](https://github.com/swc-project/swc/issues/9364)) ([2217730](https://github.com/swc-project/swc/commit/221773069b2069ded7eb475cb75a2daa1ec4a752)) + ### Miscellaneous Tasks @@ -1343,9 +1346,6 @@ -- **(es/helpers)** Add `addInitializer` to field decorators ([#8619](https://github.com/swc-project/swc/issues/8619)) ([cd38ef3](https://github.com/swc-project/swc/commit/cd38ef39d6a3b3f1e31d5144e2e8c11bd9144239)) - - - **(es/minifier)** Abort property hoister on `this` usage ([#8647](https://github.com/swc-project/swc/issues/8647)) ([9715320](https://github.com/swc-project/swc/commit/97153206ad07c98e6f8f4f0a62b1f52eecbdf847)) From 4f0fc6eb65c2b7f7e1e0041a9228a3b7dd7e695a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 1 Aug 2024 20:33:13 +0900 Subject: [PATCH 29/78] fix(es/parser): Make `UnterminatedBlockComment` stick to the EOF (#9366) **Related issue:** - https://github.com/wooorm/markdown-rs/pull/120 --- .changeset/thin-cobras-taste.md | 6 ++++++ crates/swc_ecma_parser/src/lexer/util.rs | 3 ++- .../fail/025560435ed0b9a6.js.swc-stderr | 6 ++---- .../fail/100c329e6dd70e5a.js.swc-stderr | 1 - .../fail/1c6ba8177a9624f0.js.swc-stderr | 3 +-- .../fail/65a7e95d594ad7ad.js.swc-stderr | 7 +++---- .../fail/766e0153d3f7ec95.js.swc-stderr | 1 - .../fail/86308fd40fa95e9d.js.swc-stderr | 1 - .../fail/8d64a30d9de151b6.js.swc-stderr | 1 - .../fail/ac1ee2739ad30d66.js.swc-stderr | 1 - .../fail/d056300d8658429f.js.swc-stderr | 1 - .../fail/e2cdddda85e8ffe1.js.swc-stderr | 1 - 12 files changed, 14 insertions(+), 18 deletions(-) create mode 100644 .changeset/thin-cobras-taste.md diff --git a/.changeset/thin-cobras-taste.md b/.changeset/thin-cobras-taste.md new file mode 100644 index 0000000000000..1d866c2b7e47f --- /dev/null +++ b/.changeset/thin-cobras-taste.md @@ -0,0 +1,6 @@ +--- +swc_ecma_parser: patch +swc_core: patch +--- + +fix(es/parser): Make `UnterminatedBlockComment` stick to the EOF diff --git a/crates/swc_ecma_parser/src/lexer/util.rs b/crates/swc_ecma_parser/src/lexer/util.rs index f67c4911ea1b2..9c75644be3c03 100644 --- a/crates/swc_ecma_parser/src/lexer/util.rs +++ b/crates/swc_ecma_parser/src/lexer/util.rs @@ -290,7 +290,8 @@ impl<'a> Lexer<'a> { self.bump(); } - let span = Span::new(start, self.input.end_pos()); + let end = self.input.end_pos(); + let span = Span::new(end, end); self.emit_error_span(span, SyntaxError::UnterminatedBlockComment) } diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/025560435ed0b9a6.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/025560435ed0b9a6.js.swc-stderr index d16869c95060c..332ef02807231 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/025560435ed0b9a6.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/025560435ed0b9a6.js.swc-stderr @@ -1,6 +1,4 @@ x Unterminated block comment - ,-[$DIR/tests/test262-parser/fail/025560435ed0b9a6.js:1:1] - 1 | ,-> /* - 2 | | - 3 | `-> + ,-[$DIR/tests/test262-parser/fail/025560435ed0b9a6.js:3:2] + 3 | `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/100c329e6dd70e5a.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/100c329e6dd70e5a.js.swc-stderr index f8b3cae7e594e..559e91f33cb56 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/100c329e6dd70e5a.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/100c329e6dd70e5a.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment ,-[$DIR/tests/test262-parser/fail/100c329e6dd70e5a.js:1:1] 1 | /*
 - : ^^^ `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/1c6ba8177a9624f0.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/1c6ba8177a9624f0.js.swc-stderr index 96199c6bc84b7..b5bbd033a6465 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/1c6ba8177a9624f0.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/1c6ba8177a9624f0.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment - ,-[$DIR/tests/test262-parser/fail/1c6ba8177a9624f0.js:1:1] + ,-[$DIR/tests/test262-parser/fail/1c6ba8177a9624f0.js:1:5] 1 | /* - : ^^^ `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/65a7e95d594ad7ad.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/65a7e95d594ad7ad.js.swc-stderr index 17ad12d3b7aba..023909f551e68 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/65a7e95d594ad7ad.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/65a7e95d594ad7ad.js.swc-stderr @@ -1,6 +1,5 @@ x Unterminated block comment - ,-[$DIR/tests/test262-parser/fail/65a7e95d594ad7ad.js:1:1] - 1 | ,-> /* - 2 | | - 3 | `-> * + ,-[$DIR/tests/test262-parser/fail/65a7e95d594ad7ad.js:3:1] + 2 | + 3 | * `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/766e0153d3f7ec95.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/766e0153d3f7ec95.js.swc-stderr index 4edebeb4302de..2a725d32e2939 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/766e0153d3f7ec95.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/766e0153d3f7ec95.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment ,-[$DIR/tests/test262-parser/fail/766e0153d3f7ec95.js:1:1] 1 | /* - : ^^ `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/86308fd40fa95e9d.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/86308fd40fa95e9d.js.swc-stderr index 30dde61840b79..b21f00fc25627 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/86308fd40fa95e9d.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/86308fd40fa95e9d.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment ,-[$DIR/tests/test262-parser/fail/86308fd40fa95e9d.js:1:1] 1 | /*hello - : ^^^^^^^ `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/8d64a30d9de151b6.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/8d64a30d9de151b6.js.swc-stderr index 2044787ad6452..30717ddd4ea5f 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/8d64a30d9de151b6.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/8d64a30d9de151b6.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment ,-[$DIR/tests/test262-parser/fail/8d64a30d9de151b6.js:1:1] 1 | /** - : ^^^ `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/ac1ee2739ad30d66.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/ac1ee2739ad30d66.js.swc-stderr index 38fd467bcba1a..e713d7730b7c6 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/ac1ee2739ad30d66.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/ac1ee2739ad30d66.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment ,-[$DIR/tests/test262-parser/fail/ac1ee2739ad30d66.js:1:1] 0 | /* - : ^^ `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/d056300d8658429f.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/d056300d8658429f.js.swc-stderr index 85d475aefe5d4..96460b0a61034 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/d056300d8658429f.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/d056300d8658429f.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment ,-[$DIR/tests/test262-parser/fail/d056300d8658429f.js:1:1] 1 | /*
 - : ^^^ `---- diff --git a/crates/swc_ecma_parser/tests/test262-error-references/fail/e2cdddda85e8ffe1.js.swc-stderr b/crates/swc_ecma_parser/tests/test262-error-references/fail/e2cdddda85e8ffe1.js.swc-stderr index 9b8f31c84ba55..4106995805aeb 100644 --- a/crates/swc_ecma_parser/tests/test262-error-references/fail/e2cdddda85e8ffe1.js.swc-stderr +++ b/crates/swc_ecma_parser/tests/test262-error-references/fail/e2cdddda85e8ffe1.js.swc-stderr @@ -1,5 +1,4 @@ x Unterminated block comment ,-[$DIR/tests/test262-parser/fail/e2cdddda85e8ffe1.js:1:1] 1 | /*hello * - : ^^^^^^^^^^ `---- From 8767bb9b99edd5d80eff63ac34ca226c31496a4d Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 12:48:37 +0000 Subject: [PATCH 30/78] chore: Publish crates --- .changeset/thin-cobras-taste.md | 6 ------ Cargo.lock | 4 ++-- crates/swc_core/Cargo.toml | 2 +- crates/swc_ecma_parser/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 .changeset/thin-cobras-taste.md diff --git a/.changeset/thin-cobras-taste.md b/.changeset/thin-cobras-taste.md deleted file mode 100644 index 1d866c2b7e47f..0000000000000 --- a/.changeset/thin-cobras-taste.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_ecma_parser: patch -swc_core: patch ---- - -fix(es/parser): Make `UnterminatedBlockComment` stick to the EOF diff --git a/Cargo.lock b/Cargo.lock index be6097e8ffee6..ba8660bb014f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4009,7 +4009,7 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.99.5" +version = "0.99.6" dependencies = [ "anyhow", "binding_macros", @@ -4593,7 +4593,7 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.148.2" +version = "0.148.3" dependencies = [ "codspeed-criterion-compat", "criterion", diff --git a/crates/swc_core/Cargo.toml b/crates/swc_core/Cargo.toml index 551c18cc0f4f5..e0967e3d8e7b2 100644 --- a/crates/swc_core/Cargo.toml +++ b/crates/swc_core/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "Apache-2.0" name = "swc_core" repository = "https://github.com/swc-project/swc.git" -version = "0.99.5" +version = "0.99.6" [package.metadata.docs.rs] features = [ "allocator_node", diff --git a/crates/swc_ecma_parser/Cargo.toml b/crates/swc_ecma_parser/Cargo.toml index 9dd7dd8c8ed04..8e1f82bd83de0 100644 --- a/crates/swc_ecma_parser/Cargo.toml +++ b/crates/swc_ecma_parser/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "examples/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_parser" repository = "https://github.com/swc-project/swc.git" -version = "0.148.2" +version = "0.148.3" [package.metadata.docs.rs] all-features = true From 547b51ccf0aa597f287db41ba708d4857b8d92f9 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 12:54:59 +0000 Subject: [PATCH 31/78] chore: Publish `1.7.5-nightly-20240801.3` with `swc_core` `v0.99.6` --- bindings/Cargo.lock | 16 ++++++++-------- bindings/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../core/scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../core/scripts/npm/linux-x64-gnu/package.json | 2 +- .../core/scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index a4544cb781b5e..38d74e40247e0 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.5-nightly-20240801.2" +version = "1.7.5-nightly-20240801.3" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.5-nightly-20240801.2" +version = "1.7.5-nightly-20240801.3" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.5-nightly-20240801.2" +version = "1.7.5-nightly-20240801.3" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.345" +version = "0.91.346" dependencies = [ "anyhow", "swc_cli_impl", @@ -3790,9 +3790,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.194.3" +version = "0.194.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f73c4ae3eb15adc5865dc729c4e111040529cec5a349d56ed0b4a0de1a86242" +checksum = "99619353488c1dae960159faef86f0261e7fefe43b84ed1ba80c8cbc5a539434" dependencies = [ "ryu-js", "serde", @@ -3896,9 +3896,9 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "621cd30150e5f96ffc032152ce3c9521e730b87e42565ed6916f81f22b5c1ca8" +checksum = "1bd0f1d90aa6896b6b0a0b64e348526cf42b1cb0b69dab5f73a156358b8b966a" dependencies = [ "anyhow", "serde", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 8870bdd7f845a..d6c32e1f699bd 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -28,7 +28,7 @@ resolver = "2" swc_config = "0.1.14" swc_core = "0.99.5" swc_error_reporters = "0.20.0" - swc_fast_ts_strip = "0.4.4" + swc_fast_ts_strip = "0.4.5" swc_malloc = "0.5.11" swc_nodejs_common = "0.0.8" tracing = "0.1.40" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 2ca576d430173..8e7eb01697420 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.2" +version = "1.7.5-nightly-20240801.3" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 05e02dd9cd13d..c0b9be99891c1 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.2" +version = "1.7.5-nightly-20240801.3" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 6b417d57795dd..4350e8b97b7bb 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.2" +version = "1.7.5-nightly-20240801.3" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 557d02838fb80..8f82bbfddb753 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.345" +version = "0.91.346" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 305a74316330b..e5dd68731fe17 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index d85741eb6366a..4a4aaa7ae7d52 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 67b3400abd9a5..68f76166682ca 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 3f8570f4d6c10..ec2be03120e20 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index ca8685d4fcbd9..ef31ca5b7ff1d 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 4f201b934e325..5acfad6da4eaa 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 19e74b1ecb6c2..5d34c758d125a 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 7f32e55de9b66..f23f77b5ef489 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 6733c32df2ef8..bc29895317c38 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 0eaea8ee898be..812317aafae04 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index e1191d661ac72..9406186d2e80d 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 37fdb404b2f2a..c3c857488348b 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index e6481763ad022..b69fb631c08fe 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 5b5871a278762..602a88f1adbbd 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 94dc8d3fb19d1..666151a989aeb 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index bc5c5d2400c8a..ab07a8f9bba23 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 40d6e71201bed..65b1af72de3ad 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 726ff4f61b9c2..3920bf8ecf8e1 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 3f126b340cd68..d389a24621787 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 6753e737cdbcc..433787108e4e6 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 3857f62214e6c..82e49149bc540 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 389a945716688..ca2efe9052d13 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.2", + "version": "1.7.5-nightly-20240801.3", "os": [ "win32" ], From c53ddf5b0101041930bf3cb46a776de8a7dee56c Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 12:55:00 +0000 Subject: [PATCH 32/78] chore: Update changelog --- CHANGELOG.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f7092761bde..a7fdc34fb8b37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ - **(es/parser)** Fix span for unterminated block comments ([#9361](https://github.com/swc-project/swc/issues/9361)) ([dc1b87e](https://github.com/swc-project/swc/commit/dc1b87e43ea628791dab48993182ac43cf98c150)) +- **(es/parser)** Make `UnterminatedBlockComment` stick to the EOF ([#9366](https://github.com/swc-project/swc/issues/9366)) ([4f0fc6e](https://github.com/swc-project/swc/commit/4f0fc6eb65c2b7f7e1e0041a9228a3b7dd7e695a)) + + - **(es/typescript)** Handle single type statement in if/for/while ([#9364](https://github.com/swc-project/swc/issues/9364)) ([2217730](https://github.com/swc-project/swc/commit/221773069b2069ded7eb475cb75a2daa1ec4a752)) ### Miscellaneous Tasks @@ -1340,15 +1343,4 @@ - **(visit)** Drop `pmutil` to improve compile time ([#8673](https://github.com/swc-project/swc/issues/8673)) ([b474382](https://github.com/swc-project/swc/commit/b47438245a0fb7f12b325a66a756beeaf58c3c9e)) -## [1.4.2] - 2024-02-19 - -### Bug Fixes - - - -- **(es/minifier)** Abort property hoister on `this` usage ([#8647](https://github.com/swc-project/swc/issues/8647)) ([9715320](https://github.com/swc-project/swc/commit/97153206ad07c98e6f8f4f0a62b1f52eecbdf847)) - - -- **(es/typescript)** Handle exported JSX members ([#8642](https://github.com/swc-project/swc/issues/8642)) ([22c8e2e](https://github.com/swc-project/swc/commit/22c8e2e1e9914ed161482dea9e63cd34504b6cbd)) - From 6f1716c4aed447c3311e41603a6399d97540e1fb Mon Sep 17 00:00:00 2001 From: magic-akari Date: Thu, 1 Aug 2024 21:38:52 +0800 Subject: [PATCH 33/78] fix(es/typescript): Handle backtick in ASI issue (#9367) --- .changeset/grumpy-ads-fix.md | 6 ++++++ crates/swc_fast_ts_strip/src/lib.rs | 8 +++++--- crates/swc_fast_ts_strip/tests/fixture/issue-9331.js | 10 +++++++++- .../tests/fixture/issue-9331.transform.js | 4 ++++ crates/swc_fast_ts_strip/tests/fixture/issue-9331.ts | 10 +++++++++- 5 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 .changeset/grumpy-ads-fix.md diff --git a/.changeset/grumpy-ads-fix.md b/.changeset/grumpy-ads-fix.md new file mode 100644 index 0000000000000..c150edaebe18d --- /dev/null +++ b/.changeset/grumpy-ads-fix.md @@ -0,0 +1,6 @@ +--- +swc_fast_ts_strip: patch +swc_core: patch +--- + +fix(es/typescript): Handle backtick in ASI issue diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index 52774f924e93c..fdc303235ba7d 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -406,10 +406,12 @@ impl TsStrip { return; } - // Add a semicolon if the next token is `[`, `(`, `/`, `+`, or `-` + // https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#sec-asi-interesting-cases-in-statement-lists + // Add a semicolon if the next token is `[`, `(`, `/`, `+`, `-` or backtick. match token { Token::LParen | Token::LBracket + | Token::BackQuote | Token::BinOp(BinOpToken::Add | BinOpToken::Sub | BinOpToken::Div) => { if prev_token == &Token::Semi { self.add_overwrite(prev_span.lo, b';'); @@ -430,8 +432,8 @@ impl TsStrip { } if let TokenAndSpan { - // Only `([` affect ASI. - token: Token::LParen | Token::LBracket, + // Only `(`, `[` and backtick affect ASI. + token: Token::LParen | Token::LBracket | Token::BackQuote, had_line_break: true, .. } = &self.tokens[index + 1] diff --git a/crates/swc_fast_ts_strip/tests/fixture/issue-9331.js b/crates/swc_fast_ts_strip/tests/fixture/issue-9331.js index 8cc1bd1ef7f71..a879d3d011f95 100644 --- a/crates/swc_fast_ts_strip/tests/fixture/issue-9331.js +++ b/crates/swc_fast_ts_strip/tests/fixture/issue-9331.js @@ -42,4 +42,12 @@ class foo { 2 ; -+ 3 \ No newline at end of file ++ 3 + + +f +; +`1` + +f ; +`1` \ No newline at end of file diff --git a/crates/swc_fast_ts_strip/tests/fixture/issue-9331.transform.js b/crates/swc_fast_ts_strip/tests/fixture/issue-9331.transform.js index 983ca73e73c13..377fae926aaa7 100644 --- a/crates/swc_fast_ts_strip/tests/fixture/issue-9331.transform.js +++ b/crates/swc_fast_ts_strip/tests/fixture/issue-9331.transform.js @@ -21,4 +21,8 @@ class foo { } 2; +3; +f; +`1`; +f; +`1`; export { }; diff --git a/crates/swc_fast_ts_strip/tests/fixture/issue-9331.ts b/crates/swc_fast_ts_strip/tests/fixture/issue-9331.ts index 7cfb24babfeab..13dfd74645ee5 100644 --- a/crates/swc_fast_ts_strip/tests/fixture/issue-9331.ts +++ b/crates/swc_fast_ts_strip/tests/fixture/issue-9331.ts @@ -42,4 +42,12 @@ class foo { 2 export type { } -+ 3 \ No newline at end of file ++ 3 + + +f +declare namespace N { } +`1` + +f as any +`1` \ No newline at end of file From 60be848be62bff05c4f659bbb1887483a2ea2daa Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 13:40:12 +0000 Subject: [PATCH 34/78] chore: Publish crates --- .changeset/grumpy-ads-fix.md | 6 ------ Cargo.lock | 2 +- crates/swc_fast_ts_strip/Cargo.toml | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 .changeset/grumpy-ads-fix.md diff --git a/.changeset/grumpy-ads-fix.md b/.changeset/grumpy-ads-fix.md deleted file mode 100644 index c150edaebe18d..0000000000000 --- a/.changeset/grumpy-ads-fix.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -swc_fast_ts_strip: patch -swc_core: patch ---- - -fix(es/typescript): Handle backtick in ASI issue diff --git a/Cargo.lock b/Cargo.lock index ba8660bb014f8..a80cf9d85982e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5094,7 +5094,7 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.5" +version = "0.4.6" dependencies = [ "anyhow", "codspeed-criterion-compat", diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index 86b38aba461ee..761a70986ec3f 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_ts_strip" repository = { workspace = true } -version = "0.4.5" +version = "0.4.6" [dependencies] From a66a95dd4f7f9b8920a0d88ba39aab9d748e9cb4 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 13:47:27 +0000 Subject: [PATCH 35/78] chore: Publish `1.7.5-nightly-20240801.4` with `swc_core` `v0.99.6` --- bindings/Cargo.lock | 16 ++++++++-------- bindings/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../core/scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../core/scripts/npm/linux-x64-gnu/package.json | 2 +- .../core/scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 38d74e40247e0..ffccd131e3356 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.5-nightly-20240801.3" +version = "1.7.5-nightly-20240801.4" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.5-nightly-20240801.3" +version = "1.7.5-nightly-20240801.4" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.5-nightly-20240801.3" +version = "1.7.5-nightly-20240801.4" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.346" +version = "0.91.347" dependencies = [ "anyhow", "swc_cli_impl", @@ -3173,9 +3173,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.99.5" +version = "0.99.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631adff7d2bd3e52a1cf0aef3ad6cae2601dd08043efecc21145bd2e1a16a73e" +checksum = "c9fb414e03336f9f4d238fb2463ccabe43b2cb22b7184b64a7ab21ac8845881f" dependencies = [ "binding_macros", "swc", @@ -3538,9 +3538,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.148.2" +version = "0.148.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63338f720211a66e535eb4892b486cb1703ef115b977efb4014665907f6138e9" +checksum = "a05ef8f80461e19374d9e8197f459a399b2802da19f72ea951ef343752ff3c04" dependencies = [ "either", "new_debug_unreachable", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index d6c32e1f699bd..4e192b019bdc3 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -26,7 +26,7 @@ resolver = "2" swc_common = "0.36.3" swc_compiler_base = "0.15.2" swc_config = "0.1.14" - swc_core = "0.99.5" + swc_core = "0.99.6" swc_error_reporters = "0.20.0" swc_fast_ts_strip = "0.4.5" swc_malloc = "0.5.11" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 8e7eb01697420..d0d65fa4f4753 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.3" +version = "1.7.5-nightly-20240801.4" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index c0b9be99891c1..f06ac18e764ad 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.3" +version = "1.7.5-nightly-20240801.4" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 4350e8b97b7bb..39f7fc698ce1c 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.3" +version = "1.7.5-nightly-20240801.4" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 8f82bbfddb753..d94940d7f97e8 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.346" +version = "0.91.347" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index e5dd68731fe17..d87b6418d82dc 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 4a4aaa7ae7d52..c2edfe4b57fa2 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 68f76166682ca..75047651d42a0 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index ec2be03120e20..e28e646115742 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index ef31ca5b7ff1d..ad30eab629666 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 5acfad6da4eaa..75367fef4ad94 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 5d34c758d125a..fa28fe5b88cee 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index f23f77b5ef489..589b3fcbdeda8 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index bc29895317c38..b39a22195e0f2 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 812317aafae04..7b241207d07a7 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 9406186d2e80d..a5c0340cec290 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index c3c857488348b..81e5a50f117ad 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index b69fb631c08fe..04067e2cb7480 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 602a88f1adbbd..c9bdce61d078e 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 666151a989aeb..db507ef41c246 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index ab07a8f9bba23..628f0bf6269bd 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 65b1af72de3ad..5fc75b28f96c0 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 3920bf8ecf8e1..15bdaf7f9b742 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index d389a24621787..c12711fbe17ef 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 433787108e4e6..d82763e4aad1f 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 82e49149bc540..4023d595f88cf 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index ca2efe9052d13..9a38bf948d1f6 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.3", + "version": "1.7.5-nightly-20240801.4", "os": [ "win32" ], From 41906572181dfe0ad3ff84a29f7d32b02173ed90 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Thu, 1 Aug 2024 13:47:28 +0000 Subject: [PATCH 36/78] chore: Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7fdc34fb8b37..be1859902e989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ - **(es/typescript)** Handle single type statement in if/for/while ([#9364](https://github.com/swc-project/swc/issues/9364)) ([2217730](https://github.com/swc-project/swc/commit/221773069b2069ded7eb475cb75a2daa1ec4a752)) + +- **(es/typescript)** Handle backtick in ASI issue ([#9367](https://github.com/swc-project/swc/issues/9367)) ([6f1716c](https://github.com/swc-project/swc/commit/6f1716c4aed447c3311e41603a6399d97540e1fb)) + ### Miscellaneous Tasks From 4f9116f9259150df3fb3947c809c304809bf5764 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Fri, 2 Aug 2024 09:15:18 +0800 Subject: [PATCH 37/78] fix(es/typescript): Analyze import chain (#9369) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Closes #9368 --------- Co-authored-by: Donny/강동윤 --- .changeset/wicked-lizards-smoke.md | 5 +++ ...mdImportNotAsPrimaryExpression.1.normal.js | 5 +-- ...ImportNotAsPrimaryExpression.2.minified.js | 5 +-- ...JSImportNotAsPrimaryExpression.1.normal.js | 1 - ...ImportNotAsPrimaryExpression.2.minified.js | 2 +- .../importStatementsInterfaces.1.normal.js | 1 - .../importStatementsInterfaces.2.minified.js | 2 +- .../src/strip_import_export.rs | 40 +++++++++++++++++-- .../strip.rs/deno_12395_import_equals_2.js | 1 - .../tests/fixture/issue-9368/input.ts | 16 ++++++++ .../tests/fixture/issue-9368/output.js | 6 +++ 11 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 .changeset/wicked-lizards-smoke.md create mode 100644 crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/input.ts create mode 100644 crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/output.js diff --git a/.changeset/wicked-lizards-smoke.md b/.changeset/wicked-lizards-smoke.md new file mode 100644 index 0000000000000..903ad056e9eff --- /dev/null +++ b/.changeset/wicked-lizards-smoke.md @@ -0,0 +1,5 @@ +--- +swc_ecma_transforms_typescript: patch +--- + +fix(es/typescript): Analyze import chain diff --git a/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.1.normal.js b/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.1.normal.js index 1b2eef9d18631..eb9f3745fec6b 100644 --- a/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.1.normal.js +++ b/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.1.normal.js @@ -38,9 +38,8 @@ define([ //// [foo_1.ts] define([ "require", - "exports", - "./foo_0" -], function(require, exports, _foo_0) { + "exports" +], function(require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true diff --git a/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.2.minified.js b/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.2.minified.js index 8ff118e13278a..3ffcd4cf0324d 100644 --- a/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.2.minified.js +++ b/crates/swc/tests/tsc-references/amdImportNotAsPrimaryExpression.2.minified.js @@ -27,9 +27,8 @@ define([ //// [foo_1.ts] define([ "require", - "exports", - "./foo_0" -], function(require, exports, _foo_0) { + "exports" +], function(require, exports) { Object.defineProperty(exports, "__esModule", { value: !0 }); diff --git a/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.1.normal.js b/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.1.normal.js index bbce10fcee7c6..44d87fb2e67c4 100644 --- a/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.1.normal.js +++ b/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.1.normal.js @@ -35,7 +35,6 @@ var E1; Object.defineProperty(exports, "__esModule", { value: true }); -var foo = require("./foo_0"); var i; var x = {}; var y = false; diff --git a/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.2.minified.js b/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.2.minified.js index c18d2b9820d42..3f12bb103c2be 100644 --- a/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.2.minified.js +++ b/crates/swc/tests/tsc-references/commonJSImportNotAsPrimaryExpression.2.minified.js @@ -21,4 +21,4 @@ C1.s1 = !0, (E1 = E11 || (E11 = {}))[E1.A = 0] = "A", E1[E1.B = 1] = "B", E1[E1. //// [foo_1.ts] Object.defineProperty(exports, "__esModule", { value: !0 -}), require("./foo_0"); +}); diff --git a/crates/swc/tests/tsc-references/importStatementsInterfaces.1.normal.js b/crates/swc/tests/tsc-references/importStatementsInterfaces.1.normal.js index 1ee46bc5ff32f..99284a9839d29 100644 --- a/crates/swc/tests/tsc-references/importStatementsInterfaces.1.normal.js +++ b/crates/swc/tests/tsc-references/importStatementsInterfaces.1.normal.js @@ -2,7 +2,6 @@ var C; // no code gen expected (function(C) { - var a = A; var m; var p; var p = { diff --git a/crates/swc/tests/tsc-references/importStatementsInterfaces.2.minified.js b/crates/swc/tests/tsc-references/importStatementsInterfaces.2.minified.js index e5f6534008e4d..4334d5daa9d86 100644 --- a/crates/swc/tests/tsc-references/importStatementsInterfaces.2.minified.js +++ b/crates/swc/tests/tsc-references/importStatementsInterfaces.2.minified.js @@ -1,5 +1,5 @@ //// [importStatementsInterfaces.ts] var C, D, E; -C || (C = {}), A, D || (D = {}), (E || (E = {})).xDist = function(x) { +C || (C = {}), D || (D = {}), (E || (E = {})).xDist = function(x) { return 0 - x.x; }; diff --git a/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs b/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs index f3952f07f18f3..ab4eda550ae46 100644 --- a/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs +++ b/crates/swc_ecma_transforms_typescript/src/strip_import_export.rs @@ -1,6 +1,6 @@ use std::mem; -use swc_common::collections::AHashSet; +use swc_common::collections::{AHashMap, AHashSet}; use swc_ecma_ast::*; use swc_ecma_utils::stack_size::maybe_grow_default; use swc_ecma_visit::{noop_visit_type, Visit, VisitMut, VisitMutWith, VisitWith}; @@ -10,11 +10,15 @@ use crate::{strip_type::IsConcrete, ImportsNotUsedAsValues}; #[derive(Debug, Default)] struct UsageCollect { id_usage: AHashSet, + import_chain: AHashMap, } impl From> for UsageCollect { fn from(id_usage: AHashSet) -> Self { - Self { id_usage } + Self { + id_usage, + import_chain: Default::default(), + } } } @@ -68,7 +72,15 @@ impl Visit for UsageCollect { return; }; - get_module_ident(ts_entity_name).visit_with(self); + let id = get_module_ident(ts_entity_name); + + if n.is_export { + id.visit_with(self); + n.id.visit_with(self); + return; + } + + self.import_chain.insert(n.id.to_id(), id.to_id()); } fn visit_export_named_specifier(&mut self, n: &ExportNamedSpecifier) { @@ -101,6 +113,26 @@ impl UsageCollect { fn has_usage(&self, id: &Id) -> bool { self.id_usage.contains(id) } + + fn analyze_import_chain(&mut self) { + if self.import_chain.is_empty() { + return; + } + + let mut new_usage = AHashSet::default(); + for id in &self.id_usage { + let mut entry = self.import_chain.remove_entry(id); + while let Some((id, next)) = entry { + new_usage.insert(next); + entry = self.import_chain.remove_entry(&id); + } + if self.import_chain.is_empty() { + break; + } + } + self.import_chain.clear(); + self.id_usage.extend(new_usage); + } } fn get_module_ident(ts_entity_name: &TsEntityName) -> &Ident { @@ -264,6 +296,8 @@ impl VisitMut for StripImportExport { n.visit_with(&mut usage_info); n.visit_with(&mut declare_info); + usage_info.analyze_import_chain(); + let mut strip_ts_import_equals = StripTsImportEquals; n.retain_mut(|module_item| match module_item { diff --git a/crates/swc_ecma_transforms_typescript/tests/__swc_snapshots__/tests/strip.rs/deno_12395_import_equals_2.js b/crates/swc_ecma_transforms_typescript/tests/__swc_snapshots__/tests/strip.rs/deno_12395_import_equals_2.js index 4a09138770861..c9be2f4ec7278 100644 --- a/crates/swc_ecma_transforms_typescript/tests/__swc_snapshots__/tests/strip.rs/deno_12395_import_equals_2.js +++ b/crates/swc_ecma_transforms_typescript/tests/__swc_snapshots__/tests/strip.rs/deno_12395_import_equals_2.js @@ -1,2 +1 @@ -import * as mongo from 'https://deno.land/x/mongo@v0.27.0/mod.ts'; const mongoClient = {}; diff --git a/crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/input.ts b/crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/input.ts new file mode 100644 index 0000000000000..30dbafb1bb4f3 --- /dev/null +++ b/crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/input.ts @@ -0,0 +1,16 @@ +import { Schemas } from './types.d'; +import AddressResource = Schemas.AddressResource; + +// type usage +const x: AddressResource = {}; + + +import { foo, bar } from "mod"; + +// value usage +import y = foo.y; + +// type usage +import z = bar.z; + +console.log(y as z); diff --git a/crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/output.js b/crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/output.js new file mode 100644 index 0000000000000..bea8219de834e --- /dev/null +++ b/crates/swc_ecma_transforms_typescript/tests/fixture/issue-9368/output.js @@ -0,0 +1,6 @@ +// type usage +const x = {}; +import { foo } from "mod"; +// value usage +const y = foo.y; +console.log(y); From 5942996926fedeeb04026ca21136161ec011a583 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 2 Aug 2024 01:16:39 +0000 Subject: [PATCH 38/78] chore: Publish crates --- .changeset/wicked-lizards-smoke.md | 5 ----- Cargo.lock | 2 +- crates/swc_ecma_transforms_typescript/Cargo.toml | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 .changeset/wicked-lizards-smoke.md diff --git a/.changeset/wicked-lizards-smoke.md b/.changeset/wicked-lizards-smoke.md deleted file mode 100644 index 903ad056e9eff..0000000000000 --- a/.changeset/wicked-lizards-smoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_ecma_transforms_typescript: patch ---- - -fix(es/typescript): Analyze import chain diff --git a/Cargo.lock b/Cargo.lock index a80cf9d85982e..2cc0331867b27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4938,7 +4938,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.194.4" +version = "0.194.5" dependencies = [ "codspeed-criterion-compat", "criterion", diff --git a/crates/swc_ecma_transforms_typescript/Cargo.toml b/crates/swc_ecma_transforms_typescript/Cargo.toml index 58eb568b45573..6e969ff35f506 100644 --- a/crates/swc_ecma_transforms_typescript/Cargo.toml +++ b/crates/swc_ecma_transforms_typescript/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_typescript" repository = "https://github.com/swc-project/swc.git" -version = "0.194.4" +version = "0.194.5" [lib] bench = false From 39260219b8de81b7f366d193197f582cf9b9c31b Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 2 Aug 2024 01:23:54 +0000 Subject: [PATCH 39/78] chore: Publish `1.7.5-nightly-20240802.1` with `swc_core` `v0.99.6` --- bindings/Cargo.lock | 12 ++++++------ bindings/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../core/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- .../core/scripts/npm/linux-x64-musl/package.json | 2 +- .../core/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../core/scripts/npm/win32-ia32-msvc/package.json | 2 +- .../core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../minifier/scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 33 insertions(+), 33 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index ffccd131e3356..a607e315a884a 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.5-nightly-20240801.4" +version = "1.7.5-nightly-20240802.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.5-nightly-20240801.4" +version = "1.7.5-nightly-20240802.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.5-nightly-20240801.4" +version = "1.7.5-nightly-20240802.1" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.347" +version = "0.91.348" dependencies = [ "anyhow", "swc_cli_impl", @@ -3896,9 +3896,9 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bd0f1d90aa6896b6b0a0b64e348526cf42b1cb0b69dab5f73a156358b8b966a" +checksum = "588a536170fae088f84ba1c6350b1944e0c0d355ecf1808f78a3a64155b2e94d" dependencies = [ "anyhow", "serde", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 4e192b019bdc3..1b24ca85218fe 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -28,7 +28,7 @@ resolver = "2" swc_config = "0.1.14" swc_core = "0.99.6" swc_error_reporters = "0.20.0" - swc_fast_ts_strip = "0.4.5" + swc_fast_ts_strip = "0.4.6" swc_malloc = "0.5.11" swc_nodejs_common = "0.0.8" tracing = "0.1.40" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index d0d65fa4f4753..c7d67677a1c22 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.4" +version = "1.7.5-nightly-20240802.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index f06ac18e764ad..6f29f56a759eb 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.4" +version = "1.7.5-nightly-20240802.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 39f7fc698ce1c..30ef39fa7f070 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240801.4" +version = "1.7.5-nightly-20240802.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index d94940d7f97e8..bbe137ae559ed 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.347" +version = "0.91.348" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index d87b6418d82dc..265a0ae3d0be3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index c2edfe4b57fa2..daa5b13dc2d47 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 75047651d42a0..1c08feb27fb20 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index e28e646115742..abb6bd1a44c1b 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index ad30eab629666..7b4d4bcee2140 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 75367fef4ad94..6964b4bfe472b 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index fa28fe5b88cee..5a1aedc233910 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 589b3fcbdeda8..dcc6680c945d4 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index b39a22195e0f2..a16107e53d124 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 7b241207d07a7..0a5a4c3ddb2a9 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index a5c0340cec290..e5378bf5943bd 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 81e5a50f117ad..dd8769b0f9d1f 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 04067e2cb7480..dcae0eca3bae6 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index c9bdce61d078e..a03484e61f587 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index db507ef41c246..8d60a378276ce 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 628f0bf6269bd..559ec2228b37b 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index 5fc75b28f96c0..bcb4deafa528c 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 15bdaf7f9b742..0fc883c6163c0 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index c12711fbe17ef..a8b3fc9bc8cc7 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index d82763e4aad1f..e6234b86593f7 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 4023d595f88cf..6a2eec613d584 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 9a38bf948d1f6..5da4fd666eefe 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.5-nightly-20240801.4", + "version": "1.7.5-nightly-20240802.1", "os": [ "win32" ], From 7243c57bb34af6b379fedee948526bd627a1bc88 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 2 Aug 2024 01:23:55 +0000 Subject: [PATCH 40/78] chore: Update changelog --- CHANGELOG.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be1859902e989..ee088ec759b53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,9 @@ - **(es/typescript)** Handle backtick in ASI issue ([#9367](https://github.com/swc-project/swc/issues/9367)) ([6f1716c](https://github.com/swc-project/swc/commit/6f1716c4aed447c3311e41603a6399d97540e1fb)) + +- **(es/typescript)** Analyze import chain ([#9369](https://github.com/swc-project/swc/issues/9369)) ([4f9116f](https://github.com/swc-project/swc/commit/4f9116f9259150df3fb3947c809c304809bf5764)) + ### Miscellaneous Tasks @@ -1287,9 +1290,6 @@ - **(es/codegen)** Emit `namespace` keyword of `TsModuleDecl` if possible ([#8676](https://github.com/swc-project/swc/issues/8676)) ([64c9b8f](https://github.com/swc-project/swc/commit/64c9b8f4f1115dc7fbda673b855eaa1605792b25)) -- **(es/compat)** Split declaration and init in `block-scoping` pass ([#8648](https://github.com/swc-project/swc/issues/8648)) ([6fe6810](https://github.com/swc-project/swc/commit/6fe6810c492ca20ad73d1536e328ddb804533537)) - - - **(es/decorators)** Handle default exported class ([#8691](https://github.com/swc-project/swc/issues/8691)) ([570483a](https://github.com/swc-project/swc/commit/570483ae48c532d6aa169d38bddca5b767ead8f3)) @@ -1302,9 +1302,6 @@ - **(es/modules)** Fix resolution of `jsc.paths` with exact match ([#8685](https://github.com/swc-project/swc/issues/8685)) ([08ed0fb](https://github.com/swc-project/swc/commit/08ed0fb6663e835bf9efe8270118ce49ccd53903)) -- **(es/parser)** Check for existence of modifiers while parsing `accessor` token ([#8649](https://github.com/swc-project/swc/issues/8649)) ([ca23a33](https://github.com/swc-project/swc/commit/ca23a3353cefb0064ab28d10ea86634be5a0c191)) - - - **(es/typescript)** Handle accessibility in private method ([#8689](https://github.com/swc-project/swc/issues/8689)) ([baba663](https://github.com/swc-project/swc/commit/baba66346403da84db3083d22f4afbba4f6a9bfb)) From 82fbebef24704352a39cc8f50226b8c50b99a4ab Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 2 Aug 2024 05:38:27 +0000 Subject: [PATCH 41/78] chore: Publish `1.7.5` with `swc_core` `v0.99.6` --- bindings/Cargo.lock | 12 ++++++------ bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../core/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- .../core/scripts/npm/linux-x64-musl/package.json | 2 +- .../core/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../core/scripts/npm/win32-ia32-msvc/package.json | 2 +- .../core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../minifier/scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 32 insertions(+), 32 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index a607e315a884a..d95fb61bbb3d3 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.5-nightly-20240802.1" +version = "1.7.5" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.5-nightly-20240802.1" +version = "1.7.5" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.5-nightly-20240802.1" +version = "1.7.5" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.348" +version = "0.91.349" dependencies = [ "anyhow", "swc_cli_impl", @@ -3790,9 +3790,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.194.4" +version = "0.194.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99619353488c1dae960159faef86f0261e7fefe43b84ed1ba80c8cbc5a539434" +checksum = "57d16aa796183d9f2249243e7e8429ccf2f00d7b9134d807d5e68ec826c289af" dependencies = [ "ryu-js", "serde", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index c7d67677a1c22..6394fc8a8b9cb 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240802.1" +version = "1.7.5" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 6f29f56a759eb..79a968194332b 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240802.1" +version = "1.7.5" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 30ef39fa7f070..e7b366e75bdde 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5-nightly-20240802.1" +version = "1.7.5" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index bbe137ae559ed..cf9be20d6a1f4 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.348" +version = "0.91.349" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 265a0ae3d0be3..c37ae7c9af678 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index daa5b13dc2d47..13e30d2f5b836 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 1c08feb27fb20..42b88c34c52e6 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index abb6bd1a44c1b..8198ec930bf50 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 7b4d4bcee2140..20eebc093f51d 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 6964b4bfe472b..758dfd3de9d22 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 5a1aedc233910..19759b5fd848e 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index dcc6680c945d4..52451a633d629 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index a16107e53d124..9fde5c745dfc5 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index 0a5a4c3ddb2a9..d27f6d91d3570 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index e5378bf5943bd..f8f71d0666fce 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index dd8769b0f9d1f..8250205bd4244 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index dcae0eca3bae6..7637169da94c8 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index a03484e61f587..4ac1540507d62 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 8d60a378276ce..a8d2349fb14ab 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 559ec2228b37b..bdb111043aad1 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index bcb4deafa528c..dd032ad0b9040 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 0fc883c6163c0..f50675cc82dfd 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index a8b3fc9bc8cc7..7fc2842b21e67 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index e6234b86593f7..ae7f1bf180100 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 6a2eec613d584..04f4e01c78326 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 5da4fd666eefe..64a1f0e547c57 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.5-nightly-20240802.1", + "version": "1.7.5", "os": [ "win32" ], From 686bf2cffcf80105cb245a1a604dc1694d8522bd Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Fri, 2 Aug 2024 05:38:28 +0000 Subject: [PATCH 42/78] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee088ec759b53..9c9eaa5714adc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.7.5] - 2024-08-02 ### Bug Fixes @@ -1313,9 +1313,6 @@ - **(contributing)** Remove `enum_kind` from `ARCHITECTURE.md` ([#8666](https://github.com/swc-project/swc/issues/8666)) ([f5651e8](https://github.com/swc-project/swc/commit/f5651e87b1b615ae86fbed20a1d259260341a451)) - -- **(es/minifier)** Update examples code ([#8652](https://github.com/swc-project/swc/issues/8652)) ([3bf3a62](https://github.com/swc-project/swc/commit/3bf3a62505cc3fc6eaf182b75c319ea4bc212ee8)) - ### Features From 21ed71668ebe1f9252485de93cb039aac3c3a010 Mon Sep 17 00:00:00 2001 From: Mikkel ALMONTE--RINGAUD Date: Fri, 2 Aug 2024 15:04:49 +0200 Subject: [PATCH 43/78] chore: Fix Typo (#9371) --- bindings/binding_typescript_wasm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/binding_typescript_wasm/README.md b/bindings/binding_typescript_wasm/README.md index aff59a0bf0d6d..b250552727498 100644 --- a/bindings/binding_typescript_wasm/README.md +++ b/bindings/binding_typescript_wasm/README.md @@ -1,4 +1,4 @@ -# @swc/wasm-tyescript +# @swc/wasm-typescript This package provides a Wasm binding for the TypeScript transform. From c2e302127fc80970d4b5096c93e29c9ce76a2fe4 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Sun, 4 Aug 2024 13:18:59 +0800 Subject: [PATCH 44/78] fix(es/codegen): Print the missing `abstract` in class expression (#9372) - Closes #9370 --- .changeset/modern-bears-flash.md | 5 +++++ crates/swc_ecma_codegen/src/lib.rs | 5 +++++ .../tests/fixture/typescript/class_abstract/input.ts | 7 +++++++ .../tests/fixture/typescript/class_abstract/output.ts | 6 ++++++ 4 files changed, 23 insertions(+) create mode 100644 .changeset/modern-bears-flash.md create mode 100644 crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/input.ts create mode 100644 crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/output.ts diff --git a/.changeset/modern-bears-flash.md b/.changeset/modern-bears-flash.md new file mode 100644 index 0000000000000..f2d40c1f24340 --- /dev/null +++ b/.changeset/modern-bears-flash.md @@ -0,0 +1,5 @@ +--- +swc_ecma_codegen: patch +--- + +fix(es/codegen): Print the missing `abstract` in class expression diff --git a/crates/swc_ecma_codegen/src/lib.rs b/crates/swc_ecma_codegen/src/lib.rs index f2901a69464a3..6ec6d4af5a393 100644 --- a/crates/swc_ecma_codegen/src/lib.rs +++ b/crates/swc_ecma_codegen/src/lib.rs @@ -1342,6 +1342,11 @@ where emit!(dec); } + if node.class.is_abstract { + keyword!("abstract"); + space!(); + } + keyword!("class"); if let Some(ref i) = node.ident { diff --git a/crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/input.ts b/crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/input.ts new file mode 100644 index 0000000000000..b74f71b0da553 --- /dev/null +++ b/crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/input.ts @@ -0,0 +1,7 @@ +export default abstract class Predictor { + abstract _type: string; +} + +export abstract class Foo { + abstract _type: string; +} diff --git a/crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/output.ts b/crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/output.ts new file mode 100644 index 0000000000000..f62d5fa2dd9ac --- /dev/null +++ b/crates/swc_ecma_codegen/tests/fixture/typescript/class_abstract/output.ts @@ -0,0 +1,6 @@ +export default abstract class Predictor { + abstract _type: string; +} +export abstract class Foo { + abstract _type: string; +} From c53cce41da69ebb3cd9b464c001902d30bdd07ba Mon Sep 17 00:00:00 2001 From: magic-akari Date: Sun, 4 Aug 2024 13:19:45 +0800 Subject: [PATCH 45/78] fix(es/typescript): Strip declare export in strip-only mode (#9374) - Closes #9373 --- .changeset/few-bats-battle.md | 5 + crates/swc_fast_ts_strip/src/lib.rs | 143 ++++++++---------- .../tests/errors/enums.swc-stderr | 6 + .../swc_fast_ts_strip/tests/errors/enums.ts | 4 +- .../tests/errors/modules.swc-stderr | 6 + .../swc_fast_ts_strip/tests/errors/modules.ts | 4 +- .../tests/errors/namespaces.swc-stderr | 6 + .../tests/errors/namespaces.ts | 4 +- .../tests/fixture/export-declare.js | 8 + .../tests/fixture/export-declare.transform.js | 1 + .../tests/fixture/export-declare.ts | 8 + .../tests/fixture/export-interface.js | 2 + .../fixture/export-interface.transform.js | 1 + .../tests/fixture/export-interface.ts | 2 + 14 files changed, 117 insertions(+), 83 deletions(-) create mode 100644 .changeset/few-bats-battle.md create mode 100644 crates/swc_fast_ts_strip/tests/fixture/export-declare.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/export-declare.transform.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/export-declare.ts create mode 100644 crates/swc_fast_ts_strip/tests/fixture/export-interface.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/export-interface.transform.js create mode 100644 crates/swc_fast_ts_strip/tests/fixture/export-interface.ts diff --git a/.changeset/few-bats-battle.md b/.changeset/few-bats-battle.md new file mode 100644 index 0000000000000..433cbc9f0f325 --- /dev/null +++ b/.changeset/few-bats-battle.md @@ -0,0 +1,5 @@ +--- +swc_fast_ts_strip: patch +--- + +fix(es/typescript): Strip declare export in strip-only mode diff --git a/crates/swc_fast_ts_strip/src/lib.rs b/crates/swc_fast_ts_strip/src/lib.rs index fdc303235ba7d..68cd118c05e55 100644 --- a/crates/swc_fast_ts_strip/src/lib.rs +++ b/crates/swc_fast_ts_strip/src/lib.rs @@ -12,12 +12,12 @@ use swc_common::{ }; use swc_ecma_ast::{ ArrowExpr, BindingIdent, Class, ClassDecl, ClassMethod, ClassProp, Decl, DoWhileStmt, - EsVersion, ExportAll, ExportDecl, ExportSpecifier, FnDecl, ForInStmt, ForOfStmt, ForStmt, - IfStmt, ImportDecl, ImportSpecifier, NamedExport, Param, Pat, Program, Stmt, TsAsExpr, - TsConstAssertion, TsEnumDecl, TsExportAssignment, TsImportEqualsDecl, TsIndexSignature, - TsInstantiation, TsInterfaceDecl, TsModuleDecl, TsModuleName, TsNamespaceDecl, TsNonNullExpr, + EsVersion, ExportAll, ExportDecl, ExportDefaultDecl, ExportSpecifier, FnDecl, ForInStmt, + ForOfStmt, ForStmt, IfStmt, ImportDecl, ImportSpecifier, NamedExport, Param, Pat, Program, + Stmt, TsAsExpr, TsConstAssertion, TsEnumDecl, TsExportAssignment, TsImportEqualsDecl, + TsIndexSignature, TsInstantiation, TsModuleDecl, TsModuleName, TsNamespaceDecl, TsNonNullExpr, TsParamPropParam, TsSatisfiesExpr, TsTypeAliasDecl, TsTypeAnn, TsTypeAssertion, - TsTypeParamDecl, TsTypeParamInstantiation, VarDecl, WhileStmt, + TsTypeParamDecl, TsTypeParamInstantiation, WhileStmt, }; use swc_ecma_parser::{ lexer::Lexer, @@ -532,16 +532,6 @@ impl Visit for TsStrip { n.visit_children_with(self); } - fn visit_class_decl(&mut self, n: &ClassDecl) { - if n.declare { - self.add_replacement(n.span()); - self.fix_asi(n.span()); - return; - } - - n.visit_children_with(self); - } - fn visit_class_method(&mut self, n: &ClassMethod) { if n.function.body.is_none() || n.is_abstract { self.add_replacement(n.span); @@ -636,19 +626,33 @@ impl Visit for TsStrip { } fn visit_export_decl(&mut self, n: &ExportDecl) { - match n.decl { - swc_ecma_ast::Decl::TsInterface(_) - | swc_ecma_ast::Decl::TsTypeAlias(_) - | swc_ecma_ast::Decl::TsEnum(_) - | swc_ecma_ast::Decl::TsModule(_) => { - self.add_replacement(n.span); - self.fix_asi(n.span); - } + if n.decl.is_ts_declare() { + self.add_replacement(n.span); + self.fix_asi(n.span); + return; + } - _ => { - n.visit_children_with(self); - } + n.visit_children_with(self); + } + + fn visit_export_default_decl(&mut self, n: &ExportDefaultDecl) { + if n.decl.is_ts_interface_decl() { + self.add_replacement(n.span); + self.fix_asi(n.span); + return; } + + n.visit_children_with(self); + } + + fn visit_decl(&mut self, n: &Decl) { + if n.is_ts_declare() { + self.add_replacement(n.span()); + self.fix_asi(n.span()); + return; + } + + n.visit_children_with(self); } fn visit_fn_decl(&mut self, n: &FnDecl) { @@ -756,21 +760,6 @@ impl Visit for TsStrip { n.expr.visit_children_with(self); } - fn visit_ts_enum_decl(&mut self, e: &TsEnumDecl) { - if e.declare { - self.add_replacement(e.span); - self.fix_asi(e.span); - return; - } - - HANDLER.with(|handler| { - handler.span_err( - e.span, - "TypeScript enum is not supported in strip-only mode", - ); - }); - } - fn visit_ts_export_assignment(&mut self, n: &TsExportAssignment) { HANDLER.with(|handler| { handler.span_err( @@ -805,18 +794,16 @@ impl Visit for TsStrip { n.expr.visit_children_with(self); } - fn visit_ts_interface_decl(&mut self, n: &TsInterfaceDecl) { - self.add_replacement(n.span); - self.fix_asi(n.span); + fn visit_ts_enum_decl(&mut self, e: &TsEnumDecl) { + HANDLER.with(|handler| { + handler.span_err( + e.span, + "TypeScript enum is not supported in strip-only mode", + ); + }); } fn visit_ts_module_decl(&mut self, n: &TsModuleDecl) { - if n.declare || matches!(n.id, TsModuleName::Str(..)) { - self.add_replacement(n.span); - self.fix_asi(n.span); - return; - } - HANDLER.with(|handler| { handler.span_err( n.span(), @@ -826,12 +813,6 @@ impl Visit for TsStrip { } fn visit_ts_namespace_decl(&mut self, n: &TsNamespaceDecl) { - if n.declare { - self.add_replacement(n.span); - self.fix_asi(n.span); - return; - } - HANDLER.with(|handler| { handler.span_err( n.span(), @@ -904,25 +885,15 @@ impl Visit for TsStrip { self.add_replacement(span(n.span.lo, n.span.hi)); } - fn visit_var_decl(&mut self, n: &VarDecl) { - if n.declare { - self.add_replacement(n.span); - self.fix_asi(n.span); - return; - } - - n.visit_children_with(self); - } - fn visit_if_stmt(&mut self, n: &IfStmt) { n.visit_children_with(self); - if n.cons.is_ts_stmt() { + if n.cons.is_ts_declare() { self.add_overwrite(n.cons.span_lo(), b';'); } if let Some(alt) = &n.alt { - if alt.is_ts_stmt() { + if alt.is_ts_declare() { self.add_overwrite(alt.span_lo(), b';'); } } @@ -931,7 +902,7 @@ impl Visit for TsStrip { fn visit_for_stmt(&mut self, n: &ForStmt) { n.visit_children_with(self); - if n.body.is_ts_stmt() { + if n.body.is_ts_declare() { self.add_overwrite(n.body.span_lo(), b';'); } } @@ -939,7 +910,7 @@ impl Visit for TsStrip { fn visit_for_in_stmt(&mut self, n: &ForInStmt) { n.visit_children_with(self); - if n.body.is_ts_stmt() { + if n.body.is_ts_declare() { self.add_overwrite(n.body.span_lo(), b';'); } } @@ -947,7 +918,7 @@ impl Visit for TsStrip { fn visit_for_of_stmt(&mut self, n: &ForOfStmt) { n.visit_children_with(self); - if n.body.is_ts_stmt() { + if n.body.is_ts_declare() { self.add_overwrite(n.body.span_lo(), b';'); } } @@ -955,7 +926,7 @@ impl Visit for TsStrip { fn visit_while_stmt(&mut self, n: &WhileStmt) { n.visit_children_with(self); - if n.body.is_ts_stmt() { + if n.body.is_ts_declare() { self.add_overwrite(n.body.span_lo(), b';'); } } @@ -963,26 +934,38 @@ impl Visit for TsStrip { fn visit_do_while_stmt(&mut self, n: &DoWhileStmt) { n.visit_children_with(self); - if n.body.is_ts_stmt() { + if n.body.is_ts_declare() { self.add_overwrite(n.body.span_lo(), b';'); } } } -trait IsTsStmt { - fn is_ts_stmt(&self) -> bool; +trait IsTsDecl { + fn is_ts_declare(&self) -> bool; } -impl IsTsStmt for Stmt { - fn is_ts_stmt(&self) -> bool { +impl IsTsDecl for Decl { + fn is_ts_declare(&self) -> bool { match self { - Stmt::Decl(Decl::TsInterface { .. } | Decl::TsTypeAlias(..)) => true, - Stmt::Decl(Decl::TsModule(n)) => n.declare || matches!(n.id, TsModuleName::Str(..)), - Stmt::Decl(Decl::TsEnum(e)) => e.declare, + Self::TsInterface { .. } | Self::TsTypeAlias(..) => true, + + Self::TsModule(module) => module.declare || matches!(module.id, TsModuleName::Str(..)), + Self::TsEnum(ref r#enum) => r#enum.declare, + + Self::Var(ref var) => var.declare, + Self::Fn(FnDecl { declare: true, .. }) + | Self::Class(ClassDecl { declare: true, .. }) => true, _ => false, } } } + +impl IsTsDecl for Stmt { + fn is_ts_declare(&self) -> bool { + self.as_decl().map_or(false, IsTsDecl::is_ts_declare) + } +} + trait U8Helper { fn is_utf8_char_boundary(&self) -> bool; } diff --git a/crates/swc_fast_ts_strip/tests/errors/enums.swc-stderr b/crates/swc_fast_ts_strip/tests/errors/enums.swc-stderr index 2efbeccbfe874..a7bcfdc15e702 100644 --- a/crates/swc_fast_ts_strip/tests/errors/enums.swc-stderr +++ b/crates/swc_fast_ts_strip/tests/errors/enums.swc-stderr @@ -3,3 +3,9 @@ 1 | enum Foo { } : ^^^^^^^^^^^^ `---- + x TypeScript enum is not supported in strip-only mode + ,-[3:1] + 2 | + 3 | export enum Bar { } + : ^^^^^^^^^^^^ + `---- diff --git a/crates/swc_fast_ts_strip/tests/errors/enums.ts b/crates/swc_fast_ts_strip/tests/errors/enums.ts index dfa8410584318..9a599b12b3417 100644 --- a/crates/swc_fast_ts_strip/tests/errors/enums.ts +++ b/crates/swc_fast_ts_strip/tests/errors/enums.ts @@ -1 +1,3 @@ -enum Foo { } \ No newline at end of file +enum Foo { } + +export enum Bar { } \ No newline at end of file diff --git a/crates/swc_fast_ts_strip/tests/errors/modules.swc-stderr b/crates/swc_fast_ts_strip/tests/errors/modules.swc-stderr index 20b6f1cdb8346..6400d96291e33 100644 --- a/crates/swc_fast_ts_strip/tests/errors/modules.swc-stderr +++ b/crates/swc_fast_ts_strip/tests/errors/modules.swc-stderr @@ -3,3 +3,9 @@ 1 | module aModuleKeywordNamespace { } : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `---- + x TypeScript namespace declaration is not supported in strip-only mode + ,-[3:1] + 2 | + 3 | export module aModuleKeywordExportedNamespace { } + : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + `---- diff --git a/crates/swc_fast_ts_strip/tests/errors/modules.ts b/crates/swc_fast_ts_strip/tests/errors/modules.ts index ad71f09e7580a..9274355d33c02 100644 --- a/crates/swc_fast_ts_strip/tests/errors/modules.ts +++ b/crates/swc_fast_ts_strip/tests/errors/modules.ts @@ -1 +1,3 @@ -module aModuleKeywordNamespace { } \ No newline at end of file +module aModuleKeywordNamespace { } + +export module aModuleKeywordExportedNamespace { } \ No newline at end of file diff --git a/crates/swc_fast_ts_strip/tests/errors/namespaces.swc-stderr b/crates/swc_fast_ts_strip/tests/errors/namespaces.swc-stderr index ae5fe90b0de2c..1de76bce5e249 100644 --- a/crates/swc_fast_ts_strip/tests/errors/namespaces.swc-stderr +++ b/crates/swc_fast_ts_strip/tests/errors/namespaces.swc-stderr @@ -3,3 +3,9 @@ 1 | namespace Foo { } : ^^^^^^^^^^^^^^^^^ `---- + x TypeScript namespace declaration is not supported in strip-only mode + ,-[3:1] + 2 | + 3 | export namespace Bar { } + : ^^^^^^^^^^^^^^^^^ + `---- diff --git a/crates/swc_fast_ts_strip/tests/errors/namespaces.ts b/crates/swc_fast_ts_strip/tests/errors/namespaces.ts index f10df856e6546..c19c327715651 100644 --- a/crates/swc_fast_ts_strip/tests/errors/namespaces.ts +++ b/crates/swc_fast_ts_strip/tests/errors/namespaces.ts @@ -1 +1,3 @@ -namespace Foo { } \ No newline at end of file +namespace Foo { } + +export namespace Bar { } diff --git a/crates/swc_fast_ts_strip/tests/fixture/export-declare.js b/crates/swc_fast_ts_strip/tests/fixture/export-declare.js new file mode 100644 index 0000000000000..0d240f7613657 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/export-declare.js @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/crates/swc_fast_ts_strip/tests/fixture/export-declare.transform.js b/crates/swc_fast_ts_strip/tests/fixture/export-declare.transform.js new file mode 100644 index 0000000000000..2234b9cae16d6 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/export-declare.transform.js @@ -0,0 +1 @@ +export { }; diff --git a/crates/swc_fast_ts_strip/tests/fixture/export-declare.ts b/crates/swc_fast_ts_strip/tests/fixture/export-declare.ts new file mode 100644 index 0000000000000..5a7bbfec2c840 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/export-declare.ts @@ -0,0 +1,8 @@ +export declare class Foo {} +export declare interface Bar {} +export declare type Baz = {}; +export declare enum Qux {} +export declare const Quux = 0; +export declare function Corge(): void; +export declare namespace Grault {} +export declare module Garply {} diff --git a/crates/swc_fast_ts_strip/tests/fixture/export-interface.js b/crates/swc_fast_ts_strip/tests/fixture/export-interface.js new file mode 100644 index 0000000000000..505658fb3c198 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/export-interface.js @@ -0,0 +1,2 @@ + + diff --git a/crates/swc_fast_ts_strip/tests/fixture/export-interface.transform.js b/crates/swc_fast_ts_strip/tests/fixture/export-interface.transform.js new file mode 100644 index 0000000000000..2234b9cae16d6 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/export-interface.transform.js @@ -0,0 +1 @@ +export { }; diff --git a/crates/swc_fast_ts_strip/tests/fixture/export-interface.ts b/crates/swc_fast_ts_strip/tests/fixture/export-interface.ts new file mode 100644 index 0000000000000..35f2a916931b0 --- /dev/null +++ b/crates/swc_fast_ts_strip/tests/fixture/export-interface.ts @@ -0,0 +1,2 @@ +export default interface Foo {} +export interface Bar {} From a3a30403c1e37bc58da8ef325418c6d54da5f8fc Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 4 Aug 2024 05:21:08 +0000 Subject: [PATCH 46/78] chore: Publish crates --- .changeset/few-bats-battle.md | 5 ----- .changeset/modern-bears-flash.md | 5 ----- Cargo.lock | 4 ++-- crates/swc_ecma_codegen/Cargo.toml | 2 +- crates/swc_fast_ts_strip/Cargo.toml | 2 +- 5 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 .changeset/few-bats-battle.md delete mode 100644 .changeset/modern-bears-flash.md diff --git a/.changeset/few-bats-battle.md b/.changeset/few-bats-battle.md deleted file mode 100644 index 433cbc9f0f325..0000000000000 --- a/.changeset/few-bats-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_fast_ts_strip: patch ---- - -fix(es/typescript): Strip declare export in strip-only mode diff --git a/.changeset/modern-bears-flash.md b/.changeset/modern-bears-flash.md deleted file mode 100644 index f2d40c1f24340..0000000000000 --- a/.changeset/modern-bears-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_ecma_codegen: patch ---- - -fix(es/codegen): Print the missing `abstract` in class expression diff --git a/Cargo.lock b/Cargo.lock index 2cc0331867b27..7564b5050311b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4271,7 +4271,7 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.154.4" +version = "0.154.5" dependencies = [ "base64", "codspeed-criterion-compat", @@ -5094,7 +5094,7 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.6" +version = "0.4.7" dependencies = [ "anyhow", "codspeed-criterion-compat", diff --git a/crates/swc_ecma_codegen/Cargo.toml b/crates/swc_ecma_codegen/Cargo.toml index b012ba05ec98f..3fd1425df2767 100644 --- a/crates/swc_ecma_codegen/Cargo.toml +++ b/crates/swc_ecma_codegen/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_codegen" repository = "https://github.com/swc-project/swc.git" -version = "0.154.4" +version = "0.154.5" [features] # This does not enable serde for ast nodes. diff --git a/crates/swc_fast_ts_strip/Cargo.toml b/crates/swc_fast_ts_strip/Cargo.toml index 761a70986ec3f..f5005d26ff4b9 100644 --- a/crates/swc_fast_ts_strip/Cargo.toml +++ b/crates/swc_fast_ts_strip/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_fast_ts_strip" repository = { workspace = true } -version = "0.4.6" +version = "0.4.7" [dependencies] From badd6a9ede5bd511763515b3e62bd222f0860968 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Sun, 4 Aug 2024 13:21:27 +0800 Subject: [PATCH 47/78] fix(es/decorators): Use correct class name reference (#9375) - Closes #9350 --- .changeset/flat-geese-care.md | 5 +++++ .../fixture/issues-9xxx/9350/input/.swcrc | 13 ++++++++++++ .../fixture/issues-9xxx/9350/input/index.ts | 18 +++++++++++++++++ .../fixture/issues-9xxx/9350/input/test.ts | 19 ++++++++++++++++++ .../fixture/issues-9xxx/9350/output/index.ts | 19 ++++++++++++++++++ .../fixture/issues-9xxx/9350/output/test.ts | 20 +++++++++++++++++++ .../src/decorators/legacy/mod.rs | 8 +++++--- 7 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 .changeset/flat-geese-care.md create mode 100644 crates/swc/tests/fixture/issues-9xxx/9350/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-9xxx/9350/input/index.ts create mode 100644 crates/swc/tests/fixture/issues-9xxx/9350/input/test.ts create mode 100644 crates/swc/tests/fixture/issues-9xxx/9350/output/index.ts create mode 100644 crates/swc/tests/fixture/issues-9xxx/9350/output/test.ts diff --git a/.changeset/flat-geese-care.md b/.changeset/flat-geese-care.md new file mode 100644 index 0000000000000..4b0f2a8cd206b --- /dev/null +++ b/.changeset/flat-geese-care.md @@ -0,0 +1,5 @@ +--- +swc_ecma_transforms_proposal: patch +--- + +fix(es/decorator): Use correct class name reference diff --git a/crates/swc/tests/fixture/issues-9xxx/9350/input/.swcrc b/crates/swc/tests/fixture/issues-9xxx/9350/input/.swcrc new file mode 100644 index 0000000000000..fc1bae37af8cf --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9350/input/.swcrc @@ -0,0 +1,13 @@ +{ + "jsc": { + "parser": { + "syntax": "typescript", + "decorators": true + }, + "target": "es2016" + }, + "module": { + "type": "es6" + }, + "isModule": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-9xxx/9350/input/index.ts b/crates/swc/tests/fixture/issues-9xxx/9350/input/index.ts new file mode 100644 index 0000000000000..2af9a0de49cd7 --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9350/input/index.ts @@ -0,0 +1,18 @@ +function registerHook(key) { + return (...args) => console.log(args); +} + +export default function design(base: typeof Component) { + return class Design extends base { + copy() { + console.log("copy"); + } + + @registerHook("beforeRender") + @registerHook("afterRender") + render() { + super.render(); + console.log("design render"); + } + }; +} diff --git a/crates/swc/tests/fixture/issues-9xxx/9350/input/test.ts b/crates/swc/tests/fixture/issues-9xxx/9350/input/test.ts new file mode 100644 index 0000000000000..d7c98af4452d2 --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9350/input/test.ts @@ -0,0 +1,19 @@ +function registerHook(key) { + return (...args) => console.log(args); +} + +export default function design(base: typeof Component) { + const Design = "test name conflict"; + return class Design extends base { + copy() { + console.log("copy"); + } + + @registerHook("beforeRender") + @registerHook("afterRender") + render() { + super.render(); + console.log("design render"); + } + }; +} diff --git a/crates/swc/tests/fixture/issues-9xxx/9350/output/index.ts b/crates/swc/tests/fixture/issues-9xxx/9350/output/index.ts new file mode 100644 index 0000000000000..f2f2c192eb996 --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9350/output/index.ts @@ -0,0 +1,19 @@ +import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; +function registerHook(key) { + return (...args)=>console.log(args); +} +export default function design(base) { + var Design; + return Design = class Design extends base { + copy() { + console.log("copy"); + } + render() { + super.render(); + console.log("design render"); + } + }, _ts_decorate([ + registerHook("beforeRender"), + registerHook("afterRender") + ], Design.prototype, "render", null), Design; +} diff --git a/crates/swc/tests/fixture/issues-9xxx/9350/output/test.ts b/crates/swc/tests/fixture/issues-9xxx/9350/output/test.ts new file mode 100644 index 0000000000000..f7a9bad707609 --- /dev/null +++ b/crates/swc/tests/fixture/issues-9xxx/9350/output/test.ts @@ -0,0 +1,20 @@ +import { _ as _ts_decorate } from "@swc/helpers/_/_ts_decorate"; +function registerHook(key) { + return (...args)=>console.log(args); +} +export default function design(base) { + const Design = "test name conflict"; + var Design1; + return Design1 = class Design1 extends base { + copy() { + console.log("copy"); + } + render() { + super.render(); + console.log("design render"); + } + }, _ts_decorate([ + registerHook("beforeRender"), + registerHook("afterRender") + ], Design1.prototype, "render", null), Design1; +} diff --git a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs index 28731050bec1f..d422fa4e5c0b2 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/mod.rs @@ -332,14 +332,16 @@ impl VisitMut for TscDecorator { return; } - let var_name = private_ident!("_class"); - let ident = n.ident.get_or_insert_with(|| var_name.clone()); + let ident = n + .ident + .get_or_insert_with(|| private_ident!("_class")) + .clone(); let old = mem::replace(&mut self.class_name, Some(ident.clone())); n.visit_mut_children_with(self); - self.assign_class_expr_to = Some(var_name); + self.assign_class_expr_to = Some(ident); self.class_name = old; } From 67cd69f6ba09a6bb5cf868d0115953862d86f2ce Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 4 Aug 2024 05:23:03 +0000 Subject: [PATCH 48/78] chore: Publish crates --- .changeset/flat-geese-care.md | 5 ----- Cargo.lock | 2 +- crates/swc_ecma_transforms_proposal/Cargo.toml | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 .changeset/flat-geese-care.md diff --git a/.changeset/flat-geese-care.md b/.changeset/flat-geese-care.md deleted file mode 100644 index 4b0f2a8cd206b..0000000000000 --- a/.changeset/flat-geese-care.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -swc_ecma_transforms_proposal: patch ---- - -fix(es/decorator): Use correct class name reference diff --git a/Cargo.lock b/Cargo.lock index 7564b5050311b..51996d009dc88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4861,7 +4861,7 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.177.1" +version = "0.177.2" dependencies = [ "either", "rustc-hash", diff --git a/crates/swc_ecma_transforms_proposal/Cargo.toml b/crates/swc_ecma_transforms_proposal/Cargo.toml index 3c76bbdd33686..caf884976b77b 100644 --- a/crates/swc_ecma_transforms_proposal/Cargo.toml +++ b/crates/swc_ecma_transforms_proposal/Cargo.toml @@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_ecma_transforms_proposal" repository = "https://github.com/swc-project/swc.git" -version = "0.177.1" +version = "0.177.2" [lib] bench = false From 70587e4388057bcc7dcc6d1d941706e1a93d7517 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 4 Aug 2024 05:29:39 +0000 Subject: [PATCH 49/78] chore: Publish `1.7.6-nightly-20240804.1` with `swc_core` `v0.99.6` --- bindings/Cargo.lock | 16 ++++++++-------- bindings/Cargo.toml | 2 +- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- .../core/scripts/npm/darwin-arm64/package.json | 2 +- .../core/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../core/scripts/npm/linux-x64-gnu/package.json | 2 +- .../core/scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- .../scripts/npm/darwin-arm64/package.json | 2 +- .../minifier/scripts/npm/darwin-x64/package.json | 2 +- .../scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../scripts/npm/linux-arm64-gnu/package.json | 2 +- .../scripts/npm/linux-arm64-musl/package.json | 2 +- .../scripts/npm/linux-x64-gnu/package.json | 2 +- .../scripts/npm/linux-x64-musl/package.json | 2 +- .../scripts/npm/win32-arm64-msvc/package.json | 2 +- .../scripts/npm/win32-ia32-msvc/package.json | 2 +- .../scripts/npm/win32-x64-msvc/package.json | 2 +- 28 files changed, 35 insertions(+), 35 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index d95fb61bbb3d3..1eb6c9f1c22e5 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.5" +version = "1.7.6-nightly-20240804.1" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.5" +version = "1.7.6-nightly-20240804.1" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.5" +version = "1.7.6-nightly-20240804.1" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.349" +version = "0.91.350" dependencies = [ "anyhow", "swc_cli_impl", @@ -3221,9 +3221,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.154.4" +version = "0.154.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7badcda2c45056495ed94b957884099cb000470ae7901ba68db2e7fd48414a4b" +checksum = "530226ed8f294908954687c7bf623a020ed1bc080a54a33f66979c5f4b5798a1" dependencies = [ "memchr", "num-bigint", @@ -3896,9 +3896,9 @@ dependencies = [ [[package]] name = "swc_fast_ts_strip" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588a536170fae088f84ba1c6350b1944e0c0d355ecf1808f78a3a64155b2e94d" +checksum = "d837cfd2940f787ef11d49b87b60d18a4c09fbd9f44245c6206601a69592a1db" dependencies = [ "anyhow", "serde", diff --git a/bindings/Cargo.toml b/bindings/Cargo.toml index 1b24ca85218fe..b5456b96175b2 100644 --- a/bindings/Cargo.toml +++ b/bindings/Cargo.toml @@ -28,7 +28,7 @@ resolver = "2" swc_config = "0.1.14" swc_core = "0.99.6" swc_error_reporters = "0.20.0" - swc_fast_ts_strip = "0.4.6" + swc_fast_ts_strip = "0.4.7" swc_malloc = "0.5.11" swc_nodejs_common = "0.0.8" tracing = "0.1.40" diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 6394fc8a8b9cb..022dee4fb2c65 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5" +version = "1.7.6-nightly-20240804.1" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 79a968194332b..44519766ff74d 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5" +version = "1.7.6-nightly-20240804.1" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index e7b366e75bdde..51cbe024eb75e 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.5" +version = "1.7.6-nightly-20240804.1" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index cf9be20d6a1f4..54cbda9b5ee8f 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.349" +version = "0.91.350" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index c37ae7c9af678..98747e46b1fdd 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index 13e30d2f5b836..f97155ad17e39 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index 42b88c34c52e6..dbe4c620f1883 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 8198ec930bf50..162cba4f58432 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index 20eebc093f51d..d3523a7c6bf19 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 758dfd3de9d22..4f75c6b823490 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 19759b5fd848e..7a4df89dff19a 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index 52451a633d629..f5acf4b002aae 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 9fde5c745dfc5..6bfc745b60daa 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index d27f6d91d3570..ea21c69a18ca9 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index f8f71d0666fce..3843dd702a2ce 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index 8250205bd4244..fa53e9e591eb2 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 7637169da94c8..0ecba81922aad 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index 4ac1540507d62..e36b7211f3e01 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index a8d2349fb14ab..03fc0c039c517 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index bdb111043aad1..236ea2eb34dd9 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index dd032ad0b9040..bf12c473e6d18 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index f50675cc82dfd..8b58c3bfeeaa7 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index 7fc2842b21e67..e08917a8b51b2 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index ae7f1bf180100..3120ad6503f23 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 04f4e01c78326..29a1f5af67f94 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index 64a1f0e547c57..ba111dd8e64b4 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.5", + "version": "1.7.6-nightly-20240804.1", "os": [ "win32" ], From 011b8f247c9d5712a881631c9d4a0c438aa6c0e4 Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 4 Aug 2024 05:29:40 +0000 Subject: [PATCH 50/78] chore: Update changelog --- CHANGELOG.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c9eaa5714adc..02bebf147a5b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,18 @@ # Changelog +## [unreleased] + +### Bug Fixes + + + +- **(es/codegen)** Print the missing `abstract` in class expression ([#9372](https://github.com/swc-project/swc/issues/9372)) ([c2e3021](https://github.com/swc-project/swc/commit/c2e302127fc80970d4b5096c93e29c9ce76a2fe4)) + + +- **(es/decorators)** Use correct class name reference ([#9375](https://github.com/swc-project/swc/issues/9375)) ([badd6a9](https://github.com/swc-project/swc/commit/badd6a9ede5bd511763515b3e62bd222f0860968)) + + +- **(es/typescript)** Strip declare export in strip-only mode ([#9374](https://github.com/swc-project/swc/issues/9374)) ([c53cce4](https://github.com/swc-project/swc/commit/c53cce41da69ebb3cd9b464c001902d30bdd07ba)) + ## [1.7.5] - 2024-08-02 ### Bug Fixes @@ -1317,9 +1331,6 @@ -- **(es/ast)** Add alias to `EsVersion` ([#8653](https://github.com/swc-project/swc/issues/8653)) ([7d62c76](https://github.com/swc-project/swc/commit/7d62c762e657cdddf45c1a99c66285ae9cb07b5c)) - - - **(es/lints)** Add `no-cond-assign` rule ([#8661](https://github.com/swc-project/swc/issues/8661)) ([c0d01df](https://github.com/swc-project/swc/commit/c0d01dff213b2bf0725a16a5e6ca915f7517699d)) @@ -1332,12 +1343,6 @@ -- **(visit)** Use `quote::quote!` instead of `pmutil::q!` ([#8485](https://github.com/swc-project/swc/issues/8485)) ([8defcb2](https://github.com/swc-project/swc/commit/8defcb28196238e9f8bcbb0e8f345724d47f8882)) - - -- **(visit)** Use qualified paths for generated codes ([#8655](https://github.com/swc-project/swc/issues/8655)) ([671c4a7](https://github.com/swc-project/swc/commit/671c4a78dd294591a0b18a44e18edc29bba30a52)) - - - **(visit)** Drop `pmutil` to improve compile time ([#8673](https://github.com/swc-project/swc/issues/8673)) ([b474382](https://github.com/swc-project/swc/commit/b47438245a0fb7f12b325a66a756beeaf58c3c9e)) From 4e7bf46d5e593dcbbe640863b1dc3b124c72c31a Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 4 Aug 2024 06:25:15 +0000 Subject: [PATCH 51/78] chore: Publish `1.7.6` with `swc_core` `v0.99.6` --- bindings/Cargo.lock | 8 ++++---- bindings/binding_core_wasm/Cargo.toml | 2 +- bindings/binding_minifier_wasm/Cargo.toml | 2 +- bindings/binding_typescript_wasm/Cargo.toml | 2 +- bindings/swc_cli/Cargo.toml | 2 +- packages/core/package.json | 2 +- packages/core/scripts/npm/darwin-arm64/package.json | 2 +- packages/core/scripts/npm/darwin-x64/package.json | 2 +- .../core/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- packages/core/scripts/npm/linux-arm64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/core/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/core/scripts/npm/linux-x64-musl/package.json | 2 +- packages/core/scripts/npm/win32-arm64-msvc/package.json | 2 +- packages/core/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/core/scripts/npm/win32-x64-msvc/package.json | 2 +- packages/minifier/package.json | 2 +- packages/minifier/scripts/npm/darwin-arm64/package.json | 2 +- packages/minifier/scripts/npm/darwin-x64/package.json | 2 +- .../minifier/scripts/npm/linux-arm-gnueabihf/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-gnu/package.json | 2 +- .../minifier/scripts/npm/linux-arm64-musl/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-gnu/package.json | 2 +- packages/minifier/scripts/npm/linux-x64-musl/package.json | 2 +- .../minifier/scripts/npm/win32-arm64-msvc/package.json | 2 +- .../minifier/scripts/npm/win32-ia32-msvc/package.json | 2 +- packages/minifier/scripts/npm/win32-x64-msvc/package.json | 2 +- 27 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bindings/Cargo.lock b/bindings/Cargo.lock index 1eb6c9f1c22e5..40f0a165c2e62 100644 --- a/bindings/Cargo.lock +++ b/bindings/Cargo.lock @@ -237,7 +237,7 @@ dependencies = [ [[package]] name = "binding_core_wasm" -version = "1.7.6-nightly-20240804.1" +version = "1.7.6" dependencies = [ "anyhow", "getrandom", @@ -297,7 +297,7 @@ dependencies = [ [[package]] name = "binding_minifier_wasm" -version = "1.7.6-nightly-20240804.1" +version = "1.7.6" dependencies = [ "anyhow", "getrandom", @@ -310,7 +310,7 @@ dependencies = [ [[package]] name = "binding_typescript_wasm" -version = "1.7.6-nightly-20240804.1" +version = "1.7.6" dependencies = [ "anyhow", "getrandom", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "swc_cli" -version = "0.91.350" +version = "0.91.351" dependencies = [ "anyhow", "swc_cli_impl", diff --git a/bindings/binding_core_wasm/Cargo.toml b/bindings/binding_core_wasm/Cargo.toml index 022dee4fb2c65..b50588128f1f6 100644 --- a/bindings/binding_core_wasm/Cargo.toml +++ b/bindings/binding_core_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_core_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.6-nightly-20240804.1" +version = "1.7.6" [lib] bench = false diff --git a/bindings/binding_minifier_wasm/Cargo.toml b/bindings/binding_minifier_wasm/Cargo.toml index 44519766ff74d..0f253fa96c208 100644 --- a/bindings/binding_minifier_wasm/Cargo.toml +++ b/bindings/binding_minifier_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_minifier_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.6-nightly-20240804.1" +version = "1.7.6" [lib] bench = false diff --git a/bindings/binding_typescript_wasm/Cargo.toml b/bindings/binding_typescript_wasm/Cargo.toml index 51cbe024eb75e..592c0632c633c 100644 --- a/bindings/binding_typescript_wasm/Cargo.toml +++ b/bindings/binding_typescript_wasm/Cargo.toml @@ -6,7 +6,7 @@ license = "Apache-2.0" name = "binding_typescript_wasm" publish = false repository = "https://github.com/swc-project/swc.git" -version = "1.7.6-nightly-20240804.1" +version = "1.7.6" [lib] bench = false diff --git a/bindings/swc_cli/Cargo.toml b/bindings/swc_cli/Cargo.toml index 54cbda9b5ee8f..62c8b6417425d 100644 --- a/bindings/swc_cli/Cargo.toml +++ b/bindings/swc_cli/Cargo.toml @@ -6,7 +6,7 @@ include = ["Cargo.toml", "src/**/*.rs"] license = "Apache-2.0" name = "swc_cli" repository = "https://github.com/swc-project/swc.git" -version = "0.91.350" +version = "0.91.351" [[bin]] bench = false diff --git a/packages/core/package.json b/packages/core/package.json index 98747e46b1fdd..70c5f2ea79687 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "description": "Super-fast alternative for babel", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/core/scripts/npm/darwin-arm64/package.json b/packages/core/scripts/npm/darwin-arm64/package.json index f97155ad17e39..1a68112740dde 100644 --- a/packages/core/scripts/npm/darwin-arm64/package.json +++ b/packages/core/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-arm64", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/darwin-x64/package.json b/packages/core/scripts/npm/darwin-x64/package.json index dbe4c620f1883..7305c8cf8369e 100644 --- a/packages/core/scripts/npm/darwin-x64/package.json +++ b/packages/core/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-darwin-x64", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "darwin" ], diff --git a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json index 162cba4f58432..7d7aa815d5f80 100644 --- a/packages/core/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/core/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm-gnueabihf", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-gnu/package.json b/packages/core/scripts/npm/linux-arm64-gnu/package.json index d3523a7c6bf19..f909ecf7427ec 100644 --- a/packages/core/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/core/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-gnu", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-arm64-musl/package.json b/packages/core/scripts/npm/linux-arm64-musl/package.json index 4f75c6b823490..195eaf552f282 100644 --- a/packages/core/scripts/npm/linux-arm64-musl/package.json +++ b/packages/core/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-arm64-musl", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-gnu/package.json b/packages/core/scripts/npm/linux-x64-gnu/package.json index 7a4df89dff19a..a9df2b0d1df13 100644 --- a/packages/core/scripts/npm/linux-x64-gnu/package.json +++ b/packages/core/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-gnu", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/linux-x64-musl/package.json b/packages/core/scripts/npm/linux-x64-musl/package.json index f5acf4b002aae..0014a8610855e 100644 --- a/packages/core/scripts/npm/linux-x64-musl/package.json +++ b/packages/core/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-linux-x64-musl", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/core/scripts/npm/win32-arm64-msvc/package.json b/packages/core/scripts/npm/win32-arm64-msvc/package.json index 6bfc745b60daa..103e64df1b682 100644 --- a/packages/core/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/core/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-arm64-msvc", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-ia32-msvc/package.json b/packages/core/scripts/npm/win32-ia32-msvc/package.json index ea21c69a18ca9..dc74514db4a9b 100644 --- a/packages/core/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/core/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-ia32-msvc", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "win32" ], diff --git a/packages/core/scripts/npm/win32-x64-msvc/package.json b/packages/core/scripts/npm/win32-x64-msvc/package.json index 3843dd702a2ce..2df7bb316a179 100644 --- a/packages/core/scripts/npm/win32-x64-msvc/package.json +++ b/packages/core/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/core-win32-x64-msvc", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "win32" ], diff --git a/packages/minifier/package.json b/packages/minifier/package.json index fa53e9e591eb2..2e5a7da3a15f1 100644 --- a/packages/minifier/package.json +++ b/packages/minifier/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "description": "Super-fast alternative for terser", "homepage": "https://swc.rs", "main": "./index.js", diff --git a/packages/minifier/scripts/npm/darwin-arm64/package.json b/packages/minifier/scripts/npm/darwin-arm64/package.json index 0ecba81922aad..536d45f5451b2 100644 --- a/packages/minifier/scripts/npm/darwin-arm64/package.json +++ b/packages/minifier/scripts/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-arm64", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/darwin-x64/package.json b/packages/minifier/scripts/npm/darwin-x64/package.json index e36b7211f3e01..6be848ae78ce5 100644 --- a/packages/minifier/scripts/npm/darwin-x64/package.json +++ b/packages/minifier/scripts/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-darwin-x64", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "darwin" ], diff --git a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json index 03fc0c039c517..5aace58daf180 100644 --- a/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json +++ b/packages/minifier/scripts/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm-gnueabihf", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json index 236ea2eb34dd9..e8f6535ab7a3c 100644 --- a/packages/minifier/scripts/npm/linux-arm64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-gnu", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-arm64-musl/package.json b/packages/minifier/scripts/npm/linux-arm64-musl/package.json index bf12c473e6d18..8053ea58bd259 100644 --- a/packages/minifier/scripts/npm/linux-arm64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-arm64-musl", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-gnu/package.json b/packages/minifier/scripts/npm/linux-x64-gnu/package.json index 8b58c3bfeeaa7..816a51804170e 100644 --- a/packages/minifier/scripts/npm/linux-x64-gnu/package.json +++ b/packages/minifier/scripts/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-gnu", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/linux-x64-musl/package.json b/packages/minifier/scripts/npm/linux-x64-musl/package.json index e08917a8b51b2..5e58a5d118139 100644 --- a/packages/minifier/scripts/npm/linux-x64-musl/package.json +++ b/packages/minifier/scripts/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-linux-x64-musl", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "linux" ], diff --git a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json index 3120ad6503f23..40c569865aea6 100644 --- a/packages/minifier/scripts/npm/win32-arm64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-arm64-msvc", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json index 29a1f5af67f94..74654c4fbadf1 100644 --- a/packages/minifier/scripts/npm/win32-ia32-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-ia32-msvc", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "win32" ], diff --git a/packages/minifier/scripts/npm/win32-x64-msvc/package.json b/packages/minifier/scripts/npm/win32-x64-msvc/package.json index ba111dd8e64b4..b37257e8021e3 100644 --- a/packages/minifier/scripts/npm/win32-x64-msvc/package.json +++ b/packages/minifier/scripts/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@swc/minifier-win32-x64-msvc", - "version": "1.7.6-nightly-20240804.1", + "version": "1.7.6", "os": [ "win32" ], From a8e857b661e6824d7404057ee427676bf52f2ffb Mon Sep 17 00:00:00 2001 From: SWC Bot Date: Sun, 4 Aug 2024 06:25:16 +0000 Subject: [PATCH 52/78] chore: Update changelog --- CHANGELOG.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02bebf147a5b6..384b85c3dc4fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # Changelog -## [unreleased] +## [1.7.6] - 2024-08-04 ### Bug Fixes @@ -1295,9 +1295,6 @@ - **(css/parser)** Fix parsing of `@import` without `;` or space ([#8657](https://github.com/swc-project/swc/issues/8657)) ([60b2340](https://github.com/swc-project/swc/commit/60b234077e26c2d319225ced2735e6d549c4557e)) -- **(es/codegen)** Emit computed getter and setter signatures ([#8656](https://github.com/swc-project/swc/issues/8656)) ([66bf8e9](https://github.com/swc-project/swc/commit/66bf8e907d09349d847a99036747edb724c4a20a)) - - - **(es/codegen)** Fix replacement when `inline_script` is on ([#8659](https://github.com/swc-project/swc/issues/8659)) ([e179134](https://github.com/swc-project/swc/commit/e1791340cd35e5465ff3f6b71ac596a138173d04)) From 9d65c776025346985acaf36bc1d54134ebc4c7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 5 Aug 2024 17:12:30 +0900 Subject: [PATCH 53/78] fix(common): Do not generate invalid source map (#9050) **Related issue:** - Closes #8789 --- .changeset/angry-beers-dress.md | 5 + Cargo.lock | 4 +- Cargo.toml | 2 +- crates/swc/src/lib.rs | 6 +- .../fixture/issues-8xxx/8789/input/.swcrc | 4 + .../tests/fixture/issues-8xxx/8789/input/a.js | 40 + .../fixture/issues-8xxx/8789/input/a.js.map | 8 + .../fixture/issues-8xxx/8789/output/a.js | 24389 ++++++++++++++++ .../fixture/issues-8xxx/8789/output/a.map | 3882 +++ .../fixture/sourcemap/004/output/index.map | 18 +- .../issue-6552/input-map/output/index.map | 8 +- .../minify/issue-7475/issue-8372/1/output.map | 14 +- crates/swc_common/src/source_map.rs | 55 +- crates/swc_compiler_base/src/lib.rs | 2 +- 14 files changed, 28375 insertions(+), 62 deletions(-) create mode 100644 .changeset/angry-beers-dress.md create mode 100644 crates/swc/tests/fixture/issues-8xxx/8789/input/.swcrc create mode 100644 crates/swc/tests/fixture/issues-8xxx/8789/input/a.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8789/input/a.js.map create mode 100644 crates/swc/tests/fixture/issues-8xxx/8789/output/a.js create mode 100644 crates/swc/tests/fixture/issues-8xxx/8789/output/a.map diff --git a/.changeset/angry-beers-dress.md b/.changeset/angry-beers-dress.md new file mode 100644 index 0000000000000..27b4974b6f070 --- /dev/null +++ b/.changeset/angry-beers-dress.md @@ -0,0 +1,5 @@ +--- +swc_common: minor +--- + +fix(common): Do not generate invalid source map diff --git a/Cargo.lock b/Cargo.lock index 51996d009dc88..2ed7b483e1414 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3650,9 +3650,9 @@ dependencies = [ [[package]] name = "sourcemap" -version = "8.0.1" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208d40b9e8cad9f93613778ea295ed8f3c2b1824217c6cfc7219d3f6f45b96d4" +checksum = "dab08a862c70980b8e23698b507e272317ae52a608a164a844111f5372374f1f" dependencies = [ "base64-simd", "bitvec", diff --git a/Cargo.toml b/Cargo.toml index 93fc4dbc3c5e0..715fdb5040ddd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -123,7 +123,7 @@ resolver = "2" siphasher = "0.3.9" smallvec = "1.8.0" smartstring = "1" - sourcemap = "8.0.1" + sourcemap = "9.0.0" st-map = "0.2.0" syn = "2" tempfile = "3.6.0" diff --git a/crates/swc/src/lib.rs b/crates/swc/src/lib.rs index b7a8a3cba1e69..20e98ff76f627 100644 --- a/crates/swc/src/lib.rs +++ b/crates/swc/src/lib.rs @@ -733,7 +733,7 @@ impl Compiler { None }; - self.apply_transforms(handler, fm.clone(), orig, config) + self.apply_transforms(handler, fm.clone(), orig.as_ref(), config) }) } @@ -906,7 +906,7 @@ impl Compiler { inline_sources_content: opts.inline_sources_content, source_map, source_map_names: &source_map_names, - orig, + orig: orig.as_ref(), comments: Some(&comments), emit_source_map_columns: opts.emit_source_map_columns, preamble: &opts.format.preamble, @@ -952,7 +952,7 @@ impl Compiler { &self, handler: &Handler, fm: Arc, - orig: Option, + orig: Option<&sourcemap::SourceMap>, config: BuiltInput, ) -> Result { self.run(|| { diff --git a/crates/swc/tests/fixture/issues-8xxx/8789/input/.swcrc b/crates/swc/tests/fixture/issues-8xxx/8789/input/.swcrc new file mode 100644 index 0000000000000..8a89fce3107d1 --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8789/input/.swcrc @@ -0,0 +1,4 @@ +{ + "inputSourceMap": true, + "sourceMaps": true +} \ No newline at end of file diff --git a/crates/swc/tests/fixture/issues-8xxx/8789/input/a.js b/crates/swc/tests/fixture/issues-8xxx/8789/input/a.js new file mode 100644 index 0000000000000..d3d2bb6fe69ee --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8789/input/a.js @@ -0,0 +1,40 @@ +!function($$setCurrentPath, define, require) {function __originPromise(){return Promise};define("f-AR4dJ.js", function (require, module, exports, ty,Promise,global,window,top,document,frames,self,location,navigator,localStorage,history,Caches,screen,alert,confirm,prompt,fetch,XMLHttpRequest,WebSocket,webkit,Worker,atob,btoa,process ){ 'use strict'; if ('function' !== typeof Promise || 'function' !== typeof Promise.resolve) {process = btoa;btoa = atob;atob = Worker;Worker = webkit;webkit = WebSocket;WebSocket = XMLHttpRequest;XMLHttpRequest = fetch;fetch = prompt;prompt = confirm;confirm = alert;alert = screen;screen = Caches;Caches = history;history = localStorage;localStorage = navigator;navigator = location;location = self;self = frames;frames = document;document = top;top = window;window = global;global = Promise ;Promise = __originPromise();}; +var xh=Object.defineProperty,Ch=Object.defineProperties;var Th=Object.getOwnPropertyDescriptors;var pl=Object.getOwnPropertySymbols;var Nc=Object.prototype.hasOwnProperty,Wc=Object.prototype.propertyIsEnumerable;var Uc=(P,f,i)=>f in P?xh(P,f,{enumerable:!0,configurable:!0,writable:!0,value:i}):P[f]=i,Dt=(P,f)=>{for(var i in f||(f={}))Nc.call(f,i)&&Uc(P,i,f[i]);if(pl)for(var i of pl(f))Wc.call(f,i)&&Uc(P,i,f[i]);return P},ui=(P,f)=>Ch(P,Th(f));var Ss=(P,f)=>{var i={};for(var g in P)Nc.call(P,g)&&f.indexOf(g)<0&&(i[g]=P[g]);if(P!=null&&pl)for(var g of pl(P))f.indexOf(g)<0&&Wc.call(P,g)&&(i[g]=P[g]);return i};var Bo=(P,f)=>()=>(f||P((f={exports:{}}).exports,f),f.exports);var wc=Bo(()=>{(function(P){function f(M){for(var j=M[0],R=M[1],T=M[2],w,Z,Q=0,ce=[];Q{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["common"],{"./src/api/index.ts":function(P,f,i){"use strict";i.d(f,"e",function(){return v}),i.d(f,"d",function(){return y}),i.d(f,"h",function(){return u}),i.d(f,"b",function(){return U}),i.d(f,"g",function(){return B}),i.d(f,"j",function(){return b}),i.d(f,"c",function(){return p}),i.d(f,"a",function(){return M}),i.d(f,"f",function(){return j}),i.d(f,"i",function(){return R});var g=i("./src/utils/request/index.ts"),v=function(){return Object(g.a)({url:"tuya.m.cl.combo.register",data:{}}).then(function(w){return w.success?w.result:{}})},y=function(){return Object(g.a)({url:"tuya.m.cl.combo.merchant.detail",data:{}}).then(function(w){return w.success?w.result:{}})},u=function(){return Object(g.a)({url:"tuya.m.cl.register.success",data:{}}).then(function(w){return w.success?w.result:{}})},U=function(){return Object(g.a)({url:"tuya.m.cl.combo.register.getaudit",data:{}}).then(function(w){return w.success?w.result:{}})},B=function(w){return Object(g.a)({url:"tuya.m.cl.combo.save",data:w}).then(function(Z){return Z.success?Z.result:{}})},b=function(){return Object(g.a)({url:"tuya.m.cl.combo.register.submitaudit"}).then(function(w){return w.success?w.result:{}})},p=function(){return Object(g.a)({url:"tuya.m.cl.combo.list"}).then(function(w){return w.success?w.result:{}})},M=function(w){return Object(g.a)({url:"m.illume.merchant.vas.projects",data:w}).then(function(Z){return Z.success?Z.result:[]})},j=function(w){return Object(g.a)({url:"m.illume.merchant.vas.list",data:w}).then(function(Z){return Z.success?Z.result:[]})},R=function(w){return Object(g.a)({url:"m.illume.merchant.vas.add",data:w}).then(function(Z){return Z.success?Z.result:[]})}},"./src/api/mockData.ts":function(P,f,i){"use strict";f.a={"tuya.m.cl.combo.merchant.detail":{projectMaxNum:100,projectCount:40,isbrander:!1,deviceCount:219,remainingDeviceCount:785,remainingProjectCount:60,edition:1,comboSingleDetailVO:{equityList:[{value:"1\u4E2A",content:"\u9879\u76EE\u6570"},{value:"",content:"\u5305\u542B\u9AD8\u7EA7\u7248\u6240\u6709\u529F\u80FD"},{value:"",content:"\u7A7A\u95F4\u70ED\u529B\u56FE"},{value:"",content:"\u63A7\u5236\u4E8C\u7EF4\u7801\u5206\u4EAB"},{value:"",content:"\u8BBE\u5907\u540C\u4F4D\u66FF\u6362"}],version:"profession",url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logod.png",branderProjectNum:1e7,h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=profession",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!1,branderDeviceNum:5e3,price:"\u54A8\u8BE2\u62A5\u4EF7",name:"\u4E13\u4E1A\u7248",contentList:[{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zysggl@2x.png",content:"\u65BD\u5DE5\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zycygl@2x.png",content:"\u6210\u5458\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zytqfw@2x.png",content:"\u5929\u6C14\u670D\u52A1",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zydzfw@2x.png",content:"\u5730\u5740\u670D\u52A1",desc:""}],url:"",content:"\u9879\u76EE\u7BA1\u7406"},{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zykjjggl@2x.png",content:"\u533A\u57DF\u7ED3\u6784\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zypmtzdr@2x.png",content:"\u5E73\u9762\u56FE\u5BFC\u5165",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyqyytgl@2x.png",content:"\u533A\u57DF\u7528\u9014\u7BA1\u7406",desc:""}],url:"",content:"\u533A\u57DF\u7BA1\u7406"},{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbjk@2x.png",content:"\u8FD0\u884C\u72B6\u6001",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbota@2x.png",content:"\u8BBE\u5907OTA",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbytgl@2x.png",content:"\u8BBE\u5907\u7528\u9014\u7BA1\u7406",desc:""}],url:"",content:"\u8BBE\u5907\u7BA1\u7406"},{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyqzgl@2x.png",content:"\u7FA4\u7EC4\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zycjgl@2x.png",content:"\u573A\u666F\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyrcgl@2x.png",content:"\u65E5\u7A0B\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyldgl@2x.png",content:"\u8054\u52A8\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyzdysj@2x.png",content:"\u81EA\u5B9A\u4E49\u4E8B\u4EF6",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zycjmb@2x.png",content:"\u573A\u666F\u6A21\u677F",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyanpz@2x.png",content:"\u6309\u94AE\u914D\u7F6E",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyybppz@2x.png",content:"\u4EEA\u8868\u76D8\u914D\u7F6E",desc:""}],url:"",content:"\u7CFB\u7EDF\u5E94\u7528\u914D\u7F6E"},{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyczrz@2x.png",content:"\u64CD\u4F5C\u65E5\u5FD7",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zybjjl@2x.png",content:"\u62A5\u8B66\u8BB0\u5F55",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyycjl@2x.png",content:"\u5F02\u5E38\u8BB0\u5F55",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zydxtz@2x.png",content:"\u77ED\u4FE1\u901A\u77E5",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyyjtz@2x.png",content:"\u90AE\u4EF6\u901A\u77E5",desc:""}],url:"",content:"\u65E5\u5FD7\u7BA1\u7406"},{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zysjdp@2x.png",content:"\u6570\u636E\u5927\u76D8",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zynhtj@2x.png",content:"\u80FD\u8017\u7EDF\u8BA1\u56FE",desc:""}],url:"",content:"\u6570\u636E\u4E2D\u5FC3"},{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zywxgdgl@2x.png",content:"\u7EF4\u4FEE\u5DE5\u5355\u7BA1\u7406",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbtwth@2x.png",content:"\u8BBE\u5907\u540C\u4F4D\u66FF\u6362",desc:""}],url:"",content:"\u8FD0\u7EF4\u7BA1\u7406"},{subContent:[{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zykjrlt@2x.png",content:"\u7A7A\u95F4\u70ED\u529B\u56FE",desc:""},{url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zykzewmfx@2x.png",content:"\u63A7\u5236\u4E8C\u7EF4\u7801\u5206\u4EAB",desc:""}],url:"",content:"\u4E13\u4E1A\u7167\u660E\u63A7\u5236"}],desc:"\u9002\u7528\u4E8E\u4E13\u4E1A\u7EA7\u5546\u7167\u9879\u76EE\uFF0C\u63D0\u4F9B\u9AD8\u7EA7\u7167\u660E\u63A7\u5236\u65B9\u6848"},ismerchant:!0,addValueList:[{projectList:["\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","\u80FD\u8017\u56DE\u5F52","1.9.2\u4F18\u5316\u754C\u9762\u6D4B\u8BD5","\u7167\u5EA6\u6D4B\u8BD5\u9879\u76EE","\u5546\u7167\u80FD\u6E90\u4E09\u671F1.9.0"],name:"\u4EBA\u5458\u7A7A\u95F4\u5206\u5E03",appCode:"alueAddedApp_space_heatmap",pic:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyrenyuanrelifenbu@2x.png",id:22,desc:"\u4EBA\u5458\u70ED\u529B\u5206\u5E03\u56FE\u662F\u4E00\u6B3E\u57FA\u4E8E\u4EBA\u5458\u5B58\u5728\u4F20\u611F\u5668\u6570\u636E\u8FDB\u884C\u7A7A\u95F4\u5360\u7A7A\u5206\u6790\u7684\u5E94\u7528\uFF0C\u53EF\u4EE5\u4F53\u73B0\u7A7A\u95F4\u5404\u533A\u57DF\u7684\u5B9E\u65F6\u3001\u5386\u53F2\u4EBA\u5458\u5206\u5E03\u72B6\u51B5\uFF0C\u4E3A\u7528\u6237\u51B3\u7B56\u5404\u7A7A\u95F4\u81EA\u52A8\u5316\u63A7\u5236\u90E8\u7F72\u63D0\u4F9B\u6709\u6548\u7684\u6570\u636E\u652F\u6491\u3002"},{projectList:["\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","\u7075\u95E8\u6D4B\u8BD5\u9879\u76EE2023.01.05"],name:"AI \u611F\u5E94\u706F\u63A7",appCode:"valueAddedApp_space_ai",pic:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyganyingzishiying@2x.png",id:26,desc:"AI \u81EA\u9002\u5E94\u611F\u5E94\u662F\u4E00\u6B3E\u57FA\u4E8E\u4E91\u7AEF AI \u7B97\u6CD5\uFF0C\u81EA\u52A8\u8C03\u6574\u4F20\u611F\u5668\u63A7\u5236\u706F\u5149\u4FDD\u6301\u65F6\u957F\u7684\u5E94\u7528\u3002\u901A\u8FC7\u5BF9\u4F20\u611F\u5668\u6240\u5B89\u88C5\u73AF\u5883\u7684\u611F\u5E94\u5386\u53F2\u6570\u636E\u8BA1\u7B97\uFF0C\u4EE5\u4E00\u5B9A\u7684\u5468\u671F\u9891\u7387\uFF0C\u81EA\u52A8\u8C03\u6574\u4F20\u611F\u5668\u7684\u5EF6\u8FDF\u5173\u706F\u65F6\u95F4\uFF0C\u4F7F\u4F20\u611F\u5668\u63A7\u5236\u66F4\u8D34\u8FD1\u73B0\u573A\u4F7F\u7528\u573A\u666F\uFF0C\u63D0\u9AD8\u7528\u6237\u4F53\u9A8C\u3002"},{projectList:["\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5"],name:"\u8BBE\u5907\u7EF4\u4FEE",appCode:"valueAddedApp_opsdev_repair.detail",pic:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyshebeiweixiu@2x.png",id:30,desc:"\u8BBE\u5907\u7EF4\u4FEE\u662F\u4E00\u6B3E\u534F\u52A9\u9879\u76EE\u8FDB\u884C\u8BBE\u5907\u8FD0\u7EF4\u7BA1\u7406\u7684\u5E94\u7528\u3002\u652F\u6301\u9879\u76EE\u6210\u5458\u5728APP \u7AEF\u4E0E SaaS \u7AEF\u4E00\u952E\u8FDB\u884C\u8BBE\u5907\u6545\u969C\u62A5\u4FEE\uFF0C\u7BA1\u7406\u5458\u5728SaaS\u7AEF\u8FDB\u884C\u7EF4\u4FEE\u4EFB\u52A1\u5206\u6D3E\u4E0E\u8FDB\u5EA6\u7BA1\u7406"},{projectList:["\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","\u7167\u5EA6\u6D4B\u8BD5\u9879\u76EE","\u5546\u7167\u80FD\u6E90\u4E09\u671F1.9.0","\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","\u8001\u6570\u636E\u56DE\u5F52"],name:"\u8BBE\u5907\u66FF\u6362",appCode:"valueAddedApp_opsdev_replace",pic:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyshebeitongwei@2x.png",id:34,desc:"\u8BBE\u5907\u66FF\u6362\u7528\u4E8E\u7B80\u5316\u6545\u969C\u8BBE\u5907\u8FDB\u884C\u7EF4\u4FEE\u65BD\u5DE5\u7684\u6D41\u7A0B\u3002\u652F\u6301\u4E00\u952E\u5C06\u539F\u8BBE\u5907\u7684\u914D\u7F6E\u4FE1\u606F\uFF0C\u540C\u6B65\u5230\u66FF\u6362\u540E\u7684\u65B0\u8BBE\u5907"},{projectList:["\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","1.9.2","\u5546\u7167\u80FD\u6E90\u4E09\u671F1.9.0","\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","\u8001\u6570\u636E\u56DE\u5F52","\u65B0\u5EFA\u9879\u76EE\u6D4B\u8BD5\u544A\u8B66","\u6C89\u999912.16\u65B0\u5EFA\u9879\u76EE","2.5.0\u6237\u5916\u9879\u76EE\u672C\u5730\u5B9A\u65F6","\u98CE\u606F\u6D4B\u8BD5\u5BA4\u5185\u9879\u76EE","zoe\u9A8C\u8BC1","\u865A\u62DF\u8BBE\u5907\u9879\u76EE"],name:"\u7A7A\u95F4\u5206\u4EAB",appCode:"valueAddedApp_space_qrCode",pic:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyerweima@2x.png",id:38,desc:"\u8BBE\u5907\u4E8C\u7EF4\u7801\u5206\u4EAB\u662F\u4E00\u6B3E\u53EF\u4EE5\u8FDB\u884C\u8BBE\u5907\u4E34\u65F6\u5206\u4EAB\u7684\u5E94\u7528\u3002\u9002\u7528\u4E8E\u5171\u4EAB\u5F00\u653E\u7A7A\u95F4\u4E2D\uFF0C\u7528\u6237\u901A\u8FC7\u624B\u673A\u626B\u7801\u7684\u65B9\u5F0F\uFF0C\u8FDB\u884C\u4E34\u65F6\u7684\u8BBE\u5907\u63A7\u5236\u3002"},{projectList:["\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","1.9.2","1.9.2\u4F18\u5316\u754C\u9762\u6D4B\u8BD5","1.9.4\u4EBA\u56E0\u7167\u660E\u4F18\u5316\u6D4B\u8BD5","\u7167\u5EA6\u6D4B\u8BD5\u9879\u76EE","\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","\u6C89\u9999\u80FD\u8017\u901A\u7528\u6D4B\u8BD5","\u6280\u672F1.1.0\u6D4B\u8BD5"],name:"\u884C\u4E1A\u6A21\u677F",appCode:"industry_space_template",pic:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zyhymb@2x.png",id:62,desc:"\u884C\u4E1A\u533A\u57DF\u6A21\u677F\u662F\u4E00\u6B3E\u4EE5\u6EE1\u8DB3\u9879\u76EE\u5FEB\u901F\u843D\u5730\u4E3A\u76EE\u6807\u7684\u5E94\u7528\uFF0C\u901A\u8FC7\u6807\u51C6\u7684\u914D\u7F6E\u6D41\u7A0B\uFF0C\u7ED3\u5408\u884C\u4E1A\u4F7F\u7528\u573A\u666F\u5B8C\u6210\u9884\u8BBE\u6A21\u7248\u7684\u8C03\u7528\uFF0C\u5FEB\u901F\u5B8C\u6210\u6838\u5FC3\u4F7F\u7528\u529F\u80FD\u7684\u8C03\u8BD5\u3001\u914D\u7F6E\u5DE5\u4F5C"},{projectList:["\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","\u80FD\u8017\u56DE\u5F52","\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","\u7167\u5EA6\u6D4B\u8BD5\u9879\u76EE","1.9.2","\u5546\u7167\u80FD\u6E90\u4E09\u671F1.9.0","\u8001\u6570\u636E\u56DE\u5F52","\u7075\u95E8\u6D4B\u8BD5\u9879\u76EE2023.01.05","\u6280\u672F1.1.0\u6D4B\u8BD5","\u7075\u95E8\u80FD\u8017\u9879\u76EE3\u670827\u65E5","123"],name:"\u8282\u5F8B\u7167\u660E",appCode:"rhythm",pic:"https://images.tuyacn.com/app/illumination/rhythm.png",id:74,desc:"\u8282\u5F8B\u7167\u660E\u662F\u4E00\u6B3E\u4EE5\u4F7F\u7528\u7A7A\u95F4\u4E3A\u5BF9\u8C61\u3001\u4EE5\u65F6\u95F4\u5468\u671F\u4E3A\u7EF4\u5EA6\uFF0C\u56F4\u7ED5\u8C03\u5149\u8C03\u8272\u706F\u5177\u5C55\u5F00\u7EFC\u5408\u8C03\u8282\uFF0C\u4E3A\u7A7A\u95F4\u8425\u9020\u51FA\u81EA\u52A8\u5316\u3001\u6C89\u6D78\u5F0F\u7684\u8212\u9002\u73AF\u5883\u4F53\u9A8C\u3002"},{projectList:["\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","\u6237\u5916\u9879\u76EE1.12.3","\u6280\u672F1.1.0\u6D4B\u8BD5","\u7075\u95E8\u6D4B\u8BD5\u9879\u76EE2023.01.05","\u6C89\u999912.16\u65B0\u5EFA\u9879\u76EE","\u6C89\u9999\u56DE\u5F52\u6D4B\u8BD5\u80FD\u8017","\u6C89\u9999-\u865A\u62DF\u80FD\u8017\u9879\u76EE","\u6CA1\u5F00\u767D\u540D\u5355\u65B0\u5EFA\u6237\u5916\u9879\u76EE","\u6CA1\u5F00\u767D\u540D\u5355\u7684\u65B0\u5EFA\u5BA4\u5185\u9879\u76EE","\u98CE\u606F\u6D4B\u8BD5\u5BA4\u5916\u9879\u76EE","123","\u98CE\u606F\u6D4B\u8BD5\u5BA4\u5185\u9879\u76EE","\u6C89\u9999\u5317\u7F8E\u8BA4\u8BC1\u865A\u62DF\u80FD\u8017\u9879\u76EE","\u5317\u7F8E-\u865A\u62DF\u80FD\u8017\u9879\u76EE"],name:"\u8BBE\u5907\u65E5\u5FD7",appCode:"system_device_log",pic:"https://images.tuyacn.com/app/illumination/rhythm.png",id:78,desc:"\u8BBE\u5907\u65E5\u5FD7\u7528\u4E8E\u8BB0\u5F55\u548C\u67E5\u770B\u9879\u76EE\u5185\u8BBE\u5907\u53D1\u751F\u7684\u72B6\u6001\u53D8\u5316\u3002\u652F\u6301\u57FA\u4E8E\u8BBE\u5907\u7EF4\u5EA6\u7684\u65E5\u5FD7\u4FE1\u606F\u67E5\u8BE2\uFF0C\u4E3A\u7528\u6237\u638C\u63E1\u8BBE\u5907\u72B6\u6001\uFF0C\u5FEB\u901F\u5B9A\u4F4D\u95EE\u9898\u63D0\u4F9B\u6570\u636E\u652F\u6491\u3002"},{projectList:["\u7167\u5EA6\u6D4B\u8BD5\u9879\u76EE","\u5BA4\u5185\u9879\u76EE-1.5.1\u524D\u7AEF\u878D\u5408213123123","\u6C89\u9999\u5BA4\u5185\u9879\u76EE\u6D4B\u8BD5","1.9.2","1.9.4\u4EBA\u56E0\u7167\u660E\u4F18\u5316\u6D4B\u8BD5","\u5546\u7167\u80FD\u6E90\u4E09\u671F1.9.0","\u7075\u95E8\u6D4B\u8BD5\u9879\u76EE2023.01.05"],name:"KUMUX-\u4EBA\u56E0\u7167\u660E\u63A7\u5236\u7B56\u7565",appCode:"valueAddedApp_space_hcl",pic:"https://images.tuyacn.com/smart/SAAS/light/hcl.png",id:94,desc:"\u901A\u8FC7\u5546\u7167SaaS\u4E0EKumux\u7B97\u6CD5\u6A21\u578B\u7684\u6DF1\u5165\u878D\u5408\uFF0C\u56F4\u7ED5\u7A7A\u95F4\u7528\u9014\u3001\u9879\u76EE\u7ECF\u7EAC\u5EA6\u7B49\u56E0\u7D20\uFF0C\u65F6\u523B\u4E3A\u7528\u6237\u63D0\u4F9B\u826F\u597D\u7684\u4EBA\u56E0\u7167\u660E\u7B56\u7565\u8FD0\u884C\u7684\u4F53\u9A8C"},{projectList:["\u4F1A\u8BAE\u9884\u7EA6V1.14.0\u6D4B\u8BD5\u5546\u7167"],name:"\u4F1A\u8BAE\u9884\u7EA6",appCode:"smart_meeting",pic:"https://images.tuyacn.com/app/illumination/meeting.png",id:110,desc:"\u901A\u8FC7\u5BF9\u529E\u516C\u4F1A\u8BAE\u5BA4\u7684\u6574\u4F53\u667A\u80FD\u5316\u7BA1\u7406\uFF0C\u52A9\u529B\u7BA1\u7406\u4EBA\u5458\u66F4\u597D\u7684\u7EF4\u62A4\u3001\u8FD0\u8425\u6709\u9650\u516C\u5171\u8D44\u6E90\u7684\u540C\u65F6\u4E5F\u5E26\u7ED9\u4F7F\u7528\u8005\u66F4\u597D\u7684\u7528\u6237\u4F53\u9A8C"},{projectList:["\u6C89\u999912.16\u65B0\u5EFA\u9879\u76EE","\u6C89\u9999-\u865A\u62DF\u80FD\u8017\u9879\u76EE","\u6C89\u9999\u56DE\u5F52\u6D4B\u8BD5\u80FD\u8017"],name:"\u865A\u62DF\u80FD\u8017",appCode:"virtual_energy",pic:"https://images.tuyacn.com/content-platform/hestia/1672110920bb6c267a58f.png",id:134,desc:"\u8BE5\u5E94\u7528\u53EF\u9488\u5BF9\u4E0D\u5177\u5907\u7535\u91CF\u7EDF\u8BA1\u6761\u4EF6\u7684\u8BBE\u5907\u8FDB\u884C\u989D\u5B9A\u529F\u7387\u8BBE\u7F6E\uFF0C\u7CFB\u7EDF\u5C06\u81EA\u52A8\u6839\u636E\u8BBE\u5907\u7684\u8FD0\u884C\u65F6\u957F\uFF0C\u8FD0\u884C\u9891\u7387\u8FDB\u884C\u7535\u91CF\u7EDF\u8BA1\u3002"}],merchantName:"\u6C89\u9999\u6D4B\u8BD51241212oo88",deviceMaxNum:1e3,deviceNum:219,showCombo:0,oem:!1,projectNum:40,expireSec:1950105599363},"tuya.m.cl.combo.register":{comboList:[{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=ordinary",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!0,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u57FA\u7840\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u514D\u8D39\u8BD5\u752815\u5929",version:"ordinary",url:"https://images.tuyacn.com/app/illumination/combo/ordinary/icon_jc_logox@2x.png",desc:"\u9002\u7528\u4E8E\u63A7\u5236\u9700\u8981\u7B80\u5355\u7684\u4E2D\u5C0F\u578B\u5546\u7167\u9879\u76EE"},{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=advanced",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!1,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u9AD8\u7EA7\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u54A8\u8BE2\u8054\u7CFB",version:"advanced",url:"https://images.tuyacn.com/app/illumination/combo/advanced/icon_gj_logox@2x.png",desc:"\u9002\u7528\u4E8E\u63A7\u5236\u9700\u6C42\u3001\u8BBE\u5907\u63A5\u5165\u91CF\u8F83\u591A\u7684\u4E2D\u5927\u578B\u5546\u7167\u9879\u76EE"},{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=profession",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!1,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u4E13\u4E1A\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u54A8\u8BE2\u8054\u7CFB",version:"profession",url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png",desc:"\u9002\u7528\u4E8E\u4E13\u4E1A\u7EA7\u5546\u7167\u9879\u76EE\uFF0C\u63D0\u4F9B\u9AD8\u7EA7\u7167\u660E\u63A7\u5236\u65B9\u6848"},{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=profession",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!1,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u4E13\u4E1A\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u54A8\u8BE2\u8054\u7CFB",version:"industry",url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png",desc:"\u9002\u7528\u4E8E\u4E13\u4E1A\u7EA7\u5546\u7167\u9879\u76EE\uFF0C\u63D0\u4F9B\u9AD8\u7EA7\u7167\u660E\u63A7\u5236\u65B9\u6848"}],companyName:"\u6C89\u9999\u6D4B\u8BD51241212oo88",version:"profession",account:"illcx@yopmail.net"},"tuya.m.cl.register.success":{comboList:[{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=ordinary",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!0,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u57FA\u7840\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u514D\u8D39\u8BD5\u752815\u5929",version:"ordinary",url:"https://images.tuyacn.com/app/illumination/combo/ordinary/icon_jc_logox@2x.png",desc:"\u9002\u7528\u4E8E\u63A7\u5236\u9700\u8981\u7B80\u5355\u7684\u4E2D\u5C0F\u578B\u5546\u7167\u9879\u76EE"},{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=advanced",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!1,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u9AD8\u7EA7\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u54A8\u8BE2\u8054\u7CFB",version:"advanced",url:"https://images.tuyacn.com/app/illumination/combo/advanced/icon_gj_logox@2x.png",desc:"\u9002\u7528\u4E8E\u63A7\u5236\u9700\u6C42\u3001\u8BBE\u5907\u63A5\u5165\u91CF\u8F83\u591A\u7684\u4E2D\u5927\u578B\u5546\u7167\u9879\u76EE"},{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=profession",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!1,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u4E13\u4E1A\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u54A8\u8BE2\u8054\u7CFB",version:"profession",url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png",desc:"\u9002\u7528\u4E8E\u4E13\u4E1A\u7EA7\u5546\u7167\u9879\u76EE\uFF0C\u63D0\u4F9B\u9AD8\u7EA7\u7167\u660E\u63A7\u5236\u65B9\u6848"},{h5Url:"https://lighting-h5.console.tuya.com/combo/chose?version=profession",duration:"\u54A8\u8BE2\u62A5\u4EF7",trail:!1,price:"\u54A8\u8BE2\u62A5\u4EF7",priceType:!1,name:"\u4E13\u4E1A\u7248",contactPerson:{phone:"4100-881-8611",name:"\u59DA\u7ECF\u7406",email:"lighting@tuya.com"},buttonWord:"\u54A8\u8BE2\u8054\u7CFB",version:"industry",url:"https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png",desc:"\u9002\u7528\u4E8E\u4E13\u4E1A\u7EA7\u5546\u7167\u9879\u76EE\uFF0C\u63D0\u4F9B\u9AD8\u7EA7\u7167\u660E\u63A7\u5236\u65B9\u6848"}],companyName:"\u6C89\u9999\u6D4B\u8BD51241212oo88",showType:1}}},"./src/components/BaseModal/index.module.scss":function(P,f,i){P.exports={baseModal:"index-module__baseModal___DQKBE",withoutContent:"index-module__withoutContent___FZH4R",wrapper:"index-module__wrapper___oOZCT",h5Wrapper:"index-module__h5Wrapper___YZ1US"}},"./src/components/BaseModal/index.tsx":function(P,f,i){"use strict";var g=i("./src/utils/i18n.ts"),v=i("./node_modules/@tarojs/components/mini/index.js"),y=i("./node_modules/react/cjs/react.production.min.js"),u=i.n(y),U=i("./node_modules/taro-ui/lib/components/modal/index.js"),B=i("./node_modules/taro-ui/lib/components/modal/header/index.js"),b=i("./node_modules/taro-ui/lib/components/modal/content/index.js"),p=i("./node_modules/taro-ui/lib/components/modal/action/index.js"),M=i("./src/components/BaseModal/index.module.scss"),j=i.n(M),R=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),T=i.n(R),w=Object(g.a)(),Z=function(ce){var $=ce.isOpened,ee=ce.title,G=ce.content,z=ce.customContent,ue=z===void 0?void 0:z,de=ce.onConfirm,J=ce.showCancel,re=J===void 0?!1:J,be=ce.onCancel,Te=ce.confirmText,De=Te===void 0?w("ok"):Te,Ee=ce.cancelText,he=Ee===void 0?w("cancel"):Ee,Me=ce.className,Ae=function(Ge){Ge.stopPropagation(),be==null||be()};return Object(R.jsxs)(v.i,{className:"".concat(j.a.wrapper," ").concat(Me),children:[!ue&&Object(R.jsx)(U.a,{className:"".concat(j.a.baseModal," ").concat(j.a.baseModalIndex," ").concat(G?"":j.a.withoutContent),isOpened:$,title:ee,confirmText:De,cancelText:re?he||w("cancel"):void 0,content:G,onConfirm:de,onCancel:Ae,closeOnClickOverlay:!1}),ue&&Object(R.jsxs)(U.a,{isOpened:$,className:"".concat(j.a.baseModal," ").concat(j.a.baseModalIndex," ").concat(Me),onConfirm:de,onCancel:Ae,closeOnClickOverlay:!1,children:[Object(R.jsx)(B.a,{children:ee}),Object(R.jsx)(b.a,{children:ue}),Object(R.jsx)(p.a,{children:Object(R.jsxs)(v.i,{className:"at-modal-footer",children:[re&&Object(R.jsx)(v.i,{className:"at-modal-footer-cancel",onClick:Ae,children:he}),Object(R.jsx)(v.i,{className:"at-modal-footer-confirm",onClick:de,children:De})]})})]})]})};f.a=Z},"./src/components/BaseOperateFooter/index.module.scss":function(P,f,i){P.exports={baseOperateFooter:"index-module__baseOperateFooter___MzwXs",secondaryBtn:"index-module__secondaryBtn___Pmir2",isIOSBaseOperateFooter:"index-module__isIOSBaseOperateFooter___VzStl",isAndroidBaseOperateFooter:"index-module__isAndroidBaseOperateFooter___PGaVC"}},"./src/components/BaseOperateFooter/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/react/cjs/react.production.min.js"),v=i.n(g),y=i("./node_modules/@tarojs/components/mini/index.js"),u=i("./node_modules/taro-ui/lib/components/button/index.js"),U=i("./src/components/BaseOperateFooter/index.module.scss"),B=i.n(U),b=i("./src/utils/getSystemInfoSync.ts"),p=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),M=i.n(p),j=function(T){var w=T.className,Z=T.primaryButtonText,Q=T.secondaryButtonText,ce=T.onPrimaryButtonClick,$=T.onSecondaryButtonClick,ee=T.primaryButtonLoading,G=ee===void 0?!1:ee,z=T.primaryButtonDisabled,ue=z===void 0?!1:z,de=T.secondaryButtonLoading,J=de===void 0?!1:de,re=T.secondaryButtonDisabled,be=re===void 0?!1:re;return Object(p.jsxs)(y.i,{className:"".concat(B.a.baseOperateFooter," ").concat(b.a?B.a.isAndroidBaseOperateFooter:B.a.isIOSBaseOperateFooter," ").concat(w),children:[Q&&Object(p.jsx)(u.a,{className:B.a.secondaryBtn,type:"secondary",onClick:$,loading:J,disabled:be,circle:!0,children:Q}),Object(p.jsx)(u.a,{type:"primary",circle:!0,onClick:ce,className:Q?"":B.a.large,loading:G,disabled:ue,children:Z})]})};f.a=j},"./src/components/BasePage/index.module.scss":function(P,f,i){P.exports={basePage:"index-module__basePage___JJNQP",footer:"index-module__footer___6wRoo"}},"./src/components/BasePage/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),v=i("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),y=i("./node_modules/react/cjs/react.production.min.js"),u=i.n(y),U=i("./node_modules/@tarojs/components/mini/index.js"),B=i("./src/components/BasePage/index.module.scss"),b=i.n(B),p=i("./src/components/BaseOperateFooter/index.tsx"),M=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),j=i.n(M),R=["className","primaryButtonText","onPrimaryButtonClick"],T=function(Z){var Q=Z.children,ce=Z.className,$=Z.style,ee=Z.footerConfig,G=ee||{},z=G.className,ue=G.primaryButtonText,de=ue===void 0?"":ue,J=G.onPrimaryButtonClick,re=J===void 0?function(){}:J,be=Object(v.a)(G,R);return Object(M.jsxs)(U.i,{className:"".concat(b.a.basePage," ").concat(ce),style:$,children:[Q,ee&&Object(M.jsx)(p.a,Object(g.a)({className:"".concat(b.a.footer," ").concat(z),primaryButtonText:de,onPrimaryButtonClick:re},be))]})};f.a=T},"./src/components/container/index.module.scss":function(P,f,i){P.exports={container:"index-module__container___nkg-l"}},"./src/components/container/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),v=i("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),y=i("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),u=i("./node_modules/react/cjs/react.production.min.js"),U=i.n(u),B=i("./node_modules/classnames/index.js"),b=i.n(B),p=i("./src/components/container/index.module.scss"),M=i.n(p),j=i("./node_modules/@tarojs/components/mini/index.js"),R=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),T=i.n(R),w=["disableGutters","children","className"],Z=function(ce){var $=ce.disableGutters,ee=$===void 0?!1:$,G=ce.children,z=ce.className,ue=Object(y.a)(ce,w),de=b()(Object(v.a)({},M.a.container,!ee),z);return Object(R.jsx)(j.i,Object(g.a)(Object(g.a)({className:de},ue),{},{children:G}))};f.a=Z},"./src/config/globalData/index.ts":function(P,f,i){"use strict";i.d(f,"a",function(){return y}),i.d(f,"c",function(){return U}),i.d(f,"b",function(){return B});var g=i("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),v,y=function(p){return p.IS_ONLINE="IS_ONLINE",p.ADD_VALUE="ADD_VALUE",p}({}),u=(v={},Object(g.a)(v,y.IS_ONLINE,!0),Object(g.a)(v,y.ADD_VALUE,{}),v);function U(p,M){if(!p){console.error("key\u503C\u4E0D\u80FD\u4E3A\u7A7A");return}u[p]=M}function B(p){return u[p]}var b=function(){u&&(u={})}},"./src/locales/de/common.json":function(P){P.exports=JSON.parse('{"account":"Kontoberechtigungen","accountCombo":"Kontopaket","addValue":"Mehrwertanwendung","all":"Alle","allCombo":"Alle Pakete","audit":"\xDCberpr\xFCfung der Unternehmensinformationen, bitte warten Sie geduldig","audit.fail":"Pr\xFCfung fehlgeschlagen","audit.fail.reSubmit":"Antrag erneut einreichen","auto":"Automatisch","btnConsult":"Offline-Beratung","btnUpdata":"Jetzt ersetzen","buttonFree":"Kostenlose Nutzung f\xFCr 15 Tage","cancel":"stornieren","changeCombo":"Paket \xE4ndern","chooseAccuntPlan":"Bitte w\xE4hlen Sie das Testpaket aus","choosePlan":"W\xE4hlen Sie ein Paket aus","choosePlanTips":"Um die Vollversion zu kaufen, kontaktieren Sie bitte den Business Manager f\xFCr eine Beratung.","chooseProject":"Projekt ausw\xE4hlen","chooseProjectTips":"Bitte w\xE4hlen Sie ein Projekt aus.","choseTitle":"Bitte w\xE4hlen Sie ein Paket","collectionProjet":"Projekt zugewiesen","comboChoseTitle":"Bitte w\xE4hlen Sie ein Paket","contactInformation":"Kontaktdaten","contacts":"Ansprechpartner","deviceNum":"Anzahl der Ger\xE4te","downText":"M\xF6chten Sie das Paket wirklich downgraden?","email":"E-Mail","exitSuccess":"Erfolgreich ausgeloggt","expire":"Reife","expireDesc":"Wenn das Konto nach Ablauf nicht erneuert wird, kann sich das Konto nicht anmelden. Die Projektdaten bleiben w\xE4hrend des Zeitraums erhalten und k\xF6nnen nach der Verl\xE4ngerung verwendet werden","loading":"Ladevorgang","loginOut":"Abmelden","loginSuccessful":"Registrierung erfolgreich","more":"Mehr erfahren","newAdd":"Zuweisung hinzuf\xFCgen","noProject":"Es wurden noch keine Projekte zugewiesen.","ok":"bestimmen","optionError":"Operation fehlgeschlagen","optionSuccess":"Erfolgreicher Betrieb","projectDetail":"Paketdetails","projectNum":"Anzahl der Teile","remain.quota":"Verbleibendes Kontingent","remain.project.quota":"Verbleibendes Projektguthaben","remain.device.quota":"Verbleibendes Punkteguthaben","remaining":"Verbleibend","search":"suchen nach","searchPlaceholder":"Bitte geben Sie den Projektnamen ein.","seeAll":"Alle Pakete anzeigen","state1":"Erstellen","state2":"Warten auf Zuweisung","state3":"Zuweisen","submit":"einreichen","submitLoading":"Wird \xFCbermittelt","sureLogout":"Abmeldung best\xE4tigen?","test":"Pr\xFCfung","totalDeviceCount":"Gesamtanzahl Ger\xE4te","totalProjectCount":"Gesamtanzahl Projekte","updateError":"Austausch fehlgeschlagen","updateSuccess":"Erfolgreich ersetzt","updateText":"M\xF6chten Sie wirklich ein Upgrade durchf\xFChren?","useAddValue":"Projekte, die diese Mehrwertanwendung verwenden","useTime1":"ausprobieren","useTime2":"{{day}}Tage, bitte kontaktieren Sie den Business Manager, um die Geb\xFChr nach Ablauf zu verl\xE4ngern","using":"In der Gerichtsverhandlung","warningTip":"Freundliche Erinnerung"}')},"./src/locales/de/index.ts":function(P,f,i){"use strict";var g=i("./src/locales/de/common.json"),v=i.t("./src/locales/de/common.json",1);f.a={common:g}},"./src/locales/en/common.json":function(P){P.exports=JSON.parse('{"account":"Account Permission","accountCombo":"Plan","addValue":"Value-Added Services","all":"All","allCombo":"All Packages","audit":"The enterprise information is under review. Please wait","audit.fail":"Review Failed","audit.fail.reSubmit":"Resubmit Application","auto":"Automatic","btnConsult":"Offline Consultation","btnUpdata":"Change","buttonFree":"15-Day Free Trial","cancel":"Cancel","changeCombo":"Change Plan","chooseAccuntPlan":"Please Select Trial Package","chooseCount":"Select a plan","choosePlan":"Choose a Package","choosePlanTips":"To purchase the full version, please contact the business manager for consultation.","chooseProject":"Select a Project","chooseProjectTips":"Please choose a project.","choseTitle":"Select a plan","collectionProjet":"Project Allocated","comboChoseTitle":"Select a plan","contactInformation":"Contact Information","contacts":"Contact Person","deviceNum":"Devices","downText":"Are you sure you want to downgrade your plan?","email":"Email","enterpriseName":"Enterprise name","exitSuccess":"Logout Successful","expire":"Expires on","expireDesc":"If you fail to renew the plan after it expires, you cannot log in with your account. However, the project data is retained. You can continue using the project data after renewal.","loading":"Loading","loginOut":"Log Out","loginSuccessful":"Registration Successful","more":"Learn More","newAdd":"Add Allocation","noProject":"No projects have been assigned yet.Es wurden noch keine Projekte zugewiesen.","ok":"OK","optionError":"Operation failed","optionSuccess":"Operation succeeded","projectDetail":"Plan Details","projectNum":"Projects","remain.quota":"Remaining Quota","remain.project.quota":"Remaining project quota","remain.device.quota":"Remaining point quota","remaining":"expires after","search":"Search","searchPlaceholder":"Please enter the project name.","seeAll":"View All Packages","state1":"Creating","state2":"Awaiting allocation","state3":"Allocating","submit":"Submit","submitLoading":"Submitting","sureLogout":"Confirm Logout?","test":"Test","totalDeviceCount":"Total Devices","totalProjectCount":"Total Projects","updateError":"Change failed","updateSuccess":"Changed","updateText":"Are you sure you want to upgrade your plan?","useAddValue":"Projects Using Value-Added Service","useTime1":"The free trial","useTime2":"Expire in {{day}}days. after expiration, please contact your Tuya business manager for renewal","using":"In Trial","warningTip":"Friendly Reminder"}')},"./src/locales/en/index.ts":function(P,f,i){"use strict";var g=i("./src/locales/en/common.json"),v=i.t("./src/locales/en/common.json",1);f.a={common:g}},"./src/locales/es/common.json":function(P){P.exports=JSON.parse('{"account":"Permiso de cuenta","accountCombo":"Plan","addValue":"Servicios de valor agregado","all":"Todos","allCombo":"Todos los paquetes","audit":"La informaci\xF3n de la empresa est\xE1 en revisi\xF3n. Por favor, espere","audit.fail":"Revisi\xF3n no aprobada","audit.fail.reSubmit":"Reenviar Solicitud","auto":"Autom\xE1tico","btnConsult":"Consulta fuera de l\xEDnea","btnUpdata":"Cambiar","buttonFree":"Prueba gratis de 15 d\xEDas","cancel":"Cancelar","changeCombo":"Cambiar el plan","chooseAccuntPlan":"Por favor, seleccione el paquete de prueba","choosePlan":"Elija un Paquete","choosePlanTips":"Para comprar la versi\xF3n completa, por favor contacte al gerente de negocios para consulta.","chooseProject":"Seleccione un Proyecto","chooseProjectTips":"Por favor elija un proyecto.","choseTitle":"Seleccionar plan","collectionProjet":"Proyecto Asignado","comboChoseTitle":"Seleccionar plan","contactInformation":"Informaci\xF3n de contacto","contacts":"Persona de contacto","deviceNum":"Dispositivos","downText":"\xBFEst\xE1 seguro que desea cambiar el plan a una versi\xF3n anterior?","email":"Correo electr\xF3nico","exitSuccess":"Cierre de Sesi\xF3n Exitoso","expire":"Expira el","expireDesc":"Si no renueva el plan despu\xE9s de que expira, no puede iniciar sesi\xF3n con su cuenta. Sin embargo, los datos del proyecto se conservan. Puede seguir usando los datos del proyecto despu\xE9s de la renovaci\xF3n.","loading":"Cargando","loginOut":"Cerrar sesi\xF3n","loginSuccessful":"Registro exitoso","more":"Obtener m\xE1s informaci\xF3n","newAdd":"Agregar Asignaci\xF3n","noProject":"A\xFAn no se han asignado proyectos.","ok":"OK","optionError":"La operaci\xF3n fall\xF3","optionSuccess":"La operaci\xF3n fue exitosa","projectDetail":"Detalles del plan","projectNum":"Proyectos","remain.quota":"Cuota restante","remain.project.quota":"Cuota de proyecto restante","remain.device.quota":"Cuota de puntos restante","remaining":"expira despu\xE9s de","search":"Buscar","searchPlaceholder":"Por favor ingrese el nombre del proyecto.","seeAll":"Ver todos los paquetes","state1":"Creando","state2":"En espera de asignaci\xF3n","state3":"Asignando","submit":"Enviar","submitLoading":"Enviando","sureLogout":"\xBFConfirmar Cierre de Sesi\xF3n?","test":"Prueba","totalDeviceCount":"Total de dispositivos","totalProjectCount":"Total de proyectos","updateError":"El cambio fall\xF3","updateSuccess":"Cambiado","updateText":"\xBFEst\xE1 seguro que desea actualizar el plan?","useAddValue":"Proyectos que utilizan el servicio de valor agregado","useTime1":"La prueba gratis","useTime2":"{{day}}d\xEDa(s). Contacte a su gerente comercial de Tuya para renovar el plan a tiempo despu\xE9s de que expira la prueba gratis.","using":"En prueba","warningTip":"Recordatorio Amigable"}')},"./src/locales/es/index.ts":function(P,f,i){"use strict";var g=i("./src/locales/es/common.json"),v=i.t("./src/locales/es/common.json",1);f.a={common:g}},"./src/locales/fr/common.json":function(P){P.exports=JSON.parse(`{"account":"Autorisations de compte","accountCombo":"Paquet de compte","addValue":"Application \xE0 valeur ajout\xE9e","all":"Tout","allCombo":"Tous les forfaits","audit":"Examen des informations sur l'entreprise, veuillez patienter","audit.fail":"R\xE9vision non approuv\xE9e","audit.fail.reSubmit":"Soumettre \xE0 nouveau la demande","auto":"Automatique","btnConsult":"Conseil hors ligne","btnUpdata":"Remplacez maintenant","buttonFree":"Utilisation gratuite pendant 15 jours","cancel":"Annuler","changeCombo":"Changer de package","chooseAccuntPlan":"Veuillez s\xE9lectionner le forfait d'essai","choosePlan":"Choisissez un forfait","choosePlanTips":"Pour acheter la version compl\xE8te, veuillez contacter le directeur commercial pour une consultation.","chooseProject":"S\xE9lectionnez un projet","chooseProjectTips":"Veuillez choisir un projet.","choseTitle":"Veuillez choisir un forfait","collectionProjet":"Projet attribu\xE9","comboChoseTitle":"Veuillez choisir un forfait","contactInformation":"Coordonn\xE9es","contacts":"Personne \xE0 contacter","deviceNum":"Nombre d'appareils","downText":"\xCAtes-vous s\xFBr de vouloir r\xE9trograder le package?","email":"Email","exitSuccess":"D\xE9connexion r\xE9ussie","expire":"maturit\xE9","expireDesc":"Si le compte n'est pas renouvel\xE9 apr\xE8s la date d'expiration, le compte ne pourra pas se connecter; les donn\xE9es du projet seront conserv\xE9es pendant la p\xE9riode et pourront \xEAtre utilis\xE9es apr\xE8s le renouvellement","loading":"Chargement en cours","loginOut":"Se d\xE9connecter","loginSuccessful":"Inscription r\xE9ussie","more":"En savoir plus","newAdd":"Ajouter une attribution","noProject":"Aucun projet n'a encore \xE9t\xE9 attribu\xE9.","ok":"d\xE9terminer","optionError":"l'op\xE9ration a \xE9chou\xE9","optionSuccess":"Op\xE9ration r\xE9ussie","projectDetail":"D\xE9tails du package","projectNum":"Nombre d'objets","remain.quota":"Quota restant","remain.project.quota":"Quota de projet restant","remain.device.quota":"Quota de points restant","remaining":"Restant","search":"rechercher","searchPlaceholder":"Veuillez entrer le nom du projet.","seeAll":"Voir tous les forfaits","state1":"Cr\xE9ation en cours","state2":"En attente d'affectation","state3":"En cours d'affectation","submit":"nous faire parvenir","submitLoading":"Soumission en cours","sureLogout":"Confirmer la d\xE9connexion ?","test":"test","totalDeviceCount":"Total d'appareils","totalProjectCount":"Total de projets","updateError":"Le remplacement a \xE9chou\xE9","updateSuccess":"Remplac\xE9 avec succ\xE8s","updateText":"\xCAtes-vous s\xFBr de vouloir mettre \xE0 niveau?","useAddValue":"Projets utilisant cette application \xE0 valeur ajout\xE9e","useTime1":"Essaie","useTime2":"{{day}}Jours, veuillez contacter le responsable commercial pour renouveler les frais apr\xE8s l'expiration","using":"En proc\xE8s","warningTip":"Rappel amical"}`)},"./src/locales/fr/index.ts":function(P,f,i){"use strict";var g=i("./src/locales/fr/common.json"),v=i.t("./src/locales/fr/common.json",1);f.a={common:g}},"./src/locales/ja/common.json":function(P){P.exports=JSON.parse('{"account":"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6A29\u9650","accountCombo":"\u30A2\u30AB\u30A6\u30F3\u30C8\u30D1\u30C3\u30B1\u30FC\u30B8","addValue":"\u4ED8\u52A0\u4FA1\u5024\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3","all":"\u3059\u3079\u3066","allCombo":"\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8","audit":"\u4F01\u696D\u60C5\u5831\u306E\u30EC\u30D3\u30E5\u30FC\u3001\u3057\u3070\u3089\u304F\u304A\u5F85\u3061\u304F\u3060\u3055\u3044","audit.fail":"\u627F\u8A8D\u5931\u6557","audit.fail.reSubmit":"\u7533\u8ACB\u3092\u518D\u63D0\u51FA","auto":"\u81EA\u52D5","btnConsult":"\u30AA\u30D5\u30E9\u30A4\u30F3\u76F8\u8AC7","btnUpdata":"\u4ECA\u3059\u3050\u4EA4\u63DB","buttonFree":"15\u65E5\u9593\u7121\u6599\u3067\u3054\u5229\u7528\u3044\u305F\u3060\u3051\u307E\u3059","cancel":"\u30AD\u30E3\u30F3\u30BB\u30EB","changeCombo":"\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u5909\u66F4\u3059\u308B","chooseAccuntPlan":"\u30C8\u30E9\u30A4\u30A2\u30EB\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044","choosePlan":"\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u9078\u629E","choosePlanTips":"\u30D5\u30EB\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u8CFC\u5165\u3059\u308B\u306B\u306F\u3001\u30D3\u30B8\u30CD\u30B9\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u306B\u304A\u554F\u3044\u5408\u308F\u305B\u304F\u3060\u3055\u3044\u3002","chooseProject":"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u9078\u629E","chooseProjectTips":"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002","choseTitle":"\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044","collectionProjet":"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u304C\u5272\u308A\u5F53\u3066\u3089\u308C\u307E\u3057\u305F","comboChoseTitle":"\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u304A\u9078\u3073\u304F\u3060\u3055\u3044","contactInformation":"\u9023\u7D61\u5148\u60C5\u5831","contacts":"\u9023\u7D61\u5148\u62C5\u5F53\u8005","deviceNum":"\u30C7\u30D0\u30A4\u30B9\u306E\u6570","downText":"\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u30C0\u30A6\u30F3\u30B0\u30EC\u30FC\u30C9\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","email":"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9","exitSuccess":"\u30ED\u30B0\u30A2\u30A6\u30C8\u304C\u6210\u529F\u3057\u307E\u3057\u305F","expire":"\u671F\u9650\u5207\u308C","expireDesc":"\u6709\u52B9\u671F\u9650\u5F8C\u306B\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u66F4\u65B0\u3055\u308C\u306A\u3044\u5834\u5408\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u30ED\u30B0\u30A4\u30F3\u3067\u304D\u307E\u305B\u3093\u3002\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30C7\u30FC\u30BF\u306F\u671F\u9593\u4E2D\u4FDD\u6301\u3055\u308C\u3001\u66F4\u65B0\u5F8C\u306B\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002","loading":"\u8AAD\u307F\u8FBC\u307F\u4E2D","loginOut":"\u30ED\u30B0\u30A2\u30A6\u30C8","loginSuccessful":"\u767B\u9332\u6210\u529F","more":"\u8A73\u7D30\u3092\u898B\u308B","newAdd":"\u5272\u308A\u5F53\u3066\u3092\u8FFD\u52A0","noProject":"\u307E\u3060\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306F\u5272\u308A\u5F53\u3066\u3089\u308C\u3066\u3044\u307E\u305B\u3093\u3002","ok":"\u6C7A\u5B9A\u3059\u308B","optionError":"\u64CD\u4F5C\u306B\u5931\u6557\u3057\u307E\u3057\u305F","optionSuccess":"\u64CD\u4F5C\u6210\u529F","projectDetail":"\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u8A73\u7D30","projectNum":"\u30A2\u30A4\u30C6\u30E0\u6570","remain.quota":"\u6B8B\u308A\u306E\u30AF\u30A9\u30FC\u30BF","remain.project.quota":"\u6B8B\u308A\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30AF\u30A9\u30FC\u30BF","remain.device.quota":"\u6B8B\u308A\u306E\u30DD\u30A4\u30F3\u30C8\u30AF\u30A9\u30FC\u30BF","remaining":"\u6B8B\u308A","search":"\u691C\u7D22\u3059\u308B","searchPlaceholder":"\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002","seeAll":"\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u8868\u793A","state1":"\u4F5C\u6210\u4E2D","state2":"\u5272\u308A\u5F53\u3066\u5F85\u3061","state3":"\u5272\u308A\u5F53\u3066\u4E2D","submit":"\u53C2\u52A0\u3059\u308B","submitLoading":"\u9001\u4FE1\u4E2D","sureLogout":"\u30ED\u30B0\u30A2\u30A6\u30C8\u3092\u78BA\u8A8D\u3057\u307E\u3059\u304B\uFF1F","test":"\u30C6\u30B9\u30C8","totalDeviceCount":"\u7DCF\u30C7\u30D0\u30A4\u30B9\u6570","totalProjectCount":"\u7DCF\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u6570","updateError":"\u4EA4\u63DB\u306B\u5931\u6557\u3057\u307E\u3057\u305F","updateSuccess":"\u6B63\u5E38\u306B\u7F6E\u304D\u63DB\u3048","updateText":"\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3057\u3066\u3082\u3088\u308D\u3057\u3044\u3067\u3059\u304B\uFF1F","useAddValue":"\u3053\u306E\u4ED8\u52A0\u4FA1\u5024\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8","useTime1":"\u8A66\u3057\u3066\u307F\u308B","useTime2":"{{day}}\u65E5\u3001\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u305F\u5F8C\u30D3\u30B8\u30CD\u30B9\u30DE\u30CD\u30FC\u30B8\u30E3\u30FC\u306B\u3054\u9023\u7D61\u3057\u3066\u66F4\u65B0\u304F\u3060\u3055\u3044","using":"\u8A66\u3059\u4E2D","warningTip":"\u6CE8\u610F\u4E8B\u9805"}')},"./src/locales/ja/index.ts":function(P,f,i){"use strict";var g=i("./src/locales/ja/common.json"),v=i.t("./src/locales/ja/common.json",1);f.a={common:g}},"./src/locales/zh/common.json":function(P){P.exports=JSON.parse('{"account":"\u8D26\u6237\u6743\u9650","accountCombo":"\u8D26\u6237\u5957\u9910","addValue":"\u589E\u503C\u5E94\u7528","all":"\u5168\u90E8","allCombo":"\u5168\u90E8\u5957\u9910","audit":"\u4F01\u4E1A\u4FE1\u606F\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85","audit.fail":"\u5BA1\u6838\u672A\u901A\u8FC7","audit.fail.reSubmit":"\u91CD\u65B0\u63D0\u4EA4\u7533\u8BF7","btnConsult":"\u7EBF\u4E0B\u54A8\u8BE2","btnUpdata":"\u7ACB\u5373\u66F4\u6362","buttonFree":"\u514D\u8D39\u8BD5\u752815\u5929","cancel":"\u53D6\u6D88","changeCombo":"\u66F4\u6362\u5957\u9910","chooseAccuntPlan":"\u8BF7\u9009\u62E9\u8BD5\u7528\u5957\u9910","chooseCount":"\u8BF7\u9009\u62E9\u4F7F\u7528\u8D26\u6237","choosePlan":"\u9009\u62E9\u5957\u9910","choosePlanTips":"\u8D2D\u4E70\u6B63\u5F0F\u7248\u672C\uFF0C\u53EF\u8054\u7CFB\u5546\u52A1\u7ECF\u7406\u54A8\u8BE2","chooseProject":"\u9009\u62E9\u9879\u76EE","chooseProjectTips":"\u8BF7\u9009\u62E9\u9879\u76EE","choseTitle":"\u8BF7\u9009\u62E9\u5957\u9910","collectionProjet":"\u5DF2\u5206\u914D\u9879\u76EE","comboChoseTitle":"\u8BF7\u9009\u62E9\u5957\u9910","contactInformation":"\u8054\u7CFB\u65B9\u5F0F","contacts":"\u8054\u7CFB\u4EBA","deviceNum":"\u8BBE\u5907\u6570","downText":"\u786E\u5B9A\u8981\u964D\u7EA7\u5957\u9910\u5417?","email":"\u90AE\u7BB1","enterpriseName":"\u4F01\u4E1A\u540D\u79F0","exitSuccess":"\u9000\u51FA\u6210\u529F","expire":"\u5230\u671F","expireDesc":"\u82E5\u903E\u671F\u672A\u7EED\u8D39\uFF0C\u8D26\u53F7\u5C06\u65E0\u6CD5\u767B\u5F55\uFF1B\u671F\u95F4\u9879\u76EE\u6570\u636E\u4FDD\u7559\uFF0C\u7EED\u8D39\u540E\u53EF\u7EE7\u7EED\u4F7F\u7528","loading":"\u52A0\u8F7D\u4E2D","loginOut":"\u9000\u51FA\u767B\u5F55","loginSuccessful":"\u6CE8\u518C\u6210\u529F","more":"\u4E86\u89E3\u66F4\u591A","newAdd":"\u65B0\u589E\u5206\u914D","noProject":"\u6682\u672A\u5206\u914D\u4EFB\u4F55\u9879\u76EE","ok":"\u786E\u5B9A","optionError":"\u64CD\u4F5C\u5931\u8D25","optionSuccess":"\u64CD\u4F5C\u6210\u529F","projectDetail":"\u5957\u9910\u8BE6\u60C5","projectNum":"\u9879\u76EE\u6570","remain.quota":"\u5269\u4F59\u989D\u5EA6","remain.project.quota":"\u5269\u4F59\u9879\u76EE\u989D\u5EA6","remain.device.quota":"\u5269\u4F59\u70B9\u4F4D\u989D\u5EA6","remaining":"\u5269\u4F59","search":"\u641C\u7D22","searchPlaceholder":"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0","seeAll":"\u67E5\u770B\u5168\u90E8\u5957\u9910","state1":"\u521B\u5EFA\u4E2D","state2":"\u5F85\u5206\u914D","state3":"\u5206\u914D\u4E2D","submit":"\u63D0\u4EA4","submitLoading":"\u63D0\u4EA4\u4E2D","sureLogout":"\u786E\u8BA4\u9000\u51FA\uFF1F","test":"\u6D4B\u8BD5","totalDeviceCount":"\u603B\u8BBE\u5907\u6570","totalProjectCount":"\u603B\u9879\u76EE\u6570","updateError":"\u66F4\u6362\u5931\u8D25","updateSuccess":"\u66F4\u6362\u6210\u529F","updateText":"\u786E\u5B9A\u8981\u5347\u7EA7\u5417?","useAddValue":"\u6B63\u5728\u4F7F\u7528\u8BE5\u589E\u503C\u5E94\u7528\u7684\u9879\u76EE","useTime1":"\u8BD5\u7528","useTime2":"\u5269\u4F59{{day}}\u5929, \u8BF7\u53CA\u65F6\u8054\u7CFB\u5546\u52A1\u7ECF\u7406\u8FDB\u884C\u7EED\u8D39","using":"\u8BD5\u7528\u4E2D","warningTip":"\u6E29\u99A8\u63D0\u793A"}')},"./src/locales/zh/index.ts":function(P,f,i){"use strict";var g=i("./src/locales/zh/common.json"),v=i.t("./src/locales/zh/common.json",1);f.a={common:g}},"./src/utils/getLanguage.ts":function(P,f,i){"use strict";i.d(f,"a",function(){return g}),i.d(f,"b",function(){return v});var g=function(){var u,U,B=/[-|_]/g,b=ty.getSystemInfoSync(),p=b==null||(u=b.language)===null||u===void 0||(u=u.split(B))===null||u===void 0?void 0:u[0];return console.log("language",b==null||(U=b.language)===null||U===void 0?void 0:U.split(B),p,b),["zh","en","ja","es","de","fr"].includes(p)?p:"en"},v=function(){var u,U=/[-|_]/g,B=ty.getSystemInfoSync(),b=B==null||(u=B.language)===null||u===void 0||(u=u.split(U))===null||u===void 0?void 0:u[0];return b==="zh"}},"./src/utils/getSystemInfoSync.ts":function(P,f,i){"use strict";i.d(f,"a",function(){return v});var g=ty.getSystemInfoSync(),v=(g==null?void 0:g.platform)==="android"},"./src/utils/i18n.ts":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),v=i("./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js"),y=i("./node_modules/i18next/dist/esm/i18next.js"),u=i("./node_modules/react-i18next/dist/es/index.js"),U=i("./src/locales/zh/index.ts"),B=i("./src/locales/en/index.ts"),b=i("./src/locales/de/index.ts"),p=i("./src/locales/fr/index.ts"),M=i("./src/locales/es/index.ts"),j=i("./src/locales/ja/index.ts"),R=i("./src/utils/getLanguage.ts"),T=Object(R.a)();y.a.use(v.a).use(u.a).init({compatibilityJSON:"v3",fallbackLng:"zh",resources:{zh:U.a,en:B.a,de:b.a,fr:p.a,es:M.a,ja:j.a},lng:T}),console.log("%c language","font-size:14px; background: blue; color:#fff;",T);var w=function(){return function(Q){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return y.a.t(Q,Object(g.a)(Object(g.a)({},ce),{},{ns:["common"]}))}};f.a=w},"./src/utils/request/index.ts":function(P,f,i){"use strict";i.d(f,"a",function(){return p});var g=i("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),v=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),y=i("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),u=i("./src/api/mockData.ts"),U=i("./src/config/globalData/index.ts"),B=i("./node_modules/@tarojs/taro/index.js"),b=i.n(B);function p(j){return M.apply(this,arguments)}function M(){return M=Object(y.a)(Object(g.a)().mark(function j(R){var T,w,Z,Q,ce,$,ee,G,z,ue,de,J,re,be,Te,De;return Object(g.a)().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(w=R.url,Z=R.data,Q=R.apiVersion,ce=R.extData,$=Object(U.b)(U.a.IS_ONLINE),$){he.next=6;break}return b.a.hideLoading(),b.a.showToast({title:"Network unavailable",duration:2e3,icon:"none"}),he.abrupt("return",Promise.reject({}));case 6:return ee={result:{},success:!1,code:0},G="devtools",z=function(){return new Promise(function(Ae){if(G!=="devtools"){Ae({data:{result:(u.a===null||u.a===void 0?void 0:u.a[w])||{},success:!0}});return}ty.apiRequestByAtop({api:w,version:Q||"1.0",postData:Object(v.a)({},Z)||{},extData:ce,success:function(Ge){console.log("------------- result \u2193 -------------------"),console.log("url: ",w),console.log("params: ",Z),console.log("result",Ge),console.log("--------------- \u2191 ------------------------"),Ae({data:{result:Ge,success:!0}})},fail:function(Ge){var q;console.log("fail: ",Ge),Ae({data:Object.assign({},Ge==null?void 0:Ge.innerError,{code:+(Ge==null||(q=Ge.innerError)===null||q===void 0?void 0:q.errorCode)}),errorMsg:Ge==null?void 0:Ge.errorMsg})},complete:function(){b.a.hideLoading()}})})},he.next=11,z();case 11:return ee=he.sent,(T=ee)!==null&&T!==void 0&&(T=T.data)!==null&&T!==void 0&&T.success?(ue=ee,de=ue.data,J=de.result,re=J===void 0?{}:J,be=de.success,Te=de.code,De=de.msg,ee={result:re,success:be,code:Te,msg:De},console.log("res",de)):(console.log("---error----"),console.log(ee),setTimeout(function(){b.a.showToast({title:ee.data.errorMsg,duration:2e3,icon:"none"})},200)),he.abrupt("return",ee);case 14:case"end":return he.stop()}},j)})),M.apply(this,arguments)}}}])});var Fc=Bo(()=>{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["vendors"],{"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":function(P,f){function i(g,v){(v==null||v>g.length)&&(v=g.length);for(var y=0,u=new Array(v);yv.length)&&(y=v.length);for(var u=0,U=new Array(y);u=0)&&Object.prototype.propertyIsEnumerable.call(y,B)&&(U[B]=y[B])}return U}},"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":function(P,f,i){"use strict";i.d(f,"a",function(){return g});function g(v,y){if(v==null)return{};var u={},U=Object.keys(v),B,b;for(b=0;b=0)&&(u[B]=v[B]);return u}},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(P,f,i){"use strict";i.d(f,"a",function(){return y});var g=i("./node_modules/@babel/runtime/helpers/esm/typeof.js"),v=i("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function y(u,U){if(U&&(Object(g.a)(U)==="object"||typeof U=="function"))return U;if(U!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Object(v.a)(u)}},"./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js":function(P,f,i){"use strict";i.d(f,"a",function(){return v});var g=i("./node_modules/@babel/runtime/helpers/esm/typeof.js");function v(){"use strict";v=function(){return u};var y,u={},U=Object.prototype,B=U.hasOwnProperty,b=Object.defineProperty||function(te,L,D){te[L]=D.value},p=typeof Symbol=="function"?Symbol:{},M=p.iterator||"@@iterator",j=p.asyncIterator||"@@asyncIterator",R=p.toStringTag||"@@toStringTag";function T(te,L,D){return Object.defineProperty(te,L,{value:D,enumerable:!0,configurable:!0,writable:!0}),te[L]}try{T({},"")}catch(te){T=function(D,K,V){return D[K]=V}}function w(te,L,D,K){var V=L&&L.prototype instanceof z?L:z,se=Object.create(V.prototype),le=new Ge(K||[]);return b(se,"_invoke",{value:he(te,D,le)}),se}function Z(te,L,D){try{return{type:"normal",arg:te.call(L,D)}}catch(K){return{type:"throw",arg:K}}}u.wrap=w;var Q="suspendedStart",ce="suspendedYield",$="executing",ee="completed",G={};function z(){}function ue(){}function de(){}var J={};T(J,M,function(){return this});var re=Object.getPrototypeOf,be=re&&re(re(q([])));be&&be!==U&&B.call(be,M)&&(J=be);var Te=de.prototype=z.prototype=Object.create(J);function De(te){["next","throw","return"].forEach(function(L){T(te,L,function(D){return this._invoke(L,D)})})}function Ee(te,L){function D(V,se,le,xe){var Pe=Z(te[V],te,se);if(Pe.type!=="throw"){var $e=Pe.arg,He=$e.value;return He&&Object(g.a)(He)=="object"&&B.call(He,"__await")?L.resolve(He.__await).then(function(Je){D("next",Je,le,xe)},function(Je){D("throw",Je,le,xe)}):L.resolve(He).then(function(Je){$e.value=Je,le($e)},function(Je){return D("throw",Je,le,xe)})}xe(Pe.arg)}var K;b(this,"_invoke",{value:function(se,le){function xe(){return new L(function(Pe,$e){D(se,le,Pe,$e)})}return K=K?K.then(xe,xe):xe()}})}function he(te,L,D){var K=Q;return function(V,se){if(K===$)throw new Error("Generator is already running");if(K===ee){if(V==="throw")throw se;return{value:y,done:!0}}for(D.method=V,D.arg=se;;){var le=D.delegate;if(le){var xe=Me(le,D);if(xe){if(xe===G)continue;return xe}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(K===Q)throw K=ee,D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);K=$;var Pe=Z(te,L,D);if(Pe.type==="normal"){if(K=D.done?ee:ce,Pe.arg===G)continue;return{value:Pe.arg,done:D.done}}Pe.type==="throw"&&(K=ee,D.method="throw",D.arg=Pe.arg)}}}function Me(te,L){var D=L.method,K=te.iterator[D];if(K===y)return L.delegate=null,D==="throw"&&te.iterator.return&&(L.method="return",L.arg=y,Me(te,L),L.method==="throw")||D!=="return"&&(L.method="throw",L.arg=new TypeError("The iterator does not provide a '"+D+"' method")),G;var V=Z(K,te.iterator,L.arg);if(V.type==="throw")return L.method="throw",L.arg=V.arg,L.delegate=null,G;var se=V.arg;return se?se.done?(L[te.resultName]=se.value,L.next=te.nextLoc,L.method!=="return"&&(L.method="next",L.arg=y),L.delegate=null,G):se:(L.method="throw",L.arg=new TypeError("iterator result is not an object"),L.delegate=null,G)}function Ae(te){var L={tryLoc:te[0]};1 in te&&(L.catchLoc=te[1]),2 in te&&(L.finallyLoc=te[2],L.afterLoc=te[3]),this.tryEntries.push(L)}function Re(te){var L=te.completion||{};L.type="normal",delete L.arg,te.completion=L}function Ge(te){this.tryEntries=[{tryLoc:"root"}],te.forEach(Ae,this),this.reset(!0)}function q(te){if(te||te===""){var L=te[M];if(L)return L.call(te);if(typeof te.next=="function")return te;if(!isNaN(te.length)){var D=-1,K=function V(){for(;++D=0;--V){var se=this.tryEntries[V],le=se.completion;if(se.tryLoc==="root")return K("end");if(se.tryLoc<=this.prev){var xe=B.call(se,"catchLoc"),Pe=B.call(se,"finallyLoc");if(xe&&Pe){if(this.prev=0;--K){var V=this.tryEntries[K];if(V.tryLoc<=this.prev&&B.call(V,"finallyLoc")&&this.prev=0;--D){var K=this.tryEntries[D];if(K.finallyLoc===L)return this.complete(K.completion,K.afterLoc),Re(K),G}},catch:function(L){for(var D=this.tryEntries.length-1;D>=0;--D){var K=this.tryEntries[D];if(K.tryLoc===L){var V=K.completion;if(V.type==="throw"){var se=V.arg;Re(K)}return se}}throw new Error("illegal catch attempt")},delegateYield:function(L,D,K){return this.delegate={iterator:q(L),resultName:D,nextLoc:K},this.method==="next"&&(this.arg=y),G}},u}},"./node_modules/@babel/runtime/helpers/esm/set.js":function(P,f,i){"use strict";i.d(f,"a",function(){return u});var g=i("./node_modules/@babel/runtime/helpers/esm/superPropBase.js"),v=i("./node_modules/@babel/runtime/helpers/esm/defineProperty.js");function y(U,B,b,p){return typeof Reflect!="undefined"&&Reflect.set?y=Reflect.set:y=function(j,R,T,w){var Z=Object(g.a)(j,R),Q;if(Z){if(Q=Object.getOwnPropertyDescriptor(Z,R),Q.set)return Q.set.call(w,T),!0;if(!Q.writable)return!1}if(Q=Object.getOwnPropertyDescriptor(w,R),Q){if(!Q.writable)return!1;Q.value=T,Object.defineProperty(w,R,Q)}else Object(v.a)(w,R,T);return!0},y(U,B,b,p)}function u(U,B,b,p,M){var j=y(U,B,b,p||U);if(!j&&M)throw new TypeError("failed to set property");return b}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(P,f,i){"use strict";i.d(f,"a",function(){return g});function g(v,y){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(U,B){return U.__proto__=B,U},g(v,y)}},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":function(P,f,i){"use strict";i.d(f,"a",function(){return U});var g=i("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"),v=i("./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"),y=i("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),u=i("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function U(B,b){return Object(g.a)(B)||Object(v.a)(B,b)||Object(y.a)(B,b)||Object(u.a)()}},"./node_modules/@babel/runtime/helpers/esm/superPropBase.js":function(P,f,i){"use strict";i.d(f,"a",function(){return v});var g=i("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");function v(y,u){for(;!Object.prototype.hasOwnProperty.call(y,u)&&(y=Object(g.a)(y),y!==null););return y}},"./node_modules/@babel/runtime/helpers/esm/toArray.js":function(P,f,i){"use strict";i.d(f,"a",function(){return U});var g=i("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"),v=i("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"),y=i("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),u=i("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function U(B){return Object(g.a)(B)||Object(v.a)(B)||Object(y.a)(B)||Object(u.a)()}},"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":function(P,f,i){"use strict";i.d(f,"a",function(){return U});var g=i("./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js"),v=i("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"),y=i("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),u=i("./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js");function U(B){return Object(g.a)(B)||Object(v.a)(B)||Object(y.a)(B)||Object(u.a)()}},"./node_modules/@babel/runtime/helpers/esm/toPrimitive.js":function(P,f,i){"use strict";i.d(f,"a",function(){return v});var g=i("./node_modules/@babel/runtime/helpers/esm/typeof.js");function v(y,u){if(Object(g.a)(y)!=="object"||y===null)return y;var U=y[Symbol.toPrimitive];if(U!==void 0){var B=U.call(y,u||"default");if(Object(g.a)(B)!=="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(y)}},"./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":function(P,f,i){"use strict";i.d(f,"a",function(){return y});var g=i("./node_modules/@babel/runtime/helpers/esm/typeof.js"),v=i("./node_modules/@babel/runtime/helpers/esm/toPrimitive.js");function y(u){var U=Object(v.a)(u,"string");return Object(g.a)(U)==="symbol"?U:String(U)}},"./node_modules/@babel/runtime/helpers/esm/typeof.js":function(P,f,i){"use strict";i.d(f,"a",function(){return g});function g(v){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},g(v)}},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":function(P,f,i){"use strict";i.d(f,"a",function(){return v});var g=i("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function v(y,u){if(y){if(typeof y=="string")return Object(g.a)(y,u);var U=Object.prototype.toString.call(y).slice(8,-1);if(U==="Object"&&y.constructor&&(U=y.constructor.name),U==="Map"||U==="Set")return Array.from(y);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return Object(g.a)(y,u)}}},"./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js":function(P,f,i){"use strict";i.d(f,"a",function(){return U});var g=i("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),v=i("./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"),y=i("./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js"),u=i("./node_modules/@babel/runtime/helpers/esm/construct.js");function U(B){var b=typeof Map=="function"?new Map:void 0;return U=function(M){if(M===null||!Object(y.a)(M))return M;if(typeof M!="function")throw new TypeError("Super expression must either be null or a function");if(typeof b!="undefined"){if(b.has(M))return b.get(M);b.set(M,j)}function j(){return Object(u.a)(M,arguments,Object(g.a)(this).constructor)}return j.prototype=Object.create(M.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),Object(v.a)(j,M)},U(B)}},"./node_modules/@babel/runtime/helpers/extends.js":function(P,f){function i(){return P.exports=i=Object.assign?Object.assign.bind():function(g){for(var v=1;v<]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function u(j){var R={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},T=j.match(/<\/?([^\s]+?)[/\s>]/);if(T&&(R.name=T[1],(v.a[T[1]]||j.charAt(j.length-2)==="/")&&(R.voidElement=!0),R.name.startsWith("!--"))){var w=j.indexOf("-->");return{type:"comment",comment:w!==-1?j.slice(4,w):""}}for(var Z=new RegExp(y),Q=null;(Q=Z.exec(j))!==null;)if(Q[0].trim())if(Q[1]){var ce=Q[1].trim(),$=[ce,""];ce.indexOf("=")>-1&&($=ce.split("=")),R.attrs[$[0]]=$[1],Z.lastIndex--}else Q[2]&&(R.attrs[Q[2]]=Q[3].trim().substring(1,Q[3].length-1));return R}var U=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,B=/^\s*$/,b=Object.create(null);function p(j,R){switch(R.type){case"text":return j+R.content;case"tag":return j+="<"+R.name+(R.attrs?function(T){var w=[];for(var Z in T)w.push(Z+'="'+T[Z]+'"');return w.length?" "+w.join(" "):""}(R.attrs):"")+(R.voidElement?"/>":">"),R.voidElement?j:j+R.children.reduce(p,"")+"";case"comment":return j+""}}var M={parse:function(j,R){R||(R={}),R.components||(R.components=b);var T,w=[],Z=[],Q=-1,ce=!1;if(j.indexOf("<")!==0){var $=j.indexOf("<");w.push({type:"text",content:$===-1?j:j.substring(0,$)})}return j.replace(U,function(ee,G){if(ce){if(ee!=="")return;ce=!1}var z,ue=ee.charAt(1)!=="/",de=ee.startsWith(" ").concat(W," data: "),st);var m=Qe.proceed(Ne),E=m.then(function(x){return console.log("http <-- ".concat(W," result:"),x),x});return ee(m.abort)&&(E.abort=m.abort),E}var Je=Object.freeze({__proto__:null,timeoutInterceptor:$e,logInterceptor:He});function ut(Qe){return Qe}function at(Qe){return function(Ne,Se){Qe.preloadData=z(Ne)?Ne:$()({},Ne,Se)}}var tt=750,Ct={640:2.34/2,750:1,828:1.81/2},Kt=20,Jt=5,cn="rpx";function Ln(Qe){return function(Ne){var Se=Ne.designWidth,st=Se===void 0?tt:Se,W=Ne.deviceRatio,m=W===void 0?Ct:W,E=Ne.baseFontSize,x=E===void 0?Kt:E,F=Ne.targetUnit,H=F===void 0?cn:F,ne=Ne.unitPrecision,_e=ne===void 0?Jt:ne;Qe.config=Qe.config||{},Qe.config.designWidth=st,Qe.config.deviceRatio=m,Qe.config.baseFontSize=x,Qe.config.targetUnit=H,Qe.config.unitPrecision=_e}}function wt(Qe){return function(Ne){var Se=Qe.config||{},st=Se.deviceRatio||Ct,W=Se.baseFontSize,m=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return ee(Se.designWidth)?Se.designWidth(H):Se.designWidth||tt}(Ne);if(!(m in st))throw new Error("deviceRatio \u914D\u7F6E\u4E2D\u4E0D\u5B58\u5728 ".concat(m," \u7684\u8BBE\u7F6E\uFF01"));var E=~~Ne,x=1/Se.deviceRatio[m];switch(Se.targetUnit){case"rem":x*=W*2;break;case"px":x*=2;break}var F=E/x;return Se.unitPrecision>=0&&Se.unitPrecision<=100&&(F=Number(F.toFixed(Se.unitPrecision))),F+Se.targetUnit}}var bn={Behavior:ut,getEnv:se,ENV_TYPE:K,Link:xe,interceptors:Je,Current:y.Current,getCurrentInstance:y.getCurrentInstance,options:y.options,nextTick:y.nextTick,eventCenter:y.eventCenter,Events:y.Events,getInitPxTransform:Ln,interceptorify:Pe};bn.initPxTransform=Ln(bn),bn.preload=at(y.Current),bn.pxTransform=wt(bn)},"./node_modules/@tarojs/components/mini/index.js":function(P,f,i){"use strict";i.d(f,"i",function(){return g}),i.d(f,"h",function(){return U}),i.d(f,"b",function(){return B}),i.d(f,"c",function(){return b}),i.d(f,"d",function(){return p}),i.d(f,"f",function(){return j}),i.d(f,"g",function(){return re}),i.d(f,"e",function(){return Me}),i.d(f,"a",function(){return L});var g="view",v="icon",y="progress",u="rich-text",U="text",B="button",b="checkbox",p="checkbox-group",M="form",j="input",R="label",T="picker",w="picker-view",Z="picker-view-column",Q="radio",ce="radio-group",$="slider",ee="switch",G="cover-image",z="textarea",ue="cover-view",de="movable-area",J="movable-view",re="scroll-view",be="swiper",Te="swiper-item",De="navigator",Ee="audio",he="camera",Me="image",Ae="live-player",Re="video",Ge="canvas",q="ad",te="web-view",L="block",D="map",K="slot",V="native-slot",se="custom-wrapper"},"./node_modules/@tarojs/mini-runner/dist/template/custom-wrapper.js":function(P,f,i){"use strict";Object.defineProperty(f,"__esModule",{value:!0});var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js");Component((0,g.createRecursiveComponentConfig)("custom-wrapper"))},"./node_modules/@tarojs/plugin-framework-react/dist/runtime.js":function(P,f,i){"use strict";i.d(f,"a",function(){return tt});var g=i("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),v=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),y=i("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"),u=i("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),U=i("./node_modules/@babel/runtime/helpers/esm/createClass.js"),B=i("./node_modules/@babel/runtime/helpers/esm/inherits.js"),b=i("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),p=i("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),M=i("./node_modules/@tarojs/shared/dist/shared.esm.js"),j=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),R={PageContext:M.a,R:M.a},T="taro-app";function w(Ne,Se){var st,W=Se.prototype;return!((st=Se.displayName)===null||st===void 0)&&st.includes("Connect")?!1:Object(M.k)(Se.render)||!!(W!=null&&W.isReactComponent)||W instanceof Ne.Component}function Z(Ne){return Object(M.i)(Ne)?Ne:Ne?[Ne]:[]}function Q(Ne){return Ne.writable=!0,Ne.enumerable=!0,Ne}function ce(Ne){j.Current.router=Object.assign({params:Ne==null?void 0:Ne.query},Ne)}var $=function(Se){return function(st){var W=R.R,m=R.PageContext,E=W.useContext(m)||T,x=W.useRef(),F=W.useRef(st);F.current!==st&&(F.current=st),W.useLayoutEffect(function(){var H=x.current=Object(j.getPageInstance)(E),ne=!1;H||(ne=!0,x.current=Object.create(null),H=x.current);var _e=function(){return F.current.apply(F,arguments)};return Object(M.k)(H[Se])?H[Se]=[H[Se],_e]:H[Se]=[].concat(Object(p.a)(H[Se]||[]),[_e]),ne&&Object(j.injectPageInstance)(H,E),function(){var je=x.current;if(je){var me=je[Se];me===_e?je[Se]=void 0:Object(M.i)(me)&&(je[Se]=me.filter(function(Ie){return Ie!==_e})),x.current=void 0}}},[])}},ee=$("componentDidHide"),G=$("componentDidShow"),z=$("onError"),ue=$("onUnhandledRejection"),de=$("onLaunch"),J=$("onPageNotFound"),re=$("onLoad"),be=$("onPageScroll"),Te=$("onPullDownRefresh"),De=$("onPullIntercept"),Ee=$("onReachBottom"),he=$("onResize"),Me=$("onUnload"),Ae=$("onAddToFavorites"),Re=$("onOptionMenuClick"),Ge=$("onSaveExitState"),q=$("onShareAppMessage"),te=$("onShareTimeline"),L=$("onTitleClick"),D=$("onReady"),K=function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,st=R.R;return Se?j.Current.router:st.useMemo(function(){return j.Current.router},[])},V=$("onTabItemTap"),se=function(){},le=Object.freeze({__proto__:null,useAddToFavorites:Ae,useDidHide:ee,useDidShow:G,useError:z,useLaunch:de,useLoad:re,useOptionMenuClick:Re,usePageNotFound:J,usePageScroll:be,usePullDownRefresh:Te,usePullIntercept:De,useReachBottom:Ee,useReady:D,useResize:he,useRouter:K,useSaveExitState:Ge,useScope:se,useShareAppMessage:q,useShareTimeline:te,useTabItemTap:V,useTitleClick:L,useUnhandledRejection:ue,useUnload:Me}),xe,Pe,$e,He=Object(j.incrementId)(),Je=Object(M.q)();function ut(Ne){M.g.tap("getLifecycle",function(Se,st){return st=st.replace(/^on(Show|Hide)$/,"componentDid$1"),Se[st]}),M.g.tap("modifyMpEvent",function(Se){Object.defineProperty(Se,"type",{value:Se.type.replace(/-/g,"")})}),M.g.tap("batchedEventUpdates",function(Se){Ne.unstable_batchedUpdates(Se)}),M.g.tap("mergePageInstance",function(Se,st){!Se||!st||"constructor"in Se||Object.keys(Se).forEach(function(W){var m=Se[W],E=Z(st[W]);st[W]=E.concat(m)})}),Je&&(M.g.tap("createPullDownComponent",function(Se,st,W,m){var E=w(W,Se);return W.forwardRef(function(x,F){var H=Object.assign({},x),ne=E?{ref:F}:{forwardedRef:F,reactReduxForwardedRef:F};return xe(m||"taro-pull-to-refresh",null,xe(Se,Object.assign(Object.assign({},H),ne)))})}),M.g.tap("getDOMNode",function(Se){return Ne.findDOMNode(Se)}))}function at(Ne,Se){return function(st){var W=w(Ne,st),m=function(F){return F&&Object(j.injectPageInstance)(F,Se)},E=W?{ref:m}:{forwardedRef:m,reactReduxForwardedRef:m};return R.PageContext===M.a&&(R.PageContext=Ne.createContext("")),function(x){Object(B.a)(H,x);var F=Object(b.a)(H);function H(){var ne;return Object(u.a)(this,H),ne=F.apply(this,arguments),ne.state={hasError:!1},ne}return Object(U.a)(H,[{key:"componentDidCatch",value:function(_e,je){console.warn(_e),console.error(je.componentStack)}},{key:"render",value:function(){var _e=this.state.hasError?[]:xe(R.PageContext.Provider,{value:Se},xe(st,Object.assign(Object.assign({},this.props),E)));return Je?xe("div",{id:Se,className:"taro_page"},_e):xe("root",{id:Se},_e)}}],[{key:"getDerivedStateFromError",value:function(_e){var je,me;return(me=(je=j.Current.app)===null||je===void 0?void 0:je.onError)===null||me===void 0||me.call(je,_e.message+_e.stack),{hasError:!0}}}]),H}(Ne.Component)}}function tt(Ne,Se,st,W){var m;Object(M.e)(!!st,"\u6784\u5EFA React/Nerv \u9879\u76EE\u8BF7\u628A process.env.FRAMEWORK \u8BBE\u7F6E\u4E3A 'react'/'nerv' "),R.R=Se,xe=Se.createElement,Pe=st,$e=Se.Fragment;var E=Se.createRef(),x=w(Se,Ne),F,H,ne=new Promise(function(oe){return H=oe});ut(Pe);function _e(){return E.current}function je(oe){F?oe():ne.then(function(){return oe()})}function me(){var oe,ie,fe="app";Je&&(fe=(W==null?void 0:W.appId)||fe);var Le=j.document.getElementById(fe);if((Se.version||"").startsWith("18")){var ze=Pe.createRoot(Le);(oe=ze.render)===null||oe===void 0||oe.call(ze,xe(Ie))}else(ie=Pe.render)===null||ie===void 0||ie.call(Pe,xe(Ie),Le)}var Ie=function(oe){Object(B.a)(fe,oe);var ie=Object(b.a)(fe);function fe(Le){var ze;return Object(u.a)(this,fe),ze=ie.call(this,Le),ze.pages=[],ze.elements=[],F=Object(y.a)(ze),H(Object(y.a)(ze)),ze}return Object(U.a)(fe,[{key:"mount",value:function(ze,ot,Tt){var Ut=at(Se,ot)(ze),Cn=ot+He(),Yn=function(){return xe(Ut,{key:Cn,tid:ot})};this.pages.push(Yn),this.forceUpdate(Tt)}},{key:"unmount",value:function(ze,ot){var Tt=this.elements,Ut=Tt.findIndex(function(Cn){return Cn.props.tid===ze});Tt.splice(Ut,1),this.forceUpdate(ot)}},{key:"render",value:function(){for(var ze=this.pages,ot=this.elements;ze.length>0;){var Tt=ze.pop();ot.push(Tt())}var Ut=null;return x&&(Ut={ref:E}),xe(Ne,Ut,Je?xe($e!=null?$e:"div",null,ot.slice()):ot.slice())}}]),fe}(Se.Component);Je||me();var Ke=Object(v.a)(M.g.call("getMiniLifecycleImpl").app,3),Be=Ke[0],rt=Ke[1],vt=Ke[2],lt=Object.create({render:function(ie){F.forceUpdate(ie)},mount:function(ie,fe,Le){F?F.mount(ie,fe,Le):ne.then(function(ze){return ze.mount(ie,fe,Le)})},unmount:function(ie,fe){F.unmount(ie,fe)}},(m={config:Q({configurable:!0,value:W})},Object(g.a)(m,Be,Q({value:function(ie){var fe=this;ce(ie),Je&&me();var Le=function(){var ot,Tt=_e();if(fe.$app=Tt,Tt){if(Tt.taroGlobalData){var Ut=Tt.taroGlobalData,Cn=Object.keys(Ut),Yn=Object.getOwnPropertyDescriptors(Ut);Cn.forEach(function(Vn){Object.defineProperty(fe,Vn,{configurable:!0,enumerable:!0,get:function(){return Ut[Vn]},set:function(jn){Ut[Vn]=jn}})}),Object.defineProperties(fe,Yn)}(ot=Tt.onLaunch)===null||ot===void 0||ot.call(Tt,ie)}pt("onLaunch",ie)};je(Le)}})),Object(g.a)(m,rt,Q({value:function(ie){ce(ie);var fe=function(){var ze,ot=_e();(ze=ot==null?void 0:ot.componentDidShow)===null||ze===void 0||ze.call(ot,ie),pt("onShow",ie)};je(fe)}})),Object(g.a)(m,vt,Q({value:function(){var ie=function(){var Le,ze=_e();(Le=ze==null?void 0:ze.componentDidHide)===null||Le===void 0||Le.call(ze),pt("onHide")};je(ie)}})),Object(g.a)(m,"onError",Q({value:function(ie){var fe=function(){var ze,ot=_e();(ze=ot==null?void 0:ot.onError)===null||ze===void 0||ze.call(ot,ie),pt("onError",ie),ie!=null&&ie.includes("Minified React error")&&console.warn("React \u51FA\u73B0\u62A5\u9519\uFF0C\u8BF7\u6253\u5F00\u7F16\u8BD1\u914D\u7F6E mini.debugReact \u67E5\u770B\u62A5\u9519\u8BE6\u60C5\uFF1Ahttps://docs.taro.zone/docs/config-detail#minidebugreact")};je(fe)}})),Object(g.a)(m,"onUnhandledRejection",Q({value:function(ie){var fe=function(){var ze,ot=_e();(ze=ot==null?void 0:ot.onUnhandledRejection)===null||ze===void 0||ze.call(ot,ie),pt("onUnhandledRejection",ie)};je(fe)}})),Object(g.a)(m,"onPageNotFound",Q({value:function(ie){var fe=function(){var ze,ot=_e();(ze=ot==null?void 0:ot.onPageNotFound)===null||ze===void 0||ze.call(ot,ie),pt("onPageNotFound",ie)};je(fe)}})),m));function pt(oe){for(var ie=arguments.length,fe=new Array(ie>1?ie-1:0),Le=1;Le3&&arguments[3]!==void 0?arguments[3]:"string";fe!=null?Le==="number"?(fe===0&&oe.value===""||ie!=fe)&&(oe.value=te(fe)):ie!==te(fe)&&(oe.value=te(fe)):(Le==="submit"||Le==="reset")&&oe.removeAttribute("value")}function K(oe){var ie=oe&&oe.nodeName&&oe.nodeName.toLowerCase();if(ie==="input"){var fe=oe.type;return!fe||!!j[fe]}return ie==="textarea"}var V=L,se=Re;function le(oe){var ie=oe.type,fe=oe.nodeName;return fe&&fe.toLowerCase()==="input"&&(ie==="checkbox"||ie==="radio")}function xe(oe){return oe._valueTracker}function Pe(oe){oe._valueTracker=null}function $e(oe){var ie=le(oe)?"checked":"value",fe=Object.getOwnPropertyDescriptor(oe.constructor.prototype,ie),Le=""+oe[ie];if(!(oe.hasOwnProperty(ie)||typeof fe=="undefined"||typeof fe.get!="function"||typeof fe.set!="function")){var ze=fe.get,ot=fe.set;Object.defineProperty(oe,ie,{configurable:!0,enumerable:fe.enumerable,get:function(){return ze.call(this)},set:function(Cn){Le=""+Cn,ot.call(this,Cn)}});var Tt={getValue:function(){return Le},setValue:function(Cn){Le=""+Cn},stopTracking:function(){Pe(oe),delete oe[ie]}};return Tt}}function He(oe){xe(oe)||(oe._valueTracker=$e(oe))}function Je(oe,ie){if(!oe)return!1;var fe=xe(oe);if(!fe)return!0;var Le=fe.getValue();return ie!==Le?(fe.setValue(ie),!0):!1}function ut(oe){return oe[0]==="o"&&oe[1]==="n"}var at=/aspect|acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function tt(oe,ie,fe){var Le=Kt(oe,ie,fe);Le&&Ct(oe,ie,Le)}function Ct(oe,ie,fe){for(var Le=0;Le0&&(ie.textContent="")}},bn=b()(wt),Qe=bn.injectIntoDevTools({bundleType:1,version:"18.0.0",rendererPackageName:"taro-react"});Qe||console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools","font-weight:bold");var Ne=null;function Se(oe,ie){var fe,Le,ze=Ee(ie),ot=oe.type;if(!(!ze||!K(ie))&&(ot==="input"||ot==="change")){var Tt=te((Le=(fe=oe.mpEvent)===null||fe===void 0?void 0:fe.detail)===null||Le===void 0?void 0:Le.value);return st(ze,Tt)}}function st(oe,ie){var fe=he(oe);if(!fe)return!1;if(Je(fe,ie))return oe}function W(oe){Ne?Ne.push(oe):Ne=[oe]}function m(){return Ne!==null}function E(){var oe=m();oe&&(bn.flushSync(),x())}function x(){if(Ne){var oe=Ne;Ne=null;for(var ie=0;ie1&&arguments[1]!==void 0?arguments[1]:{},fe,Le=ne.get(oe);if(Le!=null)return Le;var ze=new _e(bn,oe,ie);return ne.set(oe,ze),De((fe=ze==null?void 0:ze.internalRoot)===null||fe===void 0?void 0:fe.current,oe),U.hooks.tap("dispatchTaroEvent",function(ot,Tt){var Ut=$(ot.type);bn.runWithPriority(Ut,function(){Tt.dispatchEvent(ot)})}),U.hooks.tap("modifyTaroEvent",function(ot,Tt){var Ut,Cn,Yn=Se(ot,Tt);if(Yn){var Vn=(Cn=(Ut=ot.mpEvent)===null||Ut===void 0?void 0:Ut.detail)===null||Cn===void 0?void 0:Cn.value;W({target:Tt,value:Vn})}}),ze}var Ie=!1,Ke=function(ie,fe){if(Ie)return ie(fe);Ie=!0;try{return bn.batchedUpdates(ie,fe)}finally{Ie=!1,E()}};function Be(oe){Object(u.e)(oe&&[1,8,9,11].includes(oe.nodeType),"unmountComponentAtNode(...): Target container is not a DOM element.");var ie=ne.get(oe);return ie?(Ke(function(){ie.unmount(function(){ne.delete(oe)})},null),!0):!1}function rt(oe){if(oe==null)return null;var ie=oe.nodeType;return ie===1||ie===3?oe:bn.findHostInstance(oe)}var vt=Object(u.k)(Symbol)&&Symbol.for?Symbol.for("react.portal"):60106;function lt(oe,ie,fe){return{$$typeof:vt,key:fe==null?null:String(fe),children:oe,containerInfo:ie,implementation:null}}var pt={render:je,createRoot:me,unstable_batchedUpdates:Ke,unmountComponentAtNode:Be,findDOMNode:rt,createPortal:lt}},"./node_modules/@tarojs/runtime/dist/runtime.esm.js":function(P,f,i){"use strict";i.r(f),function(g,v,y,u,U){i.d(f,"Current",function(){return $n}),i.d(f,"FormElement",function(){return Qi}),i.d(f,"History",function(){return mi}),i.d(f,"Location",function(){return Ha}),i.d(f,"MutationObserver",function(){return rt}),i.d(f,"SVGElement",function(){return Pr}),i.d(f,"Style",function(){return Nt}),i.d(f,"TaroElement",function(){return Sn}),i.d(f,"TaroEvent",function(){return Or}),i.d(f,"TaroNode",function(){return Vi}),i.d(f,"TaroRootElement",function(){return Sr}),i.d(f,"TaroText",function(){return Ua}),i.d(f,"URL",function(){return jr}),i.d(f,"URLSearchParams",function(){return Ka}),i.d(f,"addLeadingSlash",function(){return Pi}),i.d(f,"cancelAnimationFrame",function(){return an}),i.d(f,"createComponentConfig",function(){return ma}),i.d(f,"createEvent",function(){return Ko}),i.d(f,"createPageConfig",function(){return Ki}),i.d(f,"createRecursiveComponentConfig",function(){return us}),i.d(f,"document",function(){return da}),i.d(f,"eventCenter",function(){return or}),i.d(f,"eventHandler",function(){return vo}),i.d(f,"eventSource",function(){return Vn}),i.d(f,"getComputedStyle",function(){return Bn}),i.d(f,"getCurrentInstance",function(){return ka}),i.d(f,"getPageInstance",function(){return Yo}),i.d(f,"getPath",function(){return Eo}),i.d(f,"history",function(){return Va}),i.d(f,"hydrate",function(){return Yr}),i.d(f,"incrementId",function(){return vt}),i.d(f,"injectPageInstance",function(){return Go}),i.d(f,"location",function(){return Xn}),i.d(f,"navigator",function(){return Ye}),i.d(f,"nextTick",function(){return pa}),i.d(f,"now",function(){return we}),i.d(f,"options",function(){return Dn}),i.d(f,"parseUrl",function(){return Dr}),i.d(f,"removePageInstance",function(){return yn}),i.d(f,"requestAnimationFrame",function(){return Mt}),i.d(f,"safeExecute",function(){return Zn}),i.d(f,"stringify",function(){return ri}),i.d(f,"window",function(){return zt});var B=i("./node_modules/@babel/runtime/helpers/esm/typeof.js"),b=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),p=i("./node_modules/@babel/runtime/helpers/esm/get.js"),M=i("./node_modules/@babel/runtime/helpers/esm/set.js"),j=i("./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),R=i("./node_modules/@babel/runtime/helpers/esm/toArray.js"),T=i("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"),w=i("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),Z=i("./node_modules/@babel/runtime/helpers/esm/inherits.js"),Q=i("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),ce=i("./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js"),$=i("./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"),ee=i("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),G=i("./node_modules/@babel/runtime/helpers/esm/createClass.js"),z=i("./node_modules/@tarojs/shared/dist/shared.esm.js");i.d(f,"Events",function(){return z.b}),i.d(f,"hooks",function(){return z.g});var ue=2046,de="\u5C0F\u7A0B\u5E8F setData",J="\u9875\u9762\u521D\u59CB\u5316",re="root",be="html",Te="head",De="body",Ee="app",he="container",Me="#document",Ae="document-fragment",Re="id",Ge="uid",q="class",te="style",L="focus",D="view",K="static-view",V="pure-view",se="props",le="dataset",xe="object",Pe="value",$e="input",He="change",Je="custom-wrapper",ut="target",at="currentTarget",tt="type",Ct="confirm",Kt="timeStamp",Jt="keyCode",cn="touchmove",Ln="catchMove",wt="catch-view",bn="comment",Qe="onLoad",Ne="onReady",Se="onShow",st="onHide",W="options",m="externalClasses",E="e_result",x="behaviors",F="a",H;(function(S){S.INIT="0",S.RESTORE="1",S.RECOVER="2",S.DESTORY="3"})(H||(H={}));var ne=[],_e=function(){function S(I){Object(ee.a)(this,S),this.records=[],this.callback=I}return Object(G.a)(S,[{key:"observe",value:function(h,_){this.disconnect(),this.target=h,this.options=_||{},ne.push(this)}},{key:"disconnect",value:function(){this.target=null;var h=ne.indexOf(this);h>=0&&ne.splice(h,1)}},{key:"takeRecords",value:function(){return this.records.splice(0,this.records.length)}}]),S}(),je=function(I,h){return!!I&&I.sid===(h==null?void 0:h.sid)},me=function(I,h){var _=h.characterData,l=h.characterDataOldValue,A=h.attributes,Y=h.attributeOldValue,ge=h.childList;switch(I.type){case"characterData":return _?(l||(I.oldValue=null),!0):!1;case"attributes":return A?(Y||(I.oldValue=null),!0):!1;case"childList":return!!ge}},Ie=!1;function Ke(S,I){S.records.push(I),Ie||(Ie=!0,Promise.resolve().then(function(){Ie=!1,ne.forEach(function(h){return h.callback(h.takeRecords())})}))}function Be(S){ne.forEach(function(I){for(var h=I.options,_=S.target;_;_=_.parentNode){if(je(I.target,_)&&me(S,h)){Ke(I,S);break}if(!h.subtree)break}})}var rt=function(){function S(I){Object(ee.a)(this,S),console.warn("[Taro Warning] \u82E5\u8981\u4F7F\u7528 MutationObserver\uFF0C\u8BF7\u5728 Taro \u7F16\u8BD1\u914D\u7F6E\u4E2D\u8BBE\u7F6E 'mini.enableMutationObserver: true'"),this.core={observe:z.t,disconnect:z.t,takeRecords:z.t}}return Object(G.a)(S,[{key:"observe",value:function(){var h;(h=this.core).observe.apply(h,arguments)}},{key:"disconnect",value:function(){this.core.disconnect()}},{key:"takeRecords",value:function(){return this.core.takeRecords()}}],[{key:"record",value:function(h){Be(h)}}]),S}(),vt=function(){for(var I=[],h=65;h<=90;h++)I.push(h);for(var _=97;_<=122;_++)I.push(_);var l=I.length-1,A=[0,0];return function(){var Y=A.map(function(Xe){return I[Xe]}),ge=String.fromCharCode.apply(String,Object($.a)(Y)),Fe=A.length-1;for(A[Fe]++;A[Fe]>l;){if(A[Fe]=0,Fe=Fe-1,Fe<0){A.push(0);break}A[Fe]++}return ge}};function lt(S){return S.nodeType===1}function pt(S){return S.nodeType===3}function oe(S){return S.nodeName===bn}function ie(S){var I=Object.keys(S.props).find(function(h){return!(/^(class|style|id)$/.test(h)||h.startsWith("data-"))});return!!I}function fe(S,I){for(var h,_=!1;S!=null&&S.parentElement&&S.parentElement._path!==re;){if(!((h=S.parentElement.__handlers[I])===null||h===void 0)&&h.length){_=!0;break}S=S.parentElement}return _}function Le(S){switch(S){case te:return"st";case Re:return Ge;case q:return"cl";default:return S}}var ze=new Map;function ot(S,I,h){Object(z.k)(h)&&(h={value:h}),Object.defineProperty(S.prototype,I,Object.assign({configurable:!0,enumerable:!0},h))}var Tt;function Ut(){return Tt||(Tt=Object(z.f)(z.h)),Tt}var Cn=function(){function S(I,h){var _=this;Object(ee.a)(this,S),this.tokenList=[],this.el=h,I.trim().split(/\s+/).forEach(function(l){return _.tokenList.push(l)})}return Object(G.a)(S,[{key:"value",get:function(){return this.toString()}},{key:"length",get:function(){return this.tokenList.length}},{key:"add",value:function(){var h=0,_=!1,l=arguments,A=l.length,Y=this.tokenList;do{var ge=l[h];this.checkTokenIsValid(ge)&&!~Y.indexOf(ge)&&(Y.push(ge),_=!0)}while(++h-1&&(l.nn="static-".concat(h),h===D&&!ie(S)&&(l.nn=V));var A=S.props;for(var Y in A){var ge=Object(z.v)(Y);!Y.startsWith("data-")&&Y!==q&&Y!==te&&Y!==Re&&ge!==Ln&&(l[ge]=A[Y]),h===D&&ge===Ln&&A[Y]!==!1&&(l.nn=wt)}var Fe=S.childNodes;Fe=Fe.filter(function(fn){return!oe(fn)}),Fe.length>0?l.cn=Fe.map(Yr):l.cn=[],S.className!==""&&(l.cl=S.className);var Xe=S.cssText;Xe!==""&&h!=="swiper-item"&&(l.st=Xe),z.g.call("modifyHydrateData",l);var _t=l.nn,yt=Gr[_t];if(yt){l.nn=yt._num;for(var It in l)It in yt&&(l[yt[It]]=l[It],delete l[It])}return l}var Jn=function(){function S(){Object(ee.a)(this,S),this.__handlers={}}return Object(G.a)(S,[{key:"addEventListener",value:function(h,_,l){if(h=h.toLowerCase(),z.g.call("onAddEvent",h,_,l,this),h==="regionchange"){this.addEventListener("begin",_,l),this.addEventListener("end",_,l);return}var A=!!l,Y=!1;if(Object(z.n)(l)&&(A=!!l.capture,Y=!!l.once),Y){var ge=function _t(){_.apply(this,arguments),this.removeEventListener(h,_t)};this.addEventListener(h,ge,Object.assign(Object.assign({},l),{once:!1}));return}Object(z.x)(A,"Taro \u6682\u672A\u5B9E\u73B0 event \u7684 capture \u7279\u6027\u3002");var Fe=_;_=function(){return Fe.apply(this,arguments)},_.oldHandler=Fe;var Xe=this.__handlers[h];Object(z.i)(Xe)?Xe.push(_):this.__handlers[h]=[_]}},{key:"removeEventListener",value:function(h,_){if(h=h.toLowerCase(),h==="regionchange"){this.removeEventListener("begin",_),this.removeEventListener("end",_);return}if(_){var l=this.__handlers[h];if(Object(z.i)(l)){var A=l.findIndex(function(Y){if(Y===_||Y.oldHandler===_)return!0});Object(z.x)(A===-1,"\u4E8B\u4EF6: '".concat(h,"' \u6CA1\u6709\u6CE8\u518C\u5728 DOM \u4E2D\uFF0C\u56E0\u6B64\u4E0D\u4F1A\u88AB\u79FB\u9664\u3002")),l.splice(A,1)}}}},{key:"isAnyEventBinded",value:function(){var h=this.__handlers,_=Object.keys(h).find(function(l){return h[l].length});return!!_}}]),S}(),Ei="cn",sa=vt(),Vi=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){var _;return Object(ee.a)(this,h),_=I.call(this),_.parentNode=null,_.childNodes=[],_.hydrate=function(l){return function(){return Yr(l)}},_.uid="_"+sa(),_.sid=_.uid,Vn.set(_.sid,Object(T.a)(_)),_}return Object(G.a)(h,[{key:"updateChildNodes",value:function(l){var A=this,Y=function(){return[]},ge=function(){var Xe=A.childNodes.filter(function(_t){return!oe(_t)});return Xe.map(Yr)};this.enqueueUpdate({path:"".concat(this._path,".").concat(Ei),value:l?Y:ge})}},{key:"_root",get:function(){var l;return((l=this.parentNode)===null||l===void 0?void 0:l._root)||null}},{key:"findIndex",value:function(l){var A=this.childNodes.indexOf(l);return Object(z.e)(A!==-1,"The node to be replaced is not a child of this node."),A}},{key:"_path",get:function(){var l=this.parentNode;if(l){var A=l.childNodes.filter(function(Fe){return!oe(Fe)}),Y=A.indexOf(this),ge=z.g.call("getPathIndex",Y);return"".concat(l._path,".").concat(Ei,".").concat(ge)}return""}},{key:"nextSibling",get:function(){var l=this.parentNode;return(l==null?void 0:l.childNodes[l.findIndex(this)+1])||null}},{key:"previousSibling",get:function(){var l=this.parentNode;return(l==null?void 0:l.childNodes[l.findIndex(this)-1])||null}},{key:"parentElement",get:function(){var l=this.parentNode;return(l==null?void 0:l.nodeType)===1?l:null}},{key:"firstChild",get:function(){return this.childNodes[0]||null}},{key:"lastChild",get:function(){var l=this.childNodes;return l[l.length-1]||null}},{key:"textContent",set:function(l){for(var A=this.childNodes.slice(),Y=[];this.firstChild;)this.removeChild(this.firstChild,{doUpdate:!1});if(l==="")this.updateChildNodes(!0);else{var ge=jn.document.createTextNode(l);Y.push(ge),this.appendChild(ge),this.updateChildNodes()}rt.record({type:"childList",target:this,removedNodes:A,addedNodes:Y})}},{key:"insertBefore",value:function(l,A,Y){var ge=this;if(l.nodeName===Ae)return l.childNodes.reduceRight(function(_t,yt){return ge.insertBefore(yt,_t),yt},A),l;if(l.remove({cleanRef:!1}),l.parentNode=this,A){var Fe=this.findIndex(A);this.childNodes.splice(Fe,0,l)}else this.childNodes.push(l);if(this._root)if(A)Y?this.enqueueUpdate({path:l._path,value:this.hydrate(l)}):this.updateChildNodes();else{var Xe=this.childNodes.length===1;Xe?this.updateChildNodes():this.enqueueUpdate({path:l._path,value:this.hydrate(l)})}return rt.record({type:"childList",target:this,addedNodes:[l],removedNodes:Y?[A]:[],nextSibling:Y?A.nextSibling:A||null,previousSibling:l.previousSibling}),l}},{key:"appendChild",value:function(l){return this.insertBefore(l)}},{key:"replaceChild",value:function(l,A){if(A.parentNode===this)return this.insertBefore(l,A,!0),A.remove({doUpdate:!1}),A}},{key:"removeChild",value:function(l){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=A.cleanRef,ge=A.doUpdate;Y!==!1&&ge!==!1&&rt.record({type:"childList",target:this,removedNodes:[l],nextSibling:l.nextSibling,previousSibling:l.previousSibling});var Fe=this.findIndex(l);return this.childNodes.splice(Fe,1),l.parentNode=null,Y!==!1&&Vn.removeNodeTree(l),this._root&&ge!==!1&&this.updateChildNodes(),l}},{key:"remove",value:function(l){var A;(A=this.parentNode)===null||A===void 0||A.removeChild(this,l)}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"enqueueUpdate",value:function(l){var A;(A=this._root)===null||A===void 0||A.enqueueUpdate(l)}},{key:"ownerDocument",get:function(){return jn.document}}],[{key:"extend",value:function(l,A){ot(h,l,A)}}]),h}(Jn),Ta="webkit",Uo=["all","appearance","blockOverflow","blockSize","bottom","clear","contain","content","continue","cursor","direction","display","filter","float","gap","height","inset","isolation","left","letterSpacing","lightingColor","markerSide","mixBlendMode","opacity","order","position","quotes","resize","right","rowGap","tabSize","tableLayout","top","userSelect","verticalAlign","visibility","voiceFamily","volume","whiteSpace","widows","width","zIndex","pointerEvents","aspectRatio"];function mt(S,I,h){!h&&Uo.push(S),I.forEach(function(_){Uo.push(S+_),S===Ta&&Uo.push("Webkit"+_)})}var lo="Color",ti="Style",Gi="Width",No="Image",Wo="Size",li=[lo,ti,Gi],co=["FitLength","FitWidth",No],Yi=[].concat(co,["Radius"]),Qr=[].concat(li,co),fo=["EndRadius","StartRadius"],Ue=["Bottom","Left","Right","Top"],nt=["End","Start"],ct=["Content","Items","Self"],xt=["BlockSize","Height","InlineSize",Gi],ht=["After","Before"];mt("borderBlock",li),mt("borderBlockEnd",li),mt("borderBlockStart",li),mt("outline",[].concat(li,["Offset"])),mt("border",[].concat(li,["Boundary","Break","Collapse","Radius","Spacing"])),mt("borderFit",["Length",Gi]),mt("borderInline",li),mt("borderInlineEnd",li),mt("borderInlineStart",li),mt("borderLeft",Qr),mt("borderRight",Qr),mt("borderTop",Qr),mt("borderBottom",Qr),mt("textDecoration",[lo,ti,"Line"]),mt("textEmphasis",[lo,ti,"Position"]),mt("scrollMargin",Ue),mt("scrollPadding",Ue),mt("padding",Ue),mt("margin",[].concat(Ue,["Trim"])),mt("scrollMarginBlock",nt),mt("scrollMarginInline",nt),mt("scrollPaddingBlock",nt),mt("scrollPaddingInline",nt),mt("gridColumn",nt),mt("gridRow",nt),mt("insetBlock",nt),mt("insetInline",nt),mt("marginBlock",nt),mt("marginInline",nt),mt("paddingBlock",nt),mt("paddingInline",nt),mt("pause",ht),mt("cue",ht),mt("mask",["Clip","Composite",No,"Mode","Origin","Position","Repeat",Wo,"Type"]),mt("borderImage",["Outset","Repeat","Slice","Source","Transform",Gi]),mt("maskBorder",["Mode","Outset","Repeat","Slice","Source",Gi]),mt("font",["Family","FeatureSettings","Kerning","LanguageOverride","MaxSize","MinSize","OpticalSizing","Palette",Wo,"SizeAdjust","Stretch",ti,"Weight","VariationSettings"]),mt("transform",["Box","Origin",ti]),mt("background",[lo,No,"Attachment","BlendMode","Clip","Origin","Position","Repeat",Wo]),mt("listStyle",[No,"Position","Type"]),mt("scrollSnap",["Align","Stop","Type"]),mt("grid",["Area","AutoColumns","AutoFlow","AutoRows"]),mt("gridTemplate",["Areas","Columns","Rows"]),mt("overflow",["Block","Inline","Wrap","X","Y"]),mt("transition",["Delay","Duration","Property","TimingFunction"]),mt("color",["Adjust","InterpolationFilters","Scheme"]),mt("textAlign",["All","Last"]),mt("page",["BreakAfter","BreakBefore","BreakInside"]),mt("animation",["Delay","Direction","Duration","FillMode","IterationCount","Name","PlayState","TimingFunction"]),mt("flex",["Basis","Direction","Flow","Grow","Shrink","Wrap"]),mt("offset",[].concat(ht,nt,["Anchor","Distance","Path","Position","Rotate"])),mt("perspective",["Origin"]),mt("clip",["Path","Rule"]),mt("flow",["From","Into"]),mt("align",["Content","Items","Self"],!0),mt("alignment",["Adjust","Baseline"],!0),mt("borderStart",fo,!0),mt("borderEnd",fo,!0),mt("borderCorner",["Fit",No,"ImageTransform"],!0),mt("borderTopLeft",Yi,!0),mt("borderTopRight",Yi,!0),mt("borderBottomLeft",Yi,!0),mt("borderBottomRight",Yi,!0),mt("column",["s","Count","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","Span",Gi],!0),mt("break",[].concat(ht,["Inside"]),!0),mt("wrap",[].concat(ht,["Flow","Inside","Through"]),!0),mt("justify",ct,!0),mt("place",ct,!0),mt("max",[].concat(xt,["Lines"]),!0),mt("min",xt,!0),mt("line",["Break","Clamp","Grid","Height","Padding","Snap"],!0),mt("inline",["BoxAlign",Wo,"Sizing"],!0),mt("text",["CombineUpright","GroupAlign","Height","Indent","Justify","Orientation","Overflow","Shadow","SpaceCollapse","SpaceTrim","Spacing","Transform","UnderlinePosition","Wrap"],!0),mt("shape",["ImageThreshold","Inside","Margin","Outside"],!0),mt("word",["Break","Spacing","Wrap"],!0),mt("object",["Fit","Position"],!0),mt("box",["DecorationBreak","Shadow","Sizing","Snap"],!0),mt(Ta,["LineClamp","BoxOrient","TextFillColor","TextStroke","TextStrokeColor","TextStrokeWidth"],!0);function dt(S){rt.record({type:"attributes",target:S._element,attributeName:"style",oldValue:S.cssText})}function gt(S){var I=S._element;I._root&&I.enqueueUpdate({path:"".concat(I._path,".","st"),value:S.cssText})}function At(S,I){Object(z.x)(Object(z.o)(S)&&S.length>ue,"Style \u5C5E\u6027 ".concat(I," \u7684\u503C\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u6E32\u67D3\u6027\u80FD\uFF0C\u8003\u8651\u4F7F\u7528 CSS \u7C7B\u6216\u5176\u5B83\u65B9\u6848\u66FF\u4EE3\u3002"));var h=this[I];h!==S&&(!this._pending&&dt(this),Object(z.l)(S)||Object(z.p)(S)?(this._usedStyleProp.delete(I),delete this._value[I]):(this._usedStyleProp.add(I),this._value[I]=S),!this._pending&>(this))}function St(S,I){for(var h={},_=function(){var ge=I[A];if(S[ge])return{v:void 0};h[ge]={get:function(){var Xe=this._value[ge];return Object(z.l)(Xe)||Object(z.p)(Xe)?"":Xe},set:function(Xe){At.call(this,Xe,ge)}}},l,A=0;A0}},{key:"focus",get:function(){return function(){this.setAttribute(L,!0)}},set:function(l){this.setAttribute(L,l)}},{key:"blur",value:function(){this.setAttribute(L,!1)}},{key:"setAttribute",value:function(l,A){Object(z.x)(Object(z.o)(A)&&A.length>ue,"\u5143\u7D20 ".concat(this.nodeName," \u7684 ").concat(l," \u5C5E\u6027\u503C\u6570\u636E\u91CF\u8FC7\u5927\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u6E32\u67D3\u6027\u80FD\u3002\u8003\u8651\u964D\u4F4E\u56FE\u7247\u8F6C\u4E3A base64 \u7684\u9608\u503C\u6216\u5728 CSS \u4E2D\u4F7F\u7528 base64\u3002"));var Y=this.nodeName===D&&!ie(this)&&!this.isAnyEventBinded();switch(l!==te&&rt.record({target:this,type:"attributes",attributeName:l,oldValue:this.getAttribute(l)}),l){case te:this.style.cssText=A;break;case Re:this.uid!==this.sid&&Vn.delete(this.uid),A=String(A),this.props[l]=this.uid=A,Vn.set(A,this);break;default:this.props[l]=A,l.startsWith("data-")&&(this.dataset===z.a&&(this.dataset=Object.create(null)),this.dataset[Object(z.v)(l.replace(/^data-/,""))]=A);break}if(this._root){var ge=Ut(),Fe=ge[this.nodeName],Xe=ge[D]._num,_t=ge[K]._num,yt=ge[wt]._num,It=this._path;l=Le(l);var fn=Object(z.v)(l),en={path:"".concat(It,".").concat(fn),value:Object(z.k)(A)?function(){return A}:A};if(z.g.call("modifySetAttrPayload",this,l,en,ge),Fe){var En=Fe[fn]||l;en.path="".concat(It,".").concat(Object(z.v)(En))}this.enqueueUpdate(en),this.nodeName===D&&(fn===Ln?this.enqueueUpdate({path:"".concat(It,".","nn"),value:A?yt:this.isAnyEventBinded()?Xe:_t}):Y&&ie(this)&&this.enqueueUpdate({path:"".concat(It,".","nn"),value:_t}))}}},{key:"removeAttribute",value:function(l){var A=this.nodeName===D&&ie(this)&&!this.isAnyEventBinded();if(rt.record({target:this,type:"attributes",attributeName:l,oldValue:this.getAttribute(l)}),l===te)this.style.cssText="";else{var Y=z.g.call("onRemoveAttribute",this,l);if(Y||!this.props.hasOwnProperty(l))return;delete this.props[l]}if(this._root){var ge=Ut(),Fe=ge[this.nodeName],Xe=ge[D]._num,_t=ge[K]._num,yt=ge[V]._num,It=this._path;l=Le(l);var fn=Object(z.v)(l),en={path:"".concat(It,".").concat(fn),value:""};if(z.g.call("modifyRmAttrPayload",this,l,en,ge),Fe){var En=Fe[fn]||l;en.path="".concat(It,".").concat(Object(z.v)(En))}this.enqueueUpdate(en),this.nodeName===D&&(fn===Ln?this.enqueueUpdate({path:"".concat(It,".","nn"),value:this.isAnyEventBinded()?Xe:ie(this)?_t:yt}):A&&!ie(this)&&this.enqueueUpdate({path:"".concat(It,".","nn"),value:yt}))}}},{key:"getAttribute",value:function(l){var A=l===te?this.style.cssText:this.props[l];return A!=null?A:""}},{key:"getElementsByTagName",value:function(l){var A=this;return hn(this,function(Y){return Y.nodeName===l||l==="*"&&A!==Y})}},{key:"getElementsByClassName",value:function(l){var A=l.trim().split(/\s+/);return hn(this,function(Y){var ge=Y.classList;return A.every(function(Fe){return ge.contains(Fe)})})}},{key:"dispatchEvent",value:function(l){var A=l.cancelable,Y=this.__handlers[l.type];if(!Object(z.i)(Y))return!1;for(var ge=Y.length;ge--;){var Fe=Y[ge],Xe=void 0;if(Fe._stop?Fe._stop=!1:(z.g.call("modifyDispatchEvent",l,this),Xe=Fe.call(this,l)),(Xe===!1||l._end)&&A&&(l.defaultPrevented=!0),!Object(z.p)(Xe)&&l.mpEvent&&(l.mpEvent[E]=Xe),l._end&&l._stop)break}return l._stop?this._stopPropagation(l):l._stop=!0,Y!=null}},{key:"addEventListener",value:function(l,A,Y){var ge=this.nodeName,Fe=z.g.call("getSpecialNodes"),Xe=!0;if(Object(z.n)(Y)&&Y.sideEffect===!1&&(Xe=!1,delete Y.sideEffect),Xe!==!1&&!this.isAnyEventBinded()&&Fe.indexOf(ge)>-1){var _t=Ut(),yt=_t[ge]._num;this.enqueueUpdate({path:"".concat(this._path,".","nn"),value:yt})}Object(p.a)(Object(j.a)(h.prototype),"addEventListener",this).call(this,l,A,Y)}},{key:"removeEventListener",value:function(l,A){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;Object(p.a)(Object(j.a)(h.prototype),"removeEventListener",this).call(this,l,A);var ge=this.nodeName,Fe=z.g.call("getSpecialNodes");if(Y!==!1&&!this.isAnyEventBinded()&&Fe.indexOf(ge)>-1){var Xe=Ut(),_t=ie(this)?"static-".concat(ge):"pure-".concat(ge),yt=Xe[_t]._num;this.enqueueUpdate({path:"".concat(this._path,".","nn"),value:yt})}}}],[{key:"extend",value:function(l,A){ot(h,l,A)}}]),h}(Vi),Dn={prerender:!0,debug:!1};function Qn(){return{index:0,column:0,line:0}}function Jr(S,I,h){for(var _=S.index,l=S.index=_+h,A=_;AI;l--){var A=h.charAt(l);if(!yr(A)){if(ci(A))return!1;break}}for(var Y=S+1;Y<_;Y++){var ge=h.charAt(Y);if(!yr(ge))return!ci(ge)}}var Za=function(){function S(I){Object(ee.a)(this,S),this.tokens=[],this.position=Qn(),this.html=I}return Object(G.a)(S,[{key:"scan",value:function(){for(var h=this.html,_=this.position,l=h.length;_.index",l.index),ge=Y+3;Y===-1&&(Y=ge=_.length);var Fe=_.slice(l.index,Y);Hn(l,_,ge),this.tokens.push({type:h,content:Fe,position:{start:A,end:vr(l)}})}},{key:"scanTag",value:function(){this.scanTagStart();var h=this.scanTagName();return this.scanAttrs(),this.scanTagEnd(),h}},{key:"scanTagStart",value:function(){var h="tag-start",_=this.html,l=this.position,A=_.charAt(l.index+1),Y=A==="/",ge=vr(l);Jr(l,_,Y?2:1),this.tokens.push({type:h,close:Y,position:{start:ge}})}},{key:"scanTagEnd",value:function(){var h="tag-end",_=this.html,l=this.position,A=_.charAt(l.index),Y=A==="/";Jr(l,_,Y?2:1);var ge=vr(l);this.tokens.push({type:h,close:Y,position:{end:ge}})}},{key:"scanTagName",value:function(){for(var h="tag",_=this.html,l=this.position,A=_.length,Y=l.index;Y");if(Fe)break;Y++}for(var Xe=Y+1;Xe");if(!yt)break;Xe++}Hn(l,_,Xe);var It=_.slice(Y,Xe);return this.tokens.push({type:h,content:It}),It}},{key:"scanAttrs",value:function(){for(var h=this.html,_=this.position,l=this.tokens,A=_.index,Y=null,ge=A,Fe=[],Xe=h.length;A";if(It){A!==ge&&Fe.push(h.slice(ge,A));break}if(Is(A,ge,h)){A!==ge&&Fe.push(h.slice(ge,A)),ge=A+1,A++;continue}var fn=_t==="'"||_t==='"';if(fn){Y=_t,A++;continue}A++}Hn(_,h,A);for(var en=Fe.length,En="attribute",mn=0;mn1){var xr=Qt+Zr;l.push({type:En,content:xr}),mn+=1;continue}var Yt=Fe[mn+2];if(mn+=1,Yt){var ar=Qt+"="+Yt;l.push({type:En,content:ar}),mn+=1;continue}}}if(Qt.endsWith("=")){var Cr=Fe[mn+1];if(Cr&&!Cr.includes("=")){var wr=Qt+Cr;l.push({type:En,content:wr}),mn+=1;continue}var Lr=Qt.slice(0,-1);l.push({type:En,content:Lr});continue}l.push({type:En,content:Qt})}}},{key:"scanSkipTag",value:function(h){for(var _=this.html,l=this.position,A=h.toLowerCase(),Y=_.length;l.index]*>((.|\n|\s)+?)<\/style>/g,A=h;return A=A.replace(l,function(Y,ge){var Fe=ge.trim();return _.stringToSelector(Fe),""}),A.trim()}},{key:"stringToSelector",value:function(h){for(var _=this,l=h.indexOf(po),A=function(){var ge=h.indexOf(Ls),Fe=h.slice(0,l).trim(),Xe=h.slice(l+1,ge);Xe=Xe.replace(/:(.*);/g,function(_t,yt){var It=yt.trim().replace(/ +/g,"+++");return":".concat(It,";")}),Xe=Xe.replace(/ /g,""),Xe=Xe.replace(/\+\+\+/g," "),/;$/.test(Xe)||(Xe+=";"),Fe.split(",").forEach(function(_t){var yt=_.parseSelector(_t);_.styles.push({content:Xe,selectorList:yt})}),h=h.slice(ge+1),l=h.indexOf(po)};l>-1;)A()}},{key:"parseSelector",value:function(h){var _=h.trim().replace(/ *([>~+]) */g," $1").replace(/ +/g," ").replace(/\[\s*([^[\]=\s]+)\s*=\s*([^[\]=\s]+)\s*\]/g,"[$1=$2]").split(" "),l=_.map(function(A){var Y=A.charAt(0),ge={isChild:Y===Rs,isGeneralSibling:Y===qa,isAdjacentSibling:Y===es,tag:null,id:null,class:[],attrs:[]};return A=A.replace(/^[>~+]/,""),A=A.replace(/\[(.+?)\]/g,function(Fe,Xe){var _t=Xe.split("="),yt=Object(b.a)(_t,2),It=yt[0],fn=yt[1],en=Xe.indexOf("=")===-1,En={all:en,key:It,value:en?null:fn};return ge.attrs.push(En),""}),A=A.replace(/([.#][A-Za-z0-9-_]+)/g,function(Fe,Xe){return Xe[0]===_n?ge.id=Xe.substr(1):Xe[0]===Aa&&ge.class.push(Xe.substr(1)),""}),A!==""&&(ge.tag=A),ge});return l}},{key:"matchStyle",value:function(h,_,l){var A=this,Y=nr(this.styles).reduce(function(ge,Fe,Xe){var _t=Fe.content,yt=Fe.selectorList,It=l[Xe],fn=yt[It],en=yt[It+1];(en!=null&&en.isGeneralSibling||en!=null&&en.isAdjacentSibling)&&(fn=en,It+=1,l[Xe]+=1);var En=A.matchCurrent(h,_,fn);if(En&&fn.isGeneralSibling)for(var mn=Sa(_);mn;){if(mn.h5tagName&&A.matchCurrent(mn.h5tagName,mn,yt[It-1])){En=!0;break}mn=Sa(mn),En=!1}if(En&&fn.isAdjacentSibling){var Qt=Sa(_);if(!Qt||!Qt.h5tagName)En=!1;else{var Pn=A.matchCurrent(Qt.h5tagName,Qt,yt[It-1]);Pn||(En=!1)}}if(En){if(It===yt.length-1)return ge+_t;It0&&(l[Xe]-=1,A.matchCurrent(h,_,yt[l[Xe]])&&(l[Xe]+=1));return ge},"");return Y}},{key:"matchCurrent",value:function(h,_,l){if(l.tag&&l.tag!==h||l.id&&l.id!==_.id)return!1;if(l.class.length)for(var A=_.className.split(" "),Y=0;Y=0;){var l=I[_].tagName;if(l===S)break;if(h&&h.includes(l))return!0;_--}return!1}function ns(S){return Dn.html.renderHTMLTag?S:la[S]?la[S]:su(S)?S:ln(S)?"view":wn(S)?"text":"view"}function Bs(S){var I="=",h=S.indexOf(I);if(h===-1)return[S];var _=S.slice(0,h).trim(),l=S.slice(h+I.length).trim();return[_,l]}function Us(S,I,h,_){return S.filter(function(l){return l.type==="comment"?!1:l.type==="text"?l.content!=="":!0}).map(function(l){if(l.type==="text"){var A=I.createTextNode(l.content);return Object(z.k)(Dn.html.transformText)&&(A=Dn.html.transformText(A,l)),_==null||_.appendChild(A),A}var Y=I.createElement(ns(l.tagName));Y.h5tagName=l.tagName,_==null||_.appendChild(Y),Dn.html.renderHTMLTag||(Y.className="h5-".concat(l.tagName));for(var ge=0;ge-1;)if(h[Xe].tagName===Fe){_t=!0;break}for(;_0;){if(Fe===h[en].tagName){h.splice(en);var En=en-1;A=h[En].children;break}en=en-1}for(var mn=[],Qt=void 0;_0&&arguments[0]!==void 0?arguments[0]:!1,I=this.ownerDocument,h;this.nodeType===1?h=I.createElement(this.nodeName):this.nodeType===3&&(h=I.createTextNode(""));for(var _ in this){var l=this[_];[se,le].includes(_)&&Object(B.a)(l)===xe?h[_]=Object.assign({},l):_==="_value"?h[_]=l:_===te&&(h.style._value=Object.assign({},l._value),h.style._usedStyleProp=new Set(Array.from(l._usedStyleProp)))}return S&&(h.childNodes=this.childNodes.map(function(A){return A.cloneNode(!0)})),h}function _o(S){var I=!1;return this.childNodes.some(function(h){var _=h.uid;if(_===S.uid||_===S.id||h.contains(S))return I=!0,!0}),I}Object(z.q)()||Vi.extend("innerHTML",{set:function(I){Ra.call(this,this,I)},get:function(){return""}});var Or=function(){function S(I,h,_){Object(ee.a)(this,S),this._stop=!1,this._end=!1,this.defaultPrevented=!1,this.button=0,this.timeStamp=Date.now(),this.type=I.toLowerCase(),this.mpEvent=_,this.bubbles=!!(h&&h.bubbles),this.cancelable=!!(h&&h.cancelable)}return Object(G.a)(S,[{key:"stopPropagation",value:function(){this._stop=!0}},{key:"stopImmediatePropagation",value:function(){this._end=this._stop=!0}},{key:"preventDefault",value:function(){this.defaultPrevented=!0}},{key:"target",get:function(){var h,_,l=this.cacheTarget;if(l)return l;var A=Object.create(((h=this.mpEvent)===null||h===void 0?void 0:h.target)||null),Y=jn.document.getElementById(A.id);A.dataset=Y!==null?Y.dataset:z.a;for(var ge in(_=this.mpEvent)===null||_===void 0?void 0:_.detail)A[ge]=this.mpEvent.detail[ge];return this.cacheTarget=A,A}},{key:"currentTarget",get:function(){var h,_,l,A,Y=this.cacheCurrentTarget;if(Y)return Y;var ge=jn.document,Fe=Object.create(((h=this.mpEvent)===null||h===void 0?void 0:h.currentTarget)||null),Xe=ge.getElementById(Fe.id),_t=ge.getElementById(((l=(_=this.mpEvent)===null||_===void 0?void 0:_.target)===null||l===void 0?void 0:l.id)||null);if(Xe===null||Xe&&Xe===_t)return this.cacheCurrentTarget=this.target,this.target;Fe.dataset=Xe.dataset;for(var yt in(A=this.mpEvent)===null||A===void 0?void 0:A.detail)Fe[yt]=this.mpEvent.detail[yt];return this.cacheCurrentTarget=Fe,Fe}}]),S}();function Ko(S,I){if(typeof S=="string")return new Or(S,{bubbles:!0,cancelable:!0});var h=new Or(S.type,{bubbles:!0,cancelable:!0},S);for(var _ in S)_===at||_===ut||_===tt||_===Kt||(h[_]=S[_]);return h.type===Ct&&(I==null?void 0:I.nodeName)===$e&&(h[Jt]=13),h}var go={};function ca(S){var I=S[E];return Object(z.p)(I)||delete S[E],I}function vo(S){var I,h;S.type===void 0&&Object.defineProperty(S,"type",{value:S._type}),S.detail===void 0&&Object.defineProperty(S,"detail",{value:S._detail||Object.assign({},S)}),S.currentTarget=S.currentTarget||S.target||Object.assign({},S),z.g.call("modifyMpEventImpl",S);var _=S.currentTarget,l=((I=_.dataset)===null||I===void 0?void 0:I.sid)||_.id||((h=S.detail)===null||h===void 0?void 0:h.id)||"",A=jn.document.getElementById(l);if(A){var Y=function(){var Xe=Ko(S,A);z.g.call("modifyTaroEvent",Xe,A),z.g.call("dispatchTaroEvent",Xe,A),z.g.call("dispatchTaroEventFinish",Xe,A)};if(z.g.isExist("batchedEventUpdates")){var ge=S.type;if(!z.g.call("isBubbleEvents",ge)||!fe(A,ge)||ge===cn&&A.props.catchMove)return z.g.call("batchedEventUpdates",function(){go[ge]&&(go[ge].forEach(function(Fe){return Fe()}),delete go[ge]),Y()}),ca(S);(go[ge]||(go[ge]=[])).push(Y)}else return Y(),ca(S)}}var Qi=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){return Object(ee.a)(this,h),I.apply(this,arguments)}return Object(G.a)(h,[{key:"type",get:function(){var l;return(l=this.props[tt])!==null&&l!==void 0?l:""},set:function(l){this.setAttribute(tt,l)}},{key:"value",get:function(){var l=this.props[Pe];return l==null?"":l},set:function(l){this.setAttribute(Pe,l)}},{key:"dispatchEvent",value:function(l){if(l.mpEvent){var A=l.mpEvent.detail.value;l.type===He?this.props.value=A:l.type===$e&&(this.value=A)}return Object(p.a)(Object(j.a)(h.prototype),"dispatchEvent",this).call(this,l)}}]),h}(Sn),Xr=function(){function S(){Object(ee.a)(this,S),this.recorder=new Map}return Object(G.a)(S,[{key:"start",value:function(h){Dn.debug&&this.recorder.set(h,Date.now())}},{key:"stop",value:function(h){if(Dn.debug){var _=Date.now(),l=this.recorder.get(h);this.recorder.delete(h);var A=_-l;console.log("".concat(h," \u65F6\u957F\uFF1A ").concat(A,"ms"))}}}]),S}(),Rn=new Xr;function Ji(S,I){var h=I.slice(1),_=S,l,A="";if(h.some(function(Y,ge){var Fe=Y.replace(/^\[(.+)\]$/,"$1").replace(/\bcn\b/g,"childNodes");if(_=_[Fe],Object(z.i)(_)&&(_=_.filter(function(_t){return!oe(_t)})),Object(z.p)(_))return!0;if(_.nodeName===Je){var Xe=ze.get(_.sid);Xe&&(l=Xe,A=I.slice(ge+2).join("."))}}),l)return{customWrapper:l,splitedPath:A}}var Sr=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){var _;return Object(ee.a)(this,h),_=I.call(this),_.updatePayloads=[],_.updateCallbacks=[],_.pendingUpdate=!1,_.ctx=null,_.nodeName=re,_.tagName=re.toUpperCase(),_}return Object(G.a)(h,[{key:"_path",get:function(){return re}},{key:"_root",get:function(){return this}},{key:"enqueueUpdate",value:function(l){this.updatePayloads.push(l),!this.pendingUpdate&&this.ctx&&this.performUpdate()}},{key:"performUpdate",value:function(){var l=this,A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Y=arguments.length>1?arguments[1]:void 0;this.pendingUpdate=!0;var ge=this.ctx;setTimeout(function(){var Fe="".concat(de," \u5F00\u59CB\u65F6\u95F4\u6233 ").concat(Date.now());Rn.start(Fe);for(var Xe=Object.create(null),_t=new Set(A?["root.cn.[0]","root.cn[0]"]:[]);l.updatePayloads.length>0;){var yt=l.updatePayloads.shift(),It=yt.path,fn=yt.value;It.endsWith("cn")&&_t.add(It),Xe[It]=fn}var en=function(Kr){_t.forEach(function(ls){Kr.includes(ls)&&Kr!==ls&&delete Xe[Kr]});var qi=Xe[Kr];Object(z.k)(qi)&&(Xe[Kr]=qi())};for(var En in Xe)en(En);if(Object(z.k)(Y))return Y(Xe);l.pendingUpdate=!1;var mn={},Qt=new Map;if(A)mn=Xe;else for(var Pn in Xe){var Zr=Pn.split("."),xr=Ji(l,Zr);if(xr){var Yt=xr.customWrapper,ar=xr.splitedPath;Qt.set(Yt,Object.assign(Object.assign({},Qt.get(Yt)||{}),Object(w.a)({},"i.".concat(ar),Xe[Pn])))}else mn[Pn]=Xe[Pn]}var Cr=Qt.size,wr=Object.keys(mn).length>0,Lr=Cr+(wr?1:0),Tr=0,mr=function(){++Tr===Lr&&(Rn.stop(Fe),l.flushUpdateCallback(),A&&Rn.stop(J))};Cr&&Qt.forEach(function(xi,Kr){Dn.debug&&console.log("custom wrapper setData: ",xi),Kr.setData(xi,mr)}),wr&&(Dn.debug&&console.log("page setData:",mn),ge.setData(mn,mr))},0)}},{key:"enqueueUpdateCallback",value:function(l,A){this.updateCallbacks.push(function(){A?l.call(A):l()})}},{key:"flushUpdateCallback",value:function(){var l=this.updateCallbacks;if(l.length){var A=l.slice(0);this.updateCallbacks.length=0;for(var Y=0;Y-1?Xi(h,wa(Y.slice(0,ge)),wa(Y.slice(ge+1))):Y.length&&Xi(h,wa(Y),"")}}else if(Object(z.i)(I))for(var Fe=0,Xe=I.length;Fe0&&arguments[0]!==void 0?arguments[0]:"",I={href:"",origin:"",protocol:"",hostname:"",host:"",port:"",pathname:"",search:"",hash:""};if(!S||!Object(z.o)(S))return I;S=S.trim();var h=/^(([^:/?#]+):)?\/\/(([^/?#]+):(.+)@)?([^/?#:]*)(:(\d+))?([^?#]*)(\?([^#]*))?(#(.*))?/,_=S.match(h);return _&&(I.protocol=_[1]||"https:",I.hostname=_[6]||"taro.com",I.port=_[8]||"",I.pathname=_[9]||"/",I.search=_[10]||"",I.hash=_[12]||"",I.href=S,I.origin=I.protocol+"//"+I.hostname,I.host=I.hostname+(I.port?":".concat(I.port):"")),I}function bi(S,I){var h=/^(https?:)\/\//i,_="",l=null;if(!Object(z.p)(I)){if(I=String(I).trim(),!h.test(I))throw new TypeError("Failed to construct 'URL': Invalid base URL");l=Dr(I)}if(S=String(S).trim(),h.test(S))_=S;else if(l)S?S.startsWith("//")?_=l.protocol+S:_=l.origin+(S.startsWith("/")?S:"/".concat(S)):_=l.href;else throw new TypeError("Failed to construct 'URL': Invalid URL");return Dr(_)}var Ui=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){return Object(ee.a)(this,h),I.apply(this,arguments)}return Object(G.a)(h,[{key:"href",get:function(){var l;return(l=this.props.href)!==null&&l!==void 0?l:""},set:function(l){this.setAttribute("href",l)}},{key:"protocol",get:function(){var l;return(l=this.props.protocol)!==null&&l!==void 0?l:""}},{key:"host",get:function(){var l;return(l=this.props.host)!==null&&l!==void 0?l:""}},{key:"search",get:function(){var l;return(l=this.props.search)!==null&&l!==void 0?l:""}},{key:"hash",get:function(){var l;return(l=this.props.hash)!==null&&l!==void 0?l:""}},{key:"hostname",get:function(){var l;return(l=this.props.hostname)!==null&&l!==void 0?l:""}},{key:"port",get:function(){var l;return(l=this.props.port)!==null&&l!==void 0?l:""}},{key:"pathname",get:function(){var l;return(l=this.props.pathname)!==null&&l!==void 0?l:""}},{key:"setAttribute",value:function(l,A){if(l==="href"){var Y=Dr(A);for(var ge in Y)Object(p.a)(Object(j.a)(h.prototype),"setAttribute",this).call(this,ge,Y[ge])}else Object(p.a)(Object(j.a)(h.prototype),"setAttribute",this).call(this,l,A)}}]),h}(Sn),Ni=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){return Object(ee.a)(this,h),I.apply(this,arguments)}return Object(G.a)(h)}(Sn),Fa=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){var _;return Object(ee.a)(this,h),_=I.call(this),_.createEvent=Ko,_.nodeType=9,_.nodeName=Me,_}return Object(G.a)(h,[{key:"createElement",value:function(l){var A=l.toLowerCase(),Y;switch(!0){case A===re:return Y=new Sr,Y;case z.d.has(A):Y=new Qi;break;case A===F:Y=new Ui;break;case A===Je:Y=new Ni;break;default:Y=new Sn;break}return Y.nodeName=A,Y.tagName=l.toUpperCase(),Y}},{key:"createElementNS",value:function(l,A){return this.createElement(A)}},{key:"createTextNode",value:function(l){return new Ua(l)}},{key:"getElementById",value:function(l){var A=Vn.get(l);return Object(z.p)(A)?null:A}},{key:"querySelector",value:function(l){return/^#/.test(l)?this.getElementById(l.slice(1)):null}},{key:"querySelectorAll",value:function(){return[]}},{key:"createComment",value:function(){var l=new Ua("");return l.nodeName=bn,l}},{key:"defaultView",get:function(){return jn.window}}]),h}(Sn),da;if(Object(z.q)())da=jn.document;else{var za=function(){var I=new Fa,h=I.createElement.bind(I),_=h(be),l=h(Te),A=h(De),Y=h(Ee);Y.id=Ee;var ge=h(he);return I.appendChild(_),_.appendChild(l),_.appendChild(A),A.appendChild(ge),ge.appendChild(Y),I.documentElement=_,I.head=l,I.body=A,I};da=jn.document=za()}function Bn(S){return S.style}var or=z.g.call("getEventCenter",z.b),Tn=function(){function S(I){Object(ee.a)(this,S),this.cache=new Map,this.name=I}return Object(G.a)(S,[{key:"has",value:function(h){return this.cache.has(h)}},{key:"set",value:function(h,_){h&&_&&this.cache.set(h,_)}},{key:"get",value:function(h){if(this.has(h))return this.cache.get(h)}},{key:"delete",value:function(h){this.cache.delete(h)}}]),S}(),ji,Gn,dr,fr,zo,ko,Ho=new Tn("history"),mi=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(_,l){var A;return Object(ee.a)(this,h),A=I.call(this),ji.add(Object(T.a)(A)),Gn.set(Object(T.a)(A),void 0),dr.set(Object(T.a)(A),[]),fr.set(Object(T.a)(A),0),zo.set(Object(T.a)(A),void 0),Ht(Object(T.a)(A),zo,l.window,"f"),Ht(Object(T.a)(A),Gn,_,"f"),Ze(Object(T.a)(A),Gn,"f").on("__record_history__",function(Y){var ge;Ht(Object(T.a)(A),fr,(ge=Ze(Object(T.a)(A),fr,"f"),ge++,ge),"f"),Ht(Object(T.a)(A),dr,Ze(Object(T.a)(A),dr,"f").slice(0,Ze(Object(T.a)(A),fr,"f")),"f"),Ze(Object(T.a)(A),dr,"f").push({state:null,title:"",url:Y})},null),Ze(Object(T.a)(A),Gn,"f").on("__reset_history__",function(Y){Ze(Object(T.a)(A),ji,"m",ko).call(Object(T.a)(A),Y)},null),A.on(H.INIT,function(){Ze(Object(T.a)(A),ji,"m",ko).call(Object(T.a)(A))},null),A.on(H.RESTORE,function(Y){Ho.set(Y,{location:Ze(Object(T.a)(A),Gn,"f"),stack:Ze(Object(T.a)(A),dr,"f").slice(),cur:Ze(Object(T.a)(A),fr,"f")})},null),A.on(H.RECOVER,function(Y){if(Ho.has(Y)){var ge=Ho.get(Y);Ht(Object(T.a)(A),Gn,ge.location,"f"),Ht(Object(T.a)(A),dr,ge.stack,"f"),Ht(Object(T.a)(A),fr,ge.cur,"f")}},null),A.on(H.DESTORY,function(Y){Ho.delete(Y)},null),Ze(Object(T.a)(A),ji,"m",ko).call(Object(T.a)(A)),A}return Object(G.a)(h,[{key:"length",get:function(){return Ze(this,dr,"f").length}},{key:"state",get:function(){return Ze(this,dr,"f")[Ze(this,fr,"f")].state}},{key:"go",value:function(l){if(!(!Object(z.m)(l)||isNaN(l))){var A=Ze(this,fr,"f")+l;A=Math.min(Math.max(A,0),this.length-1),Ht(this,fr,A,"f"),Ze(this,Gn,"f").trigger("__set_href_without_history__",Ze(this,dr,"f")[Ze(this,fr,"f")].url),Ze(this,zo,"f").trigger("popstate",Ze(this,dr,"f")[Ze(this,fr,"f")])}}},{key:"back",value:function(){this.go(-1)}},{key:"forward",value:function(){this.go(1)}},{key:"pushState",value:function(l,A,Y){!Y||!Object(z.o)(Y)||(Ht(this,dr,Ze(this,dr,"f").slice(0,Ze(this,fr,"f")+1),"f"),Ze(this,dr,"f").push({state:l,title:A,url:Y}),Ht(this,fr,this.length-1,"f"),Ze(this,Gn,"f").trigger("__set_href_without_history__",Y))}},{key:"replaceState",value:function(l,A,Y){!Y||!Object(z.o)(Y)||(Ze(this,dr,"f")[Ze(this,fr,"f")]={state:l,title:A,url:Y},Ze(this,Gn,"f").trigger("__set_href_without_history__",Y))}},{key:"cache",get:function(){return Ho}}]),h}(z.b);Gn=new WeakMap,dr=new WeakMap,fr=new WeakMap,zo=new WeakMap,ji=new WeakSet,ko=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";Ht(this,dr,[{state:null,title:"",url:I||Ze(this,Gn,"f").href}],"f"),Ht(this,fr,0,"f")};var $n={app:null,router:null,page:null},ka=function(){return $n},tn,gn,Mr,Wi,Zi,pi,yo,Un,zn,wi="https://taro.com",Wr=new Tn("location"),Ha=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(_){var l;return Object(ee.a)(this,h),l=I.call(this),tn.add(Object(T.a)(l)),gn.set(Object(T.a)(l),new jr(wi)),Mr.set(Object(T.a)(l),!1),Wi.set(Object(T.a)(l),void 0),Ht(Object(T.a)(l),Wi,_.window,"f"),Ze(Object(T.a)(l),tn,"m",Zi).call(Object(T.a)(l)),l.on("__set_href_without_history__",function(A){Ht(Object(T.a)(l),Mr,!0,"f");var Y=Ze(Object(T.a)(l),gn,"f").hash;Ze(Object(T.a)(l),gn,"f").href=Vo(A),Y!==Ze(Object(T.a)(l),gn,"f").hash&&Ze(Object(T.a)(l),Wi,"f").trigger("hashchange"),Ht(Object(T.a)(l),Mr,!1,"f")},null),l.on(H.INIT,function(){Ze(Object(T.a)(l),tn,"m",Zi).call(Object(T.a)(l))},null),l.on(H.RESTORE,function(A){Wr.set(A,{lastHref:l.href})},null),l.on(H.RECOVER,function(A){if(Wr.has(A)){var Y=Wr.get(A);Ht(Object(T.a)(l),Mr,!0,"f"),Ze(Object(T.a)(l),gn,"f").href=Y.lastHref,Ht(Object(T.a)(l),Mr,!1,"f")}},null),l.on(H.DESTORY,function(A){Wr.delete(A)},null),l}return Object(G.a)(h,[{key:"protocol",get:function(){return Ze(this,gn,"f").protocol},set:function(l){var A=/^(http|https):$/i;if(!(!l||!Object(z.o)(l)||!A.test(l.trim()))){l=l.trim();var Y=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").protocol=l,Ze(this,tn,"m",zn).call(this,Y)&&Ze(this,tn,"m",Un).call(this)}}},{key:"host",get:function(){return Ze(this,gn,"f").host},set:function(l){if(!(!l||!Object(z.o)(l))){l=l.trim();var A=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").host=l,Ze(this,tn,"m",zn).call(this,A)&&Ze(this,tn,"m",Un).call(this)}}},{key:"hostname",get:function(){return Ze(this,gn,"f").hostname},set:function(l){if(!(!l||!Object(z.o)(l))){l=l.trim();var A=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").hostname=l,Ze(this,tn,"m",zn).call(this,A)&&Ze(this,tn,"m",Un).call(this)}}},{key:"port",get:function(){return Ze(this,gn,"f").port},set:function(l){var A=Number(l=l.trim());if(!(!Object(z.m)(A)||A<=0)){var Y=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").port=l,Ze(this,tn,"m",zn).call(this,Y)&&Ze(this,tn,"m",Un).call(this)}}},{key:"pathname",get:function(){return Ze(this,gn,"f").pathname},set:function(l){if(!(!l||!Object(z.o)(l))){l=l.trim();var A=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").pathname=l,Ze(this,tn,"m",zn).call(this,A)&&Ze(this,tn,"m",Un).call(this)}}},{key:"search",get:function(){return Ze(this,gn,"f").search},set:function(l){if(!(!l||!Object(z.o)(l))){l=l.trim(),l=l.startsWith("?")?l:"?".concat(l);var A=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").search=l,Ze(this,tn,"m",zn).call(this,A)&&Ze(this,tn,"m",Un).call(this)}}},{key:"hash",get:function(){return Ze(this,gn,"f").hash},set:function(l){if(!(!l||!Object(z.o)(l))){l=l.trim(),l=l.startsWith("#")?l:"#".concat(l);var A=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").hash=l,Ze(this,tn,"m",zn).call(this,A)&&Ze(this,tn,"m",Un).call(this)}}},{key:"href",get:function(){return Ze(this,gn,"f").href},set:function(l){var A=/^(http:|https:)?\/\/.+/;if(!(!l||!Object(z.o)(l)||!A.test(l=l.trim()))){var Y=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").href=l,Ze(this,tn,"m",zn).call(this,Y)&&Ze(this,tn,"m",Un).call(this)}}},{key:"origin",get:function(){return Ze(this,gn,"f").origin},set:function(l){var A=/^(http:|https:)?\/\/.+/;if(!(!l||!Object(z.o)(l)||!A.test(l=l.trim()))){var Y=Ze(this,tn,"m",pi).call(this);Ze(this,gn,"f").origin=l,Ze(this,tn,"m",zn).call(this,Y)&&Ze(this,tn,"m",Un).call(this)}}},{key:"assign",value:function(){Object(z.x)(!0,"\u5C0F\u7A0B\u5E8F\u73AF\u5883\u4E2D\u8C03\u7528location.assign()\u65E0\u6548.")}},{key:"reload",value:function(){Object(z.x)(!0,"\u5C0F\u7A0B\u5E8F\u73AF\u5883\u4E2D\u8C03\u7528location.reload()\u65E0\u6548.")}},{key:"replace",value:function(l){this.trigger("__set_href_without_history__",l)}},{key:"toString",value:function(){return this.href}},{key:"cache",get:function(){return Wr}}]),h}(z.b);gn=new WeakMap,Mr=new WeakMap,Wi=new WeakMap,tn=new WeakSet,Zi=function(){var I=ka(),h=I.router;if(h){var _=h.path,l=h.params,A=Object.keys(l).map(function(Fe){return"".concat(Fe,"=").concat(l[Fe])}),Y=A.length>0?"?"+A.join("&"):"",ge="".concat(wi).concat(_.startsWith("/")?_:"/"+_).concat(Y);Ht(this,gn,new jr(ge),"f"),this.trigger("__reset_history__",this.href)}},pi=function(){return Ze(this,gn,"f")._toRaw()},yo=function(I){Ze(this,gn,"f").href=I},Un=function(){this.trigger("__record_history__",this.href)},zn=function(I){if(Ze(this,Mr,"f"))return!1;var h=Ze(this,gn,"f")._toRaw(),_=h.protocol,l=h.hostname,A=h.port,Y=h.pathname,ge=h.search,Fe=h.hash;return _!==I.protocol||l!==I.hostname||A!==I.port?(Ze(this,tn,"m",yo).call(this,I.href),!1):Y!==I.pathname||ge!==I.search?!0:Fe!==I.hash?(Ze(this,Wi,"f").trigger("hashchange"),!0):(Ze(this,tn,"m",yo).call(this,I.href),!1)};function Vo(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",I=wi;return/^[/?#]/.test(S)?I+S:S}var Ns="Macintosh",os="Intel Mac OS X 10_14_5",Nn="AppleWebKit/534.36 (KHTML, like Gecko) NodeJS/v4.1.0 Chrome/76.0.3809.132 Safari/534.36",ve="("+Ns+"; "+os+") "+Nn,Ye=Object(z.q)()?jn.window.navigator:{appCodeName:"Mozilla",appName:"Netscape",appVersion:"5.0 "+ve,cookieEnabled:!0,mimeTypes:[],onLine:!0,platform:"MacIntel",plugins:[],product:"Taro",productSub:"20030107",userAgent:"Mozilla/5.0 "+ve,vendor:"Joyent",vendorSub:""},we;(function(){var S;typeof performance!="undefined"&&performance!==null&&performance.now?we=function(){return performance.now()}:Date.now?(S=Date.now(),we=function(){return Date.now()-S}):(S=new Date().getTime(),we=function(){return new Date().getTime()-S})})();var Ot=0,Mt=typeof y!="undefined"&&y!==null?y:function(S){var I=we(),h=Math.max(Ot+16,I);return setTimeout(function(){S(Ot=h)},h-I)},an=typeof u!="undefined"&&u!==null?u:function(S){clearTimeout(S)},zt;if(Object(z.q)())zt=jn.window;else{var Xt=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){var _;Object(ee.a)(this,h),_=I.call(this),_.navigator=Ye,_.requestAnimationFrame=Mt,_.cancelAnimationFrame=an,_.getComputedStyle=Bn;var l=[].concat(Object($.a)(Object.getOwnPropertyNames(U||{})),Object($.a)(Object.getOwnPropertySymbols(U||{})));return l.forEach(function(A){if(!(A==="atob"||A==="document")&&!Object.prototype.hasOwnProperty.call(Object(T.a)(_),A))try{_[A]=U[A]}catch(Y){console.warn("[Taro warn] window.".concat(String(A)," \u5728\u8D4B\u503C\u5230 window \u65F6\u62A5\u9519"))}}),_.Date||(_.Date=Date),_.location=new Ha({window:Object(T.a)(_)}),_.history=new mi(_.location,{window:Object(T.a)(_)}),_.initEvent(),_}return Object(G.a)(h,[{key:"initEvent",value:function(){var l=this.location,A=this.history;this.on(H.INIT,function(Y){l.trigger(H.INIT,Y)},null),this.on(H.RECOVER,function(Y){l.trigger(H.RECOVER,Y),A.trigger(H.RECOVER,Y)},null),this.on(H.RESTORE,function(Y){l.trigger(H.RESTORE,Y),A.trigger(H.RESTORE,Y)},null),this.on(H.DESTORY,function(Y){l.trigger(H.DESTORY,Y),A.trigger(H.DESTORY,Y)},null)}},{key:"document",get:function(){return jn.document}},{key:"addEventListener",value:function(l,A){Object(z.o)(l)&&this.on(l,A,null)}},{key:"removeEventListener",value:function(l,A){Object(z.o)(l)&&this.off(l,A,null)}},{key:"setTimeout",value:function(_){function l(){return _.apply(this,arguments)}return l.toString=function(){return _.toString()},l}(function(){return setTimeout.apply(void 0,arguments)})},{key:"clearTimeout",value:function(_){function l(){return _.apply(this,arguments)}return l.toString=function(){return _.toString()},l}(function(){return clearTimeout.apply(void 0,arguments)})}]),h}(z.b);zt=jn.window=new Xt}var Xn=zt.location,Va=zt.history,Pr=function(S){Object(Z.a)(h,S);var I=Object(Q.a)(h);function h(){return Object(ee.a)(this,h),I.apply(this,arguments)}return Object(G.a)(h)}(Sn),Ir=new Map,as=vt(),An=Object(z.q)();function Go(S,I){z.g.call("mergePageInstance",Ir.get(I),S),Ir.set(I,S)}function Yo(S){return Ir.get(S)}function yn(S){Ir.delete(S)}function Pi(S){return S==null?"":S.charAt(0)==="/"?S:"/"+S}function Zn(S,I){for(var h=arguments.length,_=new Array(h>2?h-2:0),l=2;l-1?S.substring(0,h):S).concat(ri(I!=null&&I.stamp?{stamp:I.stamp}:{})):"".concat(h>-1?S.substring(0,h):S).concat(ri(I))}function fa(S){return S+"."+Ne}function ss(S){return S+"."+Se}function Qo(S){return S+"."+st}function Ki(S,I,h,_){var l,A=I!=null?I:"taro_page_".concat(as()),Y=Object(b.a)(z.g.call("getMiniLifecycleImpl").page,7),ge=Y[0],Fe=Y[1],Xe=Y[2],_t=Y[3],yt=Y[4],It=Y[5],fn=Y[6],en=null,En=!1,mn=[];function Qt(Yt){var ar=An?Yt.$taroPath:Yt.route||Yt.__route__||Yt.$taroPath;$n.router={params:Yt.$taroParams,path:Pi(ar),$taroPath:Yt.$taroPath,onReady:fa(A),onShow:ss(A),onHide:Qo(A)},Object(z.p)(Yt.exitState)||($n.router.exitState=Yt.exitState)}var Pn,Zr,xr=(l={},Object(w.a)(l,ge,function(){var Yt=this,ar=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Cr=arguments.length>1?arguments[1]:void 0;Zr=new Promise(function(mr){Pn=mr}),Rn.start(J),$n.page=this,this.config=_||{};var wr=Object.assign({},ar,{$taroTimestamp:Date.now()}),Lr=this.$taroPath=Eo(A,wr);An&&(xr.path=Lr),this.$taroParams==null&&(this.$taroParams=wr),Qt(this),An||zt.trigger(H.INIT,Lr);var Tr=function(){$n.app.mount(S,Lr,function(){en=jn.document.getElementById(Lr),Object(z.e)(en!==null,"\u6CA1\u6709\u627E\u5230\u9875\u9762\u5B9E\u4F8B\u3002"),Zn(Lr,Qe,Yt.$taroParams),Pn(),An?Object(z.k)(Cr)&&Cr():(en.ctx=Yt,en.performUpdate(!0,Cr))})};En?mn.push(Tr):Tr()}),Object(w.a)(l,Fe,function(){var Yt=this.$taroPath;An||zt.trigger(H.DESTORY,Yt),Zn(Yt,Fe),En=!0,$n.app.unmount(Yt,function(){En=!1,Ir.delete(Yt),en&&(en.ctx=null,en=null),mn.length&&(mn.forEach(function(ar){return ar()}),mn=[])})}),Object(w.a)(l,Xe,function(){var Yt=this;Zr.then(function(){Zn(Yt.$taroPath,Ne),Mt(function(){return or.trigger(fa(A))}),Yt.onReady.called=!0})}),Object(w.a)(l,_t,function(){var Yt=this,ar=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zr.then(function(){$n.page=Yt,Qt(Yt),An||zt.trigger(H.RECOVER,Yt.$taroPath),Zn(Yt.$taroPath,Se,ar),Mt(function(){return or.trigger(ss(A))})})}),Object(w.a)(l,yt,function(){An||zt.trigger(H.RESTORE,this.$taroPath),$n.page===this&&($n.page=null,$n.router=null),Zn(this.$taroPath,st),or.trigger(Qo(A))}),l);return It.forEach(function(Yt){xr[Yt]=function(){return Zn.apply(void 0,[this.$taroPath,Yt].concat(Array.prototype.slice.call(arguments)))}}),fn.forEach(function(Yt){var ar;(S[Yt]||!((ar=S.prototype)===null||ar===void 0)&&ar[Yt]||S[Yt.replace(/^on/,"enable")])&&(xr[Yt]=function(){for(var Cr,wr=arguments.length,Lr=new Array(wr),Tr=0;Tr1?At-1:0),Ft=1;Ft1?hn-1:0),Sn=1;Sndt?1:-1:At?-1:St||ht>=dt?1:-1}).forEach(function(ht,dt){var gt={_num:String(dt)};Object.keys(Ue[ht]).filter(function(At){return!/^bind/.test(At)&&!["focus","blur"].includes(At)}).sort().forEach(function(At,St){gt[ot(At)]="p"+St}),nt[ze(ht)]=gt}),nt}function mt(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"weapp",nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Se.MINI;Object.keys(st).includes(Ue)&&(nt=Ue);var ct=st[nt]||{};return ct.type||nt}function lo(Ue,nt){var ct=nt||lt,xt=Object.keys(Ue);xt.forEach(function(ht){ct.tap(ht,Ue[ht])})}function ti(Ue){return function(){console.warn("\u5C0F\u7A0B\u5E8F\u6682\u4E0D\u652F\u6301 ".concat(Ue))}}function Gi(Ue,nt){var ct="__key_",xt=["navigateTo","redirectTo","reLaunch","switchTab"];if(xt.indexOf(Ue)>-1){var ht=nt.url=nt.url||"",dt=ht.indexOf("?")>-1,gt=Yr();nt.url+=(dt?"&":"?")+"".concat(ct,"=").concat(gt)}}function No(Ue,nt){return Ue.split(` +`).map(function(ct,xt){var ht=xt===0?"":Array(nt).fill(" ").join("");return ht+ct}).join(` +`)}var Wo=new Set(["addPhoneContact","authorize","canvasGetImageData","canvasPutImageData","canvasToTempFilePath","checkSession","chooseAddress","chooseImage","chooseInvoiceTitle","chooseLocation","chooseVideo","clearStorage","closeBLEConnection","closeBluetoothAdapter","closeSocket","compressImage","connectSocket","createBLEConnection","downloadFile","exitMiniProgram","getAvailableAudioSources","getBLEDeviceCharacteristics","getBLEDeviceServices","getBatteryInfo","getBeacons","getBluetoothAdapterState","getBluetoothDevices","getClipboardData","getConnectedBluetoothDevices","getConnectedWifi","getExtConfig","getFileInfo","getImageInfo","getLocation","getNetworkType","getSavedFileInfo","getSavedFileList","getScreenBrightness","getSetting","getStorage","getStorageInfo","getSystemInfo","getUserInfo","getWifiList","hideHomeButton","hideShareMenu","hideTabBar","hideTabBarRedDot","loadFontFace","login","makePhoneCall","navigateBack","navigateBackMiniProgram","navigateTo","navigateToBookshelf","navigateToMiniProgram","notifyBLECharacteristicValueChange","hideKeyboard","hideLoading","hideNavigationBarLoading","hideToast","openBluetoothAdapter","openDocument","openLocation","openSetting","pageScrollTo","previewImage","queryBookshelf","reLaunch","readBLECharacteristicValue","redirectTo","removeSavedFile","removeStorage","removeTabBarBadge","requestSubscribeMessage","saveFile","saveImageToPhotosAlbum","saveVideoToPhotosAlbum","scanCode","sendSocketMessage","setBackgroundColor","setBackgroundTextStyle","setClipboardData","setEnableDebug","setInnerAudioOption","setKeepScreenOn","setNavigationBarColor","setNavigationBarTitle","setScreenBrightness","setStorage","setTabBarBadge","setTabBarItem","setTabBarStyle","showActionSheet","showFavoriteGuide","showLoading","showModal","showShareMenu","showTabBar","showTabBarRedDot","showToast","startBeaconDiscovery","startBluetoothDevicesDiscovery","startDeviceMotionListening","startPullDownRefresh","stopBeaconDiscovery","stopBluetoothDevicesDiscovery","stopCompass","startCompass","startAccelerometer","stopAccelerometer","showNavigationBarLoading","stopDeviceMotionListening","stopPullDownRefresh","switchTab","uploadFile","vibrateLong","vibrateShort","writeBLECharacteristicValue"]);function li(Ue){return function(){var nt,ct=(nt=Ue.getSystemInfoSync)===null||nt===void 0?void 0:nt.call(Ue);if(!ct)return console.error("\u4E0D\u652F\u6301 API canIUseWebp"),!1;var xt=ct.platform,ht=xt.toLowerCase();return ht==="android"||ht==="devtools"}}function co(Ue){return function(ct){ct=ct?m(ct)?{url:ct}:ct:{};var xt=ct.success,ht=ct.fail,dt=ct.complete,gt,At=new Promise(function(St,Ft){ct.success=function(Nt){xt&&xt(Nt),St(Nt)},ct.fail=function(Nt){ht&&ht(Nt),Ft(Nt)},ct.complete=function(Nt){dt&&dt(Nt)},gt=Ue.request(ct)});return fo(gt,At),At.abort=function(St){return St&&St(),gt&>.abort(),At},At}}function Yi(Ue,nt){var ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},xt=ct.needPromiseApis||[],ht=new Set([].concat(Object(g.a)(xt),Object(g.a)(Wo))),dt=["getEnv","interceptors","Current","getCurrentInstance","options","nextTick","eventCenter","Events","preload","webpackJsonp"],gt=new Set(ct.isOnlyPromisify?xt:Object.keys(nt).filter(function(At){return dt.indexOf(At)===-1}));ct.modifyApis&&ct.modifyApis(gt),gt.forEach(function(At){if(ht.has(At)){var St=At;Ue[St]=function(){for(var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Fn=arguments.length,hn=new Array(Fn>1?Fn-1:0),ni=1;ni2&&arguments[2]!==void 0?arguments[2]:{};Ue.canIUseWebp=li(Ue),Ue.getCurrentPages=getCurrentPages||ti("getCurrentPages"),Ue.getApp=getApp||ti("getApp"),Ue.env=nt.env||{};try{Ue.requirePlugin=requirePlugin||ti("requirePlugin")}catch(gt){Ue.requirePlugin=ti("requirePlugin")}var xt=ct.request||co(nt);function ht(gt){return xt(gt.requestParams)}var dt=new Ue.Link(ht);Ue.request=dt.request.bind(dt),Ue.addInterceptor=dt.addInterceptor.bind(dt),Ue.cleanInterceptors=dt.cleanInterceptors.bind(dt),Ue.miniGlobal=Ue.options.miniGlobal=nt,Ue.getAppInfo=function(){return{platform:"mini",taroVersion:"3.6.7",designWidth:Ue.config.designWidth}}}function fo(Ue,nt){if(!(!Ue||!nt)){var ct=["abort","onHeadersReceived","offHeadersReceived","onProgressUpdate","offProgressUpdate","onChunkReceived","offChunkReceived"];Ue&&ct.forEach(function(xt){xt in Ue&&(nt[xt]=Ue[xt].bind(Ue))})}}},"./node_modules/@tarojs/taro/index.js":function(P,f,i){var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),v=g.hooks,y=i("./node_modules/@tarojs/api/dist/index.esm.js").default;v.isExist("initNativeApi")&&v.call("initNativeApi",y),P.exports=y,P.exports.default=P.exports}}])});var kc=Bo(()=>{wc();Kc();Fc();zc();(ty.webpackJsonp=ty.webpackJsonp||[]).push([["app"],{"./node_modules/@tuya-fe/taro-plugin-platform-tuya/dist/runtime.js":function(P,f,i){"use strict";var g=i("./node_modules/@tarojs/shared/dist/shared.esm.js"),v=new Set([]),y=new Set(["apiRequestByAtop"]),u={previewImage:{options:{set:[{key:"current",value:function(Q){return Q.urls.indexOf(Q.current||Q.urls[0])}}]}}};function U(Z,Q,ce){if(Z==="getStorageSync"){var $=ce[0];return $!=null?Q[Z]({key:$}):console.error("getStorageSync \u4F20\u5165\u53C2\u6570\u9519\u8BEF")}if(Z==="setStorageSync"){var ee=ce[0],G=ce[1];return ee!=null?Q[Z]({key:ee,data:G}):console.error("setStorageSync \u4F20\u5165\u53C2\u6570\u9519\u8BEF")}if(Z==="removeStorageSync"){var z=ce[0];return z!=null?Q[Z]({key:z}):console.error("removeStorageSync \u4F20\u5165\u53C2\u6570\u9519\u8BEF")}return Q[Z].apply(Q,ce)}function B(Z,Q){var ce=Z;return Object.keys(u).forEach(function($){var ee=u[$];if(Z===$&&(ee.alias&&(ce=ee.alias),ee.options)){var G=ee.options.change,z=ee.options.set;G&&G.forEach(function(ue){Q[ue.new]=Q[ue.old]}),z&&z.forEach(function(ue){Q[ue.key]=typeof ue.value=="function"?ue.value(Q):ue.value})}}),{key:ce,options:Q}}function b(Z){ty&&ty.map&&Object.keys(ty.map).forEach(function(Q){return ty[Q]=ty.map[Q]}),Object(g.u)(Z,ty,{noPromiseApis:v,needPromiseApis:y,handleSyncApis:U,transformMeta:B})}var p="false",M="true",j="",R="0",T={Map:{polygons:"[]",subkey:j,rotate:R,skew:R,"max-scale":"19","min-scale":"4","enable-3D":p,"show-compass":p,"show-scale":p,"enable-overlooking":p,"enable-zoom":M,"enable-scroll":M,"enable-rotate":p,"enable-satellite":p,"enable-traffic":p,setting:"[]",bindLabelTap:j,bindRegionChange:j,bindPoiTap:j},ScrollView:{"enable-flex":p,"scroll-anchoring":p,"refresher-enabled":p,"refresher-threshold":"45","refresher-default-style":"'black'","refresher-background":"'#FFF'","refresher-triggered":p,enhanced:p,bounces:M,"show-scrollbar":M,"paging-enabled":p,"fast-deceleration":p,bindDragStart:j,bindDragging:j,bindDragEnd:j,bindRefresherPulling:j,bindRefresherRefresh:j,bindRefresherRestore:j,bindRefresherAbort:j}},w={initNativeApi:b};Object(g.s)(w),Object(g.r)(T)},"./node_modules/babel-loader/lib/index.js!./src/app.ts":function(P,f,i){"use strict";var g=i("./node_modules/react/cjs/react.production.min.js"),v=i.n(g),y=i("./node_modules/@tarojs/taro/index.js"),u=i.n(y),U=i("./src/config/globalData/index.ts"),B=i("./src/utils/getLanguage.ts"),b=i("./node_modules/taro-ui/dist/style/index.scss"),p=i.n(b),M=i("./src/app.scss"),j=i.n(M);function R(T){var w=T.children;return Object(y.useLaunch)(function(){console.log("App launched."),Object(B.a)()}),Object(g.useEffect)(function(){try{ty.getNetworkType({success:function(Q){console.log("getNetworkType: ",Q),Object(U.c)(U.a.IS_ONLINE,Q.networkType!=="none")}}),ty.onNetworkStatusChange(function(Z){console.log("onNetworkStatusChange: ",Z),Object(U.c)(U.a.IS_ONLINE,Z.networkType!=="none")})}catch(Z){console.log(Z)}},[]),Object(y.usePageNotFound)(function(){u.a.redirectTo({url:"pages/index/index"})}),w}f.a=R},"./node_modules/process/browser.js":function(P,f){var i=P.exports={},g,v;function y(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=y}catch(Q){g=y}try{typeof clearTimeout=="function"?v=clearTimeout:v=u}catch(Q){v=u}})();function U(Q){if(g===setTimeout)return setTimeout(Q,0);if((g===y||!g)&&setTimeout)return g=setTimeout,setTimeout(Q,0);try{return g(Q,0)}catch(ce){try{return g.call(null,Q,0)}catch($){return g.call(this,Q,0)}}}function B(Q){if(v===clearTimeout)return clearTimeout(Q);if((v===u||!v)&&clearTimeout)return v=clearTimeout,clearTimeout(Q);try{return v(Q)}catch(ce){try{return v.call(null,Q)}catch($){return v.call(this,Q)}}}var b=[],p=!1,M,j=-1;function R(){!p||!M||(p=!1,M.length?b=M.concat(b):j=-1,b.length&&T())}function T(){if(!p){var Q=U(R);p=!0;for(var ce=b.length;ce;){for(M=b,b=[];++j1)for(var $=1;$ye||c[X]!==O[ye]){var Ve=` +`+c[X].replace(" at new "," at ");return t.displayName&&Ve.includes("")&&(Ve=Ve.replace("",t.displayName)),Ve}while(1<=X&&0<=ye);break}}}finally{fo=!1,Error.prepareStackTrace=o}return(t=t?t.displayName||t.name:"")?Qr(t):""}var nt=Object.prototype.hasOwnProperty,ct=[],xt=-1;function ht(t){return{current:t}}function dt(t){0>xt||(t.current=ct[xt],ct[xt]=null,xt--)}function gt(t,n){xt++,ct[xt]=t.current,t.current=n}var At={},St=ht(At),Ft=ht(!1),Nt=At;function Fn(t,n){var o=t.type.contextTypes;if(!o)return At;var s=t.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var c={},O;for(O in o)c[O]=n[O];return s&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=n,t.__reactInternalMemoizedMaskedChildContext=c),c}function hn(t){return t=t.childContextTypes,t!=null}function ni(){dt(Ft),dt(St)}function Sn(t,n,o){if(St.current!==At)throw Error(b(168));gt(St,n),gt(Ft,o)}function Dn(t,n,o){var s=t.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var c in s)if(!(c in n))throw Error(b(108,be(t)||"Unknown",c));return B({},o,s)}function Qn(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||At,Nt=St.current,gt(St,t),gt(Ft,Ft.current),!0}function Jr(t,n,o){var s=t.stateNode;if(!s)throw Error(b(169));o?(t=Dn(t,n,Nt),s.__reactInternalMemoizedMergedChildContext=t,dt(Ft),dt(St),gt(St,t)):dt(Ft),gt(Ft,o)}var Hn=Math.clz32?Math.clz32:yr,vr=Math.log,ua=Math.LN2;function yr(t){return t>>>=0,t===0?32:31-(vr(t)/ua|0)|0}var cr=64,ci=4194304;function mo(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Mi(t,n){var o=t.pendingLanes;if(o===0)return 0;var s=0,c=t.suspendedLanes,O=t.pingedLanes,X=o&268435455;if(X!==0){var ye=X&~c;ye!==0?s=mo(ye):(O&=X,O!==0&&(s=mo(O)))}else X=o&~c,X!==0?s=mo(X):O!==0&&(s=mo(O));if(s===0)return 0;if(n!==0&&n!==s&&!(n&c)&&(c=s&-s,O=n&-n,c>=O||c===16&&(O&4194240)!==0))return n;if(s&4&&(s|=o&16),n=t.entangledLanes,n!==0)for(t=t.entanglements,n&=s;0o;o++)n.push(t);return n}function po(t,n,o){t.pendingLanes|=n,n!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,n=31-Hn(n),t[n]=o}function Ls(t,n){var o=t.pendingLanes&~n;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=n,t.mutableReadLanes&=n,t.entangledLanes&=n,n=t.entanglements;var s=t.eventTimes;for(t=t.expirationTimes;0>=X,c-=X,bi=1<<32-Hn(n)+c|o<xn?(kn=qt,qt=null):kn=qt.sibling;var vn=Wt(We,qt,ke[xn],bt);if(vn===null){qt===null&&(qt=kn);break}t&&qt&&vn.alternate===null&&n(We,qt),Oe=O(vn,Oe,xn),nn===null?Rt=vn:nn.sibling=vn,nn=vn,qt=kn}if(xn===ke.length)return o(We,qt),Tn&&Ni(We,xn),Rt;if(qt===null){for(;xnxn?(kn=qt,qt=null):kn=qt.sibling;var ao=Wt(We,qt,vn.value,bt);if(ao===null){qt===null&&(qt=kn);break}t&&qt&&ao.alternate===null&&n(We,qt),Oe=O(ao,Oe,xn),nn===null?Rt=ao:nn.sibling=ao,nn=ao,qt=kn}if(vn.done)return o(We,qt),Tn&&Ni(We,xn),Rt;if(qt===null){for(;!vn.done;xn++,vn=ke.next())vn=Zt(We,vn.value,bt),vn!==null&&(Oe=O(vn,Oe,xn),nn===null?Rt=vn:nn.sibling=vn,nn=vn);return Tn&&Ni(We,xn),Rt}for(qt=s(We,qt);!vn.done;xn++,vn=ke.next())vn=Mn(qt,We,xn,vn.value,bt),vn!==null&&(t&&vn.alternate!==null&&qt.delete(vn.key===null?xn:vn.key),Oe=O(vn,Oe,xn),nn===null?Rt=vn:nn.sibling=vn,nn=vn);return t&&qt.forEach(function(Au){return n(We,Au)}),Tn&&Ni(We,xn),Rt}function Ti(We,Oe,ke,bt){if(typeof ke=="object"&&ke!==null&&ke.type===R&&ke.key===null&&(ke=ke.props.children),typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case M:e:{for(var Rt=ke.key,nn=Oe;nn!==null;){if(nn.key===Rt){if(Rt=ke.type,Rt===R){if(nn.tag===7){o(We,nn.sibling),Oe=c(nn,ke.props.children),Oe.return=We,We=Oe;break e}}else if(nn.elementType===Rt||typeof Rt=="object"&&Rt!==null&&Rt.$$typeof===z&&Mr(Rt)===nn.type){o(We,nn.sibling),Oe=c(nn,ke.props),Oe.ref=tn(We,nn,ke),Oe.return=We,We=Oe;break e}o(We,nn);break}else n(We,nn);nn=nn.sibling}ke.type===R?(Oe=Oa(ke.props.children,We.mode,bt,ke.key),Oe.return=We,We=Oe):(bt=js(ke.type,ke.key,ke.props,null,We.mode,bt),bt.ref=tn(We,Oe,ke),bt.return=We,We=bt)}return X(We);case j:e:{for(nn=ke.key;Oe!==null;){if(Oe.key===nn)if(Oe.tag===4&&Oe.stateNode.containerInfo===ke.containerInfo&&Oe.stateNode.implementation===ke.implementation){o(We,Oe.sibling),Oe=c(Oe,ke.children||[]),Oe.return=We,We=Oe;break e}else{o(We,Oe);break}else n(We,Oe);Oe=Oe.sibling}Oe=kr(ke,We.mode,bt),Oe.return=We,We=Oe}return X(We);case z:return nn=ke._init,Ti(We,Oe,nn(ke._payload),bt)}if(Re(ke))return Lt(We,Oe,ke,bt);if(J(ke))return Ar(We,Oe,ke,bt);gn(We,ke)}return typeof ke=="string"&&ke!==""||typeof ke=="number"?(ke=""+ke,Oe!==null&&Oe.tag===6?(o(We,Oe.sibling),Oe=c(Oe,ke),Oe.return=We,We=Oe):(o(We,Oe),Oe=tu(ke,We.mode,bt),Oe.return=We,We=Oe),X(We)):o(We,Oe)}return Ti}var Zi=Wi(!0),pi=Wi(!1),yo={},Un=ht(yo),zn=ht(yo),wi=ht(yo);function Wr(t){if(t===yo)throw Error(b(174));return t}function Ha(t,n){gt(wi,n),gt(zn,t),gt(Un,yo),t=q(n),dt(Un),gt(Un,t)}function Vo(){dt(Un),dt(zn),dt(wi)}function Ns(t){var n=Wr(wi.current),o=Wr(Un.current);n=te(o,t.type,n),o!==n&&(gt(zn,t),gt(Un,n))}function os(t){zn.current===t&&(dt(Un),dt(zn))}var Nn=ht(0);function ve(t){for(var n=t;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||jn(o)||gr(o)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ye=[];function we(){for(var t=0;to?o:4,t(!0);var s=Mt.transition;Mt.transition={};try{t(!1),n()}finally{_n=o,Mt.transition=s}}function En(){return Zn().memoizedState}function mn(t,n,o){var s=Ao(t);o={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null},Pn(t)?Zr(n,o):(xr(t,n,o),o=Nr(),t=oi(t,s,o),t!==null&&Yt(t,n,s))}function Qt(t,n,o){var s=Ao(t),c={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null};if(Pn(t))Zr(n,c);else{xr(t,n,c);var O=t.alternate;if(t.lanes===0&&(O===null||O.lanes===0)&&(O=n.lastRenderedReducer,O!==null))try{var X=n.lastRenderedState,ye=O(X,o);if(c.hasEagerState=!0,c.eagerState=ye,ln(ye,X))return}catch(Ve){}finally{}o=Nr(),t=oi(t,s,o),t!==null&&Yt(t,n,s)}}function Pn(t){var n=t.alternate;return t===zt||n!==null&&n===zt}function Zr(t,n){Pr=Va=!0;var o=t.pending;o===null?n.next=n:(n.next=o.next,o.next=n),t.pending=n}function xr(t,n,o){er!==null&&t.mode&1&&!($t&2)?(t=n.interleaved,t===null?(o.next=o,Rn===null?Rn=[n]:Rn.push(n)):(o.next=t.next,t.next=o),n.interleaved=o):(t=n.pending,t===null?o.next=o:(o.next=t.next,t.next=o),n.pending=o)}function Yt(t,n,o){if(o&4194240){var s=n.lanes;s&=t.pendingLanes,o|=s,n.lanes=o,Aa(t,o)}}var ar={readContext:Xr,useCallback:An,useContext:An,useEffect:An,useImperativeHandle:An,useInsertionEffect:An,useLayoutEffect:An,useMemo:An,useReducer:An,useRef:An,useState:An,useDebugValue:An,useDeferredValue:An,useTransition:An,useMutableSource:An,useSyncExternalStore:An,useId:An,unstable_isNewReconciler:!1},Cr={readContext:Xr,useCallback:function(t,n){return Pi().memoizedState=[t,n===void 0?null:n],t},useContext:Xr,useEffect:A,useImperativeHandle:function(t,n,o){return o=o!=null?o.concat([t]):null,_(4194308,4,Xe.bind(null,n,t),o)},useLayoutEffect:function(t,n){return _(4194308,4,t,n)},useInsertionEffect:function(t,n){return _(4,2,t,n)},useMemo:function(t,n){var o=Pi();return n=n===void 0?null:n,t=t(),o.memoizedState=[t,n],t},useReducer:function(t,n,o){var s=Pi();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},s.queue=t,t=t.dispatch=mn.bind(null,zt,t),[s.memoizedState,t]},useRef:function(t){var n=Pi();return t={current:t},n.memoizedState=t},useState:S,useDebugValue:yt,useDeferredValue:function(t){var n=S(t),o=n[0],s=n[1];return A(function(){var c=Mt.transition;Mt.transition={};try{s(t)}finally{Mt.transition=c}},[t]),o},useTransition:function(){var t=S(!1),n=t[0];return t=en.bind(null,t[1]),Pi().memoizedState=t,[n,t]},useMutableSource:function(){},useSyncExternalStore:function(t,n,o){var s=zt,c=Pi();if(Tn){if(o===void 0)throw Error(b(407));o=o()}else{if(o=n(),er===null)throw Error(b(349));an&30||Ki(s,n,o)}c.memoizedState=o;var O={value:o,getSnapshot:n};return c.queue=O,A(us.bind(null,s,O,t),[t]),s.flags|=2048,I(9,ma.bind(null,s,O,o,n),void 0,null),o},useId:function(){var t=Pi(),n=er.identifierPrefix;if(Tn){var o=Ui,s=bi;o=(s&~(1<<32-Hn(s)-1)).toString(32)+o,n=":"+n+"R"+o,o=Ir++,0gu&&(n.flags|=128,s=!0,Xo(c,!1),n.lanes=4194304)}else{if(!s)if(t=ve(O),t!==null){if(n.flags|=128,s=!0,t=t.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),Xo(c,!0),c.tail===null&&c.tailMode==="hidden"&&!O.alternate&&!Tn)return Kn(n),null}else 2*nr()-c.renderingStartTime>gu&&o!==1073741824&&(n.flags|=128,s=!0,Xo(c,!1),n.lanes=4194304);c.isBackwards?(O.sibling=n.child,n.child=O):(t=c.last,t!==null?t.sibling=O:n.child=O,c.last=O)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=nr(),n.sibling=null,t=Nn.current,gt(Nn,s?t&1|2:t&1),n):(Kn(n),null);case 22:case 23:return ai(),s=n.memoizedState!==null,t!==null&&t.memoizedState!==null!==s&&(n.flags|=8192),s&&n.mode&1?Ur&1073741824&&(Kn(n),at&&n.subtreeFlags&6&&(n.flags|=8192)):Kn(n),null;case 24:return null;case 25:return null}throw Error(b(156,n.tag))}var hl=p.ReactCurrentOwner,hi=!1;function qr(t,n,o,s){n.child=t===null?pi(n,null,o,s):Zi(n,t.child,o,s)}function $o(t,n,o,s,c){o=o.render;var O=n.ref;return Qi(n,c),s=Yo(t,n,o,s,O,c),o=yn(),t!==null&&!hi?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~c,jo(t,n,c)):(Tn&&o&&da(n),n.flags|=1,qr(t,n,s,c),n.child)}function Bu(t,n,o,s,c){if(t===null){var O=o.type;return typeof O=="function"&&!Tu(O)&&O.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=O,Uu(t,n,O,s,c)):(t=js(o.type,null,s,n,n.mode,c),t.ref=n.ref,t.return=n,n.child=t)}if(O=t.child,!(t.lanes&c)){var X=O.memoizedProps;if(o=o.compare,o=o!==null?o:Ra,o(X,s)&&t.ref===n.ref)return jo(t,n,c)}return n.flags|=1,t=Io(O,s),t.ref=n.ref,t.return=n,n.child=t}function Uu(t,n,o,s,c){if(t!==null&&Ra(t.memoizedProps,s)&&t.ref===n.ref)if(hi=!1,(t.lanes&c)!==0)t.flags&131072&&(hi=!0);else return n.lanes=t.lanes,jo(t,n,c);return uu(t,n,o,s,c)}function Nu(t,n,o){var s=n.pendingProps,c=s.children,O=t!==null?t.memoizedState:null;if(s.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null},gt(Ja,Ur),Ur|=o;else if(o&1073741824)n.memoizedState={baseLanes:0,cachePool:null},s=O!==null?O.baseLanes:o,gt(Ja,Ur),Ur|=s;else return t=O!==null?O.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:t,cachePool:null},n.updateQueue=null,gt(Ja,Ur),Ur|=t,null;else O!==null?(s=O.baseLanes|o,n.memoizedState=null):s=o,gt(Ja,Ur),Ur|=s;return qr(t,n,c,o),n.child}function Wu(t,n){var o=n.ref;(t===null&&o!==null||t!==null&&t.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function uu(t,n,o,s,c){var O=hn(o)?Nt:St.current;return O=Fn(n,O),Qi(n,c),o=Yo(t,n,o,s,O,c),s=yn(),t!==null&&!hi?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~c,jo(t,n,c)):(Tn&&s&&da(n),n.flags|=1,qr(t,n,o,c),n.child)}function to(t,n,o,s,c){if(hn(o)){var O=!0;Qn(n)}else O=!1;if(Qi(n,c),n.stateNode===null)t!==null&&(t.alternate=null,n.alternate=null,n.flags|=2),is(n,o,s),Ri(n,o,s,c),s=!0;else if(t===null){var X=n.stateNode,ye=n.memoizedProps;X.props=ye;var Ve=X.context,ft=o.contextType;typeof ft=="object"&&ft!==null?ft=Xr(ft):(ft=hn(o)?Nt:St.current,ft=Fn(n,ft));var Pt=o.getDerivedStateFromProps,Zt=typeof Pt=="function"||typeof X.getSnapshotBeforeUpdate=="function";Zt||typeof X.UNSAFE_componentWillReceiveProps!="function"&&typeof X.componentWillReceiveProps!="function"||(ye!==s||Ve!==ft)&&Ka(n,X,s,ft),Ji=!1;var Wt=n.memoizedState;X.state=Wt,In(n,s,X,c),Ve=n.memoizedState,ye!==s||Wt!==Ve||Ft.current||Ji?(typeof Pt=="function"&&(Xi(n,o,Pt,s),Ve=n.memoizedState),(ye=Ji||wa(n,o,ye,s,Wt,Ve,ft))?(Zt||typeof X.UNSAFE_componentWillMount!="function"&&typeof X.componentWillMount!="function"||(typeof X.componentWillMount=="function"&&X.componentWillMount(),typeof X.UNSAFE_componentWillMount=="function"&&X.UNSAFE_componentWillMount()),typeof X.componentDidMount=="function"&&(n.flags|=4194308)):(typeof X.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=Ve),X.props=s,X.state=Ve,X.context=ft,s=ye):(typeof X.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{X=n.stateNode,Ua(t,n),ye=n.memoizedProps,ft=n.type===n.elementType?ye:fi(n.type,ye),X.props=ft,Zt=n.pendingProps,Wt=X.context,Ve=o.contextType,typeof Ve=="object"&&Ve!==null?Ve=Xr(Ve):(Ve=hn(o)?Nt:St.current,Ve=Fn(n,Ve));var Mn=o.getDerivedStateFromProps;(Pt=typeof Mn=="function"||typeof X.getSnapshotBeforeUpdate=="function")||typeof X.UNSAFE_componentWillReceiveProps!="function"&&typeof X.componentWillReceiveProps!="function"||(ye!==Zt||Wt!==Ve)&&Ka(n,X,s,Ve),Ji=!1,Wt=n.memoizedState,X.state=Wt,In(n,s,X,c);var Lt=n.memoizedState;ye!==Zt||Wt!==Lt||Ft.current||Ji?(typeof Mn=="function"&&(Xi(n,o,Mn,s),Lt=n.memoizedState),(ft=Ji||wa(n,o,ft,s,Wt,Lt,Ve)||!1)?(Pt||typeof X.UNSAFE_componentWillUpdate!="function"&&typeof X.componentWillUpdate!="function"||(typeof X.componentWillUpdate=="function"&&X.componentWillUpdate(s,Lt,Ve),typeof X.UNSAFE_componentWillUpdate=="function"&&X.UNSAFE_componentWillUpdate(s,Lt,Ve)),typeof X.componentDidUpdate=="function"&&(n.flags|=4),typeof X.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof X.componentDidUpdate!="function"||ye===t.memoizedProps&&Wt===t.memoizedState||(n.flags|=4),typeof X.getSnapshotBeforeUpdate!="function"||ye===t.memoizedProps&&Wt===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=Lt),X.props=s,X.state=Lt,X.context=Ve,s=ft):(typeof X.componentDidUpdate!="function"||ye===t.memoizedProps&&Wt===t.memoizedState||(n.flags|=4),typeof X.getSnapshotBeforeUpdate!="function"||ye===t.memoizedProps&&Wt===t.memoizedState||(n.flags|=1024),s=!1)}return lu(t,n,o,s,O,c)}function lu(t,n,o,s,c,O){Wu(t,n);var X=(n.flags&128)!==0;if(!s&&!X)return c&&Jr(n,o,!1),jo(t,n,O);s=n.stateNode,hl.current=n;var ye=X&&typeof o.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,t!==null&&X?(n.child=Zi(n,t.child,null,O),n.child=Zi(n,null,ye,O)):qr(t,n,ye,O),n.memoizedState=s.state,c&&Jr(n,o,!0),n.child}function wu(t){var n=t.stateNode;n.pendingContext?Sn(t,n.pendingContext,n.pendingContext!==n.context):n.context&&Sn(t,n.context,!1),Ha(t,n.containerInfo)}function Ku(t,n,o,s,c){return $n(),ka(c),n.flags|=256,qr(t,n,o,s),n.child}var Ws={dehydrated:null,treeContext:null,retryLane:0};function ws(t){return{baseLanes:t,cachePool:null}}function no(t,n,o){var s=n.pendingProps,c=Nn.current,O=!1,X=(n.flags&128)!==0,ye;if((ye=X)||(ye=t!==null&&t.memoizedState===null?!1:(c&2)!==0),ye?(O=!0,n.flags&=-129):(t===null||t.memoizedState!==null)&&(c|=1),gt(Nn,c&1),t===null)return ko(n),t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(n.mode&1?gr(t)?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(c=s.children,t=s.fallback,O?(s=n.mode,O=n.child,c={mode:"hidden",children:c},!(s&1)&&O!==null?(O.childLanes=0,O.pendingProps=c):O=Ps(c,s,0,null),t=Oa(t,s,o,null),O.return=n,t.return=n,O.sibling=t,n.child=O,n.child.memoizedState=ws(o),n.memoizedState=Ws,t):cu(n,c));if(c=t.memoizedState,c!==null){if(ye=c.dehydrated,ye!==null){if(X)return n.flags&256?(n.flags&=-257,Ks(t,n,o,Error(b(422)))):n.memoizedState!==null?(n.child=t.child,n.flags|=128,null):(O=s.fallback,c=n.mode,s=Ps({mode:"visible",children:s.children},c,0,null),O=Oa(O,c,o,null),O.flags|=2,s.return=n,O.return=n,s.sibling=O,n.child=s,n.mode&1&&Zi(n,t.child,null,o),n.child.memoizedState=ws(o),n.memoizedState=Ws,O);if(!(n.mode&1))n=Ks(t,n,o,null);else if(gr(ye))n=Ks(t,n,o,Error(b(419)));else if(s=(o&t.childLanes)!==0,hi||s){if(s=er,s!==null){switch(o&-o){case 4:O=2;break;case 16:O=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:O=32;break;case 536870912:O=268435456;break;default:O=0}s=O&(s.suspendedLanes|o)?0:O,s!==0&&s!==c.retryLane&&(c.retryLane=s,oi(t,s,-1))}qs(),n=Ks(t,n,o,Error(b(421)))}else jn(ye)?(n.flags|=128,n.child=t.child,n=El.bind(null,t),Gr(ye,n),n=null):(o=c.treeContext,Ct&&(or=sa(ye),Bn=n,Tn=!0,Gn=null,ji=!1,o!==null&&(ir[jr++]=bi,ir[jr++]=Ui,ir[jr++]=Dr,bi=o.id,Ui=o.overflow,Dr=n)),n=cu(n,n.pendingProps.children),n.flags|=4096);return n}return O?(s=zu(t,n,s.children,s.fallback,o),O=n.child,c=t.child.memoizedState,O.memoizedState=c===null?ws(o):{baseLanes:c.baseLanes|o,cachePool:null},O.childLanes=t.childLanes&~o,n.memoizedState=Ws,s):(o=Fu(t,n,s.children,o),n.memoizedState=null,o)}return O?(s=zu(t,n,s.children,s.fallback,o),O=n.child,c=t.child.memoizedState,O.memoizedState=c===null?ws(o):{baseLanes:c.baseLanes|o,cachePool:null},O.childLanes=t.childLanes&~o,n.memoizedState=Ws,s):(o=Fu(t,n,s.children,o),n.memoizedState=null,o)}function cu(t,n){return n=Ps({mode:"visible",children:n},t.mode,0,null),n.return=t,t.child=n}function Fu(t,n,o,s){var c=t.child;return t=c.sibling,o=Io(c,{mode:"visible",children:o}),!(n.mode&1)&&(o.lanes=s),o.return=n,o.sibling=null,t!==null&&(s=n.deletions,s===null?(n.deletions=[t],n.flags|=16):s.push(t)),n.child=o}function zu(t,n,o,s,c){var O=n.mode;t=t.child;var X=t.sibling,ye={mode:"hidden",children:o};return!(O&1)&&n.child!==t?(o=n.child,o.childLanes=0,o.pendingProps=ye,n.deletions=null):(o=Io(t,ye),o.subtreeFlags=t.subtreeFlags&14680064),X!==null?s=Io(X,s):(s=Oa(s,O,c,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,s}function Ks(t,n,o,s){return s!==null&&ka(s),Zi(n,t.child,null,o),t=cu(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function ku(t,n,o){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),vo(t.return,n,o)}function bo(t,n,o,s,c){var O=t.memoizedState;O===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:c}:(O.isBackwards=n,O.rendering=null,O.renderingStartTime=0,O.last=s,O.tail=o,O.tailMode=c)}function Hu(t,n,o){var s=n.pendingProps,c=s.revealOrder,O=s.tail;if(qr(t,n,s.children,o),s=Nn.current,s&2)s=s&1|2,n.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ku(t,o,n);else if(t.tag===19)ku(t,o,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}s&=1}if(gt(Nn,s),!(n.mode&1))n.memoizedState=null;else switch(c){case"forwards":for(o=n.child,c=null;o!==null;)t=o.alternate,t!==null&&ve(t)===null&&(c=o),o=o.sibling;o=c,o===null?(c=n.child,n.child=null):(c=o.sibling,o.sibling=null),bo(n,!1,c,o,O);break;case"backwards":for(o=null,c=n.child,n.child=null;c!==null;){if(t=c.alternate,t!==null&&ve(t)===null){n.child=c;break}t=c.sibling,c.sibling=o,o=c,c=t}bo(n,!0,o,null,O);break;case"together":bo(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function jo(t,n,o){if(t!==null&&(n.dependencies=t.dependencies),va|=n.lanes,!(o&n.childLanes))return null;if(t!==null&&n.child!==t.child)throw Error(b(153));if(n.child!==null){for(t=n.child,o=Io(t,t.pendingProps),n.child=o,o.return=n;t.sibling!==null;)t=t.sibling,o=o.sibling=Io(t,t.pendingProps),o.return=n;o.sibling=null}return n.child}function Fi(t,n,o){switch(n.tag){case 3:wu(n),$n();break;case 5:Ns(n);break;case 1:hn(n.type)&&Qn(n);break;case 4:Ha(n,n.stateNode.containerInfo);break;case 10:go(n,n.type._context,n.memoizedProps.value);break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(gt(Nn,Nn.current&1),n.flags|=128,null):o&n.child.childLanes?no(t,n,o):(gt(Nn,Nn.current&1),t=jo(t,n,o),t!==null?t.sibling:null);gt(Nn,Nn.current&1);break;case 19:if(s=(o&n.childLanes)!==0,t.flags&128){if(s)return Hu(t,n,o);n.flags|=128}var c=n.memoizedState;if(c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),gt(Nn,Nn.current),s)break;return null;case 22:case 23:return n.lanes=0,Nu(t,n,o)}return jo(t,n,o)}function _l(t,n){switch(za(n),n.tag){case 1:return hn(n.type)&&ni(),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Vo(),dt(Ft),dt(St),we(),t=n.flags,t&65536&&!(t&128)?(n.flags=t&-65537|128,n):null;case 5:return os(n),null;case 13:if(dt(Nn),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(b(340));$n()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return dt(Nn),null;case 4:return Vo(),null;case 10:return ca(n.type._context),null;case 22:case 23:return ai(),null;case 24:return null;default:return null}}var Fs=!1,_a=!1,gl=typeof WeakSet=="function"?WeakSet:Set,Et=null;function ds(t,n){var o=t.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(s){zr(t,n,s)}else o.current=null}function zs(t,n,o){try{o()}catch(s){zr(t,n,s)}}var Vu=!1;function vl(t,n){for(L(t.containerInfo),Et=n;Et!==null;)if(t=Et,n=t.child,(t.subtreeFlags&1028)!==0&&n!==null)n.return=t,Et=n;else for(;Et!==null;){t=Et;try{var o=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(o!==null){var s=o.memoizedProps,c=o.memoizedState,O=t.stateNode,X=O.getSnapshotBeforeUpdate(t.elementType===t.type?s:fi(t.type,s),c);O.__reactInternalSnapshotBeforeUpdate=X}break;case 3:at&&ie(t.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(b(163))}}catch(ye){zr(t,t.return,ye)}if(n=t.sibling,n!==null){n.return=t.return,Et=n;break}Et=t.return}return o=Vu,Vu=!1,o}function Po(t,n,o){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&t)===t){var O=c.destroy;c.destroy=void 0,O!==void 0&&zs(n,o,O)}c=c.next}while(c!==s)}}function xo(t,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&t)===t){var s=o.create;o.destroy=s()}o=o.next}while(o!==n)}}function Ga(t){var n=t.ref;if(n!==null){var o=t.stateNode;switch(t.tag){case 5:t=Ge(o);break;default:t=o}typeof n=="function"?n(t):n.current=t}}function Gu(t,n,o){if(Oi&&typeof Oi.onCommitFiberUnmount=="function")try{Oi.onCommitFiberUnmount(la,n)}catch(X){}switch(n.tag){case 0:case 11:case 14:case 15:if(t=n.updateQueue,t!==null&&(t=t.lastEffect,t!==null)){var s=t=t.next;do{var c=s,O=c.destroy;c=c.tag,O!==void 0&&(c&2||c&4)&&zs(n,o,O),s=s.next}while(s!==t)}break;case 1:if(ds(n,o),t=n.stateNode,typeof t.componentWillUnmount=="function")try{t.props=n.memoizedProps,t.state=n.memoizedState,t.componentWillUnmount()}catch(X){zr(n,o,X)}break;case 5:ds(n,o);break;case 4:at?mu(t,n,o):tt&&tt&&(n=n.stateNode.containerInfo,o=Le(n),Tt(n,o))}}function du(t,n,o){for(var s=n;;)if(Gu(t,s,o),s.child===null||at&&s.tag===4){if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}else s.child.return=s,s=s.child}function Yu(t){var n=t.alternate;n!==null&&(t.alternate=null,Yu(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Ln(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function ro(t){return t.tag===5||t.tag===3||t.tag===4}function ks(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||ro(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zo(t){if(at){e:{for(var n=t.return;n!==null;){if(ro(n))break e;n=n.return}throw Error(b(160))}var o=n;switch(o.tag){case 5:n=o.stateNode,o.flags&32&&(rt(n),o.flags&=-33),o=ks(t),fu(t,o,n);break;case 3:case 4:n=o.stateNode.containerInfo,o=ks(t),ii(t,o,n);break;default:throw Error(b(161))}}}function ii(t,n,o){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?Ie(o,t,n):H(o,t);else if(s!==4&&(t=t.child,t!==null))for(ii(t,n,o),t=t.sibling;t!==null;)ii(t,n,o),t=t.sibling}function fu(t,n,o){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?me(o,t,n):F(o,t);else if(s!==4&&(t=t.child,t!==null))for(fu(t,n,o),t=t.sibling;t!==null;)fu(t,n,o),t=t.sibling}function mu(t,n,o){for(var s=n,c=!1,O,X;;){if(!c){c=s.return;e:for(;;){if(c===null)throw Error(b(160));switch(O=c.stateNode,c.tag){case 5:X=!1;break e;case 3:O=O.containerInfo,X=!0;break e;case 4:O=O.containerInfo,X=!0;break e}c=c.return}c=!0}if(s.tag===5||s.tag===6)du(t,s,o),X?Be(O,s.stateNode):Ke(O,s.stateNode);else if(s.tag===18)X?No(O,s.stateNode):Gi(O,s.stateNode);else if(s.tag===4){if(s.child!==null){O=s.stateNode.containerInfo,X=!0,s.child.return=s,s=s.child;continue}}else if(Gu(t,s,o),s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return,s.tag===4&&(c=!1)}s.sibling.return=s.return,s=s.sibling}}function Hs(t,n){if(at){switch(n.tag){case 0:case 11:case 14:case 15:Po(3,n,n.return),xo(3,n),Po(5,n,n.return);return;case 1:return;case 5:var o=n.stateNode;if(o!=null){var s=n.memoizedProps;t=t!==null?t.memoizedProps:s;var c=n.type,O=n.updateQueue;n.updateQueue=null,O!==null&&je(o,O,c,t,s,n)}return;case 6:if(n.stateNode===null)throw Error(b(162));o=n.memoizedProps,ne(n.stateNode,t!==null?t.memoizedProps:o,o);return;case 3:Ct&&t!==null&&t.memoizedState.isDehydrated&&lo(n.stateNode.containerInfo);return;case 12:return;case 13:qo(n);return;case 19:qo(n);return;case 17:return}throw Error(b(163))}switch(n.tag){case 0:case 11:case 14:case 15:Po(3,n,n.return),xo(3,n),Po(5,n,n.return);return;case 12:return;case 13:qo(n);return;case 19:qo(n);return;case 3:Ct&&t!==null&&t.memoizedState.isDehydrated&&lo(n.stateNode.containerInfo);break;case 22:case 23:return}e:if(tt){switch(n.tag){case 1:case 5:case 6:break e;case 3:case 4:n=n.stateNode,Tt(n.containerInfo,n.pendingChildren);break e}throw Error(b(163))}}function qo(t){var n=t.updateQueue;if(n!==null){t.updateQueue=null;var o=t.stateNode;o===null&&(o=t.stateNode=new gl),n.forEach(function(s){var c=oa.bind(null,t,s);o.has(s)||(o.add(s),s.then(c,c))})}}function ea(t,n){for(Et=n;Et!==null;){n=Et;var o=n.deletions;if(o!==null)for(var s=0;s";case Ya:return":has("+(Rr(t)||"")+")";case ms:return'[role="'+t.value+'"]';case Qa:return'"'+t.value+'"';case _i:return'[data-testname="'+t.value+'"]';default:throw Error(b(365))}}function Gs(t,n){var o=[];t=[t,0];for(var s=0;sc&&(c=X),s&=~O}if(s=c,s=nr()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*yl(s/1960))-s,10t?16:t,ra===null)var s=!1;else{if(t=ra,ra=null,vs=0,$t&6)throw Error(b(331));var c=$t;for($t|=4,Et=t.current;Et!==null;){var O=Et,X=O.child;if(Et.flags&16){var ye=O.deletions;if(ye!==null){for(var Ve=0;Venr()-_s?Ea(t,0):_u|=o),Fr(t,n)}function Mo(t,n){n===0&&(t.mode&1?(n=ci,ci<<=1,!(ci&130023424)&&(ci=4194304)):n=1);var o=Nr();t=$s(t,n),t!==null&&(po(t,n,o),Fr(t,o))}function El(t){var n=t.memoizedState,o=0;n!==null&&(o=n.retryLane),Mo(t,o)}function oa(t,n){var o=0;switch(t.tag){case 13:var s=t.stateNode,c=t.memoizedState;c!==null&&(o=c.retryLane);break;case 19:s=t.stateNode;break;default:throw Error(b(314))}s!==null&&s.delete(n),Mo(t,o)}var Pu;Pu=function(t,n,o){if(t!==null)if(t.memoizedProps!==n.pendingProps||Ft.current)hi=!0;else{if(!(t.lanes&o)&&!(n.flags&128))return hi=!1,Fi(t,n,o);hi=!!(t.flags&131072)}else hi=!1,Tn&&n.flags&1048576&&Fa(n,Bi,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;t!==null&&(t.alternate=null,n.alternate=null,n.flags|=2),t=n.pendingProps;var c=Fn(n,St.current);Qi(n,o),c=Yo(null,n,s,t,c,o);var O=yn();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,hn(s)?(O=!0,Qn(n)):O=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Sr(n),c.updater=Fo,n.stateNode=c,c._reactInternals=n,Ri(n,s,t,o),n=lu(null,n,s,!0,O,o)):(n.tag=0,Tn&&O&&da(n),qr(null,n,c,o),n=n.child),n;case 16:s=n.elementType;e:{switch(t!==null&&(t.alternate=null,n.alternate=null,n.flags|=2),t=n.pendingProps,c=s._init,s=c(s._payload),n.type=s,c=n.tag=Ol(s),t=fi(s,t),c){case 0:n=uu(null,n,s,t,o);break e;case 1:n=to(null,n,s,t,o);break e;case 11:n=$o(null,n,s,t,o);break e;case 14:n=Bu(null,n,s,fi(s.type,t),o);break e}throw Error(b(306,s,""))}return n;case 0:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:fi(s,c),uu(t,n,s,c,o);case 1:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:fi(s,c),to(t,n,s,c,o);case 3:e:{if(wu(n),t===null)throw Error(b(387));s=n.pendingProps,O=n.memoizedState,c=O.element,Ua(t,n),In(n,s,null,o);var X=n.memoizedState;if(s=X.element,Ct&&O.isDehydrated)if(O={element:s,isDehydrated:!1,cache:X.cache,transitions:X.transitions},n.updateQueue.baseState=O,n.memoizedState=O,n.flags&256){c=Error(b(423)),n=Ku(t,n,s,o,c);break e}else if(s!==c){c=Error(b(424)),n=Ku(t,n,s,o,c);break e}else for(Ct&&(or=Ei(n.stateNode.containerInfo),Bn=n,Tn=!0,Gn=null,ji=!1),o=pi(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if($n(),s===c){n=jo(t,n,o);break e}qr(t,n,s,o)}n=n.child}return n;case 5:return Ns(n),t===null&&ko(n),s=n.type,c=n.pendingProps,O=t!==null?t.memoizedProps:null,X=c.children,xe(s,c)?X=null:O!==null&&xe(s,O)&&(n.flags|=32),Wu(t,n),qr(t,n,X,o),n.child;case 6:return t===null&&ko(n),null;case 13:return no(t,n,o);case 4:return Ha(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=Zi(n,null,s,o):qr(t,n,s,o),n.child;case 11:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:fi(s,c),$o(t,n,s,c,o);case 7:return qr(t,n,n.pendingProps,o),n.child;case 8:return qr(t,n,n.pendingProps.children,o),n.child;case 12:return qr(t,n,n.pendingProps.children,o),n.child;case 10:e:{if(s=n.type._context,c=n.pendingProps,O=n.memoizedProps,X=c.value,go(n,s,X),O!==null)if(ln(O.value,X)){if(O.children===c.children&&!Ft.current){n=jo(t,n,o);break e}}else for(O=n.child,O!==null&&(O.return=n);O!==null;){var ye=O.dependencies;if(ye!==null){X=O.child;for(var Ve=ye.firstContext;Ve!==null;){if(Ve.context===s){if(O.tag===1){Ve=Ze(-1,o&-o),Ve.tag=2;var ft=O.updateQueue;if(ft!==null){ft=ft.shared;var Pt=ft.pending;Pt===null?Ve.next=Ve:(Ve.next=Pt.next,Pt.next=Ve),ft.pending=Ve}}O.lanes|=o,Ve=O.alternate,Ve!==null&&(Ve.lanes|=o),vo(O.return,o,n),ye.lanes|=o;break}Ve=Ve.next}}else if(O.tag===10)X=O.type===n.type?null:O.child;else if(O.tag===18){if(X=O.return,X===null)throw Error(b(341));X.lanes|=o,ye=X.alternate,ye!==null&&(ye.lanes|=o),vo(X,o,n),X=O.sibling}else X=O.child;if(X!==null)X.return=O;else for(X=O;X!==null;){if(X===n){X=null;break}if(O=X.sibling,O!==null){O.return=X.return,X=O;break}X=X.return}O=X}qr(t,n,c.children,o),n=n.child}return n;case 9:return c=n.type,s=n.pendingProps.children,Qi(n,o),c=Xr(c),s=s(c),n.flags|=1,qr(t,n,s,o),n.child;case 14:return s=n.type,c=fi(s,n.pendingProps),c=fi(s.type,c),Bu(t,n,s,c,o);case 15:return Uu(t,n,n.type,n.pendingProps,o);case 17:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:fi(s,c),t!==null&&(t.alternate=null,n.alternate=null,n.flags|=2),n.tag=1,hn(s)?(t=!0,Qn(n)):t=!1,Qi(n,o),is(n,s,c),Ri(n,s,c,o),lu(null,n,s,!0,t,o);case 19:return Hu(t,n,o);case 22:return Nu(t,n,o)}throw Error(b(156,n.tag))};function xu(t,n){return qa(t,n)}function Cu(t,n,o,s){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ci(t,n,o,s){return new Cu(t,n,o,s)}function Tu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ol(t){if(typeof t=="function")return Tu(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ce)return 11;if(t===G)return 14}return 2}function Io(t,n){var o=t.alternate;return o===null?(o=Ci(t.tag,n,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=n,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&14680064,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,n=t.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o}function js(t,n,o,s,c,O){var X=2;if(s=t,typeof t=="function")Tu(t)&&(X=1);else if(typeof t=="string")X=5;else e:switch(t){case R:return Oa(o.children,c,O,n);case T:X=8,c|=8;break;case w:return t=Ci(12,o,n,c|2),t.elementType=w,t.lanes=O,t;case $:return t=Ci(13,o,n,c),t.elementType=$,t.lanes=O,t;case ee:return t=Ci(19,o,n,c),t.elementType=ee,t.lanes=O,t;case ue:return Ps(o,c,O,n);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Z:X=10;break e;case Q:X=9;break e;case ce:X=11;break e;case G:X=14;break e;case z:X=16,s=null;break e}throw Error(b(130,t==null?t:typeof t,""))}return n=Ci(X,o,n,c),n.elementType=t,n.type=s,n.lanes=O,n}function Oa(t,n,o,s){return t=Ci(7,t,s,n),t.lanes=o,t}function Ps(t,n,o,s){return t=Ci(22,t,s,n),t.elementType=ue,t.lanes=o,t.stateNode={},t}function tu(t,n,o){return t=Ci(6,t,null,n),t.lanes=o,t}function kr(t,n,o){return n=Ci(4,t.children!==null?t.children:[],t.key,n),n.lanes=o,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function oo(t,n,o,s,c){this.tag=n,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Je,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wo(0),this.expirationTimes=wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wo(0),this.identifierPrefix=s,this.onRecoverableError=c,Ct&&(this.mutableSourceEagerHydrationData=null)}function el(t,n,o,s,c,O,X,ye,Ve){return t=new oo(t,n,o,ye,Ve),n===1?(n=1,O===!0&&(n|=8)):n=0,O=Ci(3,null,null,n),t.current=O,O.stateNode=t,O.memoizedState={element:s,isDehydrated:o,cache:null,transitions:null},Sr(O),t}function tl(t){if(!t)return At;t=t._reactInternals;e:{if(Te(t)!==t||t.tag!==1)throw Error(b(170));var n=t;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(hn(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(b(171))}if(t.tag===1){var o=t.type;if(hn(o))return Dn(t,o,n)}return n}function xs(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(b(188)):(t=Object.keys(t).join(","),Error(b(268,t)));return t=he(n),t===null?null:t.stateNode}function ba(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o=ft&&O>=Zt&&c<=Pt&&X<=Wt){t.splice(n,1);break}else if(s!==ft||o.width!==Ve.width||WtX){if(!(O!==Zt||o.height!==Ve.height||Ptc)){ft>s&&(Ve.width+=ft-s,Ve.x=s),PtO&&(Ve.height+=Zt-O,Ve.y=O),Wto&&(o=X)),X ")+` + +No matching component was found for: + `)+t.join(" > ")}return null},y.getPublicRootInstance=function(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return Ge(t.child.stateNode);default:return t.child.stateNode}},y.injectIntoDevTools=function(t){if(t={bundleType:t.bundleType,version:t.version,rendererPackageName:t.rendererPackageName,rendererConfig:t.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:p.ReactCurrentDispatcher,findHostInstanceByFiber:nl,findFiberByHostInstance:t.findFiberByHostInstance||bl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")t=!1;else{var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled||!n.supportsFiber)t=!0;else{try{la=n.inject(t),Oi=n}catch(o){}t=!!n.checkDCE}}return t},y.isAlreadyRendering=function(){return!1},y.observeVisibleRects=function(t,n,o,s){if(!Qe)throw Error(b(363));t=hu(t,n);var c=x(t,o,s).disconnect;return{disconnect:function(){c()}}},y.registerMutableSourceForHydration=function(t,n){var o=n._getVersion;o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o)},y.runWithPriority=function(t,n){var o=_n;try{return _n=t,n()}finally{_n=o}},y.shouldError=function(){return null},y.shouldSuspend=function(){return!1},y.updateContainer=function(t,n,o,s){var c=n.current,O=Nr(),X=Ao(c);return o=tl(o),n.context===null?n.context=o:n.pendingContext=o,n=Ze(O,X),n.payload={element:t},s=s===void 0?null:s,s!==null&&(n.callback=s),Ht(c,n),t=oi(c,X,O),t!==null&&rr(t,c,X),X},y}},"./node_modules/react-reconciler/constants.js":function(P,f,i){"use strict";P.exports=i("./node_modules/react-reconciler/cjs/react-reconciler-constants.development.js")},"./node_modules/react-reconciler/node_modules/scheduler/cjs/scheduler.development.js":function(P,f,i){"use strict";(function(g,v){(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var y=!1,u=!1,U=5;function B(me,Ie){var Ke=me.length;me.push(Ie),M(me,Ie,Ke)}function b(me){return me.length===0?null:me[0]}function p(me){if(me.length===0)return null;var Ie=me[0],Ke=me.pop();return Ke!==Ie&&(me[0]=Ke,j(me,Ke,0)),Ie}function M(me,Ie,Ke){for(var Be=Ke;Be>0;){var rt=Be-1>>>1,vt=me[rt];if(R(vt,Ie)>0)me[rt]=Ie,me[Be]=vt,Be=rt;else return}}function j(me,Ie,Ke){for(var Be=Ke,rt=me.length,vt=rt>>>1;BeKe&&(!me||Ne()));){var Be=Ae.callback;if(typeof Be=="function"){Ae.callback=null,Re=Ae.priorityLevel;var rt=Ae.expirationTime<=Ke,vt=Be(rt);Ke=f.unstable_now(),typeof vt=="function"?Ae.callback=vt:Ae===b(Ee)&&p(Ee),se(Ke)}else p(Ee);Ae=b(Ee)}if(Ae!==null)return!0;var lt=b(he);return lt!==null&&H(le,lt.startTime-Ke),!1}function $e(me,Ie){switch(me){case T:case w:case Z:case Q:case ce:break;default:me=Z}var Ke=Re;Re=me;try{return Ie()}finally{Re=Ke}}function He(me){var Ie;switch(Re){case T:case w:case Z:Ie=Z;break;default:Ie=Re;break}var Ke=Re;Re=Ie;try{return me()}finally{Re=Ke}}function Je(me){var Ie=Re;return function(){var Ke=Re;Re=Ie;try{return me.apply(this,arguments)}finally{Re=Ke}}}function ut(me,Ie,Ke){var Be=f.unstable_now(),rt;if(typeof Ke=="object"&&Ke!==null){var vt=Ke.delay;typeof vt=="number"&&vt>0?rt=Be+vt:rt=Be}else rt=Be;var lt;switch(me){case T:lt=J;break;case w:lt=re;break;case ce:lt=De;break;case Q:lt=Te;break;case Z:default:lt=be;break}var pt=rt+lt,oe={id:Me++,callback:Ie,priorityLevel:me,startTime:rt,expirationTime:pt,sortIndex:-1};return rt>Be?(oe.sortIndex=rt,B(he,oe),b(Ee)===null&&oe===b(he)&&(te?ne():te=!0,H(le,rt-Be))):(oe.sortIndex=pt,B(Ee,oe),!q&&!Ge&&(q=!0,F(xe))),oe}function at(){}function tt(){!q&&!Ge&&(q=!0,F(xe))}function Ct(){return b(Ee)}function Kt(me){me.callback=null}function Jt(){return Re}var cn=!1,Ln=null,wt=-1,bn=U,Qe=-1;function Ne(){var me=f.unstable_now()-Qe;return!(me125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}me>0?bn=Math.floor(1e3/me):bn=U}var W=function(){if(Ln!==null){var me=f.unstable_now();Qe=me;var Ie=!0,Ke=!0;try{Ke=Ln(Ie,me)}finally{Ke?m():(cn=!1,Ln=null)}}else cn=!1},m;if(typeof K=="function")m=function(){K(W)};else if(typeof MessageChannel!="undefined"){var E=new MessageChannel,x=E.port2;E.port1.onmessage=W,m=function(){x.postMessage(null)}}else m=function(){L(W,0)};function F(me){Ln=me,cn||(cn=!0,m())}function H(me,Ie){wt=L(function(){me(f.unstable_now())},Ie)}function ne(){D(wt),wt=-1}var _e=Se,je=null;f.unstable_IdlePriority=ce,f.unstable_ImmediatePriority=T,f.unstable_LowPriority=Q,f.unstable_NormalPriority=Z,f.unstable_Profiling=je,f.unstable_UserBlockingPriority=w,f.unstable_cancelCallback=Kt,f.unstable_continueExecution=tt,f.unstable_forceFrameRate=st,f.unstable_getCurrentPriorityLevel=Jt,f.unstable_getFirstCallbackNode=Ct,f.unstable_next=He,f.unstable_pauseExecution=at,f.unstable_requestPaint=_e,f.unstable_runWithPriority=$e,f.unstable_scheduleCallback=ut,f.unstable_shouldYield=Ne,f.unstable_wrapCallback=Je,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()}).call(this,i("./node_modules/timers-browserify/main.js").setImmediate,i("./node_modules/@tarojs/runtime/dist/runtime.esm.js").navigator)},"./node_modules/react-reconciler/node_modules/scheduler/index.js":function(P,f,i){"use strict";P.exports=i("./node_modules/react-reconciler/node_modules/scheduler/cjs/scheduler.development.js")},"./node_modules/setimmediate/setImmediate.js":function(P,f,i){(function(g,v){(function(y,u){"use strict";if(y.setImmediate)return;var U=1,B={},b=!1,p=y.document,M;function j(ue){typeof ue!="function"&&(ue=new Function(""+ue));for(var de=new Array(arguments.length-1),J=0;J=0&&(B._idleTimeoutId=setTimeout(function(){B._onTimeout&&B._onTimeout()},b))},i("./node_modules/setimmediate/setImmediate.js"),f.setImmediate=typeof self!="undefined"&&self.setImmediate||typeof g!="undefined"&&g.setImmediate||this&&this.setImmediate,f.clearImmediate=typeof self!="undefined"&&self.clearImmediate||typeof g!="undefined"&&g.clearImmediate||this&&this.clearImmediate}).call(this,i("./node_modules/webpack/buildin/global.js"),i("./node_modules/@tarojs/runtime/dist/runtime.esm.js").window)},"./src/app.scss":function(P,f,i){},"./src/app.ts":function(P,f,i){"use strict";i.r(f);var g=i("./node_modules/@tuya-fe/taro-plugin-platform-tuya/dist/runtime.js"),v=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),y=i("./node_modules/@tarojs/plugin-framework-react/dist/runtime.js"),u=i("./node_modules/@tarojs/taro/index.js"),U=i.n(u),B=i("./node_modules/babel-loader/lib/index.js!./src/app.ts"),b=i("./node_modules/react/cjs/react.production.min.js"),p=i.n(b),M=i("./node_modules/@tarojs/react/dist/react.esm.js"),j={pages:["pages/base/index","pages/choose/index","pages/registerSuccess/index","pages/addValue/index","pages/projectList/index","pages/test/index"],dependencies:{BaseKit:"3.1.2",BizKit:"3.0.7",MiniKit:"3.0.7",LampKit:"1.0.2"},window:{backgroundTextStyle:"light",navigationBarBackgroundColor:"#ffffff",navigationBarTitleText:"",navigationBarTextStyle:"black"}};v.window.__taroAppConfig=j;var R=App(Object(y.a)(B.a,b,M.a,j));Object(u.initPxTransform)({designWidth:750,deviceRatio:{640:1.17,750:1,828:.905},baseFontSize:20,unitPrecision:void 0,targetUnit:void 0})}},[["./src/app.ts","runtime","taro","vendors","common"]]])});var Hc=Bo(()=>{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["pages/addValue/index"],{"./node_modules/babel-loader/lib/index.js!./src/pages/addValue/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),v=i("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),y=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),u=i("./node_modules/react/cjs/react.production.min.js"),U=i.n(u),B=i("./node_modules/@tarojs/components/mini/index.js"),b=i("./node_modules/@tarojs/taro/index.js"),p=i.n(b),M=i("./src/components/BasePage/index.tsx"),j=i("./src/common/img/group.png"),R=i.n(j),T=i("./src/pages/addValue/index.module.scss"),w=i.n(T),Z=i("./src/utils/i18n.ts"),Q=i("./src/components/BaseEmpty/index.tsx"),ce=i("./src/api/index.ts"),$=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),ee=i.n($),G=function(){var ue,de,J,re,be=Object(Z.a)(),Te=Object(b.getCurrentInstance)(),De=Te.router,Ee=Object(u.useState)({}),he=Object(y.a)(Ee,2),Me=he[0],Ae=he[1],Re=function(){var q=Object(v.a)(Object(g.a)().mark(function te(){var L,D;return Object(g.a)().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return p.a.showLoading({title:be("loading")}),V.next=3,Object(ce.f)({params:JSON.stringify({page:1,pageSize:100,vasId:De==null||(L=De.params)===null||L===void 0?void 0:L.id})});case 3:D=V.sent,p.a.hideLoading(),console.log(D.projectVas.list),Ae(D);case 7:case"end":return V.stop()}},te)}));return function(){return q.apply(this,arguments)}}();Object(b.useDidShow)(function(){Re(),p.a.setNavigationBarTitle({title:be("addValue")})});var Ge=function(){var te;p.a.navigateTo({url:"/pages/projectList/index?id="+(De==null||(te=De.params)===null||te===void 0?void 0:te.id)})};return Object($.jsxs)(M.a,{className:w.a.container,footerConfig:{primaryButtonText:be("newAdd"),onPrimaryButtonClick:Ge},children:[Object($.jsxs)(B.i,{className:w.a.header,children:[Object($.jsx)(B.e,{src:Me==null?void 0:Me.pic,className:w.a.img}),Object($.jsx)(B.i,{className:w.a.title,children:Me==null?void 0:Me.name})]}),Object($.jsx)(B.i,{className:w.a.desc,children:Me==null||(ue=Me.desc)===null||ue===void 0?void 0:ue.replace(/\s/g," ")}),Me!=null&&(de=Me.projectVas)!==null&&de!==void 0&&(de=de.list)!==null&&de!==void 0&&de.length?Object($.jsxs)(B.a,{children:[Object($.jsx)(B.i,{className:w.a.collection,children:be("collectionProjet")}),(Me==null||(J=Me.projectVas)===null||J===void 0?void 0:J.list)&&Object($.jsx)(B.i,{className:w.a.list,children:((Me==null||(re=Me.projectVas)===null||re===void 0?void 0:re.list)||[]).map(function(q){return Object($.jsxs)(B.i,{className:w.a.item,children:[Object($.jsx)(B.e,{src:R.a,className:w.a.icon}),q.projectName]},q.vasProjectId)})})]}):Object($.jsx)(Q.a,{className:w.a.empty,description:be("noProject")})]})};f.a=G},"./src/common/img/group.png":function(P,f){P.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA0pJREFUWEfFVkFoE1EQfbNNm4i7sYKHHjxEUFDwYMHqrqd6a6GCxYvutlBRULGgQnvWg4KiYIWKHhQKNpuKHgoV6s0Iwm5RUNBDkIKC4ElomyyYNnFHdqO1myb5P6Xgv86bmTfz583/hP986D/nx4YJHBks7GefU2EBPuadTDK3kWKaJnDY8gYIfBWM3WsTEuGTz7gxZ2tTzRBpioAx4N1mn0caJSCF7jiT6qgsCWkChrV0mVm5KxOYyL/ipLeNSWFlQN2n8juKpHwDOCGDJ8JivLW8KzuxfVGEl+qAbhXOg/FAFCxiJ1xw09pDkY8cATP/CKAzomBROz927eRZkY8sgecAnRAFq7I/dW3tpMhHioBhFsYYuCQKFpElcN+xtWGRjxwBK9/HTDOiYBECit/rTG57KfKRItB9jWPFz95HAHtFAQM7EX2Kt27tyk5QUYSXIhAEOWwt6cQtrySkWGbmo3OZ5BtR8pCsDOgvRre8WTD3iH34tGsnJ8S4JggcMb0DPvh9JSh9JWKPObySMhHmfcZrAs4BiAFUJPY7ZR4o6Q4YZmGcgYtheuZ+J5Ocrq7QMPMjDLr9p7U5xVcGffq1k0nxEqWtbvYZedU+UgS6hryOlhV8Ce+fMO+mtT312qtb3gyY+9bbg4HkW4k29eba4VxHoHuIE8srhWGALK5MfQyEH2B0VKr3rziZ+g9N+FwzP6lHkIBpx9b6/9ojBPSTCykosdlGciPmffXuNtKphhP4b0hXCQSVF1e8YMgaap2AXLxN7ayl8bUz0Dg/z7mZpB6RoWF5l5lZ7r0Hjzp28k51Et0sTAKwxPKjomurW6IETO8tgw+KnQPt0gfHVjs3lYBuFkoVDcucfxWsRUtfAcF105oR6YBuFn4CkPrxBMvHtbXWaqrdQwvty6XYF2a0Ny6jxhAapveewQek6ge9c2y1qxb20Kn8cYXoWb1uEuiFY6vH1slQun0Su8AY8HrYDwd6VVHBP5EZ9xLf1evZLJXXEZCVIYBcoo4MqzsSvB/MfipcxW2ld7U+qVWL6GcKSrnRIsrBj/W6U1u+ylyVDKb2Kl7Onwe1WH9mokygHOCn423auMwnQyZxzVXcjONmYaVew81KVivObzKpVTAbWnyjAAAAAElFTkSuQmCC"},"./src/common/img/noData.png":function(P,f,i){P.exports=i.p+"common/img/noData.png"},"./src/components/BaseEmpty/index.module.scss":function(P,f,i){P.exports={baseEmpty:"index-module__baseEmpty___C596f",image:"index-module__image___vHdSM",description:"index-module__description___RTJ4C"}},"./src/components/BaseEmpty/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/react/cjs/react.production.min.js"),v=i.n(g),y=i("./node_modules/@tarojs/components/mini/index.js"),u=i("./src/common/img/noData.png"),U=i.n(u),B=i("./src/components/BaseEmpty/index.module.scss"),b=i.n(B),p=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),M=i.n(p),j=function(T){var w=T.className,Z=T.style,Q=T.image,ce=T.imageClass,$=T.description,ee=$===void 0?"No data":$,G=Q!=null?Q:U.a;return Object(p.jsxs)(y.i,{className:"".concat(b.a.baseEmpty," ").concat(w),style:Z,children:[Object(p.jsx)(y.e,{src:G,className:"".concat(b.a.image," ").concat(ce)}),Object(p.jsx)(y.i,{className:b.a.description,children:ee})]})};f.a=j},"./src/pages/addValue/index.module.scss":function(P,f,i){P.exports={container:"index-module__container___MVi15",header:"index-module__header___ljhVs",img:"index-module__img___QAbK3",title:"index-module__title___cArut",desc:"index-module__desc___qwCj2",empty:"index-module__empty___KQawt",collection:"index-module__collection___flBPK",list:"index-module__list___tNUNG",item:"index-module__item___Nr+AV",icon:"index-module__icon___Nt5HX"}},"./src/pages/addValue/index.tsx":function(P,f,i){"use strict";i.r(f);var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),v=i("./node_modules/babel-loader/lib/index.js!./src/pages/addValue/index.tsx"),y={navigationBarTitleText:""},u=Page(Object(g.createPageConfig)(v.a,"pages/addValue/index",{root:{cn:[]}},y||{}));f.default=v.a}},[["./src/pages/addValue/index.tsx","runtime","taro","vendors","common"]]])});var Vc=Bo(()=>{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["pages/base/index"],{"./node_modules/@babel/runtime/helpers/esm/extends.js":function(P,f,i){"use strict";i.d(f,"a",function(){return g});function g(){return g=Object.assign?Object.assign.bind():function(v){for(var y=1;y0&&Object(J.jsxs)(ce.a,{className:p.a.combo,children:[Object(J.jsx)(M.i,{className:p.a.nav,children:Object(J.jsx)(M.i,{className:p.a.title,children:Ee("addValue")})}),((Ae==null?void 0:Ae.addValueList)||[]).map(function(L){return Object(J.jsxs)(M.i,{onClick:function(){return q(L)},className:p.a.appreciation,children:[Object(J.jsx)($.a,{txtConfig:{title:L==null?void 0:L.name},imgConfig:{src:L==null?void 0:L.pic}}),Object(J.jsx)(M.e,{className:p.a.nextIcon,src:G.a})]},L==null?void 0:L.id)})]}),!(Ae!=null&&Ae.oem)&&(Ae==null?void 0:Ae.edition)===0&&Object(J.jsx)(M.i,{className:p.a.buttonBg,children:Object(J.jsx)(M.b,{onClick:te,className:"".concat(p.a.button," ").concat(p.a[Ae==null||(De=Ae.comboSingleDetailVO)===null||De===void 0?void 0:De.version]),children:Ee("seeAll")})})]})]})};f.a=be},"./src/pages/base/components/ComboHead/Device/index.module.scss":function(P,f,i){P.exports={device:"index-module__device___8LmZJ",deviceItem:"index-module__deviceItem___tuoZd",deviceTitle:"index-module__deviceTitle___YoPZT",deviceNum:"index-module__deviceNum___XZT1O",num:"index-module__num___C2AD5",maxNum:"index-module__maxNum___rFb7X",ordinary:"index-module__ordinary___QbcoZ",advanced:"index-module__advanced___XDtpX",profession:"index-module__profession___HQC9E",park:"index-module__park___joiHL",indoor:"index-module__indoor___gN6kS",outdoor:"index-module__outdoor___FXZHk"}},"./src/pages/base/components/ComboHead/Device/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/react/cjs/react.production.min.js"),v=i.n(g),y=i("./src/components/Box/index.tsx"),u=i("./src/utils/i18n.ts"),U=i("./node_modules/@tarojs/components/mini/index.js"),B=i("./node_modules/lodash/lodash.js"),b=i.n(B),p=i("./src/pages/base/components/ComboHead/Device/index.module.scss"),M=i.n(p),j=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),R=i.n(j),T=function(Z){var Q=Z.data,ce=Q||{},$=ce.remainingProjectCount,ee=ce.remainingDeviceCount,G=Object(u.a)(),z=[{title:G("remain.project.quota"),num:b.a.max([$,0])},{title:G("remain.device.quota"),num:b.a.max([ee,0])}];return Object(j.jsx)(y.a,{className:M.a.device,children:z==null?void 0:z.map(function(ue){var de=ue.title,J=ue.num;return Object(j.jsxs)(U.i,{className:M.a.deviceItem,children:[Object(j.jsx)(U.i,{className:M.a.deviceTitle,children:de}),Object(j.jsx)(U.i,{className:M.a.deviceNum,children:Object(j.jsx)(U.i,{className:"".concat(M.a.num," ").concat(!(Q!=null&&Q.oem)),children:J})})]},de+J)})})};f.a=T},"./src/pages/base/components/ComboHead/Time/index.module.scss":function(P,f,i){P.exports={timeLeft:"index-module__timeLeft___D-mEW",timeLeftTip:"index-module__timeLeftTip___dEKCV",tipImg:"index-module__tipImg___cDK2z",popover:"index-module__popover___D+8oe",arrow:"index-module__arrow___LH9Qy",inner:"index-module__inner___C+BAQ","inner-wrapper":"index-module__inner-wrapper___VOZVR",content:"index-module__content___xkU24",visible:"index-module__visible___KBEKD"}},"./src/pages/base/components/ComboHead/Time/index.tsx":function(P,f,i){"use strict";i.d(f,"c",function(){return G}),i.d(f,"a",function(){return z}),i.d(f,"b",function(){return ue});var g=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),v=i("./node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js"),y=i("./node_modules/@babel/runtime/helpers/esm/extends.js"),u=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),U=i("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),B=i("./node_modules/react/cjs/react.production.min.js"),b=i.n(B),p=i("./node_modules/classnames/index.js"),M=i.n(p),j=i("./src/pages/base/components/ComboHead/Time/index.module.scss"),R=i.n(j),T=i("./src/utils/utils.ts"),w=i("./src/utils/i18n.ts"),Z=i("./node_modules/@tarojs/components/mini/index.js"),Q=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),ce=i.n(Q),$=["edition","timestamp","className"],ee={ordinary:i("./src/common/img/icon_oridinary.png"),advanced:i("./src/common/img/icon_advanced.png"),profession:i("./src/common/img/icon_profession.png")},G=function(J){var re=new Date,be=J*1-re.getTime(),Te=Math.floor(be/(1e3*3600*24));return Te},z=function(J){var re=J.edition,be=J.timestamp,Te=J.className,De=Object(U.a)(J,$),Ee=Object(w.a)();return Object(Q.jsxs)(Z.i,Object(u.a)(Object(u.a)({className:M()(R.a.timeLeft)},De),{},{children:[re!==1&&Ee("useTime1").replace(/\s/g," "),Ee("useTime2",{day:G(be)}).replace(/\s/g," ")]}))},ue=function(J){var re=Object(y.a)({},(Object(v.a)(J),J)),be=re.timestamp,Te=re.className,De=re.children,Ee=re.version,he=Ee===void 0?"":Ee,Me=Object(B.useState)(!1),Ae=Object(g.a)(Me,2),Re=Ae[0],Ge=Ae[1],q=Object(B.useState)({top:0,left:0}),te=Object(g.a)(q,2),L=te[0],D=te[1],K=Object(B.useRef)(null),V=Object(w.a)(),se=function(){Ge(!Re)};return Object(B.useLayoutEffect)(function(){var le,xe;if(K.current){var Pe={top:K==null||(le=K.current)===null||le===void 0?void 0:le.offsetTop,left:K==null||(xe=K.current)===null||xe===void 0?void 0:xe.offsetLeft};D(Pe)}},[]),Object(Q.jsxs)(Z.i,{className:M()(R.a.timeLeftTip,Te),children:[De,Object(T.a)(be),V("expire"),Object(Q.jsx)(Z.e,{className:R.a.tipImg,src:ee[he],onClick:se,ref:K}),Object(Q.jsxs)(Z.i,{className:"".concat(R.a.popover," ").concat(Re&&R.a.visible),style:{top:"".concat((L==null?void 0:L.top)+22,"px")},children:[Object(Q.jsx)(Z.i,{className:R.a.arrow,style:{left:"".concat((L==null?void 0:L.left)+3,"px")}}),Object(Q.jsx)(Z.i,{className:R.a.inner,children:Object(Q.jsx)(Z.i,{className:R.a.innerWrapper,children:Object(Q.jsx)(Z.i,{className:R.a.content,children:V("expireDesc").replace(/\s/g," ")})})})]})]})}},"./src/pages/base/components/ComboHead/index.module.scss":function(P,f,i){P.exports={version:"index-module__version___G6ZcF",ordinary:"index-module__ordinary___8FAIA",park:"index-module__park___JHEtj",advanced:"index-module__advanced___dHzcO",indoor:"index-module__indoor___bUfox",profession:"index-module__profession___yG3-D",outdoor:"index-module__outdoor___LugzF",ordinaryTip:"index-module__ordinaryTip___Dx0sg",parkTip:"index-module__parkTip___1Mp1b",advancedTip:"index-module__advancedTip___-Mloy",indoorTip:"index-module__indoorTip___4Gm74",professionTip:"index-module__professionTip___mzyXo",outdoorTip:"index-module__outdoorTip___gqsgg",content:"index-module__content___QWYxk",title:"index-module__title___YqRJ0",desc:"index-module__desc___oKhGq",versionBox:"index-module__versionBox___KYpcm",comboName:"index-module__comboName___oNMdA","comboName-ordinary":"index-module__comboName-ordinary___I3jlU","comboName-advanced":"index-module__comboName-advanced___2YeAQ","comboName-profession":"index-module__comboName-profession___TTP-P","comboName-park":"index-module__comboName-park___aBRpU","comboName-indoor":"index-module__comboName-indoor___7-F7D","comboName-outdoor":"index-module__comboName-outdoor___VGL1z",versionImg:"index-module__versionImg___G8+nV","content-ordinary":"index-module__content-ordinary___4kAzB","content-park":"index-module__content-park___knsIb","content-advanced":"index-module__content-advanced___ynjIo","content-indoor":"index-module__content-indoor___0yp8Z","content-profession":"index-module__content-profession___0qr0v","content-outdoor":"index-module__content-outdoor___p65At",wrap:"index-module__wrap___LZrir",tipWrap:"index-module__tipWrap___9OAdH"}},"./src/pages/base/components/ComboHead/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),v=i("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),y=i("./node_modules/react/cjs/react.production.min.js"),u=i.n(y),U=i("./node_modules/classnames/index.js"),B=i.n(U),b=i("./src/pages/base/components/ComboHead/Time/index.tsx"),p=i("./node_modules/@tarojs/components/mini/index.js"),M=i("./src/pages/base/components/ComboHead/index.module.scss"),j=i.n(M),R=i("./src/pages/base/components/ComboHead/Device/index.tsx"),T=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),w=i.n(T),Z=["data","className"],Q=function($){var ee=$.data,G=$.className,z=Object(v.a)($,Z),ue=ee||{},de=ue.comboSingleDetailVO,J=ue.expireSec,re=ue.url,be=ue.merchantName,Te=ue.edition,De=Te===void 0?0:Te,Ee=ue.oem,he=de||{},Me=he.version,Ae=Object(b.c)(J),Re=Object(y.useMemo)(function(){return ee!=null&&ee.versionInfo?ee==null?void 0:ee.versionInfo:[{versionName:de==null?void 0:de.name,versionCode:de==null?void 0:de.version}]},[ee,de]);return Object(T.jsxs)(p.i,{children:[Object(T.jsxs)(p.i,Object(g.a)(Object(g.a)({className:B()(j.a.version,G)},z),{},{children:[!Ee&&Ae<8&&Object(T.jsx)(b.a,{edition:De,timestamp:J}),Object(T.jsxs)(p.i,{className:"".concat(j.a.content),children:[Object(T.jsxs)(p.i,{children:[Object(T.jsx)(p.i,{className:j.a.title,children:be}),!(ee!=null&&ee.oem)&&Object(T.jsxs)(p.i,{children:[Object(T.jsx)(p.i,{className:j.a.versionBox,children:Re.map(function(Ge){return Object(T.jsx)(p.i,{className:"".concat(j.a.comboName),children:Ge==null?void 0:Ge.versionName},Ge.versionCode)})}),Object(T.jsx)(b.b,{className:B()(j.a.tipWrap),style:{background:"none"},timestamp:J,version:Me})]})]}),!(ee!=null&&ee.oem)&&Object(T.jsx)(p.e,{src:re,className:j.a.versionImg})||null]})]})),Object(T.jsx)(R.a,{data:ee})]})};f.a=Q},"./src/pages/base/index.tsx":function(P,f,i){"use strict";i.r(f);var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),v=i("./node_modules/babel-loader/lib/index.js!./src/pages/base/index.tsx"),y={navigationBarTitleText:"",navigationBarBackgroundColor:"#574e55",navigationBarTextStyle:"white"},u=Page(Object(g.createPageConfig)(v.a,"pages/base/index",{root:{cn:[]}},y||{}));f.default=v.a},"./src/utils/utils.ts":function(P,f,i){"use strict";i.d(f,"a",function(){return g});function g(v){var y=new Date(v),u="".concat(y.getFullYear(),"-"),U="".concat(y.getMonth()+1<10?"0".concat(y.getMonth()+1):y.getMonth()+1,"-"),B="".concat(y.getDate()," ");return u+U+B}}},[["./src/pages/base/index.tsx","runtime","taro","vendors","common"]]])});var Gc=Bo(()=>{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["pages/choose/index"],{"./node_modules/babel-loader/lib/index.js!./src/pages/choose/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),v=i("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),y=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),u=i("./node_modules/react/cjs/react.production.min.js"),U=i.n(u),B=i("./node_modules/@tarojs/taro/index.js"),b=i.n(B),p=i("./src/api/index.ts"),M=i("./src/utils/i18n.ts"),j=i("./src/pages/choose/index.module.scss"),R=i.n(j),T=i("./src/pages/choose/VersionContent/index.tsx"),w=i("./node_modules/taro-ui/lib/components/tabs/index.js"),Z=i("./node_modules/taro-ui/lib/components/tabs-pane/index.js"),Q=i("./src/components/BasePage/index.tsx"),ce=i("./src/components/BaseModal/index.tsx"),$=i("./node_modules/@tarojs/components/mini/index.js"),ee=i("./node_modules/lodash/lodash.js"),G=i.n(ee),z=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),ue=i.n(z),de=function(){var re,be=Object(M.a)(),Te=Object(B.getCurrentInstance)(),De=Te.router,Ee=(De==null?void 0:De.params)||{},he=Ee.version,Me=he===void 0?"ordinary":he,Ae=Ee.method,Re=Ae===void 0?"chose":Ae;console.log("version: ",Me);var Ge=Object(u.useState)([]),q=Object(y.a)(Ge,2),te=q[0],L=q[1],D=Object(u.useState)([]),K=Object(y.a)(D,2),V=K[0],se=K[1],le=Object(u.useState)(!1),xe=Object(y.a)(le,2),Pe=xe[0],$e=xe[1],He=Object(u.useState)([]),Je=Object(y.a)(He,2),ut=Je[0],at=Je[1],tt=Object(u.useState)(0),Ct=Object(y.a)(tt,2),Kt=Ct[0],Jt=Ct[1],cn=function(){var Qe=Object(v.a)(Object(g.a)().mark(function Ne(){var Se;return Object(g.a)().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.next=2,Object(p.c)();case 2:Se=W.sent,at(Se),Se&&se(Se==null?void 0:Se.map(function(m){return{title:m.name}}));case 5:case"end":return W.stop()}},Ne)}));return function(){return Qe.apply(this,arguments)}}();Object(B.useDidShow)(function(){ty.hideMenuButton(),cn()}),Object(u.useLayoutEffect)(function(){var Qe=be(Re==="change"?"allCombo":"choseTitle");b.a.setNavigationBarTitle({title:Qe})},[]),Object(u.useLayoutEffect)(function(){L(Me==null?void 0:Me.split(","))},[Me]);var Ln=function(Ne){Jt(Ne)},wt=Object(u.useMemo)(function(){if(!Object(ee.isEmpty)(ut)){var Qe=ut==null?void 0:ut.map(function(Se){return Se.version}),Ne=ut==null?void 0:ut[Kt];return console.log(Qe,Kt,Me),Re==="change"&&(Ne.buttonWord=te!=null&&te.includes(Qe[Kt])?be("using"):""),Ne.curVersionStr=Qe,Ne}},[ut,te,Kt,Re]),bn=function(){var Qe=Object(v.a)(Object(g.a)().mark(function Ne(){var Se;return Object(g.a)().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(wt!=null&&wt.trail){W.next=3;break}return $e(!0),W.abrupt("return");case 3:return b.a.showLoading({title:be("loading")}),W.next=6,Object(p.g)({version:wt==null?void 0:wt.version});case 6:Se=W.sent,b.a.hideLoading(),Se&&(b.a.showToast({title:be("optionSuccess")}),ty.exitMiniProgram());case 9:case"end":return W.stop()}},Ne)}));return function(){return Qe.apply(this,arguments)}}();return Object(z.jsxs)(Q.a,{footerConfig:wt!=null&&wt.buttonWord?{primaryButtonText:wt==null?void 0:wt.buttonWord,primaryButtonDisabled:Re==="change"&&(te==null?void 0:te.includes(wt==null||(re=wt.curVersionStr)===null||re===void 0?void 0:re[Kt])),onPrimaryButtonClick:bn}:void 0,children:[Object(z.jsx)(w.a,{current:Kt,scroll:!0,tabList:V,onClick:Ln,children:ut==null?void 0:ut.map(function(Qe,Ne){return Object(z.jsx)(Z.a,{current:Kt,index:Ne,children:Object(z.jsx)(T.a,{data:Qe,index:Ne},(Qe==null?void 0:Qe.version)||Ne)},Qe.version)})}),Object(z.jsx)(ce.a,{isOpened:Pe,customContent:Object(z.jsxs)($.i,{children:[Object(z.jsxs)($.i,{className:R.a.customContent,children:[be("contacts"),"\uFF1A",wt==null?void 0:wt.contactPerson.name]}),Object(z.jsxs)($.i,{className:R.a.customContent,children:[be("email"),"\uFF1A",wt==null?void 0:wt.contactPerson.email.replace(/\s/g," ")]}),Object(z.jsxs)($.i,{className:R.a.customContent,children:[be("contactInformation"),"\uFF1A",wt==null?void 0:wt.contactPerson.phone]})]}),title:be("btnConsult").replace(/\s/g," "),onConfirm:function(){return $e(!1)},showCancel:!1})]})};f.a=de},"./node_modules/taro-ui/lib/components/divider/index.js":function(P,f,i){"use strict";i.d(f,"a",function(){return w});var g=i("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),v=i("./node_modules/@babel/runtime/helpers/esm/createClass.js"),y=i("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=i("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),U=i("./node_modules/classnames/index.js"),B=i.n(U),b=i("./node_modules/prop-types/index.js"),p=i.n(b),M=i("./node_modules/react/cjs/react.production.min.js"),j=i.n(M),R=i("./node_modules/@tarojs/components/mini/index.js"),T=i("./node_modules/taro-ui/lib/common/utils.js"),w=function(Z){Object(y.a)(ce,Z);var Q=Object(u.a)(ce);function ce(){return Object(g.a)(this,ce),Q.apply(this,arguments)}return Object(v.a)(ce,[{key:"render",value:function(){var ee=this.props,G=ee.className,z=ee.customStyle,ue=ee.content,de=ee.height,J=ee.fontColor,re=ee.fontSize,be=ee.lineColor,Te={height:de?"".concat(Object(T.d)(Number(de))):""},De={color:J,fontSize:re?"".concat(Object(T.d)(Number(re))):""},Ee={backgroundColor:be};return j.a.createElement(R.i,{className:B()("at-divider",G),style:Object(T.c)(Te,z)},j.a.createElement(R.i,{className:"at-divider__content",style:De},ue===""?this.props.children:ue),j.a.createElement(R.i,{className:"at-divider__line",style:Ee}))}}]),ce}(j.a.Component);w.defaultProps={content:"",height:0,fontColor:"",fontSize:0,lineColor:""},w.propTypes={customStyle:p.a.oneOfType([p.a.object,p.a.string]),className:p.a.oneOfType([p.a.array,p.a.string]),content:p.a.string,height:p.a.oneOfType([p.a.number,p.a.string]),fontColor:p.a.string,fontSize:p.a.oneOfType([p.a.number,p.a.string]),lineColor:p.a.string}},"./node_modules/taro-ui/lib/components/tabs-pane/index.js":function(P,f,i){"use strict";i.d(f,"a",function(){return T});var g=i("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),v=i("./node_modules/@babel/runtime/helpers/esm/createClass.js"),y=i("./node_modules/@babel/runtime/helpers/esm/inherits.js"),u=i("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),U=i("./node_modules/classnames/index.js"),B=i.n(U),b=i("./node_modules/prop-types/index.js"),p=i.n(b),M=i("./node_modules/react/cjs/react.production.min.js"),j=i.n(M),R=i("./node_modules/@tarojs/components/mini/index.js"),T=function(w){Object(y.a)(Q,w);var Z=Object(u.a)(Q);function Q(){return Object(g.a)(this,Q),Z.apply(this,arguments)}return Object(v.a)(Q,[{key:"render",value:function(){var $=this.props,ee=$.customStyle,G=$.className,z=$.tabDirection,ue=$.index,de=$.current;return j.a.createElement(R.i,{className:B()({"at-tabs-pane":!0,"at-tabs-pane--vertical":z==="vertical","at-tabs-pane--active":ue===de,"at-tabs-pane--inactive":ue!==de},G),style:ee},this.props.children)}}]),Q}(j.a.Component);T.defaultProps={customStyle:"",className:"",tabDirection:"horizontal",index:0,current:0},T.propTypes={customStyle:p.a.oneOfType([p.a.object,p.a.string]),className:p.a.oneOfType([p.a.array,p.a.string]),tabDirection:p.a.oneOf(["horizontal","vertical"]),index:p.a.number,current:p.a.number}},"./node_modules/taro-ui/lib/components/tabs/index.js":function(P,f,i){"use strict";(function(g){i.d(f,"a",function(){return z});var v=i("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),y=i("./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),u=i("./node_modules/@babel/runtime/helpers/esm/createClass.js"),U=i("./node_modules/@babel/runtime/helpers/esm/inherits.js"),B=i("./node_modules/@babel/runtime/helpers/esm/createSuper.js"),b=i("./node_modules/classnames/index.js"),p=i.n(b),M=i("./node_modules/prop-types/index.js"),j=i.n(M),R=i("./node_modules/react/cjs/react.production.min.js"),T=i.n(R),w=i("./node_modules/@tarojs/components/mini/index.js"),Z=i("./node_modules/@tarojs/taro/index.js"),Q=i.n(Z),ce=i("./node_modules/taro-ui/lib/common/utils.js"),$=Q.a.getEnv(),ee=100,G=10,z=function(ue){Object(U.a)(J,ue);var de=Object(B.a)(J);function J(re){var be;return Object(y.a)(this,J),be=de.call(this,re),be.updateState=function(Te){if(be.props.scroll)switch($){case Q.a.ENV_TYPE.WEAPP:case Q.a.ENV_TYPE.ALIPAY:case Q.a.ENV_TYPE.SWAN:{var De=Math.max(Te-1,0);be.setState({_scrollIntoView:"tab".concat(be._tabId).concat(De)});break}case Q.a.ENV_TYPE.WEB:{var Ee=Math.max(Te-1,0),he=be.tabHeaderRef.childNodes[Ee];he&&be.setState({_scrollTop:he.offsetTop,_scrollLeft:he.offsetLeft});break}default:{console.warn("AtTab \u7EC4\u4EF6\u5728\u8BE5\u73AF\u5883\u8FD8\u672A\u9002\u914D");break}}},be.state={_scrollLeft:0,_scrollTop:0,_scrollIntoView:""},be._tabId=Object(ce.b)()?"tabs-AOTU2018":Object(ce.e)(),be._touchDot=0,be._timer=null,be._interval=0,be._isMoving=!1,be}return Object(u.a)(J,[{key:"handleClick",value:function(be,Te){this.props.onClick(be,Te)}},{key:"handleTouchStart",value:function(be){var Te=this,De=this.props,Ee=De.swipeable,he=De.tabDirection;!Ee||he==="vertical"||(this._touchDot=be.touches[0].pageX,this._timer=setInterval(function(){Te._interval++},100))}},{key:"handleTouchMove",value:function(be){var Te=this.props,De=Te.swipeable,Ee=Te.tabDirection,he=Te.current,Me=Te.tabList;if(!(!De||Ee==="vertical")){var Ae=be.touches[0].pageX,Re=Ae-this._touchDot,Ge=Me.length;!this._isMoving&&this._interval20&&(he+1=0&&Re>=ee&&(this._isMoving=!0,this.handleClick(he-1,be)))}}},{key:"handleTouchEnd",value:function(){var be=this.props,Te=be.swipeable,De=be.tabDirection;!Te||De==="vertical"||(clearInterval(this._timer),this._interval=0,this._isMoving=!1)}},{key:"getTabHeaderRef",value:function(){$===Q.a.ENV_TYPE.WEB&&(this.tabHeaderRef=g.getElementById(this._tabId))}},{key:"UNSAFE_componentWillReceiveProps",value:function(be){be.scroll!==this.props.scroll&&this.getTabHeaderRef(),be.current!==this.props.current&&this.updateState(be.current)}},{key:"componentDidMount",value:function(){this.getTabHeaderRef(),this.updateState(this.props.current)}},{key:"componentWillUnmount",value:function(){this.tabHeaderRef=null}},{key:"render",value:function(){var be=this,Te,De=this.props,Ee=De.customStyle,he=Ee===void 0?"":Ee,Me=De.className,Ae=De.height,Re=De.tabDirection,Ge=De.animated,q=De.tabList,te=De.scroll,L=De.current,D=this.state,K=D._scrollLeft,V=D._scrollTop,se=D._scrollIntoView,le={height:Ae},xe={height:Re==="vertical"?"".concat(q.length*100,"%"):"1PX",width:Re==="horizontal"?"".concat(q.length*100,"%"):"1PX"},Pe={},$e="translate3d(0px, -".concat(L*100,"%, 0px)");Re==="horizontal"&&($e="translate3d(-".concat(L*100,"%, 0px, 0px)")),Object.assign(Pe,{transform:$e,"-webkit-transform":$e}),Ge||(Pe.transition="unset");var He=q.map(function(tt,Ct){var Kt=p()({"at-tabs__item":!0,"at-tabs__item--active":L===Ct});return T.a.createElement(w.i,{className:Kt,id:"tab".concat(be._tabId).concat(Ct),key:"at-tabs-item-".concat(Ct),onClick:be.handleClick.bind(be,Ct)},tt.title,T.a.createElement(w.i,{className:"at-tabs__item-underline"}))}),Je=p()((Te={"at-tabs":!0,"at-tabs--scroll":te},Object(v.a)(Te,"at-tabs--".concat(Re),!0),Object(v.a)(Te,"at-tabs--".concat($),!0),Te),Me),ut=Re==="horizontal",at=Re==="vertical";return T.a.createElement(w.i,{className:Je,style:Object(ce.c)(le,he)},te?T.a.createElement(w.g,{id:this._tabId,className:"at-tabs__header",style:le,scrollX:ut,scrollY:at,scrollWithAnimation:!0,scrollLeft:K,scrollTop:V,scrollIntoView:se},He):T.a.createElement(w.i,{id:this._tabId,className:"at-tabs__header"},He),T.a.createElement(w.i,{className:"at-tabs__body",onTouchStart:this.handleTouchStart.bind(this),onTouchEnd:this.handleTouchEnd.bind(this),onTouchMove:this.handleTouchMove.bind(this),style:Object(ce.c)(Pe,le)},T.a.createElement(w.i,{className:"at-tabs__underline",style:xe}),this.props.children))}}]),J}(T.a.Component);z.defaultProps={customStyle:"",className:"",tabDirection:"horizontal",height:"",current:0,swipeable:!0,scroll:!1,animated:!0,tabList:[],onClick:function(){}},z.propTypes={customStyle:j.a.oneOfType([j.a.object,j.a.string]),className:j.a.oneOfType([j.a.array,j.a.string]),height:j.a.string,tabDirection:j.a.oneOf(["horizontal","vertical"]),current:j.a.number,swipeable:j.a.bool,scroll:j.a.bool,animated:j.a.bool,tabList:j.a.array,onClick:j.a.func}}).call(this,i("./node_modules/@tarojs/runtime/dist/runtime.esm.js").document)},"./src/common/img/right-icon_advanced.png":function(P,f){P.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAABIFBMVEUAAAD//7b/////6sP+6MD/3Jz/68b/667xz4v63qj52qD21ZL02Zf315j40ZP32qP64K711pr326b01JT32aDy0Y701JTy0Ivwzoj115301Jf43af43aj64a7536z53aj85bn/68b/6cH75LX64Kv857j42qD415v32Zj+5r395bv85Lfy0ZD847T74LL12J343Kr11Zv01Zjxzony0pPz05X01Zfz0pP22aH326b115v12J/32qLwzYr75bX/7Mj/6sX/6b3/6MD/7Mj53q7/5rz/5Lr/78n315/xzon32qT115711pvz05Xz0pLxz4z43an326b22KD01Jjy0Y/957385br85Lf747T64bL54K/53qz22aH01Zjy0ZD33KbAwJPQAAAASXRSTlMAAwH+/gr+Bs8wKRkWExDv7ujm4uDb0sa9tqqpoJaPh31mTzw1KSUiHfj39fTz8evq29jWxsG9sa6koZyWi4eDfHRuXVVIQy8gn13BDgAAAQxJREFUOMvt0UdTwlAUhuGTaBoJRZqCig0Be++9d6XEnsD//xd+Z8GMIYSbYc2zuOXMO3MXlwaC3FE4V+oZhTGjqup5mG6IzZPI5TCbJZGLd1gQd9MfsHgj7j5h6ZZETr9gZY5ECt+wKuzkyR9IFOkf6bpb9wsJw9ONV6d83UQV1g3vrFVrdZTSQQ2S3v8oxR+h4H2DR8kIeRXjTt1xjmVq0/brkC5TJ2PtCY7kdpfja/qe/CIjz3AoEVNyfNmoEPOXDchL3O26bsPdNKm7UuoF8hopO3zIWhSknHqFPWubt2yUglUytt20l5tYdHQ9mJk3gNEY9WZuPTB0IpaObkwhsageqoPYiUYDffgDldk0T6sUgI0AAAAASUVORK5CYII="},"./src/common/img/right-icon_oridinaty.png":function(P,f){P.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAABF1BMVEUAAADv9//g6Pz////M2/Lm7f/M1O/B0O28xuTAy+fR2vLR2/LK0u7Cy+vK1fXd5frW3/XK1O3O1/DEzurI0ezDzum9yebDzOi6xOPI0uvCzenP2PHJ0uzM1u/Y4vfR2fHd5frk6/7i6f7c5PrY3/bL0+/e5PnH0OrB1OzEz+rf5vu/yufZ4vfN1+/U2/LQ2vLG0erL1O67xeK6xuTFzunK1e3FzurU3PPV3vW5xOPo7f/m7P/g6f3l7f/m7//V3vPf5vvg6Prc5PnM1e7EzunCzejO1/DG0Oq8x+TJ0uzAy+fR2vK/yea+yeW5xOLi6f3X3/XV3fTK1O26xePY4PbT3PPL1O3H0evf5vrk6/7Z4ffQ2fHK0+3nwWvqAAAAQnRSTlMAA/4CC/4mEc/FoTEhFQj28O3m5d3c29K9tq+pn5OKh31rT0E4LikdGhf49PPw7erp4tbEva6nmZOLg3x0Y11VSDCE6OZWAAABHUlEQVQ4y+3R2W6CUBCA4QEBoQit1r3avVW77/u+QEGgLatd3v85OidN06DiIV77XZxMJn9yLgYmktyn7G74i1TdNc/zlym6pY9XtE7vWGKZ2l2xPba3Qe8WH9D0XcpuhdrN+5++v5Wie0Mzq7Qsc/aO4h1zO6Q77QZBsCPHurmvhYFuqot25fhO07S+kiE7rRC/h7D9iJrxP8iqIECcnA/dMGxm/rtj13W/93PQby1vRJHR+CvVmoGK2A2We7oe6Q0GCK6mo2ILhhFmn9AJQ7ojMpbaAAnlM6ozwElkqHQgSa5kmqZVVyTTMs2KAslaZdu27E0LHzELo7TLL78k7EbqHHiO53mHHNAoouM4VeyosqJTVekZKc9VmBjDD6/BMHc1avJSAAAAAElFTkSuQmCC"},"./src/common/img/right-icon_profession.png":function(P,f){P.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAABPlBMVEUAAACVlZW+sY25q4pfX29tbXSHgXiAe3dnYGxZWWtsZHRxbG5mY2tsaGxKSmBgXWlmYmtJSV93cnFmYmp3cXGgloGIgXi9r43JuZGroIagmIF4c3WSiH1aWmdvb29TU2nJupKzp4mtoYaonINZV2Wil4GckoCAeXWWjn55dXOQiXyKhHmEfnaAeXV6dHNdW2h0b3FYVWRRUWNJSV9YVWRTUmNdWmdNTWBva21eXGiAenRwam+MhHmRiXuXjn+AeHVJSV/KvZKnnYPDt5Cto4i0p4iTinu7q4yzqYuXjoDUw5hubm6GgHm/s4x4cHh/eXR0b3Buam1oZWtjYGl5dHJdW2dYVmVRUGKLg3mFfnZMTGCzp4isoYahl4Gckn+WjX2QiHtJSV/EtY6nnISnnIOEfXZcWmZXVWR5c3JSUWOJ2HDhAAAAT3RSTlMAA/7+EwilJSUXC+rl2tTSv72xqpmKh2tgRTwyMBwbD/z49/X08/Hw7+7t6ufl4uDe3dnOzMjGxLixqaGemZOQi4OAfHp0VVJNNi8sKiggYVb/zAAAAQ1JREFUOMvtytdSwmAQhuGNJiKgIsXee++9997LH4g9oen934DfznhAImEZjnmPdr95qJpfl2W69v6D8pzjOEck11bD3ciuljsT3ckrGjgX3fEbGuwQ3WE6k0kPya7lHY10yu4Djcpu9xONXxRO2mkRt/OFJrtdri7V6mXadgpNeZxlWZCeLWtlp69dY2DsDu253CZPMwFy1zXxjBIFLob/exbOK8P3KKH9vUaM3/lb+t9V+AFtQbJb56exl4pV3/CI4ixDzXyy85FPKK7B8REJ+jjIOaVUbkNfVTmlIjr517NgomEzb+aX4UrJxST3k1zpo9IFm164NThR2rYdDZGcvmRHDZmx3DeoWgX9Ass2OLgisZTUAAAAAElFTkSuQmCC"},"./src/pages/choose/VersionContent/index.module.scss":function(P,f,i){P.exports={container:"index-module__container___MjmK2",version:"index-module__version___MI7yx",title:"index-module__title___76LjT",desc:"index-module__desc___8XcR7",versionImg:"index-module__versionImg___Fmidj",version_0:"index-module__version_0___5Q83Q",version_1:"index-module__version_1___ayd0N",version_2:"index-module__version_2___0mLQQ",version_3:"index-module__version_3___KfdBW",equity:"index-module__equity___YvG6g",equityTxt:"index-module__equityTxt___IKOr+",itemList:"index-module__itemList___dFoGo",column:"index-module__column___q+yAN",value:"index-module__value___IHH3X",right:"index-module__right___uutQC"}},"./src/pages/choose/VersionContent/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/react/cjs/react.production.min.js"),v=i.n(g),y=i("./src/components/container/index.tsx"),u=i("./src/utils/i18n.ts"),U=i("./src/pages/choose/VersionContent/index.module.scss"),B=i.n(U),b=i("./node_modules/@tarojs/components/mini/index.js"),p=i("./node_modules/lodash/lodash.js"),M=i.n(p),j=i("./src/common/img/right-icon_oridinaty.png"),R=i.n(j),T=i("./src/common/img/right-icon_advanced.png"),w=i.n(T),Z=i("./src/common/img/right-icon_profession.png"),Q=i.n(Z),ce=i("./node_modules/taro-ui/lib/components/divider/index.js"),$=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),ee=i.n($),G=function(ue){var de,J,re=ue.data,be=ue.index,Te=Object(u.a)(),De=[R.a,w.a,Q.a,Q.a];return Object($.jsxs)(y.a,{className:B.a.container,children:[Object($.jsx)(b.i,{className:"".concat(B.a.version," ").concat(B.a["version_".concat(be)]),children:Object($.jsxs)(b.i,{children:[Object($.jsx)(b.i,{className:B.a.title,children:re==null?void 0:re.name}),Object($.jsx)(b.i,{className:B.a.desc,children:re==null?void 0:re.desc.replace(/\s/g," ")})]})}),Object($.jsx)(ce.a,{content:Te("account"),fontColor:"#838aa0",lineColor:"#e9ecef"}),Object($.jsx)(b.i,{className:B.a.itemList,children:re!=null&&(de=re.equityList)!==null&&de!==void 0&&de.length?re==null||(J=re.equityList)===null||J===void 0?void 0:J.map(function(Ee){return Object($.jsxs)(b.i,{className:B.a.column,children:[Object($.jsx)(b.i,{className:B.a.title,children:Ee.content}),Object($.jsx)(b.i,{className:B.a.value,children:!Object(p.isEmpty)(Ee.value)&&Ee.value||Object($.jsx)(b.e,{className:B.a.right,src:De[be]})})]},Ee.contentId)}):null})]})};f.a=G},"./src/pages/choose/index.module.scss":function(P,f,i){P.exports={customContent:"index-module__customContent___YoZaU"}},"./src/pages/choose/index.tsx":function(P,f,i){"use strict";i.r(f);var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),v=i("./node_modules/babel-loader/lib/index.js!./src/pages/choose/index.tsx"),y={navigationBarTitleText:""},u=Page(Object(g.createPageConfig)(v.a,"pages/choose/index",{root:{cn:[]}},y||{}));f.default=v.a}},[["./src/pages/choose/index.tsx","runtime","taro","vendors","common"]]])});var Yc=Bo(()=>{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["pages/projectList/index"],{"./node_modules/ahooks/es/useLatest/index.js":function(P,f,i){"use strict";var g=i("./node_modules/react/cjs/react.production.min.js"),v=i.n(g);function y(u){var U=Object(g.useRef)(u);return U.current=u,U}f.a=y},"./node_modules/ahooks/es/useThrottleFn/index.js":function(P,f,i){"use strict";var g=i("./node_modules/tslib/tslib.es6.js"),v=i("./node_modules/lodash/throttle.js"),y=i.n(v),u=i("./node_modules/react/cjs/react.production.min.js"),U=i.n(u),B=i("./node_modules/ahooks/es/useLatest/index.js"),b=i("./node_modules/ahooks/es/useUnmount/index.js"),p=i("./node_modules/ahooks/es/utils/index.js"),M=i("./node_modules/ahooks/es/utils/isDev.js");function j(R,T){var w;M.a&&(Object(p.a)(R)||console.error("useThrottleFn expected parameter is a function, got ".concat(typeof R)));var Z=Object(B.a)(R),Q=(w=T==null?void 0:T.wait)!==null&&w!==void 0?w:1e3,ce=Object(u.useMemo)(function(){return y()(function(){for(var $=[],ee=0;ee=M||Ae<0||G&&Re>=w}function be(){var Me=v();if(re(Me))return Te(Me);Q=setTimeout(be,J(Me))}function Te(Me){return Q=void 0,z&&R?ue(Me):(R=T=void 0,Z)}function De(){Q!==void 0&&clearTimeout(Q),$=0,R=ce=T=Q=void 0}function Ee(){return Q===void 0?Z:Te(v())}function he(){var Me=v(),Ae=re(Me);if(R=arguments,T=this,ce=Me,Ae){if(Q===void 0)return de(ce);if(G)return clearTimeout(Q),Q=setTimeout(be,M),ue(ce)}return Q===void 0&&(Q=setTimeout(be,M)),Z}return he.cancel=De,he.flush=Ee,he}P.exports=b},"./node_modules/lodash/isObject.js":function(P,f){function i(g){var v=typeof g;return g!=null&&(v=="object"||v=="function")}P.exports=i},"./node_modules/lodash/isObjectLike.js":function(P,f){function i(g){return g!=null&&typeof g=="object"}P.exports=i},"./node_modules/lodash/isSymbol.js":function(P,f,i){var g=i("./node_modules/lodash/_baseGetTag.js"),v=i("./node_modules/lodash/isObjectLike.js"),y="[object Symbol]";function u(U){return typeof U=="symbol"||v(U)&&g(U)==y}P.exports=u},"./node_modules/lodash/now.js":function(P,f,i){var g=i("./node_modules/lodash/_root.js"),v=function(){return g.Date.now()};P.exports=v},"./node_modules/lodash/throttle.js":function(P,f,i){var g=i("./node_modules/lodash/debounce.js"),v=i("./node_modules/lodash/isObject.js"),y="Expected a function";function u(U,B,b){var p=!0,M=!0;if(typeof U!="function")throw new TypeError(y);return v(b)&&(p="leading"in b?!!b.leading:p,M="trailing"in b?!!b.trailing:M),g(U,B,{leading:p,maxWait:B,trailing:M})}P.exports=u},"./node_modules/lodash/toNumber.js":function(P,f,i){var g=i("./node_modules/lodash/_baseTrim.js"),v=i("./node_modules/lodash/isObject.js"),y=i("./node_modules/lodash/isSymbol.js"),u=NaN,U=/^[-+]0x[0-9a-f]+$/i,B=/^0b[01]+$/i,b=/^0o[0-7]+$/i,p=parseInt;function M(j){if(typeof j=="number")return j;if(y(j))return u;if(v(j)){var R=typeof j.valueOf=="function"?j.valueOf():j;j=v(R)?R+"":R}if(typeof j!="string")return j===0?j:+j;j=g(j);var T=B.test(j);return T||b.test(j)?p(j.slice(2),T?2:8):U.test(j)?u:+j}P.exports=M},"./node_modules/tslib/tslib.es6.js":function(P,f,i){"use strict";i.d(f,"a",function(){return $}),i.d(f,"b",function(){return z});var g=function(L,D){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,V){K.__proto__=V}||function(K,V){for(var se in V)Object.prototype.hasOwnProperty.call(V,se)&&(K[se]=V[se])},g(L,D)};function v(L,D){if(typeof D!="function"&&D!==null)throw new TypeError("Class extends value "+String(D)+" is not a constructor or null");g(L,D);function K(){this.constructor=L}L.prototype=D===null?Object.create(D):(K.prototype=D.prototype,new K)}var y=function(){return y=Object.assign||function(D){for(var K,V=1,se=arguments.length;V=0;Pe--)(xe=L[Pe])&&(le=(se<3?xe(le):se>3?xe(D,K,le):xe(D,K))||le);return se>3&&le&&Object.defineProperty(D,K,le),le}function B(L,D){return function(K,V){D(K,V,L)}}function b(L,D,K,V,se,le){function xe(cn){if(cn!==void 0&&typeof cn!="function")throw new TypeError("Function expected");return cn}for(var Pe=V.kind,$e=Pe==="getter"?"get":Pe==="setter"?"set":"value",He=!D&&L?V.static?L:L.prototype:null,Je=D||(He?Object.getOwnPropertyDescriptor(He,V.name):{}),ut,at=!1,tt=K.length-1;tt>=0;tt--){var Ct={};for(var Kt in V)Ct[Kt]=Kt==="access"?{}:V[Kt];for(var Kt in V.access)Ct.access[Kt]=V.access[Kt];Ct.addInitializer=function(cn){if(at)throw new TypeError("Cannot add initializers after decoration has completed");le.push(xe(cn||null))};var Jt=(0,K[tt])(Pe==="accessor"?{get:Je.get,set:Je.set}:Je[$e],Ct);if(Pe==="accessor"){if(Jt===void 0)continue;if(Jt===null||typeof Jt!="object")throw new TypeError("Object expected");(ut=xe(Jt.get))&&(Je.get=ut),(ut=xe(Jt.set))&&(Je.set=ut),(ut=xe(Jt.init))&&se.unshift(ut)}else(ut=xe(Jt))&&(Pe==="field"?se.unshift(ut):Je[$e]=ut)}He&&Object.defineProperty(He,V.name,Je),at=!0}function p(L,D,K){for(var V=arguments.length>2,se=0;se0&&le[le.length-1])&&(He[0]===6||He[0]===2)){K=0;continue}if(He[0]===3&&(!le||He[1]>le[0]&&He[1]=L.length&&(L=void 0),{value:L&&L[V++],done:!L}}};throw new TypeError(D?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(L,D){var K=typeof Symbol=="function"&&L[Symbol.iterator];if(!K)return L;var V=K.call(L),se,le=[],xe;try{for(;(D===void 0||D-- >0)&&!(se=V.next()).done;)le.push(se.value)}catch(Pe){xe={error:Pe}}finally{try{se&&!se.done&&(K=V.return)&&K.call(V)}finally{if(xe)throw xe.error}}return le}function ee(){for(var L=[],D=0;D1||Pe(at,tt)})})}function Pe(at,tt){try{$e(V[at](tt))}catch(Ct){ut(le[0][3],Ct)}}function $e(at){at.value instanceof ue?Promise.resolve(at.value.v).then(He,Je):ut(le[0][2],at)}function He(at){Pe("next",at)}function Je(at){Pe("throw",at)}function ut(at,tt){at(tt),le.shift(),le.length&&Pe(le[0][0],le[0][1])}}function J(L){var D,K;return D={},V("next"),V("throw",function(se){throw se}),V("return"),D[Symbol.iterator]=function(){return this},D;function V(se,le){D[se]=L[se]?function(xe){return(K=!K)?{value:ue(L[se](xe)),done:!1}:le?le(xe):xe}:le}}function re(L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var D=L[Symbol.asyncIterator],K;return D?D.call(L):(L=typeof ce=="function"?ce(L):L[Symbol.iterator](),K={},V("next"),V("throw"),V("return"),K[Symbol.asyncIterator]=function(){return this},K);function V(le){K[le]=L[le]&&function(xe){return new Promise(function(Pe,$e){xe=L[le](xe),se(Pe,$e,xe.done,xe.value)})}}function se(le,xe,Pe,$e){Promise.resolve($e).then(function(He){le({value:He,done:Pe})},xe)}}function be(L,D){return Object.defineProperty?Object.defineProperty(L,"raw",{value:D}):L.raw=D,L}var Te=Object.create?function(L,D){Object.defineProperty(L,"default",{enumerable:!0,value:D})}:function(L,D){L.default=D};function De(L){if(L&&L.__esModule)return L;var D={};if(L!=null)for(var K in L)K!=="default"&&Object.prototype.hasOwnProperty.call(L,K)&&Z(D,L,K);return Te(D,L),D}function Ee(L){return L&&L.__esModule?L:{default:L}}function he(L,D,K,V){if(K==="a"&&!V)throw new TypeError("Private accessor was defined without a getter");if(typeof D=="function"?L!==D||!V:!D.has(L))throw new TypeError("Cannot read private member from an object whose class did not declare it");return K==="m"?V:K==="a"?V.call(L):V?V.value:D.get(L)}function Me(L,D,K,V,se){if(V==="m")throw new TypeError("Private method is not writable");if(V==="a"&&!se)throw new TypeError("Private accessor was defined without a setter");if(typeof D=="function"?L!==D||!se:!D.has(L))throw new TypeError("Cannot write private member to an object whose class did not declare it");return V==="a"?se.call(L,K):se?se.value=K:D.set(L,K),K}function Ae(L,D){if(D===null||typeof D!="object"&&typeof D!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof L=="function"?D===L:L.has(D)}function Re(L,D,K){if(D!=null){if(typeof D!="object"&&typeof D!="function")throw new TypeError("Object expected.");var V;if(K){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");V=D[Symbol.asyncDispose]}if(V===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");V=D[Symbol.dispose]}if(typeof V!="function")throw new TypeError("Object not disposable.");L.stack.push({value:D,dispose:V,async:K})}else K&&L.stack.push({async:!0});return D}var Ge=typeof SuppressedError=="function"?SuppressedError:function(L,D,K){var V=new Error(K);return V.name="SuppressedError",V.error=L,V.suppressed=D,V};function q(L){function D(V){L.error=L.hasError?new Ge(V,L.error,"An error was suppressed during disposal."):V,L.hasError=!0}function K(){for(;L.stack.length;){var V=L.stack.pop();try{var se=V.dispose&&V.dispose.call(V.value);if(V.async)return Promise.resolve(se).then(K,function(le){return D(le),K()})}catch(le){D(le)}}if(L.hasError)throw L.error}return K()}var te={__extends:v,__assign:y,__rest:u,__decorate:U,__param:B,__metadata:R,__awaiter:T,__generator:w,__createBinding:Z,__exportStar:Q,__values:ce,__read:$,__spread:ee,__spreadArrays:G,__spreadArray:z,__await:ue,__asyncGenerator:de,__asyncDelegator:J,__asyncValues:re,__makeTemplateObject:be,__importStar:De,__importDefault:Ee,__classPrivateFieldGet:he,__classPrivateFieldSet:Me,__classPrivateFieldIn:Ae,__addDisposableResource:Re,__disposeResources:q}},"./src/common/img/check-act.png":function(P,f){P.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTDha80CA/zla8zha9Dha8zta9Dha9Dda8zha9EBA/zhY8zha8zla9Dha89D8Q0kAAAAOdFJOUwCvBE3YhxH4X8AEJPOQQlFXjwAAATVJREFUOMtjYCAbsJlOOffGMTgBXVxZ/B0YFBqginP4vYOCJygy3PPewcHLDUgS7e+QQAVCnPUdCgiAS9xDlXiLQwNCSx+6xAuok+rQJZ5DHMb5DgNMAEvYYUpAzPLDlHiiABRnfocFgMKFEZuEAFAiHVVILBFElmHY/XABG4h6DJSIQ5GQYgBLPAVKyKFqYFAEhz26a6UYmMAKnwAlzmHR8O4NUAIqlCaHpOHdO7jEM5BSuAawxDmoBFAtQsMbuOUPFRgUkTSALIcmECEGri64hncPER4EatGCawB7EBYkQgwIDeAggQUiyBa4h8qQg10IoQEc7PCIehmJGlFMWKK2BHuygtiNJ/ngTHA4kyjuRI0zG+DOODizGu7MycCMyM4NqBmdGVYAWGEWGSLn3nhiFhnEAwDeVYV7MOoncwAAAABJRU5ErkJggg=="},"./src/common/img/check.png":function(P,f){P.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURQAAAEdwTAAAAAAAAAAAAAAAAAAAAKRKkeEAAAAHdFJOUzMAEQgkLBvYy480AAAA90lEQVQ4y62UTQ+CMAyGXxE8O0DOEBPPzugdY7xjNJ7FxP//Fyzla4680YM9bX22tuvawhDBd7A5A7fnBMQlVMLiE8QVOokKFyQlBgmtA3JR3NfW7F6yCEaQyfbUWtjLsh7AY9ArWfQg66/3ZusO5IjsCJJKjwlIgKv75gNgFaS6cK4ARwW566H1EiiomgOupIgaEHuW1FYhIEXop7wUGzBLzH2wxUxAjosPVuIdko/aB5lkBWKw8EEsbiHRWh8kEi8MpkB0Csy/AHVOw6UPpCmhSaRppx9Fv5YXAy0fWnC0RHlR0zbgjUNbjTcnbWc+APjI+H36vAFmlFC7PkHAEgAAAABJRU5ErkJggg=="},"./src/common/img/icon_delete_N4.svg":function(P,f,i){P.exports=i.p+"common/img/icon_delete_N4.svg"},"./src/common/img/icon_search.svg":function(P,f,i){P.exports=i.p+"common/img/icon_search.svg"},"./src/components/SearchBar/index.module.scss":function(P,f,i){P.exports={searchBarWrapper:"index-module__searchBarWrapper___59Fb7",searchContainer:"index-module__searchContainer___hDe5u",searchIcon:"index-module__searchIcon___huRbR",searchInput:"index-module__searchInput___ARHZs",deleteIcon:"index-module__deleteIcon___sfAL9",inputPlaceholder:"index-module__inputPlaceholder___6WbTc",cancelSearch:"index-module__cancelSearch___2p-WD",searchFixed:"index-module__searchFixed___Am-GP"}},"./src/components/SearchBar/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),v=i("./node_modules/@tarojs/components/mini/index.js"),y=i("./node_modules/ahooks/es/useThrottleFn/index.js"),u=i("./node_modules/react/cjs/react.production.min.js"),U=i.n(u),B=i("./src/components/SearchBar/index.module.scss"),b=i.n(B),p=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),M=i.n(p),j=function(T){var w=T.placeholder,Z=w===void 0?"":w,Q=T.onSearch,ce=T.maxLength,$=ce===void 0?20:ce,ee=T.searchOnChange,G=ee===void 0?!1:ee,z=T.searchOnClear,ue=z===void 0?!1:z,de=T.focus,J=de===void 0?!1:de,re=T.fixed,be=re===void 0?!1:re,Te=Object(u.useState)(""),De=Object(g.a)(Te,2),Ee=De[0],he=De[1],Me=Object(y.a)(function(Re){he(Re.detail.value.substring(0,$)),Re.detail.value.length<=$&&G&&(Q==null||Q(Re.detail.value))},{wait:300}),Ae=Me.run;return Object(p.jsx)(v.i,{className:"".concat(b.a.searchBarWrapper," ").concat(be?b.a.searchFixed:""),children:Object(p.jsxs)(v.i,{className:b.a.searchContainer,children:[Object(p.jsx)(v.e,{className:b.a.searchIcon,src:i("./src/common/img/icon_search.svg")}),Object(p.jsx)(v.f,{className:b.a.searchInput,placeholder:Z,confirmType:"search",placeholderClass:b.a.inputPlaceholder,onConfirm:function(){Q&&Q(Ee)},value:Ee,onInput:Ae,maxlength:$,focus:J}),Ee&&Object(p.jsx)(v.e,{className:b.a.deleteIcon,src:i("./src/common/img/icon_delete_N4.svg"),onClick:function(){he(""),ue&&(Q==null||Q(""))}})]})})};f.a=j},"./src/pages/projectList/index.module.scss":function(P,f,i){P.exports={clearfix:"index-module__clearfix___EHL3i",ellipsis:"index-module__ellipsis___bBFv9","at-button":"index-module__at-button___9VwRm","at-button--secondary":"index-module__at-button--secondary___ZMIog","at-textarea":"index-module__at-textarea___3J-Go","ty-textarea-div":"index-module__ty-textarea-div___8j3zE","ty-textarea-raw-textarea":"index-module__ty-textarea-raw-textarea___tG1Qm","at-checkbox__option--selected":"index-module__at-checkbox__option--selected___lxePD","at-checkbox__icon-cnt":"index-module__at-checkbox__icon-cnt___FQNup",link:"index-module__link___aA70K","at-tabs__item--active":"index-module__at-tabs__item--active___28q+c","at-tabs__item-underline":"index-module__at-tabs__item-underline___MOeWY","at-toast":"index-module__at-toast___v2sqw","toast-page":"index-module__toast-page___r3nB9","at-action-sheet__container":"index-module__at-action-sheet__container___NsCSl","at-action-sheet__item":"index-module__at-action-sheet__item___lv3Mg","at-icon-loading":"index-module__at-icon-loading___+GiZ6",rotate:"index-module__rotate___2hDXy","at-checkbox":"index-module__at-checkbox___v2D-g","at-checkbox__option--disabled":"index-module__at-checkbox__option--disabled___F97CZ","at-activity-indicator":"index-module__at-activity-indicator___uF2FL","at-button--disabled":"index-module__at-button--disabled___TvMSU",tab:"index-module__tab___ZTql7","at-tabs__body":"index-module__at-tabs__body___jmDlj","at-tabs-pane--active":"index-module__at-tabs-pane--active___dVlfL","at-tabs__item":"index-module__at-tabs__item___gaAXj",projectList:"index-module__projectList___6JGnl",list:"index-module__list___2Ap1Q",listItem:"index-module__listItem___mRUzA",check:"index-module__check___Cdz7S",disabled:"index-module__disabled___uZwJa",checkIcon:"index-module__checkIcon___SDFg5",groupName:"index-module__groupName___4ZuN2",mb56:"index-module__mb56___KcFYM"}},"./src/pages/projectList/index.tsx":function(P,f,i){"use strict";i.r(f);var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),v=i("./node_modules/babel-loader/lib/index.js!./src/pages/projectList/index.tsx"),y={navigationBarTitleText:""},u=Page(Object(g.createPageConfig)(v.a,"pages/projectList/index",{root:{cn:[]}},y||{}));f.default=v.a}},[["./src/pages/projectList/index.tsx","runtime","taro","vendors","common"]]])});var Qc=Bo(()=>{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["pages/registerSuccess/index"],{"./node_modules/babel-loader/lib/index.js!./src/pages/registerSuccess/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),v=i("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),y=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),u=i("./node_modules/react/cjs/react.production.min.js"),U=i.n(u),B=i("./src/utils/i18n.ts"),b=i("./node_modules/@tarojs/components/mini/index.js"),p=i("./src/pages/registerSuccess/index.module.scss"),M=i.n(p),j=i("./src/components/container/index.tsx"),R=i("./src/api/index.ts"),T=i("./node_modules/@tarojs/taro/index.js"),w=i.n(T),Z=i("./src/pages/registerSuccess/Cover/index.tsx"),Q=i("./src/common/img/img_shenh.png"),ce=i.n(Q),$=i("./src/components/BaseModal/index.tsx"),ee=i("./src/utils/getLanguage.ts"),G=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),z=i.n(G),ue=function(){var J=Object(B.a)(),re=Object(u.useState)([]),be=Object(y.a)(re,2),Te=be[0],De=be[1],Ee=Object(u.useState)(void 0),he=Object(y.a)(Ee,2),Me=he[0],Ae=he[1],Re=Object(u.useState)(!1),Ge=Object(y.a)(Re,1),q=Ge[0],te=Object(u.useState)(""),L=Object(y.a)(te,2),D=L[0],K=L[1],V=Object(u.useState)(""),se=Object(y.a)(V,2),le=se[0],xe=se[1],Pe=Object(u.useState)(null),$e=Object(y.a)(Pe,2),He=$e[0],Je=$e[1],ut=Object(u.useState)(!1),at=Object(y.a)(ut,2),tt=at[0],Ct=at[1],Kt=Object(u.useState)(!1),Jt=Object(y.a)(Kt,2),cn=Jt[0],Ln=Jt[1],wt=Object(u.useState)(!1),bn=Object(y.a)(wt,2),Qe=bn[0],Ne=bn[1],Se=Object(u.useState)({}),st=Object(y.a)(Se,2),W=st[0],m=st[1],E=Object(u.useState)(""),x=Object(y.a)(E,2),F=x[0],H=x[1];Object(T.useDidShow)(function(){w.a.setNavigationBarTitle({title:J("choosePlan")}),ty.hideMenuButton(),ty.hideHomeButton(),ty.setNavigationBarBack({type:"custom"}),ty.onAppClose(function(){return console.log("----ty.onAppClose----"),console.log("hasChooseVersion: ",cn),cn&&ty.exitMiniProgram(),!1})});var ne=function(){var lt=Object(v.a)(Object(g.a)().mark(function pt(){var oe,ie,fe,Le,ze,ot;return Object(g.a)().wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Ut.next=2,Object(R.h)();case 2:if(oe=Ut.sent,ie=oe.showType,ie!==3){Ut.next=7;break}return ty.exitMiniProgram(),Ut.abrupt("return");case 7:if(fe=ie!=null?ie:2,fe!==2){Ut.next=15;break}return Ut.next=11,Object(R.b)().catch(function(){return{}});case 11:Le=Ut.sent,ze=Le.status,ot=Le.reason,ze===1?fe=1:ze===0&&(fe=10,H(ot||""));case 15:Je(fe);case 16:case"end":return Ut.stop()}},pt)}));return function(){return lt.apply(this,arguments)}}(),_e=function(){var lt=Object(v.a)(Object(g.a)().mark(function pt(){var oe;return Object(g.a)().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return fe.next=2,Object(R.e)();case 2:oe=fe.sent,oe&&(K(oe.companyName),xe(oe.account),console.log("getRegisterInfo: ",oe),De(oe.comboList));case 4:case"end":return fe.stop()}},pt)}));return function(){return lt.apply(this,arguments)}}();Object(u.useLayoutEffect)(function(){ne(),_e()},[]);var je=function(pt){return Object(G.jsxs)(b.i,{children:[Object(G.jsxs)(b.i,{children:[J("contacts"),"\uFF1A",pt==null?void 0:pt.name]}),Object(G.jsxs)(b.i,{className:M.a.email,children:[J("email"),"\uFF1A",pt==null?void 0:pt.email]}),Object(G.jsxs)(b.i,{children:[J("contactInformation"),"\uFF1A",pt==null?void 0:pt.phone]})]})},me=function(){w.a.showToast({title:J("optionSuccess"),duration:2e3,complete:function(){ty.exitMiniProgram()}})},Ie=function(){var lt=Object(v.a)(Object(g.a)().mark(function pt(oe,ie){var fe;return Object(g.a)().wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:if(oe.preventDefault(),!ie.trail){ze.next=13;break}return w.a.showLoading(),ze.next=5,Object(R.g)({version:ie==null?void 0:ie.version});case 5:fe=ze.sent,w.a.hideLoading(),Ae(fe),Ln(!0),ty.offAppClose(),me(),ze.next=15;break;case 13:m(ie==null?void 0:ie.contactPerson),Ct(!0);case 15:case"end":return ze.stop()}},pt)}));return function(oe,ie){return lt.apply(this,arguments)}}(),Ke=function(){Ne(!1),ty.lamp.logOut()},Be=function(){var lt=Object(v.a)(Object(g.a)().mark(function pt(){var oe;return Object(g.a)().wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:return w.a.showLoading(),fe.prev=1,fe.next=4,Object(R.j)();case 4:oe=fe.sent,oe&&w.a.showToast({title:J("optionSuccess"),complete:function(){ne()}}),fe.next=11;break;case 8:fe.prev=8,fe.t0=fe.catch(1),w.a.showToast({title:J("optionError")});case 11:case"end":return fe.stop()}},pt,null,[[1,8]])}));return function(){return lt.apply(this,arguments)}}(),rt=function(pt){var oe,ie,fe;if(!(pt!=null&&pt.priceType))return pt==null?void 0:pt.price;var Le=pt==null||(oe=pt.price)===null||oe===void 0?void 0:oe.split("/");return Object(G.jsxs)(b.i,{children:[Object(G.jsx)(b.i,{children:Le!=null&&Le[0]?Le==null||(ie=Le[0])===null||ie===void 0?void 0:ie.substring(0,1):""}),Object(G.jsxs)(b.i,{className:M.a.priceSty,children:[Le==null||(fe=Le[0])===null||fe===void 0?void 0:fe.substring(1),"/"]}),Object(G.jsx)(b.i,{children:Le==null?void 0:Le[1]})]})},vt=function(pt){w.a.navigateTo({url:"/pages/choose/index?version=".concat(pt,"&method=chose")})};return Object(G.jsxs)(b.i,{children:[Object(G.jsxs)(j.a,{className:M.a.containerBox,children:[D?Object(G.jsxs)(b.i,{className:M.a.comName,children:[D,"\uFF08",le,"\uFF09"]}):null,He===1&&Object(G.jsxs)(b.i,{children:[Object(G.jsx)(b.i,{className:M.a.chooseCount,children:J("chooseAccuntPlan")}),Object(G.jsx)(b.i,{className:M.a.tips,children:J("choosePlanTips")}),Te==null?void 0:Te.map(function(lt,pt){return Object(G.jsxs)(b.i,{className:"".concat(M.a.version," ").concat(M.a["version_".concat(pt)]),children:[Object(G.jsxs)(b.i,{className:M.a.name,children:[Object(G.jsx)(b.i,{className:M.a.lis,children:Object(G.jsx)(b.i,{className:M.a.title,children:lt==null?void 0:lt.name})}),Object(G.jsx)(b.i,{className:M.a.price,onClick:function(){m(lt==null?void 0:lt.contactPerson),Ct(!0)},children:rt(lt)})]}),Object(G.jsx)(b.i,{className:M.a.desc,children:lt==null?void 0:lt.desc.replace(/\s/g," ")}),Object(ee.b)()?Object(G.jsxs)(b.i,{className:M.a.btnCop,children:[Object(G.jsxs)(b.i,{className:M.a.asText,onClick:function(){return vt(lt==null?void 0:lt.version)},children:[J("more"),"\xA0>"]}),Object(G.jsx)(b.b,{className:M.a.btn,onClick:function(ie){Ie(ie,lt)},children:lt==null?void 0:lt.buttonWord})]}):Object(G.jsxs)(b.i,{className:M.a.btnCop2,children:[Object(G.jsxs)(b.i,{className:M.a.asText,onClick:function(){return vt(lt==null?void 0:lt.version)},children:[J("more"),"\xA0>"]}),Object(G.jsx)(b.i,{className:M.a.btn,onClick:function(ie){Ie(ie,lt)},children:lt==null?void 0:lt.buttonWord})]})]},lt==null?void 0:lt.url)})]}),He===2&&Object(G.jsxs)(b.i,{className:M.a.audit,children:[Object(G.jsx)(b.e,{src:ce.a,className:M.a.auditImg}),Object(G.jsx)(b.i,{className:M.a.auditTitle,children:"".concat(J("audit"),"...")})]}),He===10&&Object(G.jsxs)(b.i,{className:M.a.audit,children:[Object(G.jsx)(b.e,{src:ce.a,className:M.a.auditImg}),Object(G.jsx)(b.i,{className:M.a.auditTitle,children:"".concat(J("audit.fail"))}),Object(G.jsx)(b.i,{className:M.a.auditReason,children:F}),Object(G.jsx)(b.i,{className:M.a.auditResubmit,onClick:Be,children:J("audit.fail.reSubmit")})]})]}),Object(G.jsx)(b.i,{className:M.a.loginOut,onClick:function(){return Ne(!0)},children:J("loginOut")}),Object(G.jsx)($.a,{isOpened:tt,title:J("btnConsult"),confirmText:J("ok"),customContent:je(W),onConfirm:function(){return Ct(!1)}}),Object(G.jsx)($.a,{isOpened:Qe,content:void 0,title:J("sureLogout"),onConfirm:Ke,showCancel:!0,onCancel:function(){return Ne(!1)}}),Object(G.jsx)(Z.a,{visible:q,onClose:me,status:!!Me,success:{text:J("optionSuccess")},error:{text:J("optionError")}})]})};f.a=ue},"./src/common/img/img_shenh.png":function(P,f,i){P.exports=i.p+"common/img/img_shenh.png"},"./src/common/img/sb@2x.png":function(P,f){P.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMAB7YSTt768dMGbp2S5cS8o45ALR8aDyV19/Ps4syxqotpUkZFM5TCt6mYAAACzUlEQVRYw6SW23qCMBCEJ01AEkCOoq09aNXm/d+w7gqtn0HC4b/wwpD5NjubAXiQZ5NkUbAPw30QZYk5S8xHqCKyDlGhBOZQxiv7hFVcTi7uGNhBgqOYImdS2/ER71RVS61lXald/GE7UjNaUgXdnkQ1eKBRSdpVqTCG+tMyr/kJTzjlr5b5rOHl+2bF22GDATaHt5s93xhGJ5YICwkPsggtkejBp9aWWFcYQdU+LAcOEnF5BiMxXGT0tDnbd/bugtFceB7et0/qY72swQSajBV7a5R83i+NSegvPrXsWeEWx5hMzM64dSRcH2bANSbOPHP/NGaguY8PE16vyN8Gs2jI61WNe+j+hhfM5BLSvcYdioo2mI2h/Qp/iICMwgLW1DGBjh0duMICqvD+iIISs8AiCsrjrsQj5Z/EIiTl4xE3qIMHLORAXQRTUt5vsJANvRXKv8uYow9ZbntjrpRwybsoEHRJTuhBXVdygQfEdedKweFE10W0Q5321sevqxfxoPdiaaeEQ9oOd+FmxX9vWdHR4245JO3wRSzcw9Y6iqzHuM3lo0aApOUGfeSOYqvXb2JDCxJn+n6BC2//V3T/cKHvnjMMu+1X9Ovx/Bn8XH938Cv69ThjfpCxJyMUvXrsSsYmVxih6NVDRTZzMtQYoejVQ835sGev/Yp+PZ7APShqNfyKfj1oCv7f5uzghGEYCKJofE0FrsD9lxjIIe/owM9AVMCC0Gpm9q+CNxXVuynoyqWgK3uUdGWPom3So2gbjZ3aRmP7er2xz7eyEofy9YgD+UriQL4IbJIvAssCisCyACaVLIBJsdFkUmyU0ScbZfSiSDJ6UURYSlFEWBLnQlgS5waBcxOJH88fhfbBWDEYfAaj2WB4XIy3fQAfI4IOMbaYpYOgLarqMG2K+zqQHCLTPdR1jvMb7HweQzDe0f0/LBc+64/L+uO6X3+8AMIpvcGC2YHeAAAAAElFTkSuQmCC"},"./src/common/img/success@2x.png":function(P,f,i){P.exports=i.p+"common/img/success@2x.png"},"./src/pages/registerSuccess/Cover/index.module.scss":function(P,f,i){P.exports={bg:"index-module__bg___Jcuf7",msg:"index-module__msg___z7POe",img:"index-module__img___XX4Ma"}},"./src/pages/registerSuccess/Cover/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"),v=i("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),y=i("./node_modules/react/cjs/react.production.min.js"),u=i.n(y),U=i("./src/pages/registerSuccess/Cover/index.module.scss"),B=i.n(U),b=i("./src/common/img/sb@2x.png"),p=i.n(b),M=i("./src/common/img/success@2x.png"),j=i.n(M),R=i("./node_modules/@tarojs/components/mini/index.js"),T=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),w=i.n(T),Z=["status","visible","success","error","onClose"],Q=function($){var ee=$.status,G=$.visible,z=$.success,ue=$.error,de=$.onClose,J=Object(v.a)($,Z),re=Object(y.useRef)(null);return Object(y.useLayoutEffect)(function(){return G&&(re.current=setTimeout(function(){de()},1e3)),function(){re.current&&clearTimeout(re.current)}},[G]),G?Object(T.jsx)(R.i,Object(g.a)(Object(g.a)({className:B.a.bg},J),{},{children:Object(T.jsxs)(R.i,{className:B.a.msg,children:[Object(T.jsx)(R.e,{src:!ee&&p.a||j.a,className:B.a.img}),Object(T.jsx)(R.i,{children:ee?z==null?void 0:z.text.replace(/\s/g," "):ue==null?void 0:ue.text.replace(/\s/g," ")})]})})):null};f.a=Q},"./src/pages/registerSuccess/index.module.scss":function(P,f,i){P.exports={containerBox:"index-module__containerBox___09CLu",loginOut:"index-module__loginOut___Rkxeg",success:"index-module__success___tzmDS",comName:"index-module__comName___jJ+QC",chooseCount:"index-module__chooseCount___KGPwJ",tips:"index-module__tips___E0u3D",version:"index-module__version___op0Xn",email:"index-module__email___7xaKS",name:"index-module__name___O5XTH",lis:"index-module__lis___IvkbD",priceSty:"index-module__priceSty___vFHjY",title:"index-module__title___2qkMS",price:"index-module__price___XI1PS",versionImg:"index-module__versionImg___QKyIb",desc:"index-module__desc___rvVjD",btnCop:"index-module__btnCop___ytWOQ",asText:"index-module__asText___0I12j",btn:"index-module__btn___u+96J",btnCop2:"index-module__btnCop2___IPrVS",audit:"index-module__audit___28yqA",auditImg:"index-module__auditImg___OKuG5",auditTitle:"index-module__auditTitle___U5R2v",auditReason:"index-module__auditReason___onbfG",auditResubmit:"index-module__auditResubmit___NKaX5",version_0:"index-module__version_0___JFPoj",version_1:"index-module__version_1___-y7BN",version_2:"index-module__version_2___SBhtS",version_3:"index-module__version_3___rJ44o"}},"./src/pages/registerSuccess/index.tsx":function(P,f,i){"use strict";i.r(f);var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),v=i("./node_modules/babel-loader/lib/index.js!./src/pages/registerSuccess/index.tsx"),y={navigationBarTitleText:""},u=Page(Object(g.createPageConfig)(v.a,"pages/registerSuccess/index",{root:{cn:[]}},y||{}));f.default=v.a}},[["./src/pages/registerSuccess/index.tsx","runtime","taro","vendors","common"]]])});var Jc=Bo(()=>{(ty.webpackJsonp=ty.webpackJsonp||[]).push([["pages/test/index"],{"./node_modules/babel-loader/lib/index.js!./src/pages/test/index.tsx":function(P,f,i){"use strict";var g=i("./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"),v=i("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),y=i("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),u=i("./node_modules/react/cjs/react.production.min.js"),U=i.n(u),B=i("./node_modules/@tarojs/components/mini/index.js"),b=i("./node_modules/@tarojs/taro/index.js"),p=i.n(b),M=i("./src/pages/test/index.module.scss"),j=i.n(M),R=i("./src/utils/request/index.ts"),T=i("./node_modules/react/cjs/react-jsx-runtime.production.min.js"),w=i.n(T),Z=function(){var ce=Object(u.useState)(),$=Object(y.a)(ce,2),ee=$[0],G=$[1],z=function(){var re=Object(v.a)(Object(g.a)().mark(function be(){var Te;return Object(g.a)().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return console.log("start getAtopDataTest"),Ee.next=3,Object(R.a)({url:"tuya.m.cl.project.list",data:{networkType:-1},apiVersion:"4.0"});case 3:Te=Ee.sent,console.log("getAtopDataTest",Te),G(ee);case 6:case"end":return Ee.stop()}},be)}));return function(){return re.apply(this,arguments)}}(),ue=function(){ty.navigateTo({url:"/pages/registerSuccess/index"})},de=function(){try{ty.lamp.logOut({success:function(Te){console.log("\u6D4B\u8BD5\u5C0F\u7A0B\u5E8F\u9000\u51FA-success",Te),p.a.showToast({title:"\u9000\u51FA\u6210\u529F"})},fail:function(Te){console.error("\u6D4B\u8BD5\u5C0F\u7A0B\u5E8F\u9000\u51FA-fail",Te),p.a.showToast({title:"\u5931\u8D25fail"})}})}catch(be){p.a.showToast({title:"\u5931\u8D25catch"}),console.error("\u6D4B\u8BD5\u5C0F\u7A0B\u5E8F\u9000\u51FA-catch",be)}},J=[{name:"\u9000\u51FA\u767B\u5F55\u6D4B\u8BD5",event:de},{name:"\u6D4B\u8BD5ios\u624B\u52BF\u8FD4\u56DE",event:ue}];return Object(T.jsx)(B.i,{className:j.a.name,children:J==null?void 0:J.map(function(re){return Object(T.jsx)(B.b,{className:j.a.btn,onClick:re.event,children:re.name},re.name)})})};f.a=Z},"./src/pages/test/index.module.scss":function(P,f,i){P.exports={name:"index-module__name___Yz4-V",btn:"index-module__btn___LtGCN"}},"./src/pages/test/index.tsx":function(P,f,i){"use strict";i.r(f);var g=i("./node_modules/@tarojs/runtime/dist/runtime.esm.js"),v=i("./node_modules/babel-loader/lib/index.js!./src/pages/test/index.tsx"),y={navigationBarTitleText:"\u529F\u80FD\u6D4B\u8BD5\u9875"},u=Page(Object(g.createPageConfig)(v.a,"pages/test/index",{root:{cn:[]}},y||{}));f.default=v.a}},[["./src/pages/test/index.tsx","runtime","taro","vendors","common"]]])});function Ds(P,f){try{$$setCurrentPath(P),f()}catch(i){throw console.error("Error in:",P),console.error(i),i}}Ds("cq0T",function(){kc()});Ds("e7FRwz/g-1sSHEK/e7f5ut",function(){Hc()});Ds("e7FRwz/ddhDc/e7f5ut",function(){Vc()});Ds("e7FRwz/g-1Bj3tA/e7f5ut",function(){Gc()});Ds("e7FRwz/g-16SJMz/e7f5ut",function(){Yc()});Ds("e7FRwz/g-2nojV7/e7f5ut",function(){Qc()});Ds("e7FRwz/dfEMf/e7f5ut",function(){Jc()}); +}, 2);try{require("f-AR4dJ.js");}catch(e){console.error("Error in 'f-AR4dJ.js'", e);}}(function $$setCurrentPath(v){__currentPath__ = v}, define, require); diff --git a/crates/swc/tests/fixture/issues-8xxx/8789/input/a.js.map b/crates/swc/tests/fixture/issues-8xxx/8789/input/a.js.map new file mode 100644 index 0000000000000..2750098fd74af --- /dev/null +++ b/crates/swc/tests/fixture/issues-8xxx/8789/input/a.js.map @@ -0,0 +1,8 @@ +{ + "version": 3, + "sources": ["../dist/webpack:/webpack/bootstrap", "../dist/webpack:/src/api/index.ts", "../dist/webpack:/src/api/mockData.ts", "../dist/webpack:/src/components/BaseModal/index.module.scss", "../dist/webpack:/src/components/BaseModal/index.tsx", "../dist/webpack:/src/components/BaseOperateFooter/index.module.scss", "../dist/webpack:/src/components/BaseOperateFooter/index.tsx", "../dist/webpack:/src/components/BasePage/index.module.scss", "../dist/webpack:/src/components/BasePage/index.tsx", "../dist/webpack:/src/components/container/index.module.scss", "../dist/webpack:/src/components/container/index.tsx", "../dist/webpack:/src/config/globalData/index.ts", "../dist/webpack:/src/locales/de/index.ts", "../dist/webpack:/src/locales/en/index.ts", "../dist/webpack:/src/locales/es/index.ts", "../dist/webpack:/src/locales/fr/index.ts", "../dist/webpack:/src/locales/ja/index.ts", "../dist/webpack:/src/locales/zh/index.ts", "../dist/webpack:/src/utils/getLanguage.ts", "../dist/webpack:/src/utils/getSystemInfoSync.ts", "../dist/webpack:/src/utils/i18n.ts", "../dist/webpack:/src/utils/request/index.ts", "../dist/webpack:/node_modules/@babel/runtime/helpers/arrayLikeToArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/assertThisInitialized.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/classCallCheck.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/createClass.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/createSuper.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/defineProperty.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/classCallCheck.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/construct.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/createClass.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/createSuper.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/defineProperty.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/get.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/inherits.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/iterableToArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/objectSpread2.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/set.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/slicedToArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/superPropBase.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/toArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/toPrimitive.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/typeof.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/extends.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/getPrototypeOf.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/inherits.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/iterableToArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/nonIterableSpread.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/objectSpread2.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/setPrototypeOf.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/toConsumableArray.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/toPrimitive.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/toPropertyKey.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/typeof.js", "../dist/webpack:/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js", "../dist/webpack:/node_modules/classnames/index.js", "../dist/webpack:/node_modules/html-parse-stringify/dist/html-parse-stringify.module.js", "../dist/webpack:/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js", "../dist/webpack:/node_modules/i18next/dist/esm/i18next.js", "../dist/webpack:/node_modules/lodash/lodash.js", "../dist/webpack:/node_modules/object-assign/index.js", "../dist/webpack:/node_modules/prop-types/checkPropTypes.js", "../dist/webpack:/node_modules/prop-types/factoryWithTypeCheckers.js", "../dist/webpack:/node_modules/prop-types/index.js", "../dist/webpack:/node_modules/prop-types/lib/ReactPropTypesSecret.js", "../dist/webpack:/node_modules/prop-types/lib/has.js", "../dist/webpack:/node_modules/react-i18next/dist/es/I18nextProvider.js", "../dist/webpack:/node_modules/react-i18next/dist/es/Trans.js", "../dist/webpack:/node_modules/react-i18next/dist/es/TransWithoutContext.js", "../dist/webpack:/node_modules/react-i18next/dist/es/Translation.js", "../dist/webpack:/node_modules/react-i18next/dist/es/context.js", "../dist/webpack:/node_modules/react-i18next/dist/es/defaults.js", "../dist/webpack:/node_modules/react-i18next/dist/es/i18nInstance.js", "../dist/webpack:/node_modules/react-i18next/dist/es/index.js", "../dist/webpack:/node_modules/react-i18next/dist/es/initReactI18next.js", "../dist/webpack:/node_modules/react-i18next/dist/es/unescape.js", "../dist/webpack:/node_modules/react-i18next/dist/es/useSSR.js", "../dist/webpack:/node_modules/react-i18next/dist/es/useTranslation.js", "../dist/webpack:/node_modules/react-i18next/dist/es/utils.js", "../dist/webpack:/node_modules/react-i18next/dist/es/withSSR.js", "../dist/webpack:/node_modules/react-i18next/dist/es/withTranslation.js", "../dist/webpack:/node_modules/react-is/cjs/react-is.development.js", "../dist/webpack:/node_modules/react-is/index.js", "../dist/webpack:/node_modules/react/cjs/react-jsx-runtime.production.min.js", "../dist/webpack:/node_modules/react/cjs/react.production.min.js", "../src/common/utils.ts", "../../src/components/button/index.tsx", "../../src/components/loading/index.tsx", "../../../src/components/modal/action/index.tsx", "../../../src/components/modal/content/index.tsx", "../../../src/components/modal/header/index.tsx", "../../src/components/modal/index.tsx", "../dist/webpack:/node_modules/void-elements/index.js", "../dist/webpack:/(webpack)/buildin/global.js", "../dist/webpack:/(webpack)/buildin/module.js", "../dist/src/utils.js", "../dist/src/polyfill.js", "../shared/dist/shared.esm.js", "../dist/src/env.js", "../dist/src/interceptor/chain.js", "../dist/src/interceptor/index.js", "../dist/src/interceptor/interceptors.js", "../dist/src/tools.js", "../dist/src/index.js", "../dist/webpack:/node_modules/@tarojs/components/mini/index.js", "../src/template/custom-wrapper.ts", "../dist/src/runtime/react-meta.ts", "../dist/src/runtime/utils.ts", "../dist/src/runtime/hooks.ts", "../dist/src/runtime/connect.ts", "../dist/src/runtime/connect-native.ts", "../dist/src/runtime/index.ts", "../dist/src/constant.ts", "../dist/src/workTags.ts", "../dist/src/componentTree.ts", "../dist/src/domInput.ts", "../dist/src/inputValueTracking.ts", "../dist/src/props.ts", "../dist/src/reconciler.ts", "../dist/src/event.ts", "../dist/src/render.ts", "../dist/src/index.ts", "../dist/src/constants/index.ts", "../dist/src/dom-external/mutation-observer/implements.ts", "../dist/src/dom-external/mutation-observer/index.ts", "../dist/src/utils/index.ts", "../dist/src/dom/class-list.ts", "../dist/src/dom/event-source.ts", "../dist/src/env.ts", "../dist/src/hydrate.ts", "../dist/src/dom/event-target.ts", "../dist/src/dom/node.ts", "../dist/src/dom/style_properties.ts", "../dist/src/dom/style.ts", "../dist/src/dom/tree.ts", "../dist/src/dom/element.ts", "../dist/src/options.ts", "../dist/src/dom-external/inner-html/scaner.ts", "../dist/src/dom-external/inner-html/utils.ts", "../dist/src/dom-external/inner-html/style.ts", "../dist/src/dom-external/inner-html/tags.ts", "../dist/src/dom-external/inner-html/parser.ts", "../dist/src/dom-external/inner-html/html.ts", "../dist/src/dom-external/element.ts", "../dist/src/dom-external/node.ts", "../dist/src/dom-external/index.ts", "../dist/src/dom/event.ts", "../dist/src/dom/form.ts", "../dist/src/perf.ts", "../dist/src/dom/root.ts", "../dist/src/dom/text.ts", "../dist/src/bom/URLSearchParams.ts", "../dist/src/bom/URL.ts", "../dist/src/dom/anchor-element.ts", "../dist/src/dom/custom-wrapper.ts", "../dist/src/dom/document.ts", "../dist/src/bom/document.ts", "../dist/src/bom/getComputedStyle.ts", "../dist/src/emitter/emitter.ts", "../dist/src/utils/cache.ts", "../dist/src/bom/history.ts", "../dist/src/current.ts", "../dist/src/bom/location.ts", "../dist/src/bom/navigator.ts", "../dist/src/bom/raf.ts", "../dist/src/bom/window.ts", "../dist/src/dom/svg.ts", "../dist/src/dsl/common.ts", "../dist/src/next-tick.ts", "../dist/src/components.ts", "../dist/src/constants.ts", "../dist/src/event-emitter.ts", "../dist/src/is.ts", "../dist/src/runtime-hooks.ts", "../dist/src/utils.ts", "../dist/src/native-apis.ts", "../dist/webpack:/node_modules/@tarojs/taro/index.js", "../dist/src/apis-list.ts", "../dist/src/apis.ts", "../dist/src/components.ts", "../dist/src/runtime-utils.ts", "../dist/src/runtime.ts", "../dist/webpack:/src/app.ts", "../dist/webpack:/node_modules/process/browser.js", "../dist/webpack:/node_modules/react-reconciler/cjs/react-reconciler-constants.development.js", "../dist/webpack:/node_modules/react-reconciler/cjs/react-reconciler.production.min.js", "../dist/webpack:/node_modules/react-reconciler/constants.js", "../dist/webpack:/node_modules/react-reconciler/node_modules/scheduler/cjs/scheduler.development.js", "../dist/webpack:/node_modules/react-reconciler/node_modules/scheduler/index.js", "../dist/webpack:/node_modules/setimmediate/setImmediate.js", "../dist/webpack:/node_modules/taro-ui/dist/style/index.scss", "../dist/webpack:/node_modules/timers-browserify/main.js", "../dist/webpack:/src/app.scss", "../dist/webpack:/src/app.ts?87c2", "../dist/pages/addValue/webpack:/src/pages/addValue/index.tsx", "../dist/pages/addValue/webpack:/src/common/img/group.png", "../dist/pages/addValue/webpack:/src/common/img/noData.png", "../dist/pages/addValue/webpack:/src/components/BaseEmpty/index.module.scss", "../dist/pages/addValue/webpack:/src/components/BaseEmpty/index.tsx", "../dist/pages/addValue/webpack:/src/pages/addValue/index.module.scss", "../dist/pages/addValue/webpack:/src/pages/addValue/index.tsx?f293", "../dist/pages/base/webpack:/node_modules/@babel/runtime/helpers/esm/extends.js", "../dist/pages/base/webpack:/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js", "../dist/pages/base/webpack:/src/pages/base/index.tsx", "../dist/pages/base/webpack:/src/common/img/arrow@2x.png", "../dist/pages/base/webpack:/src/common/img/icon_advanced.png", "../dist/pages/base/webpack:/src/common/img/icon_oridinary.png", "../dist/pages/base/webpack:/src/common/img/icon_profession.png", "../dist/pages/base/webpack:/src/common/img/img_empty.png", "../dist/pages/base/webpack:/src/components/Box/index.module.scss", "../dist/pages/base/webpack:/src/components/Box/index.tsx", "../dist/pages/base/webpack:/src/components/Empty/index.tsx", "../dist/pages/base/webpack:/src/components/ImgItem/index.module.scss", "../dist/pages/base/webpack:/src/components/ImgItem/index.tsx", "../dist/pages/base/webpack:/src/pages/base/components/BaseModule/index.module.scss", "../dist/pages/base/webpack:/src/pages/base/components/BaseModule/index.tsx", "../dist/pages/base/webpack:/src/pages/base/components/ComboHead/Device/index.module.scss", "../dist/pages/base/webpack:/src/pages/base/components/ComboHead/Device/index.tsx", "../dist/pages/base/webpack:/src/pages/base/components/ComboHead/Time/index.module.scss", "../dist/pages/base/webpack:/src/pages/base/components/ComboHead/Time/index.tsx", "../dist/pages/base/webpack:/src/pages/base/components/ComboHead/index.module.scss", "../dist/pages/base/webpack:/src/pages/base/components/ComboHead/index.tsx", "../dist/pages/base/webpack:/src/pages/base/index.tsx?75aa", "../dist/pages/base/webpack:/src/utils/utils.ts", "../dist/pages/choose/webpack:/src/pages/choose/index.tsx", "../dist/src/components/divider/index.tsx", "../dist/src/components/tabs-pane/index.tsx", "../dist/src/components/tabs/index.tsx", "../dist/pages/choose/webpack:/src/common/img/right-icon_advanced.png", "../dist/pages/choose/webpack:/src/common/img/right-icon_oridinaty.png", "../dist/pages/choose/webpack:/src/common/img/right-icon_profession.png", "../dist/pages/choose/webpack:/src/pages/choose/VersionContent/index.module.scss", "../dist/pages/choose/webpack:/src/pages/choose/VersionContent/index.tsx", "../dist/pages/choose/webpack:/src/pages/choose/index.module.scss", "../dist/pages/choose/webpack:/src/pages/choose/index.tsx?7bff", "../dist/pages/projectList/webpack:/node_modules/ahooks/es/useLatest/index.js", "../dist/pages/projectList/webpack:/node_modules/ahooks/es/useThrottleFn/index.js", "../dist/pages/projectList/webpack:/node_modules/ahooks/es/useUnmount/index.js", "../dist/pages/projectList/webpack:/node_modules/ahooks/es/utils/index.js", "../dist/pages/projectList/webpack:/node_modules/ahooks/es/utils/isDev.js", "../dist/pages/projectList/webpack:/src/pages/projectList/index.tsx", "../dist/pages/projectList/webpack:/node_modules/lodash/_Symbol.js", "../dist/pages/projectList/webpack:/node_modules/lodash/_baseGetTag.js", "../dist/pages/projectList/webpack:/node_modules/lodash/_baseTrim.js", "../dist/pages/projectList/webpack:/node_modules/lodash/_freeGlobal.js", "../dist/pages/projectList/webpack:/node_modules/lodash/_getRawTag.js", "../dist/pages/projectList/webpack:/node_modules/lodash/_objectToString.js", "../dist/pages/projectList/webpack:/node_modules/lodash/_root.js", "../dist/pages/projectList/webpack:/node_modules/lodash/_trimmedEndIndex.js", "../dist/pages/projectList/webpack:/node_modules/lodash/debounce.js", "../dist/pages/projectList/webpack:/node_modules/lodash/isObject.js", "../dist/pages/projectList/webpack:/node_modules/lodash/isObjectLike.js", "../dist/pages/projectList/webpack:/node_modules/lodash/isSymbol.js", "../dist/pages/projectList/webpack:/node_modules/lodash/now.js", "../dist/pages/projectList/webpack:/node_modules/lodash/throttle.js", "../dist/pages/projectList/webpack:/node_modules/lodash/toNumber.js", "../dist/pages/projectList/webpack:/node_modules/tslib/tslib.es6.js", "../dist/pages/projectList/webpack:/src/common/img/check-act.png", "../dist/pages/projectList/webpack:/src/common/img/check.png", "../dist/pages/projectList/webpack:/src/common/img/icon_delete_N4.svg", "../dist/pages/projectList/webpack:/src/common/img/icon_search.svg", "../dist/pages/projectList/webpack:/src/components/SearchBar/index.module.scss", "../dist/pages/projectList/webpack:/src/components/SearchBar/index.tsx", "../dist/pages/projectList/webpack:/src/pages/projectList/index.module.scss", "../dist/pages/projectList/webpack:/src/pages/projectList/index.tsx?7d2e", "../dist/pages/registerSuccess/webpack:/src/pages/registerSuccess/index.tsx", "../dist/pages/registerSuccess/webpack:/src/common/img/img_shenh.png", "../dist/pages/registerSuccess/webpack:/src/common/img/sb@2x.png", "../dist/pages/registerSuccess/webpack:/src/common/img/success@2x.png", "../dist/pages/registerSuccess/webpack:/src/pages/registerSuccess/Cover/index.module.scss", "../dist/pages/registerSuccess/webpack:/src/pages/registerSuccess/Cover/index.tsx", "../dist/pages/registerSuccess/webpack:/src/pages/registerSuccess/index.module.scss", "../dist/pages/registerSuccess/webpack:/src/pages/registerSuccess/index.tsx?c1cd", "../dist/pages/test/webpack:/src/pages/test/index.tsx", "../dist/pages/test/webpack:/src/pages/test/index.module.scss", "../dist/pages/test/webpack:/src/pages/test/index.tsx?9a51", ".app-loader/app-service.js"], + "sourceRoot": "/Users/noyobo/home/gitlab/tuya-public/illuminate-base-mp/dist", + "sourcesContent": [" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"runtime\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = ty[\"webpackJsonp\"] = ty[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n", "import { request } from '@/utils/request';\n\n/**\n * @name 获取登陆企业信息\n * @api tuya.m.cl.combo.register\n * @version 1.0\n */\nexport const getRegisterInfo = () =>\n request({\n url: 'tuya.m.cl.combo.register',\n data: {}\n }).then((rep) => {\n if (!rep.success) {\n return {};\n }\n return rep.result;\n });\n\n/**\n * @name 获取商户套餐详情\n * @api tuya.m.cl.combo.merchant.detail\n * @version 1.0\n */\nexport const getMerchantDetail = () =>\n request({\n url: 'tuya.m.cl.combo.merchant.detail',\n data: {}\n }).then((rep) => {\n if (!rep.success) {\n return {};\n }\n return rep.result;\n });\n\n/**\n * @name 注册成功返回\n * @api tuya.m.cl.register.success\n * @version 1.0\n */\nexport const registerSuccess = () =>\n request({\n url: 'tuya.m.cl.register.success',\n data: {}\n }).then((rep) => {\n if (!rep.success) {\n return {};\n }\n return rep.result;\n });\n\n/**\n * @name OEM商户登录显示审核或者已拒绝页面信息\n * @api tuya.m.cl.combo.register.getaudit\n * @version 1.0\n */\nexport const getAuditStatus = () =>\n request({\n url: 'tuya.m.cl.combo.register.getaudit',\n data: {}\n }).then((rep) => {\n if (!rep.success) {\n return {};\n }\n return rep.result;\n });\n\n/**\n * @name 商户试用套餐\n * @api tuya.m.cl.combo.save\n * @version 1.0\n */\nexport const postUserCombo = (data) =>\n request({\n url: 'tuya.m.cl.combo.save',\n data\n }).then((rep) => {\n if (!rep.success) {\n return {};\n }\n return rep.result;\n });\n\n/**\n * @name OEM商户登录拒绝页面-重新提交\n * @api tuya.m.cl.combo.register.submitaudit\n * @version 1.0\n */\nexport const submitAudit = () =>\n request({\n url: 'tuya.m.cl.combo.register.submitaudit'\n }).then((rep) => {\n if (!rep.success) {\n return {};\n }\n return rep.result;\n });\n\n\n/**\n * @name 查询套餐详细列表\n * @api tuya.m.cl.combo.list\n * @version 1.0\n */\nexport const getComboList = () =>\n request({\n url: 'tuya.m.cl.combo.list'\n }).then((rep) => {\n if (!rep.success) {\n return {};\n }\n return rep.result;\n });\n\n/**\n * @name 查询符合条件的项目列表\n * @api m.illume.merchant.vas.projects\n * @version 1.0\n */\nexport const getAddValueProjectList = (data) =>\n request({\n url: 'm.illume.merchant.vas.projects',\n data\n }).then((rep) => {\n if (!rep.success) {\n return [];\n }\n return rep.result;\n });\n\n/**\n * @name 增值应用详情列表\n * @api m.illume.merchant.vas.list\n * @version 1.0\n */\nexport const getVasList = (data) =>\n request({\n url: 'm.illume.merchant.vas.list',\n data\n }).then((rep) => {\n if (!rep.success) {\n return [];\n }\n return rep.result;\n });\n\n/**\n * @name 将选中的项目分配给指定增值应用\n * @api m.illume.merchant.vas.add\n * @version 1.0\n */\nexport const submitAddValueProject = (data) =>\n request({\n url: 'm.illume.merchant.vas.add',\n data\n }).then((rep) => {\n if (!rep.success) {\n return [];\n }\n return rep.result;\n });\n", "export default {\n 'tuya.m.cl.combo.merchant.detail': {\n projectMaxNum: 100,\n projectCount: 40,\n isbrander: false,\n deviceCount: 219,\n remainingDeviceCount: 785,\n remainingProjectCount: 60,\n edition: 1,\n comboSingleDetailVO: {\n equityList: [\n {\n value: '1个',\n content: '项目数'\n },\n {\n value: '',\n content: '包含高级版所有功能'\n },\n {\n value: '',\n content: '空间热力图'\n },\n {\n value: '',\n content: '控制二维码分享'\n },\n {\n value: '',\n content: '设备同位替换'\n }\n ],\n version: 'profession',\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logod.png',\n branderProjectNum: 10000000,\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=profession',\n duration: '咨询报价',\n trail: false,\n branderDeviceNum: 5000,\n price: '咨询报价',\n name: '专业版',\n contentList: [\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zysggl@2x.png',\n content: '施工管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zycygl@2x.png',\n content: '成员管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zytqfw@2x.png',\n content: '天气服务',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zydzfw@2x.png',\n content: '地址服务',\n desc: ''\n }\n ],\n url: '',\n content: '项目管理'\n },\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zykjjggl@2x.png',\n content: '区域结构管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zypmtzdr@2x.png',\n content: '平面图导入',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyqyytgl@2x.png',\n content: '区域用途管理',\n desc: ''\n }\n ],\n url: '',\n content: '区域管理'\n },\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbjk@2x.png',\n content: '运行状态',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbota@2x.png',\n content: '设备OTA',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbytgl@2x.png',\n content: '设备用途管理',\n desc: ''\n }\n ],\n url: '',\n content: '设备管理'\n },\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyqzgl@2x.png',\n content: '群组管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zycjgl@2x.png',\n content: '场景管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyrcgl@2x.png',\n content: '日程管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyldgl@2x.png',\n content: '联动管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyzdysj@2x.png',\n content: '自定义事件',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zycjmb@2x.png',\n content: '场景模板',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyanpz@2x.png',\n content: '按钮配置',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyybppz@2x.png',\n content: '仪表盘配置',\n desc: ''\n }\n ],\n url: '',\n content: '系统应用配置'\n },\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyczrz@2x.png',\n content: '操作日志',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zybjjl@2x.png',\n content: '报警记录',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyycjl@2x.png',\n content: '异常记录',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zydxtz@2x.png',\n content: '短信通知',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyyjtz@2x.png',\n content: '邮件通知',\n desc: ''\n }\n ],\n url: '',\n content: '日志管理'\n },\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zysjdp@2x.png',\n content: '数据大盘',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zynhtj@2x.png',\n content: '能耗统计图',\n desc: ''\n }\n ],\n url: '',\n content: '数据中心'\n },\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zywxgdgl@2x.png',\n content: '维修工单管理',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zysbtwth@2x.png',\n content: '设备同位替换',\n desc: ''\n }\n ],\n url: '',\n content: '运维管理'\n },\n {\n subContent: [\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zykjrlt@2x.png',\n content: '空间热力图',\n desc: ''\n },\n {\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zykzewmfx@2x.png',\n content: '控制二维码分享',\n desc: ''\n }\n ],\n url: '',\n content: '专业照明控制'\n }\n ],\n desc: '适用于专业级商照项目,提供高级照明控制方案'\n },\n ismerchant: true,\n addValueList: [\n {\n projectList: [\n '沉香室内项目测试',\n '室内项目-1.5.1前端融合213123123',\n '能耗回归',\n '1.9.2优化界面测试',\n '照度测试项目',\n '商照能源三期1.9.0'\n ],\n name: '人员空间分布',\n appCode: 'alueAddedApp_space_heatmap',\n pic: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyrenyuanrelifenbu@2x.png',\n id: 22,\n desc: '人员热力分布图是一款基于人员存在传感器数据进行空间占空分析的应用,可以体现空间各区域的实时、历史人员分布状况,为用户决策各空间自动化控制部署提供有效的数据支撑。'\n },\n {\n projectList: [\n '室内项目-1.5.1前端融合213123123',\n '沉香室内项目测试',\n '灵门测试项目2023.01.05'\n ],\n name: 'AI 感应灯控',\n appCode: 'valueAddedApp_space_ai',\n pic: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyganyingzishiying@2x.png',\n id: 26,\n desc: 'AI 自适应感应是一款基于云端 AI 算法,自动调整传感器控制灯光保持时长的应用。通过对传感器所安装环境的感应历史数据计算,以一定的周期频率,自动调整传感器的延迟关灯时间,使传感器控制更贴近现场使用场景,提高用户体验。'\n },\n {\n projectList: ['室内项目-1.5.1前端融合213123123', '沉香室内项目测试'],\n name: '设备维修',\n appCode: 'valueAddedApp_opsdev_repair.detail',\n pic: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyshebeiweixiu@2x.png',\n id: 30,\n desc: '设备维修是一款协助项目进行设备运维管理的应用。支持项目成员在APP 端与 SaaS 端一键进行设备故障报修,管理员在SaaS端进行维修任务分派与进度管理'\n },\n {\n projectList: [\n '室内项目-1.5.1前端融合213123123',\n '照度测试项目',\n '商照能源三期1.9.0',\n '沉香室内项目测试',\n '老数据回归'\n ],\n name: '设备替换',\n appCode: 'valueAddedApp_opsdev_replace',\n pic: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyshebeitongwei@2x.png',\n id: 34,\n desc: '设备替换用于简化故障设备进行维修施工的流程。支持一键将原设备的配置信息,同步到替换后的新设备'\n },\n {\n projectList: [\n '室内项目-1.5.1前端融合213123123',\n '1.9.2',\n '商照能源三期1.9.0',\n '沉香室内项目测试',\n '老数据回归',\n '新建项目测试告警',\n '沉香12.16新建项目',\n '2.5.0户外项目本地定时',\n '风息测试室内项目',\n 'zoe验证',\n '虚拟设备项目'\n ],\n name: '空间分享',\n appCode: 'valueAddedApp_space_qrCode',\n pic: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyerweima@2x.png',\n id: 38,\n desc: '设备二维码分享是一款可以进行设备临时分享的应用。适用于共享开放空间中,用户通过手机扫码的方式,进行临时的设备控制。'\n },\n {\n projectList: [\n '室内项目-1.5.1前端融合213123123',\n '1.9.2',\n '1.9.2优化界面测试',\n '1.9.4人因照明优化测试',\n '照度测试项目',\n '沉香室内项目测试',\n '沉香能耗通用测试',\n '技术1.1.0测试'\n ],\n name: '行业模板',\n appCode: 'industry_space_template',\n pic: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zyhymb@2x.png',\n id: 62,\n desc: '行业区域模板是一款以满足项目快速落地为目标的应用,通过标准的配置流程,结合行业使用场景完成预设模版的调用,快速完成核心使用功能的调试、配置工作'\n },\n {\n projectList: [\n '沉香室内项目测试',\n '能耗回归',\n '室内项目-1.5.1前端融合213123123',\n '照度测试项目',\n '1.9.2',\n '商照能源三期1.9.0',\n '老数据回归',\n '灵门测试项目2023.01.05',\n '技术1.1.0测试',\n '灵门能耗项目3月27日',\n '123'\n ],\n name: '节律照明',\n appCode: 'rhythm',\n pic: 'https://images.tuyacn.com/app/illumination/rhythm.png',\n id: 74,\n desc: '节律照明是一款以使用空间为对象、以时间周期为维度,围绕调光调色灯具展开综合调节,为空间营造出自动化、沉浸式的舒适环境体验。'\n },\n {\n projectList: [\n '沉香室内项目测试',\n '户外项目1.12.3',\n '技术1.1.0测试',\n '灵门测试项目2023.01.05',\n '沉香12.16新建项目',\n '沉香回归测试能耗',\n '沉香-虚拟能耗项目',\n '没开白名单新建户外项目',\n '没开白名单的新建室内项目',\n '风息测试室外项目',\n '123',\n '风息测试室内项目',\n '沉香北美认证虚拟能耗项目',\n '北美-虚拟能耗项目'\n ],\n name: '设备日志',\n appCode: 'system_device_log',\n pic: 'https://images.tuyacn.com/app/illumination/rhythm.png',\n id: 78,\n desc: '设备日志用于记录和查看项目内设备发生的状态变化。支持基于设备维度的日志信息查询,为用户掌握设备状态,快速定位问题提供数据支撑。'\n },\n {\n projectList: [\n '照度测试项目',\n '室内项目-1.5.1前端融合213123123',\n '沉香室内项目测试',\n '1.9.2',\n '1.9.4人因照明优化测试',\n '商照能源三期1.9.0',\n '灵门测试项目2023.01.05'\n ],\n name: 'KUMUX-人因照明控制策略',\n appCode: 'valueAddedApp_space_hcl',\n pic: 'https://images.tuyacn.com/smart/SAAS/light/hcl.png',\n id: 94,\n desc: '通过商照SaaS与Kumux算法模型的深入融合,围绕空间用途、项目经纬度等因素,时刻为用户提供良好的人因照明策略运行的体验'\n },\n {\n projectList: ['会议预约V1.14.0测试商照'],\n name: '会议预约',\n appCode: 'smart_meeting',\n pic: 'https://images.tuyacn.com/app/illumination/meeting.png',\n id: 110,\n desc: '通过对办公会议室的整体智能化管理,助力管理人员更好的维护、运营有限公共资源的同时也带给使用者更好的用户体验'\n },\n {\n projectList: ['沉香12.16新建项目', '沉香-虚拟能耗项目', '沉香回归测试能耗'],\n name: '虚拟能耗',\n appCode: 'virtual_energy',\n pic: 'https://images.tuyacn.com/content-platform/hestia/1672110920bb6c267a58f.png',\n id: 134,\n desc: '该应用可针对不具备电量统计条件的设备进行额定功率设置,系统将自动根据设备的运行时长,运行频率进行电量统计。'\n }\n ],\n merchantName: '沉香测试1241212oo88',\n deviceMaxNum: 1000,\n deviceNum: 219,\n showCombo: 0,\n oem: false,\n projectNum: 40,\n expireSec: 1950105599363\n },\n 'tuya.m.cl.combo.register': {\n comboList: [\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=ordinary',\n duration: '咨询报价',\n trail: true,\n price: '咨询报价',\n priceType: false,\n name: '基础版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '免费试用15天',\n version: 'ordinary',\n url: 'https://images.tuyacn.com/app/illumination/combo/ordinary/icon_jc_logox@2x.png',\n desc: '适用于控制需要简单的中小型商照项目'\n },\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=advanced',\n duration: '咨询报价',\n trail: false,\n price: '咨询报价',\n priceType: false,\n name: '高级版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '咨询联系',\n version: 'advanced',\n url: 'https://images.tuyacn.com/app/illumination/combo/advanced/icon_gj_logox@2x.png',\n desc: '适用于控制需求、设备接入量较多的中大型商照项目'\n },\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=profession',\n duration: '咨询报价',\n trail: false,\n price: '咨询报价',\n priceType: false,\n name: '专业版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '咨询联系',\n version: 'profession',\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png',\n desc: '适用于专业级商照项目,提供高级照明控制方案'\n },\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=profession',\n duration: '咨询报价',\n trail: false,\n price: '咨询报价',\n priceType: false,\n name: '专业版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '咨询联系',\n version: 'industry',\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png',\n desc: '适用于专业级商照项目,提供高级照明控制方案'\n }\n ],\n companyName: '沉香测试1241212oo88',\n version: 'profession',\n account: 'illcx@yopmail.net'\n },\n 'tuya.m.cl.register.success': {\n comboList: [\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=ordinary',\n duration: '咨询报价',\n trail: true,\n price: '咨询报价',\n priceType: false,\n name: '基础版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '免费试用15天',\n version: 'ordinary',\n url: 'https://images.tuyacn.com/app/illumination/combo/ordinary/icon_jc_logox@2x.png',\n desc: '适用于控制需要简单的中小型商照项目'\n },\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=advanced',\n duration: '咨询报价',\n trail: false,\n price: '咨询报价',\n priceType: false,\n name: '高级版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '咨询联系',\n version: 'advanced',\n url: 'https://images.tuyacn.com/app/illumination/combo/advanced/icon_gj_logox@2x.png',\n desc: '适用于控制需求、设备接入量较多的中大型商照项目'\n },\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=profession',\n duration: '咨询报价',\n trail: false,\n price: '咨询报价',\n priceType: false,\n name: '专业版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '咨询联系',\n version: 'profession',\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png',\n desc: '适用于专业级商照项目,提供高级照明控制方案'\n },\n {\n h5Url: 'https://lighting-h5.console.tuya.com/combo/chose?version=profession',\n duration: '咨询报价',\n trail: false,\n price: '咨询报价',\n priceType: false,\n name: '专业版',\n contactPerson: {\n phone: '4100-881-8611',\n name: '姚经理',\n email: 'lighting@tuya.com'\n },\n buttonWord: '咨询联系',\n version: 'industry',\n url: 'https://images.tuyacn.com/app/illumination/combo/profession/icon_zy_logox@2x.png',\n desc: '适用于专业级商照项目,提供高级照明控制方案'\n }\n ],\n companyName: '沉香测试1241212oo88',\n showType: 1\n }\n};\n", "// extracted by mini-css-extract-plugin\nmodule.exports = {\"baseModal\":\"index-module__baseModal___DQKBE\",\"withoutContent\":\"index-module__withoutContent___FZH4R\",\"wrapper\":\"index-module__wrapper___oOZCT\",\"h5Wrapper\":\"index-module__h5Wrapper___YZ1US\"};", "import i18n from '@/utils/i18n';\nimport BaseComponentProps from '@/common/types/BaseComponentProps';\nimport { View } from '@tarojs/components';\nimport React, { ReactElement } from 'react';\nimport { AtModal, AtModalAction, AtModalContent, AtModalHeader } from 'taro-ui';\nimport styles from './index.module.scss';\n\nexport interface BaseModalProps extends BaseComponentProps {\n isOpened: boolean;\n title: string;\n content?: string;\n customContent?: ReactElement;\n confirmText?: string;\n cancelText?: string;\n onConfirm: () => void;\n onCancel?: () => void;\n showCancel?: boolean;\n className?: any;\n}\nconst t = i18n();\n\nconst BaseModal: React.FC = ({\n isOpened,\n title,\n content,\n customContent = undefined,\n onConfirm,\n showCancel = false,\n onCancel,\n confirmText = t('ok'),\n cancelText = t('cancel'),\n className\n}) => {\n const handleCancelClick = (e) => {\n e.stopPropagation();\n onCancel?.();\n };\n\n return (\n \n {!customContent && (\n \n )}\n {customContent && (\n \n {title}\n {customContent}\n \n \n {showCancel && (\n \n {cancelText}\n \n )}\n \n {confirmText}\n \n \n \n \n )}\n \n );\n};\n\nexport default BaseModal;\n", "// extracted by mini-css-extract-plugin\nmodule.exports = {\"baseOperateFooter\":\"index-module__baseOperateFooter___MzwXs\",\"secondaryBtn\":\"index-module__secondaryBtn___Pmir2\",\"isIOSBaseOperateFooter\":\"index-module__isIOSBaseOperateFooter___VzStl\",\"isAndroidBaseOperateFooter\":\"index-module__isAndroidBaseOperateFooter___PGaVC\"};", "import React from 'react';\nimport BaseComponentProps from '@/common/types/BaseComponentProps';\nimport { View } from '@tarojs/components';\nimport { AtButton } from 'taro-ui';\nimport styles from './index.module.scss';\nimport { isAndroid } from '@/utils/getSystemInfoSync';\n\nexport interface BaseOperateFooterProps extends BaseComponentProps {\n primaryButtonText: string;\n onPrimaryButtonClick: () => any;\n secondaryButtonText?: string;\n onSecondaryButtonClick?: () => any;\n primaryButtonLoading?: boolean;\n primaryButtonDisabled?: boolean;\n secondaryButtonLoading?: boolean;\n secondaryButtonDisabled?: boolean;\n}\nconst BaseOperateFooter: React.FC = ({\n className,\n primaryButtonText,\n secondaryButtonText,\n onPrimaryButtonClick,\n onSecondaryButtonClick,\n primaryButtonLoading = false,\n primaryButtonDisabled = false,\n secondaryButtonLoading = false,\n secondaryButtonDisabled = false\n}) => (\n \n {secondaryButtonText && (\n \n {secondaryButtonText}\n \n )}\n \n {primaryButtonText}\n \n \n);\n\nexport default BaseOperateFooter;\n", "// extracted by mini-css-extract-plugin\nmodule.exports = {\"basePage\":\"index-module__basePage___JJNQP\",\"footer\":\"index-module__footer___6wRoo\"};", "import React from 'react';\nimport BaseComponentProps from '@/common/types/BaseComponentProps';\nimport { View } from '@tarojs/components';\nimport styles from './index.module.scss';\nimport BaseOperateFooter, { BaseOperateFooterProps } from '../BaseOperateFooter';\n\ninterface IBasePicker extends BaseComponentProps {\n footerConfig?: BaseOperateFooterProps\n}\n\nconst BasePage: React.FC = (props) => {\n const { children, className, style, footerConfig } = props\n const {\n className: footerClass,\n primaryButtonText = \"\",\n onPrimaryButtonClick = () => void 0,\n ...footer\n } = footerConfig || {}\n\n return \n {children}\n {footerConfig && }\n \n};\n\nexport default BasePage;\n", "// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"index-module__container___nkg-l\"};", "import React, { FC } from 'react'\nimport cls from 'classnames'\nimport styles from './index.module.scss'\nimport { View } from '@tarojs/components'\n\ninterface IProps {\n disableGutters?: boolean\n className?: string\n children?: any\n}\n\nconst Container: FC = ({ disableGutters = false, children, className, ...props }) => {\n const cl = cls({ [styles.container]: !disableGutters }, className)\n\n return (\n \n {children}\n \n )\n}\n\nexport default Container\n", "export enum GLOBAL_KEY {\n /** 网络状态*/\n IS_ONLINE = 'IS_ONLINE',\n ADD_VALUE = 'ADD_VALUE',\n}\n\nlet MpGlobalData = {\n /** 网络状态*/\n [GLOBAL_KEY.IS_ONLINE]: true,\n [GLOBAL_KEY.ADD_VALUE]: {} as any\n};\n\nexport function setGlobalData(key: K, val) {\n if (!key) {\n console.error('key值不能为空');\n return;\n }\n MpGlobalData[key] = val;\n}\n\nexport function getGlobalData(key: K) {\n return MpGlobalData[key];\n}\n\nexport const clearGlobalData = () => {\n if (MpGlobalData) {\n MpGlobalData = {} as typeof MpGlobalData;\n }\n}\n", "import common from './common.json';\n\nexport default {\n common\n};\n", "import common from './common.json';\n\nexport default {\n common\n};\n", "import common from './common.json';\n\nexport default {\n common\n};\n", "import common from './common.json';\n\nexport default {\n common\n};\n", "import common from './common.json';\n\nexport default {\n common\n};\n", "import common from './common.json';\n\nexport default {\n common\n};\n", "/** 获取当前环境的语言, 默认zh */\nexport const getLanguage = () => {\n const reg = /[-|_]/g;\n const infos = ty.getSystemInfoSync();\n const language = infos?.language?.split(reg)?.[0];\n console.log('language', infos?.language?.split(reg), language, infos);\n\n return ['zh', 'en', 'ja', 'es', 'de', 'fr'].includes(language) ? language : 'en';\n};\n\nexport const isChinaArea = () => {\n const reg = /[-|_]/g;\n const infos = ty.getSystemInfoSync();\n const language = infos?.language?.split(reg)?.[0];\n\n return language === 'zh';\n};\n", "export const systemInfo = ty.getSystemInfoSync();\n\nexport const isAndroid = systemInfo?.platform === 'android'\n", "import LanguageDetector from 'i18next-browser-languagedetector';\nimport i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport zh from '../locales/zh';\nimport en from '../locales/en';\nimport de from '../locales/de';\nimport fr from '../locales/fr';\nimport es from '../locales/es';\nimport ja from '../locales/ja';\nimport { getLanguage } from './getLanguage';\n\nconst language = getLanguage();\n\ni18n.use(LanguageDetector).use(initReactI18next).init({\n compatibilityJSON: 'v3',\n fallbackLng: 'zh',\n resources: {\n zh,\n en,\n de,\n fr,\n es,\n ja\n },\n lng: language\n});\n\nconsole.log('%c language', 'font-size:14px; background: blue; color:#fff;', language);\n\nconst i18ns =\n () =>\n (keys, options = {}) =>\n i18n.t(keys, {\n ...options,\n ns: ['common']\n });\n\nexport default i18ns;\n", "import mockData from '@/api/mockData';\nimport { GLOBAL_KEY, getGlobalData } from '../../config/globalData/index';\nimport Taro from '@tarojs/taro';\n\nexport interface IResponse {\n result: T;\n success: boolean;\n code: number;\n status: string;\n msg?: string;\n errorCode?: string;\n}\n\ntype Method = 'GET' | 'POST' | 'PUT' | 'DELETE';\n\ninterface SelectUrl {\n /**\n * @name atop接口(不走fast网关)\n */\n atopUrl?: string;\n\n /**\n * @name atop接口(走fast网关)\n */\n atopUrlByFast?: string;\n}\n\ninterface ExtraConfig {\n noBlockId?: boolean;\n noErrorToast?: boolean;\n noRedirect?: boolean;\n ignoreErrorCodes?: number[];\n noLogin?: boolean;\n}\nexport async function request(reqConfig: {\n url: string;\n method?: Method;\n data?: Record;\n extData?: { gid?: string };\n apiVersion?: string;\n extraConfig?: ExtraConfig;\n}): Promise> {\n const { url, data, apiVersion, extData } = reqConfig;\n const isOnline = getGlobalData(GLOBAL_KEY.IS_ONLINE);\n if (!isOnline) {\n Taro.hideLoading();\n Taro.showToast({ title: 'Network unavailable', duration: 2000, icon: 'none' });\n return Promise.reject({});\n }\n\n let res: any = { result: {}, success: false, code: 0 };\n\n const brand = 'devtools' // devtools\n\n const requestAtopDirectly = () =>\n new Promise((resolve) => {\n // IDE调试工具\n if (brand !== 'devtools') {\n resolve({\n data: {\n result: mockData?.[url] || {},\n success: true\n }\n });\n return;\n }\n\n ty.apiRequestByAtop({\n api: url,\n version: apiVersion || '1.0',\n postData: { ...data } || {},\n extData,\n success: (result) => {\n console.log('------------- result ↓ -------------------');\n console.log('url: ', url);\n console.log('params: ', data);\n console.log('result', result);\n console.log('--------------- ↑ ------------------------');\n resolve({\n data: {\n result,\n success: true\n }\n });\n },\n fail: (e) => {\n console.log('fail: ', e);\n resolve({\n data: Object.assign({}, e?.innerError, { code: +e?.innerError?.errorCode }),\n errorMsg: e?.errorMsg\n });\n },\n complete: () => {\n Taro.hideLoading();\n }\n });\n });\n\n res = await requestAtopDirectly();\n\n if (res?.data?.success) {\n const { data: resData } = res;\n const { result = {}, success, code, msg } = resData;\n res = { result, success, code, msg };\n\n console.log('res', resData);\n } else {\n console.log('---error----');\n console.log(res);\n setTimeout(() => {\n Taro.showToast({ title: res.data.errorMsg, duration: 2000, icon: 'none' });\n }, 200);\n }\n return res;\n}\n", "function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var getPrototypeOf = require(\"./getPrototypeOf.js\");\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct.js\");\nvar possibleConstructorReturn = require(\"./possibleConstructorReturn.js\");\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return possibleConstructorReturn(this, result);\n };\n}\nmodule.exports = _createSuper, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}", "export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}", "import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}", "export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}", "function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}", "export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}", "import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}", "import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}", "import getPrototypeOf from \"./getPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn.js\";\nexport default function _createSuper(Derived) {\n var hasNativeReflectConstruct = isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = getPrototypeOf(Derived),\n result;\n if (hasNativeReflectConstruct) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return possibleConstructorReturn(this, result);\n };\n}", "import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}", "import superPropBase from \"./superPropBase.js\";\nexport default function _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get.bind();\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n return desc.value;\n };\n }\n return _get.apply(this, arguments);\n}", "export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}", "import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}", "export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}", "export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}", "export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}", "export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}", "export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}", "export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}", "import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nexport default function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}", "import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}", "export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}", "import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}", "import _typeof from \"./typeof.js\";\nexport default function _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n };\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}", "import superPropBase from \"./superPropBase.js\";\nimport defineProperty from \"./defineProperty.js\";\nfunction set(target, property, value, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.set) {\n set = Reflect.set;\n } else {\n set = function set(target, property, value, receiver) {\n var base = superPropBase(target, property);\n var desc;\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n } else if (!desc.writable) {\n return false;\n }\n }\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n if (desc) {\n if (!desc.writable) {\n return false;\n }\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n defineProperty(receiver, property, value);\n }\n return true;\n };\n }\n return set(target, property, value, receiver);\n}\nexport default function _set(target, property, value, receiver, isStrict) {\n var s = set(target, property, value, receiver || target);\n if (!s && isStrict) {\n throw new TypeError('failed to set property');\n }\n return value;\n}", "export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}", "import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}", "import getPrototypeOf from \"./getPrototypeOf.js\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n return object;\n}", "import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}", "import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}", "import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}", "import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}", "export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}", "import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}", "import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}", "function _extends() {\n module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _extends.apply(this, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nmodule.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var defineProperty = require(\"./defineProperty.js\");\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nfunction _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}\nmodule.exports = _objectSpread2, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\nvar iterableToArray = require(\"./iterableToArray.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;", "/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n", "import e from\"void-elements\";var t=/\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g;function n(n){var r={type:\"tag\",name:\"\",voidElement:!1,attrs:{},children:[]},i=n.match(/<\\/?([^\\s]+?)[/\\s>]/);if(i&&(r.name=i[1],(e[i[1]]||\"/\"===n.charAt(n.length-2))&&(r.voidElement=!0),r.name.startsWith(\"!--\"))){var s=n.indexOf(\"--\\x3e\");return{type:\"comment\",comment:-1!==s?n.slice(4,s):\"\"}}for(var a=new RegExp(t),c=null;null!==(c=a.exec(n));)if(c[0].trim())if(c[1]){var o=c[1].trim(),l=[o,\"\"];o.indexOf(\"=\")>-1&&(l=o.split(\"=\")),r.attrs[l[0]]=l[1],a.lastIndex--}else c[2]&&(r.attrs[c[2]]=c[3].trim().substring(1,c[3].length-1));return r}var r=/<[a-zA-Z0-9\\-\\!\\/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g,i=/^\\s*$/,s=Object.create(null);function a(e,t){switch(t.type){case\"text\":return e+t.content;case\"tag\":return e+=\"<\"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'=\"'+e[n]+'\"');return t.length?\" \"+t.join(\" \"):\"\"}(t.attrs):\"\")+(t.voidElement?\"/>\":\">\"),t.voidElement?e:e+t.children.reduce(a,\"\")+\"\";case\"comment\":return e+\"\\x3c!--\"+t.comment+\"--\\x3e\"}}var c={parse:function(e,t){t||(t={}),t.components||(t.components=s);var a,c=[],o=[],l=-1,m=!1;if(0!==e.indexOf(\"<\")){var u=e.indexOf(\"<\");c.push({type:\"text\",content:-1===u?e:e.substring(0,u)})}return e.replace(r,function(r,s){if(m){if(r!==\"\")return;m=!1}var u,f=\"/\"!==r.charAt(1),h=r.startsWith(\"\\x3c!--\"),p=s+r.length,d=e.charAt(p);if(h){var v=n(r);return l<0?(c.push(v),c):((u=o[l]).children.push(v),c)}if(f&&(l++,\"tag\"===(a=n(r)).type&&t.components[a.name]&&(a.type=\"component\",m=!0),a.voidElement||m||!d||\"<\"===d||a.children.push({type:\"text\",content:e.slice(p,e.indexOf(\"<\",p))}),0===l&&c.push(a),(u=o[l-1])&&u.children.push(a),o[l]=a),(!f||a.voidElement)&&(l>-1&&(a.voidElement||a.name===r.slice(2,-1))&&(l--,a=-1===l?c:o[l]),!m&&\"<\"!==d&&d)){u=-1===l?c:o[l].children;var x=e.indexOf(\"<\",p),g=e.slice(p,-1===x?void 0:x);i.test(g)&&(g=\" \"),(x>-1&&l+u.length>=0||\" \"!==g)&&u.push({type:\"text\",content:g})}}),c},stringify:function(e){return e.reduce(function(e,t){return e+a(\"\",t)},\"\")}};export default c;\n//# sourceMappingURL=html-parse-stringify.module.js.map\n", "import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\n\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\nfunction defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}\n\n// eslint-disable-next-line no-control-regex\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\nvar serializeCookie = function serializeCookie(name, val, options) {\n var opt = options || {};\n opt.path = opt.path || '/';\n var value = encodeURIComponent(val);\n var str = \"\".concat(name, \"=\").concat(value);\n if (opt.maxAge > 0) {\n var maxAge = opt.maxAge - 0;\n if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');\n str += \"; Max-Age=\".concat(Math.floor(maxAge));\n }\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n str += \"; Domain=\".concat(opt.domain);\n }\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n str += \"; Path=\".concat(opt.path);\n }\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n str += \"; Expires=\".concat(opt.expires.toUTCString());\n }\n if (opt.httpOnly) str += '; HttpOnly';\n if (opt.secure) str += '; Secure';\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n return str;\n};\nvar cookie = {\n create: function create(name, value, minutes, domain) {\n var cookieOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n path: '/',\n sameSite: 'strict'\n };\n if (minutes) {\n cookieOptions.expires = new Date();\n cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);\n }\n if (domain) cookieOptions.domain = domain;\n document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);\n },\n read: function read(name) {\n var nameEQ = \"\".concat(name, \"=\");\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) === ' ') {\n c = c.substring(1, c.length);\n }\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n },\n remove: function remove(name) {\n this.create(name, '', -1);\n }\n};\nvar cookie$1 = {\n name: 'cookie',\n lookup: function lookup(options) {\n var found;\n if (options.lookupCookie && typeof document !== 'undefined') {\n var c = cookie.read(options.lookupCookie);\n if (c) found = c;\n }\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupCookie && typeof document !== 'undefined') {\n cookie.create(options.lookupCookie, lng, options.cookieMinutes, options.cookieDomain, options.cookieOptions);\n }\n }\n};\n\nvar querystring = {\n name: 'querystring',\n lookup: function lookup(options) {\n var found;\n if (typeof window !== 'undefined') {\n var search = window.location.search;\n if (!window.location.search && window.location.hash && window.location.hash.indexOf('?') > -1) {\n search = window.location.hash.substring(window.location.hash.indexOf('?'));\n }\n var query = search.substring(1);\n var params = query.split('&');\n for (var i = 0; i < params.length; i++) {\n var pos = params[i].indexOf('=');\n if (pos > 0) {\n var key = params[i].substring(0, pos);\n if (key === options.lookupQuerystring) {\n found = params[i].substring(pos + 1);\n }\n }\n }\n }\n return found;\n }\n};\n\nvar hasLocalStorageSupport = null;\nvar localStorageAvailable = function localStorageAvailable() {\n if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;\n try {\n hasLocalStorageSupport = window !== 'undefined' && window.localStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.localStorage.setItem(testKey, 'foo');\n window.localStorage.removeItem(testKey);\n } catch (e) {\n hasLocalStorageSupport = false;\n }\n return hasLocalStorageSupport;\n};\nvar localStorage = {\n name: 'localStorage',\n lookup: function lookup(options) {\n var found;\n if (options.lookupLocalStorage && localStorageAvailable()) {\n var lng = window.localStorage.getItem(options.lookupLocalStorage);\n if (lng) found = lng;\n }\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupLocalStorage && localStorageAvailable()) {\n window.localStorage.setItem(options.lookupLocalStorage, lng);\n }\n }\n};\n\nvar hasSessionStorageSupport = null;\nvar sessionStorageAvailable = function sessionStorageAvailable() {\n if (hasSessionStorageSupport !== null) return hasSessionStorageSupport;\n try {\n hasSessionStorageSupport = window !== 'undefined' && window.sessionStorage !== null;\n var testKey = 'i18next.translate.boo';\n window.sessionStorage.setItem(testKey, 'foo');\n window.sessionStorage.removeItem(testKey);\n } catch (e) {\n hasSessionStorageSupport = false;\n }\n return hasSessionStorageSupport;\n};\nvar sessionStorage = {\n name: 'sessionStorage',\n lookup: function lookup(options) {\n var found;\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n var lng = window.sessionStorage.getItem(options.lookupSessionStorage);\n if (lng) found = lng;\n }\n return found;\n },\n cacheUserLanguage: function cacheUserLanguage(lng, options) {\n if (options.lookupSessionStorage && sessionStorageAvailable()) {\n window.sessionStorage.setItem(options.lookupSessionStorage, lng);\n }\n }\n};\n\nvar navigator$1 = {\n name: 'navigator',\n lookup: function lookup(options) {\n var found = [];\n if (typeof navigator !== 'undefined') {\n if (navigator.languages) {\n // chrome only; not an array, so can't use .push.apply instead of iterating\n for (var i = 0; i < navigator.languages.length; i++) {\n found.push(navigator.languages[i]);\n }\n }\n if (navigator.userLanguage) {\n found.push(navigator.userLanguage);\n }\n if (navigator.language) {\n found.push(navigator.language);\n }\n }\n return found.length > 0 ? found : undefined;\n }\n};\n\nvar htmlTag = {\n name: 'htmlTag',\n lookup: function lookup(options) {\n var found;\n var htmlTag = options.htmlTag || (typeof document !== 'undefined' ? document.documentElement : null);\n if (htmlTag && typeof htmlTag.getAttribute === 'function') {\n found = htmlTag.getAttribute('lang');\n }\n return found;\n }\n};\n\nvar path = {\n name: 'path',\n lookup: function lookup(options) {\n var found;\n if (typeof window !== 'undefined') {\n var language = window.location.pathname.match(/\\/([a-zA-Z-]*)/g);\n if (language instanceof Array) {\n if (typeof options.lookupFromPathIndex === 'number') {\n if (typeof language[options.lookupFromPathIndex] !== 'string') {\n return undefined;\n }\n found = language[options.lookupFromPathIndex].replace('/', '');\n } else {\n found = language[0].replace('/', '');\n }\n }\n }\n return found;\n }\n};\n\nvar subdomain = {\n name: 'subdomain',\n lookup: function lookup(options) {\n // If given get the subdomain index else 1\n var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1;\n // get all matches if window.location. is existing\n // first item of match is the match itself and the second is the first group macht which sould be the first subdomain match\n // is the hostname no public domain get the or option of localhost\n var language = typeof window !== 'undefined' && window.location && window.location.hostname && window.location.hostname.match(/^(\\w{2,5})\\.(([a-z0-9-]{1,63}\\.[a-z]{2,6})|localhost)/i);\n\n // if there is no match (null) return undefined\n if (!language) return undefined;\n // return the given group match\n return language[lookupFromSubdomainIndex];\n }\n};\n\nfunction getDefaults() {\n return {\n order: ['querystring', 'cookie', 'localStorage', 'sessionStorage', 'navigator', 'htmlTag'],\n lookupQuerystring: 'lng',\n lookupCookie: 'i18next',\n lookupLocalStorage: 'i18nextLng',\n lookupSessionStorage: 'i18nextLng',\n // cache user language\n caches: ['localStorage'],\n excludeCacheFor: ['cimode'],\n // cookieMinutes: 10,\n // cookieDomain: 'myDomain'\n\n convertDetectedLanguage: function convertDetectedLanguage(l) {\n return l;\n }\n };\n}\nvar Browser = /*#__PURE__*/function () {\n function Browser(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, Browser);\n this.type = 'languageDetector';\n this.detectors = {};\n this.init(services, options);\n }\n _createClass(Browser, [{\n key: \"init\",\n value: function init(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var i18nOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.services = services || {\n languageUtils: {}\n }; // this way the language detector can be used without i18next\n this.options = defaults(options, this.options || {}, getDefaults());\n if (typeof this.options.convertDetectedLanguage === 'string' && this.options.convertDetectedLanguage.indexOf('15897') > -1) {\n this.options.convertDetectedLanguage = function (l) {\n return l.replace('-', '_');\n };\n }\n\n // backwards compatibility\n if (this.options.lookupFromUrlIndex) this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex;\n this.i18nOptions = i18nOptions;\n this.addDetector(cookie$1);\n this.addDetector(querystring);\n this.addDetector(localStorage);\n this.addDetector(sessionStorage);\n this.addDetector(navigator$1);\n this.addDetector(htmlTag);\n this.addDetector(path);\n this.addDetector(subdomain);\n }\n }, {\n key: \"addDetector\",\n value: function addDetector(detector) {\n this.detectors[detector.name] = detector;\n }\n }, {\n key: \"detect\",\n value: function detect(detectionOrder) {\n var _this = this;\n if (!detectionOrder) detectionOrder = this.options.order;\n var detected = [];\n detectionOrder.forEach(function (detectorName) {\n if (_this.detectors[detectorName]) {\n var lookup = _this.detectors[detectorName].lookup(_this.options);\n if (lookup && typeof lookup === 'string') lookup = [lookup];\n if (lookup) detected = detected.concat(lookup);\n }\n });\n detected = detected.map(function (d) {\n return _this.options.convertDetectedLanguage(d);\n });\n if (this.services.languageUtils.getBestMatchFromCodes) return detected; // new i18next v19.5.0\n return detected.length > 0 ? detected[0] : null; // a little backward compatibility\n }\n }, {\n key: \"cacheUserLanguage\",\n value: function cacheUserLanguage(lng, caches) {\n var _this2 = this;\n if (!caches) caches = this.options.caches;\n if (!caches) return;\n if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;\n caches.forEach(function (cacheName) {\n if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);\n });\n }\n }]);\n return Browser;\n}();\nBrowser.type = 'languageDetector';\n\nexport { Browser as default };\n", "const consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n if (console && console[type]) console[type].apply(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.init(concreteLogger, options);\n }\n init(concreteLogger) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return this.forward(args, 'log', '', true);\n }\n warn() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return this.forward(args, 'warn', '', true);\n }\n error() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n return this.forward(args, 'error', '');\n }\n deprecate() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (typeof args[0] === 'string') args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n this.observers[event] = this.observers[event] || [];\n this.observers[event].push(listener);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event] = this.observers[event].filter(l => l !== listener);\n }\n emit(event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n if (this.observers[event]) {\n const cloned = [].concat(this.observers[event]);\n cloned.forEach(observer => {\n observer(...args);\n });\n }\n if (this.observers['*']) {\n const cloned = [].concat(this.observers['*']);\n cloned.forEach(observer => {\n observer.apply(observer, [event, ...args]);\n });\n }\n }\n}\n\nfunction defer() {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n}\nfunction makeString(object) {\n if (object == null) return '';\n return '' + object;\n}\nfunction copy(a, s, t) {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n}\nfunction getLastOfPath(object, path, Empty) {\n function cleanKey(key) {\n return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;\n }\n function canNotTraverseDeeper() {\n return !object || typeof object === 'string';\n }\n const stack = typeof path !== 'string' ? [].concat(path) : path.split('.');\n while (stack.length > 1) {\n if (canNotTraverseDeeper()) return {};\n const key = cleanKey(stack.shift());\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n }\n if (canNotTraverseDeeper()) return {};\n return {\n obj: object,\n k: cleanKey(stack.shift())\n };\n}\nfunction setPath(object, path, newValue) {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = newValue;\n}\nfunction pushPath(object, path, newValue, concat) {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n if (concat) obj[k] = obj[k].concat(newValue);\n if (!concat) obj[k].push(newValue);\n}\nfunction getPath(object, path) {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n return obj[k];\n}\nfunction getPathWithDefaults(data, defaultData, key) {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n}\nfunction deepExtend(target, source, overwrite) {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (prop in target) {\n if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n}\nfunction regexEscape(str) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n}\nvar _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\nfunction escape(data) {\n if (typeof data === 'string') {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n}\nconst chars = [' ', ',', '?', '!', ';'];\nfunction looksLikeObjectPath(key, nsSeparator, keySeparator) {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0);\n if (possibleChars.length === 0) return true;\n const r = new RegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n}\nfunction deepFind(obj, path) {\n let keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';\n if (!obj) return undefined;\n if (obj[path]) return obj[path];\n const paths = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < paths.length; ++i) {\n if (!current) return undefined;\n if (typeof current[paths[i]] === 'string' && i + 1 < paths.length) {\n return undefined;\n }\n if (current[paths[i]] === undefined) {\n let j = 2;\n let p = paths.slice(i, i + j).join(keySeparator);\n let mix = current[p];\n while (mix === undefined && paths.length > i + j) {\n j++;\n p = paths.slice(i, i + j).join(keySeparator);\n mix = current[p];\n }\n if (mix === undefined) return undefined;\n if (mix === null) return null;\n if (path.endsWith(p)) {\n if (typeof mix === 'string') return mix;\n if (p && typeof mix[p] === 'string') return mix[p];\n }\n const joinedPath = paths.slice(i + j).join(keySeparator);\n if (joinedPath) return deepFind(mix, joinedPath, keySeparator);\n return undefined;\n }\n current = current[paths[i]];\n }\n return current;\n}\nfunction getCleanedCode(code) {\n if (code && code.indexOf('_') > 0) return code.replace('_', '-');\n return code;\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n ns: ['translation'],\n defaultNS: 'translation'\n };\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path = [lng, ns];\n if (key && typeof key !== 'string') path = path.concat(key);\n if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n }\n const result = getPath(this.data, path);\n if (result || !ignoreJSONStructure || typeof key !== 'string') return result;\n return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);\n }\n addResource(lng, ns, key, value) {\n let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n silent: false\n };\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n silent: false\n };\n for (const m in resources) {\n if (typeof resources[m] === 'string' || Object.prototype.toString.apply(resources[m]) === '[object Array]') this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite) {\n let options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {\n silent: false\n };\n let path = [lng, ns];\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n if (this.options.compatibilityAPI === 'v1') return {\n ...{},\n ...this.getResource(lng, ns)\n };\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n if (this.processors[processor]) value = this.processors[processor].process(value, key, options, translator);\n });\n return value;\n }\n};\n\nconst checkedLoadedFor = {};\nclass Translator extends EventEmitter {\n constructor(services) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n interpolation: {}\n };\n if (key === undefined || key === null) {\n return false;\n }\n const resolved = this.resolve(key, options);\n return resolved && resolved.res !== undefined;\n }\n extractFromKey(key, options) {\n let nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let namespaces = options.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !options.keySeparator && !this.options.userDefinedNsSeparator && !options.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n if (typeof namespaces === 'string') namespaces = [namespaces];\n return {\n key,\n namespaces\n };\n }\n translate(keys, options, lastKey) {\n if (typeof options !== 'object' && this.options.overloadTranslationOptionHandler) {\n options = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof options === 'object') options = {\n ...options\n };\n if (!options) options = {};\n if (keys === undefined || keys === null) return '';\n if (!Array.isArray(keys)) keys = [String(keys)];\n const returnDetails = options.returnDetails !== undefined ? options.returnDetails : this.options.returnDetails;\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], options);\n const namespace = namespaces[namespaces.length - 1];\n const lng = options.lng || this.language;\n const appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng && lng.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n const nsSeparator = options.nsSeparator || this.options.nsSeparator;\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, options);\n let res = resolved && resolved.res;\n const resUsedKey = resolved && resolved.usedKey || key;\n const resExactUsedKey = resolved && resolved.exactUsedKey || key;\n const resType = Object.prototype.toString.apply(res);\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';\n if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {\n if (!options.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, {\n ...options,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = resType === '[object Array]';\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in res) {\n if (Object.prototype.hasOwnProperty.call(res, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n copy[m] = this.translate(deepKey, {\n ...options,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n if (copy[m] === deepKey) copy[m] = res[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, options, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n const needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n const hasDefaultValue = Translator.hasDefaultValue(options);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : '';\n const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {\n ordinal: false\n }) : '';\n const defaultValue = options[`defaultValue${defaultValueSuffix}`] || options[`defaultValue${defaultValueSuffixOrdinalFallback}`] || options.defaultValue;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...options,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);\n } else {\n lngs.push(options.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, options);\n } else if (this.backendConnector && this.backendConnector.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, options);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n this.pluralResolver.getSuffixes(language, options).forEach(suffix => {\n send([language], key + suffix, options[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, options, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = `${namespace}:${key}`;\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n if (this.options.compatibilityAPI !== 'v1') {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}:${key}` : key, usedDefault ? res : undefined);\n } else {\n res = this.options.parseMissingKeyHandler(res);\n }\n }\n }\n if (returnDetails) {\n resolved.res = res;\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, options, resolved, lastKey) {\n var _this = this;\n if (this.i18nFormat && this.i18nFormat.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...options\n }, options.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!options.skipInterpolation) {\n if (options.interpolation) this.interpolator.init({\n ...options,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...options.interpolation\n }\n }\n });\n const skipOnVariables = typeof res === 'string' && (options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = options.replace && typeof options.replace !== 'string' ? options.replace : options;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, options.lng || this.language, options);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) options.nest = false;\n }\n if (!options.lng && this.options.compatibilityAPI !== 'v1' && resolved && resolved.res) options.lng = resolved.usedLng;\n if (options.nest !== false) res = this.interpolator.nest(res, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (lastKey && lastKey[0] === args[0] && !options.context) {\n _this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return _this.translate(...args, key);\n }, options);\n if (options.interpolation) this.interpolator.reset();\n }\n const postProcess = options.postProcess || this.options.postProcess;\n const postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;\n if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: resolved,\n ...options\n } : options, this);\n }\n return res;\n }\n resolve(keys) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (typeof keys === 'string') keys = [keys];\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, options);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0 && this.pluralResolver.shouldUseIntlApi();\n const needsContextHandling = options.context !== undefined && (typeof options.context === 'string' || typeof options.context === 'number') && options.context !== '';\n const codes = options.lngs ? options.lngs : this.languageUtils.toResolveHierarchy(options.lng || this.language, options.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(usedNS)) {\n checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat && this.i18nFormat.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, options.count, options);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n finalKeys.push(key + pluralSuffix);\n if (options.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator}${options.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n finalKeys.push(contextKey + pluralSuffix);\n if (options.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, options);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nfunction capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (typeof code === 'string' && code.indexOf('-') > -1) {\n const specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];\n let p = code.split('-');\n if (this.options.lowerCaseLng) {\n p = p.map(part => part.toLowerCase());\n } else if (p.length === 2) {\n p[0] = p[0].toLowerCase();\n p[1] = p[1].toUpperCase();\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n } else if (p.length === 3) {\n p[0] = p[0].toLowerCase();\n if (p[1].length === 2) p[1] = p[1].toUpperCase();\n if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());\n }\n return p.join('-');\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return supportedLng;\n if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;\n if (supportedLng.indexOf(lngOnly) === 0) return supportedLng;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (typeof fallbacks === 'string') fallbacks = [fallbacks];\n if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (typeof code === 'string' && (code.indexOf('-') > -1 || code.indexOf('_') > -1)) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (typeof code === 'string') {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (codes.indexOf(fc) < 0) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nlet sets = [{\n lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'tl', 'ti', 'tr', 'uz', 'wa'],\n nr: [1, 2],\n fc: 1\n}, {\n lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kk', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'],\n nr: [1, 2],\n fc: 2\n}, {\n lngs: ['ay', 'bo', 'cgg', 'fa', 'ht', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'],\n nr: [1],\n fc: 3\n}, {\n lngs: ['be', 'bs', 'cnr', 'dz', 'hr', 'ru', 'sr', 'uk'],\n nr: [1, 2, 5],\n fc: 4\n}, {\n lngs: ['ar'],\n nr: [0, 1, 2, 3, 11, 100],\n fc: 5\n}, {\n lngs: ['cs', 'sk'],\n nr: [1, 2, 5],\n fc: 6\n}, {\n lngs: ['csb', 'pl'],\n nr: [1, 2, 5],\n fc: 7\n}, {\n lngs: ['cy'],\n nr: [1, 2, 3, 8],\n fc: 8\n}, {\n lngs: ['fr'],\n nr: [1, 2],\n fc: 9\n}, {\n lngs: ['ga'],\n nr: [1, 2, 3, 7, 11],\n fc: 10\n}, {\n lngs: ['gd'],\n nr: [1, 2, 3, 20],\n fc: 11\n}, {\n lngs: ['is'],\n nr: [1, 2],\n fc: 12\n}, {\n lngs: ['jv'],\n nr: [0, 1],\n fc: 13\n}, {\n lngs: ['kw'],\n nr: [1, 2, 3, 4],\n fc: 14\n}, {\n lngs: ['lt'],\n nr: [1, 2, 10],\n fc: 15\n}, {\n lngs: ['lv'],\n nr: [1, 2, 0],\n fc: 16\n}, {\n lngs: ['mk'],\n nr: [1, 2],\n fc: 17\n}, {\n lngs: ['mnk'],\n nr: [0, 1, 2],\n fc: 18\n}, {\n lngs: ['mt'],\n nr: [1, 2, 11, 20],\n fc: 19\n}, {\n lngs: ['or'],\n nr: [2, 1],\n fc: 2\n}, {\n lngs: ['ro'],\n nr: [1, 2, 20],\n fc: 20\n}, {\n lngs: ['sl'],\n nr: [5, 1, 2, 3],\n fc: 21\n}, {\n lngs: ['he', 'iw'],\n nr: [1, 2, 20, 21],\n fc: 22\n}];\nlet _rulesPluralsTypes = {\n 1: function (n) {\n return Number(n > 1);\n },\n 2: function (n) {\n return Number(n != 1);\n },\n 3: function (n) {\n return 0;\n },\n 4: function (n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 5: function (n) {\n return Number(n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);\n },\n 6: function (n) {\n return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);\n },\n 7: function (n) {\n return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 8: function (n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);\n },\n 9: function (n) {\n return Number(n >= 2);\n },\n 10: function (n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);\n },\n 11: function (n) {\n return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);\n },\n 12: function (n) {\n return Number(n % 10 != 1 || n % 100 == 11);\n },\n 13: function (n) {\n return Number(n !== 0);\n },\n 14: function (n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);\n },\n 15: function (n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 16: function (n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);\n },\n 17: function (n) {\n return Number(n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1);\n },\n 18: function (n) {\n return Number(n == 0 ? 0 : n == 1 ? 1 : 2);\n },\n 19: function (n) {\n return Number(n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);\n },\n 20: function (n) {\n return Number(n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);\n },\n 21: function (n) {\n return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);\n },\n 22: function (n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);\n }\n};\nconst nonIntlVersions = ['v1', 'v2', 'v3'];\nconst intlVersions = ['v4'];\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nfunction createRules() {\n const rules = {};\n sets.forEach(set => {\n set.lngs.forEach(l => {\n rules[l] = {\n numbers: set.nr,\n plurals: _rulesPluralsTypes[set.fc]\n };\n });\n });\n return rules;\n}\nclass PluralResolver {\n constructor(languageUtils) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n if ((!this.options.compatibilityJSON || intlVersions.includes(this.options.compatibilityJSON)) && (typeof Intl === 'undefined' || !Intl.PluralRules)) {\n this.options.compatibilityJSON = 'v3';\n this.logger.error('Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.');\n }\n this.rules = createRules();\n }\n addRule(lng, obj) {\n this.rules[lng] = obj;\n }\n getRule(code) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.shouldUseIntlApi()) {\n try {\n return new Intl.PluralRules(getCleanedCode(code), {\n type: options.ordinal ? 'ordinal' : 'cardinal'\n });\n } catch {\n return;\n }\n }\n return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];\n }\n needsPlural(code) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const rule = this.getRule(code, options);\n if (this.shouldUseIntlApi()) {\n return rule && rule.resolvedOptions().pluralCategories.length > 1;\n }\n return rule && rule.numbers.length > 1;\n }\n getPluralFormsOfKey(code, key) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const rule = this.getRule(code, options);\n if (!rule) {\n return [];\n }\n if (this.shouldUseIntlApi()) {\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n return rule.numbers.map(number => this.getSuffix(code, number, options));\n }\n getSuffix(code, count) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const rule = this.getRule(code, options);\n if (rule) {\n if (this.shouldUseIntlApi()) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n return this.getSuffixRetroCompatible(rule, count);\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return '';\n }\n getSuffixRetroCompatible(rule, count) {\n const idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));\n let suffix = rule.numbers[idx];\n if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n if (suffix === 2) {\n suffix = 'plural';\n } else if (suffix === 1) {\n suffix = '';\n }\n }\n const returnSuffix = () => this.options.prepend && suffix.toString() ? this.options.prepend + suffix.toString() : suffix.toString();\n if (this.options.compatibilityJSON === 'v1') {\n if (suffix === 1) return '';\n if (typeof suffix === 'number') return `_plural_${suffix.toString()}`;\n return returnSuffix();\n } else if (this.options.compatibilityJSON === 'v2') {\n return returnSuffix();\n } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n return returnSuffix();\n }\n return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();\n }\n shouldUseIntlApi() {\n return !nonIntlVersions.includes(this.options.compatibilityJSON);\n }\n}\n\nfunction deepFindWithDefaults(data, defaultData, key) {\n let keySeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';\n let ignoreJSONStructure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && typeof key === 'string') {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n}\nclass Interpolator {\n constructor() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options.interpolation && options.interpolation.format || (value => value);\n this.init(options);\n }\n init() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const iOpts = options.interpolation;\n this.escape = iOpts.escape !== undefined ? iOpts.escape : escape;\n this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;\n this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;\n this.prefix = iOpts.prefix ? regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';\n this.suffix = iOpts.suffix ? regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';\n this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';\n this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';\n this.nestingPrefix = iOpts.nestingPrefix ? regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = iOpts.nestingSuffix ? regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = iOpts.nestingOptionsSeparator ? iOpts.nestingOptionsSeparator : iOpts.nestingOptionsSeparator || ',';\n this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;\n this.alwaysFormat = iOpts.alwaysFormat !== undefined ? iOpts.alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const regexpStr = `${this.prefix}(.+?)${this.suffix}`;\n this.regexp = new RegExp(regexpStr, 'g');\n const regexpUnescapeStr = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;\n this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');\n const nestingRegexpStr = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;\n this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n function regexSafe(val) {\n return val.replace(/\\$/g, '$$$$');\n }\n const handleFormat = key => {\n if (key.indexOf(this.formatSeparator) < 0) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n const missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => regexSafe(val)\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = typeof temp === 'string' ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (typeof value !== 'string' && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], safeValue);\n if (skipOnVariables) {\n todo.regex.lastIndex += value.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n let match;\n let value;\n let clonedOptions;\n function handleHasOptions(key, inheritedOptions) {\n const sep = this.nestingOptionsSeparator;\n if (key.indexOf(sep) < 0) return key;\n const c = key.split(new RegExp(`${sep}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if (matchedSingleQuotes && matchedSingleQuotes.length % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n delete clonedOptions.defaultValue;\n return key;\n }\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && typeof clonedOptions.replace !== 'string' ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n let doReduce = false;\n if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {\n const r = match[1].split(this.formatSeparator).map(elem => elem.trim());\n match[1] = r.shift();\n formatters = r;\n doReduce = true;\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && typeof value !== 'string') return value;\n if (typeof value !== 'string') value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (doReduce) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nfunction parseFormatStr(formatStr) {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.indexOf('(') > -1) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].substring(0, p[1].length - 1);\n if (formatName === 'currency' && optStr.indexOf(':') < 0) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (!opt) return;\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n if (!formatOptions[key.trim()]) formatOptions[key.trim()] = val;\n if (val === 'false') formatOptions[key.trim()] = false;\n if (val === 'true') formatOptions[key.trim()] = true;\n if (!isNaN(val)) formatOptions[key.trim()] = parseInt(val, 10);\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n}\nfunction createCachedFormatter(fn) {\n const cache = {};\n return function invokeFormatter(val, lng, options) {\n const key = lng + JSON.stringify(options);\n let formatter = cache[key];\n if (!formatter) {\n formatter = fn(getCleanedCode(lng), options);\n cache[key] = formatter;\n }\n return formatter(val);\n };\n}\nclass Formatter {\n constructor() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.formats = {\n number: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n this.init(options);\n }\n init(services) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n interpolation: {}\n };\n const iOpts = options.interpolation;\n this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n const formats = format.split(this.formatSeparator);\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options && options.formatParams && options.formatParams[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nfunction removePending(q, name) {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n}\nclass Connector extends EventEmitter {\n constructor(backend, store, services) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n if (this.backend && this.backend.init) {\n this.backend.init(services, options.backend, options);\n }\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (data) {\n this.store.addResourceBundle(lng, ns, data);\n }\n this.state[name] = err ? -1 : 2;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName) {\n let tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n let wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.retryTimeout;\n let callback = arguments.length > 5 ? arguments[5] : undefined;\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read.call(this, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n let callback = arguments.length > 3 ? arguments[3] : undefined;\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);\n if (typeof namespaces === 'string') namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name) {\n let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate) {\n let options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n let clb = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : () => {};\n if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend && this.backend.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nfunction get() {\n return {\n debug: false,\n initImmediate: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: function handle(args) {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (typeof args[1] === 'string') ret.defaultValue = args[1];\n if (typeof args[2] === 'string') ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: (value, format, lng, options) => value,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n }\n };\n}\nfunction transformOptions(options) {\n if (typeof options.ns === 'string') options.ns = [options.ns];\n if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];\n if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs && options.supportedLngs.indexOf('cimode') < 0) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n return options;\n}\n\nfunction noop() {}\nfunction bindMemberFunctions(inst) {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n}\nclass I18n extends EventEmitter {\n constructor() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 ? arguments[1] : undefined;\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initImmediate) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init() {\n var _this = this;\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 ? arguments[1] : undefined;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (!options.defaultNS && options.defaultNS !== false && options.ns) {\n if (typeof options.ns === 'string') {\n options.defaultNS = options.ns;\n } else if (options.ns.indexOf('translation') < 0) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n if (this.options.compatibilityAPI !== 'v1') {\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n }\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n function createClassOnDemand(ClassOrObject) {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n }\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else if (typeof Intl !== 'undefined') {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n compatibilityJSON: this.options.compatibilityJSON,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {\n s.formatter = createClassOnDemand(formatter);\n s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', function (event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n _this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n _this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = function () {\n return _this.store[fcName](...arguments);\n };\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = function () {\n _this.store[fcName](...arguments);\n return _this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if (this.languages && this.options.compatibilityAPI !== 'v1' && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initImmediate) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language) {\n let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n let usedCallback = callback;\n const usedLng = typeof language === 'string' ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng && usedLng.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n if (this.options.preload) {\n this.options.preload.forEach(l => append(l));\n }\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].indexOf(l) > -1) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n }\n changeLanguage(lng, callback) {\n var _this2 = this;\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve(function () {\n return _this2.t(...arguments);\n });\n if (callback) callback(err, function () {\n return _this2.t(...arguments);\n });\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const l = typeof lngs === 'string' ? lngs : this.services.languageUtils.getBestMatchFromCodes(lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n if (this.services.languageDetector && this.services.languageDetector.cacheUserLanguage) this.services.languageDetector.cacheUserLanguage(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix) {\n var _this3 = this;\n const fixedT = function (key, opts) {\n let options;\n if (typeof opts !== 'object') {\n for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n rest[_key3 - 2] = arguments[_key3];\n }\n options = _this3.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n options = {\n ...opts\n };\n }\n options.lng = options.lng || fixedT.lng;\n options.lngs = options.lngs || fixedT.lngs;\n options.ns = options.ns || fixedT.ns;\n options.keyPrefix = options.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const keySeparator = _this3.options.keySeparator || '.';\n let resultKey;\n if (options.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => `${options.keyPrefix}${keySeparator}${k}`);\n } else {\n resultKey = options.keyPrefix ? `${options.keyPrefix}${keySeparator}${key}` : key;\n }\n return _this3.t(resultKey, options);\n };\n if (typeof lng === 'string') {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t() {\n return this.translator && this.translator.translate(...arguments);\n }\n exists() {\n return this.translator && this.translator.exists(...arguments);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (typeof ns === 'string') ns = [ns];\n ns.forEach(n => {\n if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (typeof lngs === 'string') lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => preloaded.indexOf(lng) < 0);\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services && this.services.languageUtils || new LanguageUtil(get());\n return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 ? arguments[1] : undefined;\n return new I18n(options, callback);\n }\n cloneInstance() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n clone.store = new ResourceStore(this.store.data, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', function (event) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\ninstance.createInstance = I18n.createInstance;\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n", "/**\n * @license\n * Lodash \n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n var undefined;\n\n /** Used as the semantic version number. */\n var VERSION = '4.17.21';\n\n /** Used as the size to enable large array optimizations. */\n var LARGE_ARRAY_SIZE = 200;\n\n /** Error message constants. */\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n FUNC_ERROR_TEXT = 'Expected a function',\n INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as the maximum memoize cache size. */\n var MAX_MEMOIZE_SIZE = 500;\n\n /** Used as the internal argument placeholder. */\n var PLACEHOLDER = '__lodash_placeholder__';\n\n /** Used to compose bitmasks for cloning. */\n var CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n /** Used to compose bitmasks for value comparisons. */\n var COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n /** Used to compose bitmasks for function metadata. */\n var WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_PARTIAL_FLAG = 32,\n WRAP_PARTIAL_RIGHT_FLAG = 64,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256,\n WRAP_FLIP_FLAG = 512;\n\n /** Used as default options for `_.truncate`. */\n var DEFAULT_TRUNC_LENGTH = 30,\n DEFAULT_TRUNC_OMISSION = '...';\n\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\n var HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n /** Used to indicate the type of lazy iteratees. */\n var LAZY_FILTER_FLAG = 1,\n LAZY_MAP_FLAG = 2,\n LAZY_WHILE_FLAG = 3;\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991,\n MAX_INTEGER = 1.7976931348623157e+308,\n NAN = 0 / 0;\n\n /** Used as references for the maximum length and index of an array. */\n var MAX_ARRAY_LENGTH = 4294967295,\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n /** Used to associate wrap methods with their bit flags. */\n var wrapFlags = [\n ['ary', WRAP_ARY_FLAG],\n ['bind', WRAP_BIND_FLAG],\n ['bindKey', WRAP_BIND_KEY_FLAG],\n ['curry', WRAP_CURRY_FLAG],\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n ['flip', WRAP_FLIP_FLAG],\n ['partial', WRAP_PARTIAL_FLAG],\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n ['rearg', WRAP_REARG_FLAG]\n ];\n\n /** `Object#toString` result references. */\n var argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n domExcTag = '[object DOMException]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]',\n weakSetTag = '[object WeakSet]';\n\n var arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n /** Used to match empty string literals in compiled template source. */\n var reEmptyStringLeading = /\\b__p \\+= '';/g,\n reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n /** Used to match HTML entities and HTML characters. */\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n reUnescapedHtml = /[&<>\"']/g,\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n /** Used to match template delimiters. */\n var reEscape = /<%-([\\s\\S]+?)%>/g,\n reEvaluate = /<%([\\s\\S]+?)%>/g,\n reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n reHasRegExpChar = RegExp(reRegExpChar.source);\n\n /** Used to match leading whitespace. */\n var reTrimStart = /^\\s+/;\n\n /** Used to match a single whitespace character. */\n var reWhitespace = /\\s/;\n\n /** Used to match wrap detail comments. */\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n /** Used to match words composed of alphanumeric characters. */\n var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n /**\n * Used to validate the `validate` option in `_.template` variable.\n *\n * Forbids characters which could potentially change the meaning of the function argument definition:\n * - \"(),\" (modification of function parameters)\n * - \"=\" (default value)\n * - \"[]{}\" (destructuring of function parameters)\n * - \"/\" (beginning of a comment)\n * - whitespace\n */\n var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /**\n * Used to match\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n */\n var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n /** Used to match `RegExp` flags from their coerced string values. */\n var reFlags = /\\w*$/;\n\n /** Used to detect bad signed hexadecimal string values. */\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n /** Used to detect binary string values. */\n var reIsBinary = /^0b[01]+$/i;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Used to detect octal string values. */\n var reIsOctal = /^0o[0-7]+$/i;\n\n /** Used to detect unsigned integer values. */\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\n var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n /** Used to ensure capturing order of template delimiters. */\n var reNoMatch = /($^)/;\n\n /** Used to match unescaped characters in compiled string literals. */\n var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n /** Used to compose unicode character classes. */\n var rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n /** Used to compose unicode capture groups. */\n var rsApos = \"['\\u2019]\",\n rsAstral = '[' + rsAstralRange + ']',\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n /** Used to compose unicode regexes. */\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n /** Used to match apostrophes. */\n var reApos = RegExp(rsApos, 'g');\n\n /**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\n var reComboMark = RegExp(rsCombo, 'g');\n\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n /** Used to match complex or compound words. */\n var reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n ].join('|'), 'g');\n\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n /** Used to detect strings that need a more robust regexp to match words. */\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n /** Used to assign default `context` object properties. */\n var contextProps = [\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n ];\n\n /** Used to make template sourceURLs easier to identify. */\n var templateCounter = -1;\n\n /** Used to identify `toStringTag` values of typed arrays. */\n var typedArrayTags = {};\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n typedArrayTags[uint32Tag] = true;\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\n typedArrayTags[weakMapTag] = false;\n\n /** Used to identify `toStringTag` values supported by `_.clone`. */\n var cloneableTags = {};\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n cloneableTags[boolTag] = cloneableTags[dateTag] =\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\n cloneableTags[numberTag] = cloneableTags[objectTag] =\n cloneableTags[regexpTag] = cloneableTags[setTag] =\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n cloneableTags[errorTag] = cloneableTags[funcTag] =\n cloneableTags[weakMapTag] = false;\n\n /** Used to map Latin Unicode letters to basic Latin letters. */\n var deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n };\n\n /** Used to map characters to HTML entities. */\n var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n };\n\n /** Used to map HTML entities to characters. */\n var htmlUnescapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n };\n\n /** Used to escape characters for inclusion in compiled string literals. */\n var stringEscapes = {\n '\\\\': '\\\\',\n \"'\": \"'\",\n '\\n': 'n',\n '\\r': 'r',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n /** Built-in method references without a dependency on `root`. */\n var freeParseFloat = parseFloat,\n freeParseInt = parseInt;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /** Detect free variable `exports`. */\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n /** Detect free variable `module`. */\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n /** Detect the popular CommonJS extension `module.exports`. */\n var moduleExports = freeModule && freeModule.exports === freeExports;\n\n /** Detect free variable `process` from Node.js. */\n var freeProcess = moduleExports && freeGlobal.process;\n\n /** Used to access faster Node.js helpers. */\n var nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n }());\n\n /* Node.js helper references. */\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n nodeIsDate = nodeUtil && nodeUtil.isDate,\n nodeIsMap = nodeUtil && nodeUtil.isMap,\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n nodeIsSet = nodeUtil && nodeUtil.isSet,\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\n function apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n }\n\n /**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.forEachRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\n function arrayEachRight(array, iteratee) {\n var length = array == null ? 0 : array.length;\n\n while (length--) {\n if (iteratee(array[length], length, array) === false) {\n break;\n }\n }\n return array;\n }\n\n /**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\n function arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n }\n\n /**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\n function arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n }\n\n /**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\n function arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n }\n\n /**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.reduceRight` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the last element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n var length = array == null ? 0 : array.length;\n if (initAccum && length) {\n accumulator = array[--length];\n }\n while (length--) {\n accumulator = iteratee(accumulator, array[length], length, array);\n }\n return accumulator;\n }\n\n /**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Gets the size of an ASCII `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n var asciiSize = baseProperty('length');\n\n /**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function asciiToArray(string) {\n return string.split('');\n }\n\n /**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function asciiWords(string) {\n return string.match(reAsciiWord) || [];\n }\n\n /**\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n * without support for iteratee shorthands, which iterates over `collection`\n * using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the found element or its key, else `undefined`.\n */\n function baseFindKey(collection, predicate, eachFunc) {\n var result;\n eachFunc(collection, function(value, key, collection) {\n if (predicate(value, key, collection)) {\n result = key;\n return false;\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n }\n\n /**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\n function baseIsNaN(value) {\n return value !== value;\n }\n\n /**\n * The base implementation of `_.mean` and `_.meanBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the mean.\n */\n function baseMean(array, iteratee) {\n var length = array == null ? 0 : array.length;\n return length ? (baseSum(array, iteratee) / length) : NAN;\n }\n\n /**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n }\n\n /**\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} accumulator The initial value.\n * @param {boolean} initAccum Specify using the first or last element of\n * `collection` as the initial value.\n * @param {Function} eachFunc The function to iterate over `collection`.\n * @returns {*} Returns the accumulated value.\n */\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n eachFunc(collection, function(value, index, collection) {\n accumulator = initAccum\n ? (initAccum = false, value)\n : iteratee(accumulator, value, index, collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\n function baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.sum` and `_.sumBy` without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {number} Returns the sum.\n */\n function baseSum(array, iteratee) {\n var result,\n index = -1,\n length = array.length;\n\n while (++index < length) {\n var current = iteratee(array[index]);\n if (current !== undefined) {\n result = result === undefined ? current : (result + current);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\n function baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n * of key-value pairs for `object` corresponding to the property names of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the key-value pairs.\n */\n function baseToPairs(object, props) {\n return arrayMap(props, function(key) {\n return [key, object[key]];\n });\n }\n\n /**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\n function baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n }\n\n /**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\n function baseUnary(func) {\n return function(value) {\n return func(value);\n };\n }\n\n /**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\n function baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n }\n\n /**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function cacheHas(cache, key) {\n return cache.has(key);\n }\n\n /**\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the first unmatched string symbol.\n */\n function charsStartIndex(strSymbols, chrSymbols) {\n var index = -1,\n length = strSymbols.length;\n\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n * that is not found in the character symbols.\n *\n * @private\n * @param {Array} strSymbols The string symbols to inspect.\n * @param {Array} chrSymbols The character symbols to find.\n * @returns {number} Returns the index of the last unmatched string symbol.\n */\n function charsEndIndex(strSymbols, chrSymbols) {\n var index = strSymbols.length;\n\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n return index;\n }\n\n /**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\n function countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n }\n\n /**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\n var deburrLetter = basePropertyOf(deburredLetters);\n\n /**\n * Used by `_.escape` to convert characters to HTML entities.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n /**\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\n *\n * @private\n * @param {string} chr The matched character to escape.\n * @returns {string} Returns the escaped character.\n */\n function escapeStringChar(chr) {\n return '\\\\' + stringEscapes[chr];\n }\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\n function hasUnicode(string) {\n return reHasUnicode.test(string);\n }\n\n /**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\n function hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n }\n\n /**\n * Converts `iterator` to an array.\n *\n * @private\n * @param {Object} iterator The iterator to convert.\n * @returns {Array} Returns the converted array.\n */\n function iteratorToArray(iterator) {\n var data,\n result = [];\n\n while (!(data = iterator.next()).done) {\n result.push(data.value);\n }\n return result;\n }\n\n /**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\n function mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n }\n\n /**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n }\n\n /**\n * Replaces all `placeholder` elements in `array` with an internal placeholder\n * and returns an array of their indexes.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {*} placeholder The placeholder to replace.\n * @returns {Array} Returns the new array of placeholder indexes.\n */\n function replaceHolders(array, placeholder) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value === placeholder || value === PLACEHOLDER) {\n array[index] = PLACEHOLDER;\n result[resIndex++] = index;\n }\n }\n return result;\n }\n\n /**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\n function setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n }\n\n /**\n * Converts `set` to its value-value pairs.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the value-value pairs.\n */\n function setToPairs(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = [value, value];\n });\n return result;\n }\n\n /**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * A specialized version of `_.lastIndexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function strictLastIndexOf(array, value, fromIndex) {\n var index = fromIndex + 1;\n while (index--) {\n if (array[index] === value) {\n return index;\n }\n }\n return index;\n }\n\n /**\n * Gets the number of symbols in `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the string size.\n */\n function stringSize(string) {\n return hasUnicode(string)\n ? unicodeSize(string)\n : asciiSize(string);\n }\n\n /**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n }\n\n /**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\n function trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n }\n\n /**\n * Used by `_.unescape` to convert HTML entities to characters.\n *\n * @private\n * @param {string} chr The matched character to unescape.\n * @returns {string} Returns the unescaped character.\n */\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n /**\n * Gets the size of a Unicode `string`.\n *\n * @private\n * @param {string} string The string inspect.\n * @returns {number} Returns the string size.\n */\n function unicodeSize(string) {\n var result = reUnicode.lastIndex = 0;\n while (reUnicode.test(string)) {\n ++result;\n }\n return result;\n }\n\n /**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\n function unicodeToArray(string) {\n return string.match(reUnicode) || [];\n }\n\n /**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\n function unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n }\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Create a new pristine `lodash` function using the `context` object.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Util\n * @param {Object} [context=root] The context object.\n * @returns {Function} Returns a new `lodash` function.\n * @example\n *\n * _.mixin({ 'foo': _.constant('foo') });\n *\n * var lodash = _.runInContext();\n * lodash.mixin({ 'bar': lodash.constant('bar') });\n *\n * _.isFunction(_.foo);\n * // => true\n * _.isFunction(_.bar);\n * // => false\n *\n * lodash.isFunction(lodash.foo);\n * // => false\n * lodash.isFunction(lodash.bar);\n * // => true\n *\n * // Create a suped-up `defer` in Node.js.\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n */\n var runInContext = (function runInContext(context) {\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n /** Built-in constructor references. */\n var Array = context.Array,\n Date = context.Date,\n Error = context.Error,\n Function = context.Function,\n Math = context.Math,\n Object = context.Object,\n RegExp = context.RegExp,\n String = context.String,\n TypeError = context.TypeError;\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = context['__core-js_shared__'];\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty = objectProto.hasOwnProperty;\n\n /** Used to generate unique IDs. */\n var idCounter = 0;\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var nativeObjectToString = objectProto.toString;\n\n /** Used to infer the `Object` constructor. */\n var objectCtorString = funcToString.call(Object);\n\n /** Used to restore the original `_` reference in `_.noConflict`. */\n var oldDash = root._;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Buffer = moduleExports ? context.Buffer : undefined,\n Symbol = context.Symbol,\n Uint8Array = context.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n symIterator = Symbol ? Symbol.iterator : undefined,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n var defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n }());\n\n /** Mocked built-ins. */\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n /* Built-in method references for those with the same name as other `lodash` methods. */\n var nativeCeil = Math.ceil,\n nativeFloor = Math.floor,\n nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeIsFinite = context.isFinite,\n nativeJoin = arrayProto.join,\n nativeKeys = overArg(Object.keys, Object),\n nativeMax = Math.max,\n nativeMin = Math.min,\n nativeNow = Date.now,\n nativeParseInt = context.parseInt,\n nativeRandom = Math.random,\n nativeReverse = arrayProto.reverse;\n\n /* Built-in method references that are verified to be native. */\n var DataView = getNative(context, 'DataView'),\n Map = getNative(context, 'Map'),\n Promise = getNative(context, 'Promise'),\n Set = getNative(context, 'Set'),\n WeakMap = getNative(context, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to store function metadata. */\n var metaMap = WeakMap && new WeakMap;\n\n /** Used to lookup unminified function names. */\n var realNames = {};\n\n /** Used to detect maps, sets, and weakmaps. */\n var dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` object which wraps `value` to enable implicit method\n * chain sequences. Methods that operate on and return arrays, collections,\n * and functions can be chained together. Methods that retrieve a single value\n * or may return a primitive value will automatically end the chain sequence\n * and return the unwrapped value. Otherwise, the value must be unwrapped\n * with `_#value`.\n *\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n * enabled using `_.chain`.\n *\n * The execution of chained methods is lazy, that is, it's deferred until\n * `_#value` is implicitly or explicitly called.\n *\n * Lazy evaluation allows several methods to support shortcut fusion.\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n * the creation of intermediate arrays and can greatly reduce the number of\n * iteratee executions. Sections of a chain sequence qualify for shortcut\n * fusion if the section is applied to an array and iteratees accept only\n * one argument. The heuristic for whether a section qualifies for shortcut\n * fusion is subject to change.\n *\n * Chaining is supported in custom builds as long as the `_#value` method is\n * directly or indirectly included in the build.\n *\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\n *\n * The wrapper `Array` methods are:\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n *\n * The wrapper `String` methods are:\n * `replace` and `split`\n *\n * The wrapper methods that support shortcut fusion are:\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n *\n * The chainable wrapper methods are:\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n * `zipObject`, `zipObjectDeep`, and `zipWith`\n *\n * The wrapper methods that are **not** chainable by default are:\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n * `upperFirst`, `value`, and `words`\n *\n * @name _\n * @constructor\n * @category Seq\n * @param {*} value The value to wrap in a `lodash` instance.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2, 3]);\n *\n * // Returns an unwrapped value.\n * wrapped.reduce(_.add);\n * // => 6\n *\n * // Returns a wrapped value.\n * var squares = wrapped.map(square);\n *\n * _.isArray(squares);\n * // => false\n *\n * _.isArray(squares.value());\n * // => true\n */\n function lodash(value) {\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n if (value instanceof LodashWrapper) {\n return value;\n }\n if (hasOwnProperty.call(value, '__wrapped__')) {\n return wrapperClone(value);\n }\n }\n return new LodashWrapper(value);\n }\n\n /**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\n var baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n }());\n\n /**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\n function baseLodash() {\n // No operation performed.\n }\n\n /**\n * The base constructor for creating `lodash` wrapper objects.\n *\n * @private\n * @param {*} value The value to wrap.\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\n */\n function LodashWrapper(value, chainAll) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__chain__ = !!chainAll;\n this.__index__ = 0;\n this.__values__ = undefined;\n }\n\n /**\n * By default, the template delimiters used by lodash are like those in\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n * following template settings to use alternative delimiters.\n *\n * @static\n * @memberOf _\n * @type {Object}\n */\n lodash.templateSettings = {\n\n /**\n * Used to detect `data` property values to be HTML-escaped.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'escape': reEscape,\n\n /**\n * Used to detect code to be evaluated.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'evaluate': reEvaluate,\n\n /**\n * Used to detect `data` property values to inject.\n *\n * @memberOf _.templateSettings\n * @type {RegExp}\n */\n 'interpolate': reInterpolate,\n\n /**\n * Used to reference the data object in the template text.\n *\n * @memberOf _.templateSettings\n * @type {string}\n */\n 'variable': '',\n\n /**\n * Used to import variables into the compiled template.\n *\n * @memberOf _.templateSettings\n * @type {Object}\n */\n 'imports': {\n\n /**\n * A reference to the `lodash` function.\n *\n * @memberOf _.templateSettings.imports\n * @type {Function}\n */\n '_': lodash\n }\n };\n\n // Ensure wrappers are instances of `baseLodash`.\n lodash.prototype = baseLodash.prototype;\n lodash.prototype.constructor = lodash;\n\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n LodashWrapper.prototype.constructor = LodashWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\n function LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n }\n\n /**\n * Creates a clone of the lazy wrapper object.\n *\n * @private\n * @name clone\n * @memberOf LazyWrapper\n * @returns {Object} Returns the cloned `LazyWrapper` object.\n */\n function lazyClone() {\n var result = new LazyWrapper(this.__wrapped__);\n result.__actions__ = copyArray(this.__actions__);\n result.__dir__ = this.__dir__;\n result.__filtered__ = this.__filtered__;\n result.__iteratees__ = copyArray(this.__iteratees__);\n result.__takeCount__ = this.__takeCount__;\n result.__views__ = copyArray(this.__views__);\n return result;\n }\n\n /**\n * Reverses the direction of lazy iteration.\n *\n * @private\n * @name reverse\n * @memberOf LazyWrapper\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\n */\n function lazyReverse() {\n if (this.__filtered__) {\n var result = new LazyWrapper(this);\n result.__dir__ = -1;\n result.__filtered__ = true;\n } else {\n result = this.clone();\n result.__dir__ *= -1;\n }\n return result;\n }\n\n /**\n * Extracts the unwrapped value from its lazy wrapper.\n *\n * @private\n * @name value\n * @memberOf LazyWrapper\n * @returns {*} Returns the unwrapped value.\n */\n function lazyValue() {\n var array = this.__wrapped__.value(),\n dir = this.__dir__,\n isArr = isArray(array),\n isRight = dir < 0,\n arrLength = isArr ? array.length : 0,\n view = getView(0, arrLength, this.__views__),\n start = view.start,\n end = view.end,\n length = end - start,\n index = isRight ? end : (start - 1),\n iteratees = this.__iteratees__,\n iterLength = iteratees.length,\n resIndex = 0,\n takeCount = nativeMin(length, this.__takeCount__);\n\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n return baseWrapperValue(array, this.__actions__);\n }\n var result = [];\n\n outer:\n while (length-- && resIndex < takeCount) {\n index += dir;\n\n var iterIndex = -1,\n value = array[index];\n\n while (++iterIndex < iterLength) {\n var data = iteratees[iterIndex],\n iteratee = data.iteratee,\n type = data.type,\n computed = iteratee(value);\n\n if (type == LAZY_MAP_FLAG) {\n value = computed;\n } else if (!computed) {\n if (type == LAZY_FILTER_FLAG) {\n continue outer;\n } else {\n break outer;\n }\n }\n }\n result[resIndex++] = value;\n }\n return result;\n }\n\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n LazyWrapper.prototype.constructor = LazyWrapper;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\n function SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n }\n\n /**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\n function setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n }\n\n /**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\n function setCacheHas(value) {\n return this.__data__.has(value);\n }\n\n // Add methods to `SetCache`.\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n SetCache.prototype.has = setCacheHas;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n }\n\n /**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\n function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n }\n\n /**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n }\n\n /**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function stackGet(key) {\n return this.__data__.get(key);\n }\n\n /**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function stackHas(key) {\n return this.__data__.has(key);\n }\n\n /**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\n function stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n }\n\n // Add methods to `Stack`.\n Stack.prototype.clear = stackClear;\n Stack.prototype['delete'] = stackDelete;\n Stack.prototype.get = stackGet;\n Stack.prototype.has = stackHas;\n Stack.prototype.set = stackSet;\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\n function arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `_.sample` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @returns {*} Returns the random element.\n */\n function arraySample(array) {\n var length = array.length;\n return length ? array[baseRandom(0, length - 1)] : undefined;\n }\n\n /**\n * A specialized version of `_.sampleSize` for arrays.\n *\n * @private\n * @param {Array} array The array to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function arraySampleSize(array, n) {\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n }\n\n /**\n * A specialized version of `_.shuffle` for arrays.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function arrayShuffle(array) {\n return shuffleSelf(copyArray(array));\n }\n\n /**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n }\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n }\n\n /**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\n function baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n }\n\n /**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\n function baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n }\n\n /**\n * The base implementation of `_.at` without support for individual paths.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {string[]} paths The property paths to pick.\n * @returns {Array} Returns the picked elements.\n */\n function baseAt(object, paths) {\n var index = -1,\n length = paths.length,\n result = Array(length),\n skip = object == null;\n\n while (++index < length) {\n result[index] = skip ? undefined : get(object, paths[index]);\n }\n return result;\n }\n\n /**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\n function baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n }\n\n /**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\n function baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n }\n\n /**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\n function baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n }\n\n /**\n * The base implementation of `_.conformsTo` which accepts `props` to check.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n */\n function baseConformsTo(object, source, props) {\n var length = props.length;\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (length--) {\n var key = props[length],\n predicate = source[key],\n value = object[key];\n\n if ((value === undefined && !(key in object)) || !predicate(value)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\n * to provide to `func`.\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {Array} args The arguments to provide to `func`.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n function baseDelay(func, wait, args) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return setTimeout(function() { func.apply(undefined, args); }, wait);\n }\n\n /**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\n function baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEach = createBaseEach(baseForOwn);\n\n /**\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\n var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n /**\n * The base implementation of `_.every` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\n function baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n }\n\n /**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\n function baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.fill` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n */\n function baseFill(array, value, start, end) {\n var length = array.length;\n\n start = toInteger(start);\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = (end === undefined || end > length) ? length : toInteger(end);\n if (end < 0) {\n end += length;\n }\n end = start > end ? 0 : toLength(end);\n while (start < end) {\n array[start++] = value;\n }\n return array;\n }\n\n /**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\n function baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n }\n\n /**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\n function baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseFor = createBaseFor();\n\n /**\n * This function is like `baseFor` except that it iterates over properties\n * in the opposite order.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\n var baseForRight = createBaseFor(true);\n\n /**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\n function baseForOwnRight(object, iteratee) {\n return object && baseForRight(object, iteratee, keys);\n }\n\n /**\n * The base implementation of `_.functions` which creates an array of\n * `object` function property names filtered from `props`.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Array} props The property names to filter.\n * @returns {Array} Returns the function names.\n */\n function baseFunctions(object, props) {\n return arrayFilter(props, function(key) {\n return isFunction(object[key]);\n });\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n }\n\n /**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n function baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n }\n\n /**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\n function baseGt(value, other) {\n return value > other;\n }\n\n /**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n }\n\n /**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\n function baseHasIn(object, key) {\n return object != null && key in Object(object);\n }\n\n /**\n * The base implementation of `_.inRange` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to check.\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n */\n function baseInRange(number, start, end) {\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\n }\n\n /**\n * The base implementation of methods like `_.intersection`, without support\n * for iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of shared values.\n */\n function baseIntersection(arrays, iteratee, comparator) {\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\n length = arrays[0].length,\n othLength = arrays.length,\n othIndex = othLength,\n caches = Array(othLength),\n maxLength = Infinity,\n result = [];\n\n while (othIndex--) {\n var array = arrays[othIndex];\n if (othIndex && iteratee) {\n array = arrayMap(array, baseUnary(iteratee));\n }\n maxLength = nativeMin(array.length, maxLength);\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n ? new SetCache(othIndex && array)\n : undefined;\n }\n array = arrays[0];\n\n var index = -1,\n seen = caches[0];\n\n outer:\n while (++index < length && result.length < maxLength) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (!(seen\n ? cacheHas(seen, computed)\n : includes(result, computed, comparator)\n )) {\n othIndex = othLength;\n while (--othIndex) {\n var cache = caches[othIndex];\n if (!(cache\n ? cacheHas(cache, computed)\n : includes(arrays[othIndex], computed, comparator))\n ) {\n continue outer;\n }\n }\n if (seen) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\n function baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n }\n\n /**\n * The base implementation of `_.invoke` without support for individual\n * method arguments.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {Array} args The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n */\n function baseInvoke(object, path, args) {\n path = castPath(path, object);\n object = parent(object, path);\n var func = object == null ? object : object[toKey(last(path))];\n return func == null ? undefined : apply(func, object, args);\n }\n\n /**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\n function baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n }\n\n /**\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n */\n function baseIsArrayBuffer(value) {\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n }\n\n /**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\n function baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n }\n\n /**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\n function baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n }\n\n /**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n }\n\n /**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\n function baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n }\n\n /**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\n function baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.isRegExp` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n */\n function baseIsRegExp(value) {\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\n }\n\n /**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\n function baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n }\n\n /**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\n function baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n }\n\n /**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\n function baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n }\n\n /**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\n function baseLt(value, other) {\n return value < other;\n }\n\n /**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\n function baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n }\n\n /**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n }\n\n /**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n }\n\n /**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n }\n\n /**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n }\n\n /**\n * The base implementation of `_.nth` which doesn't coerce arguments.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {number} n The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n */\n function baseNth(array, n) {\n var length = array.length;\n if (!length) {\n return;\n }\n n += n < 0 ? length : 0;\n return isIndex(n, length) ? array[n] : undefined;\n }\n\n /**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\n function baseOrderBy(collection, iteratees, orders) {\n if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n }\n\n /**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\n function basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n }\n\n /**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\n function basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n }\n\n /**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\n function basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n }\n\n /**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\n function basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.pullAt` without support for individual\n * indexes or capturing the removed elements.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {number[]} indexes The indexes of elements to remove.\n * @returns {Array} Returns `array`.\n */\n function basePullAt(array, indexes) {\n var length = array ? indexes.length : 0,\n lastIndex = length - 1;\n\n while (length--) {\n var index = indexes[length];\n if (length == lastIndex || index !== previous) {\n var previous = index;\n if (isIndex(index)) {\n splice.call(array, index, 1);\n } else {\n baseUnset(array, index);\n }\n }\n }\n return array;\n }\n\n /**\n * The base implementation of `_.random` without support for returning\n * floating-point numbers.\n *\n * @private\n * @param {number} lower The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the random number.\n */\n function baseRandom(lower, upper) {\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n }\n\n /**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\n function baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n }\n\n /**\n * The base implementation of `_.repeat` which doesn't coerce arguments.\n *\n * @private\n * @param {string} string The string to repeat.\n * @param {number} n The number of times to repeat the string.\n * @returns {string} Returns the repeated string.\n */\n function baseRepeat(string, n) {\n var result = '';\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n return result;\n }\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n do {\n if (n % 2) {\n result += string;\n }\n n = nativeFloor(n / 2);\n if (n) {\n string += string;\n }\n } while (n);\n\n return result;\n }\n\n /**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\n function baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n }\n\n /**\n * The base implementation of `_.sample`.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n */\n function baseSample(collection) {\n return arraySample(values(collection));\n }\n\n /**\n * The base implementation of `_.sampleSize` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to sample.\n * @param {number} n The number of elements to sample.\n * @returns {Array} Returns the random elements.\n */\n function baseSampleSize(collection, n) {\n var array = values(collection);\n return shuffleSelf(array, baseClamp(n, 0, array.length));\n }\n\n /**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n }\n\n /**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n };\n\n /**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n };\n\n /**\n * The base implementation of `_.shuffle`.\n *\n * @private\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n */\n function baseShuffle(collection) {\n return shuffleSelf(values(collection));\n }\n\n /**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n }\n\n /**\n * The base implementation of `_.some` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\n function baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n }\n\n /**\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n * performs a binary search of `array` to determine the index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndex(array, value, retHighest) {\n var low = 0,\n high = array == null ? low : array.length;\n\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n while (low < high) {\n var mid = (low + high) >>> 1,\n computed = array[mid];\n\n if (computed !== null && !isSymbol(computed) &&\n (retHighest ? (computed <= value) : (computed < value))) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return high;\n }\n return baseSortedIndexBy(array, value, identity, retHighest);\n }\n\n /**\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n * which invokes `iteratee` for `value` and each element of `array` to compute\n * their sort ranking. The iteratee is invoked with one argument; (value).\n *\n * @private\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} iteratee The iteratee invoked per element.\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n */\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\n var low = 0,\n high = array == null ? 0 : array.length;\n if (high === 0) {\n return 0;\n }\n\n value = iteratee(value);\n var valIsNaN = value !== value,\n valIsNull = value === null,\n valIsSymbol = isSymbol(value),\n valIsUndefined = value === undefined;\n\n while (low < high) {\n var mid = nativeFloor((low + high) / 2),\n computed = iteratee(array[mid]),\n othIsDefined = computed !== undefined,\n othIsNull = computed === null,\n othIsReflexive = computed === computed,\n othIsSymbol = isSymbol(computed);\n\n if (valIsNaN) {\n var setLow = retHighest || othIsReflexive;\n } else if (valIsUndefined) {\n setLow = othIsReflexive && (retHighest || othIsDefined);\n } else if (valIsNull) {\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n } else if (valIsSymbol) {\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n } else if (othIsNull || othIsSymbol) {\n setLow = false;\n } else {\n setLow = retHighest ? (computed <= value) : (computed < value);\n }\n if (setLow) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return nativeMin(high, MAX_ARRAY_INDEX);\n }\n\n /**\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseSortedUniq(array, iteratee) {\n var index = -1,\n length = array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n if (!index || !eq(computed, seen)) {\n var seen = computed;\n result[resIndex++] = value === 0 ? 0 : value;\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.toNumber` which doesn't ensure correct\n * conversions of binary, hexadecimal, or octal string values.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n */\n function baseToNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n return +value;\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\n function baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n }\n\n /**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\n function baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n }\n\n /**\n * The base implementation of `_.update`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to update.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\n function baseUpdate(object, path, updater, customizer) {\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\n }\n\n /**\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n * without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to query.\n * @param {Function} predicate The function invoked per iteration.\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the slice of `array`.\n */\n function baseWhile(array, predicate, isDrop, fromRight) {\n var length = array.length,\n index = fromRight ? length : -1;\n\n while ((fromRight ? index-- : ++index < length) &&\n predicate(array[index], index, array)) {}\n\n return isDrop\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n }\n\n /**\n * The base implementation of `wrapperValue` which returns the result of\n * performing a sequence of actions on the unwrapped `value`, where each\n * successive action is supplied the return value of the previous.\n *\n * @private\n * @param {*} value The unwrapped value.\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\n * @returns {*} Returns the resolved value.\n */\n function baseWrapperValue(value, actions) {\n var result = value;\n if (result instanceof LazyWrapper) {\n result = result.value();\n }\n return arrayReduce(actions, function(result, action) {\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\n }, result);\n }\n\n /**\n * The base implementation of methods like `_.xor`, without support for\n * iteratee shorthands, that accepts an array of arrays to inspect.\n *\n * @private\n * @param {Array} arrays The arrays to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of values.\n */\n function baseXor(arrays, iteratee, comparator) {\n var length = arrays.length;\n if (length < 2) {\n return length ? baseUniq(arrays[0]) : [];\n }\n var index = -1,\n result = Array(length);\n\n while (++index < length) {\n var array = arrays[index],\n othIndex = -1;\n\n while (++othIndex < length) {\n if (othIndex != index) {\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n }\n }\n }\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n }\n\n /**\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n *\n * @private\n * @param {Array} props The property identifiers.\n * @param {Array} values The property values.\n * @param {Function} assignFunc The function to assign values.\n * @returns {Object} Returns the new object.\n */\n function baseZipObject(props, values, assignFunc) {\n var index = -1,\n length = props.length,\n valsLength = values.length,\n result = {};\n\n while (++index < length) {\n var value = index < valsLength ? values[index] : undefined;\n assignFunc(result, props[index], value);\n }\n return result;\n }\n\n /**\n * Casts `value` to an empty array if it's not an array like object.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array|Object} Returns the cast array-like object.\n */\n function castArrayLikeObject(value) {\n return isArrayLikeObject(value) ? value : [];\n }\n\n /**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\n function castFunction(value) {\n return typeof value == 'function' ? value : identity;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n }\n\n /**\n * A `baseRest` alias which can be replaced with `identity` by module\n * replacement plugins.\n *\n * @private\n * @type {Function}\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n var castRest = baseRest;\n\n /**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\n function castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n }\n\n /**\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n *\n * @private\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\n */\n var clearTimeout = ctxClearTimeout || function(id) {\n return root.clearTimeout(id);\n };\n\n /**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\n function cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n }\n\n /**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\n function cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n }\n\n /**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\n function cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n }\n\n /**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\n function cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n }\n\n /**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\n function cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n }\n\n /**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\n function cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n }\n\n /**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\n function compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n }\n\n /**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\n function compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n }\n\n /**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n }\n\n /**\n * This function is like `composeArgs` except that the arguments composition\n * is tailored for `_.partialRight`.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to append to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\n function composeArgsRight(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersIndex = -1,\n holdersLength = holders.length,\n rightIndex = -1,\n rightLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(rangeLength + rightLength),\n isUncurried = !isCurried;\n\n while (++argsIndex < rangeLength) {\n result[argsIndex] = args[argsIndex];\n }\n var offset = argsIndex;\n while (++rightIndex < rightLength) {\n result[offset + rightIndex] = partials[rightIndex];\n }\n while (++holdersIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[offset + holders[holdersIndex]] = args[argsIndex++];\n }\n }\n return result;\n }\n\n /**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\n function copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n }\n\n /**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\n function copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n }\n\n /**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n }\n\n /**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\n function copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n }\n\n /**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\n function createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n };\n }\n\n /**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\n function createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n }\n\n /**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n }\n\n /**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\n function createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\n function createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n }\n\n /**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\n function createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n }\n\n /**\n * Creates a function that produces an instance of `Ctor` regardless of\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n *\n * @private\n * @param {Function} Ctor The constructor to wrap.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCtor(Ctor) {\n return function() {\n // Use a `switch` statement to work with class constructors. See\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n // for more details.\n var args = arguments;\n switch (args.length) {\n case 0: return new Ctor;\n case 1: return new Ctor(args[0]);\n case 2: return new Ctor(args[0], args[1]);\n case 3: return new Ctor(args[0], args[1], args[2]);\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n }\n var thisBinding = baseCreate(Ctor.prototype),\n result = Ctor.apply(thisBinding, args);\n\n // Mimic the constructor's `return` behavior.\n // See https://es5.github.io/#x13.2.2 for more details.\n return isObject(result) ? result : thisBinding;\n };\n }\n\n /**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\n function createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = getIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n }\n\n /**\n * Creates a `_.flow` or `_.flowRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new flow function.\n */\n function createFlow(fromRight) {\n return flatRest(function(funcs) {\n var length = funcs.length,\n index = length,\n prereq = LodashWrapper.prototype.thru;\n\n if (fromRight) {\n funcs.reverse();\n }\n while (index--) {\n var func = funcs[index];\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n var wrapper = new LodashWrapper([], true);\n }\n }\n index = wrapper ? index : length;\n while (++index < length) {\n func = funcs[index];\n\n var funcName = getFuncName(func),\n data = funcName == 'wrapper' ? getData(func) : undefined;\n\n if (data && isLaziable(data[0]) &&\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n !data[4].length && data[9] == 1\n ) {\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n } else {\n wrapper = (func.length == 1 && isLaziable(func))\n ? wrapper[funcName]()\n : wrapper.thru(func);\n }\n }\n return function() {\n var args = arguments,\n value = args[0];\n\n if (wrapper && args.length == 1 && isArray(value)) {\n return wrapper.plant(value).value();\n }\n var index = 0,\n result = length ? funcs[index].apply(this, args) : value;\n\n while (++index < length) {\n result = funcs[index].call(this, result);\n }\n return result;\n };\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\n function createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n }\n\n /**\n * Creates a function that performs a mathematical operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @param {number} [defaultValue] The value used for `undefined` arguments.\n * @returns {Function} Returns the new mathematical operation function.\n */\n function createMathOperation(operator, defaultValue) {\n return function(value, other) {\n var result;\n if (value === undefined && other === undefined) {\n return defaultValue;\n }\n if (value !== undefined) {\n result = value;\n }\n if (other !== undefined) {\n if (result === undefined) {\n return other;\n }\n if (typeof value == 'string' || typeof other == 'string') {\n value = baseToString(value);\n other = baseToString(other);\n } else {\n value = baseToNumber(value);\n other = baseToNumber(other);\n }\n result = operator(value, other);\n }\n return result;\n };\n }\n\n /**\n * Creates a function like `_.over`.\n *\n * @private\n * @param {Function} arrayFunc The function to iterate over iteratees.\n * @returns {Function} Returns the new over function.\n */\n function createOver(arrayFunc) {\n return flatRest(function(iteratees) {\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n return baseRest(function(args) {\n var thisArg = this;\n return arrayFunc(iteratees, function(iteratee) {\n return apply(iteratee, thisArg, args);\n });\n });\n });\n }\n\n /**\n * Creates the padding for `string` based on `length`. The `chars` string\n * is truncated if the number of characters exceeds `length`.\n *\n * @private\n * @param {number} length The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padding for `string`.\n */\n function createPadding(length, chars) {\n chars = chars === undefined ? ' ' : baseToString(chars);\n\n var charsLength = chars.length;\n if (charsLength < 2) {\n return charsLength ? baseRepeat(chars, length) : chars;\n }\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n return hasUnicode(chars)\n ? castSlice(stringToArray(result), 0, length).join('')\n : result.slice(0, length);\n }\n\n /**\n * Creates a function that wraps `func` to invoke it with the `this` binding\n * of `thisArg` and `partials` prepended to the arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} partials The arguments to prepend to those provided to\n * the new function.\n * @returns {Function} Returns the new wrapped function.\n */\n function createPartial(func, bitmask, thisArg, partials) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var argsIndex = -1,\n argsLength = arguments.length,\n leftIndex = -1,\n leftLength = partials.length,\n args = Array(leftLength + argsLength),\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n while (++leftIndex < leftLength) {\n args[leftIndex] = partials[leftIndex];\n }\n while (argsLength--) {\n args[leftIndex++] = arguments[++argsIndex];\n }\n return apply(fn, isBind ? thisArg : this, args);\n }\n return wrapper;\n }\n\n /**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\n function createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n }\n\n /**\n * Creates a function that performs a relational operation on two values.\n *\n * @private\n * @param {Function} operator The function to perform the operation.\n * @returns {Function} Returns the new relational operation function.\n */\n function createRelationalOperation(operator) {\n return function(value, other) {\n if (!(typeof value == 'string' && typeof other == 'string')) {\n value = toNumber(value);\n other = toNumber(other);\n }\n return operator(value, other);\n };\n }\n\n /**\n * Creates a function that wraps `func` to continue currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {Function} wrapFunc The function to create the `func` wrapper.\n * @param {*} placeholder The placeholder value.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n var isCurry = bitmask & WRAP_CURRY_FLAG,\n newHolders = isCurry ? holders : undefined,\n newHoldersRight = isCurry ? undefined : holders,\n newPartials = isCurry ? partials : undefined,\n newPartialsRight = isCurry ? undefined : partials;\n\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n }\n var newData = [\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n newHoldersRight, argPos, ary, arity\n ];\n\n var result = wrapFunc.apply(undefined, newData);\n if (isLaziable(func)) {\n setData(result, newData);\n }\n result.placeholder = placeholder;\n return setWrapToString(result, func, bitmask);\n }\n\n /**\n * Creates a function like `_.round`.\n *\n * @private\n * @param {string} methodName The name of the `Math` method to use when rounding.\n * @returns {Function} Returns the new round function.\n */\n function createRound(methodName) {\n var func = Math[methodName];\n return function(number, precision) {\n number = toNumber(number);\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n if (precision && nativeIsFinite(number)) {\n // Shift with exponential notation to avoid floating-point issues.\n // See [MDN](https://mdn.io/round#Examples) for more details.\n var pair = (toString(number) + 'e').split('e'),\n value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n pair = (toString(value) + 'e').split('e');\n return +(pair[0] + 'e' + (+pair[1] - precision));\n }\n return func(number);\n };\n }\n\n /**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n };\n\n /**\n * Creates a `_.toPairs` or `_.toPairsIn` function.\n *\n * @private\n * @param {Function} keysFunc The function to get the keys of a given object.\n * @returns {Function} Returns the new pairs function.\n */\n function createToPairs(keysFunc) {\n return function(object) {\n var tag = getTag(object);\n if (tag == mapTag) {\n return mapToArray(object);\n }\n if (tag == setTag) {\n return setToPairs(object);\n }\n return baseToPairs(object, keysFunc(object));\n };\n }\n\n /**\n * Creates a function that either curries or invokes `func` with optional\n * `this` binding and partially applied arguments.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags.\n * 1 - `_.bind`\n * 2 - `_.bindKey`\n * 4 - `_.curry` or `_.curryRight` of a bound function\n * 8 - `_.curry`\n * 16 - `_.curryRight`\n * 32 - `_.partial`\n * 64 - `_.partialRight`\n * 128 - `_.rearg`\n * 256 - `_.ary`\n * 512 - `_.flip`\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to be partially applied.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n if (!isBindKey && typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var length = partials ? partials.length : 0;\n if (!length) {\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n partials = holders = undefined;\n }\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n arity = arity === undefined ? arity : toInteger(arity);\n length -= holders ? holders.length : 0;\n\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n var partialsRight = partials,\n holdersRight = holders;\n\n partials = holders = undefined;\n }\n var data = isBindKey ? undefined : getData(func);\n\n var newData = [\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n argPos, ary, arity\n ];\n\n if (data) {\n mergeData(newData, data);\n }\n func = newData[0];\n bitmask = newData[1];\n thisArg = newData[2];\n partials = newData[3];\n holders = newData[4];\n arity = newData[9] = newData[9] === undefined\n ? (isBindKey ? 0 : func.length)\n : nativeMax(newData[9] - length, 0);\n\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n }\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n var result = createBind(func, bitmask, thisArg);\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n result = createCurry(func, bitmask, arity);\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n result = createPartial(func, bitmask, thisArg, partials);\n } else {\n result = createHybrid.apply(undefined, newData);\n }\n var setter = data ? baseSetData : setData;\n return setWrapToString(setter(result, newData), func, bitmask);\n }\n\n /**\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n * of source objects to the destination object for all destination properties\n * that resolve to `undefined`.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to assign.\n * @param {Object} object The parent object of `objValue`.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\n if (objValue === undefined ||\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n return srcValue;\n }\n return objValue;\n }\n\n /**\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n * objects into destination objects that are passed thru.\n *\n * @private\n * @param {*} objValue The destination value.\n * @param {*} srcValue The source value.\n * @param {string} key The key of the property to merge.\n * @param {Object} object The parent object of `objValue`.\n * @param {Object} source The parent object of `srcValue`.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n * @returns {*} Returns the value to assign.\n */\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n if (isObject(objValue) && isObject(srcValue)) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, objValue);\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n stack['delete'](srcValue);\n }\n return objValue;\n }\n\n /**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\n function customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n }\n\n /**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n }\n\n /**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\n function flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n }\n\n /**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n }\n\n /**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\n function getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n }\n\n /**\n * Gets metadata for `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {*} Returns the metadata for `func`.\n */\n var getData = !metaMap ? noop : function(func) {\n return metaMap.get(func);\n };\n\n /**\n * Gets the name of `func`.\n *\n * @private\n * @param {Function} func The function to query.\n * @returns {string} Returns the function name.\n */\n function getFuncName(func) {\n var result = (func.name + ''),\n array = realNames[result],\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n while (length--) {\n var data = array[length],\n otherFunc = data.func;\n if (otherFunc == null || otherFunc == func) {\n return data.name;\n }\n }\n return result;\n }\n\n /**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\n function getHolder(func) {\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n return object.placeholder;\n }\n\n /**\n * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n * this function returns the custom method, otherwise it returns `baseIteratee`.\n * If arguments are provided, the chosen function is invoked with them and\n * its result is returned.\n *\n * @private\n * @param {*} [value] The value to convert to an iteratee.\n * @param {number} [arity] The arity of the created iteratee.\n * @returns {Function} Returns the chosen function or its result.\n */\n function getIteratee() {\n var result = lodash.iteratee || iteratee;\n result = result === iteratee ? baseIteratee : result;\n return arguments.length ? result(arguments[0], arguments[1]) : result;\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\n function getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\n function getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n }\n\n /**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n };\n\n /**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n };\n\n /**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\n var getTag = baseGetTag;\n\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n }\n\n /**\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\n *\n * @private\n * @param {number} start The start of the view.\n * @param {number} end The end of the view.\n * @param {Array} transforms The transformations to apply to the view.\n * @returns {Object} Returns an object containing the `start` and `end`\n * positions of the view.\n */\n function getView(start, end, transforms) {\n var index = -1,\n length = transforms.length;\n\n while (++index < length) {\n var data = transforms[index],\n size = data.size;\n\n switch (data.type) {\n case 'drop': start += size; break;\n case 'dropRight': end -= size; break;\n case 'take': end = nativeMin(end, start + size); break;\n case 'takeRight': start = nativeMax(start, end - size); break;\n }\n }\n return { 'start': start, 'end': end };\n }\n\n /**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\n function getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n }\n\n /**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\n function hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n }\n\n /**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\n function initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n }\n\n /**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n }\n\n /**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\n function initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n }\n\n /**\n * Inserts wrapper `details` in a comment at the top of the `source` body.\n *\n * @private\n * @param {string} source The source to modify.\n * @returns {Array} details The details to insert.\n * @returns {string} Returns the modified source.\n */\n function insertWrapDetails(source, details) {\n var length = details.length;\n if (!length) {\n return source;\n }\n var lastIndex = length - 1;\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n details = details.join(length > 2 ? ', ' : ' ');\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n }\n\n /**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\n function isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n }\n\n /**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\n function isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n }\n\n /**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\n function isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has a lazy counterpart.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n * else `false`.\n */\n function isLaziable(func) {\n var funcName = getFuncName(func),\n other = lodash[funcName];\n\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n return false;\n }\n if (func === other) {\n return true;\n }\n var data = getData(other);\n return !!data && func === data[0];\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Checks if `func` is capable of being masked.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n */\n var isMaskable = coreJsData ? isFunction : stubFalse;\n\n /**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\n function isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n }\n\n /**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\n function isStrictComparable(value) {\n return value === value && !isObject(value);\n }\n\n /**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\n function matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n }\n\n /**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\n function memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n }\n\n /**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\n function mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n }\n\n /**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\n function nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n }\n\n /**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\n function objectToString(value) {\n return nativeObjectToString.call(value);\n }\n\n /**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\n function overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n }\n\n /**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\n function parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n }\n\n /**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\n function reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n }\n\n /**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n }\n\n /**\n * Sets metadata for `func`.\n *\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n * period of time, it will trip its breaker and transition to an identity\n * function to avoid garbage collection pauses in V8. See\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n * for more details.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\n var setData = shortOut(baseSetData);\n\n /**\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n *\n * @private\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @returns {number|Object} Returns the timer id or timeout object.\n */\n var setTimeout = ctxSetTimeout || function(func, wait) {\n return root.setTimeout(func, wait);\n };\n\n /**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\n var setToString = shortOut(baseSetToString);\n\n /**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\n function setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n }\n\n /**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\n function shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n }\n\n /**\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n *\n * @private\n * @param {Array} array The array to shuffle.\n * @param {number} [size=array.length] The size of `array`.\n * @returns {Array} Returns `array`.\n */\n function shuffleSelf(array, size) {\n var index = -1,\n length = array.length,\n lastIndex = length - 1;\n\n size = size === undefined ? length : size;\n while (++index < size) {\n var rand = baseRandom(index, lastIndex),\n value = array[rand];\n\n array[rand] = array[index];\n array[index] = value;\n }\n array.length = size;\n return array;\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Updates wrapper `details` based on `bitmask` flags.\n *\n * @private\n * @returns {Array} details The details to modify.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Array} Returns `details`.\n */\n function updateWrapDetails(details, bitmask) {\n arrayEach(wrapFlags, function(pair) {\n var value = '_.' + pair[0];\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n details.push(value);\n }\n });\n return details.sort();\n }\n\n /**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\n function wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an array of elements split into groups the length of `size`.\n * If `array` can't be split evenly, the final chunk will be the remaining\n * elements.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to process.\n * @param {number} [size=1] The length of each chunk\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the new array of chunks.\n * @example\n *\n * _.chunk(['a', 'b', 'c', 'd'], 2);\n * // => [['a', 'b'], ['c', 'd']]\n *\n * _.chunk(['a', 'b', 'c', 'd'], 3);\n * // => [['a', 'b', 'c'], ['d']]\n */\n function chunk(array, size, guard) {\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n size = 1;\n } else {\n size = nativeMax(toInteger(size), 0);\n }\n var length = array == null ? 0 : array.length;\n if (!length || size < 1) {\n return [];\n }\n var index = 0,\n resIndex = 0,\n result = Array(nativeCeil(length / size));\n\n while (index < length) {\n result[resIndex++] = baseSlice(array, index, (index += size));\n }\n return result;\n }\n\n /**\n * Creates an array with all falsey values removed. The values `false`, `null`,\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to compact.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.compact([0, 1, false, 2, '', 3]);\n * // => [1, 2, 3]\n */\n function compact(array) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (value) {\n result[resIndex++] = value;\n }\n }\n return result;\n }\n\n /**\n * Creates a new array concatenating `array` with any additional arrays\n * and/or values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to concatenate.\n * @param {...*} [values] The values to concatenate.\n * @returns {Array} Returns the new concatenated array.\n * @example\n *\n * var array = [1];\n * var other = _.concat(array, 2, [3], [[4]]);\n *\n * console.log(other);\n * // => [1, 2, 3, [4]]\n *\n * console.log(array);\n * // => [1]\n */\n function concat() {\n var length = arguments.length;\n if (!length) {\n return [];\n }\n var args = Array(length - 1),\n array = arguments[0],\n index = length;\n\n while (index--) {\n args[index - 1] = arguments[index];\n }\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n }\n\n /**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\n var difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `iteratee` which\n * is invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var differenceBy = baseRest(function(array, values) {\n var iteratee = last(values);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.difference` except that it accepts `comparator`\n * which is invoked to compare elements of `array` to `values`. The order and\n * references of result values are determined by the first array. The comparator\n * is invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n *\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }]\n */\n var differenceWith = baseRest(function(array, values) {\n var comparator = last(values);\n if (isArrayLikeObject(comparator)) {\n comparator = undefined;\n }\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n : [];\n });\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.drop([1, 2, 3]);\n * // => [2, 3]\n *\n * _.drop([1, 2, 3], 2);\n * // => [3]\n *\n * _.drop([1, 2, 3], 5);\n * // => []\n *\n * _.drop([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function drop(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with `n` elements dropped from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to drop.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.dropRight([1, 2, 3]);\n * // => [1, 2]\n *\n * _.dropRight([1, 2, 3], 2);\n * // => [1]\n *\n * _.dropRight([1, 2, 3], 5);\n * // => []\n *\n * _.dropRight([1, 2, 3], 0);\n * // => [1, 2, 3]\n */\n function dropRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the end.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.dropRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropRightWhile(users, ['active', false]);\n * // => objects for ['barney']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropRightWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` excluding elements dropped from the beginning.\n * Elements are dropped until `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.dropWhile(users, function(o) { return !o.active; });\n * // => objects for ['pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.dropWhile(users, ['active', false]);\n * // => objects for ['pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.dropWhile(users, 'active');\n * // => objects for ['barney', 'fred', 'pebbles']\n */\n function dropWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), true)\n : [];\n }\n\n /**\n * Fills elements of `array` with `value` from `start` up to, but not\n * including, `end`.\n *\n * **Note:** This method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Array\n * @param {Array} array The array to fill.\n * @param {*} value The value to fill `array` with.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.fill(array, 'a');\n * console.log(array);\n * // => ['a', 'a', 'a']\n *\n * _.fill(Array(3), 2);\n * // => [2, 2, 2]\n *\n * _.fill([4, 6, 8, 10], '*', 1, 3);\n * // => [4, '*', '*', 10]\n */\n function fill(array, value, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n start = 0;\n end = length;\n }\n return baseFill(array, value, start, end);\n }\n\n /**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\n function findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index);\n }\n\n /**\n * This method is like `_.findIndex` except that it iterates over elements\n * of `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n * // => 2\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n * // => 0\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastIndex(users, ['active', false]);\n * // => 2\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastIndex(users, 'active');\n * // => 0\n */\n function findLastIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length - 1;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = fromIndex < 0\n ? nativeMax(length + index, 0)\n : nativeMin(index, length - 1);\n }\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n }\n\n /**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\n function flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n }\n\n /**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\n function flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n }\n\n /**\n * Recursively flatten `array` up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * var array = [1, [2, [3, [4]], 5]];\n *\n * _.flattenDepth(array, 1);\n * // => [1, 2, [3, [4]], 5]\n *\n * _.flattenDepth(array, 2);\n * // => [1, 2, 3, [4], 5]\n */\n function flattenDepth(array, depth) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(array, depth);\n }\n\n /**\n * The inverse of `_.toPairs`; this method returns an object composed\n * from key-value `pairs`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} pairs The key-value pairs.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.fromPairs([['a', 1], ['b', 2]]);\n * // => { 'a': 1, 'b': 2 }\n */\n function fromPairs(pairs) {\n var index = -1,\n length = pairs == null ? 0 : pairs.length,\n result = {};\n\n while (++index < length) {\n var pair = pairs[index];\n result[pair[0]] = pair[1];\n }\n return result;\n }\n\n /**\n * Gets the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias first\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the first element of `array`.\n * @example\n *\n * _.head([1, 2, 3]);\n * // => 1\n *\n * _.head([]);\n * // => undefined\n */\n function head(array) {\n return (array && array.length) ? array[0] : undefined;\n }\n\n /**\n * Gets the index at which the first occurrence of `value` is found in `array`\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. If `fromIndex` is negative, it's used as the\n * offset from the end of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.indexOf([1, 2, 1, 2], 2);\n * // => 1\n *\n * // Search from the `fromIndex`.\n * _.indexOf([1, 2, 1, 2], 2, 2);\n * // => 3\n */\n function indexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseIndexOf(array, value, index);\n }\n\n /**\n * Gets all but the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.initial([1, 2, 3]);\n * // => [1, 2]\n */\n function initial(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 0, -1) : [];\n }\n\n /**\n * Creates an array of unique values that are included in all given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersection([2, 1], [2, 3]);\n * // => [2]\n */\n var intersection = baseRest(function(arrays) {\n var mapped = arrayMap(arrays, castArrayLikeObject);\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped)\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `iteratee`\n * which is invoked for each element of each `arrays` to generate the criterion\n * by which they're compared. The order and references of result values are\n * determined by the first array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [2.1]\n *\n * // The `_.property` iteratee shorthand.\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }]\n */\n var intersectionBy = baseRest(function(arrays) {\n var iteratee = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n if (iteratee === last(mapped)) {\n iteratee = undefined;\n } else {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\n : [];\n });\n\n /**\n * This method is like `_.intersection` except that it accepts `comparator`\n * which is invoked to compare elements of `arrays`. The order and references\n * of result values are determined by the first array. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of intersecting values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.intersectionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }]\n */\n var intersectionWith = baseRest(function(arrays) {\n var comparator = last(arrays),\n mapped = arrayMap(arrays, castArrayLikeObject);\n\n comparator = typeof comparator == 'function' ? comparator : undefined;\n if (comparator) {\n mapped.pop();\n }\n return (mapped.length && mapped[0] === arrays[0])\n ? baseIntersection(mapped, undefined, comparator)\n : [];\n });\n\n /**\n * Converts all elements in `array` into a string separated by `separator`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to convert.\n * @param {string} [separator=','] The element separator.\n * @returns {string} Returns the joined string.\n * @example\n *\n * _.join(['a', 'b', 'c'], '~');\n * // => 'a~b~c'\n */\n function join(array, separator) {\n return array == null ? '' : nativeJoin.call(array, separator);\n }\n\n /**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\n function last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n }\n\n /**\n * This method is like `_.indexOf` except that it iterates over elements of\n * `array` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=array.length-1] The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.lastIndexOf([1, 2, 1, 2], 2);\n * // => 3\n *\n * // Search from the `fromIndex`.\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n * // => 1\n */\n function lastIndexOf(array, value, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = length;\n if (fromIndex !== undefined) {\n index = toInteger(fromIndex);\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n }\n return value === value\n ? strictLastIndexOf(array, value, index)\n : baseFindIndex(array, baseIsNaN, index, true);\n }\n\n /**\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\n * element from the end is returned.\n *\n * @static\n * @memberOf _\n * @since 4.11.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=0] The index of the element to return.\n * @returns {*} Returns the nth element of `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n *\n * _.nth(array, 1);\n * // => 'b'\n *\n * _.nth(array, -2);\n * // => 'c';\n */\n function nth(array, n) {\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n }\n\n /**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\n var pull = baseRest(pullAll);\n\n /**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\n function pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\n * invoked for each element of `array` and `values` to generate the criterion\n * by which they're compared. The iteratee is invoked with one argument: (value).\n *\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n *\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n * console.log(array);\n * // => [{ 'x': 2 }]\n */\n function pullAllBy(array, values, iteratee) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, getIteratee(iteratee, 2))\n : array;\n }\n\n /**\n * This method is like `_.pullAll` except that it accepts `comparator` which\n * is invoked to compare elements of `array` to `values`. The comparator is\n * invoked with two arguments: (arrVal, othVal).\n *\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n *\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n * console.log(array);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n */\n function pullAllWith(array, values, comparator) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values, undefined, comparator)\n : array;\n }\n\n /**\n * Removes elements from `array` corresponding to `indexes` and returns an\n * array of removed elements.\n *\n * **Note:** Unlike `_.at`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = ['a', 'b', 'c', 'd'];\n * var pulled = _.pullAt(array, [1, 3]);\n *\n * console.log(array);\n * // => ['a', 'c']\n *\n * console.log(pulled);\n * // => ['b', 'd']\n */\n var pullAt = flatRest(function(array, indexes) {\n var length = array == null ? 0 : array.length,\n result = baseAt(array, indexes);\n\n basePullAt(array, arrayMap(indexes, function(index) {\n return isIndex(index, length) ? +index : index;\n }).sort(compareAscending));\n\n return result;\n });\n\n /**\n * Removes all elements from `array` that `predicate` returns truthy for\n * and returns an array of the removed elements. The predicate is invoked\n * with three arguments: (value, index, array).\n *\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n * to pull elements from an array by value.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new array of removed elements.\n * @example\n *\n * var array = [1, 2, 3, 4];\n * var evens = _.remove(array, function(n) {\n * return n % 2 == 0;\n * });\n *\n * console.log(array);\n * // => [1, 3]\n *\n * console.log(evens);\n * // => [2, 4]\n */\n function remove(array, predicate) {\n var result = [];\n if (!(array && array.length)) {\n return result;\n }\n var index = -1,\n indexes = [],\n length = array.length;\n\n predicate = getIteratee(predicate, 3);\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result.push(value);\n indexes.push(index);\n }\n }\n basePullAt(array, indexes);\n return result;\n }\n\n /**\n * Reverses `array` so that the first element becomes the last, the second\n * element becomes the second to last, and so on.\n *\n * **Note:** This method mutates `array` and is based on\n * [`Array#reverse`](https://mdn.io/Array/reverse).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _.reverse(array);\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function reverse(array) {\n return array == null ? array : nativeReverse.call(array);\n }\n\n /**\n * Creates a slice of `array` from `start` up to, but not including, `end`.\n *\n * **Note:** This method is used instead of\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n * returned.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\n function slice(array, start, end) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n start = 0;\n end = length;\n }\n else {\n start = start == null ? 0 : toInteger(start);\n end = end === undefined ? length : toInteger(end);\n }\n return baseSlice(array, start, end);\n }\n\n /**\n * Uses a binary search to determine the lowest index at which `value`\n * should be inserted into `array` in order to maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedIndex([30, 50], 40);\n * // => 1\n */\n function sortedIndex(array, value) {\n return baseSortedIndex(array, value);\n }\n\n /**\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n * // => 0\n */\n function sortedIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n }\n\n /**\n * This method is like `_.indexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n * // => 1\n */\n function sortedIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value);\n if (index < length && eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.sortedIndex` except that it returns the highest\n * index at which `value` should be inserted into `array` in order to\n * maintain its sort order.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n * // => 4\n */\n function sortedLastIndex(array, value) {\n return baseSortedIndex(array, value, true);\n }\n\n /**\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n * which is invoked for `value` and each element of `array` to compute their\n * sort ranking. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The sorted array to inspect.\n * @param {*} value The value to evaluate.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {number} Returns the index at which `value` should be inserted\n * into `array`.\n * @example\n *\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\n *\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n * // => 1\n *\n * // The `_.property` iteratee shorthand.\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n * // => 1\n */\n function sortedLastIndexBy(array, value, iteratee) {\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n }\n\n /**\n * This method is like `_.lastIndexOf` except that it performs a binary\n * search on a sorted `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n * @example\n *\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n * // => 3\n */\n function sortedLastIndexOf(array, value) {\n var length = array == null ? 0 : array.length;\n if (length) {\n var index = baseSortedIndex(array, value, true) - 1;\n if (eq(array[index], value)) {\n return index;\n }\n }\n return -1;\n }\n\n /**\n * This method is like `_.uniq` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniq([1, 1, 2]);\n * // => [1, 2]\n */\n function sortedUniq(array) {\n return (array && array.length)\n ? baseSortedUniq(array)\n : [];\n }\n\n /**\n * This method is like `_.uniqBy` except that it's designed and optimized\n * for sorted arrays.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n * // => [1.1, 2.3]\n */\n function sortedUniqBy(array, iteratee) {\n return (array && array.length)\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\n : [];\n }\n\n /**\n * Gets all but the first element of `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.tail([1, 2, 3]);\n * // => [2, 3]\n */\n function tail(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseSlice(array, 1, length) : [];\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\n function take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n }\n\n /**\n * Creates a slice of `array` with `n` elements taken from the end.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.takeRight([1, 2, 3]);\n * // => [3]\n *\n * _.takeRight([1, 2, 3], 2);\n * // => [2, 3]\n *\n * _.takeRight([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.takeRight([1, 2, 3], 0);\n * // => []\n */\n function takeRight(array, n, guard) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n n = length - n;\n return baseSlice(array, n < 0 ? 0 : n, length);\n }\n\n /**\n * Creates a slice of `array` with elements taken from the end. Elements are\n * taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': false }\n * ];\n *\n * _.takeRightWhile(users, function(o) { return !o.active; });\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n * // => objects for ['pebbles']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeRightWhile(users, ['active', false]);\n * // => objects for ['fred', 'pebbles']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeRightWhile(users, 'active');\n * // => []\n */\n function takeRightWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\n : [];\n }\n\n /**\n * Creates a slice of `array` with elements taken from the beginning. Elements\n * are taken until `predicate` returns falsey. The predicate is invoked with\n * three arguments: (value, index, array).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.takeWhile(users, function(o) { return !o.active; });\n * // => objects for ['barney', 'fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.takeWhile(users, ['active', false]);\n * // => objects for ['barney', 'fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.takeWhile(users, 'active');\n * // => []\n */\n function takeWhile(array, predicate) {\n return (array && array.length)\n ? baseWhile(array, getIteratee(predicate, 3))\n : [];\n }\n\n /**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\n var union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n });\n\n /**\n * This method is like `_.union` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which uniqueness is computed. Result values are chosen from the first\n * array in which the value occurs. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n var unionBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.union` except that it accepts `comparator` which\n * is invoked to compare elements of `arrays`. Result values are chosen from\n * the first array in which the value occurs. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.unionWith(objects, others, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var unionWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n });\n\n /**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\n function uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\n function uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n }\n\n /**\n * This method is like `_.uniq` except that it accepts `comparator` which\n * is invoked to compare elements of `array`. The order of result values is\n * determined by the order they occur in the array.The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.uniqWith(objects, _.isEqual);\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n */\n function uniqWith(array, comparator) {\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n }\n\n /**\n * This method is like `_.zip` except that it accepts an array of grouped\n * elements and creates an array regrouping the elements to their pre-zip\n * configuration.\n *\n * @static\n * @memberOf _\n * @since 1.2.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n *\n * _.unzip(zipped);\n * // => [['a', 'b'], [1, 2], [true, false]]\n */\n function unzip(array) {\n if (!(array && array.length)) {\n return [];\n }\n var length = 0;\n array = arrayFilter(array, function(group) {\n if (isArrayLikeObject(group)) {\n length = nativeMax(group.length, length);\n return true;\n }\n });\n return baseTimes(length, function(index) {\n return arrayMap(array, baseProperty(index));\n });\n }\n\n /**\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\n * how regrouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {Array} array The array of grouped elements to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * regrouped values.\n * @returns {Array} Returns the new array of regrouped elements.\n * @example\n *\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n * // => [[1, 10, 100], [2, 20, 200]]\n *\n * _.unzipWith(zipped, _.add);\n * // => [3, 30, 300]\n */\n function unzipWith(array, iteratee) {\n if (!(array && array.length)) {\n return [];\n }\n var result = unzip(array);\n if (iteratee == null) {\n return result;\n }\n return arrayMap(result, function(group) {\n return apply(iteratee, undefined, group);\n });\n }\n\n /**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\n var without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n });\n\n /**\n * Creates an array of unique values that is the\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n * of the given arrays. The order of result values is determined by the order\n * they occur in the arrays.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.without\n * @example\n *\n * _.xor([2, 1], [2, 3]);\n * // => [1, 3]\n */\n var xor = baseRest(function(arrays) {\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `iteratee` which is\n * invoked for each element of each `arrays` to generate the criterion by\n * which by which they're compared. The order of result values is determined\n * by the order they occur in the arrays. The iteratee is invoked with one\n * argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n * // => [1.2, 3.4]\n *\n * // The `_.property` iteratee shorthand.\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 2 }]\n */\n var xorBy = baseRest(function(arrays) {\n var iteratee = last(arrays);\n if (isArrayLikeObject(iteratee)) {\n iteratee = undefined;\n }\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n });\n\n /**\n * This method is like `_.xor` except that it accepts `comparator` which is\n * invoked to compare elements of `arrays`. The order of result values is\n * determined by the order they occur in the arrays. The comparator is invoked\n * with two arguments: (arrVal, othVal).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n * @example\n *\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n *\n * _.xorWith(objects, others, _.isEqual);\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n */\n var xorWith = baseRest(function(arrays) {\n var comparator = last(arrays);\n comparator = typeof comparator == 'function' ? comparator : undefined;\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n });\n\n /**\n * Creates an array of grouped elements, the first of which contains the\n * first elements of the given arrays, the second of which contains the\n * second elements of the given arrays, and so on.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zip(['a', 'b'], [1, 2], [true, false]);\n * // => [['a', 1, true], ['b', 2, false]]\n */\n var zip = baseRest(unzip);\n\n /**\n * This method is like `_.fromPairs` except that it accepts two arrays,\n * one of property identifiers and one of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 0.4.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObject(['a', 'b'], [1, 2]);\n * // => { 'a': 1, 'b': 2 }\n */\n function zipObject(props, values) {\n return baseZipObject(props || [], values || [], assignValue);\n }\n\n /**\n * This method is like `_.zipObject` except that it supports property paths.\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Array\n * @param {Array} [props=[]] The property identifiers.\n * @param {Array} [values=[]] The property values.\n * @returns {Object} Returns the new object.\n * @example\n *\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n */\n function zipObjectDeep(props, values) {\n return baseZipObject(props || [], values || [], baseSet);\n }\n\n /**\n * This method is like `_.zip` except that it accepts `iteratee` to specify\n * how grouped values should be combined. The iteratee is invoked with the\n * elements of each group: (...group).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Array\n * @param {...Array} [arrays] The arrays to process.\n * @param {Function} [iteratee=_.identity] The function to combine\n * grouped values.\n * @returns {Array} Returns the new array of grouped elements.\n * @example\n *\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n * return a + b + c;\n * });\n * // => [111, 222]\n */\n var zipWith = baseRest(function(arrays) {\n var length = arrays.length,\n iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n return unzipWith(arrays, iteratee);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n * chain sequences enabled. The result of such sequences must be unwrapped\n * with `_#value`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Seq\n * @param {*} value The value to wrap.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'pebbles', 'age': 1 }\n * ];\n *\n * var youngest = _\n * .chain(users)\n * .sortBy('age')\n * .map(function(o) {\n * return o.user + ' is ' + o.age;\n * })\n * .head()\n * .value();\n * // => 'pebbles is 1'\n */\n function chain(value) {\n var result = lodash(value);\n result.__chain__ = true;\n return result;\n }\n\n /**\n * This method invokes `interceptor` and returns `value`. The interceptor\n * is invoked with one argument; (value). The purpose of this method is to\n * \"tap into\" a method chain sequence in order to modify intermediate results.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns `value`.\n * @example\n *\n * _([1, 2, 3])\n * .tap(function(array) {\n * // Mutate input array.\n * array.pop();\n * })\n * .reverse()\n * .value();\n * // => [2, 1]\n */\n function tap(value, interceptor) {\n interceptor(value);\n return value;\n }\n\n /**\n * This method is like `_.tap` except that it returns the result of `interceptor`.\n * The purpose of this method is to \"pass thru\" values replacing intermediate\n * results in a method chain sequence.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Seq\n * @param {*} value The value to provide to `interceptor`.\n * @param {Function} interceptor The function to invoke.\n * @returns {*} Returns the result of `interceptor`.\n * @example\n *\n * _(' abc ')\n * .chain()\n * .trim()\n * .thru(function(value) {\n * return [value];\n * })\n * .value();\n * // => ['abc']\n */\n function thru(value, interceptor) {\n return interceptor(value);\n }\n\n /**\n * This method is the wrapper version of `_.at`.\n *\n * @name at\n * @memberOf _\n * @since 1.0.0\n * @category Seq\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _(object).at(['a[0].b.c', 'a[1]']).value();\n * // => [3, 4]\n */\n var wrapperAt = flatRest(function(paths) {\n var length = paths.length,\n start = length ? paths[0] : 0,\n value = this.__wrapped__,\n interceptor = function(object) { return baseAt(object, paths); };\n\n if (length > 1 || this.__actions__.length ||\n !(value instanceof LazyWrapper) || !isIndex(start)) {\n return this.thru(interceptor);\n }\n value = value.slice(start, +start + (length ? 1 : 0));\n value.__actions__.push({\n 'func': thru,\n 'args': [interceptor],\n 'thisArg': undefined\n });\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\n if (length && !array.length) {\n array.push(undefined);\n }\n return array;\n });\n });\n\n /**\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n *\n * @name chain\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 }\n * ];\n *\n * // A sequence without explicit chaining.\n * _(users).head();\n * // => { 'user': 'barney', 'age': 36 }\n *\n * // A sequence with explicit chaining.\n * _(users)\n * .chain()\n * .head()\n * .pick('user')\n * .value();\n * // => { 'user': 'barney' }\n */\n function wrapperChain() {\n return chain(this);\n }\n\n /**\n * Executes the chain sequence and returns the wrapped result.\n *\n * @name commit\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2];\n * var wrapped = _(array).push(3);\n *\n * console.log(array);\n * // => [1, 2]\n *\n * wrapped = wrapped.commit();\n * console.log(array);\n * // => [1, 2, 3]\n *\n * wrapped.last();\n * // => 3\n *\n * console.log(array);\n * // => [1, 2, 3]\n */\n function wrapperCommit() {\n return new LodashWrapper(this.value(), this.__chain__);\n }\n\n /**\n * Gets the next value on a wrapped object following the\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n *\n * @name next\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the next iterator value.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 1 }\n *\n * wrapped.next();\n * // => { 'done': false, 'value': 2 }\n *\n * wrapped.next();\n * // => { 'done': true, 'value': undefined }\n */\n function wrapperNext() {\n if (this.__values__ === undefined) {\n this.__values__ = toArray(this.value());\n }\n var done = this.__index__ >= this.__values__.length,\n value = done ? undefined : this.__values__[this.__index__++];\n\n return { 'done': done, 'value': value };\n }\n\n /**\n * Enables the wrapper to be iterable.\n *\n * @name Symbol.iterator\n * @memberOf _\n * @since 4.0.0\n * @category Seq\n * @returns {Object} Returns the wrapper object.\n * @example\n *\n * var wrapped = _([1, 2]);\n *\n * wrapped[Symbol.iterator]() === wrapped;\n * // => true\n *\n * Array.from(wrapped);\n * // => [1, 2]\n */\n function wrapperToIterator() {\n return this;\n }\n\n /**\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\n *\n * @name plant\n * @memberOf _\n * @since 3.2.0\n * @category Seq\n * @param {*} value The value to plant.\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var wrapped = _([1, 2]).map(square);\n * var other = wrapped.plant([3, 4]);\n *\n * other.value();\n * // => [9, 16]\n *\n * wrapped.value();\n * // => [1, 4]\n */\n function wrapperPlant(value) {\n var result,\n parent = this;\n\n while (parent instanceof baseLodash) {\n var clone = wrapperClone(parent);\n clone.__index__ = 0;\n clone.__values__ = undefined;\n if (result) {\n previous.__wrapped__ = clone;\n } else {\n result = clone;\n }\n var previous = clone;\n parent = parent.__wrapped__;\n }\n previous.__wrapped__ = value;\n return result;\n }\n\n /**\n * This method is the wrapper version of `_.reverse`.\n *\n * **Note:** This method mutates the wrapped array.\n *\n * @name reverse\n * @memberOf _\n * @since 0.1.0\n * @category Seq\n * @returns {Object} Returns the new `lodash` wrapper instance.\n * @example\n *\n * var array = [1, 2, 3];\n *\n * _(array).reverse().value()\n * // => [3, 2, 1]\n *\n * console.log(array);\n * // => [3, 2, 1]\n */\n function wrapperReverse() {\n var value = this.__wrapped__;\n if (value instanceof LazyWrapper) {\n var wrapped = value;\n if (this.__actions__.length) {\n wrapped = new LazyWrapper(this);\n }\n wrapped = wrapped.reverse();\n wrapped.__actions__.push({\n 'func': thru,\n 'args': [reverse],\n 'thisArg': undefined\n });\n return new LodashWrapper(wrapped, this.__chain__);\n }\n return this.thru(reverse);\n }\n\n /**\n * Executes the chain sequence to resolve the unwrapped value.\n *\n * @name value\n * @memberOf _\n * @since 0.1.0\n * @alias toJSON, valueOf\n * @category Seq\n * @returns {*} Returns the resolved unwrapped value.\n * @example\n *\n * _([1, 2, 3]).value();\n * // => [1, 2, 3]\n */\n function wrapperValue() {\n return baseWrapperValue(this.__wrapped__, this.__actions__);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\n var countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n });\n\n /**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\n function every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', 'barney']\n */\n function filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\n var find = createFind(findIndex);\n\n /**\n * This method is like `_.find` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=collection.length-1] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * _.findLast([1, 2, 3, 4], function(n) {\n * return n % 2 == 1;\n * });\n * // => 3\n */\n var findLast = createFind(findLastIndex);\n\n /**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDeep([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\n function flatMapDeep(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), INFINITY);\n }\n\n /**\n * This method is like `_.flatMap` except that it recursively flattens the\n * mapped results up to `depth` times.\n *\n * @static\n * @memberOf _\n * @since 4.7.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {number} [depth=1] The maximum recursion depth.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [[[n, n]]];\n * }\n *\n * _.flatMapDepth([1, 2], duplicate, 2);\n * // => [[1, 1], [2, 2]]\n */\n function flatMapDepth(collection, iteratee, depth) {\n depth = depth === undefined ? 1 : toInteger(depth);\n return baseFlatten(map(collection, iteratee), depth);\n }\n\n /**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forEach` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @alias eachRight\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEach\n * @example\n *\n * _.forEachRight([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `2` then `1`.\n */\n function forEachRight(collection, iteratee) {\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\n var groupBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n result[key].push(value);\n } else {\n baseAssignValue(result, key, [value]);\n }\n });\n\n /**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\n function includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n }\n\n /**\n * Invokes the method at `path` of each element in `collection`, returning\n * an array of the results of each invoked method. Any additional arguments\n * are provided to each invoked method. If `path` is a function, it's invoked\n * for, and `this` bound to, each element in `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array|Function|string} path The path of the method to invoke or\n * the function invoked per iteration.\n * @param {...*} [args] The arguments to invoke each method with.\n * @returns {Array} Returns the array of results.\n * @example\n *\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n * // => [[1, 5, 7], [1, 2, 3]]\n *\n * _.invokeMap([123, 456], String.prototype.split, '');\n * // => [['1', '2', '3'], ['4', '5', '6']]\n */\n var invokeMap = baseRest(function(collection, path, args) {\n var index = -1,\n isFunc = typeof path == 'function',\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value) {\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n });\n return result;\n });\n\n /**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the last element responsible for generating the key. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * var array = [\n * { 'dir': 'left', 'code': 97 },\n * { 'dir': 'right', 'code': 100 }\n * ];\n *\n * _.keyBy(array, function(o) {\n * return String.fromCharCode(o.code);\n * });\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n *\n * _.keyBy(array, 'dir');\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n */\n var keyBy = createAggregator(function(result, value, key) {\n baseAssignValue(result, key, value);\n });\n\n /**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\n function map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.sortBy` except that it allows specifying the sort\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\n * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n * descending or \"asc\" for ascending sort order of corresponding values.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @param {string[]} [orders] The sort orders of `iteratees`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 34 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 36 }\n * ];\n *\n * // Sort by `user` in ascending order and by `age` in descending order.\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n */\n function orderBy(collection, iteratees, orders, guard) {\n if (collection == null) {\n return [];\n }\n if (!isArray(iteratees)) {\n iteratees = iteratees == null ? [] : [iteratees];\n }\n orders = guard ? undefined : orders;\n if (!isArray(orders)) {\n orders = orders == null ? [] : [orders];\n }\n return baseOrderBy(collection, iteratees, orders);\n }\n\n /**\n * Creates an array of elements split into two groups, the first of which\n * contains elements `predicate` returns truthy for, the second of which\n * contains elements `predicate` returns falsey for. The predicate is\n * invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the array of grouped elements.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true },\n * { 'user': 'pebbles', 'age': 1, 'active': false }\n * ];\n *\n * _.partition(users, function(o) { return o.active; });\n * // => objects for [['fred'], ['barney', 'pebbles']]\n *\n * // The `_.matches` iteratee shorthand.\n * _.partition(users, { 'age': 1, 'active': false });\n * // => objects for [['pebbles'], ['barney', 'fred']]\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.partition(users, ['active', false]);\n * // => objects for [['barney', 'pebbles'], ['fred']]\n *\n * // The `_.property` iteratee shorthand.\n * _.partition(users, 'active');\n * // => objects for [['fred'], ['barney', 'pebbles']]\n */\n var partition = createAggregator(function(result, value, key) {\n result[key ? 0 : 1].push(value);\n }, function() { return [[], []]; });\n\n /**\n * Reduces `collection` to a value which is the accumulated result of running\n * each element in `collection` thru `iteratee`, where each successive\n * invocation is supplied the return value of the previous. If `accumulator`\n * is not given, the first element of `collection` is used as the initial\n * value. The iteratee is invoked with four arguments:\n * (accumulator, value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\n *\n * The guarded methods are:\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n * and `sortBy`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduceRight\n * @example\n *\n * _.reduce([1, 2], function(sum, n) {\n * return sum + n;\n * }, 0);\n * // => 3\n *\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * return result;\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n */\n function reduce(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduce : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n }\n\n /**\n * This method is like `_.reduce` except that it iterates over elements of\n * `collection` from right to left.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @returns {*} Returns the accumulated value.\n * @see _.reduce\n * @example\n *\n * var array = [[0, 1], [2, 3], [4, 5]];\n *\n * _.reduceRight(array, function(flattened, other) {\n * return flattened.concat(other);\n * }, []);\n * // => [4, 5, 2, 3, 0, 1]\n */\n function reduceRight(collection, iteratee, accumulator) {\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\n initAccum = arguments.length < 3;\n\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n }\n\n /**\n * The opposite of `_.filter`; this method returns the elements of `collection`\n * that `predicate` does **not** return truthy for.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.filter\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': true }\n * ];\n *\n * _.reject(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.reject(users, { 'age': 40, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.reject(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.reject(users, 'active');\n * // => objects for ['barney']\n */\n function reject(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, negate(getIteratee(predicate, 3)));\n }\n\n /**\n * Gets a random element from `collection`.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @returns {*} Returns the random element.\n * @example\n *\n * _.sample([1, 2, 3, 4]);\n * // => 2\n */\n function sample(collection) {\n var func = isArray(collection) ? arraySample : baseSample;\n return func(collection);\n }\n\n /**\n * Gets `n` random elements at unique keys from `collection` up to the\n * size of `collection`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to sample.\n * @param {number} [n=1] The number of elements to sample.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the random elements.\n * @example\n *\n * _.sampleSize([1, 2, 3], 2);\n * // => [3, 1]\n *\n * _.sampleSize([1, 2, 3], 4);\n * // => [2, 3, 1]\n */\n function sampleSize(collection, n, guard) {\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n return func(collection, n);\n }\n\n /**\n * Creates an array of shuffled values, using a version of the\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to shuffle.\n * @returns {Array} Returns the new shuffled array.\n * @example\n *\n * _.shuffle([1, 2, 3, 4]);\n * // => [4, 1, 3, 2]\n */\n function shuffle(collection) {\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\n return func(collection);\n }\n\n /**\n * Gets the size of `collection` by returning its length for array-like\n * values or the number of own enumerable string keyed properties for objects.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @returns {number} Returns the collection size.\n * @example\n *\n * _.size([1, 2, 3]);\n * // => 3\n *\n * _.size({ 'a': 1, 'b': 2 });\n * // => 2\n *\n * _.size('pebbles');\n * // => 7\n */\n function size(collection) {\n if (collection == null) {\n return 0;\n }\n if (isArrayLike(collection)) {\n return isString(collection) ? stringSize(collection) : collection.length;\n }\n var tag = getTag(collection);\n if (tag == mapTag || tag == setTag) {\n return collection.size;\n }\n return baseKeys(collection).length;\n }\n\n /**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\n function some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, getIteratee(predicate, 3));\n }\n\n /**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 30 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n */\n var sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n });\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\n var now = ctxNow || function() {\n return root.Date.now();\n };\n\n /*------------------------------------------------------------------------*/\n\n /**\n * The opposite of `_.before`; this method creates a function that invokes\n * `func` once it's called `n` or more times.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {number} n The number of calls before `func` is invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var saves = ['profile', 'settings'];\n *\n * var done = _.after(saves.length, function() {\n * console.log('done saving!');\n * });\n *\n * _.forEach(saves, function(type) {\n * asyncSave({ 'type': type, 'complete': done });\n * });\n * // => Logs 'done saving!' after the two async saves have completed.\n */\n function after(n, func) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n < 1) {\n return func.apply(this, arguments);\n }\n };\n }\n\n /**\n * Creates a function that invokes `func`, with up to `n` arguments,\n * ignoring any additional arguments.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @param {number} [n=func.length] The arity cap.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n * // => [6, 8, 10]\n */\n function ary(func, n, guard) {\n n = guard ? undefined : n;\n n = (func && n == null) ? func.length : n;\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n }\n\n /**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\n function before(n, func) {\n var result;\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n n = toInteger(n);\n return function() {\n if (--n > 0) {\n result = func.apply(this, arguments);\n }\n if (n <= 1) {\n func = undefined;\n }\n return result;\n };\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\n * and `partials` prepended to the arguments it receives.\n *\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for partially applied arguments.\n *\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n * property of bound functions.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to bind.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * function greet(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n *\n * var object = { 'user': 'fred' };\n *\n * var bound = _.bind(greet, object, 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bind(greet, object, _, '!');\n * bound('hi');\n * // => 'hi fred!'\n */\n var bind = baseRest(function(func, thisArg, partials) {\n var bitmask = WRAP_BIND_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bind));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(func, bitmask, thisArg, partials, holders);\n });\n\n /**\n * Creates a function that invokes the method at `object[key]` with `partials`\n * prepended to the arguments it receives.\n *\n * This method differs from `_.bind` by allowing bound functions to reference\n * methods that may be redefined or don't yet exist. See\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n * for more details.\n *\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Function\n * @param {Object} object The object to invoke the method on.\n * @param {string} key The key of the method.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new bound function.\n * @example\n *\n * var object = {\n * 'user': 'fred',\n * 'greet': function(greeting, punctuation) {\n * return greeting + ' ' + this.user + punctuation;\n * }\n * };\n *\n * var bound = _.bindKey(object, 'greet', 'hi');\n * bound('!');\n * // => 'hi fred!'\n *\n * object.greet = function(greeting, punctuation) {\n * return greeting + 'ya ' + this.user + punctuation;\n * };\n *\n * bound('!');\n * // => 'hiya fred!'\n *\n * // Bound with placeholders.\n * var bound = _.bindKey(object, 'greet', _, '!');\n * bound('hi');\n * // => 'hiya fred!'\n */\n var bindKey = baseRest(function(object, key, partials) {\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n if (partials.length) {\n var holders = replaceHolders(partials, getHolder(bindKey));\n bitmask |= WRAP_PARTIAL_FLAG;\n }\n return createWrap(key, bitmask, object, partials, holders);\n });\n\n /**\n * Creates a function that accepts arguments of `func` and either invokes\n * `func` returning its result, if at least `arity` number of arguments have\n * been provided, or returns a function that accepts the remaining `func`\n * arguments, and so on. The arity of `func` may be specified if `func.length`\n * is not sufficient.\n *\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n * may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curry(abc);\n *\n * curried(1)(2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2)(3);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(1)(_, 3)(2);\n * // => [1, 2, 3]\n */\n function curry(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curry.placeholder;\n return result;\n }\n\n /**\n * This method is like `_.curry` except that arguments are applied to `func`\n * in the manner of `_.partialRight` instead of `_.partial`.\n *\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for provided arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of curried functions.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to curry.\n * @param {number} [arity=func.length] The arity of `func`.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the new curried function.\n * @example\n *\n * var abc = function(a, b, c) {\n * return [a, b, c];\n * };\n *\n * var curried = _.curryRight(abc);\n *\n * curried(3)(2)(1);\n * // => [1, 2, 3]\n *\n * curried(2, 3)(1);\n * // => [1, 2, 3]\n *\n * curried(1, 2, 3);\n * // => [1, 2, 3]\n *\n * // Curried with placeholders.\n * curried(3)(1, _)(2);\n * // => [1, 2, 3]\n */\n function curryRight(func, arity, guard) {\n arity = guard ? undefined : arity;\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n result.placeholder = curryRight.placeholder;\n return result;\n }\n\n /**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\n function debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n }\n\n /**\n * Defers invoking the `func` until the current call stack has cleared. Any\n * additional arguments are provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to defer.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.defer(function(text) {\n * console.log(text);\n * }, 'deferred');\n * // => Logs 'deferred' after one millisecond.\n */\n var defer = baseRest(function(func, args) {\n return baseDelay(func, 1, args);\n });\n\n /**\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\n * provided to `func` when it's invoked.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to delay.\n * @param {number} wait The number of milliseconds to delay invocation.\n * @param {...*} [args] The arguments to invoke `func` with.\n * @returns {number} Returns the timer id.\n * @example\n *\n * _.delay(function(text) {\n * console.log(text);\n * }, 1000, 'later');\n * // => Logs 'later' after one second.\n */\n var delay = baseRest(function(func, wait, args) {\n return baseDelay(func, toNumber(wait) || 0, args);\n });\n\n /**\n * Creates a function that invokes `func` with arguments reversed.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to flip arguments for.\n * @returns {Function} Returns the new flipped function.\n * @example\n *\n * var flipped = _.flip(function() {\n * return _.toArray(arguments);\n * });\n *\n * flipped('a', 'b', 'c', 'd');\n * // => ['d', 'c', 'b', 'a']\n */\n function flip(func) {\n return createWrap(func, WRAP_FLIP_FLAG);\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Expose `MapCache`.\n memoize.Cache = MapCache;\n\n /**\n * Creates a function that negates the result of the predicate `func`. The\n * `func` predicate is invoked with the `this` binding and arguments of the\n * created function.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} predicate The predicate to negate.\n * @returns {Function} Returns the new negated function.\n * @example\n *\n * function isEven(n) {\n * return n % 2 == 0;\n * }\n *\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n * // => [1, 3, 5]\n */\n function negate(predicate) {\n if (typeof predicate != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n return function() {\n var args = arguments;\n switch (args.length) {\n case 0: return !predicate.call(this);\n case 1: return !predicate.call(this, args[0]);\n case 2: return !predicate.call(this, args[0], args[1]);\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\n }\n return !predicate.apply(this, args);\n };\n }\n\n /**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\n function once(func) {\n return before(2, func);\n }\n\n /**\n * Creates a function that invokes `func` with its arguments transformed.\n *\n * @static\n * @since 4.0.0\n * @memberOf _\n * @category Function\n * @param {Function} func The function to wrap.\n * @param {...(Function|Function[])} [transforms=[_.identity]]\n * The argument transforms.\n * @returns {Function} Returns the new function.\n * @example\n *\n * function doubled(n) {\n * return n * 2;\n * }\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * var func = _.overArgs(function(x, y) {\n * return [x, y];\n * }, [square, doubled]);\n *\n * func(9, 3);\n * // => [81, 6]\n *\n * func(10, 5);\n * // => [100, 10]\n */\n var overArgs = castRest(function(func, transforms) {\n transforms = (transforms.length == 1 && isArray(transforms[0]))\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n var funcsLength = transforms.length;\n return baseRest(function(args) {\n var index = -1,\n length = nativeMin(args.length, funcsLength);\n\n while (++index < length) {\n args[index] = transforms[index].call(this, args[index]);\n }\n return apply(func, this, args);\n });\n });\n\n /**\n * Creates a function that invokes `func` with `partials` prepended to the\n * arguments it receives. This method is like `_.bind` except it does **not**\n * alter the `this` binding.\n *\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 0.2.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var sayHelloTo = _.partial(greet, 'hello');\n * sayHelloTo('fred');\n * // => 'hello fred'\n *\n * // Partially applied with placeholders.\n * var greetFred = _.partial(greet, _, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n */\n var partial = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partial));\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n });\n\n /**\n * This method is like `_.partial` except that partially applied arguments\n * are appended to the arguments it receives.\n *\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n * builds, may be used as a placeholder for partially applied arguments.\n *\n * **Note:** This method doesn't set the \"length\" property of partially\n * applied functions.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Function\n * @param {Function} func The function to partially apply arguments to.\n * @param {...*} [partials] The arguments to be partially applied.\n * @returns {Function} Returns the new partially applied function.\n * @example\n *\n * function greet(greeting, name) {\n * return greeting + ' ' + name;\n * }\n *\n * var greetFred = _.partialRight(greet, 'fred');\n * greetFred('hi');\n * // => 'hi fred'\n *\n * // Partially applied with placeholders.\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\n * sayHelloTo('fred');\n * // => 'hello fred'\n */\n var partialRight = baseRest(function(func, partials) {\n var holders = replaceHolders(partials, getHolder(partialRight));\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n });\n\n /**\n * Creates a function that invokes `func` with arguments arranged according\n * to the specified `indexes` where the argument value at the first index is\n * provided as the first argument, the argument value at the second index is\n * provided as the second argument, and so on.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {Function} func The function to rearrange arguments for.\n * @param {...(number|number[])} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var rearged = _.rearg(function(a, b, c) {\n * return [a, b, c];\n * }, [2, 0, 1]);\n *\n * rearged('b', 'c', 'a')\n * // => ['a', 'b', 'c']\n */\n var rearg = flatRest(function(func, indexes) {\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n });\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\n function rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start === undefined ? start : toInteger(start);\n return baseRest(func, start);\n }\n\n /**\n * Creates a function that invokes `func` with the `this` binding of the\n * create function and an array of arguments much like\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n *\n * **Note:** This method is based on the\n * [spread operator](https://mdn.io/spread_operator).\n *\n * @static\n * @memberOf _\n * @since 3.2.0\n * @category Function\n * @param {Function} func The function to spread arguments over.\n * @param {number} [start=0] The start position of the spread.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.spread(function(who, what) {\n * return who + ' says ' + what;\n * });\n *\n * say(['fred', 'hello']);\n * // => 'fred says hello'\n *\n * var numbers = Promise.all([\n * Promise.resolve(40),\n * Promise.resolve(36)\n * ]);\n *\n * numbers.then(_.spread(function(x, y) {\n * return x + y;\n * }));\n * // => a Promise of 76\n */\n function spread(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\n return baseRest(function(args) {\n var array = args[start],\n otherArgs = castSlice(args, 0, start);\n\n if (array) {\n arrayPush(otherArgs, array);\n }\n return apply(func, this, otherArgs);\n });\n }\n\n /**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\n function throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n }\n\n /**\n * Creates a function that accepts up to one argument, ignoring any\n * additional arguments.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n * @example\n *\n * _.map(['6', '8', '10'], _.unary(parseInt));\n * // => [6, 8, 10]\n */\n function unary(func) {\n return ary(func, 1);\n }\n\n /**\n * Creates a function that provides `value` to `wrapper` as its first\n * argument. Any additional arguments provided to the function are appended\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n * binding of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {*} value The value to wrap.\n * @param {Function} [wrapper=identity] The wrapper function.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var p = _.wrap(_.escape, function(func, text) {\n * return '

' + func(text) + '

';\n * });\n *\n * p('fred, barney, & pebbles');\n * // => '

fred, barney, & pebbles

'\n */\n function wrap(value, wrapper) {\n return partial(castFunction(wrapper), value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\n function castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n }\n\n /**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\n function clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.clone` except that it accepts `customizer` which\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n * cloning is handled by the method instead. The `customizer` is invoked with\n * up to four arguments; (value [, index|key, object, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeepWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(false);\n * }\n * }\n *\n * var el = _.cloneWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 0\n */\n function cloneWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\n function cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n }\n\n /**\n * This method is like `_.cloneWith` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @param {Function} [customizer] The function to customize cloning.\n * @returns {*} Returns the deep cloned value.\n * @see _.cloneWith\n * @example\n *\n * function customizer(value) {\n * if (_.isElement(value)) {\n * return value.cloneNode(true);\n * }\n * }\n *\n * var el = _.cloneDeepWith(document.body, customizer);\n *\n * console.log(el === document.body);\n * // => false\n * console.log(el.nodeName);\n * // => 'BODY'\n * console.log(el.childNodes.length);\n * // => 20\n */\n function cloneDeepWith(value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n }\n\n /**\n * Checks if `object` conforms to `source` by invoking the predicate\n * properties of `source` with the corresponding property values of `object`.\n *\n * **Note:** This method is equivalent to `_.conforms` when `source` is\n * partially applied.\n *\n * @static\n * @memberOf _\n * @since 4.14.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property predicates to conform to.\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n * // => true\n *\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n * // => false\n */\n function conformsTo(object, source) {\n return source == null || baseConformsTo(object, source, keys(source));\n }\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is greater than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n * @see _.lt\n * @example\n *\n * _.gt(3, 1);\n * // => true\n *\n * _.gt(3, 3);\n * // => false\n *\n * _.gt(1, 3);\n * // => false\n */\n var gt = createRelationalOperation(baseGt);\n\n /**\n * Checks if `value` is greater than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\n * `other`, else `false`.\n * @see _.lte\n * @example\n *\n * _.gte(3, 1);\n * // => true\n *\n * _.gte(3, 3);\n * // => true\n *\n * _.gte(1, 3);\n * // => false\n */\n var gte = createRelationalOperation(function(value, other) {\n return value >= other;\n });\n\n /**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n };\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray = Array.isArray;\n\n /**\n * Checks if `value` is classified as an `ArrayBuffer` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n * @example\n *\n * _.isArrayBuffer(new ArrayBuffer(2));\n * // => true\n *\n * _.isArrayBuffer(new Array(2));\n * // => false\n */\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n /**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\n function isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n }\n\n /**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\n function isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n }\n\n /**\n * Checks if `value` is classified as a boolean primitive or object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\n function isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n }\n\n /**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\n var isBuffer = nativeIsBuffer || stubFalse;\n\n /**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n /**\n * Checks if `value` is likely a DOM element.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n * @example\n *\n * _.isElement(document.body);\n * // => true\n *\n * _.isElement('');\n * // => false\n */\n function isElement(value) {\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n }\n\n /**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\n function isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\n function isEqual(value, other) {\n return baseIsEqual(value, other);\n }\n\n /**\n * This method is like `_.isEqual` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with up to\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, othValue) {\n * if (isGreeting(objValue) && isGreeting(othValue)) {\n * return true;\n * }\n * }\n *\n * var array = ['hello', 'goodbye'];\n * var other = ['hi', 'goodbye'];\n *\n * _.isEqualWith(array, other, customizer);\n * // => true\n */\n function isEqualWith(value, other, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n var result = customizer ? customizer(value, other) : undefined;\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n }\n\n /**\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n * `SyntaxError`, `TypeError`, or `URIError` object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n * @example\n *\n * _.isError(new Error);\n * // => true\n *\n * _.isError(Error);\n * // => false\n */\n function isError(value) {\n if (!isObjectLike(value)) {\n return false;\n }\n var tag = baseGetTag(value);\n return tag == errorTag || tag == domExcTag ||\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n }\n\n /**\n * Checks if `value` is a finite primitive number.\n *\n * **Note:** This method is based on\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n * @example\n *\n * _.isFinite(3);\n * // => true\n *\n * _.isFinite(Number.MIN_VALUE);\n * // => true\n *\n * _.isFinite(Infinity);\n * // => false\n *\n * _.isFinite('3');\n * // => false\n */\n function isFinite(value) {\n return typeof value == 'number' && nativeIsFinite(value);\n }\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n }\n\n /**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\n function isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n }\n\n /**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\n function isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return value != null && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n /**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\n function isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n }\n\n /**\n * This method is like `_.isMatch` except that it accepts `customizer` which\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n * are handled by the method instead. The `customizer` is invoked with five\n * arguments: (objValue, srcValue, index|key, object, source).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * function isGreeting(value) {\n * return /^h(?:i|ello)$/.test(value);\n * }\n *\n * function customizer(objValue, srcValue) {\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\n * return true;\n * }\n * }\n *\n * var object = { 'greeting': 'hello' };\n * var source = { 'greeting': 'hi' };\n *\n * _.isMatchWith(object, source, customizer);\n * // => true\n */\n function isMatchWith(object, source, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return baseIsMatch(object, source, getMatchData(source), customizer);\n }\n\n /**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\n function isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n }\n\n /**\n * Checks if `value` is a pristine native function.\n *\n * **Note:** This method can't reliably detect native functions in the presence\n * of the core-js package because core-js circumvents this kind of detection.\n * Despite multiple requests, the core-js maintainer has made it clear: any\n * attempt to fix the detection will be obstructed. As a result, we're left\n * with little choice but to throw an error. Unfortunately, this also affects\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n * which rely on core-js.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n * @example\n *\n * _.isNative(Array.prototype.push);\n * // => true\n *\n * _.isNative(_);\n * // => false\n */\n function isNative(value) {\n if (isMaskable(value)) {\n throw new Error(CORE_ERROR_TEXT);\n }\n return baseIsNative(value);\n }\n\n /**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\n function isNull(value) {\n return value === null;\n }\n\n /**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\n function isNil(value) {\n return value == null;\n }\n\n /**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\n function isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n }\n\n /**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n }\n\n /**\n * Checks if `value` is classified as a `RegExp` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n * @example\n *\n * _.isRegExp(/abc/);\n * // => true\n *\n * _.isRegExp('/abc/');\n * // => false\n */\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n /**\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n * double precision number which isn't the result of a rounded unsafe integer.\n *\n * **Note:** This method is based on\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n * @example\n *\n * _.isSafeInteger(3);\n * // => true\n *\n * _.isSafeInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isSafeInteger(Infinity);\n * // => false\n *\n * _.isSafeInteger('3');\n * // => false\n */\n function isSafeInteger(value) {\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n }\n\n /**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n /**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\n function isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n }\n\n /**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n /**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\n function isUndefined(value) {\n return value === undefined;\n }\n\n /**\n * Checks if `value` is classified as a `WeakMap` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n * @example\n *\n * _.isWeakMap(new WeakMap);\n * // => true\n *\n * _.isWeakMap(new Map);\n * // => false\n */\n function isWeakMap(value) {\n return isObjectLike(value) && getTag(value) == weakMapTag;\n }\n\n /**\n * Checks if `value` is classified as a `WeakSet` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n * @example\n *\n * _.isWeakSet(new WeakSet);\n * // => true\n *\n * _.isWeakSet(new Set);\n * // => false\n */\n function isWeakSet(value) {\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n }\n\n /**\n * Checks if `value` is less than `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n * @see _.gt\n * @example\n *\n * _.lt(1, 3);\n * // => true\n *\n * _.lt(3, 3);\n * // => false\n *\n * _.lt(3, 1);\n * // => false\n */\n var lt = createRelationalOperation(baseLt);\n\n /**\n * Checks if `value` is less than or equal to `other`.\n *\n * @static\n * @memberOf _\n * @since 3.9.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than or equal to\n * `other`, else `false`.\n * @see _.gte\n * @example\n *\n * _.lte(1, 3);\n * // => true\n *\n * _.lte(3, 3);\n * // => true\n *\n * _.lte(3, 1);\n * // => false\n */\n var lte = createRelationalOperation(function(value, other) {\n return value <= other;\n });\n\n /**\n * Converts `value` to an array.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Array} Returns the converted array.\n * @example\n *\n * _.toArray({ 'a': 1, 'b': 2 });\n * // => [1, 2]\n *\n * _.toArray('abc');\n * // => ['a', 'b', 'c']\n *\n * _.toArray(1);\n * // => []\n *\n * _.toArray(null);\n * // => []\n */\n function toArray(value) {\n if (!value) {\n return [];\n }\n if (isArrayLike(value)) {\n return isString(value) ? stringToArray(value) : copyArray(value);\n }\n if (symIterator && value[symIterator]) {\n return iteratorToArray(value[symIterator]());\n }\n var tag = getTag(value),\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n return func(value);\n }\n\n /**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\n function toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n }\n\n /**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\n function toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n }\n\n /**\n * Converts `value` to an integer suitable for use as the length of an\n * array-like object.\n *\n * **Note:** This method is based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toLength(3.2);\n * // => 3\n *\n * _.toLength(Number.MIN_VALUE);\n * // => 0\n *\n * _.toLength(Infinity);\n * // => 4294967295\n *\n * _.toLength('3.2');\n * // => 3\n */\n function toLength(value) {\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n }\n\n /**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\n function toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n }\n\n /**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\n function toPlainObject(value) {\n return copyObject(value, keysIn(value));\n }\n\n /**\n * Converts `value` to a safe integer. A safe integer can be compared and\n * represented correctly.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toSafeInteger(3.2);\n * // => 3\n *\n * _.toSafeInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toSafeInteger(Infinity);\n * // => 9007199254740991\n *\n * _.toSafeInteger('3.2');\n * // => 3\n */\n function toSafeInteger(value) {\n return value\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n : (value === 0 ? value : 0);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\n var assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n });\n\n /**\n * This method is like `_.assign` except that it iterates over own and\n * inherited source properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extend\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assign\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n */\n var assignIn = createAssigner(function(object, source) {\n copyObject(source, keysIn(source), object);\n });\n\n /**\n * This method is like `_.assignIn` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias extendWith\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignInWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keysIn(source), object, customizer);\n });\n\n /**\n * This method is like `_.assign` except that it accepts `customizer`\n * which is invoked to produce the assigned values. If `customizer` returns\n * `undefined`, assignment is handled by the method instead. The `customizer`\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @see _.assignInWith\n * @example\n *\n * function customizer(objValue, srcValue) {\n * return _.isUndefined(objValue) ? srcValue : objValue;\n * }\n *\n * var defaults = _.partialRight(_.assignWith, customizer);\n *\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n copyObject(source, keys(source), object, customizer);\n });\n\n /**\n * Creates an array of values corresponding to `paths` of `object`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Array} Returns the picked values.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n *\n * _.at(object, ['a[0].b.c', 'a[1]']);\n * // => [3, 4]\n */\n var at = flatRest(baseAt);\n\n /**\n * Creates an object that inherits from the `prototype` object. If a\n * `properties` object is given, its own enumerable string keyed properties\n * are assigned to the created object.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Object\n * @param {Object} prototype The object to inherit from.\n * @param {Object} [properties] The properties to assign to the object.\n * @returns {Object} Returns the new object.\n * @example\n *\n * function Shape() {\n * this.x = 0;\n * this.y = 0;\n * }\n *\n * function Circle() {\n * Shape.call(this);\n * }\n *\n * Circle.prototype = _.create(Shape.prototype, {\n * 'constructor': Circle\n * });\n *\n * var circle = new Circle;\n * circle instanceof Circle;\n * // => true\n *\n * circle instanceof Shape;\n * // => true\n */\n function create(prototype, properties) {\n var result = baseCreate(prototype);\n return properties == null ? result : baseAssign(result, properties);\n }\n\n /**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\n var defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n });\n\n /**\n * This method is like `_.defaults` except that it recursively assigns\n * default properties.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaults\n * @example\n *\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n * // => { 'a': { 'b': 2, 'c': 3 } }\n */\n var defaultsDeep = baseRest(function(args) {\n args.push(undefined, customDefaultsMerge);\n return apply(mergeWith, undefined, args);\n });\n\n /**\n * This method is like `_.find` except that it returns the key of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findKey(users, function(o) { return o.age < 40; });\n * // => 'barney' (iteration order is not guaranteed)\n *\n * // The `_.matches` iteratee shorthand.\n * _.findKey(users, { 'age': 1, 'active': true });\n * // => 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findKey(users, 'active');\n * // => 'barney'\n */\n function findKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n }\n\n /**\n * This method is like `_.findKey` except that it iterates over elements of\n * a collection in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {string|undefined} Returns the key of the matched element,\n * else `undefined`.\n * @example\n *\n * var users = {\n * 'barney': { 'age': 36, 'active': true },\n * 'fred': { 'age': 40, 'active': false },\n * 'pebbles': { 'age': 1, 'active': true }\n * };\n *\n * _.findLastKey(users, function(o) { return o.age < 40; });\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.findLastKey(users, { 'age': 36, 'active': true });\n * // => 'barney'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findLastKey(users, ['active', false]);\n * // => 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.findLastKey(users, 'active');\n * // => 'pebbles'\n */\n function findLastKey(object, predicate) {\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n }\n\n /**\n * Iterates over own and inherited enumerable string keyed properties of an\n * object and invokes `iteratee` for each property. The iteratee is invoked\n * with three arguments: (value, key, object). Iteratee functions may exit\n * iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forInRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forIn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n */\n function forIn(object, iteratee) {\n return object == null\n ? object\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * This method is like `_.forIn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forInRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n */\n function forInRight(object, iteratee) {\n return object == null\n ? object\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n }\n\n /**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\n function forOwn(object, iteratee) {\n return object && baseForOwn(object, getIteratee(iteratee, 3));\n }\n\n /**\n * This method is like `_.forOwn` except that it iterates over properties of\n * `object` in the opposite order.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwnRight(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n */\n function forOwnRight(object, iteratee) {\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n }\n\n /**\n * Creates an array of function property names from own enumerable properties\n * of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functionsIn\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functions(new Foo);\n * // => ['a', 'b']\n */\n function functions(object) {\n return object == null ? [] : baseFunctions(object, keys(object));\n }\n\n /**\n * Creates an array of function property names from own and inherited\n * enumerable properties of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to inspect.\n * @returns {Array} Returns the function names.\n * @see _.functions\n * @example\n *\n * function Foo() {\n * this.a = _.constant('a');\n * this.b = _.constant('b');\n * }\n *\n * Foo.prototype.c = _.constant('c');\n *\n * _.functionsIn(new Foo);\n * // => ['a', 'b', 'c']\n */\n function functionsIn(object) {\n return object == null ? [] : baseFunctions(object, keysIn(object));\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n /**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\n function has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n }\n\n /**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\n function hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n }\n\n /**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\n var invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n }, constant(identity));\n\n /**\n * This method is like `_.invert` except that the inverted object is generated\n * from the results of running each element of `object` thru `iteratee`. The\n * corresponding inverted value of each inverted key is an array of keys\n * responsible for generating the inverted value. The iteratee is invoked\n * with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 4.1.0\n * @category Object\n * @param {Object} object The object to invert.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invertBy(object);\n * // => { '1': ['a', 'c'], '2': ['b'] }\n *\n * _.invertBy(object, function(value) {\n * return 'group' + value;\n * });\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n */\n var invertBy = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }, getIteratee);\n\n /**\n * Invokes the method at `path` of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the method to invoke.\n * @param {...*} [args] The arguments to invoke the method with.\n * @returns {*} Returns the result of the invoked method.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n *\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n * // => [2, 3]\n */\n var invoke = baseRest(baseInvoke);\n\n /**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\n function keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n }\n\n /**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\n function keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n }\n\n /**\n * The opposite of `_.mapValues`; this method creates an object with the\n * same values as `object` and keys generated by running each own enumerable\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n * with three arguments: (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 3.8.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapValues\n * @example\n *\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n * return key + value;\n * });\n * // => { 'a1': 1, 'b2': 2 }\n */\n function mapKeys(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, iteratee(value, key, object), value);\n });\n return result;\n }\n\n /**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\n function mapValues(object, iteratee) {\n var result = {};\n iteratee = getIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n }\n\n /**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\n var merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n });\n\n /**\n * This method is like `_.merge` except that it accepts `customizer` which\n * is invoked to produce the merged values of the destination and source\n * properties. If `customizer` returns `undefined`, merging is handled by the\n * method instead. The `customizer` is invoked with six arguments:\n * (objValue, srcValue, key, object, source, stack).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} sources The source objects.\n * @param {Function} customizer The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * function customizer(objValue, srcValue) {\n * if (_.isArray(objValue)) {\n * return objValue.concat(srcValue);\n * }\n * }\n *\n * var object = { 'a': [1], 'b': [2] };\n * var other = { 'a': [3], 'b': [4] };\n *\n * _.mergeWith(object, other, customizer);\n * // => { 'a': [1, 3], 'b': [2, 4] }\n */\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n baseMerge(object, source, srcIndex, customizer);\n });\n\n /**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\n var omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n });\n\n /**\n * The opposite of `_.pickBy`; this method creates an object composed of\n * the own and inherited enumerable string keyed properties of `object` that\n * `predicate` doesn't return truthy for. The predicate is invoked with two\n * arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omitBy(object, _.isNumber);\n * // => { 'b': '2' }\n */\n function omitBy(object, predicate) {\n return pickBy(object, negate(getIteratee(predicate)));\n }\n\n /**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\n var pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n });\n\n /**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\n function pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = getIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n }\n\n /**\n * This method is like `_.get` except that if the resolved value is a\n * function it's invoked with the `this` binding of its parent object and\n * its result is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to resolve.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n *\n * _.result(object, 'a[0].b.c1');\n * // => 3\n *\n * _.result(object, 'a[0].b.c2');\n * // => 4\n *\n * _.result(object, 'a[0].b.c3', 'default');\n * // => 'default'\n *\n * _.result(object, 'a[0].b.c3', _.constant('default'));\n * // => 'default'\n */\n function result(object, path, defaultValue) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length;\n\n // Ensure the loop is entered when path is empty.\n if (!length) {\n length = 1;\n object = undefined;\n }\n while (++index < length) {\n var value = object == null ? undefined : object[toKey(path[index])];\n if (value === undefined) {\n index = length;\n value = defaultValue;\n }\n object = isFunction(value) ? value.call(object) : value;\n }\n return object;\n }\n\n /**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\n function set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n }\n\n /**\n * This method is like `_.set` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.setWith(object, '[0][1]', 'a', Object);\n * // => { '0': { '1': 'a' } }\n */\n function setWith(object, path, value, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseSet(object, path, value, customizer);\n }\n\n /**\n * Creates an array of own enumerable string keyed-value pairs for `object`\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n * entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entries\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairs(new Foo);\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n */\n var toPairs = createToPairs(keys);\n\n /**\n * Creates an array of own and inherited enumerable string keyed-value pairs\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n * or set, its entries are returned.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @alias entriesIn\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the key-value pairs.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.toPairsIn(new Foo);\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n */\n var toPairsIn = createToPairs(keysIn);\n\n /**\n * An alternative to `_.reduce`; this method transforms `object` to a new\n * `accumulator` object which is the result of running each of its own\n * enumerable string keyed properties thru `iteratee`, with each invocation\n * potentially mutating the `accumulator` object. If `accumulator` is not\n * provided, a new object with the same `[[Prototype]]` will be used. The\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 1.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @param {*} [accumulator] The custom accumulator value.\n * @returns {*} Returns the accumulated value.\n * @example\n *\n * _.transform([2, 3, 4], function(result, n) {\n * result.push(n *= n);\n * return n % 2 == 0;\n * }, []);\n * // => [4, 9]\n *\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n * (result[value] || (result[value] = [])).push(key);\n * }, {});\n * // => { '1': ['a', 'c'], '2': ['b'] }\n */\n function transform(object, iteratee, accumulator) {\n var isArr = isArray(object),\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n iteratee = getIteratee(iteratee, 4);\n if (accumulator == null) {\n var Ctor = object && object.constructor;\n if (isArrLike) {\n accumulator = isArr ? new Ctor : [];\n }\n else if (isObject(object)) {\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n }\n else {\n accumulator = {};\n }\n }\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n return iteratee(accumulator, value, index, object);\n });\n return accumulator;\n }\n\n /**\n * Removes the property at `path` of `object`.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n * _.unset(object, 'a[0].b.c');\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n *\n * _.unset(object, ['a', '0', 'b', 'c']);\n * // => true\n *\n * console.log(object);\n * // => { 'a': [{ 'b': {} }] };\n */\n function unset(object, path) {\n return object == null ? true : baseUnset(object, path);\n }\n\n /**\n * This method is like `_.set` except that accepts `updater` to produce the\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n * is invoked with one argument: (value).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n * console.log(object.a[0].b.c);\n * // => 9\n *\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n * console.log(object.x[0].y.z);\n * // => 0\n */\n function update(object, path, updater) {\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\n }\n\n /**\n * This method is like `_.update` except that it accepts `customizer` which is\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\n * path creation is handled by the method instead. The `customizer` is invoked\n * with three arguments: (nsValue, key, nsObject).\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 4.6.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {Function} updater The function to produce the updated value.\n * @param {Function} [customizer] The function to customize assigned values.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {};\n *\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n * // => { '0': { '1': 'a' } }\n */\n function updateWith(object, path, updater, customizer) {\n customizer = typeof customizer == 'function' ? customizer : undefined;\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n }\n\n /**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\n function values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n }\n\n /**\n * Creates an array of the own and inherited enumerable string keyed property\n * values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.valuesIn(new Foo);\n * // => [1, 2, 3] (iteration order is not guaranteed)\n */\n function valuesIn(object) {\n return object == null ? [] : baseValues(object, keysIn(object));\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\n function clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n }\n\n /**\n * Checks if `n` is between `start` and up to, but not including, `end`. If\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\n * If `start` is greater than `end` the params are swapped to support\n * negative ranges.\n *\n * @static\n * @memberOf _\n * @since 3.3.0\n * @category Number\n * @param {number} number The number to check.\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n * @see _.range, _.rangeRight\n * @example\n *\n * _.inRange(3, 2, 4);\n * // => true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n *\n * _.inRange(-3, -2, -6);\n * // => true\n */\n function inRange(number, start, end) {\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n number = toNumber(number);\n return baseInRange(number, start, end);\n }\n\n /**\n * Produces a random number between the inclusive `lower` and `upper` bounds.\n * If only one argument is provided a number between `0` and the given number\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\n * floats, a floating-point number is returned instead of an integer.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Number\n * @param {number} [lower=0] The lower bound.\n * @param {number} [upper=1] The upper bound.\n * @param {boolean} [floating] Specify returning a floating-point number.\n * @returns {number} Returns the random number.\n * @example\n *\n * _.random(0, 5);\n * // => an integer between 0 and 5\n *\n * _.random(5);\n * // => also an integer between 0 and 5\n *\n * _.random(5, true);\n * // => a floating-point number between 0 and 5\n *\n * _.random(1.2, 5.2);\n * // => a floating-point number between 1.2 and 5.2\n */\n function random(lower, upper, floating) {\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n upper = floating = undefined;\n }\n if (floating === undefined) {\n if (typeof upper == 'boolean') {\n floating = upper;\n upper = undefined;\n }\n else if (typeof lower == 'boolean') {\n floating = lower;\n lower = undefined;\n }\n }\n if (lower === undefined && upper === undefined) {\n lower = 0;\n upper = 1;\n }\n else {\n lower = toFinite(lower);\n if (upper === undefined) {\n upper = lower;\n lower = 0;\n } else {\n upper = toFinite(upper);\n }\n }\n if (lower > upper) {\n var temp = lower;\n lower = upper;\n upper = temp;\n }\n if (floating || lower % 1 || upper % 1) {\n var rand = nativeRandom();\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n }\n return baseRandom(lower, upper);\n }\n\n /*------------------------------------------------------------------------*/\n\n /**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\n var camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n });\n\n /**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\n function capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n }\n\n /**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('déjà vu');\n * // => 'deja vu'\n */\n function deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n }\n\n /**\n * Checks if `string` ends with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=string.length] The position to search up to.\n * @returns {boolean} Returns `true` if `string` ends with `target`,\n * else `false`.\n * @example\n *\n * _.endsWith('abc', 'c');\n * // => true\n *\n * _.endsWith('abc', 'b');\n * // => false\n *\n * _.endsWith('abc', 'b', 2);\n * // => true\n */\n function endsWith(string, target, position) {\n string = toString(string);\n target = baseToString(target);\n\n var length = string.length;\n position = position === undefined\n ? length\n : baseClamp(toInteger(position), 0, length);\n\n var end = position;\n position -= target.length;\n return position >= 0 && string.slice(position, end) == target;\n }\n\n /**\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n * corresponding HTML entities.\n *\n * **Note:** No other characters are escaped. To escape additional\n * characters use a third-party library like [_he_](https://mths.be/he).\n *\n * Though the \">\" character is escaped for symmetry, characters like\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n * unless they're part of a tag or unquoted attribute value. See\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n * (under \"semi-related fun fact\") for more details.\n *\n * When working with HTML you should always\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n * XSS vectors.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escape('fred, barney, & pebbles');\n * // => 'fred, barney, & pebbles'\n */\n function escape(string) {\n string = toString(string);\n return (string && reHasUnescapedHtml.test(string))\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\n : string;\n }\n\n /**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\n function escapeRegExp(string) {\n string = toString(string);\n return (string && reHasRegExpChar.test(string))\n ? string.replace(reRegExpChar, '\\\\$&')\n : string;\n }\n\n /**\n * Converts `string` to\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the kebab cased string.\n * @example\n *\n * _.kebabCase('Foo Bar');\n * // => 'foo-bar'\n *\n * _.kebabCase('fooBar');\n * // => 'foo-bar'\n *\n * _.kebabCase('__FOO_BAR__');\n * // => 'foo-bar'\n */\n var kebabCase = createCompounder(function(result, word, index) {\n return result + (index ? '-' : '') + word.toLowerCase();\n });\n\n /**\n * Converts `string`, as space separated words, to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the lower cased string.\n * @example\n *\n * _.lowerCase('--Foo-Bar--');\n * // => 'foo bar'\n *\n * _.lowerCase('fooBar');\n * // => 'foo bar'\n *\n * _.lowerCase('__FOO_BAR__');\n * // => 'foo bar'\n */\n var lowerCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + word.toLowerCase();\n });\n\n /**\n * Converts the first character of `string` to lower case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.lowerFirst('Fred');\n * // => 'fred'\n *\n * _.lowerFirst('FRED');\n * // => 'fRED'\n */\n var lowerFirst = createCaseFirst('toLowerCase');\n\n /**\n * Pads `string` on the left and right sides if it's shorter than `length`.\n * Padding characters are truncated if they can't be evenly divided by `length`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.pad('abc', 8);\n * // => ' abc '\n *\n * _.pad('abc', 8, '_-');\n * // => '_-abc_-_'\n *\n * _.pad('abc', 3);\n * // => 'abc'\n */\n function pad(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n if (!length || strLength >= length) {\n return string;\n }\n var mid = (length - strLength) / 2;\n return (\n createPadding(nativeFloor(mid), chars) +\n string +\n createPadding(nativeCeil(mid), chars)\n );\n }\n\n /**\n * Pads `string` on the right side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padEnd('abc', 6);\n * // => 'abc '\n *\n * _.padEnd('abc', 6, '_-');\n * // => 'abc_-_'\n *\n * _.padEnd('abc', 3);\n * // => 'abc'\n */\n function padEnd(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (string + createPadding(length - strLength, chars))\n : string;\n }\n\n /**\n * Pads `string` on the left side if it's shorter than `length`. Padding\n * characters are truncated if they exceed `length`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to pad.\n * @param {number} [length=0] The padding length.\n * @param {string} [chars=' '] The string used as padding.\n * @returns {string} Returns the padded string.\n * @example\n *\n * _.padStart('abc', 6);\n * // => ' abc'\n *\n * _.padStart('abc', 6, '_-');\n * // => '_-_abc'\n *\n * _.padStart('abc', 3);\n * // => 'abc'\n */\n function padStart(string, length, chars) {\n string = toString(string);\n length = toInteger(length);\n\n var strLength = length ? stringSize(string) : 0;\n return (length && strLength < length)\n ? (createPadding(length - strLength, chars) + string)\n : string;\n }\n\n /**\n * Converts `string` to an integer of the specified radix. If `radix` is\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n * hexadecimal, in which case a `radix` of `16` is used.\n *\n * **Note:** This method aligns with the\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category String\n * @param {string} string The string to convert.\n * @param {number} [radix=10] The radix to interpret `value` by.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.parseInt('08');\n * // => 8\n *\n * _.map(['6', '08', '10'], _.parseInt);\n * // => [6, 8, 10]\n */\n function parseInt(string, radix, guard) {\n if (guard || radix == null) {\n radix = 0;\n } else if (radix) {\n radix = +radix;\n }\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n }\n\n /**\n * Repeats the given string `n` times.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to repeat.\n * @param {number} [n=1] The number of times to repeat the string.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {string} Returns the repeated string.\n * @example\n *\n * _.repeat('*', 3);\n * // => '***'\n *\n * _.repeat('abc', 2);\n * // => 'abcabc'\n *\n * _.repeat('abc', 0);\n * // => ''\n */\n function repeat(string, n, guard) {\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n n = 1;\n } else {\n n = toInteger(n);\n }\n return baseRepeat(toString(string), n);\n }\n\n /**\n * Replaces matches for `pattern` in `string` with `replacement`.\n *\n * **Note:** This method is based on\n * [`String#replace`](https://mdn.io/String/replace).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to modify.\n * @param {RegExp|string} pattern The pattern to replace.\n * @param {Function|string} replacement The match replacement.\n * @returns {string} Returns the modified string.\n * @example\n *\n * _.replace('Hi Fred', 'Fred', 'Barney');\n * // => 'Hi Barney'\n */\n function replace() {\n var args = arguments,\n string = toString(args[0]);\n\n return args.length < 3 ? string : string.replace(args[1], args[2]);\n }\n\n /**\n * Converts `string` to\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the snake cased string.\n * @example\n *\n * _.snakeCase('Foo Bar');\n * // => 'foo_bar'\n *\n * _.snakeCase('fooBar');\n * // => 'foo_bar'\n *\n * _.snakeCase('--FOO-BAR--');\n * // => 'foo_bar'\n */\n var snakeCase = createCompounder(function(result, word, index) {\n return result + (index ? '_' : '') + word.toLowerCase();\n });\n\n /**\n * Splits `string` by `separator`.\n *\n * **Note:** This method is based on\n * [`String#split`](https://mdn.io/String/split).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to split.\n * @param {RegExp|string} separator The separator pattern to split by.\n * @param {number} [limit] The length to truncate results to.\n * @returns {Array} Returns the string segments.\n * @example\n *\n * _.split('a-b-c', '-', 2);\n * // => ['a', 'b']\n */\n function split(string, separator, limit) {\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n separator = limit = undefined;\n }\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n if (!limit) {\n return [];\n }\n string = toString(string);\n if (string && (\n typeof separator == 'string' ||\n (separator != null && !isRegExp(separator))\n )) {\n separator = baseToString(separator);\n if (!separator && hasUnicode(string)) {\n return castSlice(stringToArray(string), 0, limit);\n }\n }\n return string.split(separator, limit);\n }\n\n /**\n * Converts `string` to\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n *\n * @static\n * @memberOf _\n * @since 3.1.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the start cased string.\n * @example\n *\n * _.startCase('--foo-bar--');\n * // => 'Foo Bar'\n *\n * _.startCase('fooBar');\n * // => 'Foo Bar'\n *\n * _.startCase('__FOO_BAR__');\n * // => 'FOO BAR'\n */\n var startCase = createCompounder(function(result, word, index) {\n return result + (index ? ' ' : '') + upperFirst(word);\n });\n\n /**\n * Checks if `string` starts with the given target string.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {string} [target] The string to search for.\n * @param {number} [position=0] The position to search from.\n * @returns {boolean} Returns `true` if `string` starts with `target`,\n * else `false`.\n * @example\n *\n * _.startsWith('abc', 'a');\n * // => true\n *\n * _.startsWith('abc', 'b');\n * // => false\n *\n * _.startsWith('abc', 'b', 1);\n * // => true\n */\n function startsWith(string, target, position) {\n string = toString(string);\n position = position == null\n ? 0\n : baseClamp(toInteger(position), 0, string.length);\n\n target = baseToString(target);\n return string.slice(position, position + target.length) == target;\n }\n\n /**\n * Creates a compiled template function that can interpolate data properties\n * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n * properties may be accessed as free variables in the template. If a setting\n * object is given, it takes precedence over `_.templateSettings` values.\n *\n * **Note:** In the development build `_.template` utilizes\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n * for easier debugging.\n *\n * For more information on precompiling templates see\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n *\n * For more information on Chrome extension sandboxes see\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category String\n * @param {string} [string=''] The template string.\n * @param {Object} [options={}] The options object.\n * @param {RegExp} [options.escape=_.templateSettings.escape]\n * The HTML \"escape\" delimiter.\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n * The \"evaluate\" delimiter.\n * @param {Object} [options.imports=_.templateSettings.imports]\n * An object to import into the template as free variables.\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n * The \"interpolate\" delimiter.\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\n * The sourceURL of the compiled template.\n * @param {string} [options.variable='obj']\n * The data object variable name.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Function} Returns the compiled template function.\n * @example\n *\n * // Use the \"interpolate\" delimiter to create a compiled template.\n * var compiled = _.template('hello <%= user %>!');\n * compiled({ 'user': 'fred' });\n * // => 'hello fred!'\n *\n * // Use the HTML \"escape\" delimiter to escape data property values.\n * var compiled = _.template('<%- value %>');\n * compiled({ 'value': '